diff --git a/assets/index-2f36c00b.js b/assets/index-1919a61e.js similarity index 82% rename from assets/index-2f36c00b.js rename to assets/index-1919a61e.js index 0c9e018..569e277 100644 --- a/assets/index-2f36c00b.js +++ b/assets/index-1919a61e.js @@ -1,4 +1,4 @@ -var Lj=Object.defineProperty;var jj=(t,e,r)=>e in t?Lj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var G=(t,e,r)=>(jj(t,typeof e!="symbol"?e+"":e,r),r),vg=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var S=(t,e,r)=>(vg(t,e,"read from private field"),r?r.call(t):e.get(t)),W=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},N=(t,e,r,n)=>(vg(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Ed=(t,e,r,n)=>({set _(s){N(t,e,s,r)},get _(){return S(t,e,n)}}),ee=(t,e,r)=>(vg(t,e,"access private method"),r);function X8(t,e){for(var r=0;rn[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function X2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Z8={exports:{}},z0={},e5={exports:{}},Ve={};/** +var jj=Object.defineProperty;var Bj=(t,e,r)=>e in t?jj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var G=(t,e,r)=>(Bj(t,typeof e!="symbol"?e+"":e,r),r),vg=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var S=(t,e,r)=>(vg(t,e,"read from private field"),r?r.call(t):e.get(t)),W=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},N=(t,e,r,n)=>(vg(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Ed=(t,e,r,n)=>({set _(s){N(t,e,s,r)},get _(){return S(t,e,n)}}),ee=(t,e,r)=>(vg(t,e,"access private method"),r);function X8(t,e){for(var r=0;rn[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function X2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Z8={exports:{}},z0={},e5={exports:{}},Ve={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var Lj=Object.defineProperty;var jj=(t,e,r)=>e in t?Lj(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Kp=Symbol.for("react.element"),Bj=Symbol.for("react.portal"),Fj=Symbol.for("react.fragment"),Uj=Symbol.for("react.strict_mode"),Vj=Symbol.for("react.profiler"),$j=Symbol.for("react.provider"),zj=Symbol.for("react.context"),Hj=Symbol.for("react.forward_ref"),Gj=Symbol.for("react.suspense"),qj=Symbol.for("react.memo"),Wj=Symbol.for("react.lazy"),Qk=Symbol.iterator;function Kj(t){return t===null||typeof t!="object"?null:(t=Qk&&t[Qk]||t["@@iterator"],typeof t=="function"?t:null)}var t5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},r5=Object.assign,n5={};function nd(t,e,r){this.props=t,this.context=e,this.refs=n5,this.updater=r||t5}nd.prototype.isReactComponent={};nd.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};nd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function s5(){}s5.prototype=nd.prototype;function Z2(t,e,r){this.props=t,this.context=e,this.refs=n5,this.updater=r||t5}var eE=Z2.prototype=new s5;eE.constructor=Z2;r5(eE,nd.prototype);eE.isPureReactComponent=!0;var Yk=Array.isArray,i5=Object.prototype.hasOwnProperty,tE={current:null},o5={key:!0,ref:!0,__self:!0,__source:!0};function a5(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)i5.call(e,n)&&!o5.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1e in t?Lj(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Zj=v,eB=Symbol.for("react.element"),tB=Symbol.for("react.fragment"),rB=Object.prototype.hasOwnProperty,nB=Zj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sB={key:!0,ref:!0,__self:!0,__source:!0};function u5(t,e,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)rB.call(e,n)&&!sB.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:eB,type:t,key:i,ref:o,props:s,_owner:nB.current}}z0.Fragment=tB;z0.jsx=u5;z0.jsxs=u5;Z8.exports=z0;var k=Z8.exports,db={},f5={exports:{}},zn={},d5={exports:{}},h5={};/** + */var eB=v,tB=Symbol.for("react.element"),rB=Symbol.for("react.fragment"),nB=Object.prototype.hasOwnProperty,sB=eB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,iB={key:!0,ref:!0,__self:!0,__source:!0};function u5(t,e,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)nB.call(e,n)&&!iB.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:tB,type:t,key:i,ref:o,props:s,_owner:sB.current}}z0.Fragment=rB;z0.jsx=u5;z0.jsxs=u5;Z8.exports=z0;var k=Z8.exports,db={},f5={exports:{}},zn={},d5={exports:{}},h5={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var Lj=Object.defineProperty;var jj=(t,e,r)=>e in t?Lj(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(R,I){var U=R.length;R.push(I);e:for(;0>>1,X=R[F];if(0>>1;Fs(ke,U))ves(ie,ke)?(R[F]=ie,R[ve]=U,F=ve):(R[F]=ke,R[ae]=U,F=ae);else if(ves(ie,U))R[F]=ie,R[ve]=U,F=ve;else break e}}return I}function s(R,I){var U=R.sortIndex-I.sortIndex;return U!==0?U:R.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],u=1,f=null,d=3,h=!1,p=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(R){for(var I=r(l);I!==null;){if(I.callback===null)n(l);else if(I.startTime<=R)n(l),I.sortIndex=I.expirationTime,e(c,I);else break;I=r(l)}}function w(R){if(y=!1,b(R),!p)if(r(c)!==null)p=!0,T(A);else{var I=r(l);I!==null&&P(w,I.startTime-R)}}function A(R,I){p=!1,y&&(y=!1,m(C),C=-1),h=!0;var U=d;try{for(b(I),f=r(c);f!==null&&(!(f.expirationTime>I)||R&&!B());){var F=f.callback;if(typeof F=="function"){f.callback=null,d=f.priorityLevel;var X=F(f.expirationTime<=I);I=t.unstable_now(),typeof X=="function"?f.callback=X:f===r(c)&&n(c),b(I)}else n(c);f=r(c)}if(f!==null)var oe=!0;else{var ae=r(l);ae!==null&&P(w,ae.startTime-I),oe=!1}return oe}finally{f=null,d=U,h=!1}}var O=!1,_=null,C=-1,j=5,V=-1;function B(){return!(t.unstable_now()-VR||125F?(R.sortIndex=U,e(l,R),r(c)===null&&R===r(l)&&(y?(m(C),C=-1):y=!0,P(w,U-F))):(R.sortIndex=X,e(c,R),p||h||(p=!0,T(A))),R},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(R){var I=d;return function(){var U=d;d=I;try{return R.apply(this,arguments)}finally{d=U}}}})(h5);d5.exports=h5;var iB=d5.exports;/** + */(function(t){function e(R,I){var U=R.length;R.push(I);e:for(;0>>1,X=R[F];if(0>>1;Fs(ke,U))ves(ie,ke)?(R[F]=ie,R[ve]=U,F=ve):(R[F]=ke,R[ae]=U,F=ae);else if(ves(ie,U))R[F]=ie,R[ve]=U,F=ve;else break e}}return I}function s(R,I){var U=R.sortIndex-I.sortIndex;return U!==0?U:R.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],u=1,f=null,d=3,h=!1,p=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(R){for(var I=r(l);I!==null;){if(I.callback===null)n(l);else if(I.startTime<=R)n(l),I.sortIndex=I.expirationTime,e(c,I);else break;I=r(l)}}function w(R){if(y=!1,b(R),!p)if(r(c)!==null)p=!0,T(A);else{var I=r(l);I!==null&&P(w,I.startTime-R)}}function A(R,I){p=!1,y&&(y=!1,m(C),C=-1),h=!0;var U=d;try{for(b(I),f=r(c);f!==null&&(!(f.expirationTime>I)||R&&!B());){var F=f.callback;if(typeof F=="function"){f.callback=null,d=f.priorityLevel;var X=F(f.expirationTime<=I);I=t.unstable_now(),typeof X=="function"?f.callback=X:f===r(c)&&n(c),b(I)}else n(c);f=r(c)}if(f!==null)var oe=!0;else{var ae=r(l);ae!==null&&P(w,ae.startTime-I),oe=!1}return oe}finally{f=null,d=U,h=!1}}var O=!1,_=null,C=-1,j=5,V=-1;function B(){return!(t.unstable_now()-VR||125F?(R.sortIndex=U,e(l,R),r(c)===null&&R===r(l)&&(y?(m(C),C=-1):y=!0,P(w,U-F))):(R.sortIndex=X,e(c,R),p||h||(p=!0,T(A))),R},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(R){var I=d;return function(){var U=d;d=I;try{return R.apply(this,arguments)}finally{d=U}}}})(h5);d5.exports=h5;var oB=d5.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var Lj=Object.defineProperty;var jj=(t,e,r)=>e in t?Lj(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var oB=v,Fn=iB;function se(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hb=Object.prototype.hasOwnProperty,aB=/^[: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]*$/,Xk={},Zk={};function cB(t){return hb.call(Zk,t)?!0:hb.call(Xk,t)?!1:aB.test(t)?Zk[t]=!0:(Xk[t]=!0,!1)}function lB(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 uB(t,e,r,n){if(e===null||typeof e>"u"||lB(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 an(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){kr[t]=new an(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 an(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){kr[t]=new an(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){kr[t]=new an(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 an(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){kr[t]=new an(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){kr[t]=new an(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){kr[t]=new an(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){kr[t]=new an(t,5,!1,t.toLowerCase(),null,!1,!1)});var nE=/[\-:]([a-z])/g;function sE(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(nE,sE);kr[e]=new an(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(nE,sE);kr[e]=new an(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(nE,sE);kr[e]=new an(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){kr[t]=new an(t,1,!1,t.toLowerCase(),null,!1,!1)});kr.xlinkHref=new an("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){kr[t]=new an(t,1,!1,t.toLowerCase(),null,!0,!0)});function iE(t,e,r,n){var s=kr.hasOwnProperty(e)?kr[e]:null;(s!==null?s.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hb=Object.prototype.hasOwnProperty,cB=/^[: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]*$/,Xk={},Zk={};function lB(t){return hb.call(Zk,t)?!0:hb.call(Xk,t)?!1:cB.test(t)?Zk[t]=!0:(Xk[t]=!0,!1)}function uB(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 fB(t,e,r,n){if(e===null||typeof e>"u"||uB(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 an(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){kr[t]=new an(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 an(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){kr[t]=new an(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){kr[t]=new an(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 an(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){kr[t]=new an(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){kr[t]=new an(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){kr[t]=new an(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){kr[t]=new an(t,5,!1,t.toLowerCase(),null,!1,!1)});var nE=/[\-:]([a-z])/g;function sE(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(nE,sE);kr[e]=new an(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(nE,sE);kr[e]=new an(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(nE,sE);kr[e]=new an(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){kr[t]=new an(t,1,!1,t.toLowerCase(),null,!1,!1)});kr.xlinkHref=new an("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){kr[t]=new an(t,1,!1,t.toLowerCase(),null,!0,!0)});function iE(t,e,r,n){var s=kr.hasOwnProperty(e)?kr[e]:null;(s!==null?s.type!==0:n||!(2a||s[o]!==i[a]){var c=` -`+s[o].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{xg=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?zd(t):""}function fB(t){switch(t.tag){case 5:return zd(t.type);case 16:return zd("Lazy");case 13:return zd("Suspense");case 19:return zd("SuspenseList");case 0:case 2:case 15:return t=bg(t.type,!1),t;case 11:return t=bg(t.type.render,!1),t;case 1:return t=bg(t.type,!0),t;default:return""}}function mb(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 Jl:return"Fragment";case Yl:return"Portal";case pb:return"Profiler";case oE:return"StrictMode";case yb:return"Suspense";case vb:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case v5:return(t.displayName||"Context")+".Consumer";case y5:return(t._context.displayName||"Context")+".Provider";case aE:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case cE:return e=t.displayName||null,e!==null?e:mb(t.type)||"Memo";case Fo:e=t._payload,t=t._init;try{return mb(t(e))}catch{}}return null}function dB(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 mb(e);case 8:return e===oE?"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 ka(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function g5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function hB(t){var e=g5(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 s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.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 jy(t){t._valueTracker||(t._valueTracker=hB(t))}function x5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=g5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function mv(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 gb(t,e){var r=e.checked;return _t({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function tT(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=ka(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 b5(t,e){e=e.checked,e!=null&&iE(t,"checked",e,!1)}function xb(t,e){b5(t,e);var r=ka(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")?bb(t,e.type,r):e.hasOwnProperty("defaultValue")&&bb(t,e.type,ka(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function rT(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 bb(t,e,r){(e!=="number"||mv(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Hd=Array.isArray;function bu(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=By.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function kh(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var oh={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},pB=["Webkit","ms","Moz","O"];Object.keys(oh).forEach(function(t){pB.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),oh[e]=oh[t]})});function C5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||oh.hasOwnProperty(t)&&oh[t]?(""+e).trim():e+"px"}function A5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=C5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var yB=_t({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Sb(t,e){if(e){if(yB[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(se(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(se(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(se(61))}if(e.style!=null&&typeof e.style!="object")throw Error(se(62))}}function Cb(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 Ab=null;function lE(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var kb=null,wu=null,Eu=null;function iT(t){if(t=Jp(t)){if(typeof kb!="function")throw Error(se(280));var e=t.stateNode;e&&(e=K0(e),kb(t.stateNode,t.type,e))}}function k5(t){wu?Eu?Eu.push(t):Eu=[t]:wu=t}function T5(){if(wu){var t=wu,e=Eu;if(Eu=wu=null,iT(t),e)for(t=0;t>>=0,t===0?32:31-(kB(t)/TB|0)|0}var Fy=64,Uy=4194304;function Gd(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 wv(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Gd(a):(i&=o,i!==0&&(n=Gd(i)))}else o=r&~s,o!==0?n=Gd(o):i!==0&&(n=Gd(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&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 Qp(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ms(e),t[e]=r}function OB(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=ch),pT=String.fromCharCode(32),yT=!1;function W5(t,e){switch(t){case"keyup":return iF.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function K5(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xl=!1;function aF(t,e){switch(t){case"compositionend":return K5(e);case"keypress":return e.which!==32?null:(yT=!0,pT);case"textInput":return t=e.data,t===pT&&yT?null:t;default:return null}}function cF(t,e){if(Xl)return t==="compositionend"||!mE&&W5(t,e)?(t=G5(),j1=pE=ca=null,Xl=!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=xT(r)}}function X5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?X5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Z5(){for(var t=window,e=mv();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=mv(t.document)}return e}function gE(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 mF(t){var e=Z5(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&X5(r.ownerDocument.documentElement,r)){if(n!==null&&gE(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 s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=bT(r,i);var o=bT(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>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,Zl=null,_b=null,uh=null,Nb=!1;function wT(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Nb||Zl==null||Zl!==mv(n)||(n=Zl,"selectionStart"in n&&gE(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}),uh&&_h(uh,n)||(uh=n,n=Cv(_b,"onSelect"),0ru||(t.current=Fb[ru],Fb[ru]=null,ru--)}function pt(t,e){ru++,Fb[ru]=t.current,t.current=e}var Ta={},Hr=ja(Ta),vn=ja(!1),sl=Ta;function If(t,e){var r=t.type.contextTypes;if(!r)return Ta;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function mn(t){return t=t.childContextTypes,t!=null}function kv(){wt(vn),wt(Hr)}function PT(t,e,r){if(Hr.current!==Ta)throw Error(se(168));pt(Hr,e),pt(vn,r)}function cI(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(se(108,dB(t)||"Unknown",s));return _t({},r,n)}function Tv(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ta,sl=Hr.current,pt(Hr,t),pt(vn,vn.current),!0}function RT(t,e,r){var n=t.stateNode;if(!n)throw Error(se(169));r?(t=cI(t,e,sl),n.__reactInternalMemoizedMergedChildContext=t,wt(vn),wt(Hr),pt(Hr,t)):wt(vn),pt(vn,r)}var Bi=null,Q0=!1,Mg=!1;function lI(t){Bi===null?Bi=[t]:Bi.push(t)}function RF(t){Q0=!0,lI(t)}function Ba(){if(!Mg&&Bi!==null){Mg=!0;var t=0,e=rt;try{var r=Bi;for(rt=1;t>=o,s-=o,to=1<<32-Ms(e)+s|r<C?(j=_,_=null):j=_.sibling;var V=d(m,_,b[C],w);if(V===null){_===null&&(_=j);break}t&&_&&V.alternate===null&&e(m,_),x=i(V,x,C),O===null?A=V:O.sibling=V,O=V,_=j}if(C===b.length)return r(m,_),St&&ec(m,C),A;if(_===null){for(;CC?(j=_,_=null):j=_.sibling;var B=d(m,_,V.value,w);if(B===null){_===null&&(_=j);break}t&&_&&B.alternate===null&&e(m,_),x=i(B,x,C),O===null?A=B:O.sibling=B,O=B,_=j}if(V.done)return r(m,_),St&&ec(m,C),A;if(_===null){for(;!V.done;C++,V=b.next())V=f(m,V.value,w),V!==null&&(x=i(V,x,C),O===null?A=V:O.sibling=V,O=V);return St&&ec(m,C),A}for(_=n(m,_);!V.done;C++,V=b.next())V=h(_,m,C,V.value,w),V!==null&&(t&&V.alternate!==null&&_.delete(V.key===null?C:V.key),x=i(V,x,C),O===null?A=V:O.sibling=V,O=V);return t&&_.forEach(function(z){return e(m,z)}),St&&ec(m,C),A}function g(m,x,b,w){if(typeof b=="object"&&b!==null&&b.type===Jl&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Ly:e:{for(var A=b.key,O=x;O!==null;){if(O.key===A){if(A=b.type,A===Jl){if(O.tag===7){r(m,O.sibling),x=s(O,b.props.children),x.return=m,m=x;break e}}else if(O.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Fo&&_T(A)===O.type){r(m,O.sibling),x=s(O,b.props),x.ref=Pd(m,O,b),x.return=m,m=x;break e}r(m,O);break}else e(m,O);O=O.sibling}b.type===Jl?(x=Jc(b.props.children,m.mode,w,b.key),x.return=m,m=x):(w=G1(b.type,b.key,b.props,null,m.mode,w),w.ref=Pd(m,x,b),w.return=m,m=w)}return o(m);case Yl:e:{for(O=b.key;x!==null;){if(x.key===O)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){r(m,x.sibling),x=s(x,b.children||[]),x.return=m,m=x;break e}else{r(m,x);break}else e(m,x);x=x.sibling}x=$g(b,m.mode,w),x.return=m,m=x}return o(m);case Fo:return O=b._init,g(m,x,O(b._payload),w)}if(Hd(b))return p(m,x,b,w);if(Sd(b))return y(m,x,b,w);Wy(m,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(r(m,x.sibling),x=s(x,b),x.return=m,m=x):(r(m,x),x=Vg(b,m.mode,w),x.return=m,m=x),o(m)):r(m,x)}return g}var _f=hI(!0),pI=hI(!1),Iv=ja(null),Ov=null,iu=null,EE=null;function SE(){EE=iu=Ov=null}function CE(t){var e=Iv.current;wt(Iv),t._currentValue=e}function $b(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 Cu(t,e){Ov=t,EE=iu=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(yn=!0),t.firstContext=null)}function ds(t){var e=t._currentValue;if(EE!==t)if(t={context:t,memoizedValue:e,next:null},iu===null){if(Ov===null)throw Error(se(308));iu=t,Ov.dependencies={lanes:0,firstContext:t}}else iu=iu.next=t;return e}var vc=null;function AE(t){vc===null?vc=[t]:vc.push(t)}function yI(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,AE(e)):(r.next=s.next,s.next=r),e.interleaved=r,ho(t,n)}function ho(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 Uo=!1;function kE(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vI(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 io(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function va(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,Qe&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,ho(t,r)}return s=n.interleaved,s===null?(e.next=e,AE(n)):(e.next=s.next,s.next=e),n.interleaved=e,ho(t,r)}function F1(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,fE(t,r)}}function NT(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=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};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,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 _v(t,e,r,n){var s=t.updateQueue;Uo=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,l=c.next;c.next=null,o===null?i=l:o.next=l,o=c;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(i!==null){var f=s.baseState;o=0,u=l=c=null,a=i;do{var d=a.lane,h=a.eventTime;if((n&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=t,y=a;switch(d=e,h=r,y.tag){case 1:if(p=y.payload,typeof p=="function"){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=y.payload,d=typeof p=="function"?p.call(h,f,d):p,d==null)break e;f=_t({},f,d);break e;case 2:Uo=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(l=u=h,c=f):u=u.next=h,o|=d;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;d=a,a=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(1);if(u===null&&(c=f),s.baseState=c,s.firstBaseUpdate=l,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);al|=o,t.lanes=o,t.memoizedState=f}}function MT(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=Lg.transition;Lg.transition={};try{t(!1),e()}finally{rt=r,Lg.transition=n}}function NI(){return hs().memoizedState}function NF(t,e,r){var n=ga(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},MI(t))DI(e,r);else if(r=yI(t,e,r,n),r!==null){var s=sn();Ds(r,t,n,s),LI(r,e,n)}}function MF(t,e,r){var n=ga(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(MI(t))DI(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Bs(a,o)){var c=e.interleaved;c===null?(s.next=s,AE(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}r=yI(t,e,s,n),r!==null&&(s=sn(),Ds(r,t,n,s),LI(r,e,n))}}function MI(t){var e=t.alternate;return t===Ot||e!==null&&e===Ot}function DI(t,e){fh=Mv=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function LI(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,fE(t,r)}}var Dv={readContext:ds,useCallback:Nr,useContext:Nr,useEffect:Nr,useImperativeHandle:Nr,useInsertionEffect:Nr,useLayoutEffect:Nr,useMemo:Nr,useReducer:Nr,useRef:Nr,useState:Nr,useDebugValue:Nr,useDeferredValue:Nr,useTransition:Nr,useMutableSource:Nr,useSyncExternalStore:Nr,useId:Nr,unstable_isNewReconciler:!1},DF={readContext:ds,useCallback:function(t,e){return Qs().memoizedState=[t,e===void 0?null:e],t},useContext:ds,useEffect:LT,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,V1(4194308,4,PI.bind(null,e,t),r)},useLayoutEffect:function(t,e){return V1(4194308,4,t,e)},useInsertionEffect:function(t,e){return V1(4,2,t,e)},useMemo:function(t,e){var r=Qs();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Qs();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=NF.bind(null,Ot,t),[n.memoizedState,t]},useRef:function(t){var e=Qs();return t={current:t},e.memoizedState=t},useState:DT,useDebugValue:ME,useDeferredValue:function(t){return Qs().memoizedState=t},useTransition:function(){var t=DT(!1),e=t[0];return t=_F.bind(null,t[1]),Qs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ot,s=Qs();if(St){if(r===void 0)throw Error(se(407));r=r()}else{if(r=e(),dr===null)throw Error(se(349));ol&30||bI(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,LT(EI.bind(null,n,i,t),[t]),n.flags|=2048,Uh(9,wI.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=Qs(),e=dr.identifierPrefix;if(St){var r=ro,n=to;r=(n&~(1<<32-Ms(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Bh++,0")&&(c=c.replace("",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{xg=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?zd(t):""}function dB(t){switch(t.tag){case 5:return zd(t.type);case 16:return zd("Lazy");case 13:return zd("Suspense");case 19:return zd("SuspenseList");case 0:case 2:case 15:return t=bg(t.type,!1),t;case 11:return t=bg(t.type.render,!1),t;case 1:return t=bg(t.type,!0),t;default:return""}}function mb(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 Jl:return"Fragment";case Yl:return"Portal";case pb:return"Profiler";case oE:return"StrictMode";case yb:return"Suspense";case vb:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case v5:return(t.displayName||"Context")+".Consumer";case y5:return(t._context.displayName||"Context")+".Provider";case aE:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case cE:return e=t.displayName||null,e!==null?e:mb(t.type)||"Memo";case Fo:e=t._payload,t=t._init;try{return mb(t(e))}catch{}}return null}function hB(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 mb(e);case 8:return e===oE?"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 ka(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function g5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function pB(t){var e=g5(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 s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.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 jy(t){t._valueTracker||(t._valueTracker=pB(t))}function x5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=g5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function mv(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 gb(t,e){var r=e.checked;return _t({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function tT(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=ka(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 b5(t,e){e=e.checked,e!=null&&iE(t,"checked",e,!1)}function xb(t,e){b5(t,e);var r=ka(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")?bb(t,e.type,r):e.hasOwnProperty("defaultValue")&&bb(t,e.type,ka(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function rT(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 bb(t,e,r){(e!=="number"||mv(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Hd=Array.isArray;function bu(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=By.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function kh(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var oh={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},yB=["Webkit","ms","Moz","O"];Object.keys(oh).forEach(function(t){yB.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),oh[e]=oh[t]})});function C5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||oh.hasOwnProperty(t)&&oh[t]?(""+e).trim():e+"px"}function A5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=C5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var vB=_t({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Sb(t,e){if(e){if(vB[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(se(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(se(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(se(61))}if(e.style!=null&&typeof e.style!="object")throw Error(se(62))}}function Cb(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 Ab=null;function lE(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var kb=null,wu=null,Eu=null;function iT(t){if(t=Jp(t)){if(typeof kb!="function")throw Error(se(280));var e=t.stateNode;e&&(e=K0(e),kb(t.stateNode,t.type,e))}}function k5(t){wu?Eu?Eu.push(t):Eu=[t]:wu=t}function T5(){if(wu){var t=wu,e=Eu;if(Eu=wu=null,iT(t),e)for(t=0;t>>=0,t===0?32:31-(TB(t)/PB|0)|0}var Fy=64,Uy=4194304;function Gd(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 wv(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Gd(a):(i&=o,i!==0&&(n=Gd(i)))}else o=r&~s,o!==0?n=Gd(o):i!==0&&(n=Gd(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&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 Qp(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ms(e),t[e]=r}function _B(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=ch),pT=String.fromCharCode(32),yT=!1;function W5(t,e){switch(t){case"keyup":return oF.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function K5(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xl=!1;function cF(t,e){switch(t){case"compositionend":return K5(e);case"keypress":return e.which!==32?null:(yT=!0,pT);case"textInput":return t=e.data,t===pT&&yT?null:t;default:return null}}function lF(t,e){if(Xl)return t==="compositionend"||!mE&&W5(t,e)?(t=G5(),j1=pE=ca=null,Xl=!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=xT(r)}}function X5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?X5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Z5(){for(var t=window,e=mv();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=mv(t.document)}return e}function gE(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 gF(t){var e=Z5(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&X5(r.ownerDocument.documentElement,r)){if(n!==null&&gE(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 s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=bT(r,i);var o=bT(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>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,Zl=null,_b=null,uh=null,Nb=!1;function wT(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Nb||Zl==null||Zl!==mv(n)||(n=Zl,"selectionStart"in n&&gE(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}),uh&&_h(uh,n)||(uh=n,n=Cv(_b,"onSelect"),0ru||(t.current=Fb[ru],Fb[ru]=null,ru--)}function pt(t,e){ru++,Fb[ru]=t.current,t.current=e}var Ta={},Hr=ja(Ta),vn=ja(!1),sl=Ta;function If(t,e){var r=t.type.contextTypes;if(!r)return Ta;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function mn(t){return t=t.childContextTypes,t!=null}function kv(){wt(vn),wt(Hr)}function PT(t,e,r){if(Hr.current!==Ta)throw Error(se(168));pt(Hr,e),pt(vn,r)}function cI(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(se(108,hB(t)||"Unknown",s));return _t({},r,n)}function Tv(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ta,sl=Hr.current,pt(Hr,t),pt(vn,vn.current),!0}function RT(t,e,r){var n=t.stateNode;if(!n)throw Error(se(169));r?(t=cI(t,e,sl),n.__reactInternalMemoizedMergedChildContext=t,wt(vn),wt(Hr),pt(Hr,t)):wt(vn),pt(vn,r)}var Bi=null,Q0=!1,Mg=!1;function lI(t){Bi===null?Bi=[t]:Bi.push(t)}function IF(t){Q0=!0,lI(t)}function Ba(){if(!Mg&&Bi!==null){Mg=!0;var t=0,e=rt;try{var r=Bi;for(rt=1;t>=o,s-=o,to=1<<32-Ms(e)+s|r<C?(j=_,_=null):j=_.sibling;var V=d(m,_,b[C],w);if(V===null){_===null&&(_=j);break}t&&_&&V.alternate===null&&e(m,_),x=i(V,x,C),O===null?A=V:O.sibling=V,O=V,_=j}if(C===b.length)return r(m,_),St&&ec(m,C),A;if(_===null){for(;CC?(j=_,_=null):j=_.sibling;var B=d(m,_,V.value,w);if(B===null){_===null&&(_=j);break}t&&_&&B.alternate===null&&e(m,_),x=i(B,x,C),O===null?A=B:O.sibling=B,O=B,_=j}if(V.done)return r(m,_),St&&ec(m,C),A;if(_===null){for(;!V.done;C++,V=b.next())V=f(m,V.value,w),V!==null&&(x=i(V,x,C),O===null?A=V:O.sibling=V,O=V);return St&&ec(m,C),A}for(_=n(m,_);!V.done;C++,V=b.next())V=h(_,m,C,V.value,w),V!==null&&(t&&V.alternate!==null&&_.delete(V.key===null?C:V.key),x=i(V,x,C),O===null?A=V:O.sibling=V,O=V);return t&&_.forEach(function($){return e(m,$)}),St&&ec(m,C),A}function g(m,x,b,w){if(typeof b=="object"&&b!==null&&b.type===Jl&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Ly:e:{for(var A=b.key,O=x;O!==null;){if(O.key===A){if(A=b.type,A===Jl){if(O.tag===7){r(m,O.sibling),x=s(O,b.props.children),x.return=m,m=x;break e}}else if(O.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Fo&&_T(A)===O.type){r(m,O.sibling),x=s(O,b.props),x.ref=Pd(m,O,b),x.return=m,m=x;break e}r(m,O);break}else e(m,O);O=O.sibling}b.type===Jl?(x=Jc(b.props.children,m.mode,w,b.key),x.return=m,m=x):(w=G1(b.type,b.key,b.props,null,m.mode,w),w.ref=Pd(m,x,b),w.return=m,m=w)}return o(m);case Yl:e:{for(O=b.key;x!==null;){if(x.key===O)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){r(m,x.sibling),x=s(x,b.children||[]),x.return=m,m=x;break e}else{r(m,x);break}else e(m,x);x=x.sibling}x=$g(b,m.mode,w),x.return=m,m=x}return o(m);case Fo:return O=b._init,g(m,x,O(b._payload),w)}if(Hd(b))return p(m,x,b,w);if(Sd(b))return y(m,x,b,w);Wy(m,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(r(m,x.sibling),x=s(x,b),x.return=m,m=x):(r(m,x),x=Vg(b,m.mode,w),x.return=m,m=x),o(m)):r(m,x)}return g}var _f=hI(!0),pI=hI(!1),Iv=ja(null),Ov=null,iu=null,EE=null;function SE(){EE=iu=Ov=null}function CE(t){var e=Iv.current;wt(Iv),t._currentValue=e}function $b(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 Cu(t,e){Ov=t,EE=iu=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(yn=!0),t.firstContext=null)}function ds(t){var e=t._currentValue;if(EE!==t)if(t={context:t,memoizedValue:e,next:null},iu===null){if(Ov===null)throw Error(se(308));iu=t,Ov.dependencies={lanes:0,firstContext:t}}else iu=iu.next=t;return e}var vc=null;function AE(t){vc===null?vc=[t]:vc.push(t)}function yI(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,AE(e)):(r.next=s.next,s.next=r),e.interleaved=r,ho(t,n)}function ho(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 Uo=!1;function kE(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vI(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 io(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function va(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,Qe&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,ho(t,r)}return s=n.interleaved,s===null?(e.next=e,AE(n)):(e.next=s.next,s.next=e),n.interleaved=e,ho(t,r)}function F1(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,fE(t,r)}}function NT(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=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};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,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 _v(t,e,r,n){var s=t.updateQueue;Uo=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,l=c.next;c.next=null,o===null?i=l:o.next=l,o=c;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(i!==null){var f=s.baseState;o=0,u=l=c=null,a=i;do{var d=a.lane,h=a.eventTime;if((n&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=t,y=a;switch(d=e,h=r,y.tag){case 1:if(p=y.payload,typeof p=="function"){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=y.payload,d=typeof p=="function"?p.call(h,f,d):p,d==null)break e;f=_t({},f,d);break e;case 2:Uo=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(l=u=h,c=f):u=u.next=h,o|=d;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;d=a,a=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(1);if(u===null&&(c=f),s.baseState=c,s.firstBaseUpdate=l,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);al|=o,t.lanes=o,t.memoizedState=f}}function MT(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=Lg.transition;Lg.transition={};try{t(!1),e()}finally{rt=r,Lg.transition=n}}function NI(){return hs().memoizedState}function MF(t,e,r){var n=ga(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},MI(t))DI(e,r);else if(r=yI(t,e,r,n),r!==null){var s=sn();Ds(r,t,n,s),LI(r,e,n)}}function DF(t,e,r){var n=ga(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(MI(t))DI(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Bs(a,o)){var c=e.interleaved;c===null?(s.next=s,AE(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}r=yI(t,e,s,n),r!==null&&(s=sn(),Ds(r,t,n,s),LI(r,e,n))}}function MI(t){var e=t.alternate;return t===Ot||e!==null&&e===Ot}function DI(t,e){fh=Mv=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function LI(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,fE(t,r)}}var Dv={readContext:ds,useCallback:Nr,useContext:Nr,useEffect:Nr,useImperativeHandle:Nr,useInsertionEffect:Nr,useLayoutEffect:Nr,useMemo:Nr,useReducer:Nr,useRef:Nr,useState:Nr,useDebugValue:Nr,useDeferredValue:Nr,useTransition:Nr,useMutableSource:Nr,useSyncExternalStore:Nr,useId:Nr,unstable_isNewReconciler:!1},LF={readContext:ds,useCallback:function(t,e){return Qs().memoizedState=[t,e===void 0?null:e],t},useContext:ds,useEffect:LT,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,V1(4194308,4,PI.bind(null,e,t),r)},useLayoutEffect:function(t,e){return V1(4194308,4,t,e)},useInsertionEffect:function(t,e){return V1(4,2,t,e)},useMemo:function(t,e){var r=Qs();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Qs();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=MF.bind(null,Ot,t),[n.memoizedState,t]},useRef:function(t){var e=Qs();return t={current:t},e.memoizedState=t},useState:DT,useDebugValue:ME,useDeferredValue:function(t){return Qs().memoizedState=t},useTransition:function(){var t=DT(!1),e=t[0];return t=NF.bind(null,t[1]),Qs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ot,s=Qs();if(St){if(r===void 0)throw Error(se(407));r=r()}else{if(r=e(),dr===null)throw Error(se(349));ol&30||bI(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,LT(EI.bind(null,n,i,t),[t]),n.flags|=2048,Uh(9,wI.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=Qs(),e=dr.identifierPrefix;if(St){var r=ro,n=to;r=(n&~(1<<32-Ms(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Bh++,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[ai]=e,t[Dh]=n,qI(t,e,!1,!1),e.stateNode=t;e:{switch(o=Cb(r,n),r){case"dialog":gt("cancel",t),gt("close",t),s=n;break;case"iframe":case"object":case"embed":gt("load",t),s=n;break;case"video":case"audio":for(s=0;sDf&&(e.flags|=128,n=!0,Rd(i,!1),e.lanes=4194304)}else{if(!n)if(t=Nv(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Rd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!St)return Mr(e),null}else 2*Wt()-i.renderingStartTime>Df&&r!==1073741824&&(e.flags|=128,n=!0,Rd(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Wt(),e.sibling=null,r=kt.current,pt(kt,n?r&1|2:r&1),e):(Mr(e),null);case 22:case 23:return UE(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?In&1073741824&&(Mr(e),e.subtreeFlags&6&&(e.flags|=8192)):Mr(e),null;case 24:return null;case 25:return null}throw Error(se(156,e.tag))}function zF(t,e){switch(bE(e),e.tag){case 1:return mn(e.type)&&kv(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Nf(),wt(vn),wt(Hr),RE(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return PE(e),null;case 13:if(wt(kt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(se(340));Of()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return wt(kt),null;case 4:return Nf(),null;case 10:return CE(e.type._context),null;case 22:case 23:return UE(),null;case 24:return null;default:return null}}var Qy=!1,Ur=!1,HF=typeof WeakSet=="function"?WeakSet:Set,pe=null;function ou(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){jt(t,e,n)}else r.current=null}function Jb(t,e,r){try{r()}catch(n){jt(t,e,n)}}var WT=!1;function GF(t,e){if(Mb=Ev,t=Z5(),gE(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 s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,c=-1,l=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==r||s!==0&&f.nodeType!==3||(a=o+s),f!==i||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===r&&++l===s&&(a=o),d===i&&++u===n&&(c=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Db={focusedElem:t,selectionRange:r},Ev=!1,pe=e;pe!==null;)if(e=pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,pe=t;else for(;pe!==null;){e=pe;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 y=p.memoizedProps,g=p.memoizedState,m=e.stateNode,x=m.getSnapshotBeforeUpdate(e.elementType===e.type?y:Es(e.type,y),g);m.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(w){jt(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,pe=t;break}pe=e.return}return p=WT,WT=!1,p}function dh(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Jb(e,r,i)}s=s.next}while(s!==n)}}function X0(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 Xb(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 QI(t){var e=t.alternate;e!==null&&(t.alternate=null,QI(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ai],delete e[Dh],delete e[Bb],delete e[TF],delete e[PF])),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 YI(t){return t.tag===5||t.tag===3||t.tag===4}function KT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||YI(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 Zb(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=Av));else if(n!==4&&(t=t.child,t!==null))for(Zb(t,e,r),t=t.sibling;t!==null;)Zb(t,e,r),t=t.sibling}function ew(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(ew(t,e,r),t=t.sibling;t!==null;)ew(t,e,r),t=t.sibling}var mr=null,Is=!1;function Po(t,e,r){for(r=r.child;r!==null;)JI(t,e,r),r=r.sibling}function JI(t,e,r){if(yi&&typeof yi.onCommitFiberUnmount=="function")try{yi.onCommitFiberUnmount(H0,r)}catch{}switch(r.tag){case 5:Ur||ou(r,e);case 6:var n=mr,s=Is;mr=null,Po(t,e,r),mr=n,Is=s,mr!==null&&(Is?(t=mr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):mr.removeChild(r.stateNode));break;case 18:mr!==null&&(Is?(t=mr,r=r.stateNode,t.nodeType===8?Ng(t.parentNode,r):t.nodeType===1&&Ng(t,r),Ih(t)):Ng(mr,r.stateNode));break;case 4:n=mr,s=Is,mr=r.stateNode.containerInfo,Is=!0,Po(t,e,r),mr=n,Is=s;break;case 0:case 11:case 14:case 15:if(!Ur&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Jb(r,e,o),s=s.next}while(s!==n)}Po(t,e,r);break;case 1:if(!Ur&&(ou(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){jt(r,e,a)}Po(t,e,r);break;case 21:Po(t,e,r);break;case 22:r.mode&1?(Ur=(n=Ur)||r.memoizedState!==null,Po(t,e,r),Ur=n):Po(t,e,r);break;default:Po(t,e,r)}}function QT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new HF),e.forEach(function(n){var s=eU.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ms(t,e){var r=e.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=Wt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*WF(n/1960))-n,10t?16:t,la===null)var n=!1;else{if(t=la,la=null,Bv=0,Qe&6)throw Error(se(331));var s=Qe;for(Qe|=4,pe=t.current;pe!==null;){var i=pe,o=i.child;if(pe.flags&16){var a=i.deletions;if(a!==null){for(var c=0;cWt()-BE?Yc(t,0):jE|=r),gn(t,e)}function iO(t,e){e===0&&(t.mode&1?(e=Uy,Uy<<=1,!(Uy&130023424)&&(Uy=4194304)):e=1);var r=sn();t=ho(t,e),t!==null&&(Qp(t,e,r),gn(t,r))}function ZF(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),iO(t,r)}function eU(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(se(314))}n!==null&&n.delete(e),iO(t,r)}var oO;oO=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||vn.current)yn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return yn=!1,VF(t,e,r);yn=!!(t.flags&131072)}else yn=!1,St&&e.flags&1048576&&uI(e,Rv,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;$1(t,e),t=e.pendingProps;var s=If(e,Hr.current);Cu(e,r),s=OE(null,e,n,t,s,r);var i=_E();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,mn(n)?(i=!0,Tv(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,kE(e),s.updater=J0,e.stateNode=s,s._reactInternals=e,Hb(e,n,t,r),e=Wb(null,e,n,!0,i,r)):(e.tag=0,St&&i&&xE(e),tn(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch($1(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=rU(n),t=Es(n,t),s){case 0:e=qb(null,e,n,t,r);break e;case 1:e=HT(null,e,n,t,r);break e;case 11:e=$T(null,e,n,t,r);break e;case 14:e=zT(null,e,n,Es(n.type,t),r);break e}throw Error(se(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),qb(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),HT(t,e,n,s,r);case 3:e:{if(zI(e),t===null)throw Error(se(387));n=e.pendingProps,i=e.memoizedState,s=i.element,vI(t,e),_v(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Mf(Error(se(423)),e),e=GT(t,e,n,r,s);break e}else if(n!==s){s=Mf(Error(se(424)),e),e=GT(t,e,n,r,s);break e}else for(Dn=ya(e.stateNode.containerInfo.firstChild),Ln=e,St=!0,_s=null,r=pI(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Of(),n===s){e=po(t,e,r);break e}tn(t,e,n,r)}e=e.child}return e;case 5:return mI(e),t===null&&Vb(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Lb(n,s)?o=null:i!==null&&Lb(n,i)&&(e.flags|=32),$I(t,e),tn(t,e,o,r),e.child;case 6:return t===null&&Vb(e),null;case 13:return HI(t,e,r);case 4:return TE(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=_f(e,null,n,r):tn(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),$T(t,e,n,s,r);case 7:return tn(t,e,e.pendingProps,r),e.child;case 8:return tn(t,e,e.pendingProps.children,r),e.child;case 12:return tn(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,pt(Iv,n._currentValue),n._currentValue=o,i!==null)if(Bs(i.value,o)){if(i.children===s.children&&!vn.current){e=po(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var c=a.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=io(-1,r&-r),c.tag=2;var l=i.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),$b(i.return,r,e),a.lanes|=r;break}c=c.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(se(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),$b(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}tn(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,Cu(e,r),s=ds(s),n=n(s),e.flags|=1,tn(t,e,n,r),e.child;case 14:return n=e.type,s=Es(n,e.pendingProps),s=Es(n.type,s),zT(t,e,n,s,r);case 15:return UI(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),$1(t,e),e.tag=1,mn(n)?(t=!0,Tv(e)):t=!1,Cu(e,r),jI(e,n,s),Hb(e,n,s,r),Wb(null,e,n,!0,t,r);case 19:return GI(t,e,r);case 22:return VI(t,e,r)}throw Error(se(156,e.tag))};function aO(t,e){return M5(t,e)}function tU(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 cs(t,e,r,n){return new tU(t,e,r,n)}function $E(t){return t=t.prototype,!(!t||!t.isReactComponent)}function rU(t){if(typeof t=="function")return $E(t)?1:0;if(t!=null){if(t=t.$$typeof,t===aE)return 11;if(t===cE)return 14}return 2}function xa(t,e){var r=t.alternate;return r===null?(r=cs(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 G1(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")$E(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Jl:return Jc(r.children,s,i,e);case oE:o=8,s|=8;break;case pb:return t=cs(12,r,e,s|2),t.elementType=pb,t.lanes=i,t;case yb:return t=cs(13,r,e,s),t.elementType=yb,t.lanes=i,t;case vb:return t=cs(19,r,e,s),t.elementType=vb,t.lanes=i,t;case m5:return em(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case y5:o=10;break e;case v5:o=9;break e;case aE:o=11;break e;case cE:o=14;break e;case Fo:o=16,n=null;break e}throw Error(se(130,t==null?t:typeof t,""))}return e=cs(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function Jc(t,e,r,n){return t=cs(7,t,n,e),t.lanes=r,t}function em(t,e,r,n){return t=cs(22,t,n,e),t.elementType=m5,t.lanes=r,t.stateNode={isHidden:!1},t}function Vg(t,e,r){return t=cs(6,t,null,e),t.lanes=r,t}function $g(t,e,r){return e=cs(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function nU(t,e,r,n,s){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=Eg(0),this.expirationTimes=Eg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Eg(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function zE(t,e,r,n,s,i,o,a,c){return t=new nU(t,e,r,a,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=cs(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},kE(i),t}function sU(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fO)}catch(t){console.error(t)}}fO(),f5.exports=zn;var Eo=f5.exports;const dO=X2(Eo),lU=X8({__proto__:null,default:dO},[Eo]);var nP=Eo;db.createRoot=nP.createRoot,db.hydrateRoot=nP.hydrateRoot;const hO=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),im=v.createContext({}),om=v.createContext(null),am=typeof document<"u",WE=am?v.useLayoutEffect:v.useEffect,pO=v.createContext({strict:!1}),KE=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),uU="framerAppearId",yO="data-"+KE(uU);function fU(t,e,r,n){const{visualElement:s}=v.useContext(im),i=v.useContext(pO),o=v.useContext(om),a=v.useContext(hO).reducedMotion,c=v.useRef();n=n||i.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:s,props:r,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;v.useInsertionEffect(()=>{l&&l.update(r,o)});const u=v.useRef(!!(r[yO]&&!window.HandoffComplete));return WE(()=>{l&&(l.render(),u.current&&l.animationState&&l.animationState.animateChanges())}),v.useEffect(()=>{l&&(l.updateFeatures(),!u.current&&l.animationState&&l.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),l}function cu(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function dU(t,e,r){return v.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):cu(r)&&(r.current=n))},[e])}function $h(t){return typeof t=="string"||Array.isArray(t)}function cm(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const QE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],YE=["initial",...QE];function lm(t){return cm(t.animate)||YE.some(e=>$h(t[e]))}function vO(t){return!!(lm(t)||t.variants)}function hU(t,e){if(lm(t)){const{initial:r,animate:n}=t;return{initial:r===!1||$h(r)?r:void 0,animate:$h(n)?n:void 0}}return t.inherit!==!1?e:{}}function pU(t){const{initial:e,animate:r}=hU(t,v.useContext(im));return v.useMemo(()=>({initial:e,animate:r}),[sP(e),sP(r)])}function sP(t){return Array.isArray(t)?t.join(" "):t}const iP={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"]},zh={};for(const t in iP)zh[t]={isEnabled:e=>iP[t].some(r=>!!e[r])};function yU(t){for(const e in t)zh[e]={...zh[e],...t[e]}}const JE=v.createContext({}),mO=v.createContext({}),vU=Symbol.for("motionComponentSymbol");function mU({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:n,Component:s}){t&&yU(t);function i(a,c){let l;const u={...v.useContext(hO),...a,layoutId:gU(a)},{isStatic:f}=u,d=pU(a),h=n(a,f);if(!f&&am){d.visualElement=fU(s,h,u,e);const p=v.useContext(mO),y=v.useContext(pO).strict;d.visualElement&&(l=d.visualElement.loadFeatures(u,y,t,p))}return v.createElement(im.Provider,{value:d},l&&d.visualElement?v.createElement(l,{visualElement:d.visualElement,...u}):null,r(s,a,dU(h,d.visualElement,c),h,f,d.visualElement))}const o=v.forwardRef(i);return o[vU]=s,o}function gU({layoutId:t}){const e=v.useContext(JE).id;return e&&t!==void 0?e+"-"+t:t}function xU(t){function e(n,s={}){return mU(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const bU=["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 XE(t){return typeof t!="string"||t.includes("-")?!1:!!(bU.indexOf(t)>-1||/[A-Z]/.test(t))}const Vv={};function wU(t){Object.assign(Vv,t)}const Zp=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Sl=new Set(Zp);function gO(t,{layout:e,layoutId:r}){return Sl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Vv[t]||t==="opacity")}const xn=t=>!!(t&&t.getVelocity),EU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},SU=Zp.length;function CU(t,{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},n,s){let i="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(t),bO=xO("--"),iw=xO("var(--"),AU=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,kU=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Pa=(t,e,r)=>Math.min(Math.max(r,t),e),Cl={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},yh={...Cl,transform:t=>Pa(0,1,t)},Xy={...Cl,default:1},vh=t=>Math.round(t*1e5)/1e5,um=/(-)?([\d]*\.?[\d])+/g,wO=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,TU=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ey(t){return typeof t=="string"}const ty=t=>({test:e=>ey(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mo=ty("deg"),mi=ty("%"),Ae=ty("px"),PU=ty("vh"),RU=ty("vw"),oP={...mi,parse:t=>mi.parse(t)/100,transform:t=>mi.transform(t*100)},aP={...Cl,transform:Math.round},EO={borderWidth:Ae,borderTopWidth:Ae,borderRightWidth:Ae,borderBottomWidth:Ae,borderLeftWidth:Ae,borderRadius:Ae,radius:Ae,borderTopLeftRadius:Ae,borderTopRightRadius:Ae,borderBottomRightRadius:Ae,borderBottomLeftRadius:Ae,width:Ae,maxWidth:Ae,height:Ae,maxHeight:Ae,size:Ae,top:Ae,right:Ae,bottom:Ae,left:Ae,padding:Ae,paddingTop:Ae,paddingRight:Ae,paddingBottom:Ae,paddingLeft:Ae,margin:Ae,marginTop:Ae,marginRight:Ae,marginBottom:Ae,marginLeft:Ae,rotate:Mo,rotateX:Mo,rotateY:Mo,rotateZ:Mo,scale:Xy,scaleX:Xy,scaleY:Xy,scaleZ:Xy,skew:Mo,skewX:Mo,skewY:Mo,distance:Ae,translateX:Ae,translateY:Ae,translateZ:Ae,x:Ae,y:Ae,z:Ae,perspective:Ae,transformPerspective:Ae,opacity:yh,originX:oP,originY:oP,originZ:Ae,zIndex:aP,fillOpacity:yh,strokeOpacity:yh,numOctaves:aP};function ZE(t,e,r,n){const{style:s,vars:i,transform:o,transformOrigin:a}=t;let c=!1,l=!1,u=!0;for(const f in e){const d=e[f];if(bO(f)){i[f]=d;continue}const h=EO[f],p=kU(d,h);if(Sl.has(f)){if(c=!0,o[f]=p,!u)continue;d!==(h.default||0)&&(u=!1)}else f.startsWith("origin")?(l=!0,a[f]=p):s[f]=p}if(e.transform||(c||n?s.transform=CU(t.transform,r,u,n):s.transform&&(s.transform="none")),l){const{originX:f="50%",originY:d="50%",originZ:h=0}=a;s.transformOrigin=`${f} ${d} ${h}`}}const eS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function SO(t,e,r){for(const n in e)!xn(e[n])&&!gO(n,r)&&(t[n]=e[n])}function IU({transformTemplate:t},e,r){return v.useMemo(()=>{const n=eS();return ZE(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function OU(t,e,r){const n=t.style||{},s={};return SO(s,n,t),Object.assign(s,IU(t,e,r)),t.transformValues?t.transformValues(s):s}function _U(t,e,r){const n={},s=OU(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const NU=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 $v(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||NU.has(t)}let CO=t=>!$v(t);function MU(t){t&&(CO=e=>e.startsWith("on")?!$v(e):t(e))}try{MU(require("@emotion/is-prop-valid").default)}catch{}function DU(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(CO(s)||r===!0&&$v(s)||!e&&!$v(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function cP(t,e,r){return typeof t=="string"?t:Ae.transform(e+r*t)}function LU(t,e,r){const n=cP(e,t.x,t.width),s=cP(r,t.y,t.height);return`${n} ${s}`}const jU={offset:"stroke-dashoffset",array:"stroke-dasharray"},BU={offset:"strokeDashoffset",array:"strokeDasharray"};function FU(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?jU:BU;t[i.offset]=Ae.transform(-n);const o=Ae.transform(e),a=Ae.transform(r);t[i.array]=`${o} ${a}`}function tS(t,{attrX:e,attrY:r,attrScale:n,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:c=0,...l},u,f,d){if(ZE(t,l,u,d),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:y}=t;h.transform&&(y&&(p.transform=h.transform),delete h.transform),y&&(s!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=LU(y,s!==void 0?s:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),r!==void 0&&(h.y=r),n!==void 0&&(h.scale=n),o!==void 0&&FU(h,o,a,c,!1)}const AO=()=>({...eS(),attrs:{}}),rS=t=>typeof t=="string"&&t.toLowerCase()==="svg";function UU(t,e,r,n){const s=v.useMemo(()=>{const i=AO();return tS(i,e,{enableHardwareAcceleration:!1},rS(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};SO(i,t.style,t),s.style={...i,...s.style}}return s}function VU(t=!1){return(r,n,s,{latestValues:i},o)=>{const c=(XE(r)?UU:_U)(n,i,o,r),u={...DU(n,typeof r=="string",t),...c,ref:s},{children:f}=n,d=v.useMemo(()=>xn(f)?f.get():f,[f]);return v.createElement(r,{...u,children:d})}}function kO(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const TO=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 PO(t,e,r,n){kO(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(TO.has(s)?s:KE(s),e.attrs[s])}function nS(t,e){const{style:r}=t,n={};for(const s in r)(xn(r[s])||e.style&&xn(e.style[s])||gO(s,t))&&(n[s]=r[s]);return n}function RO(t,e){const r=nS(t,e);for(const n in t)if(xn(t[n])||xn(e[n])){const s=Zp.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[s]=t[n]}return r}function sS(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}function IO(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const zv=t=>Array.isArray(t),$U=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),zU=t=>zv(t)?t[t.length-1]||0:t;function q1(t){const e=xn(t)?t.get():t;return $U(e)?e.toValue():e}function HU({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:GU(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const OO=t=>(e,r)=>{const n=v.useContext(im),s=v.useContext(om),i=()=>HU(t,e,n,s);return r?i():IO(i)};function GU(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=q1(i[d]);let{initial:o,animate:a}=t;const c=lm(t),l=vO(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!cm(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=sS(t,h);if(!p)return;const{transitionEnd:y,transition:g,...m}=p;for(const x in m){let b=m[x];if(Array.isArray(b)){const w=u?b.length-1:0;b=b[w]}b!==null&&(s[x]=b)}for(const x in y)s[x]=y[x]}),s}const Ut=t=>t;class lP{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 qU(t){let e=new lP,r=new lP,n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&s,d=f?e:r;return l&&o.add(c),d.add(c)&&f&&s&&(n=e.order.length),c},cancel:c=>{r.remove(c),o.delete(c)},process:c=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.clear(),n=e.order.length,n)for(let l=0;l(f[d]=qU(()=>r=!0),f),{}),o=f=>i[f].process(s),a=()=>{const f=performance.now();r=!1,s.delta=n?1e3/60:Math.max(Math.min(f-s.timestamp,WU),1),s.timestamp=f,s.isProcessing=!0,Zy.forEach(o),s.isProcessing=!1,r&&e&&(n=!1,t(a))},c=()=>{r=!0,n=!0,s.isProcessing||t(a)};return{schedule:Zy.reduce((f,d)=>{const h=i[d];return f[d]=(p,y=!1,g=!1)=>(r||c(),h.schedule(p,y,g)),f},{}),cancel:f=>Zy.forEach(d=>i[d].cancel(f)),state:s,steps:i}}const{schedule:yt,cancel:yo,state:Br,steps:zg}=KU(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0),QU={useVisualState:OO({scrapeMotionValuesFromProps:RO,createRenderState:AO,onMount:(t,e,{renderState:r,latestValues:n})=>{yt.read(()=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),yt.render(()=>{tS(r,n,{enableHardwareAcceleration:!1},rS(e.tagName),t.transformTemplate),PO(e,r)})}})},YU={useVisualState:OO({scrapeMotionValuesFromProps:nS,createRenderState:eS})};function JU(t,{forwardMotionProps:e=!1},r,n){return{...XE(t)?QU:YU,preloadedFeatures:r,useRender:VU(e),createVisualElement:n,Component:t}}function no(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}const _O=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function fm(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const XU=t=>e=>_O(e)&&t(e,fm(e));function oo(t,e,r,n){return no(t,e,XU(r),n)}const ZU=(t,e)=>r=>e(t(r)),ba=(...t)=>t.reduce(ZU);function NO(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const uP=NO("dragHorizontal"),fP=NO("dragVertical");function MO(t){let e=!1;if(t==="y")e=fP();else if(t==="x")e=uP();else{const r=uP(),n=fP();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function DO(){const t=MO(!0);return t?(t(),!1):!0}class Fa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function dP(t,e){const r="pointer"+(e?"enter":"leave"),n="onHover"+(e?"Start":"End"),s=(i,o)=>{if(i.pointerType==="touch"||DO())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[n]&&yt.update(()=>a[n](i,o))};return oo(t.current,r,s,{passive:!t.getProps()[n]})}class eV extends Fa{mount(){this.unmount=ba(dP(this.node,!0),dP(this.node,!1))}unmount(){}}class tV extends Fa{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=ba(no(this.node.current,"focus",()=>this.onFocus()),no(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const LO=(t,e)=>e?t===e?!0:LO(t,e.parentElement):!1;function Hg(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,fm(r))}class rV extends Fa{constructor(){super(...arguments),this.removeStartListeners=Ut,this.removeEndListeners=Ut,this.removeAccessibleListeners=Ut,this.startPointerPress=(e,r)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=oo(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u,globalTapTarget:f}=this.node.getProps();yt.update(()=>{!f&&!LO(this.node.current,a.target)?u&&u(a,c):l&&l(a,c)})},{passive:!(n.onTap||n.onPointerUp)}),o=oo(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ba(i,o),this.startPress(e,r)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Hg("up",(c,l)=>{const{onTap:u}=this.node.getProps();u&&yt.update(()=>u(c,l))})};this.removeEndListeners(),this.removeEndListeners=no(this.node.current,"keyup",o),Hg("down",(a,c)=>{this.startPress(a,c)})},r=no(this.node.current,"keydown",e),n=()=>{this.isPressing&&Hg("cancel",(i,o)=>this.cancelPress(i,o))},s=no(this.node.current,"blur",n);this.removeAccessibleListeners=ba(r,s)}}startPress(e,r){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&yt.update(()=>n(e,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!DO()}cancelPress(e,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&yt.update(()=>n(e,r))}mount(){const e=this.node.getProps(),r=oo(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=no(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ba(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ow=new WeakMap,Gg=new WeakMap,nV=t=>{const e=ow.get(t.target);e&&e(t)},sV=t=>{t.forEach(nV)};function iV({root:t,...e}){const r=t||document;Gg.has(r)||Gg.set(r,{});const n=Gg.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(sV,{root:t,...e})),n[s]}function oV(t,e,r){const n=iV(e);return ow.set(t,r),n.observe(t),()=>{ow.delete(t),n.unobserve(t)}}const aV={some:0,all:1};class cV extends Fa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:i}=e,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:aV[s]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=l?u:f;d&&d(c)};return oV(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(lV(e,r))&&this.startObserver()}unmount(){}}function lV({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const uV={inView:{Feature:cV},tap:{Feature:rV},focus:{Feature:tV},hover:{Feature:eV}};function jO(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 dV(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function dm(t,e,r){const n=t.getProps();return sS(n,e,r!==void 0?r:n.custom,fV(t),dV(t))}let hV=Ut,iS=Ut;const wa=t=>t*1e3,ao=t=>t/1e3,pV={current:!1},BO=t=>Array.isArray(t)&&typeof t[0]=="number";function FO(t){return!!(!t||typeof t=="string"&&UO[t]||BO(t)||Array.isArray(t)&&t.every(FO))}const Wd=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,UO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wd([0,.65,.55,1]),circOut:Wd([.55,0,1,.45]),backIn:Wd([.31,.01,.66,-.59]),backOut:Wd([.33,1.53,.69,.99])};function VO(t){if(t)return BO(t)?Wd(t):Array.isArray(t)?t.map(VO):UO[t]}function yV(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:c}={}){const l={[e]:r};c&&(l.offset=c);const u=VO(a);return Array.isArray(u)&&(l.easing=u),t.animate(l,{delay:n,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}function vV(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const $O=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,mV=1e-7,gV=12;function xV(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=$O(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>mV&&++axV(i,0,1,t,r);return i=>i===0||i===1?i:$O(s(i),e,n)}const bV=ry(.42,0,1,1),wV=ry(0,0,.58,1),zO=ry(.42,0,.58,1),EV=t=>Array.isArray(t)&&typeof t[0]!="number",HO=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,GO=t=>e=>1-t(1-e),oS=t=>1-Math.sin(Math.acos(t)),qO=GO(oS),SV=HO(oS),WO=ry(.33,1.53,.69,.99),aS=GO(WO),CV=HO(aS),AV=t=>(t*=2)<1?.5*aS(t):.5*(2-Math.pow(2,-10*(t-1))),kV={linear:Ut,easeIn:bV,easeInOut:zO,easeOut:wV,circIn:oS,circInOut:SV,circOut:qO,backIn:aS,backInOut:CV,backOut:WO,anticipate:AV},hP=t=>{if(Array.isArray(t)){iS(t.length===4);const[e,r,n,s]=t;return ry(e,r,n,s)}else if(typeof t=="string")return kV[t];return t},cS=(t,e)=>r=>!!(ey(r)&&TU.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),KO=(t,e,r)=>n=>{if(!ey(n))return n;const[s,i,o,a]=n.match(um);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},TV=t=>Pa(0,255,t),qg={...Cl,transform:t=>Math.round(TV(t))},gc={test:cS("rgb","red"),parse:KO("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+qg.transform(t)+", "+qg.transform(e)+", "+qg.transform(r)+", "+vh(yh.transform(n))+")"};function PV(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const aw={test:cS("#"),parse:PV,transform:gc.transform},lu={test:cS("hsl","hue"),parse:KO("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+mi.transform(vh(e))+", "+mi.transform(vh(r))+", "+vh(yh.transform(n))+")"},en={test:t=>gc.test(t)||aw.test(t)||lu.test(t),parse:t=>gc.test(t)?gc.parse(t):lu.test(t)?lu.parse(t):aw.parse(t),transform:t=>ey(t)?t:t.hasOwnProperty("red")?gc.transform(t):lu.transform(t)},It=(t,e,r)=>-r*t+r*e+t;function Wg(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 RV({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,c=2*r-a;s=Wg(c,a,t+1/3),i=Wg(c,a,t),o=Wg(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const Kg=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},IV=[aw,gc,lu],OV=t=>IV.find(e=>e.test(t));function pP(t){const e=OV(t);let r=e.parse(t);return e===lu&&(r=RV(r)),r}const QO=(t,e)=>{const r=pP(t),n=pP(e),s={...r};return i=>(s.red=Kg(r.red,n.red,i),s.green=Kg(r.green,n.green,i),s.blue=Kg(r.blue,n.blue,i),s.alpha=It(r.alpha,n.alpha,i),gc.transform(s))};function _V(t){var e,r;return isNaN(t)&&ey(t)&&(((e=t.match(um))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(wO))===null||r===void 0?void 0:r.length)||0)>0}const YO={regex:AU,countKey:"Vars",token:"${v}",parse:Ut},JO={regex:wO,countKey:"Colors",token:"${c}",parse:en.parse},XO={regex:um,countKey:"Numbers",token:"${n}",parse:Cl.parse};function Qg(t,{regex:e,countKey:r,token:n,parse:s}){const i=t.tokenised.match(e);i&&(t["num"+r]=i.length,t.tokenised=t.tokenised.replace(e,n),t.values.push(...i.map(s)))}function Hv(t){const e=t.toString(),r={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&Qg(r,YO),Qg(r,JO),Qg(r,XO),r}function ZO(t){return Hv(t).values}function e6(t){const{values:e,numColors:r,numVars:n,tokenised:s}=Hv(t),i=e.length;return o=>{let a=s;for(let c=0;ctypeof t=="number"?0:t;function MV(t){const e=ZO(t);return e6(t)(e.map(NV))}const Ra={test:_V,parse:ZO,createTransformer:e6,getAnimatableNone:MV},t6=(t,e)=>r=>`${r>0?e:t}`;function r6(t,e){return typeof t=="number"?r=>It(t,e,r):en.test(t)?QO(t,e):t.startsWith("var(")?t6(t,e):s6(t,e)}const n6=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>r6(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=r6(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},s6=(t,e)=>{const r=Ra.createTransformer(e),n=Hv(t),s=Hv(e);return n.numVars===s.numVars&&n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?ba(n6(n.values,s.values),r):t6(t,e)},Hh=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},yP=(t,e)=>r=>It(t,e,r);function LV(t){return typeof t=="number"?yP:typeof t=="string"?en.test(t)?QO:s6:Array.isArray(t)?n6:typeof t=="object"?DV:yP}function jV(t,e,r){const n=[],s=r||LV(t[0]),i=t.length-1;for(let o=0;oe[0];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=jV(e,n,s),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(Pa(t[0],t[i-1],l)):c}function BV(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const s=Hh(0,e,n);t.push(It(r,1,s))}}function FV(t){const e=[0];return BV(e,t.length-1),e}function UV(t,e){return t.map(r=>r*e)}function VV(t,e){return t.map(()=>e||zO).splice(0,t.length-1)}function Gv({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){const s=EV(n)?n.map(hP):hP(n),i={done:!1,value:e[0]},o=UV(r&&r.length===e.length?r:FV(e),t),a=i6(o,e,{ease:Array.isArray(s)?s:VV(e,s)});return{calculatedDuration:t,next:c=>(i.value=a(c),i.done=c>=t,i)}}function o6(t,e){return e?t*(1e3/e):0}const $V=5;function a6(t,e,r){const n=Math.max(e-$V,0);return o6(r-t(n),e-n)}const Yg=.001,zV=.01,vP=10,HV=.05,GV=1;function qV({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;hV(t<=wa(vP));let o=1-e;o=Pa(HV,GV,o),t=Pa(zV,vP,ao(t)),o<1?(s=l=>{const u=l*o,f=u*t,d=u-r,h=cw(l,o),p=Math.exp(-f);return Yg-d/h*p},i=l=>{const f=l*o*t,d=f*r+r,h=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),y=cw(Math.pow(l,2),o);return(-s(l)+Yg>0?-1:1)*((d-h)*p)/y}):(s=l=>{const u=Math.exp(-l*t),f=(l-r)*t+1;return-Yg+u*f},i=l=>{const u=Math.exp(-l*t),f=(r-l)*(t*t);return u*f});const a=5/t,c=KV(s,i,a);if(t=wa(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const WV=12;function KV(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function JV(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!mP(t,YV)&&mP(t,QV)){const r=qV(t);e={...e,...r,mass:1},e.isResolvedFromDuration=!0}return e}function c6({keyframes:t,restDelta:e,restSpeed:r,...n}){const s=t[0],i=t[t.length-1],o={done:!1,value:s},{stiffness:a,damping:c,mass:l,duration:u,velocity:f,isResolvedFromDuration:d}=JV({...n,velocity:-ao(n.velocity||0)}),h=f||0,p=c/(2*Math.sqrt(a*l)),y=i-s,g=ao(Math.sqrt(a/l)),m=Math.abs(y)<5;r||(r=m?.01:2),e||(e=m?.005:.5);let x;if(p<1){const b=cw(g,p);x=w=>{const A=Math.exp(-p*g*w);return i-A*((h+p*g*y)/b*Math.sin(b*w)+y*Math.cos(b*w))}}else if(p===1)x=b=>i-Math.exp(-g*b)*(y+(h+g*y)*b);else{const b=g*Math.sqrt(p*p-1);x=w=>{const A=Math.exp(-p*g*w),O=Math.min(b*w,300);return i-A*((h+p*g*y)*Math.sinh(O)+b*y*Math.cosh(O))/b}}return{calculatedDuration:d&&u||null,next:b=>{const w=x(b);if(d)o.done=b>=u;else{let A=h;b!==0&&(p<1?A=a6(x,b,w):A=0);const O=Math.abs(A)<=r,_=Math.abs(i-w)<=e;o.done=O&&_}return o.value=o.done?i:w,o}}}function gP({keyframes:t,velocity:e=0,power:r=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=C=>a!==void 0&&Cc,p=C=>a===void 0?c:c===void 0||Math.abs(a-C)-y*Math.exp(-C/n),b=C=>m+x(C),w=C=>{const j=x(C),V=b(C);d.done=Math.abs(j)<=l,d.value=d.done?m:V};let A,O;const _=C=>{h(d.value)&&(A=C,O=c6({keyframes:[d.value,p(d.value)],velocity:a6(b,C,d.value),damping:s,stiffness:i,restDelta:l,restSpeed:u}))};return _(0),{calculatedDuration:null,next:C=>{let j=!1;return!O&&A===void 0&&(j=!0,w(C),_(C)),A!==void 0&&C>A?O.next(C-A):(!j&&w(C),d)}}}const XV=t=>{const e=({timestamp:r})=>t(r);return{start:()=>yt.update(e,!0),stop:()=>yo(e),now:()=>Br.isProcessing?Br.timestamp:performance.now()}},xP=2e4;function bP(t){let e=0;const r=50;let n=t.next(e);for(;!n.done&&e=xP?1/0:e}const ZV={decay:gP,inertia:gP,tween:Gv,keyframes:Gv,spring:c6};function qv({autoplay:t=!0,delay:e=0,driver:r=XV,keyframes:n,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",onPlay:c,onStop:l,onComplete:u,onUpdate:f,...d}){let h=1,p=!1,y,g;const m=()=>{g=new Promise(F=>{y=F})};m();let x;const b=ZV[s]||Gv;let w;b!==Gv&&typeof n[0]!="number"&&(w=i6([0,100],n,{clamp:!1}),n=[0,100]);const A=b({...d,keyframes:n});let O;a==="mirror"&&(O=b({...d,keyframes:[...n].reverse(),velocity:-(d.velocity||0)}));let _="idle",C=null,j=null,V=null;A.calculatedDuration===null&&i&&(A.calculatedDuration=bP(A));const{calculatedDuration:B}=A;let z=1/0,Y=1/0;B!==null&&(z=B+o,Y=z*(i+1)-o);let H=0;const L=F=>{if(j===null)return;h>0&&(j=Math.min(j,F)),h<0&&(j=Math.min(F-Y/h,j)),C!==null?H=C:H=Math.round(F-j)*h;const X=H-e*(h>=0?1:-1),oe=h>=0?X<0:X>Y;H=Math.max(X,0),_==="finished"&&C===null&&(H=Y);let ae=H,ke=A;if(i){const Be=Math.min(H,Y)/z;let Te=Math.floor(Be),De=Be%1;!De&&Be>=1&&(De=1),De===1&&Te--,Te=Math.min(Te,i+1),!!(Te%2)&&(a==="reverse"?(De=1-De,o&&(De-=o/z)):a==="mirror"&&(ke=O)),ae=Pa(0,1,De)*z}const ve=oe?{done:!1,value:n[0]}:ke.next(ae);w&&(ve.value=w(ve.value));let{done:ie}=ve;!oe&&B!==null&&(ie=h>=0?H>=Y:H<=0);const Me=C===null&&(_==="finished"||_==="running"&&ie);return f&&f(ve.value),Me&&R(),ve},T=()=>{x&&x.stop(),x=void 0},P=()=>{_="idle",T(),y(),m(),j=V=null},R=()=>{_="finished",u&&u(),T(),y()},I=()=>{if(p)return;x||(x=r(L));const F=x.now();c&&c(),C!==null?j=F-C:(!j||_==="finished")&&(j=F),_==="finished"&&m(),V=j,C=null,_="running",x.start()};t&&I();const U={then(F,X){return g.then(F,X)},get time(){return ao(H)},set time(F){F=wa(F),H=F,C!==null||!x||h===0?C=F:j=x.now()-F/h},get duration(){const F=A.calculatedDuration===null?bP(A):A.calculatedDuration;return ao(F)},get speed(){return h},set speed(F){F===h||!x||(h=F,U.time=ao(H))},get state(){return _},play:I,pause:()=>{_="paused",C=H},stop:()=>{p=!0,_!=="idle"&&(_="idle",l&&l(),P())},cancel:()=>{V!==null&&L(V),P()},complete:()=>{_="finished"},sample:F=>(j=0,L(F))};return U}function e$(t){let e;return()=>(e===void 0&&(e=t()),e)}const t$=e$(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),r$=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),e1=10,n$=2e4,s$=(t,e)=>e.type==="spring"||t==="backgroundColor"||!FO(e.ease);function i$(t,e,{onUpdate:r,onComplete:n,...s}){if(!(t$()&&r$.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0&&s.type!=="inertia"))return!1;let o=!1,a,c,l=!1;const u=()=>{c=new Promise(b=>{a=b})};u();let{keyframes:f,duration:d=300,ease:h,times:p}=s;if(s$(e,s)){const b=qv({...s,repeat:0,delay:0});let w={done:!1,value:f[0]};const A=[];let O=0;for(;!w.done&&O{l=!1,y.cancel()},m=()=>{l=!0,yt.update(g),a(),u()};return y.onfinish=()=>{l||(t.set(vV(f,s)),n&&n(),m())},{then(b,w){return c.then(b,w)},attachTimeline(b){return y.timeline=b,y.onfinish=null,Ut},get time(){return ao(y.currentTime||0)},set time(b){y.currentTime=wa(b)},get speed(){return y.playbackRate},set speed(b){y.playbackRate=b},get duration(){return ao(d)},play:()=>{o||(y.play(),yo(g))},pause:()=>y.pause(),stop:()=>{if(o=!0,y.playState==="idle")return;const{currentTime:b}=y;if(b){const w=qv({...s,autoplay:!1});t.setWithVelocity(w.sample(b-e1).value,w.sample(b).value,e1)}m()},complete:()=>{l||y.finish()},cancel:m}}function o$({keyframes:t,delay:e,onUpdate:r,onComplete:n}){const s=()=>(r&&r(t[t.length-1]),n&&n(),{time:0,speed:1,duration:0,play:Ut,pause:Ut,stop:Ut,then:i=>(i(),Promise.resolve()),cancel:Ut,complete:Ut});return e?qv({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}const a$={type:"spring",stiffness:500,damping:25,restSpeed:10},c$=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),l$={type:"keyframes",duration:.8},u$={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},f$=(t,{keyframes:e})=>e.length>2?l$:Sl.has(t)?t.startsWith("scale")?c$(e[1]):a$:u$,lw=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ra.test(e)||e==="0")&&!e.startsWith("url(")),d$=new Set(["brightness","contrast","saturate","opacity"]);function h$(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(um)||[];if(!n)return t;const s=r.replace(n,"");let i=d$.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const p$=/([a-z-]*)\(.*?\)/g,uw={...Ra,getAnimatableNone:t=>{const e=t.match(p$);return e?e.map(h$).join(" "):t}},y$={...EO,color:en,backgroundColor:en,outlineColor:en,fill:en,stroke:en,borderColor:en,borderTopColor:en,borderRightColor:en,borderBottomColor:en,borderLeftColor:en,filter:uw,WebkitFilter:uw},lS=t=>y$[t];function l6(t,e){let r=lS(t);return r!==uw&&(r=Ra),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const u6=t=>/^0[^.\s]+$/.test(t);function v$(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||u6(t)}function m$(t,e,r,n){const s=lw(e,r);let i;Array.isArray(r)?i=[...r]:i=[null,r];const o=n.from!==void 0?n.from:t.get();let a;const c=[];for(let l=0;ls=>{const i=uS(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-wa(o);const c=m$(e,t,r,i),l=c[0],u=c[c.length-1],f=lw(t,l),d=lw(t,u);let h={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:p=>{e.set(p),i.onUpdate&&i.onUpdate(p)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(g$(i)||(h={...h,...f$(t,h)}),h.duration&&(h.duration=wa(h.duration)),h.repeatDelay&&(h.repeatDelay=wa(h.repeatDelay)),!f||!d||pV.current||i.type===!1||x$.skipAnimations)return o$(h);if(!n.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=i$(e,t,h);if(p)return p}return qv(h)};function Wv(t){return!!(xn(t)&&t.add)}const f6=t=>/^\-?\d*\.?\d+$/.test(t);function dS(t,e){t.indexOf(e)===-1&&t.push(e)}function hS(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class pS{constructor(){this.subscriptions=[]}add(e){return dS(this.subscriptions,e),()=>hS(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));class w${constructor(e,r={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=Br;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,yt.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()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>yt.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=b$(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new pS);const n=this.events[e].add(r);return e==="change"?()=>{n(),yt.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?o6(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 Lf(t,e){return new w$(t,e)}const d6=t=>e=>e.test(t),E$={test:t=>t==="auto",parse:t=>t},h6=[Cl,Ae,mi,Mo,RU,PU,E$],Od=t=>h6.find(d6(t)),S$=[...h6,en,Ra],C$=t=>S$.find(d6(t));function A$(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Lf(r))}function k$(t,e){const r=dm(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=zU(i[o]);A$(t,o,a)}}function T$(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;ac.remove(f))),l.push(g)}return o&&Promise.all(l).then(()=>{o&&k$(t,o)}),l}function fw(t,e,r={}){const n=dm(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const i=n?()=>Promise.all(p6(t,n,r)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=s;return _$(t,e,l+c,u,f,r)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,l]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>l())}else return Promise.all([i(),o(r.delay)])}function _$(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,c=s===1?(l=0)=>l*n:(l=0)=>a-l*n;return Array.from(t.variantChildren).sort(N$).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(fw(l,e,{...i,delay:r+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function N$(t,e){return t.sortNodePosition(e)}function M$(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>fw(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=fw(t,e,r);else{const s=typeof e=="function"?dm(t,e,r.custom):e;n=Promise.all(p6(t,s,r))}return n.then(()=>t.notify("AnimationComplete",e))}const D$=[...QE].reverse(),L$=QE.length;function j$(t){return e=>Promise.all(e.map(({animation:r,options:n})=>M$(t,r,n)))}function B$(t){let e=j$(t);const r=U$();let n=!0;const s=(c,l)=>{const u=dm(t,l);if(u){const{transition:f,transitionEnd:d,...h}=u;c={...c,...h,...d}}return c};function i(c){e=c(t)}function o(c,l){const u=t.getProps(),f=t.getVariantContext(!0)||{},d=[],h=new Set;let p={},y=1/0;for(let m=0;my&&A,V=!1;const B=Array.isArray(w)?w:[w];let z=B.reduce(s,{});O===!1&&(z={});const{prevResolvedValues:Y={}}=b,H={...Y,...z},L=T=>{j=!0,h.has(T)&&(V=!0,h.delete(T)),b.needsAnimating[T]=!0};for(const T in H){const P=z[T],R=Y[T];if(p.hasOwnProperty(T))continue;let I=!1;zv(P)&&zv(R)?I=!jO(P,R):I=P!==R,I?P!==void 0?L(T):h.add(T):P!==void 0&&h.has(T)?L(T):b.protectedKeys[T]=!0}b.prevProp=w,b.prevResolvedValues=z,b.isActive&&(p={...p,...z}),n&&t.blockInitialAnimation&&(j=!1),j&&(!_||V)&&d.push(...B.map(T=>({animation:T,options:{type:x,...c}})))}if(h.size){const m={};h.forEach(x=>{const b=t.getBaseTarget(x);b!==void 0&&(m[x]=b)}),d.push({animation:m})}let g=!!d.length;return n&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(d):Promise.resolve()}function a(c,l,u){var f;if(r[c].isActive===l)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,l)}),r[c].isActive=l;const d=o(u,c);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function F$(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!jO(e,t):!1}function Ja(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function U$(){return{animate:Ja(!0),whileInView:Ja(),whileHover:Ja(),whileTap:Ja(),whileDrag:Ja(),whileFocus:Ja(),exit:Ja()}}class V$ extends Fa{constructor(e){super(e),e.animationState||(e.animationState=B$(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),cm(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 $$=0;class z$ extends Fa{constructor(){super(...arguments),this.id=$$++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e,{custom:n??this.node.getProps().custom});r&&!e&&i.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const H$={animation:{Feature:V$},exit:{Feature:z$}},wP=(t,e)=>Math.abs(t-e);function G$(t,e){const r=wP(t.x,e.x),n=wP(t.y,e.y);return Math.sqrt(r**2+n**2)}class y6{constructor(e,r,{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:i=!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 f=Xg(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=G$(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:y}=Br;this.history.push({...p,timestamp:y});const{onStart:g,onMove:m}=this.handlers;d||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Jg(d,this.transformPagePoint),yt.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Xg(f.type==="pointercancel"?this.lastMoveEventInfo:Jg(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,g),p&&p(f,g)},!_O(e))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.contextWindow=s||window;const o=fm(e),a=Jg(o,this.transformPagePoint),{point:c}=a,{timestamp:l}=Br;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=r;u&&u(e,Xg(a,this.history)),this.removeListeners=ba(oo(this.contextWindow,"pointermove",this.handlePointerMove),oo(this.contextWindow,"pointerup",this.handlePointerUp),oo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),yo(this.updatePoint)}}function Jg(t,e){return e?{point:e(t.point)}:t}function EP(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Xg({point:t},e){return{point:t,delta:EP(t,v6(e)),offset:EP(t,q$(e)),velocity:W$(e,.1)}}function q$(t){return t[0]}function v6(t){return t[t.length-1]}function W$(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=v6(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>wa(e)));)r--;if(!n)return{x:0,y:0};const i=ao(s.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Un(t){return t.max-t.min}function dw(t,e=0,r=.01){return Math.abs(t-e)<=r}function SP(t,e,r,n=.5){t.origin=n,t.originPoint=It(e.min,e.max,t.origin),t.scale=Un(r)/Un(e),(dw(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=It(r.min,r.max,t.origin)-t.originPoint,(dw(t.translate)||isNaN(t.translate))&&(t.translate=0)}function mh(t,e,r,n){SP(t.x,e.x,r.x,n?n.originX:void 0),SP(t.y,e.y,r.y,n?n.originY:void 0)}function CP(t,e,r){t.min=r.min+e.min,t.max=t.min+Un(e)}function K$(t,e,r){CP(t.x,e.x,r.x),CP(t.y,e.y,r.y)}function AP(t,e,r){t.min=e.min-r.min,t.max=t.min+Un(e)}function gh(t,e,r){AP(t.x,e.x,r.x),AP(t.y,e.y,r.y)}function Q$(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?It(r,t,n.max):Math.min(t,r)),t}function kP(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 Y$(t,{top:e,left:r,bottom:n,right:s}){return{x:kP(t.x,r,s),y:kP(t.y,e,n)}}function TP(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Hh(e.min,e.max-n,t.min):n>s&&(r=Hh(t.min,t.max-s,e.min)),Pa(0,1,r)}function Z$(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 hw=.35;function ez(t=hw){return t===!1?t=0:t===!0&&(t=hw),{x:PP(t,"left","right"),y:PP(t,"top","bottom")}}function PP(t,e,r){return{min:RP(t,e),max:RP(t,r)}}function RP(t,e){return typeof t=="number"?t:t[e]||0}const IP=()=>({translate:0,scale:1,origin:0,originPoint:0}),uu=()=>({x:IP(),y:IP()}),OP=()=>({min:0,max:0}),Zt=()=>({x:OP(),y:OP()});function Jn(t){return[t("x"),t("y")]}function m6({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function tz({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function rz(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 Zg(t){return t===void 0||t===1}function pw({scale:t,scaleX:e,scaleY:r}){return!Zg(t)||!Zg(e)||!Zg(r)}function rc(t){return pw(t)||g6(t)||t.z||t.rotate||t.rotateX||t.rotateY}function g6(t){return _P(t.x)||_P(t.y)}function _P(t){return t&&t!=="0%"}function Kv(t,e,r){const n=t-r,s=e*n;return r+s}function NP(t,e,r,n,s){return s!==void 0&&(t=Kv(t,s,n)),Kv(t,r,n)+e}function yw(t,e=0,r=1,n,s){t.min=NP(t.min,e,r,n,s),t.max=NP(t.max,e,r,n,s)}function x6(t,{x:e,y:r}){yw(t.x,e.translate,e.scale,e.originPoint),yw(t.y,r.translate,r.scale,r.originPoint)}function nz(t,e,r,n=!1){const s=r.length;if(!s)return;e.x=e.y=1;let i,o;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function Vo(t,e){t.min=t.min+e,t.max=t.max+e}function DP(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=It(t.min,t.max,i);yw(t,e[r],e[n],o,e.scale)}const sz=["x","scaleX","originX"],iz=["y","scaleY","originY"];function fu(t,e){DP(t.x,e,sz),DP(t.y,e,iz)}function b6(t,e){return m6(rz(t.getBoundingClientRect(),e))}function oz(t,e,r){const n=b6(t,r),{scroll:s}=e;return s&&(Vo(n.x,s.offset.x),Vo(n.y,s.offset.y)),n}const w6=({current:t})=>t?t.ownerDocument.defaultView:null,az=new WeakMap;class cz{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=Zt(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(fm(u,"page").point)},i=(u,f)=>{const{drag:d,dragPropagation:h,onDragStart:p}=this.getProps();if(d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=MO(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),Jn(g=>{let m=this.getAxisMotionValue(g).get()||0;if(mi.test(m)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[g];b&&(m=Un(b)*(parseFloat(m)/100))}}this.originPoint[g]=m}),p&&yt.update(()=>p(u,f),!1,!0);const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(u,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:y}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:g}=f;if(h&&this.currentDirection===null){this.currentDirection=lz(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&y(u,f)},a=(u,f)=>this.stop(u,f),c=()=>Jn(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new y6(e,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:w6(this.visualElement)})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&yt.update(()=>i(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:s}=this.getProps();if(!n||!t1(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=Q$(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:r,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;r&&cu(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&s?this.constraints=Y$(s.layoutBox,r):this.constraints=!1,this.elastic=ez(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Jn(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Z$(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!cu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=oz(n,s.root,this.visualElement.getTransformPagePoint());let o=J$(s.layout.layoutBox,i);if(r){const a=r(tz(o));this.hasMutatedConstraints=!!a,a&&(o=m6(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Jn(u=>{if(!t1(u,r,this.currentDirection))return;let f=c&&c[u]||{};o&&(f={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,p={type:"inertia",velocity:n?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(fS(e,n,0,r))}stopAnimation(){Jn(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Jn(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(),s=n[r];return s||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Jn(r=>{const{drag:n}=this.getProps();if(!t1(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-It(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!cu(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Jn(o=>{const a=this.getAxisMotionValue(o);if(a){const c=a.get();s[o]=X$({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Jn(o=>{if(!t1(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(It(c,l,s[o]))})}addListeners(){if(!this.visualElement.current)return;az.set(this.visualElement,this);const e=this.visualElement.current,r=oo(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();cu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),n();const o=no(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(Jn(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),r(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=hw,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function t1(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function lz(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class uz extends Fa{constructor(e){super(e),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new cz(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const LP=t=>(e,r)=>{t&&yt.update(()=>t(e,r))};class fz extends Fa{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(e){this.session=new y6(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:w6(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:LP(e),onStart:LP(r),onMove:n,onEnd:(i,o)=>{delete this.session,s&&yt.update(()=>s(i,o))}}}mount(){this.removePointerDownListener=oo(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 dz(){const t=v.useContext(om);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=v.useId();return v.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}const W1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function jP(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const _d={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ae.test(t))t=parseFloat(t);else return t;const r=jP(t,e.target.x),n=jP(t,e.target.y);return`${r}% ${n}%`}},hz={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=Ra.parse(t);if(s.length>5)return n;const i=Ra.createTransformer(t),o=typeof s[0]!="number"?1:0,a=r.x.scale*e.x,c=r.y.scale*e.y;s[0+o]/=a,s[1+o]/=c;const l=It(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),i(s)}};class pz extends cr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;wU(yz),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),W1.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||yt.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:s}=e;s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function E6(t){const[e,r]=dz(),n=v.useContext(JE);return cr.createElement(pz,{...t,layoutGroup:n,switchLayoutGroup:v.useContext(mO),isPresent:e,safeToRemove:r})}const yz={borderRadius:{..._d,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_d,borderTopRightRadius:_d,borderBottomLeftRadius:_d,borderBottomRightRadius:_d,boxShadow:hz},S6=["TopLeft","TopRight","BottomLeft","BottomRight"],vz=S6.length,BP=t=>typeof t=="string"?parseFloat(t):t,FP=t=>typeof t=="number"||Ae.test(t);function mz(t,e,r,n,s,i){s?(t.opacity=It(0,r.opacity!==void 0?r.opacity:1,gz(n)),t.opacityExit=It(e.opacity!==void 0?e.opacity:1,0,xz(n))):i&&(t.opacity=It(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Hh(t,e,n))}function VP(t,e){t.min=e.min,t.max=e.max}function Gn(t,e){VP(t.x,e.x),VP(t.y,e.y)}function $P(t,e,r,n,s){return t-=e,t=Kv(t,1/r,n),s!==void 0&&(t=Kv(t,1/s,n)),t}function bz(t,e=0,r=1,n=.5,s,i=t,o=t){if(mi.test(e)&&(e=parseFloat(e),e=It(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=It(i.min,i.max,n);t===i&&(a-=e),t.min=$P(t.min,e,r,a,s),t.max=$P(t.max,e,r,a,s)}function zP(t,e,[r,n,s],i,o){bz(t,e[r],e[n],e[s],e.scale,i,o)}const wz=["x","scaleX","originX"],Ez=["y","scaleY","originY"];function HP(t,e,r,n){zP(t.x,e,wz,r?r.x:void 0,n?n.x:void 0),zP(t.y,e,Ez,r?r.y:void 0,n?n.y:void 0)}function GP(t){return t.translate===0&&t.scale===1}function A6(t){return GP(t.x)&&GP(t.y)}function Sz(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 k6(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 qP(t){return Un(t.x)/Un(t.y)}class Cz{constructor(){this.members=[]}add(e){dS(this.members,e),e.scheduleRender()}remove(e){if(hS(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(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;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:s}=e.options;s===!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 WP(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:c,rotateX:l,rotateY:u}=r;c&&(n+=`rotate(${c}deg) `),l&&(n+=`rotateX(${l}deg) `),u&&(n+=`rotateY(${u}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 Az=(t,e)=>t.depth-e.depth;class kz{constructor(){this.children=[],this.isDirty=!1}add(e){dS(this.children,e),this.isDirty=!0}remove(e){hS(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Az),this.isDirty=!1,this.children.forEach(e)}}function Tz(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(yo(n),t(i-e))};return yt.read(n,!0),()=>yo(n)}function Pz(t){window.MotionDebug&&window.MotionDebug.record(t)}function Rz(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Iz(t,e,r){const n=xn(t)?t:Lf(t);return n.start(fS("",n,e,r)),n.animation}const KP=["","X","Y","Z"],Oz={visibility:"hidden"},QP=1e3;let _z=0;const nc={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function T6({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=_z++,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,nc.totalNodes=nc.resolvedTargetDeltas=nc.recalculatedProjection=0,this.nodes.forEach(Dz),this.nodes.forEach(Uz),this.nodes.forEach(Vz),this.nodes.forEach(Lz),Pz(nc)},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 c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Tz(d,250),W1.hasAnimatedSinceResize&&(W1.hasAnimatedSinceResize=!1,this.nodes.forEach(JP))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||qz,{onLayoutAnimationStart:g,onLayoutAnimationComplete:m}=u.getProps(),x=!this.targetLayout||!k6(this.targetLayout,p)||h,b=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||d&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,b);const w={...uS(y,"layout"),onPlay:g,onComplete:m};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||JP(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,yo(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($z),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 u=0;uthis.update()))}clearAllSnapshots(){this.nodes.forEach(jz),this.sharedNodes.forEach(zz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,yt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){yt.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 c=0;c{const A=w/1e3;XP(f.x,o.x,A),XP(f.y,o.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gh(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Hz(this.relativeTarget,this.relativeTargetOrigin,d,A),b&&Sz(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Zt()),Gn(b,this.relativeTarget)),y&&(this.animationValues=u,mz(u,l,this.latestValues,A,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},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&&(yo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=yt.update(()=>{W1.hasAnimatedSinceResize=!0,this.currentAnimation=Iz(0,QP,{...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(QP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&P6(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Zt();const f=Un(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const d=Un(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+d}Gn(a,c),fu(a,u),mh(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Cz),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.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:c}={}){const l=this.getStack();l&&l.promote(this,c),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:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(YP),this.root.sharedNodes.clear()}}}function Nz(t){t.updateLayout()}function Mz(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:s}=t.layout,{animationType:i}=t.options,o=r.source!==t.layout.source;i==="size"?Jn(f=>{const d=o?r.measuredBox[f]:r.layoutBox[f],h=Un(d);d.min=n[f].min,d.max=d.min+h}):P6(i,r.layoutBox,n)&&Jn(f=>{const d=o?r.measuredBox[f]:r.layoutBox[f],h=Un(n[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=uu();mh(a,n,r.layoutBox);const c=uu();o?mh(c,t.applyTransform(s,!0),r.measuredBox):mh(c,n,r.layoutBox);const l=!A6(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=Zt();gh(p,r.layoutBox,d.layoutBox);const y=Zt();gh(y,n,h.layoutBox),k6(p,y)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Dz(t){nc.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 Lz(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jz(t){t.clearSnapshot()}function YP(t){t.clearMeasurements()}function Bz(t){t.isLayoutDirty=!1}function Fz(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function JP(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Uz(t){t.resolveTargetDelta()}function Vz(t){t.calcProjection()}function $z(t){t.resetRotation()}function zz(t){t.removeLeadSnapshot()}function XP(t,e,r){t.translate=It(e.translate,0,r),t.scale=It(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function ZP(t,e,r,n){t.min=It(e.min,r.min,n),t.max=It(e.max,r.max,n)}function Hz(t,e,r,n){ZP(t.x,e.x,r.x,n),ZP(t.y,e.y,r.y,n)}function Gz(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const qz={duration:.45,ease:[.4,0,.1,1]},eR=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),tR=eR("applewebkit/")&&!eR("chrome/")?Math.round:Ut;function rR(t){t.min=tR(t.min),t.max=tR(t.max)}function Wz(t){rR(t.x),rR(t.y)}function P6(t,e,r){return t==="position"||t==="preserve-aspect"&&!dw(qP(e),qP(r),.2)}const Kz=T6({attachResizeListener:(t,e)=>no(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ex={current:void 0},R6=T6({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ex.current){const t=new Kz({});t.mount(window),t.setOptions({layoutScroll:!0}),ex.current=t}return ex.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Qz={pan:{Feature:fz},drag:{Feature:uz,ProjectionNode:R6,MeasureLayout:E6}},Yz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Jz(t){const e=Yz.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function vw(t,e,r=1){const[n,s]=Jz(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);if(i){const o=i.trim();return f6(o)?parseFloat(o):o}else return iw(s)?vw(s,e,r+1):s}function Xz(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!iw(i))return;const o=vw(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!iw(i))continue;const o=vw(i,n);o&&(e[s]=o,r||(r={}),r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const Zz=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),I6=t=>Zz.has(t),eH=t=>Object.keys(t).some(I6),nR=t=>t===Cl||t===Ae,sR=(t,e)=>parseFloat(t.split(", ")[e]),iR=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return sR(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?sR(i[1],t):0}},tH=new Set(["x","y","z"]),rH=Zp.filter(t=>!tH.has(t));function nH(t){const e=[];return rH.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 jf={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:iR(4,13),y:iR(5,14)};jf.translateX=jf.x;jf.translateY=jf.y;const sH=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(l=>{a[l]=jf[l](n,i)}),e.render();const c=e.measureViewportBox();return r.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=jf[l](c,i)}),t},iH=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(I6);let i=[],o=!1;const a=[];if(s.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=r[c],f=Od(u);const d=e[c];let h;if(zv(d)){const p=d.length,y=d[0]===null?1:0;u=d[y],f=Od(u);for(let g=y;g=0?window.pageYOffset:null,l=sH(e,t,a);return i.length&&i.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),am&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function oH(t,e,r,n){return eH(e)?iH(t,e,r,n):{target:e,transitionEnd:n}}const aH=(t,e,r,n)=>{const s=Xz(t,e,n);return e=s.target,n=s.transitionEnd,oH(t,e,r,n)},mw={current:null},O6={current:!1};function cH(){if(O6.current=!0,!!am)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>mw.current=t.matches;t.addListener(e),e()}else mw.current=!1}function lH(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(xn(i))t.addValue(s,i),Wv(n)&&n.add(s);else if(xn(o))t.addValue(s,Lf(i,{owner:t})),Wv(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,Lf(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const oR=new WeakMap,_6=Object.keys(zh),uH=_6.length,aR=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fH=YE.length;class dH{constructor({parent:e,props:r,presenceContext:n,reducedMotionConfig:s,visualState:i},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=()=>yt.render(this.render,!1,!0);const{latestValues:a,renderState:c}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=r.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=r,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=lm(r),this.isVariantNode=vO(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(r,{});for(const f in u){const d=u[f];a[f]!==void 0&&xn(d)&&(d.set(a[f],!1),Wv(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){this.current=e,oR.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)),O6.current||cH(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:mw.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){oR.delete(this.current),this.projection&&this.projection.unmount(),yo(this.notifyUpdate),yo(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=Sl.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&yt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i){let o,a;for(let c=0;cthis.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,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):Zt()}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=Lf(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,s=typeof n=="string"||typeof n=="object"?(r=sS(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!xn(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new pS),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class N6 extends dH{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:s},i){let o=R$(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){T$(this,n,o);const a=aH(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function hH(t){return window.getComputedStyle(t)}class pH extends N6{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,r){if(Sl.has(r)){const n=lS(r);return n&&n.default||0}else{const n=hH(e),s=(bO(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return b6(e,r)}build(e,r,n,s){ZE(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return nS(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;xn(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){kO(e,r,n,s)}}class yH extends N6{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Sl.has(r)){const n=lS(r);return n&&n.default||0}return r=TO.has(r)?r:KE(r),e.getAttribute(r)}measureInstanceViewportBox(){return Zt()}scrapeMotionValuesFromProps(e,r){return RO(e,r)}build(e,r,n,s){tS(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){PO(e,r,n,s)}mount(e){this.isSVGTag=rS(e.tagName),super.mount(e)}}const vH=(t,e)=>XE(t)?new yH(e,{enableHardwareAcceleration:!1}):new pH(e,{enableHardwareAcceleration:!0}),mH={layout:{ProjectionNode:R6,MeasureLayout:E6}},gH={...H$,...uV,...Qz,...mH},Xc=xU((t,e)=>JU(t,e,gH,vH));function M6(){const t=v.useRef(!1);return WE(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function xH(){const t=M6(),[e,r]=v.useState(0),n=v.useCallback(()=>{t.current&&r(e+1)},[e]);return[v.useCallback(()=>yt.postRender(n),[n]),e]}class bH extends v.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 wH({children:t,isPresent:e}){const r=v.useId(),n=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0});return v.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:c}=s.current;if(e||!n.current||!i||!o)return;n.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` +`+i.stack}return{value:t,source:e,stack:s,digest:null}}function Fg(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Gb(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var FF=typeof WeakMap=="function"?WeakMap:Map;function BI(t,e,r){r=io(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){jv||(jv=!0,tw=n),Gb(t,e)},r}function FI(t,e,r){r=io(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){Gb(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Gb(t,e),typeof n!="function"&&(ma===null?ma=new Set([this]):ma.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function FT(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new FF;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=ZF.bind(null,t,e,r),e.then(t,t))}function UT(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 VT(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,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=io(-1,1),e.tag=2,va(r,e,1))),r.lanes|=1),t)}var UF=wo.ReactCurrentOwner,yn=!1;function tn(t,e,r,n){e.child=t===null?pI(e,null,r,n):_f(e,t.child,r,n)}function $T(t,e,r,n,s){r=r.render;var i=e.ref;return Cu(e,s),n=OE(t,e,r,n,i,s),r=_E(),t!==null&&!yn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,po(t,e,s)):(St&&r&&xE(e),e.flags|=1,tn(t,e,n,s),e.child)}function zT(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!$E(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,UI(t,e,i,n,s)):(t=G1(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:_h,r(o,n)&&t.ref===e.ref)return po(t,e,s)}return e.flags|=1,t=xa(i,n),t.ref=e.ref,t.return=e,e.child=t}function UI(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(_h(i,n)&&t.ref===e.ref)if(yn=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(yn=!0);else return e.lanes=t.lanes,po(t,e,s)}return qb(t,e,r,n,s)}function VI(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},pt(au,In),In|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,pt(au,In),In|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,pt(au,In),In|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,pt(au,In),In|=n;return tn(t,e,s,r),e.child}function $I(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function qb(t,e,r,n,s){var i=mn(r)?sl:Hr.current;return i=If(e,i),Cu(e,s),r=OE(t,e,r,n,i,s),n=_E(),t!==null&&!yn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,po(t,e,s)):(St&&n&&xE(e),e.flags|=1,tn(t,e,r,s),e.child)}function HT(t,e,r,n,s){if(mn(r)){var i=!0;Tv(e)}else i=!1;if(Cu(e,s),e.stateNode===null)$1(t,e),jI(e,r,n),Hb(e,r,n,s),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var c=o.context,l=r.contextType;typeof l=="object"&&l!==null?l=ds(l):(l=mn(r)?sl:Hr.current,l=If(e,l));var u=r.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||c!==l)&&BT(e,o,n,l),Uo=!1;var d=e.memoizedState;o.state=d,_v(e,n,o,s),c=e.memoizedState,a!==n||d!==c||vn.current||Uo?(typeof u=="function"&&(zb(e,r,u,n),c=e.memoizedState),(a=Uo||jT(e,r,a,n,d,c,l))?(f||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=c),o.props=n,o.state=c,o.context=l,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,vI(t,e),a=e.memoizedProps,l=e.type===e.elementType?a:Es(e.type,a),o.props=l,f=e.pendingProps,d=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=ds(c):(c=mn(r)?sl:Hr.current,c=If(e,c));var h=r.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||d!==c)&&BT(e,o,n,c),Uo=!1,d=e.memoizedState,o.state=d,_v(e,n,o,s);var p=e.memoizedState;a!==f||d!==p||vn.current||Uo?(typeof h=="function"&&(zb(e,r,h,n),p=e.memoizedState),(l=Uo||jT(e,r,l,n,d,p,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,c)),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=c,n=l):(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 Wb(t,e,r,n,i,s)}function Wb(t,e,r,n,s,i){$I(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return s&&RT(e,r,!1),po(t,e,i);n=e.stateNode,UF.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=_f(e,t.child,null,i),e.child=_f(e,null,a,i)):tn(t,e,a,i),e.memoizedState=n.state,s&&RT(e,r,!0),e.child}function zI(t){var e=t.stateNode;e.pendingContext?PT(t,e.pendingContext,e.pendingContext!==e.context):e.context&&PT(t,e.context,!1),TE(t,e.containerInfo)}function GT(t,e,r,n,s){return Of(),wE(s),e.flags|=256,tn(t,e,r,n),e.child}var Kb={dehydrated:null,treeContext:null,retryLane:0};function Qb(t){return{baseLanes:t,cachePool:null,transitions:null}}function HI(t,e,r){var n=e.pendingProps,s=kt.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),pt(kt,s&1),t===null)return Vb(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,i?(n=e.mode,i=e.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=em(o,n,0,null),t=Jc(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=Qb(r),e.memoizedState=Kb,t):DE(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return VF(t,e,o,n,a,s,r);if(i){i=n.fallback,o=e.mode,s=t.child,a=s.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=c,e.deletions=null):(n=xa(s,c),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=xa(a,i):(i=Jc(i,o,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,o=t.child.memoizedState,o=o===null?Qb(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~r,e.memoizedState=Kb,n}return i=t.child,t=i.sibling,n=xa(i,{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 DE(t,e){return e=em({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ky(t,e,r,n){return n!==null&&wE(n),_f(e,t.child,null,r),t=DE(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function VF(t,e,r,n,s,i,o){if(r)return e.flags&256?(e.flags&=-257,n=Fg(Error(se(422))),Ky(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=em({mode:"visible",children:n.children},s,0,null),i=Jc(i,s,o,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&_f(e,t.child,null,o),e.child.memoizedState=Qb(o),e.memoizedState=Kb,i);if(!(e.mode&1))return Ky(t,e,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(se(419)),n=Fg(i,n,void 0),Ky(t,e,o,n)}if(a=(o&t.childLanes)!==0,yn||a){if(n=dr,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,ho(t,s),Ds(n,t,s,-1))}return VE(),n=Fg(Error(se(421))),Ky(t,e,o,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=eU.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Dn=ya(s.nextSibling),Ln=e,St=!0,_s=null,t!==null&&(os[as++]=to,os[as++]=ro,os[as++]=il,to=t.id,ro=t.overflow,il=e),e=DE(e,n.children),e.flags|=4096,e)}function qT(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),$b(t.return,e,r)}function Ug(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function GI(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(tn(t,e,n.children,r),n=kt.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&&qT(t,r,e);else if(t.tag===19)qT(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(pt(kt,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&Nv(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),Ug(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Nv(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}Ug(e,!0,r,null,i);break;case"together":Ug(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function $1(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function po(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),al|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(se(153));if(e.child!==null){for(t=e.child,r=xa(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=xa(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function $F(t,e,r){switch(e.tag){case 3:zI(e),Of();break;case 5:mI(e);break;case 1:mn(e.type)&&Tv(e);break;case 4:TE(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;pt(Iv,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(pt(kt,kt.current&1),e.flags|=128,null):r&e.child.childLanes?HI(t,e,r):(pt(kt,kt.current&1),t=po(t,e,r),t!==null?t.sibling:null);pt(kt,kt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return GI(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),pt(kt,kt.current),n)break;return null;case 22:case 23:return e.lanes=0,VI(t,e,r)}return po(t,e,r)}var qI,Yb,WI,KI;qI=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}};Yb=function(){};WI=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,mc(vi.current);var i=null;switch(r){case"input":s=gb(t,s),n=gb(t,n),i=[];break;case"select":s=_t({},s,{value:void 0}),n=_t({},n,{value:void 0}),i=[];break;case"textarea":s=wb(t,s),n=wb(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Av)}Sb(r,n);var o;r=null;for(l in s)if(!n.hasOwnProperty(l)&&s.hasOwnProperty(l)&&s[l]!=null)if(l==="style"){var a=s[l];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Ah.hasOwnProperty(l)?i||(i=[]):(i=i||[]).push(l,null));for(l in n){var c=n[l];if(a=s!=null?s[l]:void 0,n.hasOwnProperty(l)&&c!==a&&(c!=null||a!=null))if(l==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(i||(i=[]),i.push(l,r)),r=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(i=i||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Ah.hasOwnProperty(l)?(c!=null&&l==="onScroll"&>("scroll",t),i||a===c||(i=[])):(i=i||[]).push(l,c))}r&&(i=i||[]).push("style",r);var l=i;(e.updateQueue=l)&&(e.flags|=4)}};KI=function(t,e,r,n){r!==n&&(e.flags|=4)};function Rd(t,e){if(!St)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 Mr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function zF(t,e,r){var n=e.pendingProps;switch(bE(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mr(e),null;case 1:return mn(e.type)&&kv(),Mr(e),null;case 3:return n=e.stateNode,Nf(),wt(vn),wt(Hr),RE(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(qy(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,_s!==null&&(sw(_s),_s=null))),Yb(t,e),Mr(e),null;case 5:PE(e);var s=mc(jh.current);if(r=e.type,t!==null&&e.stateNode!=null)WI(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(se(166));return Mr(e),null}if(t=mc(vi.current),qy(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[ai]=e,n[Dh]=i,t=(e.mode&1)!==0,r){case"dialog":gt("cancel",n),gt("close",n);break;case"iframe":case"object":case"embed":gt("load",n);break;case"video":case"audio":for(s=0;s<\/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[ai]=e,t[Dh]=n,qI(t,e,!1,!1),e.stateNode=t;e:{switch(o=Cb(r,n),r){case"dialog":gt("cancel",t),gt("close",t),s=n;break;case"iframe":case"object":case"embed":gt("load",t),s=n;break;case"video":case"audio":for(s=0;sDf&&(e.flags|=128,n=!0,Rd(i,!1),e.lanes=4194304)}else{if(!n)if(t=Nv(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Rd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!St)return Mr(e),null}else 2*Wt()-i.renderingStartTime>Df&&r!==1073741824&&(e.flags|=128,n=!0,Rd(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Wt(),e.sibling=null,r=kt.current,pt(kt,n?r&1|2:r&1),e):(Mr(e),null);case 22:case 23:return UE(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?In&1073741824&&(Mr(e),e.subtreeFlags&6&&(e.flags|=8192)):Mr(e),null;case 24:return null;case 25:return null}throw Error(se(156,e.tag))}function HF(t,e){switch(bE(e),e.tag){case 1:return mn(e.type)&&kv(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Nf(),wt(vn),wt(Hr),RE(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return PE(e),null;case 13:if(wt(kt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(se(340));Of()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return wt(kt),null;case 4:return Nf(),null;case 10:return CE(e.type._context),null;case 22:case 23:return UE(),null;case 24:return null;default:return null}}var Qy=!1,Ur=!1,GF=typeof WeakSet=="function"?WeakSet:Set,pe=null;function ou(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){jt(t,e,n)}else r.current=null}function Jb(t,e,r){try{r()}catch(n){jt(t,e,n)}}var WT=!1;function qF(t,e){if(Mb=Ev,t=Z5(),gE(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 s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,c=-1,l=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==r||s!==0&&f.nodeType!==3||(a=o+s),f!==i||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===r&&++l===s&&(a=o),d===i&&++u===n&&(c=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Db={focusedElem:t,selectionRange:r},Ev=!1,pe=e;pe!==null;)if(e=pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,pe=t;else for(;pe!==null;){e=pe;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 y=p.memoizedProps,g=p.memoizedState,m=e.stateNode,x=m.getSnapshotBeforeUpdate(e.elementType===e.type?y:Es(e.type,y),g);m.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(w){jt(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,pe=t;break}pe=e.return}return p=WT,WT=!1,p}function dh(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Jb(e,r,i)}s=s.next}while(s!==n)}}function X0(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 Xb(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 QI(t){var e=t.alternate;e!==null&&(t.alternate=null,QI(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ai],delete e[Dh],delete e[Bb],delete e[PF],delete e[RF])),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 YI(t){return t.tag===5||t.tag===3||t.tag===4}function KT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||YI(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 Zb(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=Av));else if(n!==4&&(t=t.child,t!==null))for(Zb(t,e,r),t=t.sibling;t!==null;)Zb(t,e,r),t=t.sibling}function ew(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(ew(t,e,r),t=t.sibling;t!==null;)ew(t,e,r),t=t.sibling}var mr=null,Is=!1;function Po(t,e,r){for(r=r.child;r!==null;)JI(t,e,r),r=r.sibling}function JI(t,e,r){if(yi&&typeof yi.onCommitFiberUnmount=="function")try{yi.onCommitFiberUnmount(H0,r)}catch{}switch(r.tag){case 5:Ur||ou(r,e);case 6:var n=mr,s=Is;mr=null,Po(t,e,r),mr=n,Is=s,mr!==null&&(Is?(t=mr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):mr.removeChild(r.stateNode));break;case 18:mr!==null&&(Is?(t=mr,r=r.stateNode,t.nodeType===8?Ng(t.parentNode,r):t.nodeType===1&&Ng(t,r),Ih(t)):Ng(mr,r.stateNode));break;case 4:n=mr,s=Is,mr=r.stateNode.containerInfo,Is=!0,Po(t,e,r),mr=n,Is=s;break;case 0:case 11:case 14:case 15:if(!Ur&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Jb(r,e,o),s=s.next}while(s!==n)}Po(t,e,r);break;case 1:if(!Ur&&(ou(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){jt(r,e,a)}Po(t,e,r);break;case 21:Po(t,e,r);break;case 22:r.mode&1?(Ur=(n=Ur)||r.memoizedState!==null,Po(t,e,r),Ur=n):Po(t,e,r);break;default:Po(t,e,r)}}function QT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new GF),e.forEach(function(n){var s=tU.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ms(t,e){var r=e.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=Wt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*KF(n/1960))-n,10t?16:t,la===null)var n=!1;else{if(t=la,la=null,Bv=0,Qe&6)throw Error(se(331));var s=Qe;for(Qe|=4,pe=t.current;pe!==null;){var i=pe,o=i.child;if(pe.flags&16){var a=i.deletions;if(a!==null){for(var c=0;cWt()-BE?Yc(t,0):jE|=r),gn(t,e)}function iO(t,e){e===0&&(t.mode&1?(e=Uy,Uy<<=1,!(Uy&130023424)&&(Uy=4194304)):e=1);var r=sn();t=ho(t,e),t!==null&&(Qp(t,e,r),gn(t,r))}function eU(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),iO(t,r)}function tU(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(se(314))}n!==null&&n.delete(e),iO(t,r)}var oO;oO=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||vn.current)yn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return yn=!1,$F(t,e,r);yn=!!(t.flags&131072)}else yn=!1,St&&e.flags&1048576&&uI(e,Rv,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;$1(t,e),t=e.pendingProps;var s=If(e,Hr.current);Cu(e,r),s=OE(null,e,n,t,s,r);var i=_E();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,mn(n)?(i=!0,Tv(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,kE(e),s.updater=J0,e.stateNode=s,s._reactInternals=e,Hb(e,n,t,r),e=Wb(null,e,n,!0,i,r)):(e.tag=0,St&&i&&xE(e),tn(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch($1(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=nU(n),t=Es(n,t),s){case 0:e=qb(null,e,n,t,r);break e;case 1:e=HT(null,e,n,t,r);break e;case 11:e=$T(null,e,n,t,r);break e;case 14:e=zT(null,e,n,Es(n.type,t),r);break e}throw Error(se(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),qb(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),HT(t,e,n,s,r);case 3:e:{if(zI(e),t===null)throw Error(se(387));n=e.pendingProps,i=e.memoizedState,s=i.element,vI(t,e),_v(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Mf(Error(se(423)),e),e=GT(t,e,n,r,s);break e}else if(n!==s){s=Mf(Error(se(424)),e),e=GT(t,e,n,r,s);break e}else for(Dn=ya(e.stateNode.containerInfo.firstChild),Ln=e,St=!0,_s=null,r=pI(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Of(),n===s){e=po(t,e,r);break e}tn(t,e,n,r)}e=e.child}return e;case 5:return mI(e),t===null&&Vb(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Lb(n,s)?o=null:i!==null&&Lb(n,i)&&(e.flags|=32),$I(t,e),tn(t,e,o,r),e.child;case 6:return t===null&&Vb(e),null;case 13:return HI(t,e,r);case 4:return TE(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=_f(e,null,n,r):tn(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),$T(t,e,n,s,r);case 7:return tn(t,e,e.pendingProps,r),e.child;case 8:return tn(t,e,e.pendingProps.children,r),e.child;case 12:return tn(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,pt(Iv,n._currentValue),n._currentValue=o,i!==null)if(Bs(i.value,o)){if(i.children===s.children&&!vn.current){e=po(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var c=a.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=io(-1,r&-r),c.tag=2;var l=i.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),$b(i.return,r,e),a.lanes|=r;break}c=c.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(se(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),$b(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}tn(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,Cu(e,r),s=ds(s),n=n(s),e.flags|=1,tn(t,e,n,r),e.child;case 14:return n=e.type,s=Es(n,e.pendingProps),s=Es(n.type,s),zT(t,e,n,s,r);case 15:return UI(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),$1(t,e),e.tag=1,mn(n)?(t=!0,Tv(e)):t=!1,Cu(e,r),jI(e,n,s),Hb(e,n,s,r),Wb(null,e,n,!0,t,r);case 19:return GI(t,e,r);case 22:return VI(t,e,r)}throw Error(se(156,e.tag))};function aO(t,e){return M5(t,e)}function rU(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 cs(t,e,r,n){return new rU(t,e,r,n)}function $E(t){return t=t.prototype,!(!t||!t.isReactComponent)}function nU(t){if(typeof t=="function")return $E(t)?1:0;if(t!=null){if(t=t.$$typeof,t===aE)return 11;if(t===cE)return 14}return 2}function xa(t,e){var r=t.alternate;return r===null?(r=cs(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 G1(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")$E(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Jl:return Jc(r.children,s,i,e);case oE:o=8,s|=8;break;case pb:return t=cs(12,r,e,s|2),t.elementType=pb,t.lanes=i,t;case yb:return t=cs(13,r,e,s),t.elementType=yb,t.lanes=i,t;case vb:return t=cs(19,r,e,s),t.elementType=vb,t.lanes=i,t;case m5:return em(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case y5:o=10;break e;case v5:o=9;break e;case aE:o=11;break e;case cE:o=14;break e;case Fo:o=16,n=null;break e}throw Error(se(130,t==null?t:typeof t,""))}return e=cs(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function Jc(t,e,r,n){return t=cs(7,t,n,e),t.lanes=r,t}function em(t,e,r,n){return t=cs(22,t,n,e),t.elementType=m5,t.lanes=r,t.stateNode={isHidden:!1},t}function Vg(t,e,r){return t=cs(6,t,null,e),t.lanes=r,t}function $g(t,e,r){return e=cs(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function sU(t,e,r,n,s){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=Eg(0),this.expirationTimes=Eg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Eg(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function zE(t,e,r,n,s,i,o,a,c){return t=new sU(t,e,r,a,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=cs(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},kE(i),t}function iU(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fO)}catch(t){console.error(t)}}fO(),f5.exports=zn;var Eo=f5.exports;const dO=X2(Eo),uU=X8({__proto__:null,default:dO},[Eo]);var nP=Eo;db.createRoot=nP.createRoot,db.hydrateRoot=nP.hydrateRoot;const hO=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),im=v.createContext({}),om=v.createContext(null),am=typeof document<"u",WE=am?v.useLayoutEffect:v.useEffect,pO=v.createContext({strict:!1}),KE=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),fU="framerAppearId",yO="data-"+KE(fU);function dU(t,e,r,n){const{visualElement:s}=v.useContext(im),i=v.useContext(pO),o=v.useContext(om),a=v.useContext(hO).reducedMotion,c=v.useRef();n=n||i.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:s,props:r,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;v.useInsertionEffect(()=>{l&&l.update(r,o)});const u=v.useRef(!!(r[yO]&&!window.HandoffComplete));return WE(()=>{l&&(l.render(),u.current&&l.animationState&&l.animationState.animateChanges())}),v.useEffect(()=>{l&&(l.updateFeatures(),!u.current&&l.animationState&&l.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),l}function cu(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function hU(t,e,r){return v.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):cu(r)&&(r.current=n))},[e])}function $h(t){return typeof t=="string"||Array.isArray(t)}function cm(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const QE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],YE=["initial",...QE];function lm(t){return cm(t.animate)||YE.some(e=>$h(t[e]))}function vO(t){return!!(lm(t)||t.variants)}function pU(t,e){if(lm(t)){const{initial:r,animate:n}=t;return{initial:r===!1||$h(r)?r:void 0,animate:$h(n)?n:void 0}}return t.inherit!==!1?e:{}}function yU(t){const{initial:e,animate:r}=pU(t,v.useContext(im));return v.useMemo(()=>({initial:e,animate:r}),[sP(e),sP(r)])}function sP(t){return Array.isArray(t)?t.join(" "):t}const iP={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"]},zh={};for(const t in iP)zh[t]={isEnabled:e=>iP[t].some(r=>!!e[r])};function vU(t){for(const e in t)zh[e]={...zh[e],...t[e]}}const JE=v.createContext({}),mO=v.createContext({}),mU=Symbol.for("motionComponentSymbol");function gU({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:n,Component:s}){t&&vU(t);function i(a,c){let l;const u={...v.useContext(hO),...a,layoutId:xU(a)},{isStatic:f}=u,d=yU(a),h=n(a,f);if(!f&&am){d.visualElement=dU(s,h,u,e);const p=v.useContext(mO),y=v.useContext(pO).strict;d.visualElement&&(l=d.visualElement.loadFeatures(u,y,t,p))}return v.createElement(im.Provider,{value:d},l&&d.visualElement?v.createElement(l,{visualElement:d.visualElement,...u}):null,r(s,a,hU(h,d.visualElement,c),h,f,d.visualElement))}const o=v.forwardRef(i);return o[mU]=s,o}function xU({layoutId:t}){const e=v.useContext(JE).id;return e&&t!==void 0?e+"-"+t:t}function bU(t){function e(n,s={}){return gU(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const wU=["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 XE(t){return typeof t!="string"||t.includes("-")?!1:!!(wU.indexOf(t)>-1||/[A-Z]/.test(t))}const Vv={};function EU(t){Object.assign(Vv,t)}const Zp=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Sl=new Set(Zp);function gO(t,{layout:e,layoutId:r}){return Sl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Vv[t]||t==="opacity")}const xn=t=>!!(t&&t.getVelocity),SU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},CU=Zp.length;function AU(t,{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},n,s){let i="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(t),bO=xO("--"),iw=xO("var(--"),kU=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,TU=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Pa=(t,e,r)=>Math.min(Math.max(r,t),e),Cl={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},yh={...Cl,transform:t=>Pa(0,1,t)},Xy={...Cl,default:1},vh=t=>Math.round(t*1e5)/1e5,um=/(-)?([\d]*\.?[\d])+/g,wO=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,PU=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ey(t){return typeof t=="string"}const ty=t=>({test:e=>ey(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mo=ty("deg"),mi=ty("%"),Ae=ty("px"),RU=ty("vh"),IU=ty("vw"),oP={...mi,parse:t=>mi.parse(t)/100,transform:t=>mi.transform(t*100)},aP={...Cl,transform:Math.round},EO={borderWidth:Ae,borderTopWidth:Ae,borderRightWidth:Ae,borderBottomWidth:Ae,borderLeftWidth:Ae,borderRadius:Ae,radius:Ae,borderTopLeftRadius:Ae,borderTopRightRadius:Ae,borderBottomRightRadius:Ae,borderBottomLeftRadius:Ae,width:Ae,maxWidth:Ae,height:Ae,maxHeight:Ae,size:Ae,top:Ae,right:Ae,bottom:Ae,left:Ae,padding:Ae,paddingTop:Ae,paddingRight:Ae,paddingBottom:Ae,paddingLeft:Ae,margin:Ae,marginTop:Ae,marginRight:Ae,marginBottom:Ae,marginLeft:Ae,rotate:Mo,rotateX:Mo,rotateY:Mo,rotateZ:Mo,scale:Xy,scaleX:Xy,scaleY:Xy,scaleZ:Xy,skew:Mo,skewX:Mo,skewY:Mo,distance:Ae,translateX:Ae,translateY:Ae,translateZ:Ae,x:Ae,y:Ae,z:Ae,perspective:Ae,transformPerspective:Ae,opacity:yh,originX:oP,originY:oP,originZ:Ae,zIndex:aP,fillOpacity:yh,strokeOpacity:yh,numOctaves:aP};function ZE(t,e,r,n){const{style:s,vars:i,transform:o,transformOrigin:a}=t;let c=!1,l=!1,u=!0;for(const f in e){const d=e[f];if(bO(f)){i[f]=d;continue}const h=EO[f],p=TU(d,h);if(Sl.has(f)){if(c=!0,o[f]=p,!u)continue;d!==(h.default||0)&&(u=!1)}else f.startsWith("origin")?(l=!0,a[f]=p):s[f]=p}if(e.transform||(c||n?s.transform=AU(t.transform,r,u,n):s.transform&&(s.transform="none")),l){const{originX:f="50%",originY:d="50%",originZ:h=0}=a;s.transformOrigin=`${f} ${d} ${h}`}}const eS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function SO(t,e,r){for(const n in e)!xn(e[n])&&!gO(n,r)&&(t[n]=e[n])}function OU({transformTemplate:t},e,r){return v.useMemo(()=>{const n=eS();return ZE(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function _U(t,e,r){const n=t.style||{},s={};return SO(s,n,t),Object.assign(s,OU(t,e,r)),t.transformValues?t.transformValues(s):s}function NU(t,e,r){const n={},s=_U(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const MU=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 $v(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||MU.has(t)}let CO=t=>!$v(t);function DU(t){t&&(CO=e=>e.startsWith("on")?!$v(e):t(e))}try{DU(require("@emotion/is-prop-valid").default)}catch{}function LU(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(CO(s)||r===!0&&$v(s)||!e&&!$v(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function cP(t,e,r){return typeof t=="string"?t:Ae.transform(e+r*t)}function jU(t,e,r){const n=cP(e,t.x,t.width),s=cP(r,t.y,t.height);return`${n} ${s}`}const BU={offset:"stroke-dashoffset",array:"stroke-dasharray"},FU={offset:"strokeDashoffset",array:"strokeDasharray"};function UU(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?BU:FU;t[i.offset]=Ae.transform(-n);const o=Ae.transform(e),a=Ae.transform(r);t[i.array]=`${o} ${a}`}function tS(t,{attrX:e,attrY:r,attrScale:n,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:c=0,...l},u,f,d){if(ZE(t,l,u,d),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:y}=t;h.transform&&(y&&(p.transform=h.transform),delete h.transform),y&&(s!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=jU(y,s!==void 0?s:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),r!==void 0&&(h.y=r),n!==void 0&&(h.scale=n),o!==void 0&&UU(h,o,a,c,!1)}const AO=()=>({...eS(),attrs:{}}),rS=t=>typeof t=="string"&&t.toLowerCase()==="svg";function VU(t,e,r,n){const s=v.useMemo(()=>{const i=AO();return tS(i,e,{enableHardwareAcceleration:!1},rS(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};SO(i,t.style,t),s.style={...i,...s.style}}return s}function $U(t=!1){return(r,n,s,{latestValues:i},o)=>{const c=(XE(r)?VU:NU)(n,i,o,r),u={...LU(n,typeof r=="string",t),...c,ref:s},{children:f}=n,d=v.useMemo(()=>xn(f)?f.get():f,[f]);return v.createElement(r,{...u,children:d})}}function kO(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const TO=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 PO(t,e,r,n){kO(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(TO.has(s)?s:KE(s),e.attrs[s])}function nS(t,e){const{style:r}=t,n={};for(const s in r)(xn(r[s])||e.style&&xn(e.style[s])||gO(s,t))&&(n[s]=r[s]);return n}function RO(t,e){const r=nS(t,e);for(const n in t)if(xn(t[n])||xn(e[n])){const s=Zp.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[s]=t[n]}return r}function sS(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}function IO(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const zv=t=>Array.isArray(t),zU=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),HU=t=>zv(t)?t[t.length-1]||0:t;function q1(t){const e=xn(t)?t.get():t;return zU(e)?e.toValue():e}function GU({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:qU(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const OO=t=>(e,r)=>{const n=v.useContext(im),s=v.useContext(om),i=()=>GU(t,e,n,s);return r?i():IO(i)};function qU(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=q1(i[d]);let{initial:o,animate:a}=t;const c=lm(t),l=vO(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!cm(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=sS(t,h);if(!p)return;const{transitionEnd:y,transition:g,...m}=p;for(const x in m){let b=m[x];if(Array.isArray(b)){const w=u?b.length-1:0;b=b[w]}b!==null&&(s[x]=b)}for(const x in y)s[x]=y[x]}),s}const Ut=t=>t;class lP{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 WU(t){let e=new lP,r=new lP,n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&s,d=f?e:r;return l&&o.add(c),d.add(c)&&f&&s&&(n=e.order.length),c},cancel:c=>{r.remove(c),o.delete(c)},process:c=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.clear(),n=e.order.length,n)for(let l=0;l(f[d]=WU(()=>r=!0),f),{}),o=f=>i[f].process(s),a=()=>{const f=performance.now();r=!1,s.delta=n?1e3/60:Math.max(Math.min(f-s.timestamp,KU),1),s.timestamp=f,s.isProcessing=!0,Zy.forEach(o),s.isProcessing=!1,r&&e&&(n=!1,t(a))},c=()=>{r=!0,n=!0,s.isProcessing||t(a)};return{schedule:Zy.reduce((f,d)=>{const h=i[d];return f[d]=(p,y=!1,g=!1)=>(r||c(),h.schedule(p,y,g)),f},{}),cancel:f=>Zy.forEach(d=>i[d].cancel(f)),state:s,steps:i}}const{schedule:yt,cancel:yo,state:Br,steps:zg}=QU(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0),YU={useVisualState:OO({scrapeMotionValuesFromProps:RO,createRenderState:AO,onMount:(t,e,{renderState:r,latestValues:n})=>{yt.read(()=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),yt.render(()=>{tS(r,n,{enableHardwareAcceleration:!1},rS(e.tagName),t.transformTemplate),PO(e,r)})}})},JU={useVisualState:OO({scrapeMotionValuesFromProps:nS,createRenderState:eS})};function XU(t,{forwardMotionProps:e=!1},r,n){return{...XE(t)?YU:JU,preloadedFeatures:r,useRender:$U(e),createVisualElement:n,Component:t}}function no(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}const _O=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function fm(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const ZU=t=>e=>_O(e)&&t(e,fm(e));function oo(t,e,r,n){return no(t,e,ZU(r),n)}const eV=(t,e)=>r=>e(t(r)),ba=(...t)=>t.reduce(eV);function NO(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const uP=NO("dragHorizontal"),fP=NO("dragVertical");function MO(t){let e=!1;if(t==="y")e=fP();else if(t==="x")e=uP();else{const r=uP(),n=fP();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function DO(){const t=MO(!0);return t?(t(),!1):!0}class Fa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function dP(t,e){const r="pointer"+(e?"enter":"leave"),n="onHover"+(e?"Start":"End"),s=(i,o)=>{if(i.pointerType==="touch"||DO())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[n]&&yt.update(()=>a[n](i,o))};return oo(t.current,r,s,{passive:!t.getProps()[n]})}class tV extends Fa{mount(){this.unmount=ba(dP(this.node,!0),dP(this.node,!1))}unmount(){}}class rV extends Fa{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=ba(no(this.node.current,"focus",()=>this.onFocus()),no(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const LO=(t,e)=>e?t===e?!0:LO(t,e.parentElement):!1;function Hg(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,fm(r))}class nV extends Fa{constructor(){super(...arguments),this.removeStartListeners=Ut,this.removeEndListeners=Ut,this.removeAccessibleListeners=Ut,this.startPointerPress=(e,r)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=oo(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u,globalTapTarget:f}=this.node.getProps();yt.update(()=>{!f&&!LO(this.node.current,a.target)?u&&u(a,c):l&&l(a,c)})},{passive:!(n.onTap||n.onPointerUp)}),o=oo(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ba(i,o),this.startPress(e,r)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Hg("up",(c,l)=>{const{onTap:u}=this.node.getProps();u&&yt.update(()=>u(c,l))})};this.removeEndListeners(),this.removeEndListeners=no(this.node.current,"keyup",o),Hg("down",(a,c)=>{this.startPress(a,c)})},r=no(this.node.current,"keydown",e),n=()=>{this.isPressing&&Hg("cancel",(i,o)=>this.cancelPress(i,o))},s=no(this.node.current,"blur",n);this.removeAccessibleListeners=ba(r,s)}}startPress(e,r){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&yt.update(()=>n(e,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!DO()}cancelPress(e,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&yt.update(()=>n(e,r))}mount(){const e=this.node.getProps(),r=oo(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=no(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ba(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ow=new WeakMap,Gg=new WeakMap,sV=t=>{const e=ow.get(t.target);e&&e(t)},iV=t=>{t.forEach(sV)};function oV({root:t,...e}){const r=t||document;Gg.has(r)||Gg.set(r,{});const n=Gg.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(iV,{root:t,...e})),n[s]}function aV(t,e,r){const n=oV(e);return ow.set(t,r),n.observe(t),()=>{ow.delete(t),n.unobserve(t)}}const cV={some:0,all:1};class lV extends Fa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:i}=e,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:cV[s]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=l?u:f;d&&d(c)};return aV(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(uV(e,r))&&this.startObserver()}unmount(){}}function uV({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const fV={inView:{Feature:lV},tap:{Feature:nV},focus:{Feature:rV},hover:{Feature:tV}};function jO(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 hV(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function dm(t,e,r){const n=t.getProps();return sS(n,e,r!==void 0?r:n.custom,dV(t),hV(t))}let pV=Ut,iS=Ut;const wa=t=>t*1e3,ao=t=>t/1e3,yV={current:!1},BO=t=>Array.isArray(t)&&typeof t[0]=="number";function FO(t){return!!(!t||typeof t=="string"&&UO[t]||BO(t)||Array.isArray(t)&&t.every(FO))}const Wd=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,UO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wd([0,.65,.55,1]),circOut:Wd([.55,0,1,.45]),backIn:Wd([.31,.01,.66,-.59]),backOut:Wd([.33,1.53,.69,.99])};function VO(t){if(t)return BO(t)?Wd(t):Array.isArray(t)?t.map(VO):UO[t]}function vV(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:c}={}){const l={[e]:r};c&&(l.offset=c);const u=VO(a);return Array.isArray(u)&&(l.easing=u),t.animate(l,{delay:n,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}function mV(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const $O=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,gV=1e-7,xV=12;function bV(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=$O(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>gV&&++abV(i,0,1,t,r);return i=>i===0||i===1?i:$O(s(i),e,n)}const wV=ry(.42,0,1,1),EV=ry(0,0,.58,1),zO=ry(.42,0,.58,1),SV=t=>Array.isArray(t)&&typeof t[0]!="number",HO=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,GO=t=>e=>1-t(1-e),oS=t=>1-Math.sin(Math.acos(t)),qO=GO(oS),CV=HO(oS),WO=ry(.33,1.53,.69,.99),aS=GO(WO),AV=HO(aS),kV=t=>(t*=2)<1?.5*aS(t):.5*(2-Math.pow(2,-10*(t-1))),TV={linear:Ut,easeIn:wV,easeInOut:zO,easeOut:EV,circIn:oS,circInOut:CV,circOut:qO,backIn:aS,backInOut:AV,backOut:WO,anticipate:kV},hP=t=>{if(Array.isArray(t)){iS(t.length===4);const[e,r,n,s]=t;return ry(e,r,n,s)}else if(typeof t=="string")return TV[t];return t},cS=(t,e)=>r=>!!(ey(r)&&PU.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),KO=(t,e,r)=>n=>{if(!ey(n))return n;const[s,i,o,a]=n.match(um);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},PV=t=>Pa(0,255,t),qg={...Cl,transform:t=>Math.round(PV(t))},gc={test:cS("rgb","red"),parse:KO("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+qg.transform(t)+", "+qg.transform(e)+", "+qg.transform(r)+", "+vh(yh.transform(n))+")"};function RV(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const aw={test:cS("#"),parse:RV,transform:gc.transform},lu={test:cS("hsl","hue"),parse:KO("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+mi.transform(vh(e))+", "+mi.transform(vh(r))+", "+vh(yh.transform(n))+")"},en={test:t=>gc.test(t)||aw.test(t)||lu.test(t),parse:t=>gc.test(t)?gc.parse(t):lu.test(t)?lu.parse(t):aw.parse(t),transform:t=>ey(t)?t:t.hasOwnProperty("red")?gc.transform(t):lu.transform(t)},It=(t,e,r)=>-r*t+r*e+t;function Wg(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 IV({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,c=2*r-a;s=Wg(c,a,t+1/3),i=Wg(c,a,t),o=Wg(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const Kg=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},OV=[aw,gc,lu],_V=t=>OV.find(e=>e.test(t));function pP(t){const e=_V(t);let r=e.parse(t);return e===lu&&(r=IV(r)),r}const QO=(t,e)=>{const r=pP(t),n=pP(e),s={...r};return i=>(s.red=Kg(r.red,n.red,i),s.green=Kg(r.green,n.green,i),s.blue=Kg(r.blue,n.blue,i),s.alpha=It(r.alpha,n.alpha,i),gc.transform(s))};function NV(t){var e,r;return isNaN(t)&&ey(t)&&(((e=t.match(um))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(wO))===null||r===void 0?void 0:r.length)||0)>0}const YO={regex:kU,countKey:"Vars",token:"${v}",parse:Ut},JO={regex:wO,countKey:"Colors",token:"${c}",parse:en.parse},XO={regex:um,countKey:"Numbers",token:"${n}",parse:Cl.parse};function Qg(t,{regex:e,countKey:r,token:n,parse:s}){const i=t.tokenised.match(e);i&&(t["num"+r]=i.length,t.tokenised=t.tokenised.replace(e,n),t.values.push(...i.map(s)))}function Hv(t){const e=t.toString(),r={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&Qg(r,YO),Qg(r,JO),Qg(r,XO),r}function ZO(t){return Hv(t).values}function e6(t){const{values:e,numColors:r,numVars:n,tokenised:s}=Hv(t),i=e.length;return o=>{let a=s;for(let c=0;ctypeof t=="number"?0:t;function DV(t){const e=ZO(t);return e6(t)(e.map(MV))}const Ra={test:NV,parse:ZO,createTransformer:e6,getAnimatableNone:DV},t6=(t,e)=>r=>`${r>0?e:t}`;function r6(t,e){return typeof t=="number"?r=>It(t,e,r):en.test(t)?QO(t,e):t.startsWith("var(")?t6(t,e):s6(t,e)}const n6=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>r6(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=r6(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},s6=(t,e)=>{const r=Ra.createTransformer(e),n=Hv(t),s=Hv(e);return n.numVars===s.numVars&&n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?ba(n6(n.values,s.values),r):t6(t,e)},Hh=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},yP=(t,e)=>r=>It(t,e,r);function jV(t){return typeof t=="number"?yP:typeof t=="string"?en.test(t)?QO:s6:Array.isArray(t)?n6:typeof t=="object"?LV:yP}function BV(t,e,r){const n=[],s=r||jV(t[0]),i=t.length-1;for(let o=0;oe[0];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=BV(e,n,s),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(Pa(t[0],t[i-1],l)):c}function FV(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const s=Hh(0,e,n);t.push(It(r,1,s))}}function UV(t){const e=[0];return FV(e,t.length-1),e}function VV(t,e){return t.map(r=>r*e)}function $V(t,e){return t.map(()=>e||zO).splice(0,t.length-1)}function Gv({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){const s=SV(n)?n.map(hP):hP(n),i={done:!1,value:e[0]},o=VV(r&&r.length===e.length?r:UV(e),t),a=i6(o,e,{ease:Array.isArray(s)?s:$V(e,s)});return{calculatedDuration:t,next:c=>(i.value=a(c),i.done=c>=t,i)}}function o6(t,e){return e?t*(1e3/e):0}const zV=5;function a6(t,e,r){const n=Math.max(e-zV,0);return o6(r-t(n),e-n)}const Yg=.001,HV=.01,vP=10,GV=.05,qV=1;function WV({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;pV(t<=wa(vP));let o=1-e;o=Pa(GV,qV,o),t=Pa(HV,vP,ao(t)),o<1?(s=l=>{const u=l*o,f=u*t,d=u-r,h=cw(l,o),p=Math.exp(-f);return Yg-d/h*p},i=l=>{const f=l*o*t,d=f*r+r,h=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),y=cw(Math.pow(l,2),o);return(-s(l)+Yg>0?-1:1)*((d-h)*p)/y}):(s=l=>{const u=Math.exp(-l*t),f=(l-r)*t+1;return-Yg+u*f},i=l=>{const u=Math.exp(-l*t),f=(r-l)*(t*t);return u*f});const a=5/t,c=QV(s,i,a);if(t=wa(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const KV=12;function QV(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function XV(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!mP(t,JV)&&mP(t,YV)){const r=WV(t);e={...e,...r,mass:1},e.isResolvedFromDuration=!0}return e}function c6({keyframes:t,restDelta:e,restSpeed:r,...n}){const s=t[0],i=t[t.length-1],o={done:!1,value:s},{stiffness:a,damping:c,mass:l,duration:u,velocity:f,isResolvedFromDuration:d}=XV({...n,velocity:-ao(n.velocity||0)}),h=f||0,p=c/(2*Math.sqrt(a*l)),y=i-s,g=ao(Math.sqrt(a/l)),m=Math.abs(y)<5;r||(r=m?.01:2),e||(e=m?.005:.5);let x;if(p<1){const b=cw(g,p);x=w=>{const A=Math.exp(-p*g*w);return i-A*((h+p*g*y)/b*Math.sin(b*w)+y*Math.cos(b*w))}}else if(p===1)x=b=>i-Math.exp(-g*b)*(y+(h+g*y)*b);else{const b=g*Math.sqrt(p*p-1);x=w=>{const A=Math.exp(-p*g*w),O=Math.min(b*w,300);return i-A*((h+p*g*y)*Math.sinh(O)+b*y*Math.cosh(O))/b}}return{calculatedDuration:d&&u||null,next:b=>{const w=x(b);if(d)o.done=b>=u;else{let A=h;b!==0&&(p<1?A=a6(x,b,w):A=0);const O=Math.abs(A)<=r,_=Math.abs(i-w)<=e;o.done=O&&_}return o.value=o.done?i:w,o}}}function gP({keyframes:t,velocity:e=0,power:r=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=C=>a!==void 0&&Cc,p=C=>a===void 0?c:c===void 0||Math.abs(a-C)-y*Math.exp(-C/n),b=C=>m+x(C),w=C=>{const j=x(C),V=b(C);d.done=Math.abs(j)<=l,d.value=d.done?m:V};let A,O;const _=C=>{h(d.value)&&(A=C,O=c6({keyframes:[d.value,p(d.value)],velocity:a6(b,C,d.value),damping:s,stiffness:i,restDelta:l,restSpeed:u}))};return _(0),{calculatedDuration:null,next:C=>{let j=!1;return!O&&A===void 0&&(j=!0,w(C),_(C)),A!==void 0&&C>A?O.next(C-A):(!j&&w(C),d)}}}const ZV=t=>{const e=({timestamp:r})=>t(r);return{start:()=>yt.update(e,!0),stop:()=>yo(e),now:()=>Br.isProcessing?Br.timestamp:performance.now()}},xP=2e4;function bP(t){let e=0;const r=50;let n=t.next(e);for(;!n.done&&e=xP?1/0:e}const e$={decay:gP,inertia:gP,tween:Gv,keyframes:Gv,spring:c6};function qv({autoplay:t=!0,delay:e=0,driver:r=ZV,keyframes:n,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",onPlay:c,onStop:l,onComplete:u,onUpdate:f,...d}){let h=1,p=!1,y,g;const m=()=>{g=new Promise(F=>{y=F})};m();let x;const b=e$[s]||Gv;let w;b!==Gv&&typeof n[0]!="number"&&(w=i6([0,100],n,{clamp:!1}),n=[0,100]);const A=b({...d,keyframes:n});let O;a==="mirror"&&(O=b({...d,keyframes:[...n].reverse(),velocity:-(d.velocity||0)}));let _="idle",C=null,j=null,V=null;A.calculatedDuration===null&&i&&(A.calculatedDuration=bP(A));const{calculatedDuration:B}=A;let $=1/0,Y=1/0;B!==null&&($=B+o,Y=$*(i+1)-o);let H=0;const L=F=>{if(j===null)return;h>0&&(j=Math.min(j,F)),h<0&&(j=Math.min(F-Y/h,j)),C!==null?H=C:H=Math.round(F-j)*h;const X=H-e*(h>=0?1:-1),oe=h>=0?X<0:X>Y;H=Math.max(X,0),_==="finished"&&C===null&&(H=Y);let ae=H,ke=A;if(i){const Be=Math.min(H,Y)/$;let Te=Math.floor(Be),De=Be%1;!De&&Be>=1&&(De=1),De===1&&Te--,Te=Math.min(Te,i+1),!!(Te%2)&&(a==="reverse"?(De=1-De,o&&(De-=o/$)):a==="mirror"&&(ke=O)),ae=Pa(0,1,De)*$}const ve=oe?{done:!1,value:n[0]}:ke.next(ae);w&&(ve.value=w(ve.value));let{done:ie}=ve;!oe&&B!==null&&(ie=h>=0?H>=Y:H<=0);const Me=C===null&&(_==="finished"||_==="running"&&ie);return f&&f(ve.value),Me&&R(),ve},T=()=>{x&&x.stop(),x=void 0},P=()=>{_="idle",T(),y(),m(),j=V=null},R=()=>{_="finished",u&&u(),T(),y()},I=()=>{if(p)return;x||(x=r(L));const F=x.now();c&&c(),C!==null?j=F-C:(!j||_==="finished")&&(j=F),_==="finished"&&m(),V=j,C=null,_="running",x.start()};t&&I();const U={then(F,X){return g.then(F,X)},get time(){return ao(H)},set time(F){F=wa(F),H=F,C!==null||!x||h===0?C=F:j=x.now()-F/h},get duration(){const F=A.calculatedDuration===null?bP(A):A.calculatedDuration;return ao(F)},get speed(){return h},set speed(F){F===h||!x||(h=F,U.time=ao(H))},get state(){return _},play:I,pause:()=>{_="paused",C=H},stop:()=>{p=!0,_!=="idle"&&(_="idle",l&&l(),P())},cancel:()=>{V!==null&&L(V),P()},complete:()=>{_="finished"},sample:F=>(j=0,L(F))};return U}function t$(t){let e;return()=>(e===void 0&&(e=t()),e)}const r$=t$(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),n$=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),e1=10,s$=2e4,i$=(t,e)=>e.type==="spring"||t==="backgroundColor"||!FO(e.ease);function o$(t,e,{onUpdate:r,onComplete:n,...s}){if(!(r$()&&n$.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0&&s.type!=="inertia"))return!1;let o=!1,a,c,l=!1;const u=()=>{c=new Promise(b=>{a=b})};u();let{keyframes:f,duration:d=300,ease:h,times:p}=s;if(i$(e,s)){const b=qv({...s,repeat:0,delay:0});let w={done:!1,value:f[0]};const A=[];let O=0;for(;!w.done&&O{l=!1,y.cancel()},m=()=>{l=!0,yt.update(g),a(),u()};return y.onfinish=()=>{l||(t.set(mV(f,s)),n&&n(),m())},{then(b,w){return c.then(b,w)},attachTimeline(b){return y.timeline=b,y.onfinish=null,Ut},get time(){return ao(y.currentTime||0)},set time(b){y.currentTime=wa(b)},get speed(){return y.playbackRate},set speed(b){y.playbackRate=b},get duration(){return ao(d)},play:()=>{o||(y.play(),yo(g))},pause:()=>y.pause(),stop:()=>{if(o=!0,y.playState==="idle")return;const{currentTime:b}=y;if(b){const w=qv({...s,autoplay:!1});t.setWithVelocity(w.sample(b-e1).value,w.sample(b).value,e1)}m()},complete:()=>{l||y.finish()},cancel:m}}function a$({keyframes:t,delay:e,onUpdate:r,onComplete:n}){const s=()=>(r&&r(t[t.length-1]),n&&n(),{time:0,speed:1,duration:0,play:Ut,pause:Ut,stop:Ut,then:i=>(i(),Promise.resolve()),cancel:Ut,complete:Ut});return e?qv({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}const c$={type:"spring",stiffness:500,damping:25,restSpeed:10},l$=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),u$={type:"keyframes",duration:.8},f$={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},d$=(t,{keyframes:e})=>e.length>2?u$:Sl.has(t)?t.startsWith("scale")?l$(e[1]):c$:f$,lw=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ra.test(e)||e==="0")&&!e.startsWith("url(")),h$=new Set(["brightness","contrast","saturate","opacity"]);function p$(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(um)||[];if(!n)return t;const s=r.replace(n,"");let i=h$.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const y$=/([a-z-]*)\(.*?\)/g,uw={...Ra,getAnimatableNone:t=>{const e=t.match(y$);return e?e.map(p$).join(" "):t}},v$={...EO,color:en,backgroundColor:en,outlineColor:en,fill:en,stroke:en,borderColor:en,borderTopColor:en,borderRightColor:en,borderBottomColor:en,borderLeftColor:en,filter:uw,WebkitFilter:uw},lS=t=>v$[t];function l6(t,e){let r=lS(t);return r!==uw&&(r=Ra),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const u6=t=>/^0[^.\s]+$/.test(t);function m$(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||u6(t)}function g$(t,e,r,n){const s=lw(e,r);let i;Array.isArray(r)?i=[...r]:i=[null,r];const o=n.from!==void 0?n.from:t.get();let a;const c=[];for(let l=0;ls=>{const i=uS(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-wa(o);const c=g$(e,t,r,i),l=c[0],u=c[c.length-1],f=lw(t,l),d=lw(t,u);let h={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:p=>{e.set(p),i.onUpdate&&i.onUpdate(p)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(x$(i)||(h={...h,...d$(t,h)}),h.duration&&(h.duration=wa(h.duration)),h.repeatDelay&&(h.repeatDelay=wa(h.repeatDelay)),!f||!d||yV.current||i.type===!1||b$.skipAnimations)return a$(h);if(!n.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=o$(e,t,h);if(p)return p}return qv(h)};function Wv(t){return!!(xn(t)&&t.add)}const f6=t=>/^\-?\d*\.?\d+$/.test(t);function dS(t,e){t.indexOf(e)===-1&&t.push(e)}function hS(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class pS{constructor(){this.subscriptions=[]}add(e){return dS(this.subscriptions,e),()=>hS(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));class E${constructor(e,r={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=Br;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,yt.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()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>yt.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=w$(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new pS);const n=this.events[e].add(r);return e==="change"?()=>{n(),yt.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?o6(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 Lf(t,e){return new E$(t,e)}const d6=t=>e=>e.test(t),S$={test:t=>t==="auto",parse:t=>t},h6=[Cl,Ae,mi,Mo,IU,RU,S$],Od=t=>h6.find(d6(t)),C$=[...h6,en,Ra],A$=t=>C$.find(d6(t));function k$(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Lf(r))}function T$(t,e){const r=dm(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=HU(i[o]);k$(t,o,a)}}function P$(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;ac.remove(f))),l.push(g)}return o&&Promise.all(l).then(()=>{o&&T$(t,o)}),l}function fw(t,e,r={}){const n=dm(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const i=n?()=>Promise.all(p6(t,n,r)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=s;return N$(t,e,l+c,u,f,r)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,l]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>l())}else return Promise.all([i(),o(r.delay)])}function N$(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,c=s===1?(l=0)=>l*n:(l=0)=>a-l*n;return Array.from(t.variantChildren).sort(M$).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(fw(l,e,{...i,delay:r+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function M$(t,e){return t.sortNodePosition(e)}function D$(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>fw(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=fw(t,e,r);else{const s=typeof e=="function"?dm(t,e,r.custom):e;n=Promise.all(p6(t,s,r))}return n.then(()=>t.notify("AnimationComplete",e))}const L$=[...QE].reverse(),j$=QE.length;function B$(t){return e=>Promise.all(e.map(({animation:r,options:n})=>D$(t,r,n)))}function F$(t){let e=B$(t);const r=V$();let n=!0;const s=(c,l)=>{const u=dm(t,l);if(u){const{transition:f,transitionEnd:d,...h}=u;c={...c,...h,...d}}return c};function i(c){e=c(t)}function o(c,l){const u=t.getProps(),f=t.getVariantContext(!0)||{},d=[],h=new Set;let p={},y=1/0;for(let m=0;my&&A,V=!1;const B=Array.isArray(w)?w:[w];let $=B.reduce(s,{});O===!1&&($={});const{prevResolvedValues:Y={}}=b,H={...Y,...$},L=T=>{j=!0,h.has(T)&&(V=!0,h.delete(T)),b.needsAnimating[T]=!0};for(const T in H){const P=$[T],R=Y[T];if(p.hasOwnProperty(T))continue;let I=!1;zv(P)&&zv(R)?I=!jO(P,R):I=P!==R,I?P!==void 0?L(T):h.add(T):P!==void 0&&h.has(T)?L(T):b.protectedKeys[T]=!0}b.prevProp=w,b.prevResolvedValues=$,b.isActive&&(p={...p,...$}),n&&t.blockInitialAnimation&&(j=!1),j&&(!_||V)&&d.push(...B.map(T=>({animation:T,options:{type:x,...c}})))}if(h.size){const m={};h.forEach(x=>{const b=t.getBaseTarget(x);b!==void 0&&(m[x]=b)}),d.push({animation:m})}let g=!!d.length;return n&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(d):Promise.resolve()}function a(c,l,u){var f;if(r[c].isActive===l)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,l)}),r[c].isActive=l;const d=o(u,c);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function U$(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!jO(e,t):!1}function Ja(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function V$(){return{animate:Ja(!0),whileInView:Ja(),whileHover:Ja(),whileTap:Ja(),whileDrag:Ja(),whileFocus:Ja(),exit:Ja()}}class $$ extends Fa{constructor(e){super(e),e.animationState||(e.animationState=F$(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),cm(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 z$=0;class H$ extends Fa{constructor(){super(...arguments),this.id=z$++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e,{custom:n??this.node.getProps().custom});r&&!e&&i.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const G$={animation:{Feature:$$},exit:{Feature:H$}},wP=(t,e)=>Math.abs(t-e);function q$(t,e){const r=wP(t.x,e.x),n=wP(t.y,e.y);return Math.sqrt(r**2+n**2)}class y6{constructor(e,r,{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:i=!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 f=Xg(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=q$(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:y}=Br;this.history.push({...p,timestamp:y});const{onStart:g,onMove:m}=this.handlers;d||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Jg(d,this.transformPagePoint),yt.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Xg(f.type==="pointercancel"?this.lastMoveEventInfo:Jg(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,g),p&&p(f,g)},!_O(e))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.contextWindow=s||window;const o=fm(e),a=Jg(o,this.transformPagePoint),{point:c}=a,{timestamp:l}=Br;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=r;u&&u(e,Xg(a,this.history)),this.removeListeners=ba(oo(this.contextWindow,"pointermove",this.handlePointerMove),oo(this.contextWindow,"pointerup",this.handlePointerUp),oo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),yo(this.updatePoint)}}function Jg(t,e){return e?{point:e(t.point)}:t}function EP(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Xg({point:t},e){return{point:t,delta:EP(t,v6(e)),offset:EP(t,W$(e)),velocity:K$(e,.1)}}function W$(t){return t[0]}function v6(t){return t[t.length-1]}function K$(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=v6(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>wa(e)));)r--;if(!n)return{x:0,y:0};const i=ao(s.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Un(t){return t.max-t.min}function dw(t,e=0,r=.01){return Math.abs(t-e)<=r}function SP(t,e,r,n=.5){t.origin=n,t.originPoint=It(e.min,e.max,t.origin),t.scale=Un(r)/Un(e),(dw(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=It(r.min,r.max,t.origin)-t.originPoint,(dw(t.translate)||isNaN(t.translate))&&(t.translate=0)}function mh(t,e,r,n){SP(t.x,e.x,r.x,n?n.originX:void 0),SP(t.y,e.y,r.y,n?n.originY:void 0)}function CP(t,e,r){t.min=r.min+e.min,t.max=t.min+Un(e)}function Q$(t,e,r){CP(t.x,e.x,r.x),CP(t.y,e.y,r.y)}function AP(t,e,r){t.min=e.min-r.min,t.max=t.min+Un(e)}function gh(t,e,r){AP(t.x,e.x,r.x),AP(t.y,e.y,r.y)}function Y$(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?It(r,t,n.max):Math.min(t,r)),t}function kP(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 J$(t,{top:e,left:r,bottom:n,right:s}){return{x:kP(t.x,r,s),y:kP(t.y,e,n)}}function TP(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Hh(e.min,e.max-n,t.min):n>s&&(r=Hh(t.min,t.max-s,e.min)),Pa(0,1,r)}function ez(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 hw=.35;function tz(t=hw){return t===!1?t=0:t===!0&&(t=hw),{x:PP(t,"left","right"),y:PP(t,"top","bottom")}}function PP(t,e,r){return{min:RP(t,e),max:RP(t,r)}}function RP(t,e){return typeof t=="number"?t:t[e]||0}const IP=()=>({translate:0,scale:1,origin:0,originPoint:0}),uu=()=>({x:IP(),y:IP()}),OP=()=>({min:0,max:0}),Zt=()=>({x:OP(),y:OP()});function Jn(t){return[t("x"),t("y")]}function m6({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function rz({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function nz(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 Zg(t){return t===void 0||t===1}function pw({scale:t,scaleX:e,scaleY:r}){return!Zg(t)||!Zg(e)||!Zg(r)}function rc(t){return pw(t)||g6(t)||t.z||t.rotate||t.rotateX||t.rotateY}function g6(t){return _P(t.x)||_P(t.y)}function _P(t){return t&&t!=="0%"}function Kv(t,e,r){const n=t-r,s=e*n;return r+s}function NP(t,e,r,n,s){return s!==void 0&&(t=Kv(t,s,n)),Kv(t,r,n)+e}function yw(t,e=0,r=1,n,s){t.min=NP(t.min,e,r,n,s),t.max=NP(t.max,e,r,n,s)}function x6(t,{x:e,y:r}){yw(t.x,e.translate,e.scale,e.originPoint),yw(t.y,r.translate,r.scale,r.originPoint)}function sz(t,e,r,n=!1){const s=r.length;if(!s)return;e.x=e.y=1;let i,o;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function Vo(t,e){t.min=t.min+e,t.max=t.max+e}function DP(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=It(t.min,t.max,i);yw(t,e[r],e[n],o,e.scale)}const iz=["x","scaleX","originX"],oz=["y","scaleY","originY"];function fu(t,e){DP(t.x,e,iz),DP(t.y,e,oz)}function b6(t,e){return m6(nz(t.getBoundingClientRect(),e))}function az(t,e,r){const n=b6(t,r),{scroll:s}=e;return s&&(Vo(n.x,s.offset.x),Vo(n.y,s.offset.y)),n}const w6=({current:t})=>t?t.ownerDocument.defaultView:null,cz=new WeakMap;class lz{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=Zt(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(fm(u,"page").point)},i=(u,f)=>{const{drag:d,dragPropagation:h,onDragStart:p}=this.getProps();if(d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=MO(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),Jn(g=>{let m=this.getAxisMotionValue(g).get()||0;if(mi.test(m)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[g];b&&(m=Un(b)*(parseFloat(m)/100))}}this.originPoint[g]=m}),p&&yt.update(()=>p(u,f),!1,!0);const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(u,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:y}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:g}=f;if(h&&this.currentDirection===null){this.currentDirection=uz(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&y(u,f)},a=(u,f)=>this.stop(u,f),c=()=>Jn(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new y6(e,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:w6(this.visualElement)})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&yt.update(()=>i(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:s}=this.getProps();if(!n||!t1(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=Y$(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:r,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;r&&cu(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&s?this.constraints=J$(s.layoutBox,r):this.constraints=!1,this.elastic=tz(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Jn(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=ez(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!cu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=az(n,s.root,this.visualElement.getTransformPagePoint());let o=X$(s.layout.layoutBox,i);if(r){const a=r(rz(o));this.hasMutatedConstraints=!!a,a&&(o=m6(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Jn(u=>{if(!t1(u,r,this.currentDirection))return;let f=c&&c[u]||{};o&&(f={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,p={type:"inertia",velocity:n?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(fS(e,n,0,r))}stopAnimation(){Jn(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Jn(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(),s=n[r];return s||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Jn(r=>{const{drag:n}=this.getProps();if(!t1(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-It(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!cu(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Jn(o=>{const a=this.getAxisMotionValue(o);if(a){const c=a.get();s[o]=Z$({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Jn(o=>{if(!t1(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(It(c,l,s[o]))})}addListeners(){if(!this.visualElement.current)return;cz.set(this.visualElement,this);const e=this.visualElement.current,r=oo(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();cu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),n();const o=no(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(Jn(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),r(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=hw,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function t1(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function uz(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class fz extends Fa{constructor(e){super(e),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new lz(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const LP=t=>(e,r)=>{t&&yt.update(()=>t(e,r))};class dz extends Fa{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(e){this.session=new y6(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:w6(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:LP(e),onStart:LP(r),onMove:n,onEnd:(i,o)=>{delete this.session,s&&yt.update(()=>s(i,o))}}}mount(){this.removePointerDownListener=oo(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 hz(){const t=v.useContext(om);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=v.useId();return v.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}const W1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function jP(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const _d={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ae.test(t))t=parseFloat(t);else return t;const r=jP(t,e.target.x),n=jP(t,e.target.y);return`${r}% ${n}%`}},pz={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=Ra.parse(t);if(s.length>5)return n;const i=Ra.createTransformer(t),o=typeof s[0]!="number"?1:0,a=r.x.scale*e.x,c=r.y.scale*e.y;s[0+o]/=a,s[1+o]/=c;const l=It(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),i(s)}};class yz extends cr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;EU(vz),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),W1.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||yt.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:s}=e;s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function E6(t){const[e,r]=hz(),n=v.useContext(JE);return cr.createElement(yz,{...t,layoutGroup:n,switchLayoutGroup:v.useContext(mO),isPresent:e,safeToRemove:r})}const vz={borderRadius:{..._d,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_d,borderTopRightRadius:_d,borderBottomLeftRadius:_d,borderBottomRightRadius:_d,boxShadow:pz},S6=["TopLeft","TopRight","BottomLeft","BottomRight"],mz=S6.length,BP=t=>typeof t=="string"?parseFloat(t):t,FP=t=>typeof t=="number"||Ae.test(t);function gz(t,e,r,n,s,i){s?(t.opacity=It(0,r.opacity!==void 0?r.opacity:1,xz(n)),t.opacityExit=It(e.opacity!==void 0?e.opacity:1,0,bz(n))):i&&(t.opacity=It(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Hh(t,e,n))}function VP(t,e){t.min=e.min,t.max=e.max}function Gn(t,e){VP(t.x,e.x),VP(t.y,e.y)}function $P(t,e,r,n,s){return t-=e,t=Kv(t,1/r,n),s!==void 0&&(t=Kv(t,1/s,n)),t}function wz(t,e=0,r=1,n=.5,s,i=t,o=t){if(mi.test(e)&&(e=parseFloat(e),e=It(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=It(i.min,i.max,n);t===i&&(a-=e),t.min=$P(t.min,e,r,a,s),t.max=$P(t.max,e,r,a,s)}function zP(t,e,[r,n,s],i,o){wz(t,e[r],e[n],e[s],e.scale,i,o)}const Ez=["x","scaleX","originX"],Sz=["y","scaleY","originY"];function HP(t,e,r,n){zP(t.x,e,Ez,r?r.x:void 0,n?n.x:void 0),zP(t.y,e,Sz,r?r.y:void 0,n?n.y:void 0)}function GP(t){return t.translate===0&&t.scale===1}function A6(t){return GP(t.x)&&GP(t.y)}function Cz(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 k6(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 qP(t){return Un(t.x)/Un(t.y)}class Az{constructor(){this.members=[]}add(e){dS(this.members,e),e.scheduleRender()}remove(e){if(hS(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(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;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:s}=e.options;s===!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 WP(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:c,rotateX:l,rotateY:u}=r;c&&(n+=`rotate(${c}deg) `),l&&(n+=`rotateX(${l}deg) `),u&&(n+=`rotateY(${u}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 kz=(t,e)=>t.depth-e.depth;class Tz{constructor(){this.children=[],this.isDirty=!1}add(e){dS(this.children,e),this.isDirty=!0}remove(e){hS(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(kz),this.isDirty=!1,this.children.forEach(e)}}function Pz(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(yo(n),t(i-e))};return yt.read(n,!0),()=>yo(n)}function Rz(t){window.MotionDebug&&window.MotionDebug.record(t)}function Iz(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Oz(t,e,r){const n=xn(t)?t:Lf(t);return n.start(fS("",n,e,r)),n.animation}const KP=["","X","Y","Z"],_z={visibility:"hidden"},QP=1e3;let Nz=0;const nc={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function T6({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Nz++,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,nc.totalNodes=nc.resolvedTargetDeltas=nc.recalculatedProjection=0,this.nodes.forEach(Lz),this.nodes.forEach(Vz),this.nodes.forEach($z),this.nodes.forEach(jz),Rz(nc)},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 c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Pz(d,250),W1.hasAnimatedSinceResize&&(W1.hasAnimatedSinceResize=!1,this.nodes.forEach(JP))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||Wz,{onLayoutAnimationStart:g,onLayoutAnimationComplete:m}=u.getProps(),x=!this.targetLayout||!k6(this.targetLayout,p)||h,b=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||d&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,b);const w={...uS(y,"layout"),onPlay:g,onComplete:m};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||JP(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,yo(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(zz),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 u=0;uthis.update()))}clearAllSnapshots(){this.nodes.forEach(Bz),this.sharedNodes.forEach(Hz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,yt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){yt.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 c=0;c{const A=w/1e3;XP(f.x,o.x,A),XP(f.y,o.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gh(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gz(this.relativeTarget,this.relativeTargetOrigin,d,A),b&&Cz(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Zt()),Gn(b,this.relativeTarget)),y&&(this.animationValues=u,gz(u,l,this.latestValues,A,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},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&&(yo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=yt.update(()=>{W1.hasAnimatedSinceResize=!0,this.currentAnimation=Oz(0,QP,{...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(QP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&P6(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Zt();const f=Un(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const d=Un(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+d}Gn(a,c),fu(a,u),mh(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Az),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.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:c}={}){const l=this.getStack();l&&l.promote(this,c),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:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(YP),this.root.sharedNodes.clear()}}}function Mz(t){t.updateLayout()}function Dz(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:s}=t.layout,{animationType:i}=t.options,o=r.source!==t.layout.source;i==="size"?Jn(f=>{const d=o?r.measuredBox[f]:r.layoutBox[f],h=Un(d);d.min=n[f].min,d.max=d.min+h}):P6(i,r.layoutBox,n)&&Jn(f=>{const d=o?r.measuredBox[f]:r.layoutBox[f],h=Un(n[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=uu();mh(a,n,r.layoutBox);const c=uu();o?mh(c,t.applyTransform(s,!0),r.measuredBox):mh(c,n,r.layoutBox);const l=!A6(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=Zt();gh(p,r.layoutBox,d.layoutBox);const y=Zt();gh(y,n,h.layoutBox),k6(p,y)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Lz(t){nc.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 jz(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Bz(t){t.clearSnapshot()}function YP(t){t.clearMeasurements()}function Fz(t){t.isLayoutDirty=!1}function Uz(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function JP(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Vz(t){t.resolveTargetDelta()}function $z(t){t.calcProjection()}function zz(t){t.resetRotation()}function Hz(t){t.removeLeadSnapshot()}function XP(t,e,r){t.translate=It(e.translate,0,r),t.scale=It(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function ZP(t,e,r,n){t.min=It(e.min,r.min,n),t.max=It(e.max,r.max,n)}function Gz(t,e,r,n){ZP(t.x,e.x,r.x,n),ZP(t.y,e.y,r.y,n)}function qz(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Wz={duration:.45,ease:[.4,0,.1,1]},eR=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),tR=eR("applewebkit/")&&!eR("chrome/")?Math.round:Ut;function rR(t){t.min=tR(t.min),t.max=tR(t.max)}function Kz(t){rR(t.x),rR(t.y)}function P6(t,e,r){return t==="position"||t==="preserve-aspect"&&!dw(qP(e),qP(r),.2)}const Qz=T6({attachResizeListener:(t,e)=>no(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ex={current:void 0},R6=T6({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ex.current){const t=new Qz({});t.mount(window),t.setOptions({layoutScroll:!0}),ex.current=t}return ex.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Yz={pan:{Feature:dz},drag:{Feature:fz,ProjectionNode:R6,MeasureLayout:E6}},Jz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Xz(t){const e=Jz.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function vw(t,e,r=1){const[n,s]=Xz(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);if(i){const o=i.trim();return f6(o)?parseFloat(o):o}else return iw(s)?vw(s,e,r+1):s}function Zz(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!iw(i))return;const o=vw(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!iw(i))continue;const o=vw(i,n);o&&(e[s]=o,r||(r={}),r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const eH=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),I6=t=>eH.has(t),tH=t=>Object.keys(t).some(I6),nR=t=>t===Cl||t===Ae,sR=(t,e)=>parseFloat(t.split(", ")[e]),iR=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return sR(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?sR(i[1],t):0}},rH=new Set(["x","y","z"]),nH=Zp.filter(t=>!rH.has(t));function sH(t){const e=[];return nH.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 jf={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:iR(4,13),y:iR(5,14)};jf.translateX=jf.x;jf.translateY=jf.y;const iH=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(l=>{a[l]=jf[l](n,i)}),e.render();const c=e.measureViewportBox();return r.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=jf[l](c,i)}),t},oH=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(I6);let i=[],o=!1;const a=[];if(s.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=r[c],f=Od(u);const d=e[c];let h;if(zv(d)){const p=d.length,y=d[0]===null?1:0;u=d[y],f=Od(u);for(let g=y;g=0?window.pageYOffset:null,l=iH(e,t,a);return i.length&&i.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),am&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function aH(t,e,r,n){return tH(e)?oH(t,e,r,n):{target:e,transitionEnd:n}}const cH=(t,e,r,n)=>{const s=Zz(t,e,n);return e=s.target,n=s.transitionEnd,aH(t,e,r,n)},mw={current:null},O6={current:!1};function lH(){if(O6.current=!0,!!am)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>mw.current=t.matches;t.addListener(e),e()}else mw.current=!1}function uH(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(xn(i))t.addValue(s,i),Wv(n)&&n.add(s);else if(xn(o))t.addValue(s,Lf(i,{owner:t})),Wv(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,Lf(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const oR=new WeakMap,_6=Object.keys(zh),fH=_6.length,aR=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],dH=YE.length;class hH{constructor({parent:e,props:r,presenceContext:n,reducedMotionConfig:s,visualState:i},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=()=>yt.render(this.render,!1,!0);const{latestValues:a,renderState:c}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=r.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=r,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=lm(r),this.isVariantNode=vO(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(r,{});for(const f in u){const d=u[f];a[f]!==void 0&&xn(d)&&(d.set(a[f],!1),Wv(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){this.current=e,oR.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)),O6.current||lH(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:mw.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){oR.delete(this.current),this.projection&&this.projection.unmount(),yo(this.notifyUpdate),yo(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=Sl.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&yt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i){let o,a;for(let c=0;cthis.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,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):Zt()}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=Lf(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,s=typeof n=="string"||typeof n=="object"?(r=sS(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!xn(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new pS),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class N6 extends hH{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:s},i){let o=I$(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){P$(this,n,o);const a=cH(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function pH(t){return window.getComputedStyle(t)}class yH extends N6{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,r){if(Sl.has(r)){const n=lS(r);return n&&n.default||0}else{const n=pH(e),s=(bO(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return b6(e,r)}build(e,r,n,s){ZE(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return nS(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;xn(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){kO(e,r,n,s)}}class vH extends N6{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Sl.has(r)){const n=lS(r);return n&&n.default||0}return r=TO.has(r)?r:KE(r),e.getAttribute(r)}measureInstanceViewportBox(){return Zt()}scrapeMotionValuesFromProps(e,r){return RO(e,r)}build(e,r,n,s){tS(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){PO(e,r,n,s)}mount(e){this.isSVGTag=rS(e.tagName),super.mount(e)}}const mH=(t,e)=>XE(t)?new vH(e,{enableHardwareAcceleration:!1}):new yH(e,{enableHardwareAcceleration:!0}),gH={layout:{ProjectionNode:R6,MeasureLayout:E6}},xH={...G$,...fV,...Yz,...gH},Xc=bU((t,e)=>XU(t,e,xH,mH));function M6(){const t=v.useRef(!1);return WE(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function bH(){const t=M6(),[e,r]=v.useState(0),n=v.useCallback(()=>{t.current&&r(e+1)},[e]);return[v.useCallback(()=>yt.postRender(n),[n]),e]}class wH extends v.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 EH({children:t,isPresent:e}){const r=v.useId(),n=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0});return v.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:c}=s.current;if(e||!n.current||!i||!o)return;n.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${i}px !important; @@ -45,12 +45,12 @@ Error generating stack: `+i.message+` top: ${a}px !important; left: ${c}px !important; } - `),()=>{document.head.removeChild(l)}},[e]),v.createElement(bH,{isPresent:e,childRef:n,sizeRef:s},v.cloneElement(t,{ref:n}))}const tx=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=IO(EH),c=v.useId(),l=v.useMemo(()=>({id:c,initial:e,isPresent:r,custom:s,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;n&&n()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?void 0:[r]);return v.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[r]),v.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=v.createElement(wH,{isPresent:r},t)),v.createElement(om.Provider,{value:l},t)};function EH(){return new Map}function SH(t){return v.useEffect(()=>()=>t(),[])}const sc=t=>t.key||"";function CH(t,e){t.forEach(r=>{const n=sc(r);e.set(n,r)})}function AH(t){const e=[];return v.Children.forEach(t,r=>{v.isValidElement(r)&&e.push(r)}),e}const yS=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{const a=v.useContext(JE).forceRender||xH()[0],c=M6(),l=AH(t);let u=l;const f=v.useRef(new Map).current,d=v.useRef(u),h=v.useRef(new Map).current,p=v.useRef(!0);if(WE(()=>{p.current=!1,CH(l,h),d.current=u}),SH(()=>{p.current=!0,h.clear(),f.clear()}),p.current)return v.createElement(v.Fragment,null,u.map(x=>v.createElement(tx,{key:sc(x),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},x)));u=[...u];const y=d.current.map(sc),g=l.map(sc),m=y.length;for(let x=0;x{if(g.indexOf(b)!==-1)return;const w=h.get(b);if(!w)return;const A=y.indexOf(b);let O=x;if(!O){const _=()=>{f.delete(b);const C=Array.from(h.keys()).filter(j=>!g.includes(j));if(C.forEach(j=>h.delete(j)),d.current=l.filter(j=>{const V=sc(j);return V===b||C.includes(V)}),!f.size){if(c.current===!1)return;a(),n&&n()}};O=v.createElement(tx,{key:sc(w),isPresent:!1,onExitComplete:_,custom:e,presenceAffectsLayout:i,mode:o},w),f.set(b,O)}u.splice(A,0,O)}),u=u.map(x=>{const b=x.key;return f.has(b)?x:v.createElement(tx,{key:sc(x),isPresent:!0,presenceAffectsLayout:i,mode:o},x)}),v.createElement(v.Fragment,null,f.size?u:u.map(x=>v.cloneElement(x)))},D6={black:"#000000",white:"#ffffff",inherit:"inherit",transparent:"transparent",positive:"#1FC266",negative:"#C2501F",info:"#0076CC",warning:"#F4B03E",gradientBackdrop:`linear-gradient( + `),()=>{document.head.removeChild(l)}},[e]),v.createElement(wH,{isPresent:e,childRef:n,sizeRef:s},v.cloneElement(t,{ref:n}))}const tx=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=IO(SH),c=v.useId(),l=v.useMemo(()=>({id:c,initial:e,isPresent:r,custom:s,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;n&&n()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?void 0:[r]);return v.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[r]),v.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=v.createElement(EH,{isPresent:r},t)),v.createElement(om.Provider,{value:l},t)};function SH(){return new Map}function CH(t){return v.useEffect(()=>()=>t(),[])}const sc=t=>t.key||"";function AH(t,e){t.forEach(r=>{const n=sc(r);e.set(n,r)})}function kH(t){const e=[];return v.Children.forEach(t,r=>{v.isValidElement(r)&&e.push(r)}),e}const yS=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{const a=v.useContext(JE).forceRender||bH()[0],c=M6(),l=kH(t);let u=l;const f=v.useRef(new Map).current,d=v.useRef(u),h=v.useRef(new Map).current,p=v.useRef(!0);if(WE(()=>{p.current=!1,AH(l,h),d.current=u}),CH(()=>{p.current=!0,h.clear(),f.clear()}),p.current)return v.createElement(v.Fragment,null,u.map(x=>v.createElement(tx,{key:sc(x),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},x)));u=[...u];const y=d.current.map(sc),g=l.map(sc),m=y.length;for(let x=0;x{if(g.indexOf(b)!==-1)return;const w=h.get(b);if(!w)return;const A=y.indexOf(b);let O=x;if(!O){const _=()=>{f.delete(b);const C=Array.from(h.keys()).filter(j=>!g.includes(j));if(C.forEach(j=>h.delete(j)),d.current=l.filter(j=>{const V=sc(j);return V===b||C.includes(V)}),!f.size){if(c.current===!1)return;a(),n&&n()}};O=v.createElement(tx,{key:sc(w),isPresent:!1,onExitComplete:_,custom:e,presenceAffectsLayout:i,mode:o},w),f.set(b,O)}u.splice(A,0,O)}),u=u.map(x=>{const b=x.key;return f.has(b)?x:v.createElement(tx,{key:sc(x),isPresent:!0,presenceAffectsLayout:i,mode:o},x)}),v.createElement(v.Fragment,null,f.size?u:u.map(x=>v.cloneElement(x)))},D6={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"},kH={...D6,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)"},TH={...D6,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)"},PH={dark:kH,light:TH},RH={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 cR={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 IH(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 OH(t){var e=IH(t,"string");return typeof e=="symbol"?e:String(e)}function _H(t,e,r){return e=OH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lR(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function rx(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nc.styles)),i=Object.keys(s),o=i.filter(c=>"mappings"in s[c]),a=c=>{var l=[],u={},f=rx({},c),d=!1;for(var h of o){var p=c[h];if(p!=null){var y=s[h];d=!0;for(var g of y.mappings)u[g]=p,f[g]==null&&delete f[g]}}var m=d?rx(rx({},u),f):c,x=function(){var A=m[b],O=s[b];try{if(O.mappings)return 1;if(typeof A=="string"||typeof A=="number")l.push(O.values[A].defaultClass);else if(Array.isArray(A))for(var _=0;_t,DH=function(){return NH(MH)(...arguments)},L6=DH({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 LH=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],gw=t=>(t.display||(t.display=Object.keys(t).some(e=>LH.includes(e))?"flex":void 0),L6(t));gw.properties=L6.properties;const jH="https://assets.sequence.info/",BH=5,FH={xs:"small",sm:"small",md:"medium",lg:"large",xl:"large"},j6=t=>t?FH[t]||t:"medium",UH=(t,e)=>t.replace(/\/(small|medium|large)\//,`/${j6(e)}/`),VH=(t,e)=>jH+`images/networks/${j6(e)}/${t}.webp?v${BH}`;function B6(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const l in i)gw.properties.has(l)?o[l]=i[l]:a[l]=i[l];const c=gw({...o,...n});return v.createElement(r,{className:qr(c,s),...a,ref:e})});var F6={exports:{}},Nd={};/** + )`,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"},TH={...D6,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)"},PH={...D6,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)"},RH={dark:TH,light:PH},IH={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 cR={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 OH(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 _H(t){var e=OH(t,"string");return typeof e=="symbol"?e:String(e)}function NH(t,e,r){return e=_H(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lR(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function rx(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nc.styles)),i=Object.keys(s),o=i.filter(c=>"mappings"in s[c]),a=c=>{var l=[],u={},f=rx({},c),d=!1;for(var h of o){var p=c[h];if(p!=null){var y=s[h];d=!0;for(var g of y.mappings)u[g]=p,f[g]==null&&delete f[g]}}var m=d?rx(rx({},u),f):c,x=function(){var A=m[b],O=s[b];try{if(O.mappings)return 1;if(typeof A=="string"||typeof A=="number")l.push(O.values[A].defaultClass);else if(Array.isArray(A))for(var _=0;_t,LH=function(){return MH(DH)(...arguments)},L6=LH({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 jH=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],gw=t=>(t.display||(t.display=Object.keys(t).some(e=>jH.includes(e))?"flex":void 0),L6(t));gw.properties=L6.properties;const BH="https://assets.sequence.info/",FH=5,UH={xs:"small",sm:"small",md:"medium",lg:"large",xl:"large"},j6=t=>t?UH[t]||t:"medium",VH=(t,e)=>t.replace(/\/(small|medium|large)\//,`/${j6(e)}/`),$H=(t,e)=>BH+`images/networks/${j6(e)}/${t}.webp?v${FH}`;function B6(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const l in i)gw.properties.has(l)?o[l]=i[l]:a[l]=i[l];const c=gw({...o,...n});return v.createElement(r,{className:qr(c,s),...a,ref:e})});var F6={exports:{}},Nd={};/** * @license React * react-jsx-runtime.production.min.js * @@ -58,8 +58,8 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var uR;function $H(){if(uR)return Nd;uR=1;var t=cr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,l){var u,f={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(u in c)n.call(c,u)&&!i.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:e,type:a,key:d,ref:h,props:f,_owner:s.current}}return Nd.Fragment=r,Nd.jsx=o,Nd.jsxs=o,Nd}F6.exports=$H();var E=F6.exports;function zH(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 HH(t){var e=zH(t,"string");return typeof e=="symbol"?e:String(e)}function GH(t,e,r){return e=HH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fR(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function dR(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},Nt=t=>{var e=r=>{var n=t.defaultClassName,s=dR(dR({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var c=a;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[i][c];l&&(n+=" "+l)}}for(var[u,f]of t.compoundVariants)qH(u,s,t.defaultVariants)&&(n+=" "+f);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return hR(t.variantClassNames,r=>hR(r,n=>n.split(" ")[0]))}},e};Nt({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 gr=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return E.jsx(q,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var WH=Nt({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 ue=v.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:c,ellipsis:l,uppercase:u,capitalize:f,...d}=t,h=RH[n];return E.jsx(q,{as:r,className:qr(s,WH({hidden:i,ellipsis:l,italic:o,underline:a,uppercase:u,capitalize:f})),ref:e,...h,...d,children:c})});var KH=Nt({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 ut=v.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:c=!1,label:l,leftIcon:u,rightIcon:f,size:d="md",variant:h="glass",width:p="fit",shape:y="circle",type:g="button",...m}=t,x=u!==void 0&&l!==void 0,b=f!==void 0&&l!==void 0,w=u!==void 0&&l===void 0,A=d==="xs"?"xs":"sm";return E.jsx(q,{as:r,className:qr(s,KH({activeOutline:n,disabled:i||c,hasLeftIcon:x,hasRightIcon:b,iconOnly:w,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||c,display:o,fontWeight:a,ref:e,type:g,width:p,...m,children:w?E.jsx(u,{size:A}):E.jsxs(q,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[E.jsxs(q,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[u&&E.jsx(u,{size:A}),E.jsx(ue,{children:l})]}),f&&E.jsx(f,{size:A})]})})});var QH=Nt({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 YH=v.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:c="full",...l}=t;return E.jsx(q,{className:qr(r,QH({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:c,ref:e,...l,children:n})});function JH(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function hm(...t){return e=>t.forEach(r=>JH(r,e))}function $e(...t){return v.useCallback(hm(...t),t)}function XH(t,e){const r=v.createContext(e);function n(i){const{children:o,...a}=i,c=v.useMemo(()=>a,Object.values(a));return E.jsx(r.Provider,{value:c,children:o})}function s(i){const o=v.useContext(r);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return n.displayName=t+"Provider",[n,s]}function Wr(t,e=[]){let r=[];function n(i,o){const a=v.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...p}=f,y=(d==null?void 0:d[t][c])||a,g=v.useMemo(()=>p,Object.values(p));return E.jsx(y.Provider,{value:g,children:h})}function u(f,d){const h=(d==null?void 0:d[t][c])||a,p=v.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const s=()=>{const i=r.map(o=>v.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return v.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[n,ZH(s,...e)]}function ZH(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ce(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Gr(t){const e=v.useRef(t);return v.useEffect(()=>{e.current=t}),v.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function ps({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=eG({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=Gr(r),c=v.useCallback(l=>{if(i){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else s(l)},[i,t,s,a]);return[o,c]}function eG({defaultProp:t,onChange:e}){const r=v.useState(t),[n]=r,s=v.useRef(n),i=Gr(e);return v.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function pm(t){const e=v.useRef({value:t,previous:t});return v.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var Tr=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{};function ym(t){const[e,r]=v.useState(void 0);return Tr(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.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 tG(t,e){return v.useReducer((r,n)=>e[r][n]??r,t)}var cn=t=>{const{present:e,children:r}=t,n=rG(e),s=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),i=$e(n.ref,nG(s));return typeof r=="function"||n.isPresent?v.cloneElement(s,{ref:i}):null};cn.displayName="Presence";function rG(t){const[e,r]=v.useState(),n=v.useRef({}),s=v.useRef(t),i=v.useRef("none"),o=t?"mounted":"unmounted",[a,c]=tG(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=r1(n.current);i.current=a==="mounted"?l:"none"},[a]),Tr(()=>{const l=n.current,u=s.current;if(u!==t){const d=i.current,h=r1(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Tr(()=>{if(e){const l=f=>{const h=r1(n.current).includes(f.animationName);f.target===e&&h&&Eo.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(i.current=r1(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function r1(t){return(t==null?void 0:t.animationName)||"none"}function nG(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var ll=v.forwardRef((t,e)=>{const{children:r,...n}=t,s=v.Children.toArray(r),i=s.find(sG);if(i){const o=i.props.children,a=s.map(c=>c===i?v.Children.count(o)>1?v.Children.only(null):v.isValidElement(o)?o.props.children:null:c);return E.jsx(xw,{...n,ref:e,children:v.isValidElement(o)?v.cloneElement(o,void 0,a):null})}return E.jsx(xw,{...n,ref:e,children:r})});ll.displayName="Slot";var xw=v.forwardRef((t,e)=>{const{children:r,...n}=t;if(v.isValidElement(r)){const s=oG(r);return v.cloneElement(r,{...iG(n,r.props),ref:e?hm(e,s):s})}return v.Children.count(r)>1?v.Children.only(null):null});xw.displayName="SlotClone";var U6=({children:t})=>E.jsx(E.Fragment,{children:t});function sG(t){return v.isValidElement(t)&&t.type===U6}function iG(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}function oG(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var aG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],we=aG.reduce((t,e)=>{const r=v.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?ll:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(a,{...o,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function vS(t,e){t&&Eo.flushSync(()=>t.dispatchEvent(e))}var mS="Checkbox",[cG,O1e]=Wr(mS),[lG,uG]=cG(mS),V6=v.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=v.useState(null),h=$e(e,b=>d(b)),p=v.useRef(!1),y=f?!!f.closest("form"):!0,[g=!1,m]=ps({prop:s,defaultProp:i,onChange:l}),x=v.useRef(g);return v.useEffect(()=>{const b=f==null?void 0:f.form;if(b){const w=()=>m(x.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[f,m]),E.jsxs(lG,{scope:r,state:g,disabled:a,children:[E.jsx(we.button,{type:"button",role:"checkbox","aria-checked":Zc(g)?"mixed":g,"aria-required":o,"data-state":H6(g),"data-disabled":a?"":void 0,disabled:a,value:c,...u,ref:h,onKeyDown:ce(t.onKeyDown,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:ce(t.onClick,b=>{m(w=>Zc(w)?!0:!w),y&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})}),y&&E.jsx(fG,{control:f,bubbles:!p.current,name:n,value:c,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});V6.displayName=mS;var $6="CheckboxIndicator",z6=v.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=uG($6,r);return E.jsx(cn,{present:n||Zc(i.state)||i.state===!0,children:E.jsx(we.span,{"data-state":H6(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});z6.displayName=$6;var fG=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=v.useRef(null),o=pm(r),a=ym(e);return v.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});c.indeterminate=Zc(r),f.call(c,Zc(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),E.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:Zc(r)?!1:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Zc(t){return t==="indeterminate"}function H6(t){return Zc(t)?"indeterminate":t?"checked":"unchecked"}var dG=V6,hG=z6,pG=Nt({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 Al=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?E.jsxs(q,{flexDirection:"column",gap:"0.5",children:[r&&E.jsx(ue,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&E.jsx(ue,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return E.jsxs(q,{as:"label",className:pG({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var ny=Nt({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const yG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),gS=({size:t="sm",...e})=>E.jsx(q,{as:yG,className:ny({size:t}),...e}),vG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.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"})}),G6=({size:t="sm",...e})=>E.jsx(q,{as:vG,className:ny({size:t}),...e}),mG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.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"})}),Gh=({size:t="sm",...e})=>E.jsx(q,{as:mG,className:ny({size:t}),...e}),gG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.608 6.75h-5.19v-1.5h7.75V13h-1.5V7.81l-7.72 7.72-1.06-1.06 7.72-7.72Z",clipRule:"evenodd"})}),xG=({size:t="sm",...e})=>E.jsx(q,{as:gG,className:ny({size:t}),...e}),bG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.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"})}),wG=({size:t="sm",...e})=>E.jsx(q,{as:bG,className:ny({size:t}),...e});var EG=Nt({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:[]}),SG="_1c9x66f4 fyvr12s1 fyvr11h0 fyvr11ko fyvr11jg fyvr128 fyvr15o";const CG=({size:t="sm"})=>E.jsx(hG,{className:SG,children:E.jsx(gS,{size:t==="lg"?"sm":"xs"})});v.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...c}=t;return E.jsx(Al,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:E.jsx(dG,{className:EG({size:a}),disabled:r,id:n??s,name:s,ref:e,...c,children:E.jsx(CG,{size:a})})})});cr.createContext(null);var AG=l5["useId".toString()]||(()=>{}),kG=0;function us(t){const[e,r]=v.useState(AG());return Tr(()=>{t||r(n=>n??String(kG++))},[t]),t||(e?`radix-${e}`:"")}var xS="Collapsible",[TG,_1e]=Wr(xS),[PG,bS]=TG(xS),q6=v.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[c=!1,l]=ps({prop:n,defaultProp:s,onChange:o});return E.jsx(PG,{scope:r,disabled:i,contentId:us(),open:c,onOpenToggle:v.useCallback(()=>l(u=>!u),[l]),children:E.jsx(we.div,{"data-state":ES(c),"data-disabled":i?"":void 0,...a,ref:e})})});q6.displayName=xS;var W6="CollapsibleTrigger",K6=v.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,s=bS(W6,r);return E.jsx(we.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":ES(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:ce(t.onClick,s.onOpenToggle)})});K6.displayName=W6;var wS="CollapsibleContent",Q6=v.forwardRef((t,e)=>{const{forceMount:r,...n}=t,s=bS(wS,t.__scopeCollapsible);return E.jsx(cn,{present:r||s.open,children:({present:i})=>E.jsx(RG,{...n,ref:e,present:i})})});Q6.displayName=wS;var RG=v.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:s,...i}=t,o=bS(wS,r),[a,c]=v.useState(n),l=v.useRef(null),u=$e(e,l),f=v.useRef(0),d=f.current,h=v.useRef(0),p=h.current,y=o.open||a,g=v.useRef(y),m=v.useRef();return v.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),Tr(()=>{const x=l.current;if(x){m.current=m.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();f.current=b.height,h.current=b.width,g.current||(x.style.transitionDuration=m.current.transitionDuration,x.style.animationName=m.current.animationName),c(n)}},[o.open,n]),E.jsx(we.div,{"data-state":ES(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!y,...i,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...t.style},children:y&&s})});function ES(t){return t?"open":"closed"}var IG=q6,OG=K6,_G=Q6,pR="64px",NG="_4j62fl0",MG="_4j62fl2 _4j62fl1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11od fyvr128 fyvr12v7 fyvr11n4 _4efw240",DG="_4j62fl4 _4j62fl3 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",LG="_4j62fl5";const _l=t=>{const{className:e,children:r,defaultOpen:n,open:s,onOpenChange:i,label:o,...a}=t,[c,l]=v.useState(n),u=s??c,f=h=>{s===void 0&&l(h)},d=h=>{f(h),i==null||i(h)};return E.jsx(IG,{open:u,defaultOpen:n,onOpenChange:d,asChild:!0,children:E.jsxs(q,{as:Xc.div,className:qr(e,NG),initial:{height:u?"auto":pR},animate:{height:u?"auto":pR},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[E.jsxs(OG,{className:MG,children:[E.jsx(ue,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),E.jsx(q,{as:Xc.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:u?180:0},animate:{rotate:u?180:0},transition:{ease:"linear",duration:.1},children:E.jsx(G6,{className:LG,color:"text50"})})]}),E.jsx(yS,{children:u&&E.jsx(_G,{className:DG,asChild:!0,forceMount:!0,children:E.jsx(Xc.div,{initial:{opacity:u?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function vm(t){const e=t+"CollectionProvider",[r,n]=Wr(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:p,children:y}=h,g=cr.useRef(null),m=cr.useRef(new Map).current;return E.jsx(s,{scope:p,itemMap:m,collectionRef:g,children:y})};o.displayName=e;const a=t+"CollectionSlot",c=cr.forwardRef((h,p)=>{const{scope:y,children:g}=h,m=i(a,y),x=$e(p,m.collectionRef);return E.jsx(ll,{ref:x,children:g})});c.displayName=a;const l=t+"CollectionItemSlot",u="data-radix-collection-item",f=cr.forwardRef((h,p)=>{const{scope:y,children:g,...m}=h,x=cr.useRef(null),b=$e(p,x),w=i(l,y);return cr.useEffect(()=>(w.itemMap.set(x,{ref:x,...m}),()=>void w.itemMap.delete(x))),E.jsx(ll,{[u]:"",ref:b,children:g})});f.displayName=l;function d(h){const p=i(t+"CollectionConsumer",h);return cr.useCallback(()=>{const g=p.collectionRef.current;if(!g)return[];const m=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((w,A)=>m.indexOf(w.ref.current)-m.indexOf(A.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},d,n]}var jG=v.createContext(void 0);function sy(t){const e=v.useContext(jG);return t||e||"ltr"}function BG(t,e=globalThis==null?void 0:globalThis.document){const r=Gr(t);v.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var FG="DismissableLayer",bw="dismissableLayer.update",UG="dismissableLayer.pointerDownOutside",VG="dismissableLayer.focusOutside",yR,Y6=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),od=v.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=t,l=v.useContext(Y6),[u,f]=v.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),p=$e(e,_=>f(_)),y=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(g),x=u?y.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,w=x>=m,A=zG(_=>{const C=_.target,j=[...l.branches].some(V=>V.contains(C));!w||j||(s==null||s(_),o==null||o(_),_.defaultPrevented||a==null||a())},d),O=HG(_=>{const C=_.target;[...l.branches].some(V=>V.contains(C))||(i==null||i(_),o==null||o(_),_.defaultPrevented||a==null||a())},d);return BG(_=>{x===l.layers.size-1&&(n==null||n(_),!_.defaultPrevented&&a&&(_.preventDefault(),a()))},d),v.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(yR=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),vR(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=yR)}},[u,d,r,l]),v.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),vR())},[u,l]),v.useEffect(()=>{const _=()=>h({});return document.addEventListener(bw,_),()=>document.removeEventListener(bw,_)},[]),E.jsx(we.div,{...c,ref:p,style:{pointerEvents:b?w?"auto":"none":void 0,...t.style},onFocusCapture:ce(t.onFocusCapture,O.onFocusCapture),onBlurCapture:ce(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:ce(t.onPointerDownCapture,A.onPointerDownCapture)})});od.displayName=FG;var $G="DismissableLayerBranch",J6=v.forwardRef((t,e)=>{const r=v.useContext(Y6),n=v.useRef(null),s=$e(e,n);return v.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),E.jsx(we.div,{...t,ref:s})});J6.displayName=$G;function zG(t,e=globalThis==null?void 0:globalThis.document){const r=Gr(t),n=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){X6(UG,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function HG(t,e=globalThis==null?void 0:globalThis.document){const r=Gr(t),n=v.useRef(!1);return v.useEffect(()=>{const s=i=>{i.target&&!n.current&&X6(VG,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function vR(){const t=new CustomEvent(bw);document.dispatchEvent(t)}function X6(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?vS(s,i):s.dispatchEvent(i)}var GG=od,qG=J6,nx=0;function SS(){v.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??mR()),document.body.insertAdjacentElement("beforeend",t[1]??mR()),nx++,()=>{nx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),nx--}},[])}function mR(){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}var sx="focusScope.autoFocusOnMount",ix="focusScope.autoFocusOnUnmount",gR={bubbles:!1,cancelable:!0},WG="FocusScope",mm=v.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=v.useState(null),l=Gr(s),u=Gr(i),f=v.useRef(null),d=$e(e,y=>c(y)),h=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let y=function(b){if(h.paused||!a)return;const w=b.target;a.contains(w)?f.current=w:Do(f.current,{select:!0})},g=function(b){if(h.paused||!a)return;const w=b.relatedTarget;w!==null&&(a.contains(w)||Do(f.current,{select:!0}))},m=function(b){if(document.activeElement===document.body)for(const A of b)A.removedNodes.length>0&&Do(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const x=new MutationObserver(m);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),x.disconnect()}}},[n,a,h.paused]),v.useEffect(()=>{if(a){bR.add(h);const y=document.activeElement;if(!a.contains(y)){const m=new CustomEvent(sx,gR);a.addEventListener(sx,l),a.dispatchEvent(m),m.defaultPrevented||(KG(ZG(Z6(a)),{select:!0}),document.activeElement===y&&Do(a))}return()=>{a.removeEventListener(sx,l),setTimeout(()=>{const m=new CustomEvent(ix,gR);a.addEventListener(ix,u),a.dispatchEvent(m),m.defaultPrevented||Do(y??document.body,{select:!0}),a.removeEventListener(ix,u),bR.remove(h)},0)}}},[a,l,u,h]);const p=v.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,m=document.activeElement;if(g&&m){const x=y.currentTarget,[b,w]=QG(x);b&&w?!y.shiftKey&&m===w?(y.preventDefault(),r&&Do(b,{select:!0})):y.shiftKey&&m===b&&(y.preventDefault(),r&&Do(w,{select:!0})):m===x&&y.preventDefault()}},[r,n,h.paused]);return E.jsx(we.div,{tabIndex:-1,...o,ref:d,onKeyDown:p})});mm.displayName=WG;function KG(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Do(n,{select:e}),document.activeElement!==r)return}function QG(t){const e=Z6(t),r=xR(e,t),n=xR(e.reverse(),t);return[r,n]}function Z6(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function xR(t,e){for(const r of t)if(!YG(r,{upTo:e}))return r}function YG(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 JG(t){return t instanceof HTMLInputElement&&"select"in t}function Do(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&JG(t)&&e&&t.select()}}var bR=XG();function XG(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=wR(t,e),t.unshift(e)},remove(e){var r;t=wR(t,e),(r=t[0])==null||r.resume()}}}function wR(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function ZG(t){return t.filter(e=>e.tagName!=="A")}const eq=["top","right","bottom","left"],hi=Math.min,_n=Math.max,Qv=Math.round,n1=Math.floor,Ia=t=>({x:t,y:t}),tq={left:"right",right:"left",bottom:"top",top:"bottom"},rq={start:"end",end:"start"};function ww(t,e,r){return _n(t,hi(e,r))}function vo(t,e){return typeof t=="function"?t(e):t}function mo(t){return t.split("-")[0]}function ad(t){return t.split("-")[1]}function CS(t){return t==="x"?"y":"x"}function AS(t){return t==="y"?"height":"width"}function Oa(t){return["top","bottom"].includes(mo(t))?"y":"x"}function kS(t){return CS(Oa(t))}function nq(t,e,r){r===void 0&&(r=!1);const n=ad(t),s=kS(t),i=AS(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Yv(o)),[o,Yv(o)]}function sq(t){const e=Yv(t);return[Ew(t),e,Ew(e)]}function Ew(t){return t.replace(/start|end/g,e=>rq[e])}function iq(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function oq(t,e,r,n){const s=ad(t);let i=iq(mo(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Ew)))),i}function Yv(t){return t.replace(/left|right|bottom|top/g,e=>tq[e])}function aq(t){return{top:0,right:0,bottom:0,left:0,...t}}function e_(t){return typeof t!="number"?aq(t):{top:t,right:t,bottom:t,left:t}}function Jv(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function ER(t,e,r){let{reference:n,floating:s}=t;const i=Oa(e),o=kS(e),a=AS(o),c=mo(e),l=i==="y",u=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-s.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-s.width,y:f};break;default:h={x:n.x,y:n.y}}switch(ad(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const cq=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:f}=ER(l,n,c),d=n,h={},p=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=vo(t,e)||{};if(l==null)return{};const f=e_(u),d={x:r,y:n},h=kS(s),p=AS(h),y=await o.getDimensions(l),g=h==="y",m=g?"top":"left",x=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[h]-d[h]-i.floating[p],A=d[h]-i.reference[h],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let _=O?O[b]:0;(!_||!await(o.isElement==null?void 0:o.isElement(O)))&&(_=a.floating[b]||i.floating[p]);const C=w/2-A/2,j=_/2-y[p]/2-1,V=hi(f[m],j),B=hi(f[x],j),z=V,Y=_-y[p]-B,H=_/2-y[p]/2+C,L=ww(z,H,Y),T=!c.arrow&&ad(s)!=null&&H!==L&&i.reference[p]/2-(HH<=0)){var B,z;const H=(((B=i.flip)==null?void 0:B.index)||0)+1,L=_[H];if(L)return{data:{index:H,overflows:V},reset:{placement:L}};let T=(z=V.filter(P=>P.overflows[0]<=0).sort((P,R)=>P.overflows[1]-R.overflows[1])[0])==null?void 0:z.placement;if(!T)switch(h){case"bestFit":{var Y;const P=(Y=V.filter(R=>{if(O){const I=Oa(R.placement);return I===x||I==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(I=>I>0).reduce((I,U)=>I+U,0)]).sort((R,I)=>R[1]-I[1])[0])==null?void 0:Y[0];P&&(T=P);break}case"initialPlacement":T=a;break}if(s!==T)return{reset:{placement:T}}}return{}}}};function SR(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function CR(t){return eq.some(e=>t[e]>=0)}const fq=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=vo(t,e);switch(n){case"referenceHidden":{const i=await qh(e,{...s,elementContext:"reference"}),o=SR(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:CR(o)}}}case"escaped":{const i=await qh(e,{...s,altBoundary:!0}),o=SR(i,r.floating);return{data:{escapedOffsets:o,escaped:CR(o)}}}default:return{}}}}};async function dq(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=mo(r),a=ad(r),c=Oa(r)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,f=vo(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const hq=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,c=await dq(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},pq=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:m,y:x}=g;return{x:m,y:x}}},...c}=vo(t,e),l={x:r,y:n},u=await qh(e,c),f=Oa(mo(s)),d=CS(f);let h=l[d],p=l[f];if(i){const g=d==="y"?"top":"left",m=d==="y"?"bottom":"right",x=h+u[g],b=h-u[m];h=ww(x,h,b)}if(o){const g=f==="y"?"top":"left",m=f==="y"?"bottom":"right",x=p+u[g],b=p-u[m];p=ww(x,p,b)}const y=a.fn({...e,[d]:h,[f]:p});return{...y,data:{x:y.x-r,y:y.y-n}}}}},yq=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=vo(t,e),u={x:r,y:n},f=Oa(s),d=CS(f);let h=u[d],p=u[f];const y=vo(a,e),g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=d==="y"?"height":"width",w=i.reference[d]-i.floating[b]+g.mainAxis,A=i.reference[d]+i.reference[b]-g.mainAxis;hA&&(h=A)}if(l){var m,x;const b=d==="y"?"width":"height",w=["top","left"].includes(mo(s)),A=i.reference[f]-i.floating[b]+(w&&((m=o.offset)==null?void 0:m[f])||0)+(w?0:g.crossAxis),O=i.reference[f]+i.reference[b]+(w?0:((x=o.offset)==null?void 0:x[f])||0)-(w?g.crossAxis:0);pO&&(p=O)}return{[d]:h,[f]:p}}}},vq=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=vo(t,e),c=await qh(e,a),l=mo(r),u=ad(r),f=Oa(r)==="y",{width:d,height:h}=n.floating;let p,y;l==="top"||l==="bottom"?(p=l,y=u===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=l,p=u==="end"?"top":"bottom");const g=h-c.top-c.bottom,m=d-c.left-c.right,x=hi(h-c[p],g),b=hi(d-c[y],m),w=!e.middlewareData.shift;let A=x,O=b;if(f?O=u||w?hi(b,m):m:A=u||w?hi(x,g):g,w&&!u){const C=_n(c.left,0),j=_n(c.right,0),V=_n(c.top,0),B=_n(c.bottom,0);f?O=d-2*(C!==0||j!==0?C+j:_n(c.left,c.right)):A=h-2*(V!==0||B!==0?V+B:_n(c.top,c.bottom))}await o({...e,availableWidth:O,availableHeight:A});const _=await s.getDimensions(i.floating);return d!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function cd(t){return t_(t)?(t.nodeName||"").toLowerCase():"#document"}function jn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function So(t){var e;return(e=(t_(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function t_(t){return t instanceof Node||t instanceof jn(t).Node}function bi(t){return t instanceof Element||t instanceof jn(t).Element}function wi(t){return t instanceof HTMLElement||t instanceof jn(t).HTMLElement}function AR(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof jn(t).ShadowRoot}function iy(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Fs(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function mq(t){return["table","td","th"].includes(cd(t))}function gm(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function TS(t){const e=PS(),r=Fs(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 gq(t){let e=_a(t);for(;wi(e)&&!Bf(e);){if(gm(e))return null;if(TS(e))return e;e=_a(e)}return null}function PS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bf(t){return["html","body","#document"].includes(cd(t))}function Fs(t){return jn(t).getComputedStyle(t)}function xm(t){return bi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _a(t){if(cd(t)==="html")return t;const e=t.assignedSlot||t.parentNode||AR(t)&&t.host||So(t);return AR(e)?e.host:e}function r_(t){const e=_a(t);return Bf(e)?t.ownerDocument?t.ownerDocument.body:t.body:wi(e)&&iy(e)?e:r_(e)}function Wh(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=r_(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=jn(s);return i?e.concat(o,o.visualViewport||[],iy(s)?s:[],o.frameElement&&r?Wh(o.frameElement):[]):e.concat(s,Wh(s,[],r))}function n_(t){const e=Fs(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=wi(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Qv(r)!==i||Qv(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function RS(t){return bi(t)?t:t.contextElement}function ku(t){const e=RS(t);if(!wi(e))return Ia(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=n_(e);let o=(i?Qv(r.width):r.width)/n,a=(i?Qv(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const xq=Ia(0);function s_(t){const e=jn(t);return!PS()||!e.visualViewport?xq:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function bq(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==jn(t)?!1:e}function ul(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=RS(t);let o=Ia(1);e&&(n?bi(n)&&(o=ku(n)):o=ku(t));const a=bq(i,r,n)?s_(i):Ia(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,u=s.width/o.x,f=s.height/o.y;if(i){const d=jn(i),h=n&&bi(n)?jn(n):n;let p=d,y=p.frameElement;for(;y&&n&&h!==p;){const g=ku(y),m=y.getBoundingClientRect(),x=Fs(y),b=m.left+(y.clientLeft+parseFloat(x.paddingLeft))*g.x,w=m.top+(y.clientTop+parseFloat(x.paddingTop))*g.y;c*=g.x,l*=g.y,u*=g.x,f*=g.y,c+=b,l+=w,p=jn(y),y=p.frameElement}}return Jv({width:u,height:f,x:c,y:l})}function wq(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=So(n),a=e?gm(e.floating):!1;if(n===o||a&&i)return r;let c={scrollLeft:0,scrollTop:0},l=Ia(1);const u=Ia(0),f=wi(n);if((f||!f&&!i)&&((cd(n)!=="body"||iy(o))&&(c=xm(n)),wi(n))){const d=ul(n);l=ku(n),u.x=d.x+n.clientLeft,u.y=d.y+n.clientTop}return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x,y:r.y*l.y-c.scrollTop*l.y+u.y}}function Eq(t){return Array.from(t.getClientRects())}function i_(t){return ul(So(t)).left+xm(t).scrollLeft}function Sq(t){const e=So(t),r=xm(t),n=t.ownerDocument.body,s=_n(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=_n(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+i_(t);const a=-r.scrollTop;return Fs(n).direction==="rtl"&&(o+=_n(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function Cq(t,e){const r=jn(t),n=So(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=PS();(!l||l&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function Aq(t,e){const r=ul(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=wi(t)?ku(t):Ia(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function kR(t,e,r){let n;if(e==="viewport")n=Cq(t,r);else if(e==="document")n=Sq(So(t));else if(bi(e))n=Aq(e,r);else{const s=s_(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Jv(n)}function o_(t,e){const r=_a(t);return r===e||!bi(r)||Bf(r)?!1:Fs(r).position==="fixed"||o_(r,e)}function kq(t,e){const r=e.get(t);if(r)return r;let n=Wh(t,[],!1).filter(a=>bi(a)&&cd(a)!=="body"),s=null;const i=Fs(t).position==="fixed";let o=i?_a(t):t;for(;bi(o)&&!Bf(o);){const a=Fs(o),c=TS(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||iy(o)&&!c&&o_(t,o))?n=n.filter(u=>u!==o):s=a,o=_a(o)}return e.set(t,n),n}function Tq(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?gm(e)?[]:kq(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=kR(e,u,s);return l.top=_n(f.top,l.top),l.right=hi(f.right,l.right),l.bottom=hi(f.bottom,l.bottom),l.left=_n(f.left,l.left),l},kR(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Pq(t){const{width:e,height:r}=n_(t);return{width:e,height:r}}function Rq(t,e,r){const n=wi(e),s=So(e),i=r==="fixed",o=ul(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=Ia(0);if(n||!n&&!i)if((cd(e)!=="body"||iy(s))&&(a=xm(e)),n){const f=ul(e,!0,i,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else s&&(c.x=i_(s));const l=o.left+a.scrollLeft-c.x,u=o.top+a.scrollTop-c.y;return{x:l,y:u,width:o.width,height:o.height}}function ox(t){return Fs(t).position==="static"}function TR(t,e){return!wi(t)||Fs(t).position==="fixed"?null:e?e(t):t.offsetParent}function a_(t,e){const r=jn(t);if(gm(t))return r;if(!wi(t)){let s=_a(t);for(;s&&!Bf(s);){if(bi(s)&&!ox(s))return s;s=_a(s)}return r}let n=TR(t,e);for(;n&&mq(n)&&ox(n);)n=TR(n,e);return n&&Bf(n)&&ox(n)&&!TS(n)?r:n||gq(t)||r}const Iq=async function(t){const e=this.getOffsetParent||a_,r=this.getDimensions,n=await r(t.floating);return{reference:Rq(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Oq(t){return Fs(t).direction==="rtl"}const _q={convertOffsetParentRelativeRectToViewportRelativeRect:wq,getDocumentElement:So,getClippingRect:Tq,getOffsetParent:a_,getElementRects:Iq,getClientRects:Eq,getDimensions:Pq,getScale:ku,isElement:bi,isRTL:Oq};function Nq(t,e){let r=null,n;const s=So(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=n1(u),p=n1(s.clientWidth-(l+f)),y=n1(s.clientHeight-(u+d)),g=n1(l),x={rootMargin:-h+"px "+-p+"px "+-y+"px "+-g+"px",threshold:_n(0,hi(1,c))||1};let b=!0;function w(A){const O=A[0].intersectionRatio;if(O!==c){if(!b)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{r=new IntersectionObserver(w,{...x,root:s.ownerDocument})}catch{r=new IntersectionObserver(w,x)}r.observe(t)}return o(!0),i}function Mq(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=RS(t),u=s||i?[...l?Wh(l):[],...Wh(e)]:[];u.forEach(m=>{s&&m.addEventListener("scroll",r,{passive:!0}),i&&m.addEventListener("resize",r)});const f=l&&a?Nq(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(m=>{let[x]=m;x&&x.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let p,y=c?ul(t):null;c&&g();function g(){const m=ul(t);y&&(m.x!==y.x||m.y!==y.y||m.width!==y.width||m.height!==y.height)&&r(),y=m,p=requestAnimationFrame(g)}return r(),()=>{var m;u.forEach(x=>{s&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),f==null||f(),(m=h)==null||m.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const Dq=hq,Lq=pq,jq=uq,Bq=vq,Fq=fq,PR=lq,Uq=yq,Vq=(t,e,r)=>{const n=new Map,s={platform:_q,...r},i={...s.platform,_c:n};return cq(t,e,{...s,platform:i})};var K1=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Xv(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,s;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(!Xv(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Xv(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function c_(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function RR(t,e){const r=c_(t);return Math.round(e*r)/r}function IR(t){const e=v.useRef(t);return K1(()=>{e.current=t}),e}function $q(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[u,f]=v.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=v.useState(n);Xv(d,n)||h(n);const[p,y]=v.useState(null),[g,m]=v.useState(null),x=v.useCallback(P=>{P!==O.current&&(O.current=P,y(P))},[]),b=v.useCallback(P=>{P!==_.current&&(_.current=P,m(P))},[]),w=i||p,A=o||g,O=v.useRef(null),_=v.useRef(null),C=v.useRef(u),j=c!=null,V=IR(c),B=IR(s),z=v.useCallback(()=>{if(!O.current||!_.current)return;const P={placement:e,strategy:r,middleware:d};B.current&&(P.platform=B.current),Vq(O.current,_.current,P).then(R=>{const I={...R,isPositioned:!0};Y.current&&!Xv(C.current,I)&&(C.current=I,Eo.flushSync(()=>{f(I)}))})},[d,e,r,B]);K1(()=>{l===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[l]);const Y=v.useRef(!1);K1(()=>(Y.current=!0,()=>{Y.current=!1}),[]),K1(()=>{if(w&&(O.current=w),A&&(_.current=A),w&&A){if(V.current)return V.current(w,A,z);z()}},[w,A,z,V,j]);const H=v.useMemo(()=>({reference:O,floating:_,setReference:x,setFloating:b}),[x,b]),L=v.useMemo(()=>({reference:w,floating:A}),[w,A]),T=v.useMemo(()=>{const P={position:r,left:0,top:0};if(!L.floating)return P;const R=RR(L.floating,u.x),I=RR(L.floating,u.y);return a?{...P,transform:"translate("+R+"px, "+I+"px)",...c_(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:I}},[r,a,L.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:z,refs:H,elements:L,floatingStyles:T}),[u,z,H,L,T])}const zq=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?PR({element:n.current,padding:s}).fn(r):{}:n?PR({element:n,padding:s}).fn(r):{}}}},Hq=(t,e)=>({...Dq(t),options:[t,e]}),Gq=(t,e)=>({...Lq(t),options:[t,e]}),qq=(t,e)=>({...Uq(t),options:[t,e]}),Wq=(t,e)=>({...jq(t),options:[t,e]}),Kq=(t,e)=>({...Bq(t),options:[t,e]}),Qq=(t,e)=>({...Fq(t),options:[t,e]}),Yq=(t,e)=>({...zq(t),options:[t,e]});var Jq="Arrow",l_=v.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return E.jsx(we.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});l_.displayName=Jq;var Xq=l_,IS="Popper",[u_,ld]=Wr(IS),[Zq,f_]=u_(IS),d_=t=>{const{__scopePopper:e,children:r}=t,[n,s]=v.useState(null);return E.jsx(Zq,{scope:e,anchor:n,onAnchorChange:s,children:r})};d_.displayName=IS;var h_="PopperAnchor",p_=v.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=f_(h_,r),o=v.useRef(null),a=$e(e,o);return v.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:E.jsx(we.div,{...s,ref:a})});p_.displayName=h_;var OS="PopperContent",[eW,tW]=u_(OS),y_=v.forwardRef((t,e)=>{var r,n,s,i,o,a;const{__scopePopper:c,side:l="bottom",sideOffset:u=0,align:f="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:y=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:b="optimized",onPlaced:w,...A}=t,O=f_(OS,c),[_,C]=v.useState(null),j=$e(e,at=>C(at)),[V,B]=v.useState(null),z=ym(V),Y=(z==null?void 0:z.width)??0,H=(z==null?void 0:z.height)??0,L=l+(f!=="center"?"-"+f:""),T=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(y)?y:[y],R=P.length>0,I={padding:T,boundary:P.filter(nW),altBoundary:R},{refs:U,floatingStyles:F,placement:X,isPositioned:oe,middlewareData:ae}=$q({strategy:"fixed",placement:L,whileElementsMounted:(...at)=>Mq(...at,{animationFrame:b==="always"}),elements:{reference:O.anchor},middleware:[Hq({mainAxis:u+H,alignmentAxis:d}),p&&Gq({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?qq():void 0,...I}),p&&Wq({...I}),Kq({...I,apply:({elements:at,rects:qe,availableWidth:Kr,availableHeight:vs})=>{const{width:Qa,height:Ci}=qe.reference,Rl=at.floating.style;Rl.setProperty("--radix-popper-available-width",`${Kr}px`),Rl.setProperty("--radix-popper-available-height",`${vs}px`),Rl.setProperty("--radix-popper-anchor-width",`${Qa}px`),Rl.setProperty("--radix-popper-anchor-height",`${Ci}px`)}}),V&&Yq({element:V,padding:h}),sW({arrowWidth:Y,arrowHeight:H}),x&&Qq({strategy:"referenceHidden",...I})]}),[ke,ve]=g_(X),ie=Gr(w);Tr(()=>{oe&&(ie==null||ie())},[oe,ie]);const Me=(r=ae.arrow)==null?void 0:r.x,Be=(n=ae.arrow)==null?void 0:n.y,Te=((s=ae.arrow)==null?void 0:s.centerOffset)!==0,[De,ze]=v.useState();return Tr(()=>{_&&ze(window.getComputedStyle(_).zIndex)},[_]),E.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:oe?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:De,"--radix-popper-transform-origin":[(i=ae.transformOrigin)==null?void 0:i.x,(o=ae.transformOrigin)==null?void 0:o.y].join(" "),...((a=ae.hide)==null?void 0:a.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:E.jsx(eW,{scope:c,placedSide:ke,onArrowChange:B,arrowX:Me,arrowY:Be,shouldHideArrow:Te,children:E.jsx(we.div,{"data-side":ke,"data-align":ve,...A,ref:j,style:{...A.style,animation:oe?void 0:"none"}})})})});y_.displayName=OS;var v_="PopperArrow",rW={top:"bottom",right:"left",bottom:"top",left:"right"},m_=v.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=tW(v_,n),o=rW[i.placedSide];return E.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:E.jsx(Xq,{...s,ref:r,style:{...s.style,display:"block"}})})});m_.displayName=v_;function nW(t){return t!==null}var sW=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s;const{placement:i,rects:o,middlewareData:a}=e,l=((r=a.arrow)==null?void 0:r.centerOffset)!==0,u=l?0:t.arrowWidth,f=l?0:t.arrowHeight,[d,h]=g_(i),p={start:"0%",center:"50%",end:"100%"}[h],y=(((n=a.arrow)==null?void 0:n.x)??0)+u/2,g=(((s=a.arrow)==null?void 0:s.y)??0)+f/2;let m="",x="";return d==="bottom"?(m=l?p:`${y}px`,x=`${-f}px`):d==="top"?(m=l?p:`${y}px`,x=`${o.floating.height+f}px`):d==="right"?(m=`${-f}px`,x=l?p:`${g}px`):d==="left"&&(m=`${o.floating.width+f}px`,x=l?p:`${g}px`),{data:{x:m,y:x}}}});function g_(t){const[e,r="center"]=t.split("-");return[e,r]}var _S=d_,NS=p_,MS=y_,DS=m_,iW="Portal",oy=v.forwardRef((t,e)=>{var r;const{container:n,...s}=t,[i,o]=v.useState(!1);Tr(()=>o(!0),[]);const a=n||i&&((r=globalThis==null?void 0:globalThis.document)==null?void 0:r.body);return a?dO.createPortal(E.jsx(we.div,{...s,ref:e}),a):null});oy.displayName=iW;var ax="rovingFocusGroup.onEntryFocus",oW={bubbles:!1,cancelable:!0},bm="RovingFocusGroup",[Sw,x_,aW]=vm(bm),[cW,ud]=Wr(bm,[aW]),[lW,uW]=cW(bm),b_=v.forwardRef((t,e)=>E.jsx(Sw.Provider,{scope:t.__scopeRovingFocusGroup,children:E.jsx(Sw.Slot,{scope:t.__scopeRovingFocusGroup,children:E.jsx(fW,{...t,ref:e})})}));b_.displayName=bm;var fW=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=t,d=v.useRef(null),h=$e(e,d),p=sy(i),[y=null,g]=ps({prop:o,defaultProp:a,onChange:c}),[m,x]=v.useState(!1),b=Gr(l),w=x_(r),A=v.useRef(!1),[O,_]=v.useState(0);return v.useEffect(()=>{const C=d.current;if(C)return C.addEventListener(ax,b),()=>C.removeEventListener(ax,b)},[b]),E.jsx(lW,{scope:r,orientation:n,dir:p,loop:s,currentTabStopId:y,onItemFocus:v.useCallback(C=>g(C),[g]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>_(C=>C+1),[]),onFocusableItemRemove:v.useCallback(()=>_(C=>C-1),[]),children:E.jsx(we.div,{tabIndex:m||O===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:ce(t.onMouseDown,()=>{A.current=!0}),onFocus:ce(t.onFocus,C=>{const j=!A.current;if(C.target===C.currentTarget&&j&&!m){const V=new CustomEvent(ax,oW);if(C.currentTarget.dispatchEvent(V),!V.defaultPrevented){const B=w().filter(T=>T.focusable),z=B.find(T=>T.active),Y=B.find(T=>T.id===y),L=[z,Y,...B].filter(Boolean).map(T=>T.ref.current);S_(L,u)}}A.current=!1}),onBlur:ce(t.onBlur,()=>x(!1))})})}),w_="RovingFocusGroupItem",E_=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=us(),c=i||a,l=uW(w_,r),u=l.currentTabStopId===c,f=x_(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return v.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),E.jsx(Sw.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:E.jsx(we.span,{tabIndex:u?0:-1,"data-orientation":l.orientation,...o,ref:e,onMouseDown:ce(t.onMouseDown,p=>{n?l.onItemFocus(c):p.preventDefault()}),onFocus:ce(t.onFocus,()=>l.onItemFocus(c)),onKeyDown:ce(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){l.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const y=pW(p,l.orientation,l.dir);if(y!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let m=f().filter(x=>x.focusable).map(x=>x.ref.current);if(y==="last")m.reverse();else if(y==="prev"||y==="next"){y==="prev"&&m.reverse();const x=m.indexOf(p.currentTarget);m=l.loop?yW(m,x+1):m.slice(x+1)}setTimeout(()=>S_(m))}})})})});E_.displayName=w_;var dW={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hW(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function pW(t,e,r){const n=hW(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return dW[n]}function S_(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function yW(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var LS=b_,jS=E_,vW=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Nl=new WeakMap,s1=new WeakMap,i1={},cx=0,C_=function(t){return t&&(t.host||C_(t.parentNode))},mW=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=C_(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})},gW=function(t,e,r,n){var s=mW(e,Array.isArray(t)?t:[t]);i1[r]||(i1[r]=new WeakMap);var i=i1[r],o=[],a=new Set,c=new Set(s),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};s.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else try{var h=d.getAttribute(n),p=h!==null&&h!=="false",y=(Nl.get(d)||0)+1,g=(i.get(d)||0)+1;Nl.set(d,y),i.set(d,g),o.push(d),y===1&&p&&s1.set(d,!0),g===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}catch(m){console.error("aria-hidden: cannot operate on ",d,m)}})};return u(e),a.clear(),cx++,function(){o.forEach(function(f){var d=Nl.get(f)-1,h=i.get(f)-1;Nl.set(f,d),i.set(f,h),d||(s1.has(f)||f.removeAttribute(n),s1.delete(f)),h||f.removeAttribute(r)}),cx--,cx||(Nl=new WeakMap,Nl=new WeakMap,s1=new WeakMap,i1={})}},BS=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=vW(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),gW(n,s,r,"aria-hidden")):function(){return null}},ci=function(){return ci=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return DW;var e=LW(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])}},BW=P_(),Tu="data-scroll-locked",FW=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(bW,` { + */var uR;function zH(){if(uR)return Nd;uR=1;var t=cr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,l){var u,f={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(u in c)n.call(c,u)&&!i.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:e,type:a,key:d,ref:h,props:f,_owner:s.current}}return Nd.Fragment=r,Nd.jsx=o,Nd.jsxs=o,Nd}F6.exports=zH();var E=F6.exports;function HH(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 GH(t){var e=HH(t,"string");return typeof e=="symbol"?e:String(e)}function qH(t,e,r){return e=GH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fR(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function dR(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},Nt=t=>{var e=r=>{var n=t.defaultClassName,s=dR(dR({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var c=a;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[i][c];l&&(n+=" "+l)}}for(var[u,f]of t.compoundVariants)WH(u,s,t.defaultVariants)&&(n+=" "+f);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return hR(t.variantClassNames,r=>hR(r,n=>n.split(" ")[0]))}},e};Nt({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 gr=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return E.jsx(q,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var KH=Nt({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 ue=v.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:c,ellipsis:l,uppercase:u,capitalize:f,...d}=t,h=IH[n];return E.jsx(q,{as:r,className:qr(s,KH({hidden:i,ellipsis:l,italic:o,underline:a,uppercase:u,capitalize:f})),ref:e,...h,...d,children:c})});var QH=Nt({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 ut=v.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:c=!1,label:l,leftIcon:u,rightIcon:f,size:d="md",variant:h="glass",width:p="fit",shape:y="circle",type:g="button",...m}=t,x=u!==void 0&&l!==void 0,b=f!==void 0&&l!==void 0,w=u!==void 0&&l===void 0,A=d==="xs"?"xs":"sm";return E.jsx(q,{as:r,className:qr(s,QH({activeOutline:n,disabled:i||c,hasLeftIcon:x,hasRightIcon:b,iconOnly:w,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||c,display:o,fontWeight:a,ref:e,type:g,width:p,...m,children:w?E.jsx(u,{size:A}):E.jsxs(q,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[E.jsxs(q,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[u&&E.jsx(u,{size:A}),E.jsx(ue,{children:l})]}),f&&E.jsx(f,{size:A})]})})});var YH=Nt({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 JH=v.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:c="full",...l}=t;return E.jsx(q,{className:qr(r,YH({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:c,ref:e,...l,children:n})});function XH(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function hm(...t){return e=>t.forEach(r=>XH(r,e))}function $e(...t){return v.useCallback(hm(...t),t)}function ZH(t,e){const r=v.createContext(e);function n(i){const{children:o,...a}=i,c=v.useMemo(()=>a,Object.values(a));return E.jsx(r.Provider,{value:c,children:o})}function s(i){const o=v.useContext(r);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return n.displayName=t+"Provider",[n,s]}function Wr(t,e=[]){let r=[];function n(i,o){const a=v.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...p}=f,y=(d==null?void 0:d[t][c])||a,g=v.useMemo(()=>p,Object.values(p));return E.jsx(y.Provider,{value:g,children:h})}function u(f,d){const h=(d==null?void 0:d[t][c])||a,p=v.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const s=()=>{const i=r.map(o=>v.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return v.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[n,eG(s,...e)]}function eG(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ce(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Gr(t){const e=v.useRef(t);return v.useEffect(()=>{e.current=t}),v.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function ps({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=tG({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=Gr(r),c=v.useCallback(l=>{if(i){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else s(l)},[i,t,s,a]);return[o,c]}function tG({defaultProp:t,onChange:e}){const r=v.useState(t),[n]=r,s=v.useRef(n),i=Gr(e);return v.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function pm(t){const e=v.useRef({value:t,previous:t});return v.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var Tr=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{};function ym(t){const[e,r]=v.useState(void 0);return Tr(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.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 rG(t,e){return v.useReducer((r,n)=>e[r][n]??r,t)}var cn=t=>{const{present:e,children:r}=t,n=nG(e),s=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),i=$e(n.ref,sG(s));return typeof r=="function"||n.isPresent?v.cloneElement(s,{ref:i}):null};cn.displayName="Presence";function nG(t){const[e,r]=v.useState(),n=v.useRef({}),s=v.useRef(t),i=v.useRef("none"),o=t?"mounted":"unmounted",[a,c]=rG(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=r1(n.current);i.current=a==="mounted"?l:"none"},[a]),Tr(()=>{const l=n.current,u=s.current;if(u!==t){const d=i.current,h=r1(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Tr(()=>{if(e){const l=f=>{const h=r1(n.current).includes(f.animationName);f.target===e&&h&&Eo.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(i.current=r1(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function r1(t){return(t==null?void 0:t.animationName)||"none"}function sG(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var ll=v.forwardRef((t,e)=>{const{children:r,...n}=t,s=v.Children.toArray(r),i=s.find(iG);if(i){const o=i.props.children,a=s.map(c=>c===i?v.Children.count(o)>1?v.Children.only(null):v.isValidElement(o)?o.props.children:null:c);return E.jsx(xw,{...n,ref:e,children:v.isValidElement(o)?v.cloneElement(o,void 0,a):null})}return E.jsx(xw,{...n,ref:e,children:r})});ll.displayName="Slot";var xw=v.forwardRef((t,e)=>{const{children:r,...n}=t;if(v.isValidElement(r)){const s=aG(r);return v.cloneElement(r,{...oG(n,r.props),ref:e?hm(e,s):s})}return v.Children.count(r)>1?v.Children.only(null):null});xw.displayName="SlotClone";var U6=({children:t})=>E.jsx(E.Fragment,{children:t});function iG(t){return v.isValidElement(t)&&t.type===U6}function oG(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}function aG(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var cG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],we=cG.reduce((t,e)=>{const r=v.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?ll:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(a,{...o,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function vS(t,e){t&&Eo.flushSync(()=>t.dispatchEvent(e))}var mS="Checkbox",[lG,O1e]=Wr(mS),[uG,fG]=lG(mS),V6=v.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=v.useState(null),h=$e(e,b=>d(b)),p=v.useRef(!1),y=f?!!f.closest("form"):!0,[g=!1,m]=ps({prop:s,defaultProp:i,onChange:l}),x=v.useRef(g);return v.useEffect(()=>{const b=f==null?void 0:f.form;if(b){const w=()=>m(x.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[f,m]),E.jsxs(uG,{scope:r,state:g,disabled:a,children:[E.jsx(we.button,{type:"button",role:"checkbox","aria-checked":Zc(g)?"mixed":g,"aria-required":o,"data-state":H6(g),"data-disabled":a?"":void 0,disabled:a,value:c,...u,ref:h,onKeyDown:ce(t.onKeyDown,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:ce(t.onClick,b=>{m(w=>Zc(w)?!0:!w),y&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})}),y&&E.jsx(dG,{control:f,bubbles:!p.current,name:n,value:c,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});V6.displayName=mS;var $6="CheckboxIndicator",z6=v.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=fG($6,r);return E.jsx(cn,{present:n||Zc(i.state)||i.state===!0,children:E.jsx(we.span,{"data-state":H6(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});z6.displayName=$6;var dG=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=v.useRef(null),o=pm(r),a=ym(e);return v.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});c.indeterminate=Zc(r),f.call(c,Zc(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),E.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:Zc(r)?!1:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Zc(t){return t==="indeterminate"}function H6(t){return Zc(t)?"indeterminate":t?"checked":"unchecked"}var hG=V6,pG=z6,yG=Nt({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 Al=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?E.jsxs(q,{flexDirection:"column",gap:"0.5",children:[r&&E.jsx(ue,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&E.jsx(ue,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return E.jsxs(q,{as:"label",className:yG({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var ny=Nt({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const vG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),gS=({size:t="sm",...e})=>E.jsx(q,{as:vG,className:ny({size:t}),...e}),mG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.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"})}),G6=({size:t="sm",...e})=>E.jsx(q,{as:mG,className:ny({size:t}),...e}),gG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.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"})}),Gh=({size:t="sm",...e})=>E.jsx(q,{as:gG,className:ny({size:t}),...e}),xG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.608 6.75h-5.19v-1.5h7.75V13h-1.5V7.81l-7.72 7.72-1.06-1.06 7.72-7.72Z",clipRule:"evenodd"})}),bG=({size:t="sm",...e})=>E.jsx(q,{as:xG,className:ny({size:t}),...e}),wG=t=>E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:E.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"})}),EG=({size:t="sm",...e})=>E.jsx(q,{as:wG,className:ny({size:t}),...e});var SG=Nt({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:[]}),CG="_1c9x66f4 fyvr12s1 fyvr11h0 fyvr11ko fyvr11jg fyvr128 fyvr15o";const AG=({size:t="sm"})=>E.jsx(pG,{className:CG,children:E.jsx(gS,{size:t==="lg"?"sm":"xs"})});v.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...c}=t;return E.jsx(Al,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:E.jsx(hG,{className:SG({size:a}),disabled:r,id:n??s,name:s,ref:e,...c,children:E.jsx(AG,{size:a})})})});cr.createContext(null);var kG=l5["useId".toString()]||(()=>{}),TG=0;function us(t){const[e,r]=v.useState(kG());return Tr(()=>{t||r(n=>n??String(TG++))},[t]),t||(e?`radix-${e}`:"")}var xS="Collapsible",[PG,_1e]=Wr(xS),[RG,bS]=PG(xS),q6=v.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[c=!1,l]=ps({prop:n,defaultProp:s,onChange:o});return E.jsx(RG,{scope:r,disabled:i,contentId:us(),open:c,onOpenToggle:v.useCallback(()=>l(u=>!u),[l]),children:E.jsx(we.div,{"data-state":ES(c),"data-disabled":i?"":void 0,...a,ref:e})})});q6.displayName=xS;var W6="CollapsibleTrigger",K6=v.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,s=bS(W6,r);return E.jsx(we.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":ES(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:ce(t.onClick,s.onOpenToggle)})});K6.displayName=W6;var wS="CollapsibleContent",Q6=v.forwardRef((t,e)=>{const{forceMount:r,...n}=t,s=bS(wS,t.__scopeCollapsible);return E.jsx(cn,{present:r||s.open,children:({present:i})=>E.jsx(IG,{...n,ref:e,present:i})})});Q6.displayName=wS;var IG=v.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:s,...i}=t,o=bS(wS,r),[a,c]=v.useState(n),l=v.useRef(null),u=$e(e,l),f=v.useRef(0),d=f.current,h=v.useRef(0),p=h.current,y=o.open||a,g=v.useRef(y),m=v.useRef();return v.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),Tr(()=>{const x=l.current;if(x){m.current=m.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();f.current=b.height,h.current=b.width,g.current||(x.style.transitionDuration=m.current.transitionDuration,x.style.animationName=m.current.animationName),c(n)}},[o.open,n]),E.jsx(we.div,{"data-state":ES(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!y,...i,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...t.style},children:y&&s})});function ES(t){return t?"open":"closed"}var OG=q6,_G=K6,NG=Q6,pR="64px",MG="_4j62fl0",DG="_4j62fl2 _4j62fl1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11od fyvr128 fyvr12v7 fyvr11n4 _4efw240",LG="_4j62fl4 _4j62fl3 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",jG="_4j62fl5";const _l=t=>{const{className:e,children:r,defaultOpen:n,open:s,onOpenChange:i,label:o,...a}=t,[c,l]=v.useState(n),u=s??c,f=h=>{s===void 0&&l(h)},d=h=>{f(h),i==null||i(h)};return E.jsx(OG,{open:u,defaultOpen:n,onOpenChange:d,asChild:!0,children:E.jsxs(q,{as:Xc.div,className:qr(e,MG),initial:{height:u?"auto":pR},animate:{height:u?"auto":pR},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[E.jsxs(_G,{className:DG,children:[E.jsx(ue,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),E.jsx(q,{as:Xc.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:u?180:0},animate:{rotate:u?180:0},transition:{ease:"linear",duration:.1},children:E.jsx(G6,{className:jG,color:"text50"})})]}),E.jsx(yS,{children:u&&E.jsx(NG,{className:LG,asChild:!0,forceMount:!0,children:E.jsx(Xc.div,{initial:{opacity:u?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function vm(t){const e=t+"CollectionProvider",[r,n]=Wr(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:p,children:y}=h,g=cr.useRef(null),m=cr.useRef(new Map).current;return E.jsx(s,{scope:p,itemMap:m,collectionRef:g,children:y})};o.displayName=e;const a=t+"CollectionSlot",c=cr.forwardRef((h,p)=>{const{scope:y,children:g}=h,m=i(a,y),x=$e(p,m.collectionRef);return E.jsx(ll,{ref:x,children:g})});c.displayName=a;const l=t+"CollectionItemSlot",u="data-radix-collection-item",f=cr.forwardRef((h,p)=>{const{scope:y,children:g,...m}=h,x=cr.useRef(null),b=$e(p,x),w=i(l,y);return cr.useEffect(()=>(w.itemMap.set(x,{ref:x,...m}),()=>void w.itemMap.delete(x))),E.jsx(ll,{[u]:"",ref:b,children:g})});f.displayName=l;function d(h){const p=i(t+"CollectionConsumer",h);return cr.useCallback(()=>{const g=p.collectionRef.current;if(!g)return[];const m=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((w,A)=>m.indexOf(w.ref.current)-m.indexOf(A.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},d,n]}var BG=v.createContext(void 0);function sy(t){const e=v.useContext(BG);return t||e||"ltr"}function FG(t,e=globalThis==null?void 0:globalThis.document){const r=Gr(t);v.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var UG="DismissableLayer",bw="dismissableLayer.update",VG="dismissableLayer.pointerDownOutside",$G="dismissableLayer.focusOutside",yR,Y6=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),od=v.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=t,l=v.useContext(Y6),[u,f]=v.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),p=$e(e,_=>f(_)),y=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(g),x=u?y.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,w=x>=m,A=HG(_=>{const C=_.target,j=[...l.branches].some(V=>V.contains(C));!w||j||(s==null||s(_),o==null||o(_),_.defaultPrevented||a==null||a())},d),O=GG(_=>{const C=_.target;[...l.branches].some(V=>V.contains(C))||(i==null||i(_),o==null||o(_),_.defaultPrevented||a==null||a())},d);return FG(_=>{x===l.layers.size-1&&(n==null||n(_),!_.defaultPrevented&&a&&(_.preventDefault(),a()))},d),v.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(yR=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),vR(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=yR)}},[u,d,r,l]),v.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),vR())},[u,l]),v.useEffect(()=>{const _=()=>h({});return document.addEventListener(bw,_),()=>document.removeEventListener(bw,_)},[]),E.jsx(we.div,{...c,ref:p,style:{pointerEvents:b?w?"auto":"none":void 0,...t.style},onFocusCapture:ce(t.onFocusCapture,O.onFocusCapture),onBlurCapture:ce(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:ce(t.onPointerDownCapture,A.onPointerDownCapture)})});od.displayName=UG;var zG="DismissableLayerBranch",J6=v.forwardRef((t,e)=>{const r=v.useContext(Y6),n=v.useRef(null),s=$e(e,n);return v.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),E.jsx(we.div,{...t,ref:s})});J6.displayName=zG;function HG(t,e=globalThis==null?void 0:globalThis.document){const r=Gr(t),n=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){X6(VG,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function GG(t,e=globalThis==null?void 0:globalThis.document){const r=Gr(t),n=v.useRef(!1);return v.useEffect(()=>{const s=i=>{i.target&&!n.current&&X6($G,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function vR(){const t=new CustomEvent(bw);document.dispatchEvent(t)}function X6(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?vS(s,i):s.dispatchEvent(i)}var qG=od,WG=J6,nx=0;function SS(){v.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??mR()),document.body.insertAdjacentElement("beforeend",t[1]??mR()),nx++,()=>{nx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),nx--}},[])}function mR(){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}var sx="focusScope.autoFocusOnMount",ix="focusScope.autoFocusOnUnmount",gR={bubbles:!1,cancelable:!0},KG="FocusScope",mm=v.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=v.useState(null),l=Gr(s),u=Gr(i),f=v.useRef(null),d=$e(e,y=>c(y)),h=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let y=function(b){if(h.paused||!a)return;const w=b.target;a.contains(w)?f.current=w:Do(f.current,{select:!0})},g=function(b){if(h.paused||!a)return;const w=b.relatedTarget;w!==null&&(a.contains(w)||Do(f.current,{select:!0}))},m=function(b){if(document.activeElement===document.body)for(const A of b)A.removedNodes.length>0&&Do(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const x=new MutationObserver(m);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),x.disconnect()}}},[n,a,h.paused]),v.useEffect(()=>{if(a){bR.add(h);const y=document.activeElement;if(!a.contains(y)){const m=new CustomEvent(sx,gR);a.addEventListener(sx,l),a.dispatchEvent(m),m.defaultPrevented||(QG(eq(Z6(a)),{select:!0}),document.activeElement===y&&Do(a))}return()=>{a.removeEventListener(sx,l),setTimeout(()=>{const m=new CustomEvent(ix,gR);a.addEventListener(ix,u),a.dispatchEvent(m),m.defaultPrevented||Do(y??document.body,{select:!0}),a.removeEventListener(ix,u),bR.remove(h)},0)}}},[a,l,u,h]);const p=v.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,m=document.activeElement;if(g&&m){const x=y.currentTarget,[b,w]=YG(x);b&&w?!y.shiftKey&&m===w?(y.preventDefault(),r&&Do(b,{select:!0})):y.shiftKey&&m===b&&(y.preventDefault(),r&&Do(w,{select:!0})):m===x&&y.preventDefault()}},[r,n,h.paused]);return E.jsx(we.div,{tabIndex:-1,...o,ref:d,onKeyDown:p})});mm.displayName=KG;function QG(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Do(n,{select:e}),document.activeElement!==r)return}function YG(t){const e=Z6(t),r=xR(e,t),n=xR(e.reverse(),t);return[r,n]}function Z6(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function xR(t,e){for(const r of t)if(!JG(r,{upTo:e}))return r}function JG(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 XG(t){return t instanceof HTMLInputElement&&"select"in t}function Do(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&XG(t)&&e&&t.select()}}var bR=ZG();function ZG(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=wR(t,e),t.unshift(e)},remove(e){var r;t=wR(t,e),(r=t[0])==null||r.resume()}}}function wR(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function eq(t){return t.filter(e=>e.tagName!=="A")}const tq=["top","right","bottom","left"],hi=Math.min,_n=Math.max,Qv=Math.round,n1=Math.floor,Ia=t=>({x:t,y:t}),rq={left:"right",right:"left",bottom:"top",top:"bottom"},nq={start:"end",end:"start"};function ww(t,e,r){return _n(t,hi(e,r))}function vo(t,e){return typeof t=="function"?t(e):t}function mo(t){return t.split("-")[0]}function ad(t){return t.split("-")[1]}function CS(t){return t==="x"?"y":"x"}function AS(t){return t==="y"?"height":"width"}function Oa(t){return["top","bottom"].includes(mo(t))?"y":"x"}function kS(t){return CS(Oa(t))}function sq(t,e,r){r===void 0&&(r=!1);const n=ad(t),s=kS(t),i=AS(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Yv(o)),[o,Yv(o)]}function iq(t){const e=Yv(t);return[Ew(t),e,Ew(e)]}function Ew(t){return t.replace(/start|end/g,e=>nq[e])}function oq(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function aq(t,e,r,n){const s=ad(t);let i=oq(mo(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Ew)))),i}function Yv(t){return t.replace(/left|right|bottom|top/g,e=>rq[e])}function cq(t){return{top:0,right:0,bottom:0,left:0,...t}}function e_(t){return typeof t!="number"?cq(t):{top:t,right:t,bottom:t,left:t}}function Jv(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function ER(t,e,r){let{reference:n,floating:s}=t;const i=Oa(e),o=kS(e),a=AS(o),c=mo(e),l=i==="y",u=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-s.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-s.width,y:f};break;default:h={x:n.x,y:n.y}}switch(ad(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const lq=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:f}=ER(l,n,c),d=n,h={},p=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=vo(t,e)||{};if(l==null)return{};const f=e_(u),d={x:r,y:n},h=kS(s),p=AS(h),y=await o.getDimensions(l),g=h==="y",m=g?"top":"left",x=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[h]-d[h]-i.floating[p],A=d[h]-i.reference[h],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let _=O?O[b]:0;(!_||!await(o.isElement==null?void 0:o.isElement(O)))&&(_=a.floating[b]||i.floating[p]);const C=w/2-A/2,j=_/2-y[p]/2-1,V=hi(f[m],j),B=hi(f[x],j),$=V,Y=_-y[p]-B,H=_/2-y[p]/2+C,L=ww($,H,Y),T=!c.arrow&&ad(s)!=null&&H!==L&&i.reference[p]/2-(H<$?V:B)-y[p]/2<0,P=T?H<$?H-$:H-Y:0;return{[h]:d[h]+P,data:{[h]:L,centerOffset:H-L-P,...T&&{alignmentOffset:P}},reset:T}}}),fq=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:y=!0,...g}=vo(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const m=mo(s),x=Oa(a),b=mo(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(l.floating)),A=d||(b||!y?[Yv(a)]:iq(a)),O=p!=="none";!d&&O&&A.push(...aq(a,y,p,w));const _=[a,...A],C=await qh(e,g),j=[];let V=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&j.push(C[m]),f){const H=sq(s,o,w);j.push(C[H[0]],C[H[1]])}if(V=[...V,{placement:s,overflows:j}],!j.every(H=>H<=0)){var B,$;const H=(((B=i.flip)==null?void 0:B.index)||0)+1,L=_[H];if(L)return{data:{index:H,overflows:V},reset:{placement:L}};let T=($=V.filter(P=>P.overflows[0]<=0).sort((P,R)=>P.overflows[1]-R.overflows[1])[0])==null?void 0:$.placement;if(!T)switch(h){case"bestFit":{var Y;const P=(Y=V.filter(R=>{if(O){const I=Oa(R.placement);return I===x||I==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(I=>I>0).reduce((I,U)=>I+U,0)]).sort((R,I)=>R[1]-I[1])[0])==null?void 0:Y[0];P&&(T=P);break}case"initialPlacement":T=a;break}if(s!==T)return{reset:{placement:T}}}return{}}}};function SR(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function CR(t){return tq.some(e=>t[e]>=0)}const dq=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=vo(t,e);switch(n){case"referenceHidden":{const i=await qh(e,{...s,elementContext:"reference"}),o=SR(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:CR(o)}}}case"escaped":{const i=await qh(e,{...s,altBoundary:!0}),o=SR(i,r.floating);return{data:{escapedOffsets:o,escaped:CR(o)}}}default:return{}}}}};async function hq(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=mo(r),a=ad(r),c=Oa(r)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,f=vo(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const pq=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,c=await hq(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},yq=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:m,y:x}=g;return{x:m,y:x}}},...c}=vo(t,e),l={x:r,y:n},u=await qh(e,c),f=Oa(mo(s)),d=CS(f);let h=l[d],p=l[f];if(i){const g=d==="y"?"top":"left",m=d==="y"?"bottom":"right",x=h+u[g],b=h-u[m];h=ww(x,h,b)}if(o){const g=f==="y"?"top":"left",m=f==="y"?"bottom":"right",x=p+u[g],b=p-u[m];p=ww(x,p,b)}const y=a.fn({...e,[d]:h,[f]:p});return{...y,data:{x:y.x-r,y:y.y-n}}}}},vq=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=vo(t,e),u={x:r,y:n},f=Oa(s),d=CS(f);let h=u[d],p=u[f];const y=vo(a,e),g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=d==="y"?"height":"width",w=i.reference[d]-i.floating[b]+g.mainAxis,A=i.reference[d]+i.reference[b]-g.mainAxis;hA&&(h=A)}if(l){var m,x;const b=d==="y"?"width":"height",w=["top","left"].includes(mo(s)),A=i.reference[f]-i.floating[b]+(w&&((m=o.offset)==null?void 0:m[f])||0)+(w?0:g.crossAxis),O=i.reference[f]+i.reference[b]+(w?0:((x=o.offset)==null?void 0:x[f])||0)-(w?g.crossAxis:0);pO&&(p=O)}return{[d]:h,[f]:p}}}},mq=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=vo(t,e),c=await qh(e,a),l=mo(r),u=ad(r),f=Oa(r)==="y",{width:d,height:h}=n.floating;let p,y;l==="top"||l==="bottom"?(p=l,y=u===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=l,p=u==="end"?"top":"bottom");const g=h-c.top-c.bottom,m=d-c.left-c.right,x=hi(h-c[p],g),b=hi(d-c[y],m),w=!e.middlewareData.shift;let A=x,O=b;if(f?O=u||w?hi(b,m):m:A=u||w?hi(x,g):g,w&&!u){const C=_n(c.left,0),j=_n(c.right,0),V=_n(c.top,0),B=_n(c.bottom,0);f?O=d-2*(C!==0||j!==0?C+j:_n(c.left,c.right)):A=h-2*(V!==0||B!==0?V+B:_n(c.top,c.bottom))}await o({...e,availableWidth:O,availableHeight:A});const _=await s.getDimensions(i.floating);return d!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function cd(t){return t_(t)?(t.nodeName||"").toLowerCase():"#document"}function jn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function So(t){var e;return(e=(t_(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function t_(t){return t instanceof Node||t instanceof jn(t).Node}function bi(t){return t instanceof Element||t instanceof jn(t).Element}function wi(t){return t instanceof HTMLElement||t instanceof jn(t).HTMLElement}function AR(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof jn(t).ShadowRoot}function iy(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Fs(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function gq(t){return["table","td","th"].includes(cd(t))}function gm(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function TS(t){const e=PS(),r=Fs(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 xq(t){let e=_a(t);for(;wi(e)&&!Bf(e);){if(gm(e))return null;if(TS(e))return e;e=_a(e)}return null}function PS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bf(t){return["html","body","#document"].includes(cd(t))}function Fs(t){return jn(t).getComputedStyle(t)}function xm(t){return bi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _a(t){if(cd(t)==="html")return t;const e=t.assignedSlot||t.parentNode||AR(t)&&t.host||So(t);return AR(e)?e.host:e}function r_(t){const e=_a(t);return Bf(e)?t.ownerDocument?t.ownerDocument.body:t.body:wi(e)&&iy(e)?e:r_(e)}function Wh(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=r_(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=jn(s);return i?e.concat(o,o.visualViewport||[],iy(s)?s:[],o.frameElement&&r?Wh(o.frameElement):[]):e.concat(s,Wh(s,[],r))}function n_(t){const e=Fs(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=wi(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Qv(r)!==i||Qv(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function RS(t){return bi(t)?t:t.contextElement}function ku(t){const e=RS(t);if(!wi(e))return Ia(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=n_(e);let o=(i?Qv(r.width):r.width)/n,a=(i?Qv(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const bq=Ia(0);function s_(t){const e=jn(t);return!PS()||!e.visualViewport?bq:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function wq(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==jn(t)?!1:e}function ul(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=RS(t);let o=Ia(1);e&&(n?bi(n)&&(o=ku(n)):o=ku(t));const a=wq(i,r,n)?s_(i):Ia(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,u=s.width/o.x,f=s.height/o.y;if(i){const d=jn(i),h=n&&bi(n)?jn(n):n;let p=d,y=p.frameElement;for(;y&&n&&h!==p;){const g=ku(y),m=y.getBoundingClientRect(),x=Fs(y),b=m.left+(y.clientLeft+parseFloat(x.paddingLeft))*g.x,w=m.top+(y.clientTop+parseFloat(x.paddingTop))*g.y;c*=g.x,l*=g.y,u*=g.x,f*=g.y,c+=b,l+=w,p=jn(y),y=p.frameElement}}return Jv({width:u,height:f,x:c,y:l})}function Eq(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=So(n),a=e?gm(e.floating):!1;if(n===o||a&&i)return r;let c={scrollLeft:0,scrollTop:0},l=Ia(1);const u=Ia(0),f=wi(n);if((f||!f&&!i)&&((cd(n)!=="body"||iy(o))&&(c=xm(n)),wi(n))){const d=ul(n);l=ku(n),u.x=d.x+n.clientLeft,u.y=d.y+n.clientTop}return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x,y:r.y*l.y-c.scrollTop*l.y+u.y}}function Sq(t){return Array.from(t.getClientRects())}function i_(t){return ul(So(t)).left+xm(t).scrollLeft}function Cq(t){const e=So(t),r=xm(t),n=t.ownerDocument.body,s=_n(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=_n(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+i_(t);const a=-r.scrollTop;return Fs(n).direction==="rtl"&&(o+=_n(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function Aq(t,e){const r=jn(t),n=So(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=PS();(!l||l&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function kq(t,e){const r=ul(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=wi(t)?ku(t):Ia(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function kR(t,e,r){let n;if(e==="viewport")n=Aq(t,r);else if(e==="document")n=Cq(So(t));else if(bi(e))n=kq(e,r);else{const s=s_(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Jv(n)}function o_(t,e){const r=_a(t);return r===e||!bi(r)||Bf(r)?!1:Fs(r).position==="fixed"||o_(r,e)}function Tq(t,e){const r=e.get(t);if(r)return r;let n=Wh(t,[],!1).filter(a=>bi(a)&&cd(a)!=="body"),s=null;const i=Fs(t).position==="fixed";let o=i?_a(t):t;for(;bi(o)&&!Bf(o);){const a=Fs(o),c=TS(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||iy(o)&&!c&&o_(t,o))?n=n.filter(u=>u!==o):s=a,o=_a(o)}return e.set(t,n),n}function Pq(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?gm(e)?[]:Tq(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=kR(e,u,s);return l.top=_n(f.top,l.top),l.right=hi(f.right,l.right),l.bottom=hi(f.bottom,l.bottom),l.left=_n(f.left,l.left),l},kR(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Rq(t){const{width:e,height:r}=n_(t);return{width:e,height:r}}function Iq(t,e,r){const n=wi(e),s=So(e),i=r==="fixed",o=ul(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=Ia(0);if(n||!n&&!i)if((cd(e)!=="body"||iy(s))&&(a=xm(e)),n){const f=ul(e,!0,i,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else s&&(c.x=i_(s));const l=o.left+a.scrollLeft-c.x,u=o.top+a.scrollTop-c.y;return{x:l,y:u,width:o.width,height:o.height}}function ox(t){return Fs(t).position==="static"}function TR(t,e){return!wi(t)||Fs(t).position==="fixed"?null:e?e(t):t.offsetParent}function a_(t,e){const r=jn(t);if(gm(t))return r;if(!wi(t)){let s=_a(t);for(;s&&!Bf(s);){if(bi(s)&&!ox(s))return s;s=_a(s)}return r}let n=TR(t,e);for(;n&&gq(n)&&ox(n);)n=TR(n,e);return n&&Bf(n)&&ox(n)&&!TS(n)?r:n||xq(t)||r}const Oq=async function(t){const e=this.getOffsetParent||a_,r=this.getDimensions,n=await r(t.floating);return{reference:Iq(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function _q(t){return Fs(t).direction==="rtl"}const Nq={convertOffsetParentRelativeRectToViewportRelativeRect:Eq,getDocumentElement:So,getClippingRect:Pq,getOffsetParent:a_,getElementRects:Oq,getClientRects:Sq,getDimensions:Rq,getScale:ku,isElement:bi,isRTL:_q};function Mq(t,e){let r=null,n;const s=So(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=n1(u),p=n1(s.clientWidth-(l+f)),y=n1(s.clientHeight-(u+d)),g=n1(l),x={rootMargin:-h+"px "+-p+"px "+-y+"px "+-g+"px",threshold:_n(0,hi(1,c))||1};let b=!0;function w(A){const O=A[0].intersectionRatio;if(O!==c){if(!b)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{r=new IntersectionObserver(w,{...x,root:s.ownerDocument})}catch{r=new IntersectionObserver(w,x)}r.observe(t)}return o(!0),i}function Dq(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=RS(t),u=s||i?[...l?Wh(l):[],...Wh(e)]:[];u.forEach(m=>{s&&m.addEventListener("scroll",r,{passive:!0}),i&&m.addEventListener("resize",r)});const f=l&&a?Mq(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(m=>{let[x]=m;x&&x.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let p,y=c?ul(t):null;c&&g();function g(){const m=ul(t);y&&(m.x!==y.x||m.y!==y.y||m.width!==y.width||m.height!==y.height)&&r(),y=m,p=requestAnimationFrame(g)}return r(),()=>{var m;u.forEach(x=>{s&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),f==null||f(),(m=h)==null||m.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const Lq=pq,jq=yq,Bq=fq,Fq=mq,Uq=dq,PR=uq,Vq=vq,$q=(t,e,r)=>{const n=new Map,s={platform:Nq,...r},i={...s.platform,_c:n};return lq(t,e,{...s,platform:i})};var K1=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Xv(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,s;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(!Xv(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Xv(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function c_(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function RR(t,e){const r=c_(t);return Math.round(e*r)/r}function IR(t){const e=v.useRef(t);return K1(()=>{e.current=t}),e}function zq(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[u,f]=v.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=v.useState(n);Xv(d,n)||h(n);const[p,y]=v.useState(null),[g,m]=v.useState(null),x=v.useCallback(P=>{P!==O.current&&(O.current=P,y(P))},[]),b=v.useCallback(P=>{P!==_.current&&(_.current=P,m(P))},[]),w=i||p,A=o||g,O=v.useRef(null),_=v.useRef(null),C=v.useRef(u),j=c!=null,V=IR(c),B=IR(s),$=v.useCallback(()=>{if(!O.current||!_.current)return;const P={placement:e,strategy:r,middleware:d};B.current&&(P.platform=B.current),$q(O.current,_.current,P).then(R=>{const I={...R,isPositioned:!0};Y.current&&!Xv(C.current,I)&&(C.current=I,Eo.flushSync(()=>{f(I)}))})},[d,e,r,B]);K1(()=>{l===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[l]);const Y=v.useRef(!1);K1(()=>(Y.current=!0,()=>{Y.current=!1}),[]),K1(()=>{if(w&&(O.current=w),A&&(_.current=A),w&&A){if(V.current)return V.current(w,A,$);$()}},[w,A,$,V,j]);const H=v.useMemo(()=>({reference:O,floating:_,setReference:x,setFloating:b}),[x,b]),L=v.useMemo(()=>({reference:w,floating:A}),[w,A]),T=v.useMemo(()=>{const P={position:r,left:0,top:0};if(!L.floating)return P;const R=RR(L.floating,u.x),I=RR(L.floating,u.y);return a?{...P,transform:"translate("+R+"px, "+I+"px)",...c_(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:I}},[r,a,L.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:$,refs:H,elements:L,floatingStyles:T}),[u,$,H,L,T])}const Hq=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?PR({element:n.current,padding:s}).fn(r):{}:n?PR({element:n,padding:s}).fn(r):{}}}},Gq=(t,e)=>({...Lq(t),options:[t,e]}),qq=(t,e)=>({...jq(t),options:[t,e]}),Wq=(t,e)=>({...Vq(t),options:[t,e]}),Kq=(t,e)=>({...Bq(t),options:[t,e]}),Qq=(t,e)=>({...Fq(t),options:[t,e]}),Yq=(t,e)=>({...Uq(t),options:[t,e]}),Jq=(t,e)=>({...Hq(t),options:[t,e]});var Xq="Arrow",l_=v.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return E.jsx(we.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});l_.displayName=Xq;var Zq=l_,IS="Popper",[u_,ld]=Wr(IS),[eW,f_]=u_(IS),d_=t=>{const{__scopePopper:e,children:r}=t,[n,s]=v.useState(null);return E.jsx(eW,{scope:e,anchor:n,onAnchorChange:s,children:r})};d_.displayName=IS;var h_="PopperAnchor",p_=v.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=f_(h_,r),o=v.useRef(null),a=$e(e,o);return v.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:E.jsx(we.div,{...s,ref:a})});p_.displayName=h_;var OS="PopperContent",[tW,rW]=u_(OS),y_=v.forwardRef((t,e)=>{var r,n,s,i,o,a;const{__scopePopper:c,side:l="bottom",sideOffset:u=0,align:f="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:y=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:b="optimized",onPlaced:w,...A}=t,O=f_(OS,c),[_,C]=v.useState(null),j=$e(e,at=>C(at)),[V,B]=v.useState(null),$=ym(V),Y=($==null?void 0:$.width)??0,H=($==null?void 0:$.height)??0,L=l+(f!=="center"?"-"+f:""),T=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(y)?y:[y],R=P.length>0,I={padding:T,boundary:P.filter(sW),altBoundary:R},{refs:U,floatingStyles:F,placement:X,isPositioned:oe,middlewareData:ae}=zq({strategy:"fixed",placement:L,whileElementsMounted:(...at)=>Dq(...at,{animationFrame:b==="always"}),elements:{reference:O.anchor},middleware:[Gq({mainAxis:u+H,alignmentAxis:d}),p&&qq({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Wq():void 0,...I}),p&&Kq({...I}),Qq({...I,apply:({elements:at,rects:qe,availableWidth:Kr,availableHeight:vs})=>{const{width:Qa,height:Ci}=qe.reference,Rl=at.floating.style;Rl.setProperty("--radix-popper-available-width",`${Kr}px`),Rl.setProperty("--radix-popper-available-height",`${vs}px`),Rl.setProperty("--radix-popper-anchor-width",`${Qa}px`),Rl.setProperty("--radix-popper-anchor-height",`${Ci}px`)}}),V&&Jq({element:V,padding:h}),iW({arrowWidth:Y,arrowHeight:H}),x&&Yq({strategy:"referenceHidden",...I})]}),[ke,ve]=g_(X),ie=Gr(w);Tr(()=>{oe&&(ie==null||ie())},[oe,ie]);const Me=(r=ae.arrow)==null?void 0:r.x,Be=(n=ae.arrow)==null?void 0:n.y,Te=((s=ae.arrow)==null?void 0:s.centerOffset)!==0,[De,ze]=v.useState();return Tr(()=>{_&&ze(window.getComputedStyle(_).zIndex)},[_]),E.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:oe?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:De,"--radix-popper-transform-origin":[(i=ae.transformOrigin)==null?void 0:i.x,(o=ae.transformOrigin)==null?void 0:o.y].join(" "),...((a=ae.hide)==null?void 0:a.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:E.jsx(tW,{scope:c,placedSide:ke,onArrowChange:B,arrowX:Me,arrowY:Be,shouldHideArrow:Te,children:E.jsx(we.div,{"data-side":ke,"data-align":ve,...A,ref:j,style:{...A.style,animation:oe?void 0:"none"}})})})});y_.displayName=OS;var v_="PopperArrow",nW={top:"bottom",right:"left",bottom:"top",left:"right"},m_=v.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=rW(v_,n),o=nW[i.placedSide];return E.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:E.jsx(Zq,{...s,ref:r,style:{...s.style,display:"block"}})})});m_.displayName=v_;function sW(t){return t!==null}var iW=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s;const{placement:i,rects:o,middlewareData:a}=e,l=((r=a.arrow)==null?void 0:r.centerOffset)!==0,u=l?0:t.arrowWidth,f=l?0:t.arrowHeight,[d,h]=g_(i),p={start:"0%",center:"50%",end:"100%"}[h],y=(((n=a.arrow)==null?void 0:n.x)??0)+u/2,g=(((s=a.arrow)==null?void 0:s.y)??0)+f/2;let m="",x="";return d==="bottom"?(m=l?p:`${y}px`,x=`${-f}px`):d==="top"?(m=l?p:`${y}px`,x=`${o.floating.height+f}px`):d==="right"?(m=`${-f}px`,x=l?p:`${g}px`):d==="left"&&(m=`${o.floating.width+f}px`,x=l?p:`${g}px`),{data:{x:m,y:x}}}});function g_(t){const[e,r="center"]=t.split("-");return[e,r]}var _S=d_,NS=p_,MS=y_,DS=m_,oW="Portal",oy=v.forwardRef((t,e)=>{var r;const{container:n,...s}=t,[i,o]=v.useState(!1);Tr(()=>o(!0),[]);const a=n||i&&((r=globalThis==null?void 0:globalThis.document)==null?void 0:r.body);return a?dO.createPortal(E.jsx(we.div,{...s,ref:e}),a):null});oy.displayName=oW;var ax="rovingFocusGroup.onEntryFocus",aW={bubbles:!1,cancelable:!0},bm="RovingFocusGroup",[Sw,x_,cW]=vm(bm),[lW,ud]=Wr(bm,[cW]),[uW,fW]=lW(bm),b_=v.forwardRef((t,e)=>E.jsx(Sw.Provider,{scope:t.__scopeRovingFocusGroup,children:E.jsx(Sw.Slot,{scope:t.__scopeRovingFocusGroup,children:E.jsx(dW,{...t,ref:e})})}));b_.displayName=bm;var dW=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=t,d=v.useRef(null),h=$e(e,d),p=sy(i),[y=null,g]=ps({prop:o,defaultProp:a,onChange:c}),[m,x]=v.useState(!1),b=Gr(l),w=x_(r),A=v.useRef(!1),[O,_]=v.useState(0);return v.useEffect(()=>{const C=d.current;if(C)return C.addEventListener(ax,b),()=>C.removeEventListener(ax,b)},[b]),E.jsx(uW,{scope:r,orientation:n,dir:p,loop:s,currentTabStopId:y,onItemFocus:v.useCallback(C=>g(C),[g]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>_(C=>C+1),[]),onFocusableItemRemove:v.useCallback(()=>_(C=>C-1),[]),children:E.jsx(we.div,{tabIndex:m||O===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:ce(t.onMouseDown,()=>{A.current=!0}),onFocus:ce(t.onFocus,C=>{const j=!A.current;if(C.target===C.currentTarget&&j&&!m){const V=new CustomEvent(ax,aW);if(C.currentTarget.dispatchEvent(V),!V.defaultPrevented){const B=w().filter(T=>T.focusable),$=B.find(T=>T.active),Y=B.find(T=>T.id===y),L=[$,Y,...B].filter(Boolean).map(T=>T.ref.current);S_(L,u)}}A.current=!1}),onBlur:ce(t.onBlur,()=>x(!1))})})}),w_="RovingFocusGroupItem",E_=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=us(),c=i||a,l=fW(w_,r),u=l.currentTabStopId===c,f=x_(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return v.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),E.jsx(Sw.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:E.jsx(we.span,{tabIndex:u?0:-1,"data-orientation":l.orientation,...o,ref:e,onMouseDown:ce(t.onMouseDown,p=>{n?l.onItemFocus(c):p.preventDefault()}),onFocus:ce(t.onFocus,()=>l.onItemFocus(c)),onKeyDown:ce(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){l.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const y=yW(p,l.orientation,l.dir);if(y!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let m=f().filter(x=>x.focusable).map(x=>x.ref.current);if(y==="last")m.reverse();else if(y==="prev"||y==="next"){y==="prev"&&m.reverse();const x=m.indexOf(p.currentTarget);m=l.loop?vW(m,x+1):m.slice(x+1)}setTimeout(()=>S_(m))}})})})});E_.displayName=w_;var hW={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pW(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function yW(t,e,r){const n=pW(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return hW[n]}function S_(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function vW(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var LS=b_,jS=E_,mW=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Nl=new WeakMap,s1=new WeakMap,i1={},cx=0,C_=function(t){return t&&(t.host||C_(t.parentNode))},gW=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=C_(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})},xW=function(t,e,r,n){var s=gW(e,Array.isArray(t)?t:[t]);i1[r]||(i1[r]=new WeakMap);var i=i1[r],o=[],a=new Set,c=new Set(s),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};s.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else try{var h=d.getAttribute(n),p=h!==null&&h!=="false",y=(Nl.get(d)||0)+1,g=(i.get(d)||0)+1;Nl.set(d,y),i.set(d,g),o.push(d),y===1&&p&&s1.set(d,!0),g===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}catch(m){console.error("aria-hidden: cannot operate on ",d,m)}})};return u(e),a.clear(),cx++,function(){o.forEach(function(f){var d=Nl.get(f)-1,h=i.get(f)-1;Nl.set(f,d),i.set(f,h),d||(s1.has(f)||f.removeAttribute(n),s1.delete(f)),h||f.removeAttribute(r)}),cx--,cx||(Nl=new WeakMap,Nl=new WeakMap,s1=new WeakMap,i1={})}},BS=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=mW(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),xW(n,s,r,"aria-hidden")):function(){return null}},ci=function(){return ci=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return LW;var e=jW(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])}},FW=P_(),Tu="data-scroll-locked",UW=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(wW,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -93,21 +93,21 @@ Error generating stack: `+i.message+` } body[`).concat(Tu,`] { - `).concat(wW,": ").concat(a,`px; + `).concat(EW,": ").concat(a,`px; } -`)},_R=function(){var t=parseInt(document.body.getAttribute(Tu)||"0",10);return isFinite(t)?t:0},UW=function(){v.useEffect(function(){return document.body.setAttribute(Tu,(_R()+1).toString()),function(){var t=_R()-1;t<=0?document.body.removeAttribute(Tu):document.body.setAttribute(Tu,t.toString())}},[])},VW=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;UW();var i=v.useMemo(function(){return jW(s)},[s]);return v.createElement(BW,{styles:FW(i,!e,s,r?"":"!important")})},Cw=!1;if(typeof window<"u")try{var o1=Object.defineProperty({},"passive",{get:function(){return Cw=!0,!0}});window.addEventListener("test",o1,o1),window.removeEventListener("test",o1,o1)}catch{Cw=!1}var Ml=Cw?{passive:!1}:!1,$W=function(t){return t.tagName==="TEXTAREA"},R_=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!$W(t)&&r[e]==="visible")},zW=function(t){return R_(t,"overflowY")},HW=function(t){return R_(t,"overflowX")},NR=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=I_(t,n);if(s){var i=O_(t,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},GW=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},qW=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},I_=function(t,e){return t==="v"?zW(e):HW(e)},O_=function(t,e){return t==="v"?GW(e):qW(e)},WW=function(t,e){return t==="h"&&e==="rtl"?-1:1},KW=function(t,e,r,n,s){var i=WW(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=O_(t,a),p=h[0],y=h[1],g=h[2],m=y-g-i*p;(p||m)&&I_(t,a)&&(f+=m,d+=p),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(Math.abs(f)<1||!s)||!u&&(Math.abs(d)<1||!s))&&(l=!0),l},a1=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},MR=function(t){return[t.deltaX,t.deltaY]},DR=function(t){return t&&"current"in t?t.current:t},QW=function(t,e){return t[0]===e[0]&&t[1]===e[1]},YW=function(t){return` +`)},_R=function(){var t=parseInt(document.body.getAttribute(Tu)||"0",10);return isFinite(t)?t:0},VW=function(){v.useEffect(function(){return document.body.setAttribute(Tu,(_R()+1).toString()),function(){var t=_R()-1;t<=0?document.body.removeAttribute(Tu):document.body.setAttribute(Tu,t.toString())}},[])},$W=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;VW();var i=v.useMemo(function(){return BW(s)},[s]);return v.createElement(FW,{styles:UW(i,!e,s,r?"":"!important")})},Cw=!1;if(typeof window<"u")try{var o1=Object.defineProperty({},"passive",{get:function(){return Cw=!0,!0}});window.addEventListener("test",o1,o1),window.removeEventListener("test",o1,o1)}catch{Cw=!1}var Ml=Cw?{passive:!1}:!1,zW=function(t){return t.tagName==="TEXTAREA"},R_=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!zW(t)&&r[e]==="visible")},HW=function(t){return R_(t,"overflowY")},GW=function(t){return R_(t,"overflowX")},NR=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=I_(t,n);if(s){var i=O_(t,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},qW=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},WW=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},I_=function(t,e){return t==="v"?HW(e):GW(e)},O_=function(t,e){return t==="v"?qW(e):WW(e)},KW=function(t,e){return t==="h"&&e==="rtl"?-1:1},QW=function(t,e,r,n,s){var i=KW(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=O_(t,a),p=h[0],y=h[1],g=h[2],m=y-g-i*p;(p||m)&&I_(t,a)&&(f+=m,d+=p),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(Math.abs(f)<1||!s)||!u&&(Math.abs(d)<1||!s))&&(l=!0),l},a1=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},MR=function(t){return[t.deltaX,t.deltaY]},DR=function(t){return t&&"current"in t?t.current:t},YW=function(t,e){return t[0]===e[0]&&t[1]===e[1]},JW=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},JW=0,Dl=[];function XW(t){var e=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),s=v.useState(JW++)[0],i=v.useState(P_)[0],o=v.useRef(t);v.useEffect(function(){o.current=t},[t]),v.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=xW([t.lockRef.current],(t.shards||[]).map(DR),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=v.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var m=a1(y),x=r.current,b="deltaX"in y?y.deltaX:x[0]-m[0],w="deltaY"in y?y.deltaY:x[1]-m[1],A,O=y.target,_=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in y&&_==="h"&&O.type==="range")return!1;var C=NR(_,O);if(!C)return!0;if(C?A=_:(A=_==="v"?"h":"v",C=NR(_,O)),!C)return!1;if(!n.current&&"changedTouches"in y&&(b||w)&&(n.current=A),!A)return!0;var j=n.current||A;return KW(j,g,y,j==="h"?b:w,!0)},[]),c=v.useCallback(function(y){var g=y;if(!(!Dl.length||Dl[Dl.length-1]!==i)){var m="deltaY"in g?MR(g):a1(g),x=e.current.filter(function(A){return A.name===g.type&&(A.target===g.target||g.target===A.shadowParent)&&QW(A.delta,m)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(DR).filter(Boolean).filter(function(A){return A.contains(g.target)}),w=b.length>0?a(g,b[0]):!o.current.noIsolation;w&&g.cancelable&&g.preventDefault()}}},[]),l=v.useCallback(function(y,g,m,x){var b={name:y,delta:g,target:m,should:x,shadowParent:ZW(m)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(w){return w!==b})},1)},[]),u=v.useCallback(function(y){r.current=a1(y),n.current=void 0},[]),f=v.useCallback(function(y){l(y.type,MR(y),y.target,a(y,t.lockRef.current))},[]),d=v.useCallback(function(y){l(y.type,a1(y),y.target,a(y,t.lockRef.current))},[]);v.useEffect(function(){return Dl.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Ml),document.addEventListener("touchmove",c,Ml),document.addEventListener("touchstart",u,Ml),function(){Dl=Dl.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Ml),document.removeEventListener("touchmove",c,Ml),document.removeEventListener("touchstart",u,Ml)}},[]);var h=t.removeScrollBar,p=t.inert;return v.createElement(v.Fragment,null,p?v.createElement(i,{styles:YW(s)}):null,h?v.createElement(VW,{gapMode:t.gapMode}):null)}function ZW(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const eK=PW(T_,XW);var Em=v.forwardRef(function(t,e){return v.createElement(wm,ci({},t,{ref:e,sideCar:eK}))});Em.classNames=wm.classNames;var Aw=["Enter"," "],tK=["ArrowDown","PageUp","Home"],__=["ArrowUp","PageDown","End"],rK=[...tK,...__],nK={ltr:[...Aw,"ArrowRight"],rtl:[...Aw,"ArrowLeft"]},sK={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ay="Menu",[Kh,iK,oK]=vm(ay),[kl,N_]=Wr(ay,[oK,ld,ud]),Sm=ld(),M_=ud(),[aK,Tl]=kl(ay),[cK,cy]=kl(ay),D_=t=>{const{__scopeMenu:e,open:r=!1,children:n,dir:s,onOpenChange:i,modal:o=!0}=t,a=Sm(e),[c,l]=v.useState(null),u=v.useRef(!1),f=Gr(i),d=sy(s);return v.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),E.jsx(_S,{...a,children:E.jsx(aK,{scope:e,open:r,onOpenChange:f,content:c,onContentChange:l,children:E.jsx(cK,{scope:e,onClose:v.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:d,modal:o,children:n})})})};D_.displayName=ay;var lK="MenuAnchor",FS=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Sm(r);return E.jsx(NS,{...s,...n,ref:e})});FS.displayName=lK;var US="MenuPortal",[uK,L_]=kl(US,{forceMount:void 0}),j_=t=>{const{__scopeMenu:e,forceMount:r,children:n,container:s}=t,i=Tl(US,e);return E.jsx(uK,{scope:e,forceMount:r,children:E.jsx(cn,{present:r||i.open,children:E.jsx(oy,{asChild:!0,container:s,children:n})})})};j_.displayName=US;var fs="MenuContent",[fK,VS]=kl(fs),B_=v.forwardRef((t,e)=>{const r=L_(fs,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Tl(fs,t.__scopeMenu),o=cy(fs,t.__scopeMenu);return E.jsx(Kh.Provider,{scope:t.__scopeMenu,children:E.jsx(cn,{present:n||i.open,children:E.jsx(Kh.Slot,{scope:t.__scopeMenu,children:o.modal?E.jsx(dK,{...s,ref:e}):E.jsx(hK,{...s,ref:e})})})})}),dK=v.forwardRef((t,e)=>{const r=Tl(fs,t.__scopeMenu),n=v.useRef(null),s=$e(e,n);return v.useEffect(()=>{const i=n.current;if(i)return BS(i)},[]),E.jsx($S,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ce(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),hK=v.forwardRef((t,e)=>{const r=Tl(fs,t.__scopeMenu);return E.jsx($S,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),$S=v.forwardRef((t,e)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,disableOutsideScroll:p,...y}=t,g=Tl(fs,r),m=cy(fs,r),x=Sm(r),b=M_(r),w=iK(r),[A,O]=v.useState(null),_=v.useRef(null),C=$e(e,_,g.onContentChange),j=v.useRef(0),V=v.useRef(""),B=v.useRef(0),z=v.useRef(null),Y=v.useRef("right"),H=v.useRef(0),L=p?Em:v.Fragment,T=p?{as:ll,allowPinchZoom:!0}:void 0,P=I=>{var U,F;const X=V.current+I,oe=w().filter(Be=>!Be.disabled),ae=document.activeElement,ke=(U=oe.find(Be=>Be.ref.current===ae))==null?void 0:U.textValue,ve=oe.map(Be=>Be.textValue),ie=AK(ve,X,ke),Me=(F=oe.find(Be=>Be.textValue===ie))==null?void 0:F.ref.current;(function Be(Te){V.current=Te,window.clearTimeout(j.current),Te!==""&&(j.current=window.setTimeout(()=>Be(""),1e3))})(X),Me&&setTimeout(()=>Me.focus())};v.useEffect(()=>()=>window.clearTimeout(j.current),[]),SS();const R=v.useCallback(I=>{var U,F;return Y.current===((U=z.current)==null?void 0:U.side)&&TK(I,(F=z.current)==null?void 0:F.area)},[]);return E.jsx(fK,{scope:r,searchRef:V,onItemEnter:v.useCallback(I=>{R(I)&&I.preventDefault()},[R]),onItemLeave:v.useCallback(I=>{var U;R(I)||((U=_.current)==null||U.focus(),O(null))},[R]),onTriggerLeave:v.useCallback(I=>{R(I)&&I.preventDefault()},[R]),pointerGraceTimerRef:B,onPointerGraceIntentChange:v.useCallback(I=>{z.current=I},[]),children:E.jsx(L,{...T,children:E.jsx(mm,{asChild:!0,trapped:s,onMountAutoFocus:ce(i,I=>{var U;I.preventDefault(),(U=_.current)==null||U.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:E.jsx(od,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,children:E.jsx(LS,{asChild:!0,...b,dir:m.dir,orientation:"vertical",loop:n,currentTabStopId:A,onCurrentTabStopIdChange:O,onEntryFocus:ce(c,I=>{m.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(MS,{role:"menu","aria-orientation":"vertical","data-state":eN(g.open),"data-radix-menu-content":"",dir:m.dir,...x,...y,ref:C,style:{outline:"none",...y.style},onKeyDown:ce(y.onKeyDown,I=>{const F=I.target.closest("[data-radix-menu-content]")===I.currentTarget,X=I.ctrlKey||I.altKey||I.metaKey,oe=I.key.length===1;F&&(I.key==="Tab"&&I.preventDefault(),!X&&oe&&P(I.key));const ae=_.current;if(I.target!==ae||!rK.includes(I.key))return;I.preventDefault();const ve=w().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);__.includes(I.key)&&ve.reverse(),SK(ve)}),onBlur:ce(t.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(j.current),V.current="")}),onPointerMove:ce(t.onPointerMove,Qh(I=>{const U=I.target,F=H.current!==I.clientX;if(I.currentTarget.contains(U)&&F){const X=I.clientX>H.current?"right":"left";Y.current=X,H.current=I.clientX}}))})})})})})})});B_.displayName=fs;var pK="MenuGroup",zS=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(we.div,{role:"group",...n,ref:e})});zS.displayName=pK;var yK="MenuLabel",F_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(we.div,{...n,ref:e})});F_.displayName=yK;var Zv="MenuItem",LR="menu.itemSelect",Cm=v.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=v.useRef(null),o=cy(Zv,t.__scopeMenu),a=VS(Zv,t.__scopeMenu),c=$e(e,i),l=v.useRef(!1),u=()=>{const f=i.current;if(!r&&f){const d=new CustomEvent(LR,{bubbles:!0,cancelable:!0});f.addEventListener(LR,h=>n==null?void 0:n(h),{once:!0}),vS(f,d),d.defaultPrevented?l.current=!1:o.onClose()}};return E.jsx(U_,{...s,ref:c,disabled:r,onClick:ce(t.onClick,u),onPointerDown:f=>{var d;(d=t.onPointerDown)==null||d.call(t,f),l.current=!0},onPointerUp:ce(t.onPointerUp,f=>{var d;l.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:ce(t.onKeyDown,f=>{const d=a.searchRef.current!=="";r||d&&f.key===" "||Aw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Cm.displayName=Zv;var U_=v.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=VS(Zv,r),a=M_(r),c=v.useRef(null),l=$e(e,c),[u,f]=v.useState(!1),[d,h]=v.useState("");return v.useEffect(()=>{const p=c.current;p&&h((p.textContent??"").trim())},[i.children]),E.jsx(Kh.ItemSlot,{scope:r,disabled:n,textValue:s??d,children:E.jsx(jS,{asChild:!0,...a,focusable:!n,children:E.jsx(we.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:l,onPointerMove:ce(t.onPointerMove,Qh(p=>{n?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(t.onPointerLeave,Qh(p=>o.onItemLeave(p))),onFocus:ce(t.onFocus,()=>f(!0)),onBlur:ce(t.onBlur,()=>f(!1))})})})}),vK="MenuCheckboxItem",V_=v.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return E.jsx(q_,{scope:t.__scopeMenu,checked:r,children:E.jsx(Cm,{role:"menuitemcheckbox","aria-checked":e0(r)?"mixed":r,...s,ref:e,"data-state":GS(r),onSelect:ce(s.onSelect,()=>n==null?void 0:n(e0(r)?!0:!r),{checkForDefaultPrevented:!1})})})});V_.displayName=vK;var $_="MenuRadioGroup",[mK,gK]=kl($_,{value:void 0,onValueChange:()=>{}}),z_=v.forwardRef((t,e)=>{const{value:r,onValueChange:n,...s}=t,i=Gr(n);return E.jsx(mK,{scope:t.__scopeMenu,value:r,onValueChange:i,children:E.jsx(zS,{...s,ref:e})})});z_.displayName=$_;var H_="MenuRadioItem",G_=v.forwardRef((t,e)=>{const{value:r,...n}=t,s=gK(H_,t.__scopeMenu),i=r===s.value;return E.jsx(q_,{scope:t.__scopeMenu,checked:i,children:E.jsx(Cm,{role:"menuitemradio","aria-checked":i,...n,ref:e,"data-state":GS(i),onSelect:ce(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});G_.displayName=H_;var HS="MenuItemIndicator",[q_,xK]=kl(HS,{checked:!1}),W_=v.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=xK(HS,r);return E.jsx(cn,{present:n||e0(i.checked)||i.checked===!0,children:E.jsx(we.span,{...s,ref:e,"data-state":GS(i.checked)})})});W_.displayName=HS;var bK="MenuSeparator",K_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(we.div,{role:"separator","aria-orientation":"horizontal",...n,ref:e})});K_.displayName=bK;var wK="MenuArrow",Q_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Sm(r);return E.jsx(DS,{...s,...n,ref:e})});Q_.displayName=wK;var EK="MenuSub",[N1e,Y_]=kl(EK),Kd="MenuSubTrigger",J_=v.forwardRef((t,e)=>{const r=Tl(Kd,t.__scopeMenu),n=cy(Kd,t.__scopeMenu),s=Y_(Kd,t.__scopeMenu),i=VS(Kd,t.__scopeMenu),o=v.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=i,l={__scopeMenu:t.__scopeMenu},u=v.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return v.useEffect(()=>u,[u]),v.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),E.jsx(FS,{asChild:!0,...l,children:E.jsx(U_,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":eN(r.open),...t,ref:hm(e,s.onTriggerChange),onClick:f=>{var d;(d=t.onClick)==null||d.call(t,f),!(t.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ce(t.onPointerMove,Qh(f=>{i.onItemEnter(f),!f.defaultPrevented&&!t.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:ce(t.onPointerLeave,Qh(f=>{var d,h;u();const p=(d=r.content)==null?void 0:d.getBoundingClientRect();if(p){const y=(h=r.content)==null?void 0:h.dataset.side,g=y==="right",m=g?-5:5,x=p[g?"left":"right"],b=p[g?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x,y:p.top},{x:b,y:p.top},{x:b,y:p.bottom},{x,y:p.bottom}],side:y}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ce(t.onKeyDown,f=>{var d;const h=i.searchRef.current!=="";t.disabled||h&&f.key===" "||nK[n.dir].includes(f.key)&&(r.onOpenChange(!0),(d=r.content)==null||d.focus(),f.preventDefault())})})})});J_.displayName=Kd;var X_="MenuSubContent",Z_=v.forwardRef((t,e)=>{const r=L_(fs,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Tl(fs,t.__scopeMenu),o=cy(fs,t.__scopeMenu),a=Y_(X_,t.__scopeMenu),c=v.useRef(null),l=$e(e,c);return E.jsx(Kh.Provider,{scope:t.__scopeMenu,children:E.jsx(cn,{present:n||i.open,children:E.jsx(Kh.Slot,{scope:t.__scopeMenu,children:E.jsx($S,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:l,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ce(t.onFocusOutside,u=>{u.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ce(t.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:ce(t.onKeyDown,u=>{var f;const d=u.currentTarget.contains(u.target),h=sK[o.dir].includes(u.key);d&&h&&(i.onOpenChange(!1),(f=a.trigger)==null||f.focus(),u.preventDefault())})})})})})});Z_.displayName=X_;function eN(t){return t?"open":"closed"}function e0(t){return t==="indeterminate"}function GS(t){return e0(t)?"indeterminate":t?"checked":"unchecked"}function SK(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function CK(t,e){return t.map((r,n)=>t[(e+n)%t.length])}function AK(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=CK(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function kK(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=u>n&&r<(l-a)*(n-c)/(u-c)+a&&(s=!s)}return s}function TK(t,e){if(!e)return!1;const r={x:t.clientX,y:t.clientY};return kK(r,e)}function Qh(t){return e=>e.pointerType==="mouse"?t(e):void 0}var PK=D_,RK=FS,IK=j_,OK=B_,_K=zS,NK=F_,MK=Cm,DK=V_,LK=z_,jK=G_,BK=W_,FK=K_,UK=Q_,VK=J_,$K=Z_,qS="DropdownMenu",[zK,M1e]=Wr(qS,[N_]),ln=N_(),[HK,tN]=zK(qS),GK=t=>{const{__scopeDropdownMenu:e,children:r,dir:n,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=t,c=ln(e),l=v.useRef(null),[u=!1,f]=ps({prop:s,defaultProp:i,onChange:o});return E.jsx(HK,{scope:e,triggerId:us(),triggerRef:l,contentId:us(),open:u,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(d=>!d),[f]),modal:a,children:E.jsx(PK,{...c,open:u,onOpenChange:f,dir:n,modal:a,children:r})})};GK.displayName=qS;var rN="DropdownMenuTrigger",qK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=t,i=tN(rN,r),o=ln(r);return E.jsx(RK,{asChild:!0,...o,children:E.jsx(we.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:hm(e,i.triggerRef),onPointerDown:ce(t.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:ce(t.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});qK.displayName=rN;var WK="DropdownMenuPortal",KK=t=>{const{__scopeDropdownMenu:e,...r}=t,n=ln(e);return E.jsx(IK,{...n,...r})};KK.displayName=WK;var nN="DropdownMenuContent",QK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=tN(nN,r),i=ln(r),o=v.useRef(!1);return E.jsx(OK,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...n,ref:e,onCloseAutoFocus:ce(t.onCloseAutoFocus,a=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:ce(t.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!s.modal||u)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});QK.displayName=nN;var YK="DropdownMenuGroup",JK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(_K,{...s,...n,ref:e})});JK.displayName=YK;var XK="DropdownMenuLabel",ZK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(NK,{...s,...n,ref:e})});ZK.displayName=XK;var eQ="DropdownMenuItem",tQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(MK,{...s,...n,ref:e})});tQ.displayName=eQ;var rQ="DropdownMenuCheckboxItem",sN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(DK,{...s,...n,ref:e})});sN.displayName=rQ;var nQ="DropdownMenuRadioGroup",sQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(LK,{...s,...n,ref:e})});sQ.displayName=nQ;var iQ="DropdownMenuRadioItem",iN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(jK,{...s,...n,ref:e})});iN.displayName=iQ;var oQ="DropdownMenuItemIndicator",oN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(BK,{...s,...n,ref:e})});oN.displayName=oQ;var aQ="DropdownMenuSeparator",cQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(FK,{...s,...n,ref:e})});cQ.displayName=aQ;var lQ="DropdownMenuArrow",uQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(UK,{...s,...n,ref:e})});uQ.displayName=lQ;var fQ="DropdownMenuSubTrigger",dQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(VK,{...s,...n,ref:e})});dQ.displayName=fQ;var hQ="DropdownMenuSubContent",pQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx($K,{...s,...n,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});pQ.displayName=hQ;var yQ=sN,vQ=iN,aN=oN,cN="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12ws fyvr12wm fyvr11h0 fyvr11ko fyvr11jw fyvr12v7 fyvr11n4 fyvr11hw fyvr12s7",lN="_1k2mbvi5";const mQ=({children:t})=>E.jsx(aN,{className:lN,children:t});v.forwardRef(({className:t,children:e,...r},n)=>E.jsxs(yQ,{className:qr(cN,t),...r,ref:n,children:[E.jsx(mQ,{children:E.jsx(gS,{size:"xs"})}),E.jsx(ue,{variant:"small",children:e})]}));v.forwardRef(({className:t,children:e,...r},n)=>E.jsxs(vQ,{className:qr(cN,t),...r,ref:n,children:[E.jsx(aN,{className:lN,children:E.jsx(ue,{children:"•"})}),E.jsx(ue,{variant:"small",children:e})]}));const Am=v.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return E.jsx(ut,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),gQ=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var xQ="_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",bQ=Nt({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:[]}),wQ="_1hq71vka _1hq71vk9 fyvr12wp fyvr12wj fyvr11ho fyvr12vj fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const EQ={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*, video/*",pdf:".pdf,application/pdf",mp4:".mp4,video/mp4",csv:".csv,text/csv",json:".json,application/json"};v.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:c,onValueChange:l,placeholder:u="Upload a file",validExtensions:f,...d}=t,h=v.useRef(null),p=gQ(h,e),[y,g]=v.useState(null),m=b=>{const w=b.currentTarget.files;if(!w||!w[0])return;const A=w[0],O=A.name,_=A.size/1e3;g({name:O,size:_,extension:O.split(".").pop()??""}),l==null||l(A)},x=f.map(b=>EQ[b]).join(",");return E.jsx(Al,{description:n,disabled:s,display:"grid",id:i??c,label:o,labelLocation:a,children:E.jsxs(q,{width:"full",minWidth:"0",justifyContent:y?"space-between":"flex-start",gap:"2",color:y?"text100":"text50",className:qr(xQ,bQ({borderRadius:r})),children:[y?E.jsxs(q,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[E.jsx(ue,{ellipsis:!0,children:y.name}),E.jsxs(ue,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[y.size.toFixed(2)," kb"]})]}):E.jsx(ue,{ellipsis:!0,children:u}),E.jsx(q,{accept:x,as:"input",className:wQ,cursor:"pointer",disabled:s,id:i??c,name:c,onChange:m,ref:p,type:"file",...d}),y&&E.jsx(Am,{cursor:"pointer",icon:Gh,size:"xs",onClick:b=>{var w;b.preventDefault(),b.stopPropagation(),(w=h.current)!=null&&w.value&&(h.current.value=""),l==null||l(null),g(null)},zIndex:"10"})]})})});var SQ=Nt({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const kw=1e3,Pu=64,dx=Pu/2,hx=(t,e=kw)=>t%e/(kw/Pu),Ll=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>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)},CQ=(t,e,r)=>{const n=t%360,s=(t+120)%360,i=r%360;return{a:`hsl(${n}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${i}deg 100% 50%)`}},AQ=(t,e)=>{const r=[];for(let n=0;n{const i=Pu/10+hx(n.r,kw*1.5/(s+1));return{...CQ(n.a,n.b,n.c),x:hx(n.x),y:hx(n.y),r:i}})};v.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=AQ(r,s);return E.jsxs(q,{as:"svg",className:qr(e,SQ({size:n})),viewBox:`0 0 ${Pu} ${Pu}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[E.jsxs("defs",{children:[E.jsx("clipPath",{id:"circle-clip",children:E.jsx("circle",{cx:dx,cy:dx,r:dx})}),E.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[E.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),E.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),E.jsx("feGaussianBlur",{stdDeviation:Pu/10,result:"effect1_foregroundBlur"})]}),E.jsxs("linearGradient",{id:`gradient-background-${r}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[E.jsx("stop",{offset:"0",stopColor:o[0].c}),E.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map((a,c)=>E.jsxs(v.Fragment,{children:[E.jsxs("radialGradient",{id:`gradient-primary-${r}-${c}`,children:[E.jsx("stop",{offset:"0",stopColor:a.a}),E.jsx("stop",{offset:"1",stopColor:a.b})]}),E.jsxs("radialGradient",{id:`gradient-secondary-${r}-${c}`,children:[E.jsx("stop",{offset:"0",stopColor:a.c}),E.jsx("stop",{offset:"1",stopColor:a.b})]})]},c))]}),E.jsxs("g",{clipPath:"url(#circle-clip)",children:[E.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${r})`}),E.jsx("g",{filter:"url(#blur)",children:o.map((a,c)=>E.jsxs(v.Fragment,{children:[E.jsx("circle",{fill:`url(#gradient-primary-${r}-${c})`,cx:a.x,cy:a.y,r:a.r}),E.jsx("circle",{fill:`url(#gradient-secondary-${r}-${c})`,cx:a.y,cy:a.x,r:a.r/2})]},c))})]})]})});const uN=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=v.useState(!1),o=a=>{i(!0),r==null||r(a)};return E.jsx(q,{as:Xc.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})};var WS="Dialog",[fN,D1e]=Wr(WS),[kQ,$s]=fN(WS),dN=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=v.useRef(null),c=v.useRef(null),[l=!1,u]=ps({prop:n,defaultProp:s,onChange:i});return E.jsx(kQ,{scope:e,triggerRef:a,contentRef:c,contentId:us(),titleId:us(),descriptionId:us(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(f=>!f),[u]),modal:o,children:r})};dN.displayName=WS;var hN="DialogTrigger",TQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(hN,r),i=$e(e,s.triggerRef);return E.jsx(we.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":YS(s.open),...n,ref:i,onClick:ce(t.onClick,s.onOpenToggle)})});TQ.displayName=hN;var KS="DialogPortal",[PQ,pN]=fN(KS,{forceMount:void 0}),yN=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=$s(KS,e);return E.jsx(PQ,{scope:e,forceMount:r,children:v.Children.map(n,o=>E.jsx(cn,{present:r||i.open,children:E.jsx(oy,{asChild:!0,container:s,children:o})}))})};yN.displayName=KS;var t0="DialogOverlay",vN=v.forwardRef((t,e)=>{const r=pN(t0,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=$s(t0,t.__scopeDialog);return i.modal?E.jsx(cn,{present:n||i.open,children:E.jsx(RQ,{...s,ref:e})}):null});vN.displayName=t0;var RQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(t0,r);return E.jsx(Em,{as:ll,allowPinchZoom:!0,shards:[s.contentRef],children:E.jsx(we.div,{"data-state":YS(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),fl="DialogContent",mN=v.forwardRef((t,e)=>{const r=pN(fl,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=$s(fl,t.__scopeDialog);return E.jsx(cn,{present:n||i.open,children:i.modal?E.jsx(IQ,{...s,ref:e}):E.jsx(OQ,{...s,ref:e})})});mN.displayName=fl;var IQ=v.forwardRef((t,e)=>{const r=$s(fl,t.__scopeDialog),n=v.useRef(null),s=$e(e,r.contentRef,n);return v.useEffect(()=>{const i=n.current;if(i)return BS(i)},[]),E.jsx(gN,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ce(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ce(t.onFocusOutside,i=>i.preventDefault())})}),OQ=v.forwardRef((t,e)=>{const r=$s(fl,t.__scopeDialog),n=v.useRef(!1),s=v.useRef(!1);return E.jsx(gN,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)==null||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=i.target;((a=r.triggerRef.current)==null?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),gN=v.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=$s(fl,r),c=v.useRef(null),l=$e(e,c);return SS(),E.jsxs(E.Fragment,{children:[E.jsx(mm,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:E.jsx(od,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":YS(a.open),...o,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(MQ,{titleId:a.titleId}),E.jsx(LQ,{contentRef:c,descriptionId:a.descriptionId})]})]})}),QS="DialogTitle",_Q=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(QS,r);return E.jsx(we.h2,{id:s.titleId,...n,ref:e})});_Q.displayName=QS;var xN="DialogDescription",NQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(xN,r);return E.jsx(we.p,{id:s.descriptionId,...n,ref:e})});NQ.displayName=xN;var bN="DialogClose",wN=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(bN,r);return E.jsx(we.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,()=>s.onOpenChange(!1))})});wN.displayName=bN;function YS(t){return t?"open":"closed"}var EN="DialogTitleWarning",[L1e,SN]=XH(EN,{contentName:fl,titleName:QS,docsSlug:"dialog"}),MQ=({titleId:t})=>{const e=SN(EN),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. +`)},XW=0,Dl=[];function ZW(t){var e=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),s=v.useState(XW++)[0],i=v.useState(P_)[0],o=v.useRef(t);v.useEffect(function(){o.current=t},[t]),v.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=bW([t.lockRef.current],(t.shards||[]).map(DR),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=v.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var m=a1(y),x=r.current,b="deltaX"in y?y.deltaX:x[0]-m[0],w="deltaY"in y?y.deltaY:x[1]-m[1],A,O=y.target,_=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in y&&_==="h"&&O.type==="range")return!1;var C=NR(_,O);if(!C)return!0;if(C?A=_:(A=_==="v"?"h":"v",C=NR(_,O)),!C)return!1;if(!n.current&&"changedTouches"in y&&(b||w)&&(n.current=A),!A)return!0;var j=n.current||A;return QW(j,g,y,j==="h"?b:w,!0)},[]),c=v.useCallback(function(y){var g=y;if(!(!Dl.length||Dl[Dl.length-1]!==i)){var m="deltaY"in g?MR(g):a1(g),x=e.current.filter(function(A){return A.name===g.type&&(A.target===g.target||g.target===A.shadowParent)&&YW(A.delta,m)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(DR).filter(Boolean).filter(function(A){return A.contains(g.target)}),w=b.length>0?a(g,b[0]):!o.current.noIsolation;w&&g.cancelable&&g.preventDefault()}}},[]),l=v.useCallback(function(y,g,m,x){var b={name:y,delta:g,target:m,should:x,shadowParent:eK(m)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(w){return w!==b})},1)},[]),u=v.useCallback(function(y){r.current=a1(y),n.current=void 0},[]),f=v.useCallback(function(y){l(y.type,MR(y),y.target,a(y,t.lockRef.current))},[]),d=v.useCallback(function(y){l(y.type,a1(y),y.target,a(y,t.lockRef.current))},[]);v.useEffect(function(){return Dl.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Ml),document.addEventListener("touchmove",c,Ml),document.addEventListener("touchstart",u,Ml),function(){Dl=Dl.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Ml),document.removeEventListener("touchmove",c,Ml),document.removeEventListener("touchstart",u,Ml)}},[]);var h=t.removeScrollBar,p=t.inert;return v.createElement(v.Fragment,null,p?v.createElement(i,{styles:JW(s)}):null,h?v.createElement($W,{gapMode:t.gapMode}):null)}function eK(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const tK=RW(T_,ZW);var Em=v.forwardRef(function(t,e){return v.createElement(wm,ci({},t,{ref:e,sideCar:tK}))});Em.classNames=wm.classNames;var Aw=["Enter"," "],rK=["ArrowDown","PageUp","Home"],__=["ArrowUp","PageDown","End"],nK=[...rK,...__],sK={ltr:[...Aw,"ArrowRight"],rtl:[...Aw,"ArrowLeft"]},iK={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ay="Menu",[Kh,oK,aK]=vm(ay),[kl,N_]=Wr(ay,[aK,ld,ud]),Sm=ld(),M_=ud(),[cK,Tl]=kl(ay),[lK,cy]=kl(ay),D_=t=>{const{__scopeMenu:e,open:r=!1,children:n,dir:s,onOpenChange:i,modal:o=!0}=t,a=Sm(e),[c,l]=v.useState(null),u=v.useRef(!1),f=Gr(i),d=sy(s);return v.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),E.jsx(_S,{...a,children:E.jsx(cK,{scope:e,open:r,onOpenChange:f,content:c,onContentChange:l,children:E.jsx(lK,{scope:e,onClose:v.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:d,modal:o,children:n})})})};D_.displayName=ay;var uK="MenuAnchor",FS=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Sm(r);return E.jsx(NS,{...s,...n,ref:e})});FS.displayName=uK;var US="MenuPortal",[fK,L_]=kl(US,{forceMount:void 0}),j_=t=>{const{__scopeMenu:e,forceMount:r,children:n,container:s}=t,i=Tl(US,e);return E.jsx(fK,{scope:e,forceMount:r,children:E.jsx(cn,{present:r||i.open,children:E.jsx(oy,{asChild:!0,container:s,children:n})})})};j_.displayName=US;var fs="MenuContent",[dK,VS]=kl(fs),B_=v.forwardRef((t,e)=>{const r=L_(fs,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Tl(fs,t.__scopeMenu),o=cy(fs,t.__scopeMenu);return E.jsx(Kh.Provider,{scope:t.__scopeMenu,children:E.jsx(cn,{present:n||i.open,children:E.jsx(Kh.Slot,{scope:t.__scopeMenu,children:o.modal?E.jsx(hK,{...s,ref:e}):E.jsx(pK,{...s,ref:e})})})})}),hK=v.forwardRef((t,e)=>{const r=Tl(fs,t.__scopeMenu),n=v.useRef(null),s=$e(e,n);return v.useEffect(()=>{const i=n.current;if(i)return BS(i)},[]),E.jsx($S,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ce(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),pK=v.forwardRef((t,e)=>{const r=Tl(fs,t.__scopeMenu);return E.jsx($S,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),$S=v.forwardRef((t,e)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,disableOutsideScroll:p,...y}=t,g=Tl(fs,r),m=cy(fs,r),x=Sm(r),b=M_(r),w=oK(r),[A,O]=v.useState(null),_=v.useRef(null),C=$e(e,_,g.onContentChange),j=v.useRef(0),V=v.useRef(""),B=v.useRef(0),$=v.useRef(null),Y=v.useRef("right"),H=v.useRef(0),L=p?Em:v.Fragment,T=p?{as:ll,allowPinchZoom:!0}:void 0,P=I=>{var U,F;const X=V.current+I,oe=w().filter(Be=>!Be.disabled),ae=document.activeElement,ke=(U=oe.find(Be=>Be.ref.current===ae))==null?void 0:U.textValue,ve=oe.map(Be=>Be.textValue),ie=kK(ve,X,ke),Me=(F=oe.find(Be=>Be.textValue===ie))==null?void 0:F.ref.current;(function Be(Te){V.current=Te,window.clearTimeout(j.current),Te!==""&&(j.current=window.setTimeout(()=>Be(""),1e3))})(X),Me&&setTimeout(()=>Me.focus())};v.useEffect(()=>()=>window.clearTimeout(j.current),[]),SS();const R=v.useCallback(I=>{var U,F;return Y.current===((U=$.current)==null?void 0:U.side)&&PK(I,(F=$.current)==null?void 0:F.area)},[]);return E.jsx(dK,{scope:r,searchRef:V,onItemEnter:v.useCallback(I=>{R(I)&&I.preventDefault()},[R]),onItemLeave:v.useCallback(I=>{var U;R(I)||((U=_.current)==null||U.focus(),O(null))},[R]),onTriggerLeave:v.useCallback(I=>{R(I)&&I.preventDefault()},[R]),pointerGraceTimerRef:B,onPointerGraceIntentChange:v.useCallback(I=>{$.current=I},[]),children:E.jsx(L,{...T,children:E.jsx(mm,{asChild:!0,trapped:s,onMountAutoFocus:ce(i,I=>{var U;I.preventDefault(),(U=_.current)==null||U.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:E.jsx(od,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,children:E.jsx(LS,{asChild:!0,...b,dir:m.dir,orientation:"vertical",loop:n,currentTabStopId:A,onCurrentTabStopIdChange:O,onEntryFocus:ce(c,I=>{m.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(MS,{role:"menu","aria-orientation":"vertical","data-state":eN(g.open),"data-radix-menu-content":"",dir:m.dir,...x,...y,ref:C,style:{outline:"none",...y.style},onKeyDown:ce(y.onKeyDown,I=>{const F=I.target.closest("[data-radix-menu-content]")===I.currentTarget,X=I.ctrlKey||I.altKey||I.metaKey,oe=I.key.length===1;F&&(I.key==="Tab"&&I.preventDefault(),!X&&oe&&P(I.key));const ae=_.current;if(I.target!==ae||!nK.includes(I.key))return;I.preventDefault();const ve=w().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);__.includes(I.key)&&ve.reverse(),CK(ve)}),onBlur:ce(t.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(j.current),V.current="")}),onPointerMove:ce(t.onPointerMove,Qh(I=>{const U=I.target,F=H.current!==I.clientX;if(I.currentTarget.contains(U)&&F){const X=I.clientX>H.current?"right":"left";Y.current=X,H.current=I.clientX}}))})})})})})})});B_.displayName=fs;var yK="MenuGroup",zS=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(we.div,{role:"group",...n,ref:e})});zS.displayName=yK;var vK="MenuLabel",F_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(we.div,{...n,ref:e})});F_.displayName=vK;var Zv="MenuItem",LR="menu.itemSelect",Cm=v.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=v.useRef(null),o=cy(Zv,t.__scopeMenu),a=VS(Zv,t.__scopeMenu),c=$e(e,i),l=v.useRef(!1),u=()=>{const f=i.current;if(!r&&f){const d=new CustomEvent(LR,{bubbles:!0,cancelable:!0});f.addEventListener(LR,h=>n==null?void 0:n(h),{once:!0}),vS(f,d),d.defaultPrevented?l.current=!1:o.onClose()}};return E.jsx(U_,{...s,ref:c,disabled:r,onClick:ce(t.onClick,u),onPointerDown:f=>{var d;(d=t.onPointerDown)==null||d.call(t,f),l.current=!0},onPointerUp:ce(t.onPointerUp,f=>{var d;l.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:ce(t.onKeyDown,f=>{const d=a.searchRef.current!=="";r||d&&f.key===" "||Aw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Cm.displayName=Zv;var U_=v.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=VS(Zv,r),a=M_(r),c=v.useRef(null),l=$e(e,c),[u,f]=v.useState(!1),[d,h]=v.useState("");return v.useEffect(()=>{const p=c.current;p&&h((p.textContent??"").trim())},[i.children]),E.jsx(Kh.ItemSlot,{scope:r,disabled:n,textValue:s??d,children:E.jsx(jS,{asChild:!0,...a,focusable:!n,children:E.jsx(we.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:l,onPointerMove:ce(t.onPointerMove,Qh(p=>{n?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(t.onPointerLeave,Qh(p=>o.onItemLeave(p))),onFocus:ce(t.onFocus,()=>f(!0)),onBlur:ce(t.onBlur,()=>f(!1))})})})}),mK="MenuCheckboxItem",V_=v.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return E.jsx(q_,{scope:t.__scopeMenu,checked:r,children:E.jsx(Cm,{role:"menuitemcheckbox","aria-checked":e0(r)?"mixed":r,...s,ref:e,"data-state":GS(r),onSelect:ce(s.onSelect,()=>n==null?void 0:n(e0(r)?!0:!r),{checkForDefaultPrevented:!1})})})});V_.displayName=mK;var $_="MenuRadioGroup",[gK,xK]=kl($_,{value:void 0,onValueChange:()=>{}}),z_=v.forwardRef((t,e)=>{const{value:r,onValueChange:n,...s}=t,i=Gr(n);return E.jsx(gK,{scope:t.__scopeMenu,value:r,onValueChange:i,children:E.jsx(zS,{...s,ref:e})})});z_.displayName=$_;var H_="MenuRadioItem",G_=v.forwardRef((t,e)=>{const{value:r,...n}=t,s=xK(H_,t.__scopeMenu),i=r===s.value;return E.jsx(q_,{scope:t.__scopeMenu,checked:i,children:E.jsx(Cm,{role:"menuitemradio","aria-checked":i,...n,ref:e,"data-state":GS(i),onSelect:ce(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});G_.displayName=H_;var HS="MenuItemIndicator",[q_,bK]=kl(HS,{checked:!1}),W_=v.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=bK(HS,r);return E.jsx(cn,{present:n||e0(i.checked)||i.checked===!0,children:E.jsx(we.span,{...s,ref:e,"data-state":GS(i.checked)})})});W_.displayName=HS;var wK="MenuSeparator",K_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(we.div,{role:"separator","aria-orientation":"horizontal",...n,ref:e})});K_.displayName=wK;var EK="MenuArrow",Q_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Sm(r);return E.jsx(DS,{...s,...n,ref:e})});Q_.displayName=EK;var SK="MenuSub",[N1e,Y_]=kl(SK),Kd="MenuSubTrigger",J_=v.forwardRef((t,e)=>{const r=Tl(Kd,t.__scopeMenu),n=cy(Kd,t.__scopeMenu),s=Y_(Kd,t.__scopeMenu),i=VS(Kd,t.__scopeMenu),o=v.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=i,l={__scopeMenu:t.__scopeMenu},u=v.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return v.useEffect(()=>u,[u]),v.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),E.jsx(FS,{asChild:!0,...l,children:E.jsx(U_,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":eN(r.open),...t,ref:hm(e,s.onTriggerChange),onClick:f=>{var d;(d=t.onClick)==null||d.call(t,f),!(t.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ce(t.onPointerMove,Qh(f=>{i.onItemEnter(f),!f.defaultPrevented&&!t.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:ce(t.onPointerLeave,Qh(f=>{var d,h;u();const p=(d=r.content)==null?void 0:d.getBoundingClientRect();if(p){const y=(h=r.content)==null?void 0:h.dataset.side,g=y==="right",m=g?-5:5,x=p[g?"left":"right"],b=p[g?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x,y:p.top},{x:b,y:p.top},{x:b,y:p.bottom},{x,y:p.bottom}],side:y}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ce(t.onKeyDown,f=>{var d;const h=i.searchRef.current!=="";t.disabled||h&&f.key===" "||sK[n.dir].includes(f.key)&&(r.onOpenChange(!0),(d=r.content)==null||d.focus(),f.preventDefault())})})})});J_.displayName=Kd;var X_="MenuSubContent",Z_=v.forwardRef((t,e)=>{const r=L_(fs,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Tl(fs,t.__scopeMenu),o=cy(fs,t.__scopeMenu),a=Y_(X_,t.__scopeMenu),c=v.useRef(null),l=$e(e,c);return E.jsx(Kh.Provider,{scope:t.__scopeMenu,children:E.jsx(cn,{present:n||i.open,children:E.jsx(Kh.Slot,{scope:t.__scopeMenu,children:E.jsx($S,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:l,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ce(t.onFocusOutside,u=>{u.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ce(t.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:ce(t.onKeyDown,u=>{var f;const d=u.currentTarget.contains(u.target),h=iK[o.dir].includes(u.key);d&&h&&(i.onOpenChange(!1),(f=a.trigger)==null||f.focus(),u.preventDefault())})})})})})});Z_.displayName=X_;function eN(t){return t?"open":"closed"}function e0(t){return t==="indeterminate"}function GS(t){return e0(t)?"indeterminate":t?"checked":"unchecked"}function CK(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function AK(t,e){return t.map((r,n)=>t[(e+n)%t.length])}function kK(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=AK(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function TK(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=u>n&&r<(l-a)*(n-c)/(u-c)+a&&(s=!s)}return s}function PK(t,e){if(!e)return!1;const r={x:t.clientX,y:t.clientY};return TK(r,e)}function Qh(t){return e=>e.pointerType==="mouse"?t(e):void 0}var RK=D_,IK=FS,OK=j_,_K=B_,NK=zS,MK=F_,DK=Cm,LK=V_,jK=z_,BK=G_,FK=W_,UK=K_,VK=Q_,$K=J_,zK=Z_,qS="DropdownMenu",[HK,M1e]=Wr(qS,[N_]),ln=N_(),[GK,tN]=HK(qS),qK=t=>{const{__scopeDropdownMenu:e,children:r,dir:n,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=t,c=ln(e),l=v.useRef(null),[u=!1,f]=ps({prop:s,defaultProp:i,onChange:o});return E.jsx(GK,{scope:e,triggerId:us(),triggerRef:l,contentId:us(),open:u,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(d=>!d),[f]),modal:a,children:E.jsx(RK,{...c,open:u,onOpenChange:f,dir:n,modal:a,children:r})})};qK.displayName=qS;var rN="DropdownMenuTrigger",WK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=t,i=tN(rN,r),o=ln(r);return E.jsx(IK,{asChild:!0,...o,children:E.jsx(we.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:hm(e,i.triggerRef),onPointerDown:ce(t.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:ce(t.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});WK.displayName=rN;var KK="DropdownMenuPortal",QK=t=>{const{__scopeDropdownMenu:e,...r}=t,n=ln(e);return E.jsx(OK,{...n,...r})};QK.displayName=KK;var nN="DropdownMenuContent",YK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=tN(nN,r),i=ln(r),o=v.useRef(!1);return E.jsx(_K,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...n,ref:e,onCloseAutoFocus:ce(t.onCloseAutoFocus,a=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:ce(t.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!s.modal||u)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});YK.displayName=nN;var JK="DropdownMenuGroup",XK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(NK,{...s,...n,ref:e})});XK.displayName=JK;var ZK="DropdownMenuLabel",eQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(MK,{...s,...n,ref:e})});eQ.displayName=ZK;var tQ="DropdownMenuItem",rQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(DK,{...s,...n,ref:e})});rQ.displayName=tQ;var nQ="DropdownMenuCheckboxItem",sN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(LK,{...s,...n,ref:e})});sN.displayName=nQ;var sQ="DropdownMenuRadioGroup",iQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(jK,{...s,...n,ref:e})});iQ.displayName=sQ;var oQ="DropdownMenuRadioItem",iN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(BK,{...s,...n,ref:e})});iN.displayName=oQ;var aQ="DropdownMenuItemIndicator",oN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(FK,{...s,...n,ref:e})});oN.displayName=aQ;var cQ="DropdownMenuSeparator",lQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(UK,{...s,...n,ref:e})});lQ.displayName=cQ;var uQ="DropdownMenuArrow",fQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(VK,{...s,...n,ref:e})});fQ.displayName=uQ;var dQ="DropdownMenuSubTrigger",hQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx($K,{...s,...n,ref:e})});hQ.displayName=dQ;var pQ="DropdownMenuSubContent",yQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(zK,{...s,...n,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yQ.displayName=pQ;var vQ=sN,mQ=iN,aN=oN,cN="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12ws fyvr12wm fyvr11h0 fyvr11ko fyvr11jw fyvr12v7 fyvr11n4 fyvr11hw fyvr12s7",lN="_1k2mbvi5";const gQ=({children:t})=>E.jsx(aN,{className:lN,children:t});v.forwardRef(({className:t,children:e,...r},n)=>E.jsxs(vQ,{className:qr(cN,t),...r,ref:n,children:[E.jsx(gQ,{children:E.jsx(gS,{size:"xs"})}),E.jsx(ue,{variant:"small",children:e})]}));v.forwardRef(({className:t,children:e,...r},n)=>E.jsxs(mQ,{className:qr(cN,t),...r,ref:n,children:[E.jsx(aN,{className:lN,children:E.jsx(ue,{children:"•"})}),E.jsx(ue,{variant:"small",children:e})]}));const Am=v.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return E.jsx(ut,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),xQ=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var bQ="_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",wQ=Nt({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:[]}),EQ="_1hq71vka _1hq71vk9 fyvr12wp fyvr12wj fyvr11ho fyvr12vj fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const SQ={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*, video/*",pdf:".pdf,application/pdf",mp4:".mp4,video/mp4",csv:".csv,text/csv",json:".json,application/json"};v.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:c,onValueChange:l,placeholder:u="Upload a file",validExtensions:f,...d}=t,h=v.useRef(null),p=xQ(h,e),[y,g]=v.useState(null),m=b=>{const w=b.currentTarget.files;if(!w||!w[0])return;const A=w[0],O=A.name,_=A.size/1e3;g({name:O,size:_,extension:O.split(".").pop()??""}),l==null||l(A)},x=f.map(b=>SQ[b]).join(",");return E.jsx(Al,{description:n,disabled:s,display:"grid",id:i??c,label:o,labelLocation:a,children:E.jsxs(q,{width:"full",minWidth:"0",justifyContent:y?"space-between":"flex-start",gap:"2",color:y?"text100":"text50",className:qr(bQ,wQ({borderRadius:r})),children:[y?E.jsxs(q,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[E.jsx(ue,{ellipsis:!0,children:y.name}),E.jsxs(ue,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[y.size.toFixed(2)," kb"]})]}):E.jsx(ue,{ellipsis:!0,children:u}),E.jsx(q,{accept:x,as:"input",className:EQ,cursor:"pointer",disabled:s,id:i??c,name:c,onChange:m,ref:p,type:"file",...d}),y&&E.jsx(Am,{cursor:"pointer",icon:Gh,size:"xs",onClick:b=>{var w;b.preventDefault(),b.stopPropagation(),(w=h.current)!=null&&w.value&&(h.current.value=""),l==null||l(null),g(null)},zIndex:"10"})]})})});var CQ=Nt({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const kw=1e3,Pu=64,dx=Pu/2,hx=(t,e=kw)=>t%e/(kw/Pu),Ll=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>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)},AQ=(t,e,r)=>{const n=t%360,s=(t+120)%360,i=r%360;return{a:`hsl(${n}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${i}deg 100% 50%)`}},kQ=(t,e)=>{const r=[];for(let n=0;n{const i=Pu/10+hx(n.r,kw*1.5/(s+1));return{...AQ(n.a,n.b,n.c),x:hx(n.x),y:hx(n.y),r:i}})};v.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=kQ(r,s);return E.jsxs(q,{as:"svg",className:qr(e,CQ({size:n})),viewBox:`0 0 ${Pu} ${Pu}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[E.jsxs("defs",{children:[E.jsx("clipPath",{id:"circle-clip",children:E.jsx("circle",{cx:dx,cy:dx,r:dx})}),E.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[E.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),E.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),E.jsx("feGaussianBlur",{stdDeviation:Pu/10,result:"effect1_foregroundBlur"})]}),E.jsxs("linearGradient",{id:`gradient-background-${r}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[E.jsx("stop",{offset:"0",stopColor:o[0].c}),E.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map((a,c)=>E.jsxs(v.Fragment,{children:[E.jsxs("radialGradient",{id:`gradient-primary-${r}-${c}`,children:[E.jsx("stop",{offset:"0",stopColor:a.a}),E.jsx("stop",{offset:"1",stopColor:a.b})]}),E.jsxs("radialGradient",{id:`gradient-secondary-${r}-${c}`,children:[E.jsx("stop",{offset:"0",stopColor:a.c}),E.jsx("stop",{offset:"1",stopColor:a.b})]})]},c))]}),E.jsxs("g",{clipPath:"url(#circle-clip)",children:[E.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${r})`}),E.jsx("g",{filter:"url(#blur)",children:o.map((a,c)=>E.jsxs(v.Fragment,{children:[E.jsx("circle",{fill:`url(#gradient-primary-${r}-${c})`,cx:a.x,cy:a.y,r:a.r}),E.jsx("circle",{fill:`url(#gradient-secondary-${r}-${c})`,cx:a.y,cy:a.x,r:a.r/2})]},c))})]})]})});const uN=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=v.useState(!1),o=a=>{i(!0),r==null||r(a)};return E.jsx(q,{as:Xc.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})};var WS="Dialog",[fN,D1e]=Wr(WS),[TQ,$s]=fN(WS),dN=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=v.useRef(null),c=v.useRef(null),[l=!1,u]=ps({prop:n,defaultProp:s,onChange:i});return E.jsx(TQ,{scope:e,triggerRef:a,contentRef:c,contentId:us(),titleId:us(),descriptionId:us(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(f=>!f),[u]),modal:o,children:r})};dN.displayName=WS;var hN="DialogTrigger",PQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(hN,r),i=$e(e,s.triggerRef);return E.jsx(we.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":YS(s.open),...n,ref:i,onClick:ce(t.onClick,s.onOpenToggle)})});PQ.displayName=hN;var KS="DialogPortal",[RQ,pN]=fN(KS,{forceMount:void 0}),yN=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=$s(KS,e);return E.jsx(RQ,{scope:e,forceMount:r,children:v.Children.map(n,o=>E.jsx(cn,{present:r||i.open,children:E.jsx(oy,{asChild:!0,container:s,children:o})}))})};yN.displayName=KS;var t0="DialogOverlay",vN=v.forwardRef((t,e)=>{const r=pN(t0,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=$s(t0,t.__scopeDialog);return i.modal?E.jsx(cn,{present:n||i.open,children:E.jsx(IQ,{...s,ref:e})}):null});vN.displayName=t0;var IQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(t0,r);return E.jsx(Em,{as:ll,allowPinchZoom:!0,shards:[s.contentRef],children:E.jsx(we.div,{"data-state":YS(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),fl="DialogContent",mN=v.forwardRef((t,e)=>{const r=pN(fl,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=$s(fl,t.__scopeDialog);return E.jsx(cn,{present:n||i.open,children:i.modal?E.jsx(OQ,{...s,ref:e}):E.jsx(_Q,{...s,ref:e})})});mN.displayName=fl;var OQ=v.forwardRef((t,e)=>{const r=$s(fl,t.__scopeDialog),n=v.useRef(null),s=$e(e,r.contentRef,n);return v.useEffect(()=>{const i=n.current;if(i)return BS(i)},[]),E.jsx(gN,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ce(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ce(t.onFocusOutside,i=>i.preventDefault())})}),_Q=v.forwardRef((t,e)=>{const r=$s(fl,t.__scopeDialog),n=v.useRef(!1),s=v.useRef(!1);return E.jsx(gN,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)==null||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=i.target;((a=r.triggerRef.current)==null?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),gN=v.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=$s(fl,r),c=v.useRef(null),l=$e(e,c);return SS(),E.jsxs(E.Fragment,{children:[E.jsx(mm,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:E.jsx(od,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":YS(a.open),...o,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(DQ,{titleId:a.titleId}),E.jsx(jQ,{contentRef:c,descriptionId:a.descriptionId})]})]})}),QS="DialogTitle",NQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(QS,r);return E.jsx(we.h2,{id:s.titleId,...n,ref:e})});NQ.displayName=QS;var xN="DialogDescription",MQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(xN,r);return E.jsx(we.p,{id:s.descriptionId,...n,ref:e})});MQ.displayName=xN;var bN="DialogClose",wN=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(bN,r);return E.jsx(we.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,()=>s.onOpenChange(!1))})});wN.displayName=bN;function YS(t){return t?"open":"closed"}var EN="DialogTitleWarning",[L1e,SN]=ZH(EN,{contentName:fl,titleName:QS,docsSlug:"dialog"}),DQ=({titleId:t})=>{const e=SN(EN),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return v.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},DQ="DialogDescriptionWarning",LQ=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${SN(DQ).contentName}}.`;return v.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},jQ=dN,BQ=yN,FQ=vN,UQ=mN,VQ=wN,$Q=Nt({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),zQ=Nt({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const HQ=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return E.jsx(q,{className:zQ({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:E.jsx(q,{className:$Q({direction:n}),background:"backgroundPrimary",...s,children:e})})};function GQ(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function qQ(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 CN(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n={};for(var s in t){var i=t[s],o=[...r,s];typeof i=="string"||typeof i=="number"||i==null?n[s]=e(i,o):typeof i=="object"&&!Array.isArray(i)?n[s]=CN(i,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return n}function jR(t,e,r){t.style.setProperty(GQ(e),r)}function BR(t,e,r){if(typeof r=="object"){var n=e;CN(r,(a,c)=>{a!=null&&jR(t,qQ(n,c),String(a))})}else{var s=e;for(var i in s){var o=s[i];o!=null&&jR(t,i,s[i])}}}const JS=["dark","light"],AN="dark",WQ="data-theme",FR="@sequence.theme",KQ=t=>JS.includes(t),QQ=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),kN=t=>t?`${FR}.${t}`:FR,YQ=t=>{const e=localStorage.getItem(kN(t));return e&&JS.includes(e)?e:AN},TN=v.createContext(null),JQ=t=>{const[e,r]=v.useState(t.theme||AN);v.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),v.useEffect(()=>{t.theme||r(YQ(t.scope))},[t.theme,t.scope]),v.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),v.useEffect(()=>{const s=document.querySelector(t.root||":root");s&&(KQ(e)?(s.setAttribute(WQ,e),BR(s,cR,{colors:PH[e]})):QQ(e)&&BR(s,cR,{colors:e}),t.root&&s.classList.add("seq-root"))},[e,t.root]);const n=v.useMemo(()=>({theme:e,root:t.root,setTheme:s=>{JS.includes(s)&&(localStorage.setItem(kN(t.scope),s),r(s))}}),[e,t.root,t.scope]);return E.jsx(TN.Provider,{value:n,children:t.children})},XQ=()=>{const t=v.useContext(TN);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var ZQ="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11nk fyvr1ko fyvr1oo fyvr1qo fyvr1mo",eY="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",tY=Nt({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"]]}),rY="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11nk";const PN=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:c="lg",overlayProps:l,contentProps:u,rootProps:f={}}=t,{root:d}=XQ(),[h,p]=v.useState(null);return v.useEffect(()=>{p(document.querySelector(d||"body"))},[d]),h?E.jsx(jQ,{modal:!0,defaultOpen:!0,onOpenChange:o,children:E.jsx(BQ,{forceMount:!0,container:h,children:E.jsxs(q,{...f,className:qr("seq-root",ZQ,f==null?void 0:f.className),children:[E.jsx(q,{as:FQ,asChild:!0,background:r,className:eY,forceMount:!0,children:E.jsx(Xc.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...l},"modal-overlay")}),E.jsx(UQ,{asChild:!0,className:tY({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:y=>{i?o==null||o():y.preventDefault()},onInteractOutside:y=>{i||y.preventDefault()},children:E.jsxs(Xc.div,{initial:s?!1:{y:"100%",opacity:c==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:c==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...u,children:[a?E.jsx(HQ,{children:n}):n,i&&E.jsx(VQ,{asChild:!0,children:E.jsx(Am,{icon:Gh,backdropFilter:"blur",size:"xs",className:rY,"aria-label":"Close"})})]},"modal-content")})]})})}):null};var nY="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11od fyvr12s1 fyvr1g0 fyvr118g",sY=Nt({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:[]}),iY=Nt({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 sr=v.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",leftIcon:u,rightIcon:f,name:d,controls:h,type:p="text",numeric:y=!1,...g}=t;return E.jsx(Al,{description:i,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:E.jsx(q,{width:"full",children:E.jsxs(q,{className:qr(nY,sY({borderRadius:s})),children:[u&&E.jsx(u,{size:"sm"}),E.jsx(q,{as:r,autoComplete:n,spellCheck:"false",className:iY({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:p,...g}),f&&E.jsx(f,{size:"sm"}),h]})})})}),oY=RegExp("^\\d*(?:\\\\[.])?\\d*$");function aY(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}v.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=l=>{let{value:u}=l.target;u=u.replace(/,/g,"."),u.startsWith(".")&&(u="0"+u),u.startsWith("0")&&(u=u.replace(/^0+(?=\d)/,"")),(u===""||oY.test(aY(u)))&&(s==null||s({...l,target:{...l.target,value:u}}))},c=l=>{const{value:u}=l.target;let f=u;f.endsWith(".")&&(f=f.slice(0,-1)),f.endsWith(".0")&&(f=f.slice(0,-2)),f==="0"&&(f=""),i==null||i(l),f!==u&&(s==null||s({...l,target:{...l.target,value:f}}))};return E.jsx(sr,{name:r,onChange:a,onBlur:c,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 cY="y5zf971 _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8 _4efw240";const lY=t=>{const{value:e,digits:r=6,group:n,onChange:s,onConfirm:i,disabled:o=!1}=t,a=v.useMemo(()=>UR(0,r).map(()=>v.createRef()),[r]);v.useEffect(()=>{var d,h;(h=(d=a[0])==null?void 0:d.current)==null||h.focus()},[a]);const c=(d,h)=>{var p,y;/^\d$/.test(h)||(h="");const g=[...e];g[d]=h,h!==""&&((y=(p=a[d+1])==null?void 0:p.current)==null||y.focus()),s(g)},l=()=>e.join("").length===r,u=(d,h)=>{var p,y;const g=a[d].current,m=(p=a[d-1])==null?void 0:p.current,x=(y=a[d+1])==null?void 0:y.current;switch(h.key){case"Backspace":h.preventDefault(),g&&(g.value="",c(d,"")),m==null||m.focus();break;case"ArrowLeft":h.preventDefault(),m==null||m.focus();break;case"ArrowRight":h.preventDefault(),x==null||x.focus();break;case"Enter":h.preventDefault(),l()&&(i==null||i());break;default:(g==null?void 0:g.value)===h.key&&(h.preventDefault(),c(d,h.key))}},f=(d,h)=>{var p,y;const m=h.clipboardData.getData("text/plain").replace(/\D/g,"");new RegExp(`^\\d{${r}}$`).test(m)&&((y=(p=a[0])==null?void 0:p.current)==null||y.focus(),s(m.split("")),setTimeout(()=>{var b,w;(w=(b=a[a.length-1])==null?void 0:b.current)==null||w.focus()}))};return E.jsx(q,{gap:"2",children:UR(0,r).map(d=>E.jsxs(v.Fragment,{children:[!!n&&d>0&&d%n===0&&E.jsx("span",{}),E.jsx(q,{as:"input",className:cY,value:e[d]||"",ref:a[d],type:"text",inputMode:"numeric",maxLength:1,disabled:o,onFocus:h=>h.target.select(),onPaste:h=>f(d,h),onChange:h=>c(d,h.target.value),onKeyDown:h=>{u(d,h)}})]},d))})},UR=(t,e)=>Array.from({length:e-t},(r,n)=>n+t);Nt({defaultClassName:"_1jujggt1",variantClassNames:{size:{sm:"_1jujggt2",normal:"_1jujggt3",md:"_1jujggt4",lg:"_1jujggt5",xl:"_1jujggt6"}},defaultVariants:{},compoundVariants:[]});var XS="Progress",ZS=100,[uY,j1e]=Wr(XS),[fY,dY]=uY(XS),hY=v.forwardRef((t,e)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:i=yY,...o}=t;(s||s===0)&&!VR(s)&&console.error(vY(`${s}`,"Progress"));const a=VR(s)?s:ZS;n!==null&&!$R(n,a)&&console.error(mY(`${n}`,"Progress"));const c=$R(n,a)?n:null,l=r0(c)?i(c,a):void 0;return E.jsx(fY,{scope:r,value:c,max:a,children:E.jsx(we.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":r0(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":IN(c,a),"data-value":c??void 0,"data-max":a,...o,ref:e})})});hY.displayName=XS;var RN="ProgressIndicator",pY=v.forwardRef((t,e)=>{const{__scopeProgress:r,...n}=t,s=dY(RN,r);return E.jsx(we.div,{"data-state":IN(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:e})});pY.displayName=RN;function yY(t,e){return`${Math.round(t/e*100)}%`}function IN(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function r0(t){return typeof t=="number"}function VR(t){return r0(t)&&!isNaN(t)&&t>0}function $R(t,e){return r0(t)&&!isNaN(t)&&t<=e&&t>=0}function vY(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ZS}\`.`}function mY(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return v.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},LQ="DialogDescriptionWarning",jQ=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${SN(LQ).contentName}}.`;return v.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},BQ=dN,FQ=yN,UQ=vN,VQ=mN,$Q=wN,zQ=Nt({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),HQ=Nt({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const GQ=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return E.jsx(q,{className:HQ({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:E.jsx(q,{className:zQ({direction:n}),background:"backgroundPrimary",...s,children:e})})};function qQ(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function WQ(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 CN(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n={};for(var s in t){var i=t[s],o=[...r,s];typeof i=="string"||typeof i=="number"||i==null?n[s]=e(i,o):typeof i=="object"&&!Array.isArray(i)?n[s]=CN(i,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return n}function jR(t,e,r){t.style.setProperty(qQ(e),r)}function BR(t,e,r){if(typeof r=="object"){var n=e;CN(r,(a,c)=>{a!=null&&jR(t,WQ(n,c),String(a))})}else{var s=e;for(var i in s){var o=s[i];o!=null&&jR(t,i,s[i])}}}const JS=["dark","light"],AN="dark",KQ="data-theme",FR="@sequence.theme",QQ=t=>JS.includes(t),YQ=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),kN=t=>t?`${FR}.${t}`:FR,JQ=t=>{const e=localStorage.getItem(kN(t));return e&&JS.includes(e)?e:AN},TN=v.createContext(null),XQ=t=>{const[e,r]=v.useState(t.theme||AN);v.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),v.useEffect(()=>{t.theme||r(JQ(t.scope))},[t.theme,t.scope]),v.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),v.useEffect(()=>{const s=document.querySelector(t.root||":root");s&&(QQ(e)?(s.setAttribute(KQ,e),BR(s,cR,{colors:RH[e]})):YQ(e)&&BR(s,cR,{colors:e}),t.root&&s.classList.add("seq-root"))},[e,t.root]);const n=v.useMemo(()=>({theme:e,root:t.root,setTheme:s=>{JS.includes(s)&&(localStorage.setItem(kN(t.scope),s),r(s))}}),[e,t.root,t.scope]);return E.jsx(TN.Provider,{value:n,children:t.children})},ZQ=()=>{const t=v.useContext(TN);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var eY="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11nk fyvr1ko fyvr1oo fyvr1qo fyvr1mo",tY="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",rY=Nt({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"]]}),nY="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11nk";const PN=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:c="lg",overlayProps:l,contentProps:u,rootProps:f={}}=t,{root:d}=ZQ(),[h,p]=v.useState(null);return v.useEffect(()=>{p(document.querySelector(d||"body"))},[d]),h?E.jsx(BQ,{modal:!0,defaultOpen:!0,onOpenChange:o,children:E.jsx(FQ,{forceMount:!0,container:h,children:E.jsxs(q,{...f,className:qr("seq-root",eY,f==null?void 0:f.className),children:[E.jsx(q,{as:UQ,asChild:!0,background:r,className:tY,forceMount:!0,children:E.jsx(Xc.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...l},"modal-overlay")}),E.jsx(VQ,{asChild:!0,className:rY({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:y=>{i?o==null||o():y.preventDefault()},onInteractOutside:y=>{i||y.preventDefault()},children:E.jsxs(Xc.div,{initial:s?!1:{y:"100%",opacity:c==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:c==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...u,children:[a?E.jsx(GQ,{children:n}):n,i&&E.jsx($Q,{asChild:!0,children:E.jsx(Am,{icon:Gh,backdropFilter:"blur",size:"xs",className:nY,"aria-label":"Close"})})]},"modal-content")})]})})}):null};var sY="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11od fyvr12s1 fyvr1g0 fyvr118g",iY=Nt({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:[]}),oY=Nt({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 sr=v.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",leftIcon:u,rightIcon:f,name:d,controls:h,type:p="text",numeric:y=!1,...g}=t;return E.jsx(Al,{description:i,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:E.jsx(q,{width:"full",children:E.jsxs(q,{className:qr(sY,iY({borderRadius:s})),children:[u&&E.jsx(u,{size:"sm"}),E.jsx(q,{as:r,autoComplete:n,spellCheck:"false",className:oY({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:p,...g}),f&&E.jsx(f,{size:"sm"}),h]})})})}),aY=RegExp("^\\d*(?:\\\\[.])?\\d*$");function cY(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}v.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=l=>{let{value:u}=l.target;u=u.replace(/,/g,"."),u.startsWith(".")&&(u="0"+u),u.startsWith("0")&&(u=u.replace(/^0+(?=\d)/,"")),(u===""||aY.test(cY(u)))&&(s==null||s({...l,target:{...l.target,value:u}}))},c=l=>{const{value:u}=l.target;let f=u;f.endsWith(".")&&(f=f.slice(0,-1)),f.endsWith(".0")&&(f=f.slice(0,-2)),f==="0"&&(f=""),i==null||i(l),f!==u&&(s==null||s({...l,target:{...l.target,value:f}}))};return E.jsx(sr,{name:r,onChange:a,onBlur:c,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 lY="y5zf971 _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8 _4efw240";const uY=t=>{const{value:e,digits:r=6,group:n,onChange:s,onConfirm:i,disabled:o=!1}=t,a=v.useMemo(()=>UR(0,r).map(()=>v.createRef()),[r]);v.useEffect(()=>{var d,h;(h=(d=a[0])==null?void 0:d.current)==null||h.focus()},[a]);const c=(d,h)=>{var p,y;/^\d$/.test(h)||(h="");const g=[...e];g[d]=h,h!==""&&((y=(p=a[d+1])==null?void 0:p.current)==null||y.focus()),s(g)},l=()=>e.join("").length===r,u=(d,h)=>{var p,y;const g=a[d].current,m=(p=a[d-1])==null?void 0:p.current,x=(y=a[d+1])==null?void 0:y.current;switch(h.key){case"Backspace":h.preventDefault(),g&&(g.value="",c(d,"")),m==null||m.focus();break;case"ArrowLeft":h.preventDefault(),m==null||m.focus();break;case"ArrowRight":h.preventDefault(),x==null||x.focus();break;case"Enter":h.preventDefault(),l()&&(i==null||i());break;default:(g==null?void 0:g.value)===h.key&&(h.preventDefault(),c(d,h.key))}},f=(d,h)=>{var p,y;const m=h.clipboardData.getData("text/plain").replace(/\D/g,"");new RegExp(`^\\d{${r}}$`).test(m)&&((y=(p=a[0])==null?void 0:p.current)==null||y.focus(),s(m.split("")),setTimeout(()=>{var b,w;(w=(b=a[a.length-1])==null?void 0:b.current)==null||w.focus()}))};return E.jsx(q,{gap:"2",children:UR(0,r).map(d=>E.jsxs(v.Fragment,{children:[!!n&&d>0&&d%n===0&&E.jsx("span",{}),E.jsx(q,{as:"input",className:lY,value:e[d]||"",ref:a[d],type:"text",inputMode:"numeric",maxLength:1,disabled:o,onFocus:h=>h.target.select(),onPaste:h=>f(d,h),onChange:h=>c(d,h.target.value),onKeyDown:h=>{u(d,h)}})]},d))})},UR=(t,e)=>Array.from({length:e-t},(r,n)=>n+t);Nt({defaultClassName:"_1jujggt1",variantClassNames:{size:{sm:"_1jujggt2",normal:"_1jujggt3",md:"_1jujggt4",lg:"_1jujggt5",xl:"_1jujggt6"}},defaultVariants:{},compoundVariants:[]});var XS="Progress",ZS=100,[fY,j1e]=Wr(XS),[dY,hY]=fY(XS),pY=v.forwardRef((t,e)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:i=vY,...o}=t;(s||s===0)&&!VR(s)&&console.error(mY(`${s}`,"Progress"));const a=VR(s)?s:ZS;n!==null&&!$R(n,a)&&console.error(gY(`${n}`,"Progress"));const c=$R(n,a)?n:null,l=r0(c)?i(c,a):void 0;return E.jsx(dY,{scope:r,value:c,max:a,children:E.jsx(we.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":r0(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":IN(c,a),"data-value":c??void 0,"data-max":a,...o,ref:e})})});pY.displayName=XS;var RN="ProgressIndicator",yY=v.forwardRef((t,e)=>{const{__scopeProgress:r,...n}=t,s=hY(RN,r);return E.jsx(we.div,{"data-state":IN(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:e})});yY.displayName=RN;function vY(t,e){return`${Math.round(t/e*100)}%`}function IN(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function r0(t){return typeof t=="number"}function VR(t){return r0(t)&&!isNaN(t)&&t>0}function $R(t,e){return r0(t)&&!isNaN(t)&&t<=e&&t>=0}function mY(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ZS}\`.`}function gY(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 ${ZS} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. -Defaulting to \`null\`.`}var eC="Radio",[gY,ON]=Wr(eC),[xY,bY]=gY(eC),_N=v.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...l}=t,[u,f]=v.useState(null),d=$e(e,y=>f(y)),h=v.useRef(!1),p=u?!!u.closest("form"):!0;return E.jsxs(xY,{scope:r,checked:s,disabled:o,children:[E.jsx(we.button,{type:"button",role:"radio","aria-checked":s,"data-state":DN(s),"data-disabled":o?"":void 0,disabled:o,value:a,...l,ref:d,onClick:ce(t.onClick,y=>{s||c==null||c(),p&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})}),p&&E.jsx(wY,{control:u,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});_N.displayName=eC;var NN="RadioIndicator",MN=v.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=bY(NN,r);return E.jsx(cn,{present:n||i.checked,children:E.jsx(we.span,{"data-state":DN(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});MN.displayName=NN;var wY=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=v.useRef(null),o=pm(r),a=ym(e);return v.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),E.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function DN(t){return t?"checked":"unchecked"}var EY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tC="RadioGroup",[SY,B1e]=Wr(tC,[ud,ON]),LN=ud(),jN=ON(),[CY,AY]=SY(tC),BN=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:l,loop:u=!0,onValueChange:f,...d}=t,h=LN(r),p=sy(l),[y,g]=ps({prop:i,defaultProp:s,onChange:f});return E.jsx(CY,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:g,children:E.jsx(LS,{asChild:!0,...h,orientation:c,dir:p,loop:u,children:E.jsx(we.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:p,...d,ref:e})})})});BN.displayName=tC;var FN="RadioGroupItem",UN=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=AY(FN,r),o=i.disabled||n,a=LN(r),c=jN(r),l=v.useRef(null),u=$e(e,l),f=i.value===s.value,d=v.useRef(!1);return v.useEffect(()=>{const h=y=>{EY.includes(y.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)}},[]),E.jsx(jS,{asChild:!0,...a,focusable:!o,active:f,children:E.jsx(_N,{disabled:o,required:i.required,checked:f,...c,...s,name:i.name,ref:u,onCheck:()=>i.onValueChange(s.value),onKeyDown:ce(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ce(s.onFocus,()=>{var h;d.current&&((h=l.current)==null||h.click())})})})});UN.displayName=FN;var kY="RadioGroupIndicator",VN=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=jN(r);return E.jsx(MN,{...s,...n,ref:e})});VN.displayName=kY;var TY=BN,PY=UN,RY=VN,IY=Nt({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:[]}),OY=Nt({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12s1",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const _Y=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return E.jsx(q,{alignItems:"center",children:E.jsx(Al,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:E.jsx(PY,{className:IY({size:n}),value:s,id:e,disabled:i,children:E.jsx(RY,{className:OY({size:n})})})})})};v.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...c}=t;return E.jsx(TY,{disabled:n,name:i,ref:e,...c,children:E.jsx(q,{flexDirection:r,gap:s,children:o.map(({label:l,value:u,disabled:f})=>E.jsx(_Y,{id:`${i}-${u}`,label:l,size:a,value:u,disabled:f},u))})})});function zR(t,[e,r]){return Math.min(r,Math.max(e,t))}var NY="VisuallyHidden",ly=v.forwardRef((t,e)=>E.jsx(we.span,{...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}}));ly.displayName=NY;var MY=ly,DY=[" ","Enter","ArrowUp","ArrowDown"],LY=[" ","Enter"],uy="Select",[km,Tm,jY]=vm(uy),[fd,F1e]=Wr(uy,[jY,ld]),Pm=ld(),[BY,Ua]=fd(uy),[FY,UY]=fd(uy),$N=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:h}=t,p=Pm(e),[y,g]=v.useState(null),[m,x]=v.useState(null),[b,w]=v.useState(!1),A=sy(l),[O=!1,_]=ps({prop:n,defaultProp:s,onChange:i}),[C,j]=ps({prop:o,defaultProp:a,onChange:c}),V=v.useRef(null),B=y?!!y.closest("form"):!0,[z,Y]=v.useState(new Set),H=Array.from(z).map(L=>L.props.value).join(";");return E.jsx(_S,{...p,children:E.jsxs(BY,{required:h,scope:e,trigger:y,onTriggerChange:g,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:us(),value:C,onValueChange:j,open:O,onOpenChange:_,dir:A,triggerPointerDownPosRef:V,disabled:d,children:[E.jsx(km.Provider,{scope:e,children:E.jsx(FY,{scope:t.__scopeSelect,onNativeOptionAdd:v.useCallback(L=>{Y(T=>new Set(T).add(L))},[]),onNativeOptionRemove:v.useCallback(L=>{Y(T=>{const P=new Set(T);return P.delete(L),P})},[]),children:r})}),B?E.jsxs(c9,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:C,onChange:L=>j(L.target.value),disabled:d,children:[C===void 0?E.jsx("option",{value:""}):null,Array.from(z)]},H):null]})})};$N.displayName=uy;var zN="SelectTrigger",HN=v.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=Pm(r),o=Ua(zN,r),a=o.disabled||n,c=$e(e,o.onTriggerChange),l=Tm(r),[u,f,d]=l9(p=>{const y=l().filter(x=>!x.disabled),g=y.find(x=>x.value===o.value),m=u9(y,p,g);m!==void 0&&o.onValueChange(m.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return E.jsx(NS,{asChild:!0,...i,children:E.jsx(we.button,{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":a9(o.value)?"":void 0,...s,ref:c,onClick:ce(s.onClick,p=>{p.currentTarget.focus()}),onPointerDown:ce(s.onPointerDown,p=>{const y=p.target;y.hasPointerCapture(p.pointerId)&&y.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:ce(s.onKeyDown,p=>{const y=u.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&f(p.key),!(y&&p.key===" ")&&DY.includes(p.key)&&(h(),p.preventDefault())})})})});HN.displayName=zN;var GN="SelectValue",qN=v.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,c=Ua(GN,r),{onValueNodeHasChildrenChange:l}=c,u=i!==void 0,f=$e(e,c.onValueNodeChange);return Tr(()=>{l(u)},[l,u]),E.jsx(we.span,{...a,ref:f,style:{pointerEvents:"none"},children:a9(c.value)?E.jsx(E.Fragment,{children:o}):i})});qN.displayName=GN;var VY="SelectIcon",WN=v.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return E.jsx(we.span,{"aria-hidden":!0,...s,ref:e,children:n||"▼"})});WN.displayName=VY;var dl="SelectContent",KN=v.forwardRef((t,e)=>{const r=Ua(dl,t.__scopeSelect),[n,s]=v.useState();if(Tr(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Eo.createPortal(E.jsx(QN,{scope:t.__scopeSelect,children:E.jsx(km.Slot,{scope:t.__scopeSelect,children:E.jsx("div",{children:t.children})})}),i):null}return E.jsx(YN,{...t,ref:e})});KN.displayName=dl;var Mi=10,[QN,Va]=fd(dl),$Y="SelectContentImpl",YN=v.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:y,avoidCollisions:g,...m}=t,x=Ua(dl,r),[b,w]=v.useState(null),[A,O]=v.useState(null),_=$e(e,ie=>w(ie)),[C,j]=v.useState(null),[V,B]=v.useState(null),z=Tm(r),[Y,H]=v.useState(!1),L=v.useRef(!1);v.useEffect(()=>{if(b)return BS(b)},[b]),SS();const T=v.useCallback(ie=>{const[Me,...Be]=z().map(ze=>ze.ref.current),[Te]=Be.slice(-1),De=document.activeElement;for(const ze of ie)if(ze===De||(ze==null||ze.scrollIntoView({block:"nearest"}),ze===Me&&A&&(A.scrollTop=0),ze===Te&&A&&(A.scrollTop=A.scrollHeight),ze==null||ze.focus(),document.activeElement!==De))return},[z,A]),P=v.useCallback(()=>T([C,b]),[T,C,b]);v.useEffect(()=>{Y&&P()},[Y,P]);const{onOpenChange:R,triggerPointerDownPosRef:I}=x;v.useEffect(()=>{if(b){let ie={x:0,y:0};const Me=Te=>{var De,ze;ie={x:Math.abs(Math.round(Te.pageX)-(((De=I.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Te.pageY)-(((ze=I.current)==null?void 0:ze.y)??0))}},Be=Te=>{ie.x<=10&&ie.y<=10?Te.preventDefault():b.contains(Te.target)||R(!1),document.removeEventListener("pointermove",Me),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",Me),document.addEventListener("pointerup",Be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Me),document.removeEventListener("pointerup",Be,{capture:!0})}}},[b,R,I]),v.useEffect(()=>{const ie=()=>R(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[R]);const[U,F]=l9(ie=>{const Me=z().filter(De=>!De.disabled),Be=Me.find(De=>De.ref.current===document.activeElement),Te=u9(Me,ie,Be);Te&&setTimeout(()=>Te.ref.current.focus())}),X=v.useCallback((ie,Me,Be)=>{const Te=!L.current&&!Be;(x.value!==void 0&&x.value===Me||Te)&&(j(ie),Te&&(L.current=!0))},[x.value]),oe=v.useCallback(()=>b==null?void 0:b.focus(),[b]),ae=v.useCallback((ie,Me,Be)=>{const Te=!L.current&&!Be;(x.value!==void 0&&x.value===Me||Te)&&B(ie)},[x.value]),ke=n==="popper"?Tw:JN,ve=ke===Tw?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:y,avoidCollisions:g}:{};return E.jsx(QN,{scope:r,content:b,viewport:A,onViewportChange:O,itemRefCallback:X,selectedItem:C,onItemLeave:oe,itemTextRefCallback:ae,focusSelectedItem:P,selectedItemText:V,position:n,isPositioned:Y,searchRef:U,children:E.jsx(Em,{as:ll,allowPinchZoom:!0,children:E.jsx(mm,{asChild:!0,trapped:x.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:ce(s,ie=>{var Me;(Me=x.trigger)==null||Me.focus({preventScroll:!0}),ie.preventDefault()}),children:E.jsx(od,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:E.jsx(ke,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ie=>ie.preventDefault(),...m,...ve,onPlaced:()=>H(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:ce(m.onKeyDown,ie=>{const Me=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!Me&&ie.key.length===1&&F(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let Te=z().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const De=ie.target,ze=Te.indexOf(De);Te=Te.slice(ze+1)}setTimeout(()=>T(Te)),ie.preventDefault()}})})})})})})});YN.displayName=$Y;var zY="SelectItemAlignedPosition",JN=v.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Ua(dl,r),o=Va(dl,r),[a,c]=v.useState(null),[l,u]=v.useState(null),f=$e(e,_=>u(_)),d=Tm(r),h=v.useRef(!1),p=v.useRef(!0),{viewport:y,selectedItem:g,selectedItemText:m,focusSelectedItem:x}=o,b=v.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&l&&y&&g&&m){const _=i.trigger.getBoundingClientRect(),C=l.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),V=m.getBoundingClientRect();if(i.dir!=="rtl"){const De=V.left-C.left,ze=j.left-De,at=_.left-ze,qe=_.width+at,Kr=Math.max(qe,C.width),vs=window.innerWidth-Mi,Qa=zR(ze,[Mi,vs-Kr]);a.style.minWidth=qe+"px",a.style.left=Qa+"px"}else{const De=C.right-V.right,ze=window.innerWidth-j.right-De,at=window.innerWidth-_.right-ze,qe=_.width+at,Kr=Math.max(qe,C.width),vs=window.innerWidth-Mi,Qa=zR(ze,[Mi,vs-Kr]);a.style.minWidth=qe+"px",a.style.right=Qa+"px"}const B=d(),z=window.innerHeight-Mi*2,Y=y.scrollHeight,H=window.getComputedStyle(l),L=parseInt(H.borderTopWidth,10),T=parseInt(H.paddingTop,10),P=parseInt(H.borderBottomWidth,10),R=parseInt(H.paddingBottom,10),I=L+T+Y+R+P,U=Math.min(g.offsetHeight*5,I),F=window.getComputedStyle(y),X=parseInt(F.paddingTop,10),oe=parseInt(F.paddingBottom,10),ae=_.top+_.height/2-Mi,ke=z-ae,ve=g.offsetHeight/2,ie=g.offsetTop+ve,Me=L+T+ie,Be=I-Me;if(Me<=ae){const De=g===B[B.length-1].ref.current;a.style.bottom="0px";const ze=l.clientHeight-y.offsetTop-y.offsetHeight,at=Math.max(ke,ve+(De?oe:0)+ze+P),qe=Me+at;a.style.height=qe+"px"}else{const De=g===B[0].ref.current;a.style.top="0px";const at=Math.max(ae,L+y.offsetTop+(De?X:0)+ve)+Be;a.style.height=at+"px",y.scrollTop=Me-ae+y.offsetTop}a.style.margin=`${Mi}px 0`,a.style.minHeight=U+"px",a.style.maxHeight=z+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,l,y,g,m,i.dir,n]);Tr(()=>b(),[b]);const[w,A]=v.useState();Tr(()=>{l&&A(window.getComputedStyle(l).zIndex)},[l]);const O=v.useCallback(_=>{_&&p.current===!0&&(b(),x==null||x(),p.current=!1)},[b,x]);return E.jsx(GY,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:O,children:E.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:E.jsx(we.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});JN.displayName=zY;var HY="SelectPopperPosition",Tw=v.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Mi,...i}=t,o=Pm(r);return E.jsx(MS,{...o,...i,ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}})});Tw.displayName=HY;var[GY,rC]=fd(dl,{}),Pw="SelectViewport",XN=v.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...s}=t,i=Va(Pw,r),o=rC(Pw,r),a=$e(e,i.onViewportChange),c=v.useRef(0);return E.jsxs(E.Fragment,{children:[E.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),E.jsx(km.Slot,{scope:r,children:E.jsx(we.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ce(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&f){const h=Math.abs(c.current-u.scrollTop);if(h>0){const p=window.innerHeight-Mi*2,y=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),m=Math.max(y,g);if(m0?w:0,f.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});XN.displayName=Pw;var ZN="SelectGroup",[qY,WY]=fd(ZN),e9=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=us();return E.jsx(qY,{scope:r,id:s,children:E.jsx(we.div,{role:"group","aria-labelledby":s,...n,ref:e})})});e9.displayName=ZN;var t9="SelectLabel",KY=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=WY(t9,r);return E.jsx(we.div,{id:s.id,...n,ref:e})});KY.displayName=t9;var n0="SelectItem",[QY,r9]=fd(n0),n9=v.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Ua(n0,r),c=Va(n0,r),l=a.value===n,[u,f]=v.useState(i??""),[d,h]=v.useState(!1),p=$e(e,m=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,m,n,s)}),y=us(),g=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return E.jsx(QY,{scope:r,value:n,disabled:s,textId:y,isSelected:l,onItemTextChange:v.useCallback(m=>{f(x=>x||((m==null?void 0:m.textContent)??"").trim())},[]),children:E.jsx(km.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:E.jsx(we.div,{role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:p,onFocus:ce(o.onFocus,()=>h(!0)),onBlur:ce(o.onBlur,()=>h(!1)),onPointerUp:ce(o.onPointerUp,g),onPointerMove:ce(o.onPointerMove,m=>{var x;s?(x=c.onItemLeave)==null||x.call(c):m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(o.onPointerLeave,m=>{var x;m.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:ce(o.onKeyDown,m=>{var x;((x=c.searchRef)==null?void 0:x.current)!==""&&m.key===" "||(LY.includes(m.key)&&g(),m.key===" "&&m.preventDefault())})})})})});n9.displayName=n0;var Qd="SelectItemText",s9=v.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Ua(Qd,r),a=Va(Qd,r),c=r9(Qd,r),l=UY(Qd,r),[u,f]=v.useState(null),d=$e(e,m=>f(m),c.onItemTextChange,m=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,m,c.value,c.disabled)}),h=u==null?void 0:u.textContent,p=v.useMemo(()=>E.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:g}=l;return Tr(()=>(y(p),()=>g(p)),[y,g,p]),E.jsxs(E.Fragment,{children:[E.jsx(we.span,{id:c.textId,...i,ref:d}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Eo.createPortal(i.children,o.valueNode):null]})});s9.displayName=Qd;var i9="SelectItemIndicator",YY=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return r9(i9,r).isSelected?E.jsx(we.span,{"aria-hidden":!0,...n,ref:e}):null});YY.displayName=i9;var Rw="SelectScrollUpButton",JY=v.forwardRef((t,e)=>{const r=Va(Rw,t.__scopeSelect),n=rC(Rw,t.__scopeSelect),[s,i]=v.useState(!1),o=$e(e,n.onScrollButtonChange);return Tr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const l=c.scrollTop>0;i(l)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?E.jsx(o9,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});JY.displayName=Rw;var Iw="SelectScrollDownButton",XY=v.forwardRef((t,e)=>{const r=Va(Iw,t.__scopeSelect),n=rC(Iw,t.__scopeSelect),[s,i]=v.useState(!1),o=$e(e,n.onScrollButtonChange);return Tr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?E.jsx(o9,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});XY.displayName=Iw;var o9=v.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=t,i=Va("SelectScrollButton",r),o=v.useRef(null),a=Tm(r),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Tr(()=>{var l;const u=a().find(f=>f.ref.current===document.activeElement);(l=u==null?void 0:u.ref.current)==null||l.scrollIntoView({block:"nearest"})},[a]),E.jsx(we.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:ce(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:ce(s.onPointerMove,()=>{var l;(l=i.onItemLeave)==null||l.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:ce(s.onPointerLeave,()=>{c()})})}),ZY="SelectSeparator",eJ=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return E.jsx(we.div,{"aria-hidden":!0,...n,ref:e})});eJ.displayName=ZY;var Ow="SelectArrow",tJ=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Pm(r),i=Ua(Ow,r),o=Va(Ow,r);return i.open&&o.position==="popper"?E.jsx(DS,{...s,...n,ref:e}):null});tJ.displayName=Ow;function a9(t){return t===""||t===void 0}var c9=v.forwardRef((t,e)=>{const{value:r,...n}=t,s=v.useRef(null),i=$e(e,s),o=pm(r);return v.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&u){const f=new Event("change",{bubbles:!0});u.call(a,r),a.dispatchEvent(f)}},[o,r]),E.jsx(ly,{asChild:!0,children:E.jsx("select",{...n,ref:i,defaultValue:r})})});c9.displayName="BubbleSelect";function l9(t){const e=Gr(t),r=v.useRef(""),n=v.useRef(0),s=v.useCallback(o=>{const a=r.current+o;e(a),function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),i=v.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function u9(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=rJ(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function rJ(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var nJ=$N,sJ=HN,iJ=qN,oJ=WN,aJ=KN,cJ=XN,lJ=e9,uJ=n9,fJ=s9,dJ="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr11hc fyvr11f4 fyvr12s1 fyvr118c fyvr11jw fyvr11n4 fyvr12v7 fyvr12o1",hJ=Nt({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:[]}),pJ="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tv fyvr12s1 fyvr11nl",yJ="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 vJ=v.forwardRef(({children:t,className:e,...r},n)=>E.jsx(uJ,{className:qr(yJ,e),...r,ref:n,children:E.jsx(fJ,{children:t})})),Rm=v.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:c,options:l,placeholder:u,...f}=t;return E.jsx(Al,{disabled:n,display:"grid",id:s??c,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:E.jsxs(nJ,{disabled:n,name:c,...f,children:[E.jsxs(sJ,{id:s??c,className:qr(dJ,hJ({borderRadius:r})),ref:e,children:[E.jsx(iJ,{placeholder:u}),E.jsx(q,{as:oJ,display:"inline-flex",children:E.jsx(G6,{})})]}),E.jsx(aJ,{className:pJ,children:E.jsx(cJ,{children:E.jsx(lJ,{children:l.map(({value:d,label:h,...p})=>E.jsx(vJ,{value:d,...p,children:h},d))})})})]})})});v.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,c=o?E.jsx(Am,{icon:Gh,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return E.jsx(sr,{ref:e,name:i,leftIcon:wG,controls:r||c,placeholder:s,value:o,onChange:l=>n==null?void 0:n(l),...a})});var mJ=Nt({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const Bn=v.forwardRef((t,e)=>{const{size:r="md",...n}=t;return E.jsx(q,{className:mJ({size:r}),color:"text50",ref:e,...n,children:E.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[E.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),E.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});v.forwardRef(({children:t},e)=>E.jsx(q,{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}));var nC="Switch",[gJ,U1e]=Wr(nC),[xJ,bJ]=gJ(nC),f9=v.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=v.useState(null),h=$e(e,x=>d(x)),p=v.useRef(!1),y=f?!!f.closest("form"):!0,[g=!1,m]=ps({prop:s,defaultProp:i,onChange:l});return E.jsxs(xJ,{scope:r,checked:g,disabled:a,children:[E.jsx(we.button,{type:"button",role:"switch","aria-checked":g,"aria-required":o,"data-state":p9(g),"data-disabled":a?"":void 0,disabled:a,value:c,...u,ref:h,onClick:ce(t.onClick,x=>{m(b=>!b),y&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})}),y&&E.jsx(wJ,{control:f,bubbles:!p.current,name:n,value:c,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});f9.displayName=nC;var d9="SwitchThumb",h9=v.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=bJ(d9,r);return E.jsx(we.span,{"data-state":p9(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:e})});h9.displayName=d9;var wJ=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=v.useRef(null),o=pm(r),a=ym(e);return v.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),E.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function p9(t){return t?"checked":"unchecked"}var EJ=f9,SJ=h9,CJ="_1lp2u8e1 _1lp2u8e0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11t1 fyvr11hw fyvr12v7 fyvr12o1 _4efw240",AJ="_1lp2u8e3 _1lp2u8e2 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11o1";const kJ=t=>{const{disabled:e,label:r,labelLocation:n="left",description:s,id:i,name:o,...a}=t;return E.jsx(Al,{disabled:e,display:"flex",id:i??o,label:r,labelLocation:n,description:s,whiteSpace:"nowrap",children:E.jsx(EJ,{className:CJ,disabled:e,...a,children:E.jsx(q,{position:"relative",width:"full",height:"full",children:E.jsx(SJ,{className:AJ})})})})};Nt({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"]]});var sC="Tabs",[TJ,V1e]=Wr(sC,[ud]),y9=ud(),[PJ,iC]=TJ(sC),RJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...l}=t,u=sy(a),[f,d]=ps({prop:n,onChange:s,defaultProp:i});return E.jsx(PJ,{scope:r,baseId:us(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:c,children:E.jsx(we.div,{dir:u,"data-orientation":o,...l,ref:e})})});RJ.displayName=sC;var v9="TabsList",IJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=iC(v9,r),o=y9(r);return E.jsx(LS,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:E.jsx(we.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});IJ.displayName=v9;var m9="TabsTrigger",OJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=iC(m9,r),a=y9(r),c=x9(o.baseId,n),l=b9(o.baseId,n),u=n===o.value;return E.jsx(jS,{asChild:!0,...a,focusable:!s,active:u,children:E.jsx(we.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:e,onMouseDown:ce(t.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:ce(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:ce(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!s&&f&&o.onValueChange(n)})})})});OJ.displayName=m9;var g9="TabsContent",_J=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=iC(g9,r),c=x9(a.baseId,n),l=b9(a.baseId,n),u=n===a.value,f=v.useRef(u);return v.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),E.jsx(cn,{present:s||u,children:({present:d})=>E.jsx(we.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:l,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0},children:d&&i})})});_J.displayName=g9;function x9(t,e){return`${t}-trigger-${e}`}function b9(t,e){return`${t}-content-${e}`}var NJ="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _1ppqbnx0 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n9";v.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return E.jsxs(q,{className:NJ,ref:e,background:"buttonGlass",color:"text80",...s,children:[r&&E.jsx(r,{size:"xs"}),E.jsx(ue,{children:n})]})});var oC="ToastProvider",[aC,MJ,DJ]=vm("Toast"),[w9,$1e]=Wr("Toast",[DJ]),[LJ,Im]=w9(oC),E9=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,c]=v.useState(null),[l,u]=v.useState(0),f=v.useRef(!1),d=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${oC}\`. Expected non-empty \`string\`.`),E.jsx(aC.Provider,{scope:e,children:E.jsx(LJ,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:l,viewport:a,onViewportChange:c,onToastAdd:v.useCallback(()=>u(h=>h+1),[]),onToastRemove:v.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:d,children:o})})};E9.displayName=oC;var S9="ToastViewport",jJ=["F8"],_w="toast.viewportPause",Nw="toast.viewportResume",C9=v.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=jJ,label:s="Notifications ({hotkey})",...i}=t,o=Im(S9,r),a=MJ(r),c=v.useRef(null),l=v.useRef(null),u=v.useRef(null),f=v.useRef(null),d=$e(e,f,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=o.toastCount>0;v.useEffect(()=>{const g=m=>{var x;n.every(w=>m[w]||m.code===w)&&((x=f.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),v.useEffect(()=>{const g=c.current,m=f.current;if(p&&g&&m){const x=()=>{if(!o.isClosePausedRef.current){const O=new CustomEvent(_w);m.dispatchEvent(O),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const O=new CustomEvent(Nw);m.dispatchEvent(O),o.isClosePausedRef.current=!1}},w=O=>{!g.contains(O.relatedTarget)&&b()},A=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",x),g.addEventListener("focusout",w),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",A),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",w),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",A),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[p,o.isClosePausedRef]);const y=v.useCallback(({tabbingDirection:g})=>{const x=a().map(b=>{const w=b.ref.current,A=[w,...JJ(w)];return g==="forwards"?A:A.reverse()});return(g==="forwards"?x.reverse():x).flat()},[a]);return v.useEffect(()=>{const g=f.current;if(g){const m=x=>{var b,w,A;const O=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!O){const C=document.activeElement,j=x.shiftKey;if(x.target===g&&j){(b=l.current)==null||b.focus();return}const z=y({tabbingDirection:j?"backwards":"forwards"}),Y=z.findIndex(H=>H===C);px(z.slice(Y+1))?x.preventDefault():j?(w=l.current)==null||w.focus():(A=u.current)==null||A.focus()}};return g.addEventListener("keydown",m),()=>g.removeEventListener("keydown",m)}},[a,y]),E.jsxs(qG,{ref:c,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&E.jsx(Mw,{ref:l,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"forwards"});px(g)}}),E.jsx(aC.Slot,{scope:r,children:E.jsx(we.ol,{tabIndex:-1,...i,ref:d})}),p&&E.jsx(Mw,{ref:u,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"backwards"});px(g)}})]})});C9.displayName=S9;var A9="ToastFocusProxy",Mw=v.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Im(A9,r);return E.jsx(ly,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var a;const c=o.relatedTarget;!((a=i.viewport)!=null&&a.contains(c))&&n()}})});Mw.displayName=A9;var Om="Toast",BJ="toast.swipeStart",FJ="toast.swipeMove",UJ="toast.swipeCancel",VJ="toast.swipeEnd",k9=v.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a=!0,c]=ps({prop:n,defaultProp:s,onChange:i});return E.jsx(cn,{present:r||a,children:E.jsx(HJ,{open:a,...o,ref:e,onClose:()=>c(!1),onPause:Gr(t.onPause),onResume:Gr(t.onResume),onSwipeStart:ce(t.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(t.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ce(t.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ce(t.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});k9.displayName=Om;var[$J,zJ]=w9(Om,{onClose(){}}),HJ=v.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:d,onSwipeEnd:h,...p}=t,y=Im(Om,r),[g,m]=v.useState(null),x=$e(e,H=>m(H)),b=v.useRef(null),w=v.useRef(null),A=s||y.duration,O=v.useRef(0),_=v.useRef(A),C=v.useRef(0),{onToastAdd:j,onToastRemove:V}=y,B=Gr(()=>{var H;(g==null?void 0:g.contains(document.activeElement))&&((H=y.viewport)==null||H.focus()),o()}),z=v.useCallback(H=>{!H||H===1/0||(window.clearTimeout(C.current),O.current=new Date().getTime(),C.current=window.setTimeout(B,H))},[B]);v.useEffect(()=>{const H=y.viewport;if(H){const L=()=>{z(_.current),l==null||l()},T=()=>{const P=new Date().getTime()-O.current;_.current=_.current-P,window.clearTimeout(C.current),c==null||c()};return H.addEventListener(_w,T),H.addEventListener(Nw,L),()=>{H.removeEventListener(_w,T),H.removeEventListener(Nw,L)}}},[y.viewport,A,c,l,z]),v.useEffect(()=>{i&&!y.isClosePausedRef.current&&z(A)},[i,A,y.isClosePausedRef,z]),v.useEffect(()=>(j(),()=>V()),[j,V]);const Y=v.useMemo(()=>g?_9(g):null,[g]);return y.viewport?E.jsxs(E.Fragment,{children:[Y&&E.jsx(GJ,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:Y}),E.jsx($J,{scope:r,onClose:B,children:Eo.createPortal(E.jsx(aC.ItemSlot,{scope:r,children:E.jsx(GG,{asChild:!0,onEscapeKeyDown:ce(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||B(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:E.jsx(we.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...p,ref:x,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ce(t.onKeyDown,H=>{H.key==="Escape"&&(a==null||a(H.nativeEvent),H.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:ce(t.onPointerDown,H=>{H.button===0&&(b.current={x:H.clientX,y:H.clientY})}),onPointerMove:ce(t.onPointerMove,H=>{if(!b.current)return;const L=H.clientX-b.current.x,T=H.clientY-b.current.y,P=!!w.current,R=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,U=R?I(0,L):0,F=R?0:I(0,T),X=H.pointerType==="touch"?10:2,oe={x:U,y:F},ae={originalEvent:H,delta:oe};P?(w.current=oe,c1(FJ,f,ae,{discrete:!1})):HR(oe,y.swipeDirection,X)?(w.current=oe,c1(BJ,u,ae,{discrete:!1}),H.target.setPointerCapture(H.pointerId)):(Math.abs(L)>X||Math.abs(T)>X)&&(b.current=null)}),onPointerUp:ce(t.onPointerUp,H=>{const L=w.current,T=H.target;if(T.hasPointerCapture(H.pointerId)&&T.releasePointerCapture(H.pointerId),w.current=null,b.current=null,L){const P=H.currentTarget,R={originalEvent:H,delta:L};HR(L,y.swipeDirection,y.swipeThreshold)?c1(VJ,h,R,{discrete:!0}):c1(UJ,d,R,{discrete:!0}),P.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),GJ=t=>{const{__scopeToast:e,children:r,...n}=t,s=Im(Om,e),[i,o]=v.useState(!1),[a,c]=v.useState(!1);return QJ(()=>o(!0)),v.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:E.jsx(oy,{asChild:!0,children:E.jsx(ly,{...n,children:i&&E.jsxs(E.Fragment,{children:[s.label," ",r]})})})},qJ="ToastTitle",T9=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return E.jsx(we.div,{...n,ref:e})});T9.displayName=qJ;var WJ="ToastDescription",P9=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return E.jsx(we.div,{...n,ref:e})});P9.displayName=WJ;var R9="ToastAction",KJ=v.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?E.jsx(O9,{altText:r,asChild:!0,children:E.jsx(cC,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${R9}\`. Expected non-empty \`string\`.`),null)});KJ.displayName=R9;var I9="ToastClose",cC=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=zJ(I9,r);return E.jsx(O9,{asChild:!0,children:E.jsx(we.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,s.onClose)})})});cC.displayName=I9;var O9=v.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return E.jsx(we.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function _9(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),YJ(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(..._9(n))}}),e}function c1(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?vS(s,i):s.dispatchEvent(i)}var HR=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function QJ(t=()=>{}){const e=Gr(t);Tr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function YJ(t){return t.nodeType===t.ELEMENT_NODE}function JJ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function px(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var XJ=E9,ZJ=C9,eX=k9,tX=T9,rX=P9,nX=cC,sX="_6wut8v1 _6wut8v0 fyvr12wp fyvr12wj fyvr11hs fyvr1qo fyvr1mo fyvr128 fyvr118g fyvr11i4 fyvr11h0",iX=Nt({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});const N9=v.createContext(null),oX=t=>{const{children:e,...r}=t,[n,s]=v.useState(new Set);return E.jsxs(XJ,{...r,children:[E.jsxs(N9.Provider,{value:s,children:[e,E.jsx(yS,{children:Array.from(n).map(i=>E.jsx(cX,{...i},i.id))})]}),E.jsx(aX,{})]})},aX=()=>E.jsx(ZJ,{className:sX}),cX=t=>{const{id:e,variant:r,title:n,description:s,icon:i,isDismissible:o=!0,...a}=t,c=()=>{if(i)return E.jsx(i,{});switch(r){case"success":return E.jsx(q,{background:"positive",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:E.jsx(gS,{})});case"error":return E.jsx(q,{background:"negative",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:E.jsx(Gh,{})});default:return null}};return E.jsx(eX,{className:iX({variant:r}),open:!0,forceMount:!0,asChild:!0,...a,children:E.jsxs(YH,{as:Xc.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:[E.jsxs(q,{gap:"3",alignItems:"center",children:[c(),E.jsxs(q,{flexDirection:"column",gap:"1",children:[n&&E.jsx(tX,{children:E.jsx(ue,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:n})}),E.jsx(rX,{children:E.jsx(ue,{as:"div",variant:"normal",fontWeight:"medium",color:"text50",children:s})})]})]}),o&&E.jsx(nX,{"aria-label":"Close",asChild:!0,children:E.jsx(Am,{icon:Gh,size:"xs"})})]})})},M9=()=>{const t=v.useContext(N9);return e=>{const r={...e,id:Math.random().toString(36).slice(2,12),onOpenChange:n=>{n||t(s=>(s.delete(r),new Set([...s])))}};t(n=>new Set([...n,r]))}};var lX="_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",uX="_15pztn2";v.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",name:u,rows:f,resize:d=!1,...h}=t;return E.jsx(Al,{description:i,disabled:o,display:"grid",id:a??u,label:c,labelLocation:l,children:E.jsx(q,{as:r,autoComplete:n,spellCheck:"false",className:qr(lX,d&&uX),disabled:o,id:a??u,name:u,ref:e,rows:f,borderRadius:s,...h})})});var fX=Nt({defaultClassName:"_18h918k5 _18h918k0 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"_18h918k6",sm:"_18h918k7",md:"_18h918k8",lg:"_18h918k9",xl:"_18h918ka"},borderRadius:{circle:"_18h918kb _18h918k1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"_18h918kc _18h918k2 fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"_18h918kd _18h918k3 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"_18h918ke _18h918k4 fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]}),dX="_18h918kf";const hX=v.memo(t=>{const{chainId:e,borderRadius:r="circle",className:n,disableAnimation:s=!1,style:i,src:o,size:a="md",...c}=t,l=o||UH(VH(e),a);return E.jsx(q,{className:qr(n,fX({borderRadius:r,size:a})),style:i,flexShrink:"0",...c,children:E.jsx(uN,{className:dX,disableAnimation:s,src:l})})});var pX=Nt({defaultClassName:"bnrreb1 bnrreb0 fyvr11jg fyvr11ko fyvr11hw fyvr11h0",variantClassNames:{size:{xs:"bnrreb2",sm:"bnrreb3",md:"bnrreb4",lg:"bnrreb5",xl:"bnrreb6"}},defaultVariants:{},compoundVariants:[]}),yX="bnrreb7",vX="bnrreb9 bnrreb8 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sj fyvr128 fyvr15o fyvr11h0";const mX=v.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",withNetwork:c,...l}=t;return E.jsxs(q,{className:qr(r,pX({size:a})),style:s,flexShrink:"0",...l,children:[i?E.jsx(uN,{className:yX,disableAnimation:n,borderRadius:e,overflow:"hidden",src:i}):E.jsx(ue,{className:vX,variant:"normal",fontWeight:"medium",color:"text50",borderRadius:e,overflow:"hidden",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)}),c&&E.jsx(q,{position:"absolute",zIndex:"1",borderRadius:"circle",borderWidth:"thin",borderStyle:"solid",borderColor:"backgroundPrimary",background:"backgroundPrimary",placeItems:"center",style:{width:16+2,height:16+2,right:-2,bottom:-2},children:E.jsx(hX,{chainId:c,style:{width:16,height:16}})})]})});var[_m,z1e]=Wr("Tooltip",[ld]),Nm=ld(),D9="TooltipProvider",gX=700,Dw="tooltip.open",[xX,lC]=_m(D9),bX=t=>{const{__scopeTooltip:e,delayDuration:r=gX,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,[o,a]=v.useState(!0),c=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),E.jsx(xX,{scope:e,isOpenDelayed:o,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback(u=>{c.current=u},[]),disableHoverableContent:s,children:i})};bX.displayName=D9;var Mm="Tooltip",[wX,fy]=_m(Mm),EX=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=t,c=lC(Mm,t.__scopeTooltip),l=Nm(e),[u,f]=v.useState(null),d=us(),h=v.useRef(0),p=o??c.disableHoverableContent,y=a??c.delayDuration,g=v.useRef(!1),[m=!1,x]=ps({prop:n,defaultProp:s,onChange:_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent(Dw))):c.onClose(),i==null||i(_)}}),b=v.useMemo(()=>m?g.current?"delayed-open":"instant-open":"closed",[m]),w=v.useCallback(()=>{window.clearTimeout(h.current),g.current=!1,x(!0)},[x]),A=v.useCallback(()=>{window.clearTimeout(h.current),x(!1)},[x]),O=v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,x(!0)},y)},[y,x]);return v.useEffect(()=>()=>window.clearTimeout(h.current),[]),E.jsx(_S,{...l,children:E.jsx(wX,{scope:e,contentId:d,open:m,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayed?O():w()},[c.isOpenDelayed,O,w]),onTriggerLeave:v.useCallback(()=>{p?A():window.clearTimeout(h.current)},[A,p]),onOpen:w,onClose:A,disableHoverableContent:p,children:r})})};EX.displayName=Mm;var Lw="TooltipTrigger",SX=v.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=fy(Lw,r),i=lC(Lw,r),o=Nm(r),a=v.useRef(null),c=$e(e,a,s.onTriggerChange),l=v.useRef(!1),u=v.useRef(!1),f=v.useCallback(()=>l.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),E.jsx(NS,{asChild:!0,...o,children:E.jsx(we.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:ce(t.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:ce(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:ce(t.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ce(t.onFocus,()=>{l.current||s.onOpen()}),onBlur:ce(t.onBlur,s.onClose),onClick:ce(t.onClick,s.onClose)})})});SX.displayName=Lw;var uC="TooltipPortal",[CX,AX]=_m(uC,{forceMount:void 0}),kX=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:s}=t,i=fy(uC,e);return E.jsx(CX,{scope:e,forceMount:r,children:E.jsx(cn,{present:r||i.open,children:E.jsx(oy,{asChild:!0,container:s,children:n})})})};kX.displayName=uC;var Ff="TooltipContent",TX=v.forwardRef((t,e)=>{const r=AX(Ff,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=fy(Ff,t.__scopeTooltip);return E.jsx(cn,{present:n||o.open,children:o.disableHoverableContent?E.jsx(L9,{side:s,...i,ref:e}):E.jsx(PX,{side:s,...i,ref:e})})}),PX=v.forwardRef((t,e)=>{const r=fy(Ff,t.__scopeTooltip),n=lC(Ff,t.__scopeTooltip),s=v.useRef(null),i=$e(e,s),[o,a]=v.useState(null),{trigger:c,onClose:l}=r,u=s.current,{onPointerInTransitChange:f}=n,d=v.useCallback(()=>{a(null),f(!1)},[f]),h=v.useCallback((p,y)=>{const g=p.currentTarget,m={x:p.clientX,y:p.clientY},x=_X(m,g.getBoundingClientRect()),b=NX(m,x),w=MX(y.getBoundingClientRect()),A=LX([...b,...w]);a(A),f(!0)},[f]);return v.useEffect(()=>()=>d(),[d]),v.useEffect(()=>{if(c&&u){const p=g=>h(g,u),y=g=>h(g,c);return c.addEventListener("pointerleave",p),u.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",p),u.removeEventListener("pointerleave",y)}}},[c,u,h,d]),v.useEffect(()=>{if(o){const p=y=>{const g=y.target,m={x:y.clientX,y:y.clientY},x=(c==null?void 0:c.contains(g))||(u==null?void 0:u.contains(g)),b=!DX(m,o);x?d():b&&(d(),l())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,u,o,l,d]),E.jsx(L9,{...t,ref:i})}),[RX,IX]=_m(Mm,{isInside:!1}),L9=v.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,c=fy(Ff,r),l=Nm(r),{onClose:u}=c;return v.useEffect(()=>(document.addEventListener(Dw,u),()=>document.removeEventListener(Dw,u)),[u]),v.useEffect(()=>{if(c.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),E.jsx(od,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:E.jsxs(MS,{"data-state":c.stateAttribute,...l,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(U6,{children:n}),E.jsx(RX,{scope:r,isInside:!0,children:E.jsx(MY,{id:c.contentId,role:"tooltip",children:s||n})})]})})});TX.displayName=Ff;var j9="TooltipArrow",OX=v.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Nm(r);return IX(j9,r).isInside?null:E.jsx(DS,{...s,...n,ref:e})});OX.displayName=j9;function _X(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function NX(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function MX(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function DX(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=u>n&&r<(l-a)*(n-c)/(u-c)+a&&(s=!s)}return s}function LX(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),jX(e)}function jX(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}/** +Defaulting to \`null\`.`}var eC="Radio",[xY,ON]=Wr(eC),[bY,wY]=xY(eC),_N=v.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...l}=t,[u,f]=v.useState(null),d=$e(e,y=>f(y)),h=v.useRef(!1),p=u?!!u.closest("form"):!0;return E.jsxs(bY,{scope:r,checked:s,disabled:o,children:[E.jsx(we.button,{type:"button",role:"radio","aria-checked":s,"data-state":DN(s),"data-disabled":o?"":void 0,disabled:o,value:a,...l,ref:d,onClick:ce(t.onClick,y=>{s||c==null||c(),p&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})}),p&&E.jsx(EY,{control:u,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});_N.displayName=eC;var NN="RadioIndicator",MN=v.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=wY(NN,r);return E.jsx(cn,{present:n||i.checked,children:E.jsx(we.span,{"data-state":DN(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});MN.displayName=NN;var EY=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=v.useRef(null),o=pm(r),a=ym(e);return v.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),E.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function DN(t){return t?"checked":"unchecked"}var SY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tC="RadioGroup",[CY,B1e]=Wr(tC,[ud,ON]),LN=ud(),jN=ON(),[AY,kY]=CY(tC),BN=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:l,loop:u=!0,onValueChange:f,...d}=t,h=LN(r),p=sy(l),[y,g]=ps({prop:i,defaultProp:s,onChange:f});return E.jsx(AY,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:g,children:E.jsx(LS,{asChild:!0,...h,orientation:c,dir:p,loop:u,children:E.jsx(we.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:p,...d,ref:e})})})});BN.displayName=tC;var FN="RadioGroupItem",UN=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=kY(FN,r),o=i.disabled||n,a=LN(r),c=jN(r),l=v.useRef(null),u=$e(e,l),f=i.value===s.value,d=v.useRef(!1);return v.useEffect(()=>{const h=y=>{SY.includes(y.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)}},[]),E.jsx(jS,{asChild:!0,...a,focusable:!o,active:f,children:E.jsx(_N,{disabled:o,required:i.required,checked:f,...c,...s,name:i.name,ref:u,onCheck:()=>i.onValueChange(s.value),onKeyDown:ce(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ce(s.onFocus,()=>{var h;d.current&&((h=l.current)==null||h.click())})})})});UN.displayName=FN;var TY="RadioGroupIndicator",VN=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=jN(r);return E.jsx(MN,{...s,...n,ref:e})});VN.displayName=TY;var PY=BN,RY=UN,IY=VN,OY=Nt({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:[]}),_Y=Nt({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12s1",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const NY=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return E.jsx(q,{alignItems:"center",children:E.jsx(Al,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:E.jsx(RY,{className:OY({size:n}),value:s,id:e,disabled:i,children:E.jsx(IY,{className:_Y({size:n})})})})})};v.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...c}=t;return E.jsx(PY,{disabled:n,name:i,ref:e,...c,children:E.jsx(q,{flexDirection:r,gap:s,children:o.map(({label:l,value:u,disabled:f})=>E.jsx(NY,{id:`${i}-${u}`,label:l,size:a,value:u,disabled:f},u))})})});function zR(t,[e,r]){return Math.min(r,Math.max(e,t))}var MY="VisuallyHidden",ly=v.forwardRef((t,e)=>E.jsx(we.span,{...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}}));ly.displayName=MY;var DY=ly,LY=[" ","Enter","ArrowUp","ArrowDown"],jY=[" ","Enter"],uy="Select",[km,Tm,BY]=vm(uy),[fd,F1e]=Wr(uy,[BY,ld]),Pm=ld(),[FY,Ua]=fd(uy),[UY,VY]=fd(uy),$N=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:h}=t,p=Pm(e),[y,g]=v.useState(null),[m,x]=v.useState(null),[b,w]=v.useState(!1),A=sy(l),[O=!1,_]=ps({prop:n,defaultProp:s,onChange:i}),[C,j]=ps({prop:o,defaultProp:a,onChange:c}),V=v.useRef(null),B=y?!!y.closest("form"):!0,[$,Y]=v.useState(new Set),H=Array.from($).map(L=>L.props.value).join(";");return E.jsx(_S,{...p,children:E.jsxs(FY,{required:h,scope:e,trigger:y,onTriggerChange:g,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:us(),value:C,onValueChange:j,open:O,onOpenChange:_,dir:A,triggerPointerDownPosRef:V,disabled:d,children:[E.jsx(km.Provider,{scope:e,children:E.jsx(UY,{scope:t.__scopeSelect,onNativeOptionAdd:v.useCallback(L=>{Y(T=>new Set(T).add(L))},[]),onNativeOptionRemove:v.useCallback(L=>{Y(T=>{const P=new Set(T);return P.delete(L),P})},[]),children:r})}),B?E.jsxs(c9,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:C,onChange:L=>j(L.target.value),disabled:d,children:[C===void 0?E.jsx("option",{value:""}):null,Array.from($)]},H):null]})})};$N.displayName=uy;var zN="SelectTrigger",HN=v.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=Pm(r),o=Ua(zN,r),a=o.disabled||n,c=$e(e,o.onTriggerChange),l=Tm(r),[u,f,d]=l9(p=>{const y=l().filter(x=>!x.disabled),g=y.find(x=>x.value===o.value),m=u9(y,p,g);m!==void 0&&o.onValueChange(m.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return E.jsx(NS,{asChild:!0,...i,children:E.jsx(we.button,{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":a9(o.value)?"":void 0,...s,ref:c,onClick:ce(s.onClick,p=>{p.currentTarget.focus()}),onPointerDown:ce(s.onPointerDown,p=>{const y=p.target;y.hasPointerCapture(p.pointerId)&&y.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:ce(s.onKeyDown,p=>{const y=u.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&f(p.key),!(y&&p.key===" ")&&LY.includes(p.key)&&(h(),p.preventDefault())})})})});HN.displayName=zN;var GN="SelectValue",qN=v.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,c=Ua(GN,r),{onValueNodeHasChildrenChange:l}=c,u=i!==void 0,f=$e(e,c.onValueNodeChange);return Tr(()=>{l(u)},[l,u]),E.jsx(we.span,{...a,ref:f,style:{pointerEvents:"none"},children:a9(c.value)?E.jsx(E.Fragment,{children:o}):i})});qN.displayName=GN;var $Y="SelectIcon",WN=v.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return E.jsx(we.span,{"aria-hidden":!0,...s,ref:e,children:n||"▼"})});WN.displayName=$Y;var dl="SelectContent",KN=v.forwardRef((t,e)=>{const r=Ua(dl,t.__scopeSelect),[n,s]=v.useState();if(Tr(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Eo.createPortal(E.jsx(QN,{scope:t.__scopeSelect,children:E.jsx(km.Slot,{scope:t.__scopeSelect,children:E.jsx("div",{children:t.children})})}),i):null}return E.jsx(YN,{...t,ref:e})});KN.displayName=dl;var Mi=10,[QN,Va]=fd(dl),zY="SelectContentImpl",YN=v.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:y,avoidCollisions:g,...m}=t,x=Ua(dl,r),[b,w]=v.useState(null),[A,O]=v.useState(null),_=$e(e,ie=>w(ie)),[C,j]=v.useState(null),[V,B]=v.useState(null),$=Tm(r),[Y,H]=v.useState(!1),L=v.useRef(!1);v.useEffect(()=>{if(b)return BS(b)},[b]),SS();const T=v.useCallback(ie=>{const[Me,...Be]=$().map(ze=>ze.ref.current),[Te]=Be.slice(-1),De=document.activeElement;for(const ze of ie)if(ze===De||(ze==null||ze.scrollIntoView({block:"nearest"}),ze===Me&&A&&(A.scrollTop=0),ze===Te&&A&&(A.scrollTop=A.scrollHeight),ze==null||ze.focus(),document.activeElement!==De))return},[$,A]),P=v.useCallback(()=>T([C,b]),[T,C,b]);v.useEffect(()=>{Y&&P()},[Y,P]);const{onOpenChange:R,triggerPointerDownPosRef:I}=x;v.useEffect(()=>{if(b){let ie={x:0,y:0};const Me=Te=>{var De,ze;ie={x:Math.abs(Math.round(Te.pageX)-(((De=I.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Te.pageY)-(((ze=I.current)==null?void 0:ze.y)??0))}},Be=Te=>{ie.x<=10&&ie.y<=10?Te.preventDefault():b.contains(Te.target)||R(!1),document.removeEventListener("pointermove",Me),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",Me),document.addEventListener("pointerup",Be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Me),document.removeEventListener("pointerup",Be,{capture:!0})}}},[b,R,I]),v.useEffect(()=>{const ie=()=>R(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[R]);const[U,F]=l9(ie=>{const Me=$().filter(De=>!De.disabled),Be=Me.find(De=>De.ref.current===document.activeElement),Te=u9(Me,ie,Be);Te&&setTimeout(()=>Te.ref.current.focus())}),X=v.useCallback((ie,Me,Be)=>{const Te=!L.current&&!Be;(x.value!==void 0&&x.value===Me||Te)&&(j(ie),Te&&(L.current=!0))},[x.value]),oe=v.useCallback(()=>b==null?void 0:b.focus(),[b]),ae=v.useCallback((ie,Me,Be)=>{const Te=!L.current&&!Be;(x.value!==void 0&&x.value===Me||Te)&&B(ie)},[x.value]),ke=n==="popper"?Tw:JN,ve=ke===Tw?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:y,avoidCollisions:g}:{};return E.jsx(QN,{scope:r,content:b,viewport:A,onViewportChange:O,itemRefCallback:X,selectedItem:C,onItemLeave:oe,itemTextRefCallback:ae,focusSelectedItem:P,selectedItemText:V,position:n,isPositioned:Y,searchRef:U,children:E.jsx(Em,{as:ll,allowPinchZoom:!0,children:E.jsx(mm,{asChild:!0,trapped:x.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:ce(s,ie=>{var Me;(Me=x.trigger)==null||Me.focus({preventScroll:!0}),ie.preventDefault()}),children:E.jsx(od,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:E.jsx(ke,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ie=>ie.preventDefault(),...m,...ve,onPlaced:()=>H(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:ce(m.onKeyDown,ie=>{const Me=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!Me&&ie.key.length===1&&F(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let Te=$().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const De=ie.target,ze=Te.indexOf(De);Te=Te.slice(ze+1)}setTimeout(()=>T(Te)),ie.preventDefault()}})})})})})})});YN.displayName=zY;var HY="SelectItemAlignedPosition",JN=v.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Ua(dl,r),o=Va(dl,r),[a,c]=v.useState(null),[l,u]=v.useState(null),f=$e(e,_=>u(_)),d=Tm(r),h=v.useRef(!1),p=v.useRef(!0),{viewport:y,selectedItem:g,selectedItemText:m,focusSelectedItem:x}=o,b=v.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&l&&y&&g&&m){const _=i.trigger.getBoundingClientRect(),C=l.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),V=m.getBoundingClientRect();if(i.dir!=="rtl"){const De=V.left-C.left,ze=j.left-De,at=_.left-ze,qe=_.width+at,Kr=Math.max(qe,C.width),vs=window.innerWidth-Mi,Qa=zR(ze,[Mi,vs-Kr]);a.style.minWidth=qe+"px",a.style.left=Qa+"px"}else{const De=C.right-V.right,ze=window.innerWidth-j.right-De,at=window.innerWidth-_.right-ze,qe=_.width+at,Kr=Math.max(qe,C.width),vs=window.innerWidth-Mi,Qa=zR(ze,[Mi,vs-Kr]);a.style.minWidth=qe+"px",a.style.right=Qa+"px"}const B=d(),$=window.innerHeight-Mi*2,Y=y.scrollHeight,H=window.getComputedStyle(l),L=parseInt(H.borderTopWidth,10),T=parseInt(H.paddingTop,10),P=parseInt(H.borderBottomWidth,10),R=parseInt(H.paddingBottom,10),I=L+T+Y+R+P,U=Math.min(g.offsetHeight*5,I),F=window.getComputedStyle(y),X=parseInt(F.paddingTop,10),oe=parseInt(F.paddingBottom,10),ae=_.top+_.height/2-Mi,ke=$-ae,ve=g.offsetHeight/2,ie=g.offsetTop+ve,Me=L+T+ie,Be=I-Me;if(Me<=ae){const De=g===B[B.length-1].ref.current;a.style.bottom="0px";const ze=l.clientHeight-y.offsetTop-y.offsetHeight,at=Math.max(ke,ve+(De?oe:0)+ze+P),qe=Me+at;a.style.height=qe+"px"}else{const De=g===B[0].ref.current;a.style.top="0px";const at=Math.max(ae,L+y.offsetTop+(De?X:0)+ve)+Be;a.style.height=at+"px",y.scrollTop=Me-ae+y.offsetTop}a.style.margin=`${Mi}px 0`,a.style.minHeight=U+"px",a.style.maxHeight=$+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,l,y,g,m,i.dir,n]);Tr(()=>b(),[b]);const[w,A]=v.useState();Tr(()=>{l&&A(window.getComputedStyle(l).zIndex)},[l]);const O=v.useCallback(_=>{_&&p.current===!0&&(b(),x==null||x(),p.current=!1)},[b,x]);return E.jsx(qY,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:O,children:E.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:E.jsx(we.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});JN.displayName=HY;var GY="SelectPopperPosition",Tw=v.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Mi,...i}=t,o=Pm(r);return E.jsx(MS,{...o,...i,ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}})});Tw.displayName=GY;var[qY,rC]=fd(dl,{}),Pw="SelectViewport",XN=v.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...s}=t,i=Va(Pw,r),o=rC(Pw,r),a=$e(e,i.onViewportChange),c=v.useRef(0);return E.jsxs(E.Fragment,{children:[E.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),E.jsx(km.Slot,{scope:r,children:E.jsx(we.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ce(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&f){const h=Math.abs(c.current-u.scrollTop);if(h>0){const p=window.innerHeight-Mi*2,y=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),m=Math.max(y,g);if(m0?w:0,f.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});XN.displayName=Pw;var ZN="SelectGroup",[WY,KY]=fd(ZN),e9=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=us();return E.jsx(WY,{scope:r,id:s,children:E.jsx(we.div,{role:"group","aria-labelledby":s,...n,ref:e})})});e9.displayName=ZN;var t9="SelectLabel",QY=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=KY(t9,r);return E.jsx(we.div,{id:s.id,...n,ref:e})});QY.displayName=t9;var n0="SelectItem",[YY,r9]=fd(n0),n9=v.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Ua(n0,r),c=Va(n0,r),l=a.value===n,[u,f]=v.useState(i??""),[d,h]=v.useState(!1),p=$e(e,m=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,m,n,s)}),y=us(),g=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return E.jsx(YY,{scope:r,value:n,disabled:s,textId:y,isSelected:l,onItemTextChange:v.useCallback(m=>{f(x=>x||((m==null?void 0:m.textContent)??"").trim())},[]),children:E.jsx(km.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:E.jsx(we.div,{role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:p,onFocus:ce(o.onFocus,()=>h(!0)),onBlur:ce(o.onBlur,()=>h(!1)),onPointerUp:ce(o.onPointerUp,g),onPointerMove:ce(o.onPointerMove,m=>{var x;s?(x=c.onItemLeave)==null||x.call(c):m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(o.onPointerLeave,m=>{var x;m.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:ce(o.onKeyDown,m=>{var x;((x=c.searchRef)==null?void 0:x.current)!==""&&m.key===" "||(jY.includes(m.key)&&g(),m.key===" "&&m.preventDefault())})})})})});n9.displayName=n0;var Qd="SelectItemText",s9=v.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Ua(Qd,r),a=Va(Qd,r),c=r9(Qd,r),l=VY(Qd,r),[u,f]=v.useState(null),d=$e(e,m=>f(m),c.onItemTextChange,m=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,m,c.value,c.disabled)}),h=u==null?void 0:u.textContent,p=v.useMemo(()=>E.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:g}=l;return Tr(()=>(y(p),()=>g(p)),[y,g,p]),E.jsxs(E.Fragment,{children:[E.jsx(we.span,{id:c.textId,...i,ref:d}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Eo.createPortal(i.children,o.valueNode):null]})});s9.displayName=Qd;var i9="SelectItemIndicator",JY=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return r9(i9,r).isSelected?E.jsx(we.span,{"aria-hidden":!0,...n,ref:e}):null});JY.displayName=i9;var Rw="SelectScrollUpButton",XY=v.forwardRef((t,e)=>{const r=Va(Rw,t.__scopeSelect),n=rC(Rw,t.__scopeSelect),[s,i]=v.useState(!1),o=$e(e,n.onScrollButtonChange);return Tr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const l=c.scrollTop>0;i(l)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?E.jsx(o9,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});XY.displayName=Rw;var Iw="SelectScrollDownButton",ZY=v.forwardRef((t,e)=>{const r=Va(Iw,t.__scopeSelect),n=rC(Iw,t.__scopeSelect),[s,i]=v.useState(!1),o=$e(e,n.onScrollButtonChange);return Tr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?E.jsx(o9,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});ZY.displayName=Iw;var o9=v.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=t,i=Va("SelectScrollButton",r),o=v.useRef(null),a=Tm(r),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Tr(()=>{var l;const u=a().find(f=>f.ref.current===document.activeElement);(l=u==null?void 0:u.ref.current)==null||l.scrollIntoView({block:"nearest"})},[a]),E.jsx(we.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:ce(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:ce(s.onPointerMove,()=>{var l;(l=i.onItemLeave)==null||l.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:ce(s.onPointerLeave,()=>{c()})})}),eJ="SelectSeparator",tJ=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return E.jsx(we.div,{"aria-hidden":!0,...n,ref:e})});tJ.displayName=eJ;var Ow="SelectArrow",rJ=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Pm(r),i=Ua(Ow,r),o=Va(Ow,r);return i.open&&o.position==="popper"?E.jsx(DS,{...s,...n,ref:e}):null});rJ.displayName=Ow;function a9(t){return t===""||t===void 0}var c9=v.forwardRef((t,e)=>{const{value:r,...n}=t,s=v.useRef(null),i=$e(e,s),o=pm(r);return v.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&u){const f=new Event("change",{bubbles:!0});u.call(a,r),a.dispatchEvent(f)}},[o,r]),E.jsx(ly,{asChild:!0,children:E.jsx("select",{...n,ref:i,defaultValue:r})})});c9.displayName="BubbleSelect";function l9(t){const e=Gr(t),r=v.useRef(""),n=v.useRef(0),s=v.useCallback(o=>{const a=r.current+o;e(a),function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),i=v.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function u9(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=nJ(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function nJ(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var sJ=$N,iJ=HN,oJ=qN,aJ=WN,cJ=KN,lJ=XN,uJ=e9,fJ=n9,dJ=s9,hJ="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr11hc fyvr11f4 fyvr12s1 fyvr118c fyvr11jw fyvr11n4 fyvr12v7 fyvr12o1",pJ=Nt({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:[]}),yJ="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tv fyvr12s1 fyvr11nl",vJ="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 mJ=v.forwardRef(({children:t,className:e,...r},n)=>E.jsx(fJ,{className:qr(vJ,e),...r,ref:n,children:E.jsx(dJ,{children:t})})),Rm=v.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:c,options:l,placeholder:u,...f}=t;return E.jsx(Al,{disabled:n,display:"grid",id:s??c,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:E.jsxs(sJ,{disabled:n,name:c,...f,children:[E.jsxs(iJ,{id:s??c,className:qr(hJ,pJ({borderRadius:r})),ref:e,children:[E.jsx(oJ,{placeholder:u}),E.jsx(q,{as:aJ,display:"inline-flex",children:E.jsx(G6,{})})]}),E.jsx(cJ,{className:yJ,children:E.jsx(lJ,{children:E.jsx(uJ,{children:l.map(({value:d,label:h,...p})=>E.jsx(mJ,{value:d,...p,children:h},d))})})})]})})});v.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,c=o?E.jsx(Am,{icon:Gh,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return E.jsx(sr,{ref:e,name:i,leftIcon:EG,controls:r||c,placeholder:s,value:o,onChange:l=>n==null?void 0:n(l),...a})});var gJ=Nt({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const Bn=v.forwardRef((t,e)=>{const{size:r="md",...n}=t;return E.jsx(q,{className:gJ({size:r}),color:"text50",ref:e,...n,children:E.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[E.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),E.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});v.forwardRef(({children:t},e)=>E.jsx(q,{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}));var nC="Switch",[xJ,U1e]=Wr(nC),[bJ,wJ]=xJ(nC),f9=v.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=v.useState(null),h=$e(e,x=>d(x)),p=v.useRef(!1),y=f?!!f.closest("form"):!0,[g=!1,m]=ps({prop:s,defaultProp:i,onChange:l});return E.jsxs(bJ,{scope:r,checked:g,disabled:a,children:[E.jsx(we.button,{type:"button",role:"switch","aria-checked":g,"aria-required":o,"data-state":p9(g),"data-disabled":a?"":void 0,disabled:a,value:c,...u,ref:h,onClick:ce(t.onClick,x=>{m(b=>!b),y&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})}),y&&E.jsx(EJ,{control:f,bubbles:!p.current,name:n,value:c,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});f9.displayName=nC;var d9="SwitchThumb",h9=v.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=wJ(d9,r);return E.jsx(we.span,{"data-state":p9(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:e})});h9.displayName=d9;var EJ=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=v.useRef(null),o=pm(r),a=ym(e);return v.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),E.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function p9(t){return t?"checked":"unchecked"}var SJ=f9,CJ=h9,AJ="_1lp2u8e1 _1lp2u8e0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11t1 fyvr11hw fyvr12v7 fyvr12o1 _4efw240",kJ="_1lp2u8e3 _1lp2u8e2 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11o1";const TJ=t=>{const{disabled:e,label:r,labelLocation:n="left",description:s,id:i,name:o,...a}=t;return E.jsx(Al,{disabled:e,display:"flex",id:i??o,label:r,labelLocation:n,description:s,whiteSpace:"nowrap",children:E.jsx(SJ,{className:AJ,disabled:e,...a,children:E.jsx(q,{position:"relative",width:"full",height:"full",children:E.jsx(CJ,{className:kJ})})})})};Nt({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"]]});var sC="Tabs",[PJ,V1e]=Wr(sC,[ud]),y9=ud(),[RJ,iC]=PJ(sC),IJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...l}=t,u=sy(a),[f,d]=ps({prop:n,onChange:s,defaultProp:i});return E.jsx(RJ,{scope:r,baseId:us(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:c,children:E.jsx(we.div,{dir:u,"data-orientation":o,...l,ref:e})})});IJ.displayName=sC;var v9="TabsList",OJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=iC(v9,r),o=y9(r);return E.jsx(LS,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:E.jsx(we.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});OJ.displayName=v9;var m9="TabsTrigger",_J=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=iC(m9,r),a=y9(r),c=x9(o.baseId,n),l=b9(o.baseId,n),u=n===o.value;return E.jsx(jS,{asChild:!0,...a,focusable:!s,active:u,children:E.jsx(we.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:e,onMouseDown:ce(t.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:ce(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:ce(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!s&&f&&o.onValueChange(n)})})})});_J.displayName=m9;var g9="TabsContent",NJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=iC(g9,r),c=x9(a.baseId,n),l=b9(a.baseId,n),u=n===a.value,f=v.useRef(u);return v.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),E.jsx(cn,{present:s||u,children:({present:d})=>E.jsx(we.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:l,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0},children:d&&i})})});NJ.displayName=g9;function x9(t,e){return`${t}-trigger-${e}`}function b9(t,e){return`${t}-content-${e}`}var MJ="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _1ppqbnx0 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n9";v.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return E.jsxs(q,{className:MJ,ref:e,background:"buttonGlass",color:"text80",...s,children:[r&&E.jsx(r,{size:"xs"}),E.jsx(ue,{children:n})]})});var oC="ToastProvider",[aC,DJ,LJ]=vm("Toast"),[w9,$1e]=Wr("Toast",[LJ]),[jJ,Im]=w9(oC),E9=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,c]=v.useState(null),[l,u]=v.useState(0),f=v.useRef(!1),d=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${oC}\`. Expected non-empty \`string\`.`),E.jsx(aC.Provider,{scope:e,children:E.jsx(jJ,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:l,viewport:a,onViewportChange:c,onToastAdd:v.useCallback(()=>u(h=>h+1),[]),onToastRemove:v.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:d,children:o})})};E9.displayName=oC;var S9="ToastViewport",BJ=["F8"],_w="toast.viewportPause",Nw="toast.viewportResume",C9=v.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=BJ,label:s="Notifications ({hotkey})",...i}=t,o=Im(S9,r),a=DJ(r),c=v.useRef(null),l=v.useRef(null),u=v.useRef(null),f=v.useRef(null),d=$e(e,f,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=o.toastCount>0;v.useEffect(()=>{const g=m=>{var x;n.every(w=>m[w]||m.code===w)&&((x=f.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),v.useEffect(()=>{const g=c.current,m=f.current;if(p&&g&&m){const x=()=>{if(!o.isClosePausedRef.current){const O=new CustomEvent(_w);m.dispatchEvent(O),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const O=new CustomEvent(Nw);m.dispatchEvent(O),o.isClosePausedRef.current=!1}},w=O=>{!g.contains(O.relatedTarget)&&b()},A=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",x),g.addEventListener("focusout",w),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",A),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",w),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",A),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[p,o.isClosePausedRef]);const y=v.useCallback(({tabbingDirection:g})=>{const x=a().map(b=>{const w=b.ref.current,A=[w,...XJ(w)];return g==="forwards"?A:A.reverse()});return(g==="forwards"?x.reverse():x).flat()},[a]);return v.useEffect(()=>{const g=f.current;if(g){const m=x=>{var b,w,A;const O=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!O){const C=document.activeElement,j=x.shiftKey;if(x.target===g&&j){(b=l.current)==null||b.focus();return}const $=y({tabbingDirection:j?"backwards":"forwards"}),Y=$.findIndex(H=>H===C);px($.slice(Y+1))?x.preventDefault():j?(w=l.current)==null||w.focus():(A=u.current)==null||A.focus()}};return g.addEventListener("keydown",m),()=>g.removeEventListener("keydown",m)}},[a,y]),E.jsxs(WG,{ref:c,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&E.jsx(Mw,{ref:l,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"forwards"});px(g)}}),E.jsx(aC.Slot,{scope:r,children:E.jsx(we.ol,{tabIndex:-1,...i,ref:d})}),p&&E.jsx(Mw,{ref:u,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"backwards"});px(g)}})]})});C9.displayName=S9;var A9="ToastFocusProxy",Mw=v.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Im(A9,r);return E.jsx(ly,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var a;const c=o.relatedTarget;!((a=i.viewport)!=null&&a.contains(c))&&n()}})});Mw.displayName=A9;var Om="Toast",FJ="toast.swipeStart",UJ="toast.swipeMove",VJ="toast.swipeCancel",$J="toast.swipeEnd",k9=v.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a=!0,c]=ps({prop:n,defaultProp:s,onChange:i});return E.jsx(cn,{present:r||a,children:E.jsx(GJ,{open:a,...o,ref:e,onClose:()=>c(!1),onPause:Gr(t.onPause),onResume:Gr(t.onResume),onSwipeStart:ce(t.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(t.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ce(t.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ce(t.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});k9.displayName=Om;var[zJ,HJ]=w9(Om,{onClose(){}}),GJ=v.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:d,onSwipeEnd:h,...p}=t,y=Im(Om,r),[g,m]=v.useState(null),x=$e(e,H=>m(H)),b=v.useRef(null),w=v.useRef(null),A=s||y.duration,O=v.useRef(0),_=v.useRef(A),C=v.useRef(0),{onToastAdd:j,onToastRemove:V}=y,B=Gr(()=>{var H;(g==null?void 0:g.contains(document.activeElement))&&((H=y.viewport)==null||H.focus()),o()}),$=v.useCallback(H=>{!H||H===1/0||(window.clearTimeout(C.current),O.current=new Date().getTime(),C.current=window.setTimeout(B,H))},[B]);v.useEffect(()=>{const H=y.viewport;if(H){const L=()=>{$(_.current),l==null||l()},T=()=>{const P=new Date().getTime()-O.current;_.current=_.current-P,window.clearTimeout(C.current),c==null||c()};return H.addEventListener(_w,T),H.addEventListener(Nw,L),()=>{H.removeEventListener(_w,T),H.removeEventListener(Nw,L)}}},[y.viewport,A,c,l,$]),v.useEffect(()=>{i&&!y.isClosePausedRef.current&&$(A)},[i,A,y.isClosePausedRef,$]),v.useEffect(()=>(j(),()=>V()),[j,V]);const Y=v.useMemo(()=>g?_9(g):null,[g]);return y.viewport?E.jsxs(E.Fragment,{children:[Y&&E.jsx(qJ,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:Y}),E.jsx(zJ,{scope:r,onClose:B,children:Eo.createPortal(E.jsx(aC.ItemSlot,{scope:r,children:E.jsx(qG,{asChild:!0,onEscapeKeyDown:ce(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||B(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:E.jsx(we.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...p,ref:x,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ce(t.onKeyDown,H=>{H.key==="Escape"&&(a==null||a(H.nativeEvent),H.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:ce(t.onPointerDown,H=>{H.button===0&&(b.current={x:H.clientX,y:H.clientY})}),onPointerMove:ce(t.onPointerMove,H=>{if(!b.current)return;const L=H.clientX-b.current.x,T=H.clientY-b.current.y,P=!!w.current,R=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,U=R?I(0,L):0,F=R?0:I(0,T),X=H.pointerType==="touch"?10:2,oe={x:U,y:F},ae={originalEvent:H,delta:oe};P?(w.current=oe,c1(UJ,f,ae,{discrete:!1})):HR(oe,y.swipeDirection,X)?(w.current=oe,c1(FJ,u,ae,{discrete:!1}),H.target.setPointerCapture(H.pointerId)):(Math.abs(L)>X||Math.abs(T)>X)&&(b.current=null)}),onPointerUp:ce(t.onPointerUp,H=>{const L=w.current,T=H.target;if(T.hasPointerCapture(H.pointerId)&&T.releasePointerCapture(H.pointerId),w.current=null,b.current=null,L){const P=H.currentTarget,R={originalEvent:H,delta:L};HR(L,y.swipeDirection,y.swipeThreshold)?c1($J,h,R,{discrete:!0}):c1(VJ,d,R,{discrete:!0}),P.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),qJ=t=>{const{__scopeToast:e,children:r,...n}=t,s=Im(Om,e),[i,o]=v.useState(!1),[a,c]=v.useState(!1);return YJ(()=>o(!0)),v.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:E.jsx(oy,{asChild:!0,children:E.jsx(ly,{...n,children:i&&E.jsxs(E.Fragment,{children:[s.label," ",r]})})})},WJ="ToastTitle",T9=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return E.jsx(we.div,{...n,ref:e})});T9.displayName=WJ;var KJ="ToastDescription",P9=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return E.jsx(we.div,{...n,ref:e})});P9.displayName=KJ;var R9="ToastAction",QJ=v.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?E.jsx(O9,{altText:r,asChild:!0,children:E.jsx(cC,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${R9}\`. Expected non-empty \`string\`.`),null)});QJ.displayName=R9;var I9="ToastClose",cC=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=HJ(I9,r);return E.jsx(O9,{asChild:!0,children:E.jsx(we.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,s.onClose)})})});cC.displayName=I9;var O9=v.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return E.jsx(we.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function _9(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),JJ(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(..._9(n))}}),e}function c1(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?vS(s,i):s.dispatchEvent(i)}var HR=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function YJ(t=()=>{}){const e=Gr(t);Tr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function JJ(t){return t.nodeType===t.ELEMENT_NODE}function XJ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function px(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var ZJ=E9,eX=C9,tX=k9,rX=T9,nX=P9,sX=cC,iX="_6wut8v1 _6wut8v0 fyvr12wp fyvr12wj fyvr11hs fyvr1qo fyvr1mo fyvr128 fyvr118g fyvr11i4 fyvr11h0",oX=Nt({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});const N9=v.createContext(null),aX=t=>{const{children:e,...r}=t,[n,s]=v.useState(new Set);return E.jsxs(ZJ,{...r,children:[E.jsxs(N9.Provider,{value:s,children:[e,E.jsx(yS,{children:Array.from(n).map(i=>E.jsx(lX,{...i},i.id))})]}),E.jsx(cX,{})]})},cX=()=>E.jsx(eX,{className:iX}),lX=t=>{const{id:e,variant:r,title:n,description:s,icon:i,isDismissible:o=!0,...a}=t,c=()=>{if(i)return E.jsx(i,{});switch(r){case"success":return E.jsx(q,{background:"positive",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:E.jsx(gS,{})});case"error":return E.jsx(q,{background:"negative",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:E.jsx(Gh,{})});default:return null}};return E.jsx(tX,{className:oX({variant:r}),open:!0,forceMount:!0,asChild:!0,...a,children:E.jsxs(JH,{as:Xc.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:[E.jsxs(q,{gap:"3",alignItems:"center",children:[c(),E.jsxs(q,{flexDirection:"column",gap:"1",children:[n&&E.jsx(rX,{children:E.jsx(ue,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:n})}),E.jsx(nX,{children:E.jsx(ue,{as:"div",variant:"normal",fontWeight:"medium",color:"text50",children:s})})]})]}),o&&E.jsx(sX,{"aria-label":"Close",asChild:!0,children:E.jsx(Am,{icon:Gh,size:"xs"})})]})})},M9=()=>{const t=v.useContext(N9);return e=>{const r={...e,id:Math.random().toString(36).slice(2,12),onOpenChange:n=>{n||t(s=>(s.delete(r),new Set([...s])))}};t(n=>new Set([...n,r]))}};var uX="_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",fX="_15pztn2";v.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",name:u,rows:f,resize:d=!1,...h}=t;return E.jsx(Al,{description:i,disabled:o,display:"grid",id:a??u,label:c,labelLocation:l,children:E.jsx(q,{as:r,autoComplete:n,spellCheck:"false",className:qr(uX,d&&fX),disabled:o,id:a??u,name:u,ref:e,rows:f,borderRadius:s,...h})})});var dX=Nt({defaultClassName:"_18h918k5 _18h918k0 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"_18h918k6",sm:"_18h918k7",md:"_18h918k8",lg:"_18h918k9",xl:"_18h918ka"},borderRadius:{circle:"_18h918kb _18h918k1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"_18h918kc _18h918k2 fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"_18h918kd _18h918k3 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"_18h918ke _18h918k4 fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]}),hX="_18h918kf";const pX=v.memo(t=>{const{chainId:e,borderRadius:r="circle",className:n,disableAnimation:s=!1,style:i,src:o,size:a="md",...c}=t,l=o||VH($H(e),a);return E.jsx(q,{className:qr(n,dX({borderRadius:r,size:a})),style:i,flexShrink:"0",...c,children:E.jsx(uN,{className:hX,disableAnimation:s,src:l})})});var yX=Nt({defaultClassName:"bnrreb1 bnrreb0 fyvr11jg fyvr11ko fyvr11hw fyvr11h0",variantClassNames:{size:{xs:"bnrreb2",sm:"bnrreb3",md:"bnrreb4",lg:"bnrreb5",xl:"bnrreb6"}},defaultVariants:{},compoundVariants:[]}),vX="bnrreb7",mX="bnrreb9 bnrreb8 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sj fyvr128 fyvr15o fyvr11h0";const gX=v.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",withNetwork:c,...l}=t;return E.jsxs(q,{className:qr(r,yX({size:a})),style:s,flexShrink:"0",...l,children:[i?E.jsx(uN,{className:vX,disableAnimation:n,borderRadius:e,overflow:"hidden",src:i}):E.jsx(ue,{className:mX,variant:"normal",fontWeight:"medium",color:"text50",borderRadius:e,overflow:"hidden",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)}),c&&E.jsx(q,{position:"absolute",zIndex:"1",borderRadius:"circle",borderWidth:"thin",borderStyle:"solid",borderColor:"backgroundPrimary",background:"backgroundPrimary",placeItems:"center",style:{width:16+2,height:16+2,right:-2,bottom:-2},children:E.jsx(pX,{chainId:c,style:{width:16,height:16}})})]})});var[_m,z1e]=Wr("Tooltip",[ld]),Nm=ld(),D9="TooltipProvider",xX=700,Dw="tooltip.open",[bX,lC]=_m(D9),wX=t=>{const{__scopeTooltip:e,delayDuration:r=xX,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,[o,a]=v.useState(!0),c=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),E.jsx(bX,{scope:e,isOpenDelayed:o,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback(u=>{c.current=u},[]),disableHoverableContent:s,children:i})};wX.displayName=D9;var Mm="Tooltip",[EX,fy]=_m(Mm),SX=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=t,c=lC(Mm,t.__scopeTooltip),l=Nm(e),[u,f]=v.useState(null),d=us(),h=v.useRef(0),p=o??c.disableHoverableContent,y=a??c.delayDuration,g=v.useRef(!1),[m=!1,x]=ps({prop:n,defaultProp:s,onChange:_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent(Dw))):c.onClose(),i==null||i(_)}}),b=v.useMemo(()=>m?g.current?"delayed-open":"instant-open":"closed",[m]),w=v.useCallback(()=>{window.clearTimeout(h.current),g.current=!1,x(!0)},[x]),A=v.useCallback(()=>{window.clearTimeout(h.current),x(!1)},[x]),O=v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,x(!0)},y)},[y,x]);return v.useEffect(()=>()=>window.clearTimeout(h.current),[]),E.jsx(_S,{...l,children:E.jsx(EX,{scope:e,contentId:d,open:m,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayed?O():w()},[c.isOpenDelayed,O,w]),onTriggerLeave:v.useCallback(()=>{p?A():window.clearTimeout(h.current)},[A,p]),onOpen:w,onClose:A,disableHoverableContent:p,children:r})})};SX.displayName=Mm;var Lw="TooltipTrigger",CX=v.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=fy(Lw,r),i=lC(Lw,r),o=Nm(r),a=v.useRef(null),c=$e(e,a,s.onTriggerChange),l=v.useRef(!1),u=v.useRef(!1),f=v.useCallback(()=>l.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),E.jsx(NS,{asChild:!0,...o,children:E.jsx(we.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:ce(t.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:ce(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:ce(t.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ce(t.onFocus,()=>{l.current||s.onOpen()}),onBlur:ce(t.onBlur,s.onClose),onClick:ce(t.onClick,s.onClose)})})});CX.displayName=Lw;var uC="TooltipPortal",[AX,kX]=_m(uC,{forceMount:void 0}),TX=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:s}=t,i=fy(uC,e);return E.jsx(AX,{scope:e,forceMount:r,children:E.jsx(cn,{present:r||i.open,children:E.jsx(oy,{asChild:!0,container:s,children:n})})})};TX.displayName=uC;var Ff="TooltipContent",PX=v.forwardRef((t,e)=>{const r=kX(Ff,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=fy(Ff,t.__scopeTooltip);return E.jsx(cn,{present:n||o.open,children:o.disableHoverableContent?E.jsx(L9,{side:s,...i,ref:e}):E.jsx(RX,{side:s,...i,ref:e})})}),RX=v.forwardRef((t,e)=>{const r=fy(Ff,t.__scopeTooltip),n=lC(Ff,t.__scopeTooltip),s=v.useRef(null),i=$e(e,s),[o,a]=v.useState(null),{trigger:c,onClose:l}=r,u=s.current,{onPointerInTransitChange:f}=n,d=v.useCallback(()=>{a(null),f(!1)},[f]),h=v.useCallback((p,y)=>{const g=p.currentTarget,m={x:p.clientX,y:p.clientY},x=NX(m,g.getBoundingClientRect()),b=MX(m,x),w=DX(y.getBoundingClientRect()),A=jX([...b,...w]);a(A),f(!0)},[f]);return v.useEffect(()=>()=>d(),[d]),v.useEffect(()=>{if(c&&u){const p=g=>h(g,u),y=g=>h(g,c);return c.addEventListener("pointerleave",p),u.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",p),u.removeEventListener("pointerleave",y)}}},[c,u,h,d]),v.useEffect(()=>{if(o){const p=y=>{const g=y.target,m={x:y.clientX,y:y.clientY},x=(c==null?void 0:c.contains(g))||(u==null?void 0:u.contains(g)),b=!LX(m,o);x?d():b&&(d(),l())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,u,o,l,d]),E.jsx(L9,{...t,ref:i})}),[IX,OX]=_m(Mm,{isInside:!1}),L9=v.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,c=fy(Ff,r),l=Nm(r),{onClose:u}=c;return v.useEffect(()=>(document.addEventListener(Dw,u),()=>document.removeEventListener(Dw,u)),[u]),v.useEffect(()=>{if(c.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),E.jsx(od,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:E.jsxs(MS,{"data-state":c.stateAttribute,...l,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(U6,{children:n}),E.jsx(IX,{scope:r,isInside:!0,children:E.jsx(DY,{id:c.contentId,role:"tooltip",children:s||n})})]})})});PX.displayName=Ff;var j9="TooltipArrow",_X=v.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Nm(r);return OX(j9,r).isInside?null:E.jsx(DS,{...s,...n,ref:e})});_X.displayName=j9;function NX(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function MX(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function DX(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function LX(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=u>n&&r<(l-a)*(n-c)/(u-c)+a&&(s=!s)}return s}function jX(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),BX(e)}function BX(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}/** * @remix-run/router v1.19.2 * * Copyright (c) Remix Software Inc. @@ -116,9 +116,9 @@ Defaulting to \`null\`.`}var eC="Radio",[gY,ON]=Wr(eC),[xY,bY]=gY(eC),_N=v.forwa * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function At(){return At=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function hl(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function FX(){return Math.random().toString(36).substr(2,8)}function qR(t,e){return{usr:t.state,key:t.key,idx:e}}function Yh(t,e,r,n){return r===void 0&&(r=null),At({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Si(e):e,{state:r,key:e&&e.key||n||FX()})}function dy(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 Si(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 UX(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=zt.Pop,c=null,l=u();l==null&&(l=0,o.replaceState(At({},o.state,{idx:l}),""));function u(){return(o.state||{idx:null}).idx}function f(){a=zt.Pop;let g=u(),m=g==null?null:g-l;l=g,c&&c({action:a,location:y.location,delta:m})}function d(g,m){a=zt.Push;let x=Yh(y.location,g,m);r&&r(x,g),l=u()+1;let b=qR(x,l),w=y.createHref(x);try{o.pushState(b,"",w)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;s.location.assign(w)}i&&c&&c({action:a,location:y.location,delta:1})}function h(g,m){a=zt.Replace;let x=Yh(y.location,g,m);r&&r(x,g),l=u();let b=qR(x,l),w=y.createHref(x);o.replaceState(b,"",w),i&&c&&c({action:a,location:y.location,delta:0})}function p(g){let m=s.location.origin!=="null"?s.location.origin:s.location.href,x=typeof g=="string"?g:dy(g);return x=x.replace(/ $/,"%20"),He(m,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,m)}let y={get action(){return a},get location(){return t(s,o)},listen(g){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(GR,f),c=g,()=>{s.removeEventListener(GR,f),c=null}},createHref(g){return e(s,g)},createURL:p,encodeLocation(g){let m=p(g);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:h,go(g){return o.go(g)}};return y}var it;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(it||(it={}));const VX=new Set(["lazy","caseSensitive","path","id","index","children"]);function $X(t){return t.index===!0}function Jh(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((s,i)=>{let o=[...r,String(i)],a=typeof s.id=="string"?s.id:o.join("-");if(He(s.index!==!0||!s.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`),$X(s)){let c=At({},s,e(s),{id:a});return n[a]=c,c}else{let c=At({},s,e(s),{id:a,children:void 0});return n[a]=c,s.children&&(c.children=Jh(s.children,e,o,n)),c}})}function cc(t,e,r){return r===void 0&&(r="/"),J1(t,e,r,!1)}function J1(t,e,r,n){let s=typeof e=="string"?Si(e):e,i=hy(s.pathname||"/",r);if(i==null)return null;let o=B9(t);HX(o);let a=null;for(let c=0;a==null&&c{let c={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(He(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let l=el([n,c.relativePath]),u=r.concat(c);i.children&&i.children.length>0&&(He(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),B9(i.children,e,u,l)),!(i.path==null&&!i.index)&&e.push({path:l,score:JX(l,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let c of F9(i.path))s(i,o,c)}),e}function F9(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=F9(n.join("/")),a=[];return a.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&a.push(...o),a.map(c=>t.startsWith("/")&&c===""?"/":c)}function HX(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:XX(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const GX=/^:[\w-]+$/,qX=3,WX=2,KX=1,QX=10,YX=-2,WR=t=>t==="*";function JX(t,e){let r=t.split("/"),n=r.length;return r.some(WR)&&(n+=YX),e&&(n+=WX),r.filter(s=>!WR(s)).reduce((s,i)=>s+(GX.test(i)?qX:i===""?KX:QX),n)}function XX(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function ZX(t,e,r){r===void 0&&(r=!1);let{routesMeta:n}=t,s={},i="/",o=[];for(let a=0;a{let{paramName:d,isOptional:h}=u;if(d==="*"){let y=a[f]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const p=a[f];return h&&!p?l[d]=void 0:l[d]=(p||"").replace(/%2F/g,"/"),l},{}),pathname:i,pathnameBase:o,pattern:t}}function eZ(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),hl(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=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,c)=>(n.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function tZ(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return hl(!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 hy(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 rZ(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Si(t):t;return{pathname:r?r.startsWith("/")?r:nZ(r,e):e,search:aZ(n),hash:cZ(s)}}function nZ(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function yx(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 U9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function sZ(t,e){let r=U9(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function iZ(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=Si(t):(s=At({},t),He(!s.pathname||!s.pathname.includes("?"),yx("?","pathname","search",s)),He(!s.pathname||!s.pathname.includes("#"),yx("#","pathname","hash",s)),He(!s.search||!s.search.includes("#"),yx("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;s.pathname=d.join("/")}a=f>=0?e[f]:"/"}let c=rZ(s,a),l=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(l||u)&&(c.pathname+="/"),c}const el=t=>t.join("/").replace(/\/\/+/g,"/"),oZ=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),aZ=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,cZ=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class s0{constructor(e,r,n,s){s===void 0&&(s=!1),this.status=e,this.statusText=r||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Dm(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const V9=["post","put","patch","delete"],lZ=new Set(V9),uZ=["get",...V9],fZ=new Set(uZ),dZ=new Set([301,302,303,307,308]),hZ=new Set([307,308]),vx={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},pZ={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Md={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},fC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yZ=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),$9="remix-router-transitions";function vZ(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 s;if(t.mapRouteProperties)s=t.mapRouteProperties;else if(t.detectErrorBoundary){let D=t.detectErrorBoundary;s=$=>({hasErrorBoundary:D($)})}else s=yZ;let i={},o=Jh(t.routes,s,void 0,i),a,c=t.basename||"/",l=t.unstable_dataStrategy||EZ,u=t.unstable_patchRoutesOnNavigation,f=At({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=1e3,y=new Set,g=null,m=null,x=null,b=t.hydrationData!=null,w=cc(o,t.history.location,c),A=null;if(w==null&&!u){let D=Zr(404,{pathname:t.history.location.pathname}),{matches:$,route:Q}=n4(o);w=$,A={[Q.id]:D}}w&&!t.hydrationData&&Ry(w,o,t.history.location.pathname).active&&(w=null);let O;if(w)if(w.some(D=>D.route.lazy))O=!1;else if(!w.some(D=>D.route.loader))O=!0;else if(f.v7_partialHydration){let D=t.hydrationData?t.hydrationData.loaderData:null,$=t.hydrationData?t.hydrationData.errors:null,Q=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:D&&D[re.route.id]!==void 0||$&&$[re.route.id]!==void 0:!0;if($){let re=w.findIndex(de=>$[de.route.id]!==void 0);O=w.slice(0,re+1).every(Q)}else O=w.every(Q)}else O=t.hydrationData!=null;else if(O=!1,w=[],f.v7_partialHydration){let D=Ry(null,o,t.history.location.pathname);D.active&&D.matches&&(w=D.matches)}let _,C={historyAction:t.history.action,location:t.history.location,matches:w,initialized:O,navigation:vx,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},j=zt.Pop,V=!1,B,z=!1,Y=new Map,H=null,L=!1,T=!1,P=[],R=new Set,I=new Map,U=0,F=-1,X=new Map,oe=new Set,ae=new Map,ke=new Map,ve=new Set,ie=new Map,Me=new Map,Be=new Map,Te;function De(){if(d=t.history.listen(D=>{let{action:$,location:Q,delta:re}=D;if(Te){Te(),Te=void 0;return}hl(Me.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 de=Hk({currentLocation:C.location,nextLocation:Q,historyAction:$});if(de&&re!=null){let Ee=new Promise(Pe=>{Te=Pe});t.history.go(re*-1),Ty(de,{state:"blocked",location:Q,proceed(){Ty(de,{state:"proceeding",proceed:void 0,reset:void 0,location:Q}),Ee.then(()=>t.history.go(re))},reset(){let Pe=new Map(C.blockers);Pe.set(de,Md),qe({blockers:Pe})}});return}return Ci($,Q)}),r){jZ(e,Y);let D=()=>BZ(e,Y);e.addEventListener("pagehide",D),H=()=>e.removeEventListener("pagehide",D)}return C.initialized||Ci(zt.Pop,C.location,{initialHydration:!0}),_}function ze(){d&&d(),H&&H(),h.clear(),B&&B.abort(),C.fetchers.forEach((D,$)=>ky($)),C.blockers.forEach((D,$)=>zk($))}function at(D){return h.add(D),()=>h.delete(D)}function qe(D,$){$===void 0&&($={}),C=At({},C,D);let Q=[],re=[];f.v7_fetcherPersist&&C.fetchers.forEach((de,Ee)=>{de.state==="idle"&&(ve.has(Ee)?re.push(Ee):Q.push(Ee))}),[...h].forEach(de=>de(C,{deletedFetchers:re,unstable_viewTransitionOpts:$.viewTransitionOpts,unstable_flushSync:$.flushSync===!0})),f.v7_fetcherPersist&&(Q.forEach(de=>C.fetchers.delete(de)),re.forEach(de=>ky(de)))}function Kr(D,$,Q){var re,de;let{flushSync:Ee}=Q===void 0?{}:Q,Pe=C.actionData!=null&&C.navigation.formMethod!=null&&Os(C.navigation.formMethod)&&C.navigation.state==="loading"&&((re=D.state)==null?void 0:re._isRedirect)!==!0,le;$.actionData?Object.keys($.actionData).length>0?le=$.actionData:le=null:Pe?le=C.actionData:le=null;let Se=$.loaderData?t4(C.loaderData,$.loaderData,$.matches||[],$.errors):C.loaderData,ge=C.blockers;ge.size>0&&(ge=new Map(ge),ge.forEach((et,mt)=>ge.set(mt,Md)));let xe=V===!0||C.navigation.formMethod!=null&&Os(C.navigation.formMethod)&&((de=D.state)==null?void 0:de._isRedirect)!==!0;a&&(o=a,a=void 0),L||j===zt.Pop||(j===zt.Push?t.history.push(D,D.state):j===zt.Replace&&t.history.replace(D,D.state));let Ze;if(j===zt.Pop){let et=Y.get(C.location.pathname);et&&et.has(D.pathname)?Ze={currentLocation:C.location,nextLocation:D}:Y.has(D.pathname)&&(Ze={currentLocation:D,nextLocation:C.location})}else if(z){let et=Y.get(C.location.pathname);et?et.add(D.pathname):(et=new Set([D.pathname]),Y.set(C.location.pathname,et)),Ze={currentLocation:C.location,nextLocation:D}}qe(At({},$,{actionData:le,loaderData:Se,historyAction:j,location:D,initialized:!0,navigation:vx,revalidation:"idle",restoreScrollPosition:qk(D,$.matches||C.matches),preventScrollReset:xe,blockers:ge}),{viewTransitionOpts:Ze,flushSync:Ee===!0}),j=zt.Pop,V=!1,z=!1,L=!1,T=!1,P=[]}async function vs(D,$){if(typeof D=="number"){t.history.go(D);return}let Q=jw(C.location,C.matches,c,f.v7_prependBasename,D,f.v7_relativeSplatPath,$==null?void 0:$.fromRouteId,$==null?void 0:$.relative),{path:re,submission:de,error:Ee}=QR(f.v7_normalizeFormMethod,!1,Q,$),Pe=C.location,le=Yh(C.location,re,$&&$.state);le=At({},le,t.history.encodeLocation(le));let Se=$&&$.replace!=null?$.replace:void 0,ge=zt.Push;Se===!0?ge=zt.Replace:Se===!1||de!=null&&Os(de.formMethod)&&de.formAction===C.location.pathname+C.location.search&&(ge=zt.Replace);let xe=$&&"preventScrollReset"in $?$.preventScrollReset===!0:void 0,Ze=($&&$.unstable_flushSync)===!0,et=Hk({currentLocation:Pe,nextLocation:le,historyAction:ge});if(et){Ty(et,{state:"blocked",location:le,proceed(){Ty(et,{state:"proceeding",proceed:void 0,reset:void 0,location:le}),vs(D,$)},reset(){let mt=new Map(C.blockers);mt.set(et,Md),qe({blockers:mt})}});return}return await Ci(ge,le,{submission:de,pendingError:Ee,preventScrollReset:xe,replace:$&&$.replace,enableViewTransition:$&&$.unstable_viewTransition,flushSync:Ze})}function Qa(){if(hg(),qe({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Ci(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Ci(j||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:z===!0})}}async function Ci(D,$,Q){B&&B.abort(),B=null,j=D,L=(Q&&Q.startUninterruptedRevalidation)===!0,_j(C.location,C.matches),V=(Q&&Q.preventScrollReset)===!0,z=(Q&&Q.enableViewTransition)===!0;let re=a||o,de=Q&&Q.overrideNavigation,Ee=cc(re,$,c),Pe=(Q&&Q.flushSync)===!0,le=Ry(Ee,re,$.pathname);if(le.active&&le.matches&&(Ee=le.matches),!Ee){let{error:We,notFoundMatches:ir,route:Jt}=pg($.pathname);Kr($,{matches:ir,loaderData:{},errors:{[Jt.id]:We}},{flushSync:Pe});return}if(C.initialized&&!T&&PZ(C.location,$)&&!(Q&&Q.submission&&Os(Q.submission.formMethod))){Kr($,{matches:Ee},{flushSync:Pe});return}B=new AbortController;let Se=jl(t.history,$,B.signal,Q&&Q.submission),ge;if(Q&&Q.pendingError)ge=[du(Ee).route.id,{type:it.error,error:Q.pendingError}];else if(Q&&Q.submission&&Os(Q.submission.formMethod)){let We=await Rl(Se,$,Q.submission,Ee,le.active,{replace:Q.replace,flushSync:Pe});if(We.shortCircuited)return;if(We.pendingActionResult){let[ir,Jt]=We.pendingActionResult;if(On(Jt)&&Dm(Jt.error)&&Jt.error.status===404){B=null,Kr($,{matches:We.matches,loaderData:{},errors:{[ir]:Jt.error}});return}}Ee=We.matches||Ee,ge=We.pendingActionResult,de=mx($,Q.submission),Pe=!1,le.active=!1,Se=jl(t.history,Se.url,Se.signal)}let{shortCircuited:xe,matches:Ze,loaderData:et,errors:mt}=await Cj(Se,$,Ee,le.active,de,Q&&Q.submission,Q&&Q.fetcherSubmission,Q&&Q.replace,Q&&Q.initialHydration===!0,Pe,ge);xe||(B=null,Kr($,At({matches:Ze||Ee},r4(ge),{loaderData:et,errors:mt})))}async function Rl(D,$,Q,re,de,Ee){Ee===void 0&&(Ee={}),hg();let Pe=DZ($,Q);if(qe({navigation:Pe},{flushSync:Ee.flushSync===!0}),de){let ge=await Iy(re,$.pathname,D.signal);if(ge.type==="aborted")return{shortCircuited:!0};if(ge.type==="error"){let{boundaryId:xe,error:Ze}=Py($.pathname,ge);return{matches:ge.partialMatches,pendingActionResult:[xe,{type:it.error,error:Ze}]}}else if(ge.matches)re=ge.matches;else{let{notFoundMatches:xe,error:Ze,route:et}=pg($.pathname);return{matches:xe,pendingActionResult:[et.id,{type:it.error,error:Ze}]}}}let le,Se=Yd(re,$);if(!Se.route.action&&!Se.route.lazy)le={type:it.error,error:Zr(405,{method:D.method,pathname:$.pathname,routeId:Se.route.id})};else if(le=(await bd("action",C,D,[Se],re,null))[Se.route.id],D.signal.aborted)return{shortCircuited:!0};if(xc(le)){let ge;return Ee&&Ee.replace!=null?ge=Ee.replace:ge=XR(le.response.headers.get("Location"),new URL(D.url),c)===C.location.pathname+C.location.search,await Ya(D,le,!0,{submission:Q,replace:ge}),{shortCircuited:!0}}if(ua(le))throw Zr(400,{type:"defer-action"});if(On(le)){let ge=du(re,Se.route.id);return(Ee&&Ee.replace)!==!0&&(j=zt.Push),{matches:re,pendingActionResult:[ge.route.id,le]}}return{matches:re,pendingActionResult:[Se.route.id,le]}}async function Cj(D,$,Q,re,de,Ee,Pe,le,Se,ge,xe){let Ze=de||mx($,Ee),et=Ee||Pe||i4(Ze),mt=!L&&(!f.v7_partialHydration||!Se);if(re){if(mt){let Mt=jk(xe);qe(At({navigation:Ze},Mt!==void 0?{actionData:Mt}:{}),{flushSync:ge})}let Le=await Iy(Q,$.pathname,D.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let{boundaryId:Mt,error:Sn}=Py($.pathname,Le);return{matches:Le.partialMatches,loaderData:{},errors:{[Mt]:Sn}}}else if(Le.matches)Q=Le.matches;else{let{error:Mt,notFoundMatches:Sn,route:Dt}=pg($.pathname);return{matches:Sn,loaderData:{},errors:{[Dt.id]:Mt}}}}let We=a||o,[ir,Jt]=YR(t.history,C,Q,et,$,f.v7_partialHydration&&Se===!0,f.v7_skipActionErrorRevalidation,T,P,R,ve,ae,oe,We,c,xe);if(yg(Le=>!(Q&&Q.some(Mt=>Mt.route.id===Le))||ir&&ir.some(Mt=>Mt.route.id===Le)),F=++U,ir.length===0&&Jt.length===0){let Le=Vk();return Kr($,At({matches:Q,loaderData:{},errors:xe&&On(xe[1])?{[xe[0]]:xe[1].error}:null},r4(xe),Le?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ge}),{shortCircuited:!0}}if(mt){let Le={};if(!re){Le.navigation=Ze;let Mt=jk(xe);Mt!==void 0&&(Le.actionData=Mt)}Jt.length>0&&(Le.fetchers=Aj(Jt)),qe(Le,{flushSync:ge})}Jt.forEach(Le=>{I.has(Le.key)&&ko(Le.key),Le.controller&&I.set(Le.key,Le.controller)});let wd=()=>Jt.forEach(Le=>ko(Le.key));B&&B.signal.addEventListener("abort",wd);let{loaderResults:ki,fetcherResults:Il}=await Bk(C,Q,ir,Jt,D);if(D.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",wd),Jt.forEach(Le=>I.delete(Le.key));let To=l1(ki);if(To)return await Ya(D,To.result,!0,{replace:le}),{shortCircuited:!0};if(To=l1(Il),To)return oe.add(To.key),await Ya(D,To.result,!0,{replace:le}),{shortCircuited:!0};let{loaderData:Oy,errors:Ti}=e4(C,Q,ir,ki,xe,Jt,Il,ie);ie.forEach((Le,Mt)=>{Le.subscribe(Sn=>{(Sn||Le.done)&&ie.delete(Mt)})}),f.v7_partialHydration&&Se&&C.errors&&Object.entries(C.errors).filter(Le=>{let[Mt]=Le;return!ir.some(Sn=>Sn.route.id===Mt)}).forEach(Le=>{let[Mt,Sn]=Le;Ti=Object.assign(Ti||{},{[Mt]:Sn})});let _y=Vk(),Ny=$k(F),My=_y||Ny||Jt.length>0;return At({matches:Q,loaderData:Oy,errors:Ti},My?{fetchers:new Map(C.fetchers)}:{})}function jk(D){if(D&&!On(D[1]))return{[D[0]]:D[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function Aj(D){return D.forEach($=>{let Q=C.fetchers.get($.key),re=Dd(void 0,Q?Q.data:void 0);C.fetchers.set($.key,re)}),new Map(C.fetchers)}function kj(D,$,Q,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.");I.has(D)&&ko(D);let de=(re&&re.unstable_flushSync)===!0,Ee=a||o,Pe=jw(C.location,C.matches,c,f.v7_prependBasename,Q,f.v7_relativeSplatPath,$,re==null?void 0:re.relative),le=cc(Ee,Pe,c),Se=Ry(le,Ee,Pe);if(Se.active&&Se.matches&&(le=Se.matches),!le){Ai(D,$,Zr(404,{pathname:Pe}),{flushSync:de});return}let{path:ge,submission:xe,error:Ze}=QR(f.v7_normalizeFormMethod,!0,Pe,re);if(Ze){Ai(D,$,Ze,{flushSync:de});return}let et=Yd(le,ge);if(V=(re&&re.preventScrollReset)===!0,xe&&Os(xe.formMethod)){Tj(D,$,ge,et,le,Se.active,de,xe);return}ae.set(D,{routeId:$,path:ge}),Pj(D,$,ge,et,le,Se.active,de,xe)}async function Tj(D,$,Q,re,de,Ee,Pe,le){hg(),ae.delete(D);function Se(Dt){if(!Dt.route.action&&!Dt.route.lazy){let Pi=Zr(405,{method:le.formMethod,pathname:Q,routeId:$});return Ai(D,$,Pi,{flushSync:Pe}),!0}return!1}if(!Ee&&Se(re))return;let ge=C.fetchers.get(D);Ao(D,LZ(le,ge),{flushSync:Pe});let xe=new AbortController,Ze=jl(t.history,Q,xe.signal,le);if(Ee){let Dt=await Iy(de,Q,Ze.signal);if(Dt.type==="aborted")return;if(Dt.type==="error"){let{error:Pi}=Py(Q,Dt);Ai(D,$,Pi,{flushSync:Pe});return}else if(Dt.matches){if(de=Dt.matches,re=Yd(de,Q),Se(re))return}else{Ai(D,$,Zr(404,{pathname:Q}),{flushSync:Pe});return}}I.set(D,xe);let et=U,We=(await bd("action",C,Ze,[re],de,D))[re.route.id];if(Ze.signal.aborted){I.get(D)===xe&&I.delete(D);return}if(f.v7_fetcherPersist&&ve.has(D)){if(xc(We)||On(We)){Ao(D,Lo(void 0));return}}else{if(xc(We))if(I.delete(D),F>et){Ao(D,Lo(void 0));return}else return oe.add(D),Ao(D,Dd(le)),Ya(Ze,We,!1,{fetcherSubmission:le});if(On(We)){Ai(D,$,We.error);return}}if(ua(We))throw Zr(400,{type:"defer-action"});let ir=C.navigation.location||C.location,Jt=jl(t.history,ir,xe.signal),wd=a||o,ki=C.navigation.state!=="idle"?cc(wd,C.navigation.location,c):C.matches;He(ki,"Didn't find any matches after fetcher action");let Il=++U;X.set(D,Il);let To=Dd(le,We.data);C.fetchers.set(D,To);let[Oy,Ti]=YR(t.history,C,ki,le,ir,!1,f.v7_skipActionErrorRevalidation,T,P,R,ve,ae,oe,wd,c,[re.route.id,We]);Ti.filter(Dt=>Dt.key!==D).forEach(Dt=>{let Pi=Dt.key,Kk=C.fetchers.get(Pi),Dj=Dd(void 0,Kk?Kk.data:void 0);C.fetchers.set(Pi,Dj),I.has(Pi)&&ko(Pi),Dt.controller&&I.set(Pi,Dt.controller)}),qe({fetchers:new Map(C.fetchers)});let _y=()=>Ti.forEach(Dt=>ko(Dt.key));xe.signal.addEventListener("abort",_y);let{loaderResults:Ny,fetcherResults:My}=await Bk(C,ki,Oy,Ti,Jt);if(xe.signal.aborted)return;xe.signal.removeEventListener("abort",_y),X.delete(D),I.delete(D),Ti.forEach(Dt=>I.delete(Dt.key));let Le=l1(Ny);if(Le)return Ya(Jt,Le.result,!1);if(Le=l1(My),Le)return oe.add(Le.key),Ya(Jt,Le.result,!1);let{loaderData:Mt,errors:Sn}=e4(C,ki,Oy,Ny,void 0,Ti,My,ie);if(C.fetchers.has(D)){let Dt=Lo(We.data);C.fetchers.set(D,Dt)}$k(Il),C.navigation.state==="loading"&&Il>F?(He(j,"Expected pending action"),B&&B.abort(),Kr(C.navigation.location,{matches:ki,loaderData:Mt,errors:Sn,fetchers:new Map(C.fetchers)})):(qe({errors:Sn,loaderData:t4(C.loaderData,Mt,ki,Sn),fetchers:new Map(C.fetchers)}),T=!1)}async function Pj(D,$,Q,re,de,Ee,Pe,le){let Se=C.fetchers.get(D);Ao(D,Dd(le,Se?Se.data:void 0),{flushSync:Pe});let ge=new AbortController,xe=jl(t.history,Q,ge.signal);if(Ee){let We=await Iy(de,Q,xe.signal);if(We.type==="aborted")return;if(We.type==="error"){let{error:ir}=Py(Q,We);Ai(D,$,ir,{flushSync:Pe});return}else if(We.matches)de=We.matches,re=Yd(de,Q);else{Ai(D,$,Zr(404,{pathname:Q}),{flushSync:Pe});return}}I.set(D,ge);let Ze=U,mt=(await bd("loader",C,xe,[re],de,D))[re.route.id];if(ua(mt)&&(mt=await dC(mt,xe.signal,!0)||mt),I.get(D)===ge&&I.delete(D),!xe.signal.aborted){if(ve.has(D)){Ao(D,Lo(void 0));return}if(xc(mt))if(F>Ze){Ao(D,Lo(void 0));return}else{oe.add(D),await Ya(xe,mt,!1);return}if(On(mt)){Ai(D,$,mt.error);return}He(!ua(mt),"Unhandled fetcher deferred data"),Ao(D,Lo(mt.data))}}async function Ya(D,$,Q,re){let{submission:de,fetcherSubmission:Ee,replace:Pe}=re===void 0?{}:re;$.response.headers.has("X-Remix-Revalidate")&&(T=!0);let le=$.response.headers.get("Location");He(le,"Expected a Location header on the redirect Response"),le=XR(le,new URL(D.url),c);let Se=Yh(C.location,le,{_isRedirect:!0});if(r){let We=!1;if($.response.headers.has("X-Remix-Reload-Document"))We=!0;else if(fC.test(le)){const ir=t.history.createURL(le);We=ir.origin!==e.location.origin||hy(ir.pathname,c)==null}if(We){Pe?e.location.replace(le):e.location.assign(le);return}}B=null;let ge=Pe===!0||$.response.headers.has("X-Remix-Replace")?zt.Replace:zt.Push,{formMethod:xe,formAction:Ze,formEncType:et}=C.navigation;!de&&!Ee&&xe&&Ze&&et&&(de=i4(C.navigation));let mt=de||Ee;if(hZ.has($.response.status)&&mt&&Os(mt.formMethod))await Ci(ge,Se,{submission:At({},mt,{formAction:le}),preventScrollReset:V,enableViewTransition:Q?z:void 0});else{let We=mx(Se,de);await Ci(ge,Se,{overrideNavigation:We,fetcherSubmission:Ee,preventScrollReset:V,enableViewTransition:Q?z:void 0})}}async function bd(D,$,Q,re,de,Ee){let Pe,le={};try{Pe=await SZ(l,D,$,Q,re,de,Ee,i,s)}catch(Se){return re.forEach(ge=>{le[ge.route.id]={type:it.error,error:Se}}),le}for(let[Se,ge]of Object.entries(Pe))if(IZ(ge)){let xe=ge.result;le[Se]={type:it.redirect,response:kZ(xe,Q,Se,de,c,f.v7_relativeSplatPath)}}else le[Se]=await AZ(ge);return le}async function Bk(D,$,Q,re,de){let Ee=D.matches,Pe=bd("loader",D,de,Q,$,null),le=Promise.all(re.map(async xe=>{if(xe.matches&&xe.match&&xe.controller){let et=(await bd("loader",D,jl(t.history,xe.path,xe.controller.signal),[xe.match],xe.matches,xe.key))[xe.match.route.id];return{[xe.key]:et}}else return Promise.resolve({[xe.key]:{type:it.error,error:Zr(404,{pathname:xe.path})}})})),Se=await Pe,ge=(await le).reduce((xe,Ze)=>Object.assign(xe,Ze),{});return await Promise.all([NZ($,Se,de.signal,Ee,D.loaderData),MZ($,ge,re)]),{loaderResults:Se,fetcherResults:ge}}function hg(){T=!0,P.push(...yg()),ae.forEach((D,$)=>{I.has($)&&(R.add($),ko($))})}function Ao(D,$,Q){Q===void 0&&(Q={}),C.fetchers.set(D,$),qe({fetchers:new Map(C.fetchers)},{flushSync:(Q&&Q.flushSync)===!0})}function Ai(D,$,Q,re){re===void 0&&(re={});let de=du(C.matches,$);ky(D),qe({errors:{[de.route.id]:Q},fetchers:new Map(C.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Fk(D){return f.v7_fetcherPersist&&(ke.set(D,(ke.get(D)||0)+1),ve.has(D)&&ve.delete(D)),C.fetchers.get(D)||pZ}function ky(D){let $=C.fetchers.get(D);I.has(D)&&!($&&$.state==="loading"&&X.has(D))&&ko(D),ae.delete(D),X.delete(D),oe.delete(D),ve.delete(D),R.delete(D),C.fetchers.delete(D)}function Rj(D){if(f.v7_fetcherPersist){let $=(ke.get(D)||0)-1;$<=0?(ke.delete(D),ve.add(D)):ke.set(D,$)}else ky(D);qe({fetchers:new Map(C.fetchers)})}function ko(D){let $=I.get(D);He($,"Expected fetch controller: "+D),$.abort(),I.delete(D)}function Uk(D){for(let $ of D){let Q=Fk($),re=Lo(Q.data);C.fetchers.set($,re)}}function Vk(){let D=[],$=!1;for(let Q of oe){let re=C.fetchers.get(Q);He(re,"Expected fetcher: "+Q),re.state==="loading"&&(oe.delete(Q),D.push(Q),$=!0)}return Uk(D),$}function $k(D){let $=[];for(let[Q,re]of X)if(re0}function Ij(D,$){let Q=C.blockers.get(D)||Md;return Me.get(D)!==$&&Me.set(D,$),Q}function zk(D){C.blockers.delete(D),Me.delete(D)}function Ty(D,$){let Q=C.blockers.get(D)||Md;He(Q.state==="unblocked"&&$.state==="blocked"||Q.state==="blocked"&&$.state==="blocked"||Q.state==="blocked"&&$.state==="proceeding"||Q.state==="blocked"&&$.state==="unblocked"||Q.state==="proceeding"&&$.state==="unblocked","Invalid blocker state transition: "+Q.state+" -> "+$.state);let re=new Map(C.blockers);re.set(D,$),qe({blockers:re})}function Hk(D){let{currentLocation:$,nextLocation:Q,historyAction:re}=D;if(Me.size===0)return;Me.size>1&&hl(!1,"A router only supports one blocker at a time");let de=Array.from(Me.entries()),[Ee,Pe]=de[de.length-1],le=C.blockers.get(Ee);if(!(le&&le.state==="proceeding")&&Pe({currentLocation:$,nextLocation:Q,historyAction:re}))return Ee}function pg(D){let $=Zr(404,{pathname:D}),Q=a||o,{matches:re,route:de}=n4(Q);return yg(),{notFoundMatches:re,route:de,error:$}}function Py(D,$){return{boundaryId:du($.partialMatches).route.id,error:Zr(400,{type:"route-discovery",pathname:D,message:$.error!=null&&"message"in $.error?$.error:String($.error)})}}function yg(D){let $=[];return ie.forEach((Q,re)=>{(!D||D(re))&&(Q.cancel(),$.push(re),ie.delete(re))}),$}function Oj(D,$,Q){if(g=D,x=$,m=Q||null,!b&&C.navigation===vx){b=!0;let re=qk(C.location,C.matches);re!=null&&qe({restoreScrollPosition:re})}return()=>{g=null,x=null,m=null}}function Gk(D,$){return m&&m(D,$.map(re=>zX(re,C.loaderData)))||D.key}function _j(D,$){if(g&&x){let Q=Gk(D,$);g[Q]=x()}}function qk(D,$){if(g){let Q=Gk(D,$),re=g[Q];if(typeof re=="number")return re}return null}function Ry(D,$,Q){if(u){if(y.has(Q))return{active:!1,matches:D};if(D){if(Object.keys(D[0].params).length>0)return{active:!0,matches:J1($,Q,c,!0)}}else return{active:!0,matches:J1($,Q,c,!0)||[]}}return{active:!1,matches:null}}async function Iy(D,$,Q){let re=D;for(;;){let de=a==null,Ee=a||o;try{await bZ(u,$,re,Ee,i,s,Be,Q)}catch(Se){return{type:"error",error:Se,partialMatches:re}}finally{de&&(o=[...o])}if(Q.aborted)return{type:"aborted"};let Pe=cc(Ee,$,c);if(Pe)return Wk($,y),{type:"success",matches:Pe};let le=J1(Ee,$,c,!0);if(!le||re.length===le.length&&re.every((Se,ge)=>Se.route.id===le[ge].route.id))return Wk($,y),{type:"success",matches:null};re=le}}function Wk(D,$){if($.size>=p){let Q=$.values().next().value;$.delete(Q)}$.add(D)}function Nj(D){i={},a=Jh(D,s,void 0,i)}function Mj(D,$){let Q=a==null;H9(D,$,a||o,i,s),Q&&(o=[...o],qe({}))}return _={get basename(){return c},get future(){return f},get state(){return C},get routes(){return o},get window(){return e},initialize:De,subscribe:at,enableScrollRestoration:Oj,navigate:vs,fetch:kj,revalidate:Qa,createHref:D=>t.history.createHref(D),encodeLocation:D=>t.history.encodeLocation(D),getFetcher:Fk,deleteFetcher:Rj,dispose:ze,getBlocker:Ij,deleteBlocker:zk,patchRoutes:Mj,_internalFetchControllers:I,_internalActiveDeferreds:ie,_internalSetRoutes:Nj},_}function mZ(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function jw(t,e,r,n,s,i,o,a){let c,l;if(o){c=[];for(let f of e)if(c.push(f),f.route.id===o){l=f;break}}else c=e,l=e[e.length-1];let u=iZ(s||".",sZ(c,i),hy(t.pathname,r)||t.pathname,a==="path");return s==null&&(u.search=t.search,u.hash=t.hash),(s==null||s===""||s===".")&&l&&l.route.index&&!hC(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:el([r,u.pathname])),dy(u)}function QR(t,e,r,n){if(!n||!mZ(n))return{path:r};if(n.formMethod&&!_Z(n.formMethod))return{path:r,error:Zr(405,{method:n.formMethod})};let s=()=>({path:r,error:Zr(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=t?i.toUpperCase():i.toLowerCase(),a=G9(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Os(o))return s();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[y,g]=p;return""+h+y+"="+g+` -`},""):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(!Os(o))return s();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 s()}}}He(typeof FormData=="function","FormData is not available in this environment");let c,l;if(n.formData)c=Bw(n.formData),l=n.formData;else if(n.body instanceof FormData)c=Bw(n.body),l=n.body;else if(n.body instanceof URLSearchParams)c=n.body,l=ZR(c);else if(n.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(n.body),l=ZR(c)}catch{return s()}let u={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Os(u.formMethod))return{path:r,submission:u};let f=Si(r);return e&&f.search&&hC(f.search)&&c.append("index",""),f.search="?"+c,{path:dy(f),submission:u}}function gZ(t,e){let r=t;if(e){let n=t.findIndex(s=>s.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function YR(t,e,r,n,s,i,o,a,c,l,u,f,d,h,p,y){let g=y?On(y[1])?y[1].error:y[1].data:void 0,m=t.createURL(e.location),x=t.createURL(s),b=y&&On(y[1])?y[0]:void 0,w=b?gZ(r,b):r,A=y?y[1].statusCode:void 0,O=o&&A&&A>=400,_=w.filter((j,V)=>{let{route:B}=j;if(B.lazy)return!0;if(B.loader==null)return!1;if(i)return typeof B.loader!="function"||B.loader.hydrate?!0:e.loaderData[B.id]===void 0&&(!e.errors||e.errors[B.id]===void 0);if(xZ(e.loaderData,e.matches[V],j)||c.some(H=>H===j.route.id))return!0;let z=e.matches[V],Y=j;return JR(j,At({currentUrl:m,currentParams:z.params,nextUrl:x,nextParams:Y.params},n,{actionResult:g,actionStatus:A,defaultShouldRevalidate:O?!1:a||m.pathname+m.search===x.pathname+x.search||m.search!==x.search||z9(z,Y)}))}),C=[];return f.forEach((j,V)=>{if(i||!r.some(L=>L.route.id===j.routeId)||u.has(V))return;let B=cc(h,j.path,p);if(!B){C.push({key:V,routeId:j.routeId,path:j.path,matches:null,match:null,controller:null});return}let z=e.fetchers.get(V),Y=Yd(B,j.path),H=!1;d.has(V)?H=!1:l.has(V)?(l.delete(V),H=!0):z&&z.state!=="idle"&&z.data===void 0?H=a:H=JR(Y,At({currentUrl:m,currentParams:e.matches[e.matches.length-1].params,nextUrl:x,nextParams:r[r.length-1].params},n,{actionResult:g,actionStatus:A,defaultShouldRevalidate:O?!1:a})),H&&C.push({key:V,routeId:j.routeId,path:j.path,matches:B,match:Y,controller:new AbortController})}),[_,C]}function xZ(t,e,r){let n=!e||r.route.id!==e.route.id,s=t[r.route.id]===void 0;return n||s}function z9(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function JR(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function bZ(t,e,r,n,s,i,o,a){let c=[e,...r.map(l=>l.route.id)].join("-");try{let l=o.get(c);l||(l=t({path:e,matches:r,patch:(u,f)=>{a.aborted||H9(u,f,n,s,i)}}),o.set(c,l)),l&&RZ(l)&&await l}finally{o.delete(c)}}function H9(t,e,r,n,s){if(t){var i;let o=n[t];He(o,"No route found to patch children into: routeId = "+t);let a=Jh(e,s,[t,"patch",String(((i=o.children)==null?void 0:i.length)||"0")],n);o.children?o.children.push(...a):o.children=a}else{let o=Jh(e,s,["patch",String(r.length||"0")],n);r.push(...o)}}async function wZ(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let s=r[t.id];He(s,"No route found in manifest");let i={};for(let o in n){let c=s[o]!==void 0&&o!=="hasErrorBoundary";hl(!c,'Route "'+s.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.')),!c&&!VX.has(o)&&(i[o]=n[o])}Object.assign(s,i),Object.assign(s,At({},e(s),{lazy:void 0}))}async function EZ(t){let{matches:e}=t,r=e.filter(s=>s.shouldLoad);return(await Promise.all(r.map(s=>s.resolve()))).reduce((s,i,o)=>Object.assign(s,{[r[o].route.id]:i}),{})}async function SZ(t,e,r,n,s,i,o,a,c,l){let u=i.map(h=>h.route.lazy?wZ(h.route,c,a):void 0),f=i.map((h,p)=>{let y=u[p],g=s.some(x=>x.route.id===h.route.id);return At({},h,{shouldLoad:g,resolve:async x=>(x&&n.method==="GET"&&(h.route.lazy||h.route.loader)&&(g=!0),g?CZ(e,n,h,y,x,l):Promise.resolve({type:it.data,result:void 0}))})}),d=await t({matches:f,request:n,params:i[0].params,fetcherKey:o,context:l});try{await Promise.all(u)}catch{}return d}async function CZ(t,e,r,n,s,i){let o,a,c=l=>{let u,f=new Promise((p,y)=>u=y);a=()=>u(),e.signal.addEventListener("abort",a);let d=p=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+r.route.id+"]"))):l({request:e,params:r.params,context:i},...p!==void 0?[p]:[]),h=(async()=>{try{return{type:"data",result:await(s?s(y=>d(y)):d())}}catch(p){return{type:"error",result:p}}})();return Promise.race([h,f])};try{let l=r.route[t];if(n)if(l){let u,[f]=await Promise.all([c(l).catch(d=>{u=d}),n]);if(u!==void 0)throw u;o=f}else if(await n,l=r.route[t],l)o=await c(l);else if(t==="action"){let u=new URL(e.url),f=u.pathname+u.search;throw Zr(405,{method:e.method,pathname:f,routeId:r.route.id})}else return{type:it.data,result:void 0};else if(l)o=await c(l);else{let u=new URL(e.url),f=u.pathname+u.search;throw Zr(404,{pathname:f})}He(o.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(l){return{type:it.error,result:l}}finally{a&&e.signal.removeEventListener("abort",a)}return o}async function AZ(t){let{result:e,type:r}=t;if(q9(e)){let l;try{let u=e.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?e.body==null?l=null:l=await e.json():l=await e.text()}catch(u){return{type:it.error,error:u}}return r===it.error?{type:it.error,error:new s0(e.status,e.statusText,l),statusCode:e.status,headers:e.headers}:{type:it.data,data:l,statusCode:e.status,headers:e.headers}}if(r===it.error){if(s4(e)){var n;if(e.data instanceof Error){var s;return{type:it.error,error:e.data,statusCode:(s=e.init)==null?void 0:s.status}}e=new s0(((n=e.init)==null?void 0:n.status)||500,void 0,e.data)}return{type:it.error,error:e,statusCode:Dm(e)?e.status:void 0}}if(OZ(e)){var i,o;return{type:it.deferred,deferredData:e,statusCode:(i=e.init)==null?void 0:i.status,headers:((o=e.init)==null?void 0:o.headers)&&new Headers(e.init.headers)}}if(s4(e)){var a,c;return{type:it.data,data:e.data,statusCode:(a=e.init)==null?void 0:a.status,headers:(c=e.init)!=null&&c.headers?new Headers(e.init.headers):void 0}}return{type:it.data,data:e}}function kZ(t,e,r,n,s,i){let o=t.headers.get("Location");if(He(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!fC.test(o)){let a=n.slice(0,n.findIndex(c=>c.route.id===r)+1);o=jw(new URL(e.url),a,s,!0,o,i),t.headers.set("Location",o)}return t}function XR(t,e,r){if(fC.test(t)){let n=t,s=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=hy(s.pathname,r)!=null;if(s.origin===e.origin&&i)return s.pathname+s.search+s.hash}return t}function jl(t,e,r,n){let s=t.createURL(G9(e)).toString(),i={signal:r};if(n&&Os(n.formMethod)){let{formMethod:o,formEncType:a}=n;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(n.json)):a==="text/plain"?i.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?i.body=Bw(n.formData):i.body=n.formData}return new Request(s,i)}function Bw(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function ZR(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function TZ(t,e,r,n,s){let i={},o=null,a,c=!1,l={},u=r&&On(r[1])?r[1].error:void 0;return t.forEach(f=>{if(!(f.route.id in e))return;let d=f.route.id,h=e[d];if(He(!xc(h),"Cannot handle redirect results in processLoaderData"),On(h)){let p=h.error;if(u!==void 0&&(p=u,u=void 0),o=o||{},s)o[d]=p;else{let y=du(t,d);o[y.route.id]==null&&(o[y.route.id]=p)}i[d]=void 0,c||(c=!0,a=Dm(h.error)?h.error.status:500),h.headers&&(l[d]=h.headers)}else ua(h)?(n.set(d,h.deferredData),i[d]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!c&&(a=h.statusCode),h.headers&&(l[d]=h.headers)):(i[d]=h.data,h.statusCode&&h.statusCode!==200&&!c&&(a=h.statusCode),h.headers&&(l[d]=h.headers))}),u!==void 0&&r&&(o={[r[0]]:u},i[r[0]]=void 0),{loaderData:i,errors:o,statusCode:a||200,loaderHeaders:l}}function e4(t,e,r,n,s,i,o,a){let{loaderData:c,errors:l}=TZ(e,n,s,a,!1);return i.forEach(u=>{let{key:f,match:d,controller:h}=u,p=o[f];if(He(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(On(p)){let y=du(t.matches,d==null?void 0:d.route.id);l&&l[y.route.id]||(l=At({},l,{[y.route.id]:p.error})),t.fetchers.delete(f)}else if(xc(p))He(!1,"Unhandled fetcher revalidation redirect");else if(ua(p))He(!1,"Unhandled fetcher deferred data");else{let y=Lo(p.data);t.fetchers.set(f,y)}}),{loaderData:c,errors:l}}function t4(t,e,r,n){let s=At({},e);for(let i of r){let o=i.route.id;if(e.hasOwnProperty(o)?e[o]!==void 0&&(s[o]=e[o]):t[o]!==void 0&&i.route.loader&&(s[o]=t[o]),n&&n.hasOwnProperty(o))break}return s}function r4(t){return t?On(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function du(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function n4(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 Zr(t,e){let{pathname:r,routeId:n,method:s,type:i,message:o}=e===void 0?{}:e,a="Unknown Server Error",c="Unknown @remix-run/router error";return t===400?(a="Bad Request",i==="route-discovery"?c='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error: -`+o):s&&r&&n?c="You made a "+s+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?c="defer() is not supported in actions":i==="invalid-body"&&(c="Unable to encode submission body")):t===403?(a="Forbidden",c='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",c='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",s&&r&&n?c="You made a "+s.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new s0(t||500,a,new Error(c),!0)}function l1(t){let e=Object.entries(t);for(let r=e.length-1;r>=0;r--){let[n,s]=e[r];if(xc(s))return{key:n,result:s}}}function G9(t){let e=typeof t=="string"?Si(t):t;return dy(At({},e,{hash:""}))}function PZ(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function RZ(t){return typeof t=="object"&&t!=null&&"then"in t}function IZ(t){return q9(t.result)&&dZ.has(t.result.status)}function ua(t){return t.type===it.deferred}function On(t){return t.type===it.error}function xc(t){return(t&&t.type)===it.redirect}function s4(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function OZ(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 q9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function _Z(t){return fZ.has(t.toLowerCase())}function Os(t){return lZ.has(t.toLowerCase())}async function NZ(t,e,r,n,s){let i=Object.entries(e);for(let o=0;o(d==null?void 0:d.route.id)===a);if(!l)continue;let u=n.find(d=>d.route.id===l.route.id),f=u!=null&&!z9(u,l)&&(s&&s[l.route.id])!==void 0;ua(c)&&f&&await dC(c,r,!1).then(d=>{d&&(e[a]=d)})}}async function MZ(t,e,r){for(let n=0;n(l==null?void 0:l.route.id)===i)&&ua(a)&&(He(o,"Expected an AbortController for revalidating fetcher deferred result"),await dC(a,o.signal,!0).then(l=>{l&&(e[s]=l)}))}}async function dC(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:it.data,data:t.deferredData.unwrappedData}}catch(s){return{type:it.error,error:s}}return{type:it.data,data:t.deferredData.data}}}function hC(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Yd(t,e){let r=typeof e=="string"?Si(e).search:e.search;if(t[t.length-1].route.index&&hC(r||""))return t[t.length-1];let n=U9(t);return n[n.length-1]}function i4(t){let{formMethod:e,formAction:r,formEncType:n,text:s,formData:i,json:o}=t;if(!(!e||!r||!n)){if(s!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:i,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 mx(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 DZ(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 Dd(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 LZ(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 Lo(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 jZ(t,e){try{let r=t.sessionStorage.getItem($9);if(r){let n=JSON.parse(r);for(let[s,i]of Object.entries(n||{}))i&&Array.isArray(i)&&e.set(s,new Set(i||[]))}}catch{}}function BZ(t,e){if(e.size>0){let r={};for(let[n,s]of e)r[n]=[...s];try{t.sessionStorage.setItem($9,JSON.stringify(r))}catch(n){hl(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + */function At(){return At=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function hl(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function UX(){return Math.random().toString(36).substr(2,8)}function qR(t,e){return{usr:t.state,key:t.key,idx:e}}function Yh(t,e,r,n){return r===void 0&&(r=null),At({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Si(e):e,{state:r,key:e&&e.key||n||UX()})}function dy(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 Si(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 VX(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=zt.Pop,c=null,l=u();l==null&&(l=0,o.replaceState(At({},o.state,{idx:l}),""));function u(){return(o.state||{idx:null}).idx}function f(){a=zt.Pop;let g=u(),m=g==null?null:g-l;l=g,c&&c({action:a,location:y.location,delta:m})}function d(g,m){a=zt.Push;let x=Yh(y.location,g,m);r&&r(x,g),l=u()+1;let b=qR(x,l),w=y.createHref(x);try{o.pushState(b,"",w)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;s.location.assign(w)}i&&c&&c({action:a,location:y.location,delta:1})}function h(g,m){a=zt.Replace;let x=Yh(y.location,g,m);r&&r(x,g),l=u();let b=qR(x,l),w=y.createHref(x);o.replaceState(b,"",w),i&&c&&c({action:a,location:y.location,delta:0})}function p(g){let m=s.location.origin!=="null"?s.location.origin:s.location.href,x=typeof g=="string"?g:dy(g);return x=x.replace(/ $/,"%20"),He(m,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,m)}let y={get action(){return a},get location(){return t(s,o)},listen(g){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(GR,f),c=g,()=>{s.removeEventListener(GR,f),c=null}},createHref(g){return e(s,g)},createURL:p,encodeLocation(g){let m=p(g);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:h,go(g){return o.go(g)}};return y}var it;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(it||(it={}));const $X=new Set(["lazy","caseSensitive","path","id","index","children"]);function zX(t){return t.index===!0}function Jh(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((s,i)=>{let o=[...r,String(i)],a=typeof s.id=="string"?s.id:o.join("-");if(He(s.index!==!0||!s.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`),zX(s)){let c=At({},s,e(s),{id:a});return n[a]=c,c}else{let c=At({},s,e(s),{id:a,children:void 0});return n[a]=c,s.children&&(c.children=Jh(s.children,e,o,n)),c}})}function cc(t,e,r){return r===void 0&&(r="/"),J1(t,e,r,!1)}function J1(t,e,r,n){let s=typeof e=="string"?Si(e):e,i=hy(s.pathname||"/",r);if(i==null)return null;let o=B9(t);GX(o);let a=null;for(let c=0;a==null&&c{let c={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(He(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let l=el([n,c.relativePath]),u=r.concat(c);i.children&&i.children.length>0&&(He(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),B9(i.children,e,u,l)),!(i.path==null&&!i.index)&&e.push({path:l,score:XX(l,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let c of F9(i.path))s(i,o,c)}),e}function F9(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=F9(n.join("/")),a=[];return a.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&a.push(...o),a.map(c=>t.startsWith("/")&&c===""?"/":c)}function GX(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:ZX(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const qX=/^:[\w-]+$/,WX=3,KX=2,QX=1,YX=10,JX=-2,WR=t=>t==="*";function XX(t,e){let r=t.split("/"),n=r.length;return r.some(WR)&&(n+=JX),e&&(n+=KX),r.filter(s=>!WR(s)).reduce((s,i)=>s+(qX.test(i)?WX:i===""?QX:YX),n)}function ZX(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function eZ(t,e,r){r===void 0&&(r=!1);let{routesMeta:n}=t,s={},i="/",o=[];for(let a=0;a{let{paramName:d,isOptional:h}=u;if(d==="*"){let y=a[f]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const p=a[f];return h&&!p?l[d]=void 0:l[d]=(p||"").replace(/%2F/g,"/"),l},{}),pathname:i,pathnameBase:o,pattern:t}}function tZ(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),hl(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=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,c)=>(n.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function rZ(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return hl(!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 hy(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 nZ(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Si(t):t;return{pathname:r?r.startsWith("/")?r:sZ(r,e):e,search:cZ(n),hash:lZ(s)}}function sZ(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function yx(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 U9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function iZ(t,e){let r=U9(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function oZ(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=Si(t):(s=At({},t),He(!s.pathname||!s.pathname.includes("?"),yx("?","pathname","search",s)),He(!s.pathname||!s.pathname.includes("#"),yx("#","pathname","hash",s)),He(!s.search||!s.search.includes("#"),yx("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;s.pathname=d.join("/")}a=f>=0?e[f]:"/"}let c=nZ(s,a),l=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(l||u)&&(c.pathname+="/"),c}const el=t=>t.join("/").replace(/\/\/+/g,"/"),aZ=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),cZ=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,lZ=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class s0{constructor(e,r,n,s){s===void 0&&(s=!1),this.status=e,this.statusText=r||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Dm(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const V9=["post","put","patch","delete"],uZ=new Set(V9),fZ=["get",...V9],dZ=new Set(fZ),hZ=new Set([301,302,303,307,308]),pZ=new Set([307,308]),vx={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yZ={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Md={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},fC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vZ=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),$9="remix-router-transitions";function mZ(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 s;if(t.mapRouteProperties)s=t.mapRouteProperties;else if(t.detectErrorBoundary){let D=t.detectErrorBoundary;s=z=>({hasErrorBoundary:D(z)})}else s=vZ;let i={},o=Jh(t.routes,s,void 0,i),a,c=t.basename||"/",l=t.unstable_dataStrategy||SZ,u=t.unstable_patchRoutesOnNavigation,f=At({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=1e3,y=new Set,g=null,m=null,x=null,b=t.hydrationData!=null,w=cc(o,t.history.location,c),A=null;if(w==null&&!u){let D=Zr(404,{pathname:t.history.location.pathname}),{matches:z,route:Q}=n4(o);w=z,A={[Q.id]:D}}w&&!t.hydrationData&&Ry(w,o,t.history.location.pathname).active&&(w=null);let O;if(w)if(w.some(D=>D.route.lazy))O=!1;else if(!w.some(D=>D.route.loader))O=!0;else if(f.v7_partialHydration){let D=t.hydrationData?t.hydrationData.loaderData:null,z=t.hydrationData?t.hydrationData.errors:null,Q=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:D&&D[re.route.id]!==void 0||z&&z[re.route.id]!==void 0:!0;if(z){let re=w.findIndex(de=>z[de.route.id]!==void 0);O=w.slice(0,re+1).every(Q)}else O=w.every(Q)}else O=t.hydrationData!=null;else if(O=!1,w=[],f.v7_partialHydration){let D=Ry(null,o,t.history.location.pathname);D.active&&D.matches&&(w=D.matches)}let _,C={historyAction:t.history.action,location:t.history.location,matches:w,initialized:O,navigation:vx,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},j=zt.Pop,V=!1,B,$=!1,Y=new Map,H=null,L=!1,T=!1,P=[],R=new Set,I=new Map,U=0,F=-1,X=new Map,oe=new Set,ae=new Map,ke=new Map,ve=new Set,ie=new Map,Me=new Map,Be=new Map,Te;function De(){if(d=t.history.listen(D=>{let{action:z,location:Q,delta:re}=D;if(Te){Te(),Te=void 0;return}hl(Me.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 de=Hk({currentLocation:C.location,nextLocation:Q,historyAction:z});if(de&&re!=null){let Ee=new Promise(Pe=>{Te=Pe});t.history.go(re*-1),Ty(de,{state:"blocked",location:Q,proceed(){Ty(de,{state:"proceeding",proceed:void 0,reset:void 0,location:Q}),Ee.then(()=>t.history.go(re))},reset(){let Pe=new Map(C.blockers);Pe.set(de,Md),qe({blockers:Pe})}});return}return Ci(z,Q)}),r){BZ(e,Y);let D=()=>FZ(e,Y);e.addEventListener("pagehide",D),H=()=>e.removeEventListener("pagehide",D)}return C.initialized||Ci(zt.Pop,C.location,{initialHydration:!0}),_}function ze(){d&&d(),H&&H(),h.clear(),B&&B.abort(),C.fetchers.forEach((D,z)=>ky(z)),C.blockers.forEach((D,z)=>zk(z))}function at(D){return h.add(D),()=>h.delete(D)}function qe(D,z){z===void 0&&(z={}),C=At({},C,D);let Q=[],re=[];f.v7_fetcherPersist&&C.fetchers.forEach((de,Ee)=>{de.state==="idle"&&(ve.has(Ee)?re.push(Ee):Q.push(Ee))}),[...h].forEach(de=>de(C,{deletedFetchers:re,unstable_viewTransitionOpts:z.viewTransitionOpts,unstable_flushSync:z.flushSync===!0})),f.v7_fetcherPersist&&(Q.forEach(de=>C.fetchers.delete(de)),re.forEach(de=>ky(de)))}function Kr(D,z,Q){var re,de;let{flushSync:Ee}=Q===void 0?{}:Q,Pe=C.actionData!=null&&C.navigation.formMethod!=null&&Os(C.navigation.formMethod)&&C.navigation.state==="loading"&&((re=D.state)==null?void 0:re._isRedirect)!==!0,le;z.actionData?Object.keys(z.actionData).length>0?le=z.actionData:le=null:Pe?le=C.actionData:le=null;let Se=z.loaderData?t4(C.loaderData,z.loaderData,z.matches||[],z.errors):C.loaderData,ge=C.blockers;ge.size>0&&(ge=new Map(ge),ge.forEach((et,mt)=>ge.set(mt,Md)));let xe=V===!0||C.navigation.formMethod!=null&&Os(C.navigation.formMethod)&&((de=D.state)==null?void 0:de._isRedirect)!==!0;a&&(o=a,a=void 0),L||j===zt.Pop||(j===zt.Push?t.history.push(D,D.state):j===zt.Replace&&t.history.replace(D,D.state));let Ze;if(j===zt.Pop){let et=Y.get(C.location.pathname);et&&et.has(D.pathname)?Ze={currentLocation:C.location,nextLocation:D}:Y.has(D.pathname)&&(Ze={currentLocation:D,nextLocation:C.location})}else if($){let et=Y.get(C.location.pathname);et?et.add(D.pathname):(et=new Set([D.pathname]),Y.set(C.location.pathname,et)),Ze={currentLocation:C.location,nextLocation:D}}qe(At({},z,{actionData:le,loaderData:Se,historyAction:j,location:D,initialized:!0,navigation:vx,revalidation:"idle",restoreScrollPosition:qk(D,z.matches||C.matches),preventScrollReset:xe,blockers:ge}),{viewTransitionOpts:Ze,flushSync:Ee===!0}),j=zt.Pop,V=!1,$=!1,L=!1,T=!1,P=[]}async function vs(D,z){if(typeof D=="number"){t.history.go(D);return}let Q=jw(C.location,C.matches,c,f.v7_prependBasename,D,f.v7_relativeSplatPath,z==null?void 0:z.fromRouteId,z==null?void 0:z.relative),{path:re,submission:de,error:Ee}=QR(f.v7_normalizeFormMethod,!1,Q,z),Pe=C.location,le=Yh(C.location,re,z&&z.state);le=At({},le,t.history.encodeLocation(le));let Se=z&&z.replace!=null?z.replace:void 0,ge=zt.Push;Se===!0?ge=zt.Replace:Se===!1||de!=null&&Os(de.formMethod)&&de.formAction===C.location.pathname+C.location.search&&(ge=zt.Replace);let xe=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,Ze=(z&&z.unstable_flushSync)===!0,et=Hk({currentLocation:Pe,nextLocation:le,historyAction:ge});if(et){Ty(et,{state:"blocked",location:le,proceed(){Ty(et,{state:"proceeding",proceed:void 0,reset:void 0,location:le}),vs(D,z)},reset(){let mt=new Map(C.blockers);mt.set(et,Md),qe({blockers:mt})}});return}return await Ci(ge,le,{submission:de,pendingError:Ee,preventScrollReset:xe,replace:z&&z.replace,enableViewTransition:z&&z.unstable_viewTransition,flushSync:Ze})}function Qa(){if(hg(),qe({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Ci(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Ci(j||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:$===!0})}}async function Ci(D,z,Q){B&&B.abort(),B=null,j=D,L=(Q&&Q.startUninterruptedRevalidation)===!0,Nj(C.location,C.matches),V=(Q&&Q.preventScrollReset)===!0,$=(Q&&Q.enableViewTransition)===!0;let re=a||o,de=Q&&Q.overrideNavigation,Ee=cc(re,z,c),Pe=(Q&&Q.flushSync)===!0,le=Ry(Ee,re,z.pathname);if(le.active&&le.matches&&(Ee=le.matches),!Ee){let{error:We,notFoundMatches:ir,route:Jt}=pg(z.pathname);Kr(z,{matches:ir,loaderData:{},errors:{[Jt.id]:We}},{flushSync:Pe});return}if(C.initialized&&!T&&RZ(C.location,z)&&!(Q&&Q.submission&&Os(Q.submission.formMethod))){Kr(z,{matches:Ee},{flushSync:Pe});return}B=new AbortController;let Se=jl(t.history,z,B.signal,Q&&Q.submission),ge;if(Q&&Q.pendingError)ge=[du(Ee).route.id,{type:it.error,error:Q.pendingError}];else if(Q&&Q.submission&&Os(Q.submission.formMethod)){let We=await Rl(Se,z,Q.submission,Ee,le.active,{replace:Q.replace,flushSync:Pe});if(We.shortCircuited)return;if(We.pendingActionResult){let[ir,Jt]=We.pendingActionResult;if(On(Jt)&&Dm(Jt.error)&&Jt.error.status===404){B=null,Kr(z,{matches:We.matches,loaderData:{},errors:{[ir]:Jt.error}});return}}Ee=We.matches||Ee,ge=We.pendingActionResult,de=mx(z,Q.submission),Pe=!1,le.active=!1,Se=jl(t.history,Se.url,Se.signal)}let{shortCircuited:xe,matches:Ze,loaderData:et,errors:mt}=await Aj(Se,z,Ee,le.active,de,Q&&Q.submission,Q&&Q.fetcherSubmission,Q&&Q.replace,Q&&Q.initialHydration===!0,Pe,ge);xe||(B=null,Kr(z,At({matches:Ze||Ee},r4(ge),{loaderData:et,errors:mt})))}async function Rl(D,z,Q,re,de,Ee){Ee===void 0&&(Ee={}),hg();let Pe=LZ(z,Q);if(qe({navigation:Pe},{flushSync:Ee.flushSync===!0}),de){let ge=await Iy(re,z.pathname,D.signal);if(ge.type==="aborted")return{shortCircuited:!0};if(ge.type==="error"){let{boundaryId:xe,error:Ze}=Py(z.pathname,ge);return{matches:ge.partialMatches,pendingActionResult:[xe,{type:it.error,error:Ze}]}}else if(ge.matches)re=ge.matches;else{let{notFoundMatches:xe,error:Ze,route:et}=pg(z.pathname);return{matches:xe,pendingActionResult:[et.id,{type:it.error,error:Ze}]}}}let le,Se=Yd(re,z);if(!Se.route.action&&!Se.route.lazy)le={type:it.error,error:Zr(405,{method:D.method,pathname:z.pathname,routeId:Se.route.id})};else if(le=(await bd("action",C,D,[Se],re,null))[Se.route.id],D.signal.aborted)return{shortCircuited:!0};if(xc(le)){let ge;return Ee&&Ee.replace!=null?ge=Ee.replace:ge=XR(le.response.headers.get("Location"),new URL(D.url),c)===C.location.pathname+C.location.search,await Ya(D,le,!0,{submission:Q,replace:ge}),{shortCircuited:!0}}if(ua(le))throw Zr(400,{type:"defer-action"});if(On(le)){let ge=du(re,Se.route.id);return(Ee&&Ee.replace)!==!0&&(j=zt.Push),{matches:re,pendingActionResult:[ge.route.id,le]}}return{matches:re,pendingActionResult:[Se.route.id,le]}}async function Aj(D,z,Q,re,de,Ee,Pe,le,Se,ge,xe){let Ze=de||mx(z,Ee),et=Ee||Pe||i4(Ze),mt=!L&&(!f.v7_partialHydration||!Se);if(re){if(mt){let Mt=jk(xe);qe(At({navigation:Ze},Mt!==void 0?{actionData:Mt}:{}),{flushSync:ge})}let Le=await Iy(Q,z.pathname,D.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let{boundaryId:Mt,error:Sn}=Py(z.pathname,Le);return{matches:Le.partialMatches,loaderData:{},errors:{[Mt]:Sn}}}else if(Le.matches)Q=Le.matches;else{let{error:Mt,notFoundMatches:Sn,route:Dt}=pg(z.pathname);return{matches:Sn,loaderData:{},errors:{[Dt.id]:Mt}}}}let We=a||o,[ir,Jt]=YR(t.history,C,Q,et,z,f.v7_partialHydration&&Se===!0,f.v7_skipActionErrorRevalidation,T,P,R,ve,ae,oe,We,c,xe);if(yg(Le=>!(Q&&Q.some(Mt=>Mt.route.id===Le))||ir&&ir.some(Mt=>Mt.route.id===Le)),F=++U,ir.length===0&&Jt.length===0){let Le=Vk();return Kr(z,At({matches:Q,loaderData:{},errors:xe&&On(xe[1])?{[xe[0]]:xe[1].error}:null},r4(xe),Le?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ge}),{shortCircuited:!0}}if(mt){let Le={};if(!re){Le.navigation=Ze;let Mt=jk(xe);Mt!==void 0&&(Le.actionData=Mt)}Jt.length>0&&(Le.fetchers=kj(Jt)),qe(Le,{flushSync:ge})}Jt.forEach(Le=>{I.has(Le.key)&&ko(Le.key),Le.controller&&I.set(Le.key,Le.controller)});let wd=()=>Jt.forEach(Le=>ko(Le.key));B&&B.signal.addEventListener("abort",wd);let{loaderResults:ki,fetcherResults:Il}=await Bk(C,Q,ir,Jt,D);if(D.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",wd),Jt.forEach(Le=>I.delete(Le.key));let To=l1(ki);if(To)return await Ya(D,To.result,!0,{replace:le}),{shortCircuited:!0};if(To=l1(Il),To)return oe.add(To.key),await Ya(D,To.result,!0,{replace:le}),{shortCircuited:!0};let{loaderData:Oy,errors:Ti}=e4(C,Q,ir,ki,xe,Jt,Il,ie);ie.forEach((Le,Mt)=>{Le.subscribe(Sn=>{(Sn||Le.done)&&ie.delete(Mt)})}),f.v7_partialHydration&&Se&&C.errors&&Object.entries(C.errors).filter(Le=>{let[Mt]=Le;return!ir.some(Sn=>Sn.route.id===Mt)}).forEach(Le=>{let[Mt,Sn]=Le;Ti=Object.assign(Ti||{},{[Mt]:Sn})});let _y=Vk(),Ny=$k(F),My=_y||Ny||Jt.length>0;return At({matches:Q,loaderData:Oy,errors:Ti},My?{fetchers:new Map(C.fetchers)}:{})}function jk(D){if(D&&!On(D[1]))return{[D[0]]:D[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function kj(D){return D.forEach(z=>{let Q=C.fetchers.get(z.key),re=Dd(void 0,Q?Q.data:void 0);C.fetchers.set(z.key,re)}),new Map(C.fetchers)}function Tj(D,z,Q,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.");I.has(D)&&ko(D);let de=(re&&re.unstable_flushSync)===!0,Ee=a||o,Pe=jw(C.location,C.matches,c,f.v7_prependBasename,Q,f.v7_relativeSplatPath,z,re==null?void 0:re.relative),le=cc(Ee,Pe,c),Se=Ry(le,Ee,Pe);if(Se.active&&Se.matches&&(le=Se.matches),!le){Ai(D,z,Zr(404,{pathname:Pe}),{flushSync:de});return}let{path:ge,submission:xe,error:Ze}=QR(f.v7_normalizeFormMethod,!0,Pe,re);if(Ze){Ai(D,z,Ze,{flushSync:de});return}let et=Yd(le,ge);if(V=(re&&re.preventScrollReset)===!0,xe&&Os(xe.formMethod)){Pj(D,z,ge,et,le,Se.active,de,xe);return}ae.set(D,{routeId:z,path:ge}),Rj(D,z,ge,et,le,Se.active,de,xe)}async function Pj(D,z,Q,re,de,Ee,Pe,le){hg(),ae.delete(D);function Se(Dt){if(!Dt.route.action&&!Dt.route.lazy){let Pi=Zr(405,{method:le.formMethod,pathname:Q,routeId:z});return Ai(D,z,Pi,{flushSync:Pe}),!0}return!1}if(!Ee&&Se(re))return;let ge=C.fetchers.get(D);Ao(D,jZ(le,ge),{flushSync:Pe});let xe=new AbortController,Ze=jl(t.history,Q,xe.signal,le);if(Ee){let Dt=await Iy(de,Q,Ze.signal);if(Dt.type==="aborted")return;if(Dt.type==="error"){let{error:Pi}=Py(Q,Dt);Ai(D,z,Pi,{flushSync:Pe});return}else if(Dt.matches){if(de=Dt.matches,re=Yd(de,Q),Se(re))return}else{Ai(D,z,Zr(404,{pathname:Q}),{flushSync:Pe});return}}I.set(D,xe);let et=U,We=(await bd("action",C,Ze,[re],de,D))[re.route.id];if(Ze.signal.aborted){I.get(D)===xe&&I.delete(D);return}if(f.v7_fetcherPersist&&ve.has(D)){if(xc(We)||On(We)){Ao(D,Lo(void 0));return}}else{if(xc(We))if(I.delete(D),F>et){Ao(D,Lo(void 0));return}else return oe.add(D),Ao(D,Dd(le)),Ya(Ze,We,!1,{fetcherSubmission:le});if(On(We)){Ai(D,z,We.error);return}}if(ua(We))throw Zr(400,{type:"defer-action"});let ir=C.navigation.location||C.location,Jt=jl(t.history,ir,xe.signal),wd=a||o,ki=C.navigation.state!=="idle"?cc(wd,C.navigation.location,c):C.matches;He(ki,"Didn't find any matches after fetcher action");let Il=++U;X.set(D,Il);let To=Dd(le,We.data);C.fetchers.set(D,To);let[Oy,Ti]=YR(t.history,C,ki,le,ir,!1,f.v7_skipActionErrorRevalidation,T,P,R,ve,ae,oe,wd,c,[re.route.id,We]);Ti.filter(Dt=>Dt.key!==D).forEach(Dt=>{let Pi=Dt.key,Kk=C.fetchers.get(Pi),Lj=Dd(void 0,Kk?Kk.data:void 0);C.fetchers.set(Pi,Lj),I.has(Pi)&&ko(Pi),Dt.controller&&I.set(Pi,Dt.controller)}),qe({fetchers:new Map(C.fetchers)});let _y=()=>Ti.forEach(Dt=>ko(Dt.key));xe.signal.addEventListener("abort",_y);let{loaderResults:Ny,fetcherResults:My}=await Bk(C,ki,Oy,Ti,Jt);if(xe.signal.aborted)return;xe.signal.removeEventListener("abort",_y),X.delete(D),I.delete(D),Ti.forEach(Dt=>I.delete(Dt.key));let Le=l1(Ny);if(Le)return Ya(Jt,Le.result,!1);if(Le=l1(My),Le)return oe.add(Le.key),Ya(Jt,Le.result,!1);let{loaderData:Mt,errors:Sn}=e4(C,ki,Oy,Ny,void 0,Ti,My,ie);if(C.fetchers.has(D)){let Dt=Lo(We.data);C.fetchers.set(D,Dt)}$k(Il),C.navigation.state==="loading"&&Il>F?(He(j,"Expected pending action"),B&&B.abort(),Kr(C.navigation.location,{matches:ki,loaderData:Mt,errors:Sn,fetchers:new Map(C.fetchers)})):(qe({errors:Sn,loaderData:t4(C.loaderData,Mt,ki,Sn),fetchers:new Map(C.fetchers)}),T=!1)}async function Rj(D,z,Q,re,de,Ee,Pe,le){let Se=C.fetchers.get(D);Ao(D,Dd(le,Se?Se.data:void 0),{flushSync:Pe});let ge=new AbortController,xe=jl(t.history,Q,ge.signal);if(Ee){let We=await Iy(de,Q,xe.signal);if(We.type==="aborted")return;if(We.type==="error"){let{error:ir}=Py(Q,We);Ai(D,z,ir,{flushSync:Pe});return}else if(We.matches)de=We.matches,re=Yd(de,Q);else{Ai(D,z,Zr(404,{pathname:Q}),{flushSync:Pe});return}}I.set(D,ge);let Ze=U,mt=(await bd("loader",C,xe,[re],de,D))[re.route.id];if(ua(mt)&&(mt=await dC(mt,xe.signal,!0)||mt),I.get(D)===ge&&I.delete(D),!xe.signal.aborted){if(ve.has(D)){Ao(D,Lo(void 0));return}if(xc(mt))if(F>Ze){Ao(D,Lo(void 0));return}else{oe.add(D),await Ya(xe,mt,!1);return}if(On(mt)){Ai(D,z,mt.error);return}He(!ua(mt),"Unhandled fetcher deferred data"),Ao(D,Lo(mt.data))}}async function Ya(D,z,Q,re){let{submission:de,fetcherSubmission:Ee,replace:Pe}=re===void 0?{}:re;z.response.headers.has("X-Remix-Revalidate")&&(T=!0);let le=z.response.headers.get("Location");He(le,"Expected a Location header on the redirect Response"),le=XR(le,new URL(D.url),c);let Se=Yh(C.location,le,{_isRedirect:!0});if(r){let We=!1;if(z.response.headers.has("X-Remix-Reload-Document"))We=!0;else if(fC.test(le)){const ir=t.history.createURL(le);We=ir.origin!==e.location.origin||hy(ir.pathname,c)==null}if(We){Pe?e.location.replace(le):e.location.assign(le);return}}B=null;let ge=Pe===!0||z.response.headers.has("X-Remix-Replace")?zt.Replace:zt.Push,{formMethod:xe,formAction:Ze,formEncType:et}=C.navigation;!de&&!Ee&&xe&&Ze&&et&&(de=i4(C.navigation));let mt=de||Ee;if(pZ.has(z.response.status)&&mt&&Os(mt.formMethod))await Ci(ge,Se,{submission:At({},mt,{formAction:le}),preventScrollReset:V,enableViewTransition:Q?$:void 0});else{let We=mx(Se,de);await Ci(ge,Se,{overrideNavigation:We,fetcherSubmission:Ee,preventScrollReset:V,enableViewTransition:Q?$:void 0})}}async function bd(D,z,Q,re,de,Ee){let Pe,le={};try{Pe=await CZ(l,D,z,Q,re,de,Ee,i,s)}catch(Se){return re.forEach(ge=>{le[ge.route.id]={type:it.error,error:Se}}),le}for(let[Se,ge]of Object.entries(Pe))if(OZ(ge)){let xe=ge.result;le[Se]={type:it.redirect,response:TZ(xe,Q,Se,de,c,f.v7_relativeSplatPath)}}else le[Se]=await kZ(ge);return le}async function Bk(D,z,Q,re,de){let Ee=D.matches,Pe=bd("loader",D,de,Q,z,null),le=Promise.all(re.map(async xe=>{if(xe.matches&&xe.match&&xe.controller){let et=(await bd("loader",D,jl(t.history,xe.path,xe.controller.signal),[xe.match],xe.matches,xe.key))[xe.match.route.id];return{[xe.key]:et}}else return Promise.resolve({[xe.key]:{type:it.error,error:Zr(404,{pathname:xe.path})}})})),Se=await Pe,ge=(await le).reduce((xe,Ze)=>Object.assign(xe,Ze),{});return await Promise.all([MZ(z,Se,de.signal,Ee,D.loaderData),DZ(z,ge,re)]),{loaderResults:Se,fetcherResults:ge}}function hg(){T=!0,P.push(...yg()),ae.forEach((D,z)=>{I.has(z)&&(R.add(z),ko(z))})}function Ao(D,z,Q){Q===void 0&&(Q={}),C.fetchers.set(D,z),qe({fetchers:new Map(C.fetchers)},{flushSync:(Q&&Q.flushSync)===!0})}function Ai(D,z,Q,re){re===void 0&&(re={});let de=du(C.matches,z);ky(D),qe({errors:{[de.route.id]:Q},fetchers:new Map(C.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Fk(D){return f.v7_fetcherPersist&&(ke.set(D,(ke.get(D)||0)+1),ve.has(D)&&ve.delete(D)),C.fetchers.get(D)||yZ}function ky(D){let z=C.fetchers.get(D);I.has(D)&&!(z&&z.state==="loading"&&X.has(D))&&ko(D),ae.delete(D),X.delete(D),oe.delete(D),ve.delete(D),R.delete(D),C.fetchers.delete(D)}function Ij(D){if(f.v7_fetcherPersist){let z=(ke.get(D)||0)-1;z<=0?(ke.delete(D),ve.add(D)):ke.set(D,z)}else ky(D);qe({fetchers:new Map(C.fetchers)})}function ko(D){let z=I.get(D);He(z,"Expected fetch controller: "+D),z.abort(),I.delete(D)}function Uk(D){for(let z of D){let Q=Fk(z),re=Lo(Q.data);C.fetchers.set(z,re)}}function Vk(){let D=[],z=!1;for(let Q of oe){let re=C.fetchers.get(Q);He(re,"Expected fetcher: "+Q),re.state==="loading"&&(oe.delete(Q),D.push(Q),z=!0)}return Uk(D),z}function $k(D){let z=[];for(let[Q,re]of X)if(re0}function Oj(D,z){let Q=C.blockers.get(D)||Md;return Me.get(D)!==z&&Me.set(D,z),Q}function zk(D){C.blockers.delete(D),Me.delete(D)}function Ty(D,z){let Q=C.blockers.get(D)||Md;He(Q.state==="unblocked"&&z.state==="blocked"||Q.state==="blocked"&&z.state==="blocked"||Q.state==="blocked"&&z.state==="proceeding"||Q.state==="blocked"&&z.state==="unblocked"||Q.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+Q.state+" -> "+z.state);let re=new Map(C.blockers);re.set(D,z),qe({blockers:re})}function Hk(D){let{currentLocation:z,nextLocation:Q,historyAction:re}=D;if(Me.size===0)return;Me.size>1&&hl(!1,"A router only supports one blocker at a time");let de=Array.from(Me.entries()),[Ee,Pe]=de[de.length-1],le=C.blockers.get(Ee);if(!(le&&le.state==="proceeding")&&Pe({currentLocation:z,nextLocation:Q,historyAction:re}))return Ee}function pg(D){let z=Zr(404,{pathname:D}),Q=a||o,{matches:re,route:de}=n4(Q);return yg(),{notFoundMatches:re,route:de,error:z}}function Py(D,z){return{boundaryId:du(z.partialMatches).route.id,error:Zr(400,{type:"route-discovery",pathname:D,message:z.error!=null&&"message"in z.error?z.error:String(z.error)})}}function yg(D){let z=[];return ie.forEach((Q,re)=>{(!D||D(re))&&(Q.cancel(),z.push(re),ie.delete(re))}),z}function _j(D,z,Q){if(g=D,x=z,m=Q||null,!b&&C.navigation===vx){b=!0;let re=qk(C.location,C.matches);re!=null&&qe({restoreScrollPosition:re})}return()=>{g=null,x=null,m=null}}function Gk(D,z){return m&&m(D,z.map(re=>HX(re,C.loaderData)))||D.key}function Nj(D,z){if(g&&x){let Q=Gk(D,z);g[Q]=x()}}function qk(D,z){if(g){let Q=Gk(D,z),re=g[Q];if(typeof re=="number")return re}return null}function Ry(D,z,Q){if(u){if(y.has(Q))return{active:!1,matches:D};if(D){if(Object.keys(D[0].params).length>0)return{active:!0,matches:J1(z,Q,c,!0)}}else return{active:!0,matches:J1(z,Q,c,!0)||[]}}return{active:!1,matches:null}}async function Iy(D,z,Q){let re=D;for(;;){let de=a==null,Ee=a||o;try{await wZ(u,z,re,Ee,i,s,Be,Q)}catch(Se){return{type:"error",error:Se,partialMatches:re}}finally{de&&(o=[...o])}if(Q.aborted)return{type:"aborted"};let Pe=cc(Ee,z,c);if(Pe)return Wk(z,y),{type:"success",matches:Pe};let le=J1(Ee,z,c,!0);if(!le||re.length===le.length&&re.every((Se,ge)=>Se.route.id===le[ge].route.id))return Wk(z,y),{type:"success",matches:null};re=le}}function Wk(D,z){if(z.size>=p){let Q=z.values().next().value;z.delete(Q)}z.add(D)}function Mj(D){i={},a=Jh(D,s,void 0,i)}function Dj(D,z){let Q=a==null;H9(D,z,a||o,i,s),Q&&(o=[...o],qe({}))}return _={get basename(){return c},get future(){return f},get state(){return C},get routes(){return o},get window(){return e},initialize:De,subscribe:at,enableScrollRestoration:_j,navigate:vs,fetch:Tj,revalidate:Qa,createHref:D=>t.history.createHref(D),encodeLocation:D=>t.history.encodeLocation(D),getFetcher:Fk,deleteFetcher:Ij,dispose:ze,getBlocker:Oj,deleteBlocker:zk,patchRoutes:Dj,_internalFetchControllers:I,_internalActiveDeferreds:ie,_internalSetRoutes:Mj},_}function gZ(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function jw(t,e,r,n,s,i,o,a){let c,l;if(o){c=[];for(let f of e)if(c.push(f),f.route.id===o){l=f;break}}else c=e,l=e[e.length-1];let u=oZ(s||".",iZ(c,i),hy(t.pathname,r)||t.pathname,a==="path");return s==null&&(u.search=t.search,u.hash=t.hash),(s==null||s===""||s===".")&&l&&l.route.index&&!hC(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:el([r,u.pathname])),dy(u)}function QR(t,e,r,n){if(!n||!gZ(n))return{path:r};if(n.formMethod&&!NZ(n.formMethod))return{path:r,error:Zr(405,{method:n.formMethod})};let s=()=>({path:r,error:Zr(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=t?i.toUpperCase():i.toLowerCase(),a=G9(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Os(o))return s();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[y,g]=p;return""+h+y+"="+g+` +`},""):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(!Os(o))return s();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 s()}}}He(typeof FormData=="function","FormData is not available in this environment");let c,l;if(n.formData)c=Bw(n.formData),l=n.formData;else if(n.body instanceof FormData)c=Bw(n.body),l=n.body;else if(n.body instanceof URLSearchParams)c=n.body,l=ZR(c);else if(n.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(n.body),l=ZR(c)}catch{return s()}let u={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Os(u.formMethod))return{path:r,submission:u};let f=Si(r);return e&&f.search&&hC(f.search)&&c.append("index",""),f.search="?"+c,{path:dy(f),submission:u}}function xZ(t,e){let r=t;if(e){let n=t.findIndex(s=>s.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function YR(t,e,r,n,s,i,o,a,c,l,u,f,d,h,p,y){let g=y?On(y[1])?y[1].error:y[1].data:void 0,m=t.createURL(e.location),x=t.createURL(s),b=y&&On(y[1])?y[0]:void 0,w=b?xZ(r,b):r,A=y?y[1].statusCode:void 0,O=o&&A&&A>=400,_=w.filter((j,V)=>{let{route:B}=j;if(B.lazy)return!0;if(B.loader==null)return!1;if(i)return typeof B.loader!="function"||B.loader.hydrate?!0:e.loaderData[B.id]===void 0&&(!e.errors||e.errors[B.id]===void 0);if(bZ(e.loaderData,e.matches[V],j)||c.some(H=>H===j.route.id))return!0;let $=e.matches[V],Y=j;return JR(j,At({currentUrl:m,currentParams:$.params,nextUrl:x,nextParams:Y.params},n,{actionResult:g,actionStatus:A,defaultShouldRevalidate:O?!1:a||m.pathname+m.search===x.pathname+x.search||m.search!==x.search||z9($,Y)}))}),C=[];return f.forEach((j,V)=>{if(i||!r.some(L=>L.route.id===j.routeId)||u.has(V))return;let B=cc(h,j.path,p);if(!B){C.push({key:V,routeId:j.routeId,path:j.path,matches:null,match:null,controller:null});return}let $=e.fetchers.get(V),Y=Yd(B,j.path),H=!1;d.has(V)?H=!1:l.has(V)?(l.delete(V),H=!0):$&&$.state!=="idle"&&$.data===void 0?H=a:H=JR(Y,At({currentUrl:m,currentParams:e.matches[e.matches.length-1].params,nextUrl:x,nextParams:r[r.length-1].params},n,{actionResult:g,actionStatus:A,defaultShouldRevalidate:O?!1:a})),H&&C.push({key:V,routeId:j.routeId,path:j.path,matches:B,match:Y,controller:new AbortController})}),[_,C]}function bZ(t,e,r){let n=!e||r.route.id!==e.route.id,s=t[r.route.id]===void 0;return n||s}function z9(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function JR(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function wZ(t,e,r,n,s,i,o,a){let c=[e,...r.map(l=>l.route.id)].join("-");try{let l=o.get(c);l||(l=t({path:e,matches:r,patch:(u,f)=>{a.aborted||H9(u,f,n,s,i)}}),o.set(c,l)),l&&IZ(l)&&await l}finally{o.delete(c)}}function H9(t,e,r,n,s){if(t){var i;let o=n[t];He(o,"No route found to patch children into: routeId = "+t);let a=Jh(e,s,[t,"patch",String(((i=o.children)==null?void 0:i.length)||"0")],n);o.children?o.children.push(...a):o.children=a}else{let o=Jh(e,s,["patch",String(r.length||"0")],n);r.push(...o)}}async function EZ(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let s=r[t.id];He(s,"No route found in manifest");let i={};for(let o in n){let c=s[o]!==void 0&&o!=="hasErrorBoundary";hl(!c,'Route "'+s.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.')),!c&&!$X.has(o)&&(i[o]=n[o])}Object.assign(s,i),Object.assign(s,At({},e(s),{lazy:void 0}))}async function SZ(t){let{matches:e}=t,r=e.filter(s=>s.shouldLoad);return(await Promise.all(r.map(s=>s.resolve()))).reduce((s,i,o)=>Object.assign(s,{[r[o].route.id]:i}),{})}async function CZ(t,e,r,n,s,i,o,a,c,l){let u=i.map(h=>h.route.lazy?EZ(h.route,c,a):void 0),f=i.map((h,p)=>{let y=u[p],g=s.some(x=>x.route.id===h.route.id);return At({},h,{shouldLoad:g,resolve:async x=>(x&&n.method==="GET"&&(h.route.lazy||h.route.loader)&&(g=!0),g?AZ(e,n,h,y,x,l):Promise.resolve({type:it.data,result:void 0}))})}),d=await t({matches:f,request:n,params:i[0].params,fetcherKey:o,context:l});try{await Promise.all(u)}catch{}return d}async function AZ(t,e,r,n,s,i){let o,a,c=l=>{let u,f=new Promise((p,y)=>u=y);a=()=>u(),e.signal.addEventListener("abort",a);let d=p=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+r.route.id+"]"))):l({request:e,params:r.params,context:i},...p!==void 0?[p]:[]),h=(async()=>{try{return{type:"data",result:await(s?s(y=>d(y)):d())}}catch(p){return{type:"error",result:p}}})();return Promise.race([h,f])};try{let l=r.route[t];if(n)if(l){let u,[f]=await Promise.all([c(l).catch(d=>{u=d}),n]);if(u!==void 0)throw u;o=f}else if(await n,l=r.route[t],l)o=await c(l);else if(t==="action"){let u=new URL(e.url),f=u.pathname+u.search;throw Zr(405,{method:e.method,pathname:f,routeId:r.route.id})}else return{type:it.data,result:void 0};else if(l)o=await c(l);else{let u=new URL(e.url),f=u.pathname+u.search;throw Zr(404,{pathname:f})}He(o.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(l){return{type:it.error,result:l}}finally{a&&e.signal.removeEventListener("abort",a)}return o}async function kZ(t){let{result:e,type:r}=t;if(q9(e)){let l;try{let u=e.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?e.body==null?l=null:l=await e.json():l=await e.text()}catch(u){return{type:it.error,error:u}}return r===it.error?{type:it.error,error:new s0(e.status,e.statusText,l),statusCode:e.status,headers:e.headers}:{type:it.data,data:l,statusCode:e.status,headers:e.headers}}if(r===it.error){if(s4(e)){var n;if(e.data instanceof Error){var s;return{type:it.error,error:e.data,statusCode:(s=e.init)==null?void 0:s.status}}e=new s0(((n=e.init)==null?void 0:n.status)||500,void 0,e.data)}return{type:it.error,error:e,statusCode:Dm(e)?e.status:void 0}}if(_Z(e)){var i,o;return{type:it.deferred,deferredData:e,statusCode:(i=e.init)==null?void 0:i.status,headers:((o=e.init)==null?void 0:o.headers)&&new Headers(e.init.headers)}}if(s4(e)){var a,c;return{type:it.data,data:e.data,statusCode:(a=e.init)==null?void 0:a.status,headers:(c=e.init)!=null&&c.headers?new Headers(e.init.headers):void 0}}return{type:it.data,data:e}}function TZ(t,e,r,n,s,i){let o=t.headers.get("Location");if(He(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!fC.test(o)){let a=n.slice(0,n.findIndex(c=>c.route.id===r)+1);o=jw(new URL(e.url),a,s,!0,o,i),t.headers.set("Location",o)}return t}function XR(t,e,r){if(fC.test(t)){let n=t,s=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=hy(s.pathname,r)!=null;if(s.origin===e.origin&&i)return s.pathname+s.search+s.hash}return t}function jl(t,e,r,n){let s=t.createURL(G9(e)).toString(),i={signal:r};if(n&&Os(n.formMethod)){let{formMethod:o,formEncType:a}=n;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(n.json)):a==="text/plain"?i.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?i.body=Bw(n.formData):i.body=n.formData}return new Request(s,i)}function Bw(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function ZR(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function PZ(t,e,r,n,s){let i={},o=null,a,c=!1,l={},u=r&&On(r[1])?r[1].error:void 0;return t.forEach(f=>{if(!(f.route.id in e))return;let d=f.route.id,h=e[d];if(He(!xc(h),"Cannot handle redirect results in processLoaderData"),On(h)){let p=h.error;if(u!==void 0&&(p=u,u=void 0),o=o||{},s)o[d]=p;else{let y=du(t,d);o[y.route.id]==null&&(o[y.route.id]=p)}i[d]=void 0,c||(c=!0,a=Dm(h.error)?h.error.status:500),h.headers&&(l[d]=h.headers)}else ua(h)?(n.set(d,h.deferredData),i[d]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!c&&(a=h.statusCode),h.headers&&(l[d]=h.headers)):(i[d]=h.data,h.statusCode&&h.statusCode!==200&&!c&&(a=h.statusCode),h.headers&&(l[d]=h.headers))}),u!==void 0&&r&&(o={[r[0]]:u},i[r[0]]=void 0),{loaderData:i,errors:o,statusCode:a||200,loaderHeaders:l}}function e4(t,e,r,n,s,i,o,a){let{loaderData:c,errors:l}=PZ(e,n,s,a,!1);return i.forEach(u=>{let{key:f,match:d,controller:h}=u,p=o[f];if(He(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(On(p)){let y=du(t.matches,d==null?void 0:d.route.id);l&&l[y.route.id]||(l=At({},l,{[y.route.id]:p.error})),t.fetchers.delete(f)}else if(xc(p))He(!1,"Unhandled fetcher revalidation redirect");else if(ua(p))He(!1,"Unhandled fetcher deferred data");else{let y=Lo(p.data);t.fetchers.set(f,y)}}),{loaderData:c,errors:l}}function t4(t,e,r,n){let s=At({},e);for(let i of r){let o=i.route.id;if(e.hasOwnProperty(o)?e[o]!==void 0&&(s[o]=e[o]):t[o]!==void 0&&i.route.loader&&(s[o]=t[o]),n&&n.hasOwnProperty(o))break}return s}function r4(t){return t?On(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function du(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function n4(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 Zr(t,e){let{pathname:r,routeId:n,method:s,type:i,message:o}=e===void 0?{}:e,a="Unknown Server Error",c="Unknown @remix-run/router error";return t===400?(a="Bad Request",i==="route-discovery"?c='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error: +`+o):s&&r&&n?c="You made a "+s+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?c="defer() is not supported in actions":i==="invalid-body"&&(c="Unable to encode submission body")):t===403?(a="Forbidden",c='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",c='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",s&&r&&n?c="You made a "+s.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new s0(t||500,a,new Error(c),!0)}function l1(t){let e=Object.entries(t);for(let r=e.length-1;r>=0;r--){let[n,s]=e[r];if(xc(s))return{key:n,result:s}}}function G9(t){let e=typeof t=="string"?Si(t):t;return dy(At({},e,{hash:""}))}function RZ(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function IZ(t){return typeof t=="object"&&t!=null&&"then"in t}function OZ(t){return q9(t.result)&&hZ.has(t.result.status)}function ua(t){return t.type===it.deferred}function On(t){return t.type===it.error}function xc(t){return(t&&t.type)===it.redirect}function s4(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function _Z(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 q9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function NZ(t){return dZ.has(t.toLowerCase())}function Os(t){return uZ.has(t.toLowerCase())}async function MZ(t,e,r,n,s){let i=Object.entries(e);for(let o=0;o(d==null?void 0:d.route.id)===a);if(!l)continue;let u=n.find(d=>d.route.id===l.route.id),f=u!=null&&!z9(u,l)&&(s&&s[l.route.id])!==void 0;ua(c)&&f&&await dC(c,r,!1).then(d=>{d&&(e[a]=d)})}}async function DZ(t,e,r){for(let n=0;n(l==null?void 0:l.route.id)===i)&&ua(a)&&(He(o,"Expected an AbortController for revalidating fetcher deferred result"),await dC(a,o.signal,!0).then(l=>{l&&(e[s]=l)}))}}async function dC(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:it.data,data:t.deferredData.unwrappedData}}catch(s){return{type:it.error,error:s}}return{type:it.data,data:t.deferredData.data}}}function hC(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Yd(t,e){let r=typeof e=="string"?Si(e).search:e.search;if(t[t.length-1].route.index&&hC(r||""))return t[t.length-1];let n=U9(t);return n[n.length-1]}function i4(t){let{formMethod:e,formAction:r,formEncType:n,text:s,formData:i,json:o}=t;if(!(!e||!r||!n)){if(s!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:i,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 mx(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 LZ(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 Dd(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 jZ(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 Lo(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 BZ(t,e){try{let r=t.sessionStorage.getItem($9);if(r){let n=JSON.parse(r);for(let[s,i]of Object.entries(n||{}))i&&Array.isArray(i)&&e.set(s,new Set(i||[]))}}catch{}}function FZ(t,e){if(e.size>0){let r={};for(let[n,s]of e)r[n]=[...s];try{t.sessionStorage.setItem($9,JSON.stringify(r))}catch(n){hl(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** * React Router v6.26.2 * * Copyright (c) Remix Software Inc. @@ -127,7 +127,7 @@ Defaulting to \`null\`.`}var eC="Radio",[gY,ON]=Wr(eC),[xY,bY]=gY(eC),_N=v.forwa * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function i0(){return i0=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},g,{params:Object.assign({},a,g.params),pathname:el([c,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?c:el([c,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,r,n);return e&&y?v.createElement(Lm.Provider,{value:{location:i0({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:zt.Pop}},y):y}function VZ(){let t=QZ(),e=Dm(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},e),r?v.createElement("pre",{style:s},r):null,i)}const $Z=v.createElement(VZ,null);class zZ extends v.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?v.createElement(jm.Provider,{value:this.props.routeContext},v.createElement(Y9.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function HZ(t){let{routeContext:e,match:r,children:n}=t,s=v.useContext(W9);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(jm.Provider,{value:e},n)}function GZ(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if(!r)return null;if(r.errors)t=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(s=r)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||He(!1),o=o.slice(0,Math.min(o.length,u+1))}let c=!1,l=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((u,f,d)=>{let h,p=!1,y=null,g=null;r&&(h=a&&f.route.id?a[f.route.id]:void 0,y=f.route.errorElement||$Z,c&&(l<0&&d===0?(YZ("route-fallback",!1),p=!0,g=null):l===d&&(p=!0,g=f.route.hydrateFallbackElement||null)));let m=e.concat(o.slice(0,d+1)),x=()=>{let b;return h?b=y:p?b=g:f.route.Component?b=v.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=u,v.createElement(HZ,{match:f,routeContext:{outlet:u,matches:m,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?v.createElement(zZ,{location:r.location,revalidation:r.revalidation,component:y,error:h,children:x(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):x()},null)}var Fw=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}(Fw||{});function qZ(t){let e=v.useContext(K9);return e||He(!1),e}function WZ(t){let e=v.useContext(jm);return e||He(!1),e}function KZ(t){let e=WZ(),r=e.matches[e.matches.length-1];return r.route.id||He(!1),r.route.id}function QZ(){var t;let e=v.useContext(Y9),r=qZ(Fw.UseRouteError),n=KZ(Fw.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}const o4={};function YZ(t,e,r){!e&&!o4[t]&&(o4[t]=!0)}function JZ(t){let{basename:e="/",children:r=null,location:n,navigationType:s=zt.Pop,navigator:i,static:o=!1,future:a}=t;pC()&&He(!1);let c=e.replace(/^\/*/,"/"),l=v.useMemo(()=>({basename:c,navigator:i,static:o,future:i0({v7_relativeSplatPath:!1},a)}),[c,a,i,o]);typeof n=="string"&&(n=Si(n));let{pathname:u="/",search:f="",hash:d="",state:h=null,key:p="default"}=n,y=v.useMemo(()=>{let g=hy(u,c);return g==null?null:{location:{pathname:g,search:f,hash:d,state:h,key:p},navigationType:s}},[c,u,f,d,h,p,s]);return y==null?null:v.createElement(Q9.Provider,{value:l},v.createElement(Lm.Provider,{children:r,value:y}))}new Promise(()=>{});function XZ(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:v.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:v.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:v.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + */function i0(){return i0=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},g,{params:Object.assign({},a,g.params),pathname:el([c,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?c:el([c,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,r,n);return e&&y?v.createElement(Lm.Provider,{value:{location:i0({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:zt.Pop}},y):y}function $Z(){let t=YZ(),e=Dm(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},e),r?v.createElement("pre",{style:s},r):null,i)}const zZ=v.createElement($Z,null);class HZ extends v.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?v.createElement(jm.Provider,{value:this.props.routeContext},v.createElement(Y9.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function GZ(t){let{routeContext:e,match:r,children:n}=t,s=v.useContext(W9);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(jm.Provider,{value:e},n)}function qZ(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if(!r)return null;if(r.errors)t=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(s=r)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||He(!1),o=o.slice(0,Math.min(o.length,u+1))}let c=!1,l=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((u,f,d)=>{let h,p=!1,y=null,g=null;r&&(h=a&&f.route.id?a[f.route.id]:void 0,y=f.route.errorElement||zZ,c&&(l<0&&d===0?(JZ("route-fallback",!1),p=!0,g=null):l===d&&(p=!0,g=f.route.hydrateFallbackElement||null)));let m=e.concat(o.slice(0,d+1)),x=()=>{let b;return h?b=y:p?b=g:f.route.Component?b=v.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=u,v.createElement(GZ,{match:f,routeContext:{outlet:u,matches:m,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?v.createElement(HZ,{location:r.location,revalidation:r.revalidation,component:y,error:h,children:x(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):x()},null)}var Fw=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}(Fw||{});function WZ(t){let e=v.useContext(K9);return e||He(!1),e}function KZ(t){let e=v.useContext(jm);return e||He(!1),e}function QZ(t){let e=KZ(),r=e.matches[e.matches.length-1];return r.route.id||He(!1),r.route.id}function YZ(){var t;let e=v.useContext(Y9),r=WZ(Fw.UseRouteError),n=QZ(Fw.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}const o4={};function JZ(t,e,r){!e&&!o4[t]&&(o4[t]=!0)}function XZ(t){let{basename:e="/",children:r=null,location:n,navigationType:s=zt.Pop,navigator:i,static:o=!1,future:a}=t;pC()&&He(!1);let c=e.replace(/^\/*/,"/"),l=v.useMemo(()=>({basename:c,navigator:i,static:o,future:i0({v7_relativeSplatPath:!1},a)}),[c,a,i,o]);typeof n=="string"&&(n=Si(n));let{pathname:u="/",search:f="",hash:d="",state:h=null,key:p="default"}=n,y=v.useMemo(()=>{let g=hy(u,c);return g==null?null:{location:{pathname:g,search:f,hash:d,state:h,key:p},navigationType:s}},[c,u,f,d,h,p,s]);return y==null?null:v.createElement(Q9.Provider,{value:l},v.createElement(Lm.Provider,{children:r,value:y}))}new Promise(()=>{});function ZZ(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:v.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:v.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:v.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** * React Router DOM v6.26.2 * * Copyright (c) Remix Software Inc. @@ -136,7 +136,7 @@ Defaulting to \`null\`.`}var eC="Radio",[gY,ON]=Wr(eC),[xY,bY]=gY(eC),_N=v.forwa * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function o0(){return o0=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 lee(t){let{fallbackElement:e,router:r,future:n}=t,[s,i]=v.useState(r.state),[o,a]=v.useState(),[c,l]=v.useState({isTransitioning:!1}),[u,f]=v.useState(),[d,h]=v.useState(),[p,y]=v.useState(),g=v.useRef(new Map),{v7_startTransition:m}=n||{},x=v.useCallback(C=>{m?aee(C):C()},[m]),b=v.useCallback((C,j)=>{let{deletedFetchers:V,unstable_flushSync:B,unstable_viewTransitionOpts:z}=j;V.forEach(H=>g.current.delete(H)),C.fetchers.forEach((H,L)=>{H.data!==void 0&&g.current.set(L,H.data)});let Y=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!z||Y){B?Ld(()=>i(C)):x(()=>i(C));return}if(B){Ld(()=>{d&&(u&&u.resolve(),d.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:z.currentLocation,nextLocation:z.nextLocation})});let H=r.window.document.startViewTransition(()=>{Ld(()=>i(C))});H.finished.finally(()=>{Ld(()=>{f(void 0),h(void 0),a(void 0),l({isTransitioning:!1})})}),Ld(()=>h(H));return}d?(u&&u.resolve(),d.skipTransition(),y({state:C,currentLocation:z.currentLocation,nextLocation:z.nextLocation})):(a(C),l({isTransitioning:!0,flushSync:!1,currentLocation:z.currentLocation,nextLocation:z.nextLocation}))},[r.window,d,u,g,x]);v.useLayoutEffect(()=>r.subscribe(b),[r,b]),v.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new cee)},[c]),v.useEffect(()=>{if(u&&o&&r.window){let C=o,j=u.promise,V=r.window.document.startViewTransition(async()=>{x(()=>i(C)),await j});V.finished.finally(()=>{f(void 0),h(void 0),a(void 0),l({isTransitioning:!1})}),h(V)}},[x,o,u,r.window]),v.useEffect(()=>{u&&o&&s.location.key===o.location.key&&u.resolve()},[u,d,s.location,o]),v.useEffect(()=>{!c.isTransitioning&&p&&(a(p.state),l({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),y(void 0))},[c.isTransitioning,p]),v.useEffect(()=>{},[]);let w=v.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:C=>r.navigate(C),push:(C,j,V)=>r.navigate(C,{state:j,preventScrollReset:V==null?void 0:V.preventScrollReset}),replace:(C,j,V)=>r.navigate(C,{replace:!0,state:j,preventScrollReset:V==null?void 0:V.preventScrollReset})}),[r]),A=r.basename||"/",O=v.useMemo(()=>({router:r,navigator:w,static:!1,basename:A}),[r,w,A]),_=v.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return v.createElement(v.Fragment,null,v.createElement(W9.Provider,{value:O},v.createElement(K9.Provider,{value:s},v.createElement(see.Provider,{value:g.current},v.createElement(nee.Provider,{value:c},v.createElement(JZ,{basename:A,location:s.location,navigationType:s.historyAction,navigator:w,future:_},s.initialized||r.future.v7_partialHydration?v.createElement(uee,{routes:r.routes,future:r.future,state:s}):e))))),null)}const uee=v.memo(fee);function fee(t){let{routes:e,future:r,state:n}=t;return UZ(e,void 0,n,r)}var l4;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(l4||(l4={}));var u4;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(u4||(u4={}));function dee(t={}){const{nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}=t,[s,i]=v.useState(!1),o=v.useRef(r);o.current=r;const a=v.useRef(n);return a.current=n,v.useEffect(()=>{const c=document.createElement("script");return c.src="https://accounts.google.com/gsi/client",c.async=!0,c.defer=!0,c.nonce=e,c.onload=()=>{var l;i(!0),(l=o.current)===null||l===void 0||l.call(o)},c.onerror=()=>{var l;i(!1),(l=a.current)===null||l===void 0||l.call(a)},document.body.appendChild(c),()=>{document.body.removeChild(c)}},[e]),s}const J9=v.createContext(null);function hee({clientId:t,nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n,children:s}){const i=dee({nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}),o=v.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:i}),[t,i]);return cr.createElement(J9.Provider,{value:o},s)}function X9(){const t=v.useContext(J9);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}function pee(t){var e;return(e=t==null?void 0:t.clientId)!==null&&e!==void 0?e:t==null?void 0:t.client_id}const yee={large:40,medium:32,small:20};function Z9({onSuccess:t,onError:e,useOneTap:r,promptMomentNotification:n,type:s="standard",theme:i="outline",size:o="large",text:a,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d,containerProps:h,...p}){const y=v.useRef(null),{clientId:g,scriptLoadedSuccessfully:m}=X9(),x=v.useRef(t);x.current=t;const b=v.useRef(e);b.current=e;const w=v.useRef(n);return w.current=n,v.useEffect(()=>{var A,O,_,C,j,V,B,z,Y;if(m)return(_=(O=(A=window==null?void 0:window.google)===null||A===void 0?void 0:A.accounts)===null||O===void 0?void 0:O.id)===null||_===void 0||_.initialize({client_id:g,callback:H=>{var L;if(!(H!=null&&H.credential))return(L=b.current)===null||L===void 0?void 0:L.call(b);const{credential:T,select_by:P}=H;x.current({credential:T,clientId:pee(H),select_by:P})},...p}),(V=(j=(C=window==null?void 0:window.google)===null||C===void 0?void 0:C.accounts)===null||j===void 0?void 0:j.id)===null||V===void 0||V.renderButton(y.current,{type:s,theme:i,size:o,text:a,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d}),r&&((Y=(z=(B=window==null?void 0:window.google)===null||B===void 0?void 0:B.accounts)===null||z===void 0?void 0:z.id)===null||Y===void 0||Y.prompt(w.current)),()=>{var H,L,T;r&&((T=(L=(H=window==null?void 0:window.google)===null||H===void 0?void 0:H.accounts)===null||L===void 0?void 0:L.id)===null||T===void 0||T.cancel())}},[g,m,r,s,i,o,a,c,l,u,f]),cr.createElement("div",{...h,ref:y,style:{height:yee[o],...h==null?void 0:h.style}})}function vee(){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 e7({flow:t="implicit",scope:e="",onSuccess:r,onError:n,onNonOAuthError:s,overrideScope:i,state:o,...a}){const{clientId:c,scriptLoadedSuccessfully:l}=X9(),u=v.useRef(),f=v.useRef(r);f.current=r;const d=v.useRef(n);d.current=n;const h=v.useRef(s);h.current=s,v.useEffect(()=>{var g;if(!l)return;const m=t==="implicit"?"initTokenClient":"initCodeClient",x=(g=window==null?void 0:window.google)===null||g===void 0?void 0:g.accounts.oauth2[m]({client_id:c,scope:i?e:`openid profile email ${e}`,callback:b=>{var w,A;if(b.error)return(w=d.current)===null||w===void 0?void 0:w.call(d,b);(A=f.current)===null||A===void 0||A.call(f,b)},error_callback:b=>{var w;(w=h.current)===null||w===void 0||w.call(h,b)},state:o,...a});u.current=x},[c,l,t,e,o]);const p=v.useCallback(g=>{var m;return(m=u.current)===null||m===void 0?void 0:m.requestAccessToken(g)},[]),y=v.useCallback(()=>{var g;return(g=u.current)===null||g===void 0?void 0:g.requestCode()},[]);return t==="implicit"?p:y}var t7={},Bm={},py={};Object.defineProperty(py,"__esModule",{value:!0});py.default=void 0;var mee=v;function gee(t){(0,mee.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 xee=gee;py.default=xee;var yy={},Fm={};Object.defineProperty(Fm,"__esModule",{value:!0});Fm.default=void 0;var bee=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{pollFrequency:1e3,retries:100,parent:window},n=r.pollFrequency,s=n===void 0?1e3:n,i=r.retries,o=i===void 0?100:i,a=r.parent,c=a===void 0?window:a;if(c&&c.hasOwnProperty(e))return Promise.resolve(c[e]);if(!o)return Promise.resolve(void 0);var l=o-1;return new Promise(function(u){return setTimeout(u,typeof s=="function"?s({retries:l}):s)}).then(function(){return t(e,{pollFrequency:s,parent:c,retries:l})})},wee=bee;Fm.default=wee;Object.defineProperty(yy,"__esModule",{value:!0});yy.default=void 0;var Eee=See(Fm);function See(t){return t&&t.__esModule?t:{default:t}}var Cee="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",Aee=function(e){var r=e.authOptions,n=e.onSuccess,s=e.onError;return(0,Eee.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(i){return n&&n(i),i}).catch(function(i){return s?s(i):console.error(i),null})}).catch(function(i){return s?s(i):console.error(i),null})},kee={APPLE_SCRIPT_SRC:Cee,signIn:Aee};yy.default=kee;Object.defineProperty(Bm,"__esModule",{value:!0});Bm.default=void 0;var Gs=yC(v),Tee=yC(py),f4=yC(yy),Pee=["onSuccess","onError","skipScript","authOptions","iconProps","render","uiType","className","noDefaultStyle","buttonExtraChildren"];function yC(t){return t&&t.__esModule?t:{default:t}}function a0(){return a0=Object.assign||function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function _ee(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i=0)&&(r[s]=t[s]);return r}var Nee=` + */function o0(){return o0=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 uee(t){let{fallbackElement:e,router:r,future:n}=t,[s,i]=v.useState(r.state),[o,a]=v.useState(),[c,l]=v.useState({isTransitioning:!1}),[u,f]=v.useState(),[d,h]=v.useState(),[p,y]=v.useState(),g=v.useRef(new Map),{v7_startTransition:m}=n||{},x=v.useCallback(C=>{m?cee(C):C()},[m]),b=v.useCallback((C,j)=>{let{deletedFetchers:V,unstable_flushSync:B,unstable_viewTransitionOpts:$}=j;V.forEach(H=>g.current.delete(H)),C.fetchers.forEach((H,L)=>{H.data!==void 0&&g.current.set(L,H.data)});let Y=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!$||Y){B?Ld(()=>i(C)):x(()=>i(C));return}if(B){Ld(()=>{d&&(u&&u.resolve(),d.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:$.currentLocation,nextLocation:$.nextLocation})});let H=r.window.document.startViewTransition(()=>{Ld(()=>i(C))});H.finished.finally(()=>{Ld(()=>{f(void 0),h(void 0),a(void 0),l({isTransitioning:!1})})}),Ld(()=>h(H));return}d?(u&&u.resolve(),d.skipTransition(),y({state:C,currentLocation:$.currentLocation,nextLocation:$.nextLocation})):(a(C),l({isTransitioning:!0,flushSync:!1,currentLocation:$.currentLocation,nextLocation:$.nextLocation}))},[r.window,d,u,g,x]);v.useLayoutEffect(()=>r.subscribe(b),[r,b]),v.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new lee)},[c]),v.useEffect(()=>{if(u&&o&&r.window){let C=o,j=u.promise,V=r.window.document.startViewTransition(async()=>{x(()=>i(C)),await j});V.finished.finally(()=>{f(void 0),h(void 0),a(void 0),l({isTransitioning:!1})}),h(V)}},[x,o,u,r.window]),v.useEffect(()=>{u&&o&&s.location.key===o.location.key&&u.resolve()},[u,d,s.location,o]),v.useEffect(()=>{!c.isTransitioning&&p&&(a(p.state),l({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),y(void 0))},[c.isTransitioning,p]),v.useEffect(()=>{},[]);let w=v.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:C=>r.navigate(C),push:(C,j,V)=>r.navigate(C,{state:j,preventScrollReset:V==null?void 0:V.preventScrollReset}),replace:(C,j,V)=>r.navigate(C,{replace:!0,state:j,preventScrollReset:V==null?void 0:V.preventScrollReset})}),[r]),A=r.basename||"/",O=v.useMemo(()=>({router:r,navigator:w,static:!1,basename:A}),[r,w,A]),_=v.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return v.createElement(v.Fragment,null,v.createElement(W9.Provider,{value:O},v.createElement(K9.Provider,{value:s},v.createElement(iee.Provider,{value:g.current},v.createElement(see.Provider,{value:c},v.createElement(XZ,{basename:A,location:s.location,navigationType:s.historyAction,navigator:w,future:_},s.initialized||r.future.v7_partialHydration?v.createElement(fee,{routes:r.routes,future:r.future,state:s}):e))))),null)}const fee=v.memo(dee);function dee(t){let{routes:e,future:r,state:n}=t;return VZ(e,void 0,n,r)}var l4;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(l4||(l4={}));var u4;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(u4||(u4={}));function hee(t={}){const{nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}=t,[s,i]=v.useState(!1),o=v.useRef(r);o.current=r;const a=v.useRef(n);return a.current=n,v.useEffect(()=>{const c=document.createElement("script");return c.src="https://accounts.google.com/gsi/client",c.async=!0,c.defer=!0,c.nonce=e,c.onload=()=>{var l;i(!0),(l=o.current)===null||l===void 0||l.call(o)},c.onerror=()=>{var l;i(!1),(l=a.current)===null||l===void 0||l.call(a)},document.body.appendChild(c),()=>{document.body.removeChild(c)}},[e]),s}const J9=v.createContext(null);function pee({clientId:t,nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n,children:s}){const i=hee({nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}),o=v.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:i}),[t,i]);return cr.createElement(J9.Provider,{value:o},s)}function X9(){const t=v.useContext(J9);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}function yee(t){var e;return(e=t==null?void 0:t.clientId)!==null&&e!==void 0?e:t==null?void 0:t.client_id}const vee={large:40,medium:32,small:20};function Z9({onSuccess:t,onError:e,useOneTap:r,promptMomentNotification:n,type:s="standard",theme:i="outline",size:o="large",text:a,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d,containerProps:h,...p}){const y=v.useRef(null),{clientId:g,scriptLoadedSuccessfully:m}=X9(),x=v.useRef(t);x.current=t;const b=v.useRef(e);b.current=e;const w=v.useRef(n);return w.current=n,v.useEffect(()=>{var A,O,_,C,j,V,B,$,Y;if(m)return(_=(O=(A=window==null?void 0:window.google)===null||A===void 0?void 0:A.accounts)===null||O===void 0?void 0:O.id)===null||_===void 0||_.initialize({client_id:g,callback:H=>{var L;if(!(H!=null&&H.credential))return(L=b.current)===null||L===void 0?void 0:L.call(b);const{credential:T,select_by:P}=H;x.current({credential:T,clientId:yee(H),select_by:P})},...p}),(V=(j=(C=window==null?void 0:window.google)===null||C===void 0?void 0:C.accounts)===null||j===void 0?void 0:j.id)===null||V===void 0||V.renderButton(y.current,{type:s,theme:i,size:o,text:a,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d}),r&&((Y=($=(B=window==null?void 0:window.google)===null||B===void 0?void 0:B.accounts)===null||$===void 0?void 0:$.id)===null||Y===void 0||Y.prompt(w.current)),()=>{var H,L,T;r&&((T=(L=(H=window==null?void 0:window.google)===null||H===void 0?void 0:H.accounts)===null||L===void 0?void 0:L.id)===null||T===void 0||T.cancel())}},[g,m,r,s,i,o,a,c,l,u,f]),cr.createElement("div",{...h,ref:y,style:{height:vee[o],...h==null?void 0:h.style}})}function mee(){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 e7({flow:t="implicit",scope:e="",onSuccess:r,onError:n,onNonOAuthError:s,overrideScope:i,state:o,...a}){const{clientId:c,scriptLoadedSuccessfully:l}=X9(),u=v.useRef(),f=v.useRef(r);f.current=r;const d=v.useRef(n);d.current=n;const h=v.useRef(s);h.current=s,v.useEffect(()=>{var g;if(!l)return;const m=t==="implicit"?"initTokenClient":"initCodeClient",x=(g=window==null?void 0:window.google)===null||g===void 0?void 0:g.accounts.oauth2[m]({client_id:c,scope:i?e:`openid profile email ${e}`,callback:b=>{var w,A;if(b.error)return(w=d.current)===null||w===void 0?void 0:w.call(d,b);(A=f.current)===null||A===void 0||A.call(f,b)},error_callback:b=>{var w;(w=h.current)===null||w===void 0||w.call(h,b)},state:o,...a});u.current=x},[c,l,t,e,o]);const p=v.useCallback(g=>{var m;return(m=u.current)===null||m===void 0?void 0:m.requestAccessToken(g)},[]),y=v.useCallback(()=>{var g;return(g=u.current)===null||g===void 0?void 0:g.requestCode()},[]);return t==="implicit"?p:y}var t7={},Bm={},py={};Object.defineProperty(py,"__esModule",{value:!0});py.default=void 0;var gee=v;function xee(t){(0,gee.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 bee=xee;py.default=bee;var yy={},Fm={};Object.defineProperty(Fm,"__esModule",{value:!0});Fm.default=void 0;var wee=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{pollFrequency:1e3,retries:100,parent:window},n=r.pollFrequency,s=n===void 0?1e3:n,i=r.retries,o=i===void 0?100:i,a=r.parent,c=a===void 0?window:a;if(c&&c.hasOwnProperty(e))return Promise.resolve(c[e]);if(!o)return Promise.resolve(void 0);var l=o-1;return new Promise(function(u){return setTimeout(u,typeof s=="function"?s({retries:l}):s)}).then(function(){return t(e,{pollFrequency:s,parent:c,retries:l})})},Eee=wee;Fm.default=Eee;Object.defineProperty(yy,"__esModule",{value:!0});yy.default=void 0;var See=Cee(Fm);function Cee(t){return t&&t.__esModule?t:{default:t}}var Aee="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",kee=function(e){var r=e.authOptions,n=e.onSuccess,s=e.onError;return(0,See.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(i){return n&&n(i),i}).catch(function(i){return s?s(i):console.error(i),null})}).catch(function(i){return s?s(i):console.error(i),null})},Tee={APPLE_SCRIPT_SRC:Aee,signIn:kee};yy.default=Tee;Object.defineProperty(Bm,"__esModule",{value:!0});Bm.default=void 0;var Gs=yC(v),Pee=yC(py),f4=yC(yy),Ree=["onSuccess","onError","skipScript","authOptions","iconProps","render","uiType","className","noDefaultStyle","buttonExtraChildren"];function yC(t){return t&&t.__esModule?t:{default:t}}function a0(){return a0=Object.assign||function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Nee(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i=0)&&(r[s]=t[s]);return r}var Mee=` .react-apple-signin-auth-btn { background-color: transparent; border: none; @@ -162,15 +162,15 @@ Defaulting to \`null\`.`}var eC="Radio",[gY,ON]=Wr(eC),[xY,bY]=gY(eC),_N=v.forwa background-color: #000; color: #FFF; border-color: #FFF; -}`.replace(/ {2}|\n/g,""),Mee=function(e){var r=e.onSuccess,n=e.onError,s=e.skipScript,i=s===void 0?!1:s,o=e.authOptions,a=e.iconProps,c=e.render,l=e.uiType,u=l===void 0?"dark":l,f=e.className,d=e.noDefaultStyle,h=d===void 0?!1:d,p=e.buttonExtraChildren,y=p===void 0?"Continue with Apple":p,g=Oee(e,Pee);(0,Tee.default)(i?null:f4.default.APPLE_SCRIPT_SRC);var m=function(w){w&&(w.preventDefault(),w.stopPropagation()),f4.default.signIn({authOptions:o,onSuccess:r,onError:n})},x=Ree({children:Gs.default.createElement(Gs.default.Fragment,null,Gs.default.createElement("svg",a0({width:"24px",height:"44px",viewBox:"0 0 24 44"},a),Gs.default.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},Gs.default.createElement("rect",{fill:u==="light"?"#FFF":"#000",x:"0",y:"0",width:"24",height:"44"}),Gs.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:u==="light"?"#000":"#FFF",fillRule:"nonzero"}))),y),onClick:m},g);return c?c(x):Gs.default.createElement(Gs.default.Fragment,null,Gs.default.createElement("button",a0({className:"".concat(h?"":"react-apple-signin-auth-btn react-apple-signin-auth-btn-".concat(u)).concat(f?" ".concat(f):""),type:"button","aria-label":"Signin with apple ID"},x)),h?null:Gs.default.createElement("style",null,Nee))},Dee=Mee;Bm.default=Dee;(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=s(Bm),r=s(yy),n=s(py);function s(o){return o&&o.__esModule?o:{default:o}}var i=e.default;t.default=i})(t7);const r7=X2(t7);var Lee="_1csw4y80 _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8";const n7=t=>{const{value:e,digits:r=6,onChange:n,disabled:s=!1}=t,i=v.useMemo(()=>h4(0,r).map(()=>v.createRef()),[]);v.useEffect(()=>{var l,u;(u=(l=i[0])==null?void 0:l.current)==null||u.focus()},[]);const o=(l,u)=>{var d,h;/^\d$/.test(u)||(u="");const f=[...e];f[l]=u,u!==""&&((h=(d=i[l+1])==null?void 0:d.current)==null||h.focus()),n(f)},a=(l,u)=>{var p,y;const f=i[l].current,d=(p=i[l-1])==null?void 0:p.current,h=(y=i[l+1])==null?void 0:y.current;switch(u.key){case"Backspace":u.preventDefault(),f&&(f.value="",o(l,"")),d==null||d.focus();break;case"ArrowLeft":u.preventDefault(),d==null||d.focus();break;case"ArrowRight":u.preventDefault(),h==null||h.focus();break;default:(f==null?void 0:f.value)===u.key&&(u.preventDefault(),o(l,u.key))}},c=(l,u)=>{var h,p;const d=u.clipboardData.getData("text/plain").replace(/\D/g,"");/^\d{6}$/.test(d)&&((p=(h=i[0])==null?void 0:h.current)==null||p.focus(),n(d.split("")),setTimeout(()=>{var y,g;(g=(y=i[i.length-1])==null?void 0:y.current)==null||g.focus()}))};return k.jsx(q,{gap:"2",children:h4(0,r).map(l=>k.jsxs(v.Fragment,{children:[l===r/2&&k.jsx("span",{}),k.jsx(q,{as:"input",className:Lee,value:e[l]||"",ref:i[l],type:"text",inputMode:"numeric",maxLength:1,disabled:s,onFocus:u=>u.target.select(),onPaste:u=>c(l,u),onChange:u=>o(l,u.target.value),onKeyDown:u=>{a(l,u)}})]},l))})},h4=(t,e)=>Array.from({length:e-t},(r,n)=>n+t),s7=()=>k.jsxs(q,{gap:"2",flexDirection:"column",borderStyle:"solid",width:"1/3",padding:"4",borderWidth:"thin",borderColor:"borderNormal",borderRadius:"sm",children:[k.jsx(ue,{variant:"xlarge",fontWeight:"bold",color:"gnosisLight",children:"Demo App"}),k.jsx(ue,{variant:"normal",marginLeft:"auto",color:"polygonLight",children:"Showcasing WaaS"})]}),i7="6.13.2";function jee(t,e,r){const n=e.split("|").map(i=>i.trim());for(let i=0;iPromise.resolve(t[n])))).reduce((n,s,i)=>(n[e[i]]=s,n),{})}function me(t,e,r){for(let n in e){let s=e[n];const i=r?r[n]:null;i&&jee(s,i,n),Object.defineProperty(t,n,{enumerable:!0,value:s,writable:!1})}}function hu(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(hu).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return hu(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${hu(r)}: ${hu(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Vr(t,e){return t&&t.code===e}function vC(t){return Vr(t,"CALL_EXCEPTION")}function Lt(t,e,r){let n=t;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${hu(r)}`);for(const o in r){if(o==="shortMessage")continue;const a=r[o];i.push(o+"="+hu(a))}}i.push(`code=${e}`),i.push(`version=${i7}`),i.length&&(t+=" ("+i.join(", ")+")")}let s;switch(e){case"INVALID_ARGUMENT":s=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(t);break;default:s=new Error(t)}return me(s,{code:e}),r&&Object.assign(s,r),s.shortMessage==null&&me(s,{shortMessage:n}),s}function J(t,e,r,n){if(!t)throw Lt(e,r,n)}function M(t,e,r,n){J(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function o7(t,e,r){r==null&&(r=""),r&&(r=": "+r),J(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),J(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const Bee=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"){const r=String.fromCharCode(233).normalize("NFD"),n=String.fromCharCode(101,769);if(r!==n)throw new Error("broken")}t.push(e)}catch{}return t},[]);function a7(t){J(Bee.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function $a(t,e,r){if(r==null&&(r=""),t!==e){let n=r,s="new";r&&(n+=".",s+=" "+r),J(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function c7(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let s=2;for(let i=0;i>4]+p4[s&15]}return r}function ot(t){return"0x"+t.map(e=>ne(e).substring(2)).join("")}function Ru(t){return vt(t,!0)?(t.length-2)/2:fe(t).length}function xt(t,e,r){const n=fe(t);return r!=null&&r>n.length&&J(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),ne(n.slice(e??0,r??n.length))}function l7(t,e,r){const n=fe(t);J(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const s=new Uint8Array(e);return s.fill(0),r?s.set(n,e-n.length):s.set(n,0),ne(s)}function pl(t,e){return l7(t,e,!0)}function Fee(t,e){return l7(t,e,!1)}const Vm=BigInt(0),Ns=BigInt(1),pu=9007199254740991;function c0(t,e){const r=$m(t,"value"),n=BigInt(_e(e,"width"));if(J(r>>n===Vm,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ns){const s=(Ns<=-pu&&t<=pu,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){M(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}M(!1,"invalid BigNumberish value",e||"value",t)}function $m(t,e){const r=ye(t,e);return J(r>=Vm,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const y4="0123456789abcdef";function vy(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=y4[r>>4],e+=y4[r&15];return BigInt(e)}return ye(t)}function _e(t,e){switch(typeof t){case"bigint":return M(t>=-pu&&t<=pu,"overflow",e||"value",t),Number(t);case"number":return M(Number.isInteger(t),"underflow",e||"value",t),M(t>=-pu&&t<=pu,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return _e(BigInt(t),e)}catch(r){M(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}M(!1,"invalid numeric value",e||"value",t)}function Uee(t){return _e(vy(t))}function go(t,e){let n=$m(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const s=_e(e,"width");for(J(s*2>=n.length,`value exceeds width (${s} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length>6===2;o++)i++;return i}return t==="OVERRUN"?r.length-e-1:0}function Wee(t,e,r,n,s){return t==="OVERLONG"?(M(typeof s=="number","invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),h7(t,e,r))}const Kee=Object.freeze({error:qee,ignore:h7,replace:Wee});function Qee(t,e){e==null&&(e=Kee.error);const r=fe(t,"bytes"),n=[];let s=0;for(;s>7)){n.push(i);continue}let o=null,a=null;if((i&224)===192)o=1,a=127;else if((i&240)===224)o=2,a=2047;else if((i&248)===240)o=3,a=65535;else{(i&192)===128?s+=e("UNEXPECTED_CONTINUE",s-1,r,n):s+=e("BAD_PREFIX",s-1,r,n);continue}if(s-1+o>=r.length){s+=e("OVERRUN",s-1,r,n);continue}let c=i&(1<<8-o-1)-1;for(let l=0;l1114111){s+=e("OUT_OF_RANGE",s-1-o,r,n,c);continue}if(c>=55296&&c<=57343){s+=e("UTF16_SURROGATE",s-1-o,r,n,c);continue}if(c<=a){s+=e("OVERLONG",s-1-o,r,n,c);continue}n.push(c)}}return n}function Sr(t,e){M(typeof t=="string","invalid string value","str",t),e!=null&&(a7(e),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);M(n>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return new Uint8Array(r)}function Yee(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function u0(t,e){return Yee(Qee(t,e))}function p7(t){async function e(r,n){J(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const s=r.url.split(":")[0].toLowerCase();J(s==="http"||s==="https",`unsupported protocol ${s}`,"UNSUPPORTED_OPERATION",{info:{protocol:s},operation:"request"}),J(s==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const o=new AbortController,a=setTimeout(()=>{i=Lt("request timeout","TIMEOUT"),o.abort()},r.timeout);n&&n.addListener(()=>{i=Lt("request cancelled","CANCELLED"),o.abort()});const c={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:o.signal};let l;try{l=await fetch(r.url,c)}catch(h){throw clearTimeout(a),i||h}clearTimeout(a);const u={};l.headers.forEach((h,p)=>{u[p.toLowerCase()]=h});const f=await l.arrayBuffer(),d=f==null?null:new Uint8Array(f);return{statusCode:l.status,statusMessage:l.statusText,headers:u,body:d}}return e}const Jee=12,Xee=250;let v4=p7();const Zee=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),ete=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let gx=!1;async function y7(t,e){try{const r=t.match(Zee);if(!r)throw new Error("invalid data");return new Ea(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?Hee(r[3]):rte(r[3]))}catch{return new Ea(599,"BAD REQUEST (invalid data: URI)",{},null,new xo(t))}}function v7(t){async function e(r,n){try{const s=r.match(ete);if(!s)throw new Error("invalid link");return new xo(`${t}${s[2]}`)}catch{return new Ea(599,"BAD REQUEST (invalid IPFS URI)",{},null,new xo(r))}}return e}const f1={data:y7,ipfs:v7("https://gateway.ipfs.io/ipfs/")},m7=new WeakMap;var kc,Go;class tte{constructor(e){W(this,kc,void 0);W(this,Go,void 0);N(this,kc,[]),N(this,Go,!1),m7.set(e,()=>{if(!S(this,Go)){N(this,Go,!0);for(const r of S(this,kc))setTimeout(()=>{r()},0);N(this,kc,[])}})}addListener(e){J(!S(this,Go),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),S(this,kc).push(e)}get cancelled(){return S(this,Go)}checkSignal(){J(!this.cancelled,"cancelled","CANCELLED",{})}}kc=new WeakMap,Go=new WeakMap;function d1(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var Bu,Fu,Cs,Vi,Uu,Vu,or,kn,$i,Tc,Pc,Rc,Xs,As,qo,Ic,Jd;const D0=class D0{constructor(e){W(this,Ic);W(this,Bu,void 0);W(this,Fu,void 0);W(this,Cs,void 0);W(this,Vi,void 0);W(this,Uu,void 0);W(this,Vu,void 0);W(this,or,void 0);W(this,kn,void 0);W(this,$i,void 0);W(this,Tc,void 0);W(this,Pc,void 0);W(this,Rc,void 0);W(this,Xs,void 0);W(this,As,void 0);W(this,qo,void 0);N(this,Vu,String(e)),N(this,Bu,!1),N(this,Fu,!0),N(this,Cs,{}),N(this,Vi,""),N(this,Uu,3e5),N(this,As,{slotInterval:Xee,maxAttempts:Jee}),N(this,qo,null)}get url(){return S(this,Vu)}set url(e){N(this,Vu,String(e))}get body(){return S(this,or)==null?null:new Uint8Array(S(this,or))}set body(e){if(e==null)N(this,or,void 0),N(this,kn,void 0);else if(typeof e=="string")N(this,or,Sr(e)),N(this,kn,"text/plain");else if(e instanceof Uint8Array)N(this,or,e),N(this,kn,"application/octet-stream");else if(typeof e=="object")N(this,or,Sr(JSON.stringify(e))),N(this,kn,"application/json");else throw new Error("invalid body")}hasBody(){return S(this,or)!=null}get method(){return S(this,Vi)?S(this,Vi):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),N(this,Vi,String(e).toUpperCase())}get headers(){const e=Object.assign({},S(this,Cs));return S(this,$i)&&(e.authorization=`Basic ${Gee(Sr(S(this,$i)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&S(this,kn)&&(e["content-type"]=S(this,kn)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){S(this,Cs)[String(e).toLowerCase()]=String(r)}clearHeaders(){N(this,Cs,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),N(this,Uu,e)}get preflightFunc(){return S(this,Tc)||null}set preflightFunc(e){N(this,Tc,e)}get processFunc(){return S(this,Pc)||null}set processFunc(e){N(this,Pc,e)}get retryFunc(){return S(this,Rc)||null}set retryFunc(e){N(this,Rc,e)}get getUrlFunc(){return S(this,qo)||v4}set getUrlFunc(e){N(this,qo,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(S(this,As).slotInterval=e.slotInterval),e.maxAttempts!=null&&(S(this,As).maxAttempts=e.maxAttempts)}send(){return J(S(this,Xs)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),N(this,Xs,new tte(this)),ee(this,Ic,Jd).call(this,0,m4()+this.timeout,0,this,new Ea(0,"",{},null,this))}cancel(){J(S(this,Xs)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=m7.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();J(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const s=new D0(e);return s.method="GET",s.allowGzip=this.allowGzip,s.timeout=this.timeout,N(s,Cs,Object.assign({},S(this,Cs))),S(this,or)&&N(s,or,new Uint8Array(S(this,or))),N(s,kn,S(this,kn)),s}clone(){const e=new D0(this.url);return N(e,Vi,S(this,Vi)),S(this,or)&&N(e,or,S(this,or)),N(e,kn,S(this,kn)),N(e,Cs,Object.assign({},S(this,Cs))),N(e,$i,S(this,$i)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),N(e,Tc,S(this,Tc)),N(e,Pc,S(this,Pc)),N(e,Rc,S(this,Rc)),N(e,As,Object.assign({},S(this,As))),N(e,qo,S(this,qo)),e}static lockConfig(){gx=!0}static getGateway(e){return f1[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(gx)throw new Error("gateways locked");f1[e]=r}static registerGetUrl(e){if(gx)throw new Error("gateways locked");v4=e}static createGetUrlFunc(e){return p7()}static createDataGateway(){return y7}static createIpfsGatewayFunc(e){return v7(e)}};Bu=new WeakMap,Fu=new WeakMap,Cs=new WeakMap,Vi=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,or=new WeakMap,kn=new WeakMap,$i=new WeakMap,Tc=new WeakMap,Pc=new WeakMap,Rc=new WeakMap,Xs=new WeakMap,As=new WeakMap,qo=new WeakMap,Ic=new WeakSet,Jd=async function(e,r,n,s,i){var u,f,d;if(e>=S(this,As).maxAttempts)return i.makeServerError("exceeded maximum retry limit");J(m4()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:s}),n>0&&await nte(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in f1){const h=await f1[a](o.url,d1(S(s,Xs)));if(h instanceof Ea){let p=h;if(this.processFunc){d1(S(s,Xs));try{p=await this.processFunc(o,p)}catch(y){(y.throttle==null||typeof y.stall!="number")&&p.makeServerError("error in post-processing function",y).assertOk()}}return p}o=h}this.preflightFunc&&(o=await this.preflightFunc(o));const c=await this.getUrlFunc(o,d1(S(s,Xs)));let l=new Ea(c.statusCode,c.statusMessage,c.headers,c.body,s);if(l.statusCode===301||l.statusCode===302){try{const h=l.headers.location||"";return ee(u=o.redirect(h),Ic,Jd).call(u,e+1,r,0,s,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,l,e))){const h=l.headers["retry-after"];let p=S(this,As).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof h=="string"&&h.match(/^[1-9][0-9]*$/)&&(p=parseInt(h)),ee(f=o.clone(),Ic,Jd).call(f,e+1,r,p,s,l)}if(this.processFunc){d1(S(s,Xs));try{l=await this.processFunc(o,l)}catch(h){(h.throttle==null||typeof h.stall!="number")&&l.makeServerError("error in post-processing function",h).assertOk();let p=S(this,As).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return h.stall>=0&&(p=h.stall),ee(d=o.clone(),Ic,Jd).call(d,e+1,r,p,s,l)}}return l};let xo=D0;var Ep,Sp,Cp,Tn,$u,Oc;const _k=class _k{constructor(e,r,n,s,i){W(this,Ep,void 0);W(this,Sp,void 0);W(this,Cp,void 0);W(this,Tn,void 0);W(this,$u,void 0);W(this,Oc,void 0);N(this,Ep,e),N(this,Sp,r),N(this,Cp,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),N(this,Tn,s==null?null:new Uint8Array(s)),N(this,$u,i||null),N(this,Oc,{message:""})}toString(){return``}get statusCode(){return S(this,Ep)}get statusMessage(){return S(this,Sp)}get headers(){return Object.assign({},S(this,Cp))}get body(){return S(this,Tn)==null?null:new Uint8Array(S(this,Tn))}get bodyText(){try{return S(this,Tn)==null?"":u0(S(this,Tn))}catch{J(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{J(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw me(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return S(this,Tn)!=null}get request(){return S(this,$u)}ok(){return S(this,Oc).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=S(this,Oc);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let s=null;try{S(this,Tn)&&(s=u0(S(this,Tn)))}catch{}J(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r,info:{requestUrl:n,responseBody:s,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};Ep=new WeakMap,Sp=new WeakMap,Cp=new WeakMap,Tn=new WeakMap,$u=new WeakMap,Oc=new WeakMap;let Ea=_k;function m4(){return new Date().getTime()}function rte(t){return Sr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function nte(t){return new Promise(e=>setTimeout(e,t))}const ste=BigInt(-1),xs=BigInt(0),vu=BigInt(1),ite=BigInt(5),Bl={};let Iu="0000";for(;Iu.length<80;)Iu+=Iu;function Xa(t){let e=Iu;for(;e.length=-s&&txs?t=c0(bc(t,n),n):t=-c0(bc(-t,n),n)}else{const s=vu<=0&&ti[a]==null?l:(M(typeof i[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,i[a]),i[a]);e=o("signed","boolean",e),r=o("width","number",r),n=o("decimals","number",n)}M(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),M(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const s=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:s}}function ote(t,e){let r="";t0?n*=Xa(s):s<0&&(r*=Xa(-s)),rn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=S(this,st);return S(this,st)xs&&(e+=S(this,Yr)-vu),e=S(this,st)/S(this,Yr)*S(this,Yr),ee(this,Ts,Ii).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=ite*Xa(r-1);let s=this.value+n;const i=Xa(r);return s=s/i*i,jd(s,S(this,ks),"round"),new $o(Bl,s,S(this,ks))}isZero(){return S(this,st)===xs}isNegative(){return S(this,st)0){const c=Xa(a);J(o%c===xs,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=Xa(-a));return jd(o,i,"fromValue"),new $o(Bl,o,i)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);M(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const s=xx(r);let i=n[2]||"0",o=n[3]||"";for(;o.length{J(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const s=g4(t,e+1,n);return r(e+1+n+s),x4(t,e,e+1+n,n+s)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),x4(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const s=g4(t,e+1,n);r(e+1+n+s);const i=ne(t.slice(e+1+n,e+1+n+s));return{consumed:1+n+s,result:i}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const s=ne(t.slice(e+1,e+1+n));return{consumed:1+n,result:s}}return{consumed:1,result:ate(t[e])}}function zm(t){const e=fe(t,"data"),r=g7(e,0);return M(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function b4(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function x7(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(i){n=n.concat(x7(i))}),n.length<=55)return n.unshift(192+n.length),n;const s=b4(n.length);return s.unshift(247+s.length),s.concat(n)}const e=Array.prototype.slice.call(fe(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=b4(e.length);return r.unshift(183+r.length),r.concat(e)}const w4="0123456789abcdef";function yl(t){let e="0x";for(const r of x7(t))e+=w4[r>>4],e+=w4[r&15];return e}const b7=["wei","kwei","mwei","gwei","szabo","finney","ether"];function mC(t,e){let r=18;if(typeof e=="string"){const n=b7.indexOf(e);M(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=_e(e,"unit"));return f0.fromValue(t,r,{decimals:r,width:512}).toString()}function Xh(t,e){M(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=b7.indexOf(e);M(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=_e(e,"unit"));return f0.fromString(t,{decimals:r,width:512}).value}function cte(t){return mC(t,18)}function E4(t){return Xh(t,18)}function lte(t){const e=fe(t,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=ne(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const rn=32,Gw=new Uint8Array(rn),ute=["then"],h1={},w7=new WeakMap;function lc(t){return w7.get(t)}function S4(t,e){w7.set(t,e)}function Bd(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}function qw(t,e,r){return t.indexOf(null)>=0?e.map((n,s)=>n instanceof Uf?qw(lc(n),n,r):n):t.reduce((n,s,i)=>{let o=e.getValue(s);return s in n||(r&&o instanceof Uf&&(o=qw(lc(o),o,r)),n[s]=o),n},{})}var zu;const mu=class mu extends Array{constructor(...r){const n=r[0];let s=r[1],i=(r[2]||[]).slice(),o=!0;n!==h1&&(s=r,i=[],o=!1);super(s.length);W(this,zu,void 0);s.forEach((l,u)=>{this[u]=l});const a=i.reduce((l,u)=>(typeof u=="string"&&l.set(u,(l.get(u)||0)+1),l),new Map);if(S4(this,Object.freeze(s.map((l,u)=>{const f=i[u];return f!=null&&a.get(f)===1?f:null}))),N(this,zu,[]),S(this,zu)==null&&S(this,zu),!o)return;Object.freeze(this);const c=new Proxy(this,{get:(l,u,f)=>{if(typeof u=="string"){if(u.match(/^[0-9]+$/)){const h=_e(u,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const p=l[h];return p instanceof Error&&Bd(`index ${h}`,p),p}if(ute.indexOf(u)>=0)return Reflect.get(l,u,f);const d=l[u];if(d instanceof Function)return function(...h){return d.apply(this===f?l:this,h)};if(!(u in l))return l.getValue.apply(this===f?l:this,[u])}return Reflect.get(l,u,f)}});return S4(c,lc(this)),c}toArray(r){const n=[];return this.forEach((s,i)=>{s instanceof Error&&Bd(`index ${i}`,s),r&&s instanceof mu&&(s=s.toArray(r)),n.push(s)}),n}toObject(r){const n=lc(this);return n.reduce((s,i,o)=>(J(i!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),qw(n,this,r)),{})}slice(r,n){r==null&&(r=0),r<0&&(r+=this.length,r<0&&(r=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const s=lc(this),i=[],o=[];for(let a=r;a{S(this,Hi)[e]=C4(r)}}}Hi=new WeakMap,_c=new WeakMap,Hu=new WeakSet,X1=function(e){return S(this,Hi).push(e),N(this,_c,S(this,_c)+e.length),e.length};var un,Pn,Nc,Mc,Wo,Rp,Qw,L0,E7;const Nk=class Nk{constructor(e,r,n){W(this,Rp);W(this,L0);G(this,"allowLoose");W(this,un,void 0);W(this,Pn,void 0);W(this,Nc,void 0);W(this,Mc,void 0);W(this,Wo,void 0);me(this,{allowLoose:!!r}),N(this,un,br(e)),N(this,Nc,0),N(this,Mc,null),N(this,Wo,n??1024),N(this,Pn,0)}get data(){return ne(S(this,un))}get dataLength(){return S(this,un).length}get consumed(){return S(this,Pn)}get bytes(){return new Uint8Array(S(this,un))}subReader(e){const r=new Nk(S(this,un).slice(S(this,Pn)+e),this.allowLoose,S(this,Wo));return N(r,Mc,this),r}readBytes(e,r){let n=ee(this,L0,E7).call(this,0,e,!!r);return ee(this,Rp,Qw).call(this,e),N(this,Pn,S(this,Pn)+n.length),n.slice(0,e)}readValue(){return vy(this.readBytes(rn))}readIndex(){return Uee(this.readBytes(rn))}};un=new WeakMap,Pn=new WeakMap,Nc=new WeakMap,Mc=new WeakMap,Wo=new WeakMap,Rp=new WeakSet,Qw=function(e){var r;if(S(this,Mc))return ee(r=S(this,Mc),Rp,Qw).call(r,e);N(this,Nc,S(this,Nc)+e),J(S(this,Wo)<1||S(this,Nc)<=S(this,Wo)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${S(this,Wo)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:br(S(this,un)),offset:S(this,Pn),length:e,info:{bytesRead:S(this,Nc),dataLength:this.dataLength}})},L0=new WeakSet,E7=function(e,r,n){let s=Math.ceil(r/rn)*rn;return S(this,Pn)+s>S(this,un).length&&(this.allowLoose&&n&&S(this,Pn)+r<=S(this,un).length?s=r:J(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:br(S(this,un)),length:S(this,un).length,offset:S(this,Pn)+s})),S(this,un).slice(S(this,Pn),S(this,Pn)+s)};let Kw=Nk;function Nn(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function gC(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function S7(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Nn(t.outputLen),Nn(t.blockLen)}function Vf(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function C7(t,e){gC(t);const r=e.outputLen;if(t.lengtht instanceof Uint8Array,Z1=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),ev=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),qs=(t,e)=>t<<32-e|t>>>e,fte=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!fte)throw new Error("Non little-endian hardware is not supported");const dte=async()=>{};async function A4(t,e,r){let n=Date.now();for(let s=0;s=0&&in+s.length,0));let r=0;return t.forEach(n=>{if(!A7(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class xC{clone(){return this._cloneInto()}}const yte={}.toString;function k7(t,e){if(e!==void 0&&yte.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function Hm(t){const e=n=>t().update($f(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function vte(t=32){if(bx&&typeof bx.getRandomValues=="function")return bx.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class T7 extends xC{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,S7(e);const n=$f(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(n.length>s?e.create().update(n).digest():n);for(let o=0;onew T7(t,e).update(r).digest();Gm.create=(t,e)=>new T7(t,e);function mte(t,e,r,n){S7(t);const s=k7({dkLen:32,asyncTick:10},n),{c:i,dkLen:o,asyncTick:a}=s;if(Nn(i),Nn(o),Nn(a),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=$f(e),l=$f(r),u=new Uint8Array(o),f=Gm.create(t,c),d=f._cloneInto().update(l);return{c:i,dkLen:o,asyncTick:a,DK:u,PRF:f,PRFSalt:d}}function gte(t,e,r,n,s){return t.destroy(),e.destroy(),n&&n.destroy(),s.fill(0),r}function bC(t,e,r,n){const{c:s,dkLen:i,DK:o,PRF:a,PRFSalt:c}=mte(t,e,r,n);let l;const u=new Uint8Array(4),f=ev(u),d=new Uint8Array(a.outputLen);for(let h=1,p=0;p>s&i),a=Number(r&i),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}class wC extends xC{constructor(e,r,n,s){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ev(this.buffer)}update(e){Vf(this);const{view:r,buffer:n,blockLen:s}=this;e=$f(e);const i=e.length;for(let o=0;os-o&&(this.process(n,0),o=0);for(let f=o;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&r,wte=(t,e,r)=>t&e^t&r^e&r,Ete=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ro=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Io=new Uint32Array(64);class Ste extends wC{constructor(){super(64,32,8,!1),this.A=Ro[0]|0,this.B=Ro[1]|0,this.C=Ro[2]|0,this.D=Ro[3]|0,this.E=Ro[4]|0,this.F=Ro[5]|0,this.G=Ro[6]|0,this.H=Ro[7]|0}get(){const{A:e,B:r,C:n,D:s,E:i,F:o,G:a,H:c}=this;return[e,r,n,s,i,o,a,c]}set(e,r,n,s,i,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)Io[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){const d=Io[f-15],h=Io[f-2],p=qs(d,7)^qs(d,18)^d>>>3,y=qs(h,17)^qs(h,19)^h>>>10;Io[f]=y+Io[f-7]+p+Io[f-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=qs(a,6)^qs(a,11)^qs(a,25),h=u+d+bte(a,c,l)+Ete[f]+Io[f]|0,y=(qs(n,2)^qs(n,13)^qs(n,22))+wte(n,s,i)|0;u=l,l=c,c=a,a=o+h|0,o=i,i=s,s=n,n=h+y|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,i,o,a,c,l,u)}roundClean(){Io.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const dd=Hm(()=>new Ste),p1=BigInt(2**32-1),Yw=BigInt(32);function P7(t,e=!1){return e?{h:Number(t&p1),l:Number(t>>Yw&p1)}:{h:Number(t>>Yw&p1)|0,l:Number(t&p1)|0}}function R7(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;sBigInt(t>>>0)<>>0),Ate=(t,e,r)=>t>>>r,kte=(t,e,r)=>t<<32-r|e>>>r,Tte=(t,e,r)=>t>>>r|e<<32-r,Pte=(t,e,r)=>t<<32-r|e>>>r,Rte=(t,e,r)=>t<<64-r|e>>>r-32,Ite=(t,e,r)=>t>>>r-32|e<<64-r,Ote=(t,e)=>e,_te=(t,e)=>t,I7=(t,e,r)=>t<>>32-r,O7=(t,e,r)=>e<>>32-r,_7=(t,e,r)=>e<>>64-r,N7=(t,e,r)=>t<>>64-r;function Nte(t,e,r,n){const s=(e>>>0)+(n>>>0);return{h:t+r+(s/2**32|0)|0,l:s|0}}const Mte=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Dte=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Lte=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),jte=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,Bte=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),Fte=(t,e,r,n,s,i)=>e+r+n+s+i+(t/2**32|0)|0,Ute={fromBig:P7,split:R7,toBig:Cte,shrSH:Ate,shrSL:kte,rotrSH:Tte,rotrSL:Pte,rotrBH:Rte,rotrBL:Ite,rotr32H:Ote,rotr32L:_te,rotlSH:I7,rotlSL:O7,rotlBH:_7,rotlBL:N7,add:Nte,add3L:Mte,add3H:Dte,add4L:Lte,add4H:jte,add5H:Fte,add5L:Bte},je=Ute,[Vte,$te]=(()=>je.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))))(),Oo=new Uint32Array(80),_o=new Uint32Array(80);class zte extends wC{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:f,Fl:d,Gh:h,Gl:p,Hh:y,Hl:g}=this;return[e,r,n,s,i,o,a,c,l,u,f,d,h,p,y,g]}set(e,r,n,s,i,o,a,c,l,u,f,d,h,p,y,g){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=f|0,this.Fl=d|0,this.Gh=h|0,this.Gl=p|0,this.Hh=y|0,this.Hl=g|0}process(e,r){for(let b=0;b<16;b++,r+=4)Oo[b]=e.getUint32(r),_o[b]=e.getUint32(r+=4);for(let b=16;b<80;b++){const w=Oo[b-15]|0,A=_o[b-15]|0,O=je.rotrSH(w,A,1)^je.rotrSH(w,A,8)^je.shrSH(w,A,7),_=je.rotrSL(w,A,1)^je.rotrSL(w,A,8)^je.shrSL(w,A,7),C=Oo[b-2]|0,j=_o[b-2]|0,V=je.rotrSH(C,j,19)^je.rotrBH(C,j,61)^je.shrSH(C,j,6),B=je.rotrSL(C,j,19)^je.rotrBL(C,j,61)^je.shrSL(C,j,6),z=je.add4L(_,B,_o[b-7],_o[b-16]),Y=je.add4H(z,O,V,Oo[b-7],Oo[b-16]);Oo[b]=Y|0,_o[b]=z|0}let{Ah:n,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:f,El:d,Fh:h,Fl:p,Gh:y,Gl:g,Hh:m,Hl:x}=this;for(let b=0;b<80;b++){const w=je.rotrSH(f,d,14)^je.rotrSH(f,d,18)^je.rotrBH(f,d,41),A=je.rotrSL(f,d,14)^je.rotrSL(f,d,18)^je.rotrBL(f,d,41),O=f&h^~f&y,_=d&p^~d&g,C=je.add5L(x,A,_,$te[b],_o[b]),j=je.add5H(C,m,w,O,Vte[b],Oo[b]),V=C|0,B=je.rotrSH(n,s,28)^je.rotrBH(n,s,34)^je.rotrBH(n,s,39),z=je.rotrSL(n,s,28)^je.rotrBL(n,s,34)^je.rotrBL(n,s,39),Y=n&i^n&a^i&a,H=s&o^s&c^o&c;m=y|0,x=g|0,y=h|0,g=p|0,h=f|0,p=d|0,{h:f,l:d}=je.add(l|0,u|0,j|0,V|0),l=a|0,u=c|0,a=i|0,c=o|0,i=n|0,o=s|0;const L=je.add3L(V,z,H);n=je.add3H(L,j,B,Y),s=L|0}({h:n,l:s}=je.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:o}=je.add(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=je.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=je.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:f,l:d}=je.add(this.Eh|0,this.El|0,f|0,d|0),{h,l:p}=je.add(this.Fh|0,this.Fl|0,h|0,p|0),{h:y,l:g}=je.add(this.Gh|0,this.Gl|0,y|0,g|0),{h:m,l:x}=je.add(this.Hh|0,this.Hl|0,m|0,x|0),this.set(n,s,i,o,a,c,l,u,f,d,h,p,y,g,m,x)}roundClean(){Oo.fill(0),_o.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const EC=Hm(()=>new zte);function Hte(){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 k4=Hte(),T4=k4.crypto||k4.msCrypto;function Gte(t){switch(t){case"sha256":return dd.create();case"sha512":return EC.create()}M(!1,"invalid hashing algorithm name","algorithm",t)}function qte(t,e){const r={sha256:dd,sha512:EC}[t];return M(r!=null,"invalid hmac algorithm","algorithm",t),Gm.create(r,e)}function Wte(t,e,r,n,s){const i={sha256:dd,sha512:EC}[s];return M(i!=null,"invalid pbkdf2 algorithm","algorithm",s),bC(i,t,e,{c:r,dkLen:n})}function Kte(t){J(T4!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),M(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return T4.getRandomValues(e),e}let M7=!1;const D7=function(t,e,r){return qte(t,e).update(r).digest()};let L7=D7;function hd(t,e,r){const n=fe(e,"key"),s=fe(r,"data");return ne(L7(t,n,s))}hd._=D7;hd.lock=function(){M7=!0};hd.register=function(t){if(M7)throw new Error("computeHmac is locked");L7=t};Object.freeze(hd);const[j7,B7,F7]=[[],[],[]],Qte=BigInt(0),Fd=BigInt(1),Yte=BigInt(2),Jte=BigInt(7),Xte=BigInt(256),Zte=BigInt(113);for(let t=0,e=Fd,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],j7.push(2*(5*n+r)),B7.push((t+1)*(t+2)/2%64);let s=Qte;for(let i=0;i<7;i++)e=(e<>Jte)*Zte)%Xte,e&Yte&&(s^=Fd<<(Fd<r>32?_7(t,e,r):I7(t,e,r),R4=(t,e,r)=>r>32?N7(t,e,r):O7(t,e,r);function rre(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=P4(l,u,1)^r[a],d=R4(l,u,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=d}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=B7[o],c=P4(s,i,a),l=R4(s,i,a),u=j7[o];s=t[u],i=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=ere[n],t[1]^=tre[n]}r.fill(0)}class SC extends xC{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Nn(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Z1(this.state)}keccak(){rre(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Vf(this);const{blockLen:r,state:n}=this;e=$f(e);const s=e.length;for(let i=0;i=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Nn(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(C7(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new SC(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const nre=(t,e,r)=>Hm(()=>new SC(e,t,r)),sre=nre(1,136,256/8);let U7=!1;const V7=function(t){return sre(t)};let $7=V7;function Ct(t){const e=fe(t,"data");return ne($7(e))}Ct._=V7;Ct.lock=function(){U7=!0};Ct.register=function(t){if(U7)throw new TypeError("keccak256 is locked");$7=t};Object.freeze(Ct);const ire=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),z7=Uint8Array.from({length:16},(t,e)=>e),ore=z7.map(t=>(9*t+5)%16);let CC=[z7],AC=[ore];for(let t=0;t<4;t++)for(let e of[CC,AC])e.push(e[t].map(r=>ire[r]));const H7=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),are=CC.map((t,e)=>t.map(r=>H7[e][r])),cre=AC.map((t,e)=>t.map(r=>H7[e][r])),lre=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),ure=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),y1=(t,e)=>t<>>32-e;function I4(t,e,r,n){return t===0?e^r^n:t===1?e&r|~e&n:t===2?(e|~r)^n:t===3?e&n|r&~n:e^(r|~n)}const v1=new Uint32Array(16);class fre extends wC{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:r,h2:n,h3:s,h4:i}=this;return[e,r,n,s,i]}set(e,r,n,s,i){this.h0=e|0,this.h1=r|0,this.h2=n|0,this.h3=s|0,this.h4=i|0}process(e,r){for(let h=0;h<16;h++,r+=4)v1[h]=e.getUint32(r,!0);let n=this.h0|0,s=n,i=this.h1|0,o=i,a=this.h2|0,c=a,l=this.h3|0,u=l,f=this.h4|0,d=f;for(let h=0;h<5;h++){const p=4-h,y=lre[h],g=ure[h],m=CC[h],x=AC[h],b=are[h],w=cre[h];for(let A=0;A<16;A++){const O=y1(n+I4(h,i,a,l)+v1[m[A]]+y,b[A])+f|0;n=f,f=l,l=y1(a,10)|0,a=i,i=O}for(let A=0;A<16;A++){const O=y1(s+I4(p,o,c,u)+v1[x[A]]+g,w[A])+d|0;s=d,d=u,u=y1(c,10)|0,c=o,o=O}}this.set(this.h1+a+u|0,this.h2+l+d|0,this.h3+f+s|0,this.h4+n+o|0,this.h0+i+c|0)}roundClean(){v1.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const dre=Hm(()=>new fre);let G7=!1;const q7=function(t){return dre(t)};let W7=q7;function pd(t){const e=fe(t,"data");return ne(W7(e))}pd._=q7;pd.lock=function(){G7=!0};pd.register=function(t){if(G7)throw new TypeError("ripemd160 is locked");W7=t};Object.freeze(pd);let K7=!1;const Q7=function(t,e,r,n,s){return Wte(t,e,r,n,s)};let Y7=Q7;function za(t,e,r,n,s){const i=fe(t,"password"),o=fe(e,"salt");return ne(Y7(i,o,r,n,s))}za._=Q7;za.lock=function(){K7=!0};za.register=function(t){if(K7)throw new Error("pbkdf2 is locked");Y7=t};Object.freeze(za);let J7=!1;const X7=function(t){return new Uint8Array(Kte(t))};let Z7=X7;function co(t){return Z7(t)}co._=X7;co.lock=function(){J7=!0};co.register=function(t){if(J7)throw new Error("randomBytes is locked");Z7=t};Object.freeze(co);const Ye=(t,e)=>t<>>32-e;function O4(t,e,r,n,s,i){let o=t[e++]^r[n++],a=t[e++]^r[n++],c=t[e++]^r[n++],l=t[e++]^r[n++],u=t[e++]^r[n++],f=t[e++]^r[n++],d=t[e++]^r[n++],h=t[e++]^r[n++],p=t[e++]^r[n++],y=t[e++]^r[n++],g=t[e++]^r[n++],m=t[e++]^r[n++],x=t[e++]^r[n++],b=t[e++]^r[n++],w=t[e++]^r[n++],A=t[e++]^r[n++],O=o,_=a,C=c,j=l,V=u,B=f,z=d,Y=h,H=p,L=y,T=g,P=m,R=x,I=b,U=w,F=A;for(let X=0;X<8;X+=2)V^=Ye(O+R|0,7),H^=Ye(V+O|0,9),R^=Ye(H+V|0,13),O^=Ye(R+H|0,18),L^=Ye(B+_|0,7),I^=Ye(L+B|0,9),_^=Ye(I+L|0,13),B^=Ye(_+I|0,18),U^=Ye(T+z|0,7),C^=Ye(U+T|0,9),z^=Ye(C+U|0,13),T^=Ye(z+C|0,18),j^=Ye(F+P|0,7),Y^=Ye(j+F|0,9),P^=Ye(Y+j|0,13),F^=Ye(P+Y|0,18),_^=Ye(O+j|0,7),C^=Ye(_+O|0,9),j^=Ye(C+_|0,13),O^=Ye(j+C|0,18),z^=Ye(B+V|0,7),Y^=Ye(z+B|0,9),V^=Ye(Y+z|0,13),B^=Ye(V+Y|0,18),P^=Ye(T+L|0,7),H^=Ye(P+T|0,9),L^=Ye(H+P|0,13),T^=Ye(L+H|0,18),R^=Ye(F+U|0,7),I^=Ye(R+F|0,9),U^=Ye(I+R|0,13),F^=Ye(U+I|0,18);s[i++]=o+O|0,s[i++]=a+_|0,s[i++]=c+C|0,s[i++]=l+j|0,s[i++]=u+V|0,s[i++]=f+B|0,s[i++]=d+z|0,s[i++]=h+Y|0,s[i++]=p+H|0,s[i++]=y+L|0,s[i++]=g+T|0,s[i++]=m+P|0,s[i++]=x+R|0,s[i++]=b+I|0,s[i++]=w+U|0,s[i++]=A+F|0}function Ou(t,e,r,n,s){let i=n+0,o=n+16*s;for(let a=0;a<16;a++)r[o+a]=t[e+(2*s-1)*16+a];for(let a=0;a0&&(o+=16),O4(r,i,t,e+=16,r,o)}function eM(t,e,r){const n=k7({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:s,r:i,p:o,dkLen:a,asyncTick:c,maxmem:l,onProgress:u}=n;if(Nn(s),Nn(i),Nn(o),Nn(a),Nn(c),Nn(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const f=128*i,d=f/4;if(s<=1||s&s-1||s>=2**(f/8)||s>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/f)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const h=f*(s+o);if(h>l)throw new Error(`Scrypt: parameters too large, ${h} (128 * r * (N + p)) > ${l} (maxmem)`);const p=bC(dd,t,e,{c:1,dkLen:f*o}),y=Z1(p),g=Z1(new Uint8Array(f*s)),m=Z1(new Uint8Array(f));let x=()=>{};if(u){const b=2*s*o,w=Math.max(Math.floor(b/1e4),1);let A=0;x=()=>{A++,u&&(!(A%w)||A===b)&&u(A/b)}}return{N:s,r:i,p:o,dkLen:a,blockSize32:d,V:g,B32:y,B:p,tmp:m,blockMixCb:x,asyncTick:c}}function tM(t,e,r,n,s){const i=bC(dd,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),s.fill(0),i}function hre(t,e,r){const{N:n,r:s,p:i,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:f,blockMixCb:d}=eM(t,e,r);for(let h=0;h{Ou(c,g,c,g+=a,s),d()}),Ou(c,(n-1)*a,l,y,s),d(),await A4(n,h,()=>{const m=l[y+a-16]%n;for(let x=0;xt instanceof Uint8Array,vre=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function zf(t){if(!Wm(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rn+s.length,0));let r=0;return t.forEach(n=>{if(!Wm(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function gre(t,e){if(t.length!==e.length)return!1;for(let r=0;rfM;t>>=qm,e+=1);return e}function wre(t,e){return t>>BigInt(e)&qm}const Ere=(t,e,r)=>t|(r?qm:fM)<(yre<new Uint8Array(t),_4=t=>Uint8Array.from(t);function hM(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=wx(t),s=wx(t),i=0;const o=()=>{n.fill(1),s.fill(0),i=0},a=(...f)=>r(s,n,...f),c=(f=wx())=>{s=a(_4([0]),f),n=a(),f.length!==0&&(s=a(_4([1]),f),n=a())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const d=[];for(;f{o(),c(f);let h;for(;!(h=d(l()));)c();return o(),h}}const Sre={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function my(t,e,r={}){const n=(s,i,o)=>{const a=Sre[i];if(typeof a!="function")throw new Error(`Invalid validator "${i}", expected function`);const c=t[s];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(s)}=${c} (${typeof c}), expected ${i}`)};for(const[s,i]of Object.entries(e))n(s,i,!1);for(const[s,i]of Object.entries(r))n(s,i,!0);return t}const Cre=Object.freeze(Object.defineProperty({__proto__:null,bitGet:wre,bitLen:bre,bitMask:RC,bitSet:Ere,bytesToHex:zf,bytesToNumberBE:tl,bytesToNumberLE:TC,concatBytes:Zh,createHmacDrbg:hM,ensureBytes:Ss,equalBytes:gre,hexToBytes:Hf,hexToNumber:kC,numberToBytesBE:Gf,numberToBytesLE:PC,numberToHexUnpadded:dM,numberToVarBytesBE:mre,utf8ToBytes:xre,validateObject:my},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const fr=BigInt(0),Kt=BigInt(1),uc=BigInt(2),Are=BigInt(3),Jw=BigInt(4),N4=BigInt(5),M4=BigInt(8);BigInt(9);BigInt(16);function dn(t,e){const r=t%e;return r>=fr?r:e+r}function kre(t,e,r){if(r<=fr||e 0");if(r===Kt)return fr;let n=Kt;for(;e>fr;)e&Kt&&(n=n*t%r),t=t*t%r,e>>=Kt;return n}function qn(t,e,r){let n=t;for(;e-- >fr;)n*=n,n%=r;return n}function Xw(t,e){if(t===fr||e<=fr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=dn(t,e),n=e,s=fr,i=Kt;for(;r!==fr;){const a=n/r,c=n%r,l=s-i*a;n=r,r=c,s=i,i=l}if(n!==Kt)throw new Error("invert: does not exist");return dn(s,e)}function Tre(t){const e=(t-Kt)/uc;let r,n,s;for(r=t-Kt,n=0;r%uc===fr;r/=uc,n++);for(s=uc;s(n[s]="function",n),e);return my(t,r)}function Ore(t,e,r){if(r 0");if(r===fr)return t.ONE;if(r===Kt)return e;let n=t.ONE,s=e;for(;r>fr;)r&Kt&&(n=t.mul(n,s)),s=t.sqr(s),r>>=Kt;return n}function _re(t,e){const r=new Array(e.length),n=e.reduce((i,o,a)=>t.is0(o)?i:(r[a]=i,t.mul(i,o)),t.ONE),s=t.inv(n);return e.reduceRight((i,o,a)=>t.is0(o)?i:(r[a]=t.mul(i,r[a]),t.mul(i,o)),s),r}function pM(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Nre(t,e,r=!1,n={}){if(t<=fr)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:s,nByteLength:i}=pM(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=Pre(t),a=Object.freeze({ORDER:t,BITS:s,BYTES:i,MASK:RC(s),ZERO:fr,ONE:Kt,create:c=>dn(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return fr<=c&&cc===fr,isOdd:c=>(c&Kt)===Kt,neg:c=>dn(-c,t),eql:(c,l)=>c===l,sqr:c=>dn(c*c,t),add:(c,l)=>dn(c+l,t),sub:(c,l)=>dn(c-l,t),mul:(c,l)=>dn(c*l,t),pow:(c,l)=>Ore(a,c,l),div:(c,l)=>dn(c*Xw(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Xw(c,t),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>_re(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?PC(c,i):Gf(c,i),fromBytes:c=>{if(c.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${c.length}`);return r?TC(c):tl(c)}});return Object.freeze(a)}function yM(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function vM(t){const e=yM(t);return e+Math.ceil(e/2)}function Mre(t,e,r=!1){const n=t.length,s=yM(e),i=vM(e);if(n<16||n1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const o=r?tl(t):TC(t),a=dn(o,e-Kt)+Kt;return r?PC(a,s):Gf(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dre=BigInt(0),Ex=BigInt(1);function Lre(t,e){const r=(s,i)=>{const o=i.negate();return s?o:i},n=s=>{const i=Math.ceil(e/s)+1,o=2**(s-1);return{windows:i,windowSize:o}};return{constTimeNegate:r,unsafeLadder(s,i){let o=t.ZERO,a=s;for(;i>Dre;)i&Ex&&(o=o.add(a)),a=a.double(),i>>=Ex;return o},precomputeWindow(s,i){const{windows:o,windowSize:a}=n(i),c=[];let l=s,u=l;for(let f=0;f>=h,g>c&&(g-=d,o+=Ex);const m=y,x=y+Math.abs(g)-1,b=p%2!==0,w=g<0;g===0?u=u.add(r(b,i[m])):l=l.add(r(w,i[x]))}return{p:l,f:u}},wNAFCached(s,i,o,a){const c=s._WINDOW_SIZE||1;let l=i.get(s);return l||(l=this.precomputeWindow(s,c),c!==1&&i.set(s,a(l))),this.wNAF(c,l,o)}}}function mM(t){return Ire(t.Fp),my(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...pM(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function jre(t){const e=mM(t);my(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:s}=e;if(r){if(!n.eql(s,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:Bre,hexToBytes:Fre}=Cre,wc={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=wc;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:Bre(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=wc,r=typeof t=="string"?Fre(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:s,l:i}=wc._parseInt(r.subarray(2)),{d:o,l:a}=wc._parseInt(i);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:s,s:o}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,r=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},n=e(r(t.s)),s=e(r(t.r)),i=n.length/2,o=s.length/2,a=r(i),c=r(o);return`30${r(o+i+4)}02${c}${s}02${a}${n}`}},eo=BigInt(0),ss=BigInt(1);BigInt(2);const D4=BigInt(3);BigInt(4);function Ure(t){const e=jre(t),{Fp:r}=e,n=e.toBytes||((p,y,g)=>{const m=y.toAffine();return Zh(Uint8Array.from([4]),r.toBytes(m.x),r.toBytes(m.y))}),s=e.fromBytes||(p=>{const y=p.subarray(1),g=r.fromBytes(y.subarray(0,r.BYTES)),m=r.fromBytes(y.subarray(r.BYTES,2*r.BYTES));return{x:g,y:m}});function i(p){const{a:y,b:g}=e,m=r.sqr(p),x=r.mul(m,p);return r.add(r.add(x,r.mul(p,y)),g)}if(!r.eql(r.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function o(p){return typeof p=="bigint"&&eor.eql(b,r.ZERO);return x(g)&&x(m)?f.ZERO:new f(g,m,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){const g=r.invertBatch(y.map(m=>m.pz));return y.map((m,x)=>m.toAffine(g[x])).map(f.fromAffine)}static fromHex(y){const g=f.fromAffine(s(Ss("pointHex",y)));return g.assertValidity(),g}static fromPrivateKey(y){return f.BASE.multiply(c(y))}_setWindowSize(y){this._WINDOW_SIZE=y,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:y,y:g}=this.toAffine();if(!r.isValid(y)||!r.isValid(g))throw new Error("bad point: x or y not FE");const m=r.sqr(g),x=i(y);if(!r.eql(m,x))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y}=this.toAffine();if(r.isOdd)return!r.isOdd(y);throw new Error("Field doesn't support isOdd")}equals(y){u(y);const{px:g,py:m,pz:x}=this,{px:b,py:w,pz:A}=y,O=r.eql(r.mul(g,A),r.mul(b,x)),_=r.eql(r.mul(m,A),r.mul(w,x));return O&&_}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){const{a:y,b:g}=e,m=r.mul(g,D4),{px:x,py:b,pz:w}=this;let A=r.ZERO,O=r.ZERO,_=r.ZERO,C=r.mul(x,x),j=r.mul(b,b),V=r.mul(w,w),B=r.mul(x,b);return B=r.add(B,B),_=r.mul(x,w),_=r.add(_,_),A=r.mul(y,_),O=r.mul(m,V),O=r.add(A,O),A=r.sub(j,O),O=r.add(j,O),O=r.mul(A,O),A=r.mul(B,A),_=r.mul(m,_),V=r.mul(y,V),B=r.sub(C,V),B=r.mul(y,B),B=r.add(B,_),_=r.add(C,C),C=r.add(_,C),C=r.add(C,V),C=r.mul(C,B),O=r.add(O,C),V=r.mul(b,w),V=r.add(V,V),C=r.mul(V,B),A=r.sub(A,C),_=r.mul(V,j),_=r.add(_,_),_=r.add(_,_),new f(A,O,_)}add(y){u(y);const{px:g,py:m,pz:x}=this,{px:b,py:w,pz:A}=y;let O=r.ZERO,_=r.ZERO,C=r.ZERO;const j=e.a,V=r.mul(e.b,D4);let B=r.mul(g,b),z=r.mul(m,w),Y=r.mul(x,A),H=r.add(g,m),L=r.add(b,w);H=r.mul(H,L),L=r.add(B,z),H=r.sub(H,L),L=r.add(g,x);let T=r.add(b,A);return L=r.mul(L,T),T=r.add(B,Y),L=r.sub(L,T),T=r.add(m,x),O=r.add(w,A),T=r.mul(T,O),O=r.add(z,Y),T=r.sub(T,O),C=r.mul(j,L),O=r.mul(V,Y),C=r.add(O,C),O=r.sub(z,C),C=r.add(z,C),_=r.mul(O,C),z=r.add(B,B),z=r.add(z,B),Y=r.mul(j,Y),L=r.mul(V,L),z=r.add(z,Y),Y=r.sub(B,Y),Y=r.mul(j,Y),L=r.add(L,Y),B=r.mul(z,L),_=r.add(_,B),B=r.mul(T,L),O=r.mul(H,O),O=r.sub(O,B),B=r.mul(H,z),C=r.mul(T,C),C=r.add(C,B),new f(O,_,C)}subtract(y){return this.add(y.negate())}is0(){return this.equals(f.ZERO)}wNAF(y){return h.wNAFCached(this,l,y,g=>{const m=r.invertBatch(g.map(x=>x.pz));return g.map((x,b)=>x.toAffine(m[b])).map(f.fromAffine)})}multiplyUnsafe(y){const g=f.ZERO;if(y===eo)return g;if(a(y),y===ss)return this;const{endo:m}=e;if(!m)return h.unsafeLadder(this,y);let{k1neg:x,k1:b,k2neg:w,k2:A}=m.splitScalar(y),O=g,_=g,C=this;for(;b>eo||A>eo;)b&ss&&(O=O.add(C)),A&ss&&(_=_.add(C)),C=C.double(),b>>=ss,A>>=ss;return x&&(O=O.negate()),w&&(_=_.negate()),_=new f(r.mul(_.px,m.beta),_.py,_.pz),O.add(_)}multiply(y){a(y);let g=y,m,x;const{endo:b}=e;if(b){const{k1neg:w,k1:A,k2neg:O,k2:_}=b.splitScalar(g);let{p:C,f:j}=this.wNAF(A),{p:V,f:B}=this.wNAF(_);C=h.constTimeNegate(w,C),V=h.constTimeNegate(O,V),V=new f(r.mul(V.px,b.beta),V.py,V.pz),m=C.add(V),x=j.add(B)}else{const{p:w,f:A}=this.wNAF(g);m=w,x=A}return f.normalizeZ([m,x])[0]}multiplyAndAddUnsafe(y,g,m){const x=f.BASE,b=(A,O)=>O===eo||O===ss||!A.equals(x)?A.multiplyUnsafe(O):A.multiply(O),w=b(this,g).add(b(y,m));return w.is0()?void 0:w}toAffine(y){const{px:g,py:m,pz:x}=this,b=this.is0();y==null&&(y=b?r.ONE:r.inv(x));const w=r.mul(g,y),A=r.mul(m,y),O=r.mul(x,y);if(b)return{x:r.ZERO,y:r.ZERO};if(!r.eql(O,r.ONE))throw new Error("invZ was invalid");return{x:w,y:A}}isTorsionFree(){const{h:y,isTorsionFree:g}=e;if(y===ss)return!0;if(g)return g(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:y,clearCofactor:g}=e;return y===ss?this:g?g(f,this):this.multiplyUnsafe(e.h)}toRawBytes(y=!0){return this.assertValidity(),n(f,this,y)}toHex(y=!0){return zf(this.toRawBytes(y))}}f.BASE=new f(e.Gx,e.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);const d=e.nBitLength,h=Lre(f,e.endo?Math.ceil(d/2):d);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:o}}function Vre(t){const e=mM(t);return my(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function $re(t){const e=Vre(t),{Fp:r,n}=e,s=r.BYTES+1,i=2*r.BYTES+1;function o(L){return eozf(Gf(L,e.nByteLength));function p(L){const T=n>>ss;return L>T}function y(L){return p(L)?a(-L):L}const g=(L,T,P)=>tl(L.slice(T,P));class m{constructor(T,P,R){this.r=T,this.s=P,this.recovery=R,this.assertValidity()}static fromCompact(T){const P=e.nByteLength;return T=Ss("compactSignature",T,P*2),new m(g(T,0,P),g(T,P,2*P))}static fromDER(T){const{r:P,s:R}=wc.toSig(Ss("DER",T));return new m(P,R)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(T){return new m(this.r,this.s,T)}recoverPublicKey(T){const{r:P,s:R,recovery:I}=this,U=_(Ss("msgHash",T));if(I==null||![0,1,2,3].includes(I))throw new Error("recovery id invalid");const F=I===2||I===3?P+e.n:P;if(F>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const X=I&1?"03":"02",oe=l.fromHex(X+h(F)),ae=c(F),ke=a(-U*ae),ve=a(R*ae),ie=l.BASE.multiplyAndAddUnsafe(oe,ke,ve);if(!ie)throw new Error("point at infinify");return ie.assertValidity(),ie}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Hf(this.toDERHex())}toDERHex(){return wc.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Hf(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const x={isValidPrivateKey(L){try{return u(L),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const L=vM(e.n);return Mre(e.randomBytes(L),e.n)},precompute(L=8,T=l.BASE){return T._setWindowSize(L),T.multiply(BigInt(3)),T}};function b(L,T=!0){return l.fromPrivateKey(L).toRawBytes(T)}function w(L){const T=L instanceof Uint8Array,P=typeof L=="string",R=(T||P)&&L.length;return T?R===s||R===i:P?R===2*s||R===2*i:L instanceof l}function A(L,T,P=!0){if(w(L))throw new Error("first arg must be private key");if(!w(T))throw new Error("second arg must be public key");return l.fromHex(T).multiply(u(L)).toRawBytes(P)}const O=e.bits2int||function(L){const T=tl(L),P=L.length*8-e.nBitLength;return P>0?T>>BigInt(P):T},_=e.bits2int_modN||function(L){return a(O(L))},C=RC(e.nBitLength);function j(L){if(typeof L!="bigint")throw new Error("bigint expected");if(!(eo<=L&&LBe in P))throw new Error("sign() legacy options not supported");const{hash:R,randomBytes:I}=e;let{lowS:U,prehash:F,extraEntropy:X}=P;U==null&&(U=!0),L=Ss("msgHash",L),F&&(L=Ss("prehashed msgHash",R(L)));const oe=_(L),ae=u(T),ke=[j(ae),j(oe)];if(X!=null){const Be=X===!0?I(r.BYTES):X;ke.push(Ss("extraEntropy",Be))}const ve=Zh(...ke),ie=oe;function Me(Be){const Te=O(Be);if(!d(Te))return;const De=c(Te),ze=l.BASE.multiply(Te).toAffine(),at=a(ze.x);if(at===eo)return;const qe=a(De*a(ie+at*ae));if(qe===eo)return;let Kr=(ze.x===at?0:2)|Number(ze.y&ss),vs=qe;return U&&p(qe)&&(vs=y(qe),Kr^=1),new m(at,vs,Kr)}return{seed:ve,k2sig:Me}}const B={lowS:e.lowS,prehash:!1},z={lowS:e.lowS,prehash:!1};function Y(L,T,P=B){const{seed:R,k2sig:I}=V(L,T,P),U=e;return hM(U.hash.outputLen,U.nByteLength,U.hmac)(R,I)}l.BASE._setWindowSize(8);function H(L,T,P,R=z){var ze;const I=L;if(T=Ss("msgHash",T),P=Ss("publicKey",P),"strict"in R)throw new Error("options.strict was renamed to lowS");const{lowS:U,prehash:F}=R;let X,oe;try{if(typeof I=="string"||I instanceof Uint8Array)try{X=m.fromDER(I)}catch(at){if(!(at instanceof wc.Err))throw at;X=m.fromCompact(I)}else if(typeof I=="object"&&typeof I.r=="bigint"&&typeof I.s=="bigint"){const{r:at,s:qe}=I;X=new m(at,qe)}else throw new Error("PARSE");oe=l.fromHex(P)}catch(at){if(at.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(U&&X.hasHighS())return!1;F&&(T=e.hash(T));const{r:ae,s:ke}=X,ve=_(T),ie=c(ke),Me=a(ve*ie),Be=a(ae*ie),Te=(ze=l.BASE.multiplyAndAddUnsafe(oe,Me,Be))==null?void 0:ze.toAffine();return Te?a(Te.x)===ae:!1}return{CURVE:e,getPublicKey:b,getSharedSecret:A,sign:Y,verify:H,ProjectivePoint:l,Signature:m,utils:x}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function zre(t){return{hash:t,hmac:(e,...r)=>Gm(t,e,pte(...r)),randomBytes:vte}}function Hre(t,e){const r=n=>$re({...t,...zre(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const gM=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),L4=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Gre=BigInt(1),Zw=BigInt(2),j4=(t,e)=>(t+e/Zw)/e;function qre(t){const e=gM,r=BigInt(3),n=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,f=qn(u,r,e)*u%e,d=qn(f,r,e)*u%e,h=qn(d,Zw,e)*l%e,p=qn(h,s,e)*h%e,y=qn(p,i,e)*p%e,g=qn(y,a,e)*y%e,m=qn(g,c,e)*g%e,x=qn(m,a,e)*y%e,b=qn(x,r,e)*u%e,w=qn(b,o,e)*p%e,A=qn(w,n,e)*l%e,O=qn(A,Zw,e);if(!e2.eql(e2.sqr(O),t))throw new Error("Cannot find square root");return O}const e2=Nre(gM,void 0,void 0,{sqrt:qre}),jo=Hre({a:BigInt(0),b:BigInt(7),Fp:e2,n:L4,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=L4,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Gre*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,o=BigInt("0x100000000000000000000000000000000"),a=j4(i*t,e),c=j4(-n*t,e);let l=dn(t-a*r-c*s,e),u=dn(-a*n-c*i,e);const f=l>o,d=u>o;if(f&&(l=e-l),d&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:l,k2neg:d,k2:u}}}},dd);BigInt(0);jo.ProjectivePoint;const vl="0x0000000000000000000000000000000000000000",B4="0x0000000000000000000000000000000000000000000000000000000000000000",Wre=`Ethereum Signed Message: -`,F4=BigInt(0),U4=BigInt(1),V4=BigInt(2),$4=BigInt(27),z4=BigInt(28),m1=BigInt(35),Fl={};function H4(t){return pl($r(t),32)}var Gu,qu,Wu,Dc;const bs=class bs{constructor(e,r,n,s){W(this,Gu,void 0);W(this,qu,void 0);W(this,Wu,void 0);W(this,Dc,void 0);$a(e,Fl,"Signature"),N(this,Gu,r),N(this,qu,n),N(this,Wu,s),N(this,Dc,null)}get r(){return S(this,Gu)}set r(e){M(Ru(e)===32,"invalid r","value",e),N(this,Gu,ne(e))}get s(){return S(this,qu)}set s(e){M(Ru(e)===32,"invalid s","value",e);const r=ne(e);M(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),N(this,qu,r)}get v(){return S(this,Wu)}set v(e){const r=_e(e,"value");M(r===27||r===28,"invalid v","v",e),N(this,Wu,r)}get networkV(){return S(this,Dc)}get legacyChainId(){const e=this.networkV;return e==null?null:bs.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=fe(this.s);return this.yParity&&(e[0]|=128),ne(e)}get compactSerialized(){return ot([this.r,this.yParityAndS])}get serialized(){return ot([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new bs(Fl,this.r,this.s,this.v);return this.networkV&&N(e,Dc,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=ye(e,"v");return r==$4||r==z4?F4:(M(r>=m1,"invalid EIP-155 v","v",e),(r-m1)/V4)}static getChainIdV(e,r){return ye(e)*V4+BigInt(35+r-27)}static getNormalizedV(e){const r=ye(e);return r===F4||r===$4?27:r===U4||r===z4?28:(M(r>=m1,"invalid v","v",e),r&U4?27:28)}static from(e){function r(l,u){M(l,u,"signature",e)}if(e==null)return new bs(Fl,B4,B4,27);if(typeof e=="string"){const l=fe(e,"signature");if(l.length===64){const u=ne(l.slice(0,32)),f=l.slice(32,64),d=f[0]&128?28:27;return f[0]&=127,new bs(Fl,u,ne(f),d)}if(l.length===65){const u=ne(l.slice(0,32)),f=l.slice(32,64);r((f[0]&128)===0,"non-canonical s");const d=bs.getNormalizedV(l[64]);return new bs(Fl,u,ne(f),d)}r(!1,"invalid raw signature length")}if(e instanceof bs)return e.clone();const n=e.r;r(n!=null,"missing r");const s=H4(n),i=function(l,u){if(l!=null)return H4(l);if(u!=null){r(vt(u,32),"invalid yParityAndS");const f=fe(u);return f[0]&=127,ne(f)}r(!1,"missing s")}(e.s,e.yParityAndS);r((fe(i)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(l,u,f){if(l!=null){const d=ye(l);return{networkV:d>=m1?d:void 0,v:bs.getNormalizedV(d)}}if(u!=null)return r(vt(u,32),"invalid yParityAndS"),{v:fe(u)[0]&128?28:27};if(f!=null){switch(_e(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new bs(Fl,s,i,a);return o&&N(c,Dc,o),r(e.yParity==null||_e(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};Gu=new WeakMap,qu=new WeakMap,Wu=new WeakMap,Dc=new WeakMap;let Us=bs;var Gi;const dc=class dc{constructor(e){W(this,Gi,void 0);M(Ru(e)===32,"invalid private key","privateKey","[REDACTED]"),N(this,Gi,ne(e))}get privateKey(){return S(this,Gi)}get publicKey(){return dc.computePublicKey(S(this,Gi))}get compressedPublicKey(){return dc.computePublicKey(S(this,Gi),!0)}sign(e){M(Ru(e)===32,"invalid digest length","digest",e);const r=jo.sign(br(e),br(S(this,Gi)),{lowS:!0});return Us.from({r:go(r.r,32),s:go(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=dc.computePublicKey(e);return ne(jo.getSharedSecret(br(S(this,Gi)),fe(r),!1))}static computePublicKey(e,r){let n=fe(e,"key");if(n.length===32){const i=jo.getPublicKey(n,!!r);return ne(i)}if(n.length===64){const i=new Uint8Array(65);i[0]=4,i.set(n,1),n=i}const s=jo.ProjectivePoint.fromHex(n);return ne(s.toRawBytes(r))}static recoverPublicKey(e,r){M(Ru(e)===32,"invalid digest length","digest",e);const n=Us.from(r);let s=jo.Signature.fromCompact(br(ot([n.r,n.s])));s=s.addRecoveryBit(n.yParity);const i=s.recoverPublicKey(br(e));return M(i!=null,"invalid signautre for digest","signature",r),"0x"+i.toHex(!1)}static addPoints(e,r,n){const s=jo.ProjectivePoint.fromHex(dc.computePublicKey(e).substring(2)),i=jo.ProjectivePoint.fromHex(dc.computePublicKey(r).substring(2));return"0x"+s.add(i).toHex(!!n)}};Gi=new WeakMap;let gi=dc;const Kre=BigInt(0),Qre=BigInt(36);function G4(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=fe(Ct(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const IC={};for(let t=0;t<10;t++)IC[String(t)]=String(t);for(let t=0;t<26;t++)IC[String.fromCharCode(65+t)]=String(10+t);const q4=15;function Yre(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>IC[n]).join("");for(;e.length>=q4;){let n=e.substring(0,q4);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}const Jre=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function Xre(t){t=t.toLowerCase();let e=Kre;for(let r=0;re.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return S(this,Lc)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return S(this,Lc)===!0?-1:S(this,Lc)===!1?this.value.length:null}static from(e,r){return new Li(Di,e,r)}static uint8(e){return he(e,8)}static uint16(e){return he(e,16)}static uint24(e){return he(e,24)}static uint32(e){return he(e,32)}static uint40(e){return he(e,40)}static uint48(e){return he(e,48)}static uint56(e){return he(e,56)}static uint64(e){return he(e,64)}static uint72(e){return he(e,72)}static uint80(e){return he(e,80)}static uint88(e){return he(e,88)}static uint96(e){return he(e,96)}static uint104(e){return he(e,104)}static uint112(e){return he(e,112)}static uint120(e){return he(e,120)}static uint128(e){return he(e,128)}static uint136(e){return he(e,136)}static uint144(e){return he(e,144)}static uint152(e){return he(e,152)}static uint160(e){return he(e,160)}static uint168(e){return he(e,168)}static uint176(e){return he(e,176)}static uint184(e){return he(e,184)}static uint192(e){return he(e,192)}static uint200(e){return he(e,200)}static uint208(e){return he(e,208)}static uint216(e){return he(e,216)}static uint224(e){return he(e,224)}static uint232(e){return he(e,232)}static uint240(e){return he(e,240)}static uint248(e){return he(e,248)}static uint256(e){return he(e,256)}static uint(e){return he(e,256)}static int8(e){return he(e,-8)}static int16(e){return he(e,-16)}static int24(e){return he(e,-24)}static int32(e){return he(e,-32)}static int40(e){return he(e,-40)}static int48(e){return he(e,-48)}static int56(e){return he(e,-56)}static int64(e){return he(e,-64)}static int72(e){return he(e,-72)}static int80(e){return he(e,-80)}static int88(e){return he(e,-88)}static int96(e){return he(e,-96)}static int104(e){return he(e,-104)}static int112(e){return he(e,-112)}static int120(e){return he(e,-120)}static int128(e){return he(e,-128)}static int136(e){return he(e,-136)}static int144(e){return he(e,-144)}static int152(e){return he(e,-152)}static int160(e){return he(e,-160)}static int168(e){return he(e,-168)}static int176(e){return he(e,-176)}static int184(e){return he(e,-184)}static int192(e){return he(e,-192)}static int200(e){return he(e,-200)}static int208(e){return he(e,-208)}static int216(e){return he(e,-216)}static int224(e){return he(e,-224)}static int232(e){return he(e,-232)}static int240(e){return he(e,-240)}static int248(e){return he(e,-248)}static int256(e){return he(e,-256)}static int(e){return he(e,-256)}static bytes1(e){return Je(e,1)}static bytes2(e){return Je(e,2)}static bytes3(e){return Je(e,3)}static bytes4(e){return Je(e,4)}static bytes5(e){return Je(e,5)}static bytes6(e){return Je(e,6)}static bytes7(e){return Je(e,7)}static bytes8(e){return Je(e,8)}static bytes9(e){return Je(e,9)}static bytes10(e){return Je(e,10)}static bytes11(e){return Je(e,11)}static bytes12(e){return Je(e,12)}static bytes13(e){return Je(e,13)}static bytes14(e){return Je(e,14)}static bytes15(e){return Je(e,15)}static bytes16(e){return Je(e,16)}static bytes17(e){return Je(e,17)}static bytes18(e){return Je(e,18)}static bytes19(e){return Je(e,19)}static bytes20(e){return Je(e,20)}static bytes21(e){return Je(e,21)}static bytes22(e){return Je(e,22)}static bytes23(e){return Je(e,23)}static bytes24(e){return Je(e,24)}static bytes25(e){return Je(e,25)}static bytes26(e){return Je(e,26)}static bytes27(e){return Je(e,27)}static bytes28(e){return Je(e,28)}static bytes29(e){return Je(e,29)}static bytes30(e){return Je(e,30)}static bytes31(e){return Je(e,31)}static bytes32(e){return Je(e,32)}static address(e){return new Li(Di,"address",e)}static bool(e){return new Li(Di,"bool",!!e)}static bytes(e){return new Li(Di,"bytes",e)}static string(e){return new Li(Di,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new Li(Di,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===W4}static dereference(e,r){if(Li.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Lc=new WeakMap;let zr=Li;class tne extends Co{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=zr.dereference(r,"string");try{n=Xe(n)}catch(s){return this._throwError(s.message,r)}return e.writeValue(n)}decode(e){return Xe(go(e.readValue(),20))}}class rne extends Co{constructor(r){super(r.name,r.type,"_",r.dynamic);G(this,"coder");this.coder=r}defaultValue(){return this.coder.defaultValue()}encode(r,n){return this.coder.encode(r,n)}decode(r){return this.coder.decode(r)}}function bM(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return J(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),J(!c[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),c[u]=!0,r[u]})}else M(!1,"invalid tuple value","tuple",r);M(e.length===n.length,"types/value length mismatch","tuple",r);let s=new Ww,i=new Ww,o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let f=i.length;c.encode(i,u);let d=s.writeUpdatableValue();o.push(h=>{d(h+f)})}else c.encode(s,u)}),o.forEach(c=>{c(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function wM(t,e){let r=[],n=[],s=t.subReader(0);return e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readIndex(),c=s.subReader(a);try{o=i.decode(c)}catch(l){if(Vr(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(Vr(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}if(o==null)throw new Error("investigate");r.push(o),n.push(i.localName||null)}),Uf.fromItems(r,n)}class nne extends Co{constructor(r,n,s){const i=r.type+"["+(n>=0?n:"")+"]",o=n===-1||r.dynamic;super("array",i,s,o);G(this,"coder");G(this,"length");me(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let s=0;so||s<-(o+une))&&this._throwError("value out-of-bounds",n),s=u7(s,8*rn)}else(sbc(i,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(s)}decode(r){let n=bc(r.readValue(),this.size*8);return this.signed&&(n=c0(n,this.size*8)),n}}class hne extends EM{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Sr(zr.dereference(r,"string")))}decode(e){return u0(super.decode(e))}}class g1 extends Co{constructor(r,n){let s=!1;const i=[];r.forEach(a=>{a.dynamic&&(s=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,n,s);G(this,"coders");me(this,{coders:Object.freeze(r.slice())})}defaultValue(){const r=[];this.coders.forEach(s=>{r.push(s.defaultValue())});const n=this.coders.reduce((s,i)=>{const o=i.localName;return o&&(s[o]||(s[o]=0),s[o]++),s},{});return this.coders.forEach((s,i)=>{let o=s.localName;!o||n[o]!==1||(o==="length"&&(o="_length"),r[o]==null&&(r[o]=r[i]))}),Object.freeze(r)}encode(r,n){const s=zr.dereference(n,"tuple");return bM(r,this.coders,s)}decode(r){return wM(r,this.coders)}}function Cr(t){return Ct(Sr(t))}var pne="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const K4=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),Q4=4;function yne(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),s=1,i=[0,1];for(let A=1;A>--c&1}const f=31,d=2**f,h=d>>>1,p=h>>1,y=d-1;let g=0;for(let A=0;A1;){let V=O+_>>>1;A>>1|u(),C=C<<1^h,j=(j^h)<<1|h|1;x=C,b=1+j-C}let w=n-4;return m.map(A=>{switch(A-w){case 3:return w+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return w+256+(t[a++]<<8|t[a++]);case 1:return w+t[a++];default:return A-1}})}function vne(t){let e=0;return()=>t[e++]}function SM(t){return vne(yne(mne(t)))}function mne(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((s,i)=>e[s.charCodeAt(0)]=i);let r=t.length,n=new Uint8Array(6*r>>3);for(let s=0,i=0,o=0,a=0;s=8&&(n[i++]=a>>(o-=8));return n}function gne(t){return t&1?~t>>1:t>>1}function xne(t,e){let r=Array(t);for(let n=0,s=0;n{let e=ep(t);if(e.length)return e})}function AM(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(bne(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(wne(r,t))}return e.flat()}function tp(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function kM(t,e,r){let n=Array(t).fill().map(()=>[]);for(let s=0;sn[o].push(i));return n}function bne(t,e){let r=1+e(),n=e(),s=tp(e);return kM(s.length,1+t,e).flatMap((o,a)=>{let[c,...l]=o;return Array(s[a]).fill().map((u,f)=>{let d=f*n;return[c+f*r,l.map(h=>h+d)]})})}function wne(t,e){let r=1+e();return kM(r,1+t,e).map(s=>[s[0],s.slice(1)])}function Ene(t){let e=[],r=ep(t);return s(n([]),[]),e;function n(i){let o=t(),a=tp(()=>{let c=ep(t).map(l=>r[l]);if(c.length)return n(c)});return{S:o,B:a,Q:i}}function s({S:i,B:o},a,c){if(!(i&4&&c===a[a.length-1])){i&2&&(c=a[a.length-1]),i&1&&e.push(a);for(let l of o)for(let u of l.Q)s(l,[...a,u],c)}}}function Sne(t){return t.toString(16).toUpperCase().padStart(2,"0")}function TM(t){return`{${Sne(t)}}`}function Cne(t){let e=[];for(let r=0,n=t.length;r>24&255}function IM(t){return t&16777215}let t2,Y4,r2,tv;function _ne(){let t=SM(kne);t2=new Map(CM(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),Y4=new Set(ep(t)),r2=new Map,tv=new Map;for(let[e,r]of AM(t)){if(!Y4.has(e)&&r.length==2){let[n,s]=r,i=tv.get(n);i||(i=new Map,tv.set(n,i)),i.set(s,e)}r2.set(e,r.reverse())}}function OM(t){return t>=rp&&t=d0&&t=h0&&ep0&&e0&&s(p0+l)}else{let o=r2.get(i);o?r.push(...o):s(i)}if(!r.length)break;i=r.pop()}if(n&&e.length>1){let i=Xd(e[0]);for(let o=1;o0&&s>=o)o==0?(e.push(n,...r),r.length=0,n=a):r.push(a),s=o;else{let c=Nne(n,a);c>=0?n=c:s==0&&o==0?(e.push(n),n=a):(r.push(a),s=o)}}return n>=0&&e.push(n,...r),e}function NM(t){return _M(t).map(IM)}function Dne(t){return Mne(_M(t))}const J4=45,MM=".",DM=65039,LM=1,v0=t=>Array.from(t);function np(t,e){return t.P.has(e)||t.Q.has(e)}class Lne extends Array{get is_emoji(){return!0}}let n2,jM,Ec,s2,BM,_u,Cx,ql,oc,X4,i2;function OC(){if(n2)return;let t=SM(pne);const e=()=>ep(t),r=()=>new Set(e()),n=(u,f)=>f.forEach(d=>u.add(d));n2=new Map(AM(t)),jM=r(),Ec=e(),s2=new Set(e().map(u=>Ec[u])),Ec=new Set(Ec),BM=r(),r();let s=CM(t),i=t();const o=()=>{let u=new Set;return e().forEach(f=>n(u,s[f])),n(u,e()),u};_u=tp(u=>{let f=tp(t).map(d=>d+96);if(f.length){let d=u>=i;f[0]-=32,f=qf(f),d&&(f=`Restricted[${f}]`);let h=o(),p=o(),y=!t();return{N:f,P:h,Q:p,M:y,R:d}}}),Cx=r(),ql=new Map;let a=e().concat(v0(Cx)).sort((u,f)=>u-f);a.forEach((u,f)=>{let d=t(),h=a[f]=d?a[f-d]:{V:[],M:new Map};h.V.push(u),Cx.has(u)||ql.set(u,h)});for(let{V:u,M:f}of new Set(ql.values())){let d=[];for(let p of u){let y=_u.filter(m=>np(m,p)),g=d.find(({G:m})=>y.some(x=>m.has(x)));g||(g={G:new Set,V:[]},d.push(g)),g.V.push(p),n(g.G,y)}let h=d.flatMap(p=>v0(p.G));for(let{G:p,V:y}of d){let g=new Set(h.filter(m=>!p.has(m)));for(let m of y)f.set(m,g)}}oc=new Set;let c=new Set;const l=u=>oc.has(u)?c.add(u):oc.add(u);for(let u of _u){for(let f of u.P)l(f);for(let f of u.Q)l(f)}for(let u of oc)!ql.has(u)&&!c.has(u)&&ql.set(u,LM);n(oc,NM(oc)),X4=Ene(t).map(u=>Lne.from(u)).sort(Ane),i2=new Map;for(let u of X4){let f=[i2];for(let d of u){let h=f.map(p=>{let y=p.get(d);return y||(y=new Map,p.set(d,y)),y});d===DM?f.push(...h):f=h}for(let d of f)d.V=u}}function _C(t){return(FM(t)?"":`${NC(Km([t]))} `)+TM(t)}function NC(t){return`"${t}"‎`}function jne(t){if(t.length>=4&&t[2]==J4&&t[3]==J4)throw new Error(`invalid label extension: "${qf(t.slice(0,4))}"`)}function Bne(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function Fne(t){let e=t[0],r=K4.get(e);if(r)throw xh(`leading ${r}`);let n=t.length,s=-1;for(let i=1;ie&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let s=0,i=t.length;for(let o=0;o{let i=Cne(s),o={input:i,offset:n};n+=i.length+1;try{let a=o.tokens=Wne(i,e,r),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(Bne(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))jne(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(Ec.has(u[0]))throw xh("leading combining mark");for(let y=1;yo.has(a)):v0(o),!r.length)return}else n.push(s)}if(r){for(let s of r)if(n.every(i=>np(s,i)))throw new Error(`whole-script confusable: ${t.N}/${s.N}`)}}function Hne(t){let e=_u;for(let r of t){let n=e.filter(s=>np(s,r));if(!n.length)throw _u.some(s=>np(s,r))?VM(e[0],r):UM(r);if(e=n,n.length==1)break}return e}function Gne(t){return t.map(({input:e,error:r,output:n})=>{if(r){let s=r.message;throw new Error(t.length==1?s:`Invalid label ${NC(Km(e,63))}: ${s}`)}return qf(n)}).join(MM)}function UM(t){return new Error(`disallowed character: ${_C(t)}`)}function VM(t,e){let r=_C(e),n=_u.find(s=>s.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function xh(t){return new Error(`illegal placement: ${t}`)}function qne(t,e){for(let r of e)if(!np(t,r))throw VM(t,r);if(t.M){let r=NM(e);for(let n=1,s=r.length;nQ4)throw new Error(`excessive non-spacing marks: ${NC(Km(r.slice(n-1,i)))} (${i-n}/${Q4})`);n=i}}}function Wne(t,e,r){let n=[],s=[];for(t=t.slice().reverse();t.length;){let i=Qne(t);if(i)s.length&&(n.push(e(s)),s=[]),n.push(r(i));else{let o=t.pop();if(oc.has(o))s.push(o);else{let a=n2.get(o);if(a)s.push(...a);else if(!jM.has(o))throw UM(o)}}}return s.length&&n.push(e(s)),n}function Kne(t){return t.filter(e=>e!=DM)}function Qne(t,e){let r=i2,n,s=t.length;for(;s&&(r=r.get(t[--s]),!!r);){let{V:i}=r;i&&(n=i,e&&e.push(...t.slice(s).reverse()),t.length=s)}return n}const $M=new Uint8Array(32);$M.fill(0);function Z4(t){return M(t.length!==0,"invalid ENS name; empty component","comp",t),t}function zM(t){const e=Sr(Yne(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s{M(n.length<=r,`label ${JSON.stringify(t)} exceeds ${r} bytes`,"name",t);const s=new Uint8Array(n.length+1);return s.set(n,1),s[0]=s.length-1,s})))+"00"}function Ax(t,e){return{address:Xe(t),storageKeys:e.map((r,n)=>(M(vt(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function Pl(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(M(r.length===2,"invalid slot set",`value[${n}]`,r),Ax(r[0],r[1])):(M(r!=null&&typeof r=="object","invalid address-slot set","value",t),Ax(r.address,r.storageKeys)));M(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return Ax(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function gy(t){let e;return typeof t=="string"?e=gi.computePublicKey(t,!1):e=t.publicKey,Xe(Ct("0x"+e.substring(4)).substring(26))}function Xne(t,e){return gy(gi.recoverPublicKey(t,e))}const lr=BigInt(0),Zne=BigInt(2),ese=BigInt(27),tse=BigInt(28),rse=BigInt(35),nse=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),kx=4096*32;function e3(t,e){let r=t.toString(16);for(;r.length<2;)r="0"+r;return r+=ys(e).substring(4),"0x"+r}function Qm(t){return t==="0x"?null:Xe(t)}function MC(t,e){try{return Pl(t)}catch(r){M(!1,r.message,e,t)}}function xy(t,e){return t==="0x"?0:_e(t,e)}function Qt(t,e){if(t==="0x")return lr;const r=ye(t,e);return M(r<=nse,"value exceeds uint size",e,r),r}function bt(t,e){const r=ye(t,"value"),n=$r(r);return M(n.length<=32,"value too large",`tx.${e}`,r),n}function DC(t){return Pl(t).map(e=>[e.address,e.storageKeys])}function sse(t,e){M(Array.isArray(t),`invalid ${e}`,"value",t);for(let r=0;rs.data),r.map(s=>s.commitment),r.map(s=>s.proof)])]):ot(["0x03",yl(n)])}var Zs,Ku,Qu,Yu,Ju,Xu,Zu,ef,tf,rf,nf,sf,jc,Ko,qi,Qo,of,rv;const ji=class ji{constructor(){W(this,of);W(this,Zs,void 0);W(this,Ku,void 0);W(this,Qu,void 0);W(this,Yu,void 0);W(this,Ju,void 0);W(this,Xu,void 0);W(this,Zu,void 0);W(this,ef,void 0);W(this,tf,void 0);W(this,rf,void 0);W(this,nf,void 0);W(this,sf,void 0);W(this,jc,void 0);W(this,Ko,void 0);W(this,qi,void 0);W(this,Qo,void 0);N(this,Zs,null),N(this,Ku,null),N(this,Yu,0),N(this,Ju,lr),N(this,Xu,null),N(this,Zu,null),N(this,ef,null),N(this,Qu,"0x"),N(this,tf,lr),N(this,rf,lr),N(this,nf,null),N(this,sf,null),N(this,jc,null),N(this,Ko,null),N(this,Qo,null),N(this,qi,null)}get type(){return S(this,Zs)}set type(e){switch(e){case null:N(this,Zs,null);break;case 0:case"legacy":N(this,Zs,0);break;case 1:case"berlin":case"eip-2930":N(this,Zs,1);break;case 2:case"london":case"eip-1559":N(this,Zs,2);break;case 3:case"cancun":case"eip-4844":N(this,Zs,3);break;default:M(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=S(this,Ku);return e==null&&this.type===3?vl:e}set to(e){N(this,Ku,e==null?null:Xe(e))}get nonce(){return S(this,Yu)}set nonce(e){N(this,Yu,_e(e,"value"))}get gasLimit(){return S(this,Ju)}set gasLimit(e){N(this,Ju,ye(e))}get gasPrice(){const e=S(this,Xu);return e==null&&(this.type===0||this.type===1)?lr:e}set gasPrice(e){N(this,Xu,e==null?null:ye(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=S(this,Zu);return e??(this.type===2||this.type===3?lr:null)}set maxPriorityFeePerGas(e){N(this,Zu,e==null?null:ye(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=S(this,ef);return e??(this.type===2||this.type===3?lr:null)}set maxFeePerGas(e){N(this,ef,e==null?null:ye(e,"maxFeePerGas"))}get data(){return S(this,Qu)}set data(e){N(this,Qu,ne(e))}get value(){return S(this,tf)}set value(e){N(this,tf,ye(e,"value"))}get chainId(){return S(this,rf)}set chainId(e){N(this,rf,ye(e))}get signature(){return S(this,nf)||null}set signature(e){N(this,nf,e==null?null:Us.from(e))}get accessList(){const e=S(this,sf)||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){N(this,sf,e==null?null:Pl(e))}get maxFeePerBlobGas(){const e=S(this,jc);return e==null&&this.type===3?lr:e}set maxFeePerBlobGas(e){N(this,jc,e==null?null:ye(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=S(this,Ko);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){M(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let r=0;rObject.assign({},e))}set blobs(e){if(e==null){N(this,Qo,null);return}const r=[],n=[];for(let s=0;s=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,s=S(this,jc)!=null||S(this,Ko);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&J(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),J(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),J(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):r?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(s&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return ji.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new ji;if(typeof e=="string"){const n=fe(e);if(n[0]>=127)return ji.from(ise(n));switch(n[0]){case 1:return ji.from(lse(n));case 2:return ji.from(ase(n));case 3:return ji.from(fse(n))}J(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new ji;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(r.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=Us.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.blobVersionedHashes!=null&&(r.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(r.kzg=e.kzg),e.blobs!=null&&(r.blobs=e.blobs),e.hash!=null&&(M(r.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),M(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(M(r.isSigned(),"unsigned transaction cannot define '.from'","tx",e),M(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};Zs=new WeakMap,Ku=new WeakMap,Qu=new WeakMap,Yu=new WeakMap,Ju=new WeakMap,Xu=new WeakMap,Zu=new WeakMap,ef=new WeakMap,tf=new WeakMap,rf=new WeakMap,nf=new WeakMap,sf=new WeakMap,jc=new WeakMap,Ko=new WeakMap,qi=new WeakMap,Qo=new WeakMap,of=new WeakSet,rv=function(e,r){J(!e||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=e?this.signature:null;switch(this.inferType()){case 0:return ose(this,n);case 1:return use(this,n);case 2:return cse(this,n);case 3:return dse(this,n,r?this.blobs:null)}J(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let sp=ji;function hse(t){return typeof t=="string"&&(t=Sr(t)),Ct(ot([Sr(Wre),Sr(String(t.length)),t]))}const HM=new Uint8Array(32);HM.fill(0);const pse=BigInt(-1),GM=BigInt(0),qM=BigInt(1),yse=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function vse(t){const e=fe(t),r=e.length%32;return r?ot([e,HM.slice(r)]):ne(e)}const mse=go(qM,32),gse=go(GM,32),t3={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Tx=["name","version","chainId","verifyingContract","salt"];function r3(t){return function(e){return M(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const xse={name:r3("name"),version:r3("version"),chainId:function(t){const e=ye(t,"domain.chainId");return M(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):yu(e)},verifyingContract:function(t){try{return Xe(t).toLowerCase()}catch{}M(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=fe(t,"domain.salt");return M(e.length===32,'invalid domain value "salt"',"domain.salt",t),ne(e)}};function Px(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const r=e[1]==="",n=parseInt(e[2]);M(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",t);const s=bc(yse,r?n-1:n),i=r?(s+qM)*pse:GM;return function(o){const a=ye(o,"value");return M(a>=i&&a<=s,`value out-of-bounds for ${t}`,"value",a),go(r?u7(a,256):a,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return M(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const s=fe(n);return M(s.length===r,`invalid length for ${t}`,"value",n),vse(n)}}}switch(t){case"address":return function(e){return pl(Xe(e),32)};case"bool":return function(e){return e?mse:gse};case"bytes":return function(e){return Ct(e)};case"string":return function(e){return Cr(e)}}return null}function n3(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}function x1(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var Ip,Wi,af,j0,WM;const Xn=class Xn{constructor(e){W(this,j0);G(this,"primaryType");W(this,Ip,void 0);W(this,Wi,void 0);W(this,af,void 0);N(this,Wi,new Map),N(this,af,new Map);const r=new Map,n=new Map,s=new Map,i={};Object.keys(e).forEach(c=>{i[c]=e[c].map(({name:l,type:u})=>{let{base:f,index:d}=x1(u);return f==="int"&&!e.int&&(f="int256"),f==="uint"&&!e.uint&&(f="uint256"),{name:l,type:f+(d||"")}}),r.set(c,new Set),n.set(c,[]),s.set(c,new Set)}),N(this,Ip,JSON.stringify(i));for(const c in i){const l=new Set;for(const u of i[c]){M(!l.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(c)}`,"types",e),l.add(u.name);const f=x1(u.type).base;M(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),!Px(f)&&(M(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),n.get(f).push(c),r.get(c).add(f))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);M(o.length!==0,"missing primary type","types",e),M(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),me(this,{primaryType:o[0]});function a(c,l){M(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(const u of r.get(c))if(n.has(u)){a(u,l);for(const f of l)s.get(f).add(u)}l.delete(c)}a(this.primaryType,new Set);for(const[c,l]of s){const u=Array.from(l);u.sort(),S(this,Wi).set(c,n3(c,i[c])+u.map(f=>n3(f,i[f])).join(""))}}get types(){return JSON.parse(S(this,Ip))}getEncoder(e){let r=S(this,af).get(e);return r||(r=ee(this,j0,WM).call(this,e),S(this,af).set(e,r)),r}encodeType(e){const r=S(this,Wi).get(e);return M(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Ct(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(Px(e))return n(e,r);const s=x1(e).array;if(s)return M(s.count===-1||s.count===r.length,`array length mismatch; expected length ${s.count}`,"value",r),r.map(o=>this._visit(s.prefix,o,n));const i=this.types[e];if(i)return i.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{});M(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Xn(e)}static getPrimaryType(e){return Xn.from(e).primaryType}static hashStruct(e,r,n){return Xn.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const s=t3[n];M(s,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>Tx.indexOf(n.name)-Tx.indexOf(s.name)),Xn.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return ot(["0x1901",Xn.hashDomain(e),Xn.from(r).hash(n)])}static hash(e,r,n){return Ct(Xn.encode(e,r,n))}static async resolveNames(e,r,n,s){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const i={};e.verifyingContract&&!vt(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Xn.from(r);o.visit(n,(a,c)=>(a==="address"&&!vt(c,20)&&(i[c]="0x"),c));for(const a in i)i[a]=await s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&i[c]?i[c]:c),{domain:e,value:n}}static getPayload(e,r,n){Xn.hashDomain(e);const s={},i=[];Tx.forEach(c=>{const l=e[c];l!=null&&(s[c]=xse[c](l),i.push({name:c,type:t3[c]}))});const o=Xn.from(r);r=o.types;const a=Object.assign({},r);return M(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return ne(fe(l));if(c.match(/^u?int/))return ye(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return M(typeof l=="string","invalid string","value",l),l}M(!1,"unsupported type","type",c)})}}};Ip=new WeakMap,Wi=new WeakMap,af=new WeakMap,j0=new WeakSet,WM=function(e){{const s=Px(e);if(s)return s}const r=x1(e).array;if(r){const s=r.prefix,i=this.getEncoder(s);return o=>{M(r.count===-1||r.count===o.length,`array length mismatch; expected length ${r.count}`,"value",o);let a=o.map(i);return S(this,Wi).has(s)&&(a=a.map(Ct)),Ct(ot(a))}}const n=this.types[e];if(n){const s=Cr(S(this,Wi).get(e));return i=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(i[a]);return S(this,Wi).has(c)?Ct(l):l});return o.unshift(s),ot(o)}}M(!1,`unknown type: ${e}`,"type",e)};let Kf=Xn;function nn(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const bse="external public payable override",wse=nn(bse.split(" ")),KM="constant external internal payable private public pure view override",Ese=nn(KM.split(" ")),QM="constructor error event fallback function receive struct",YM=nn(QM.split(" ")),JM="calldata memory storage payable indexed",Sse=nn(JM.split(" ")),Cse="tuple returns",Ase=[QM,JM,Cse,KM].join(" "),kse=nn(Ase.split(" ")),Tse={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},Pse=new RegExp("^(\\s*)"),Rse=new RegExp("^([0-9]+)"),Ise=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),XM=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),ZM=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var vr,Ps,Op,a2;const B0=class B0{constructor(e){W(this,Op);W(this,vr,void 0);W(this,Ps,void 0);N(this,vr,0),N(this,Ps,e.slice())}get offset(){return S(this,vr)}get length(){return S(this,Ps).length-S(this,vr)}clone(){return new B0(S(this,Ps))}reset(){N(this,vr,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const r=this.peek();throw new Error(`expected ${e}; got ${r.type} ${JSON.stringify(r.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=ee(this,Op,a2).call(this,S(this,vr)+1,e.match+1);return N(this,vr,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;S(this,vr)=S(this,Ps).length)throw new Error("out-of-bounds");return S(this,Ps)[S(this,vr)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return Ed(this,vr)._++,e}toString(){const e=[];for(let r=S(this,vr);r`}};vr=new WeakMap,Ps=new WeakMap,Op=new WeakSet,a2=function(e=0,r=0){return new B0(S(this,Ps).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let Vs=B0;function Ha(t){const e=[],r=o=>{const a=i0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;u=f+u,e[e.length-1].value=_e(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(a=o.match(Ise),a){if(c.text=a[1],i+=c.text.length,kse.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(ZM)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(Rse),a){c.text=a[1],c.type="NUMBER",i+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${i}`)}return new Vs(e.map(o=>Object.freeze(o)))}function s3(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function Ym(t,e){if(e.peekKeyword(YM)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function bo(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function eD(t){let e=bo(t,Ese);return s3(e,nn("constant payable nonpayable".split(" "))),s3(e,nn("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function lo(t,e){return t.popParams().map(r=>Ar.from(r,e))}function tD(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return ye(t.pop().text);throw new Error("invalid gas")}return null}function ml(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const Ose=new RegExp(/^(.*)\[([0-9]*)\]$/);function i3(t){const e=t.match(ZM);if(M(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);M(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);M(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const Pt={},bn=Symbol.for("_ethers_internal"),o3="_ParamTypeInternal",a3="_ErrorInternal",c3="_EventInternal",l3="_ConstructorInternal",u3="_FallbackInternal",f3="_FunctionInternal",d3="_StructInternal";var cf,nv;const Zn=class Zn{constructor(e,r,n,s,i,o,a,c){W(this,cf);G(this,"name");G(this,"type");G(this,"baseType");G(this,"indexed");G(this,"components");G(this,"arrayLength");G(this,"arrayChildren");if($a(e,Pt,"ParamType"),Object.defineProperty(this,bn,{value:o3}),o&&(o=Object.freeze(o.slice())),s==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(s==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");me(this,{name:r,type:n,baseType:s,indexed:i,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const i=JSON.parse(this.arrayChildren.format("json"));return i.name=n,i.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(i)}const s={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(s.indexed=this.indexed),this.isTuple()&&(s.components=this.components.map(i=>JSON.parse(i.format(e)))),JSON.stringify(s)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(s=>n.arrayChildren.walk(s,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((s,i)=>n.components[i].walk(s,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],s=[e];return ee(this,cf,nv).call(this,n,e,r,i=>{s[0]=i}),n.length&&await Promise.all(n),s[0]}static from(e,r){if(Zn.isParamType(e))return e;if(typeof e=="string")try{return Zn.from(Ha(e),r)}catch{M(!1,"invalid param type","obj",e)}else if(e instanceof Vs){let a="",c="",l=null;bo(e,nn(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(y=>Zn.from(y)),a=`tuple(${l.map(y=>y.format()).join(",")})`):(a=i3(e.popType("TYPE")),c=a);let u=null,f=null;for(;e.length&&e.peekType("BRACKET");){const y=e.pop();u=new Zn(Pt,"",a,c,null,l,f,u),f=y.value,a+=y.text,c="array",l=null}let d=null;if(bo(e,Sse).has("indexed")){if(!r)throw new Error("");d=!0}const p=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Zn(Pt,p,a,c,d,l,f,u)}const n=e.name;M(!n||typeof n=="string"&&n.match(XM),"invalid name","obj.name",n);let s=e.indexed;s!=null&&(M(r,"parameter cannot be indexed","obj.indexed",e.indexed),s=!!s);let i=e.type,o=i.match(Ose);if(o){const a=parseInt(o[2]||"-1"),c=Zn.from({type:o[1],components:e.components});return new Zn(Pt,n||"",i,"array",s,null,a,c)}if(i==="tuple"||i.startsWith("tuple(")||i.startsWith("(")){const a=e.components!=null?e.components.map(l=>Zn.from(l)):null;return new Zn(Pt,n||"",i,"tuple",s,a,null,null)}return i=i3(e.type),new Zn(Pt,n||"",i,i,s,null,null,null)}static isParamType(e){return e&&e[bn]===o3}};cf=new WeakSet,nv=function(e,r,n,s){if(this.isArray()){if(!Array.isArray(r))throw new Error("invalid array value");if(this.arrayLength!==-1&&r.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,a=r.slice();a.forEach((c,l)=>{var u;ee(u=o,cf,nv).call(u,e,c,n,f=>{a[l]=f})}),s(a);return}if(this.isTuple()){const o=this.components;let a;if(Array.isArray(r))a=r.slice();else{if(r==null||typeof r!="object")throw new Error("invalid tuple value");a=o.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in r))throw new Error(`missing value for component ${c.name}`);return r[c.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((c,l)=>{var u;ee(u=o[l],cf,nv).call(u,e,c,n,f=>{a[l]=f})}),s(a);return}const i=n(this.type,r);i.then?e.push(async function(){s(await i)}()):s(i)};let Ar=Zn;class gl{constructor(e,r,n){G(this,"type");G(this,"inputs");$a(e,Pt,"Fragment"),n=Object.freeze(n.slice()),me(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{gl.from(JSON.parse(e))}catch{}return gl.from(Ha(e))}if(e instanceof Vs)switch(e.peekKeyword(YM)){case"constructor":return so.from(e);case"error":return pn.from(e);case"event":return li.from(e);case"fallback":case"receive":return Fi.from(e);case"function":return ui.from(e);case"struct":return rl.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return so.from(e);case"error":return pn.from(e);case"event":return li.from(e);case"fallback":case"receive":return Fi.from(e);case"function":return ui.from(e);case"struct":return rl.from(e)}J(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}M(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return so.isFragment(e)}static isError(e){return pn.isFragment(e)}static isEvent(e){return li.isFragment(e)}static isFunction(e){return ui.isFragment(e)}static isStruct(e){return rl.isFragment(e)}}class Jm extends gl{constructor(r,n,s,i){super(r,n,i);G(this,"name");M(typeof s=="string"&&s.match(XM),"invalid identifier","name",s),i=Object.freeze(i.slice()),me(this,{name:s})}}function ip(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class pn extends Jm{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,bn,{value:a3})}get selector(){return Cr(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+ip(e,this.inputs)),r.join(" ")}static from(e){if(pn.isFragment(e))return e;if(typeof e=="string")return pn.from(Ha(e));if(e instanceof Vs){const r=Ym("error",e),n=lo(e);return ml(e),new pn(Pt,r,n)}return new pn(Pt,e.name,e.inputs?e.inputs.map(Ar.from):[])}static isFragment(e){return e&&e[bn]===a3}}class li extends Jm{constructor(r,n,s,i){super(r,"event",n,s);G(this,"anonymous");Object.defineProperty(this,bn,{value:c3}),me(this,{anonymous:i})}get topicHash(){return Cr(this.format("sighash"))}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(s=>JSON.parse(s.format(r)))});const n=[];return r!=="sighash"&&n.push("event"),n.push(this.name+ip(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(i=>Ar.from(i)),new li(Pt,r,n,!1).topicHash}static from(r){if(li.isFragment(r))return r;if(typeof r=="string")try{return li.from(Ha(r))}catch{M(!1,"invalid event fragment","obj",r)}else if(r instanceof Vs){const n=Ym("event",r),s=lo(r,!0),i=!!bo(r,nn(["anonymous"])).has("anonymous");return ml(r),new li(Pt,n,s,i)}return new li(Pt,r.name,r.inputs?r.inputs.map(n=>Ar.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[bn]===c3}}class so extends gl{constructor(r,n,s,i,o){super(r,n,s);G(this,"payable");G(this,"gas");Object.defineProperty(this,bn,{value:l3}),me(this,{payable:i,gas:o})}format(r){if(J(r!=null&&r!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),r==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(s=>JSON.parse(s.format(r)))});const n=[`constructor${ip(r,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(so.isFragment(r))return r;if(typeof r=="string")try{return so.from(Ha(r))}catch{M(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof Vs){bo(r,nn(["constructor"]));const n=lo(r),s=!!bo(r,wse).has("payable"),i=tD(r);return ml(r),new so(Pt,"constructor",n,s,i)}return new so(Pt,"constructor",r.inputs?r.inputs.map(Ar.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[bn]===l3}}class Fi extends gl{constructor(r,n,s){super(r,"fallback",n);G(this,"payable");Object.defineProperty(this,bn,{value:u3}),me(this,{payable:s})}format(r){const n=this.inputs.length===0?"receive":"fallback";if(r==="json"){const s=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:s})}return`${n}()${this.payable?" payable":""}`}static from(r){if(Fi.isFragment(r))return r;if(typeof r=="string")try{return Fi.from(Ha(r))}catch{M(!1,"invalid fallback fragment","obj",r)}else if(r instanceof Vs){const n=r.toString(),s=r.peekKeyword(nn(["fallback","receive"]));if(M(s,"type must be fallback or receive","obj",n),r.popKeyword(nn(["fallback","receive"]))==="receive"){const c=lo(r);return M(c.length===0,"receive cannot have arguments","obj.inputs",c),bo(r,nn(["payable"])),ml(r),new Fi(Pt,[],!0)}let o=lo(r);o.length?M(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(c=>c.format("minimal")).join(", ")):o=[Ar.from("bytes")];const a=eD(r);if(M(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),bo(r,nn(["returns"])).has("returns")){const c=lo(r);M(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(l=>l.format("minimal")).join(", "))}return ml(r),new Fi(Pt,o,a==="payable")}if(r.type==="receive")return new Fi(Pt,[],!0);if(r.type==="fallback"){const n=[Ar.from("bytes")],s=r.stateMutability==="payable";return new Fi(Pt,n,s)}M(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[bn]===u3}}class ui extends Jm{constructor(r,n,s,i,o,a){super(r,"function",n,i);G(this,"constant");G(this,"outputs");G(this,"stateMutability");G(this,"payable");G(this,"gas");Object.defineProperty(this,bn,{value:f3}),o=Object.freeze(o.slice()),me(this,{constant:s==="view"||s==="pure",gas:a,outputs:o,payable:s==="payable",stateMutability:s})}get selector(){return Cr(this.format("sighash")).substring(0,10)}format(r){if(r==null&&(r="sighash"),r==="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!=null?this.gas:void 0,inputs:this.inputs.map(s=>JSON.parse(s.format(r))),outputs:this.outputs.map(s=>JSON.parse(s.format(r)))});const n=[];return r!=="sighash"&&n.push("function"),n.push(this.name+ip(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(ip(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(i=>Ar.from(i)),new ui(Pt,r,"view",n,[],null).selector}static from(r){if(ui.isFragment(r))return r;if(typeof r=="string")try{return ui.from(Ha(r))}catch{M(!1,"invalid function fragment","obj",r)}else if(r instanceof Vs){const s=Ym("function",r),i=lo(r),o=eD(r);let a=[];bo(r,nn(["returns"])).has("returns")&&(a=lo(r));const c=tD(r);return ml(r),new ui(Pt,s,o,i,a,c)}let n=r.stateMutability;return n==null&&(n="payable",typeof r.constant=="boolean"?(n="view",r.constant||(n="payable",typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable"))):typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable")),new ui(Pt,r.name,n,r.inputs?r.inputs.map(Ar.from):[],r.outputs?r.outputs.map(Ar.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[bn]===f3}}class rl extends Jm{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,bn,{value:d3})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return rl.from(Ha(e))}catch{M(!1,"invalid struct fragment","obj",e)}else if(e instanceof Vs){const r=Ym("struct",e),n=lo(e);return ml(e),new rl(Pt,r,n)}return new rl(Pt,e.name,e.inputs?e.inputs.map(Ar.from):[])}static isFragment(e){return e&&e[bn]===d3}}const zs=new Map;zs.set(0,"GENERIC_PANIC");zs.set(1,"ASSERT_FALSE");zs.set(17,"OVERFLOW");zs.set(18,"DIVIDE_BY_ZERO");zs.set(33,"ENUM_RANGE_ERROR");zs.set(34,"BAD_STORAGE_DATA");zs.set(49,"STACK_UNDERFLOW");zs.set(50,"ARRAY_RANGE_ERROR");zs.set(65,"OUT_OF_MEMORY");zs.set(81,"UNINITIALIZED_FUNCTION_CALL");const _se=new RegExp(/^bytes([0-9]*)$/),Nse=new RegExp(/^(u?int)([0-9]*)$/);let Rx=null,h3=1024;function Mse(t,e,r,n){let s="missing revert data",i=null;const o=null;let a=null;if(r){s="execution reverted";const l=fe(r);if(r=ne(r),l.length===0)s+=" (no data present; likely require(false) occurred",i="require(false)";else if(l.length%32!==4)s+=" (could not decode reason; invalid data length)";else if(ne(l.slice(0,4))==="0x08c379a0")try{i=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[i]},s+=`: ${JSON.stringify(i)}`}catch{s+=" (could not decode reason; invalid string data)"}else if(ne(l.slice(0,4))==="0x4e487b71")try{const u=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[u]},i=`Panic due to ${zs.get(u)||"UNKNOWN"}(${u})`,s+=`: ${i}`}catch{s+=" (could not decode panic code)"}else s+=" (unknown custom error)"}const c={to:e.to?Xe(e.to):null,data:e.data||"0x"};return e.from&&(c.from=Xe(e.from)),Lt(s,"CALL_EXCEPTION",{action:t,data:r,reason:i,transaction:c,invocation:o,revert:a})}var Yo,Wl;const F0=class F0{constructor(){W(this,Yo)}getDefaultValue(e){const r=e.map(s=>ee(this,Yo,Wl).call(this,Ar.from(s)));return new g1(r,"_").defaultValue()}encode(e,r){o7(r.length,e.length,"types/values length mismatch");const n=e.map(o=>ee(this,Yo,Wl).call(this,Ar.from(o))),s=new g1(n,"_"),i=new Ww;return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>ee(this,Yo,Wl).call(this,Ar.from(o)));return new g1(s,"_").decode(new Kw(r,n,h3))}static _setDefaultMaxInflation(e){M(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),h3=e}static defaultAbiCoder(){return Rx==null&&(Rx=new F0),Rx}static getBuiltinCallException(e,r,n){return Mse(e,r,n,F0.defaultAbiCoder())}};Yo=new WeakSet,Wl=function(e){if(e.isArray())return new nne(ee(this,Yo,Wl).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new g1(e.components.map(n=>ee(this,Yo,Wl).call(this,n)),e.name);switch(e.baseType){case"address":return new tne(e.name);case"bool":return new sne(e.name);case"string":return new hne(e.name);case"bytes":return new ine(e.name);case"":return new cne(e.name)}let r=e.type.match(Nse);if(r){let n=parseInt(r[2]||"256");return M(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new dne(n/8,r[1]==="int",e.name)}if(r=e.type.match(_se),r){let n=parseInt(r[1]);return M(n!==0&&n<=32,"invalid bytes length","param",e),new one(n,e.name)}M(!1,"invalid type","type",e.type)};let op=F0;class Dse{constructor(e,r,n){G(this,"fragment");G(this,"name");G(this,"signature");G(this,"topic");G(this,"args");const s=e.name,i=e.format();me(this,{fragment:e,name:s,signature:i,topic:r,args:n})}}class Lse{constructor(e,r,n,s){G(this,"fragment");G(this,"name");G(this,"args");G(this,"signature");G(this,"selector");G(this,"value");const i=e.name,o=e.format();me(this,{fragment:e,name:i,args:n,signature:o,selector:r,value:s})}}class jse{constructor(e,r,n){G(this,"fragment");G(this,"name");G(this,"args");G(this,"signature");G(this,"selector");const s=e.name,i=e.format();me(this,{fragment:e,name:s,args:n,signature:i,selector:r})}}class p3{constructor(e){G(this,"hash");G(this,"_isIndexed");me(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const y3={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},v3={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&y3[t.toString()]&&(e=y3[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var ei,ti,ri,Dr,lf,sv,uf,iv;const hc=class hc{constructor(e){W(this,lf);W(this,uf);G(this,"fragments");G(this,"deploy");G(this,"fallback");G(this,"receive");W(this,ei,void 0);W(this,ti,void 0);W(this,ri,void 0);W(this,Dr,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,N(this,ri,new Map),N(this,ei,new Map),N(this,ti,new Map);const n=[];for(const o of r)try{n.push(gl.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}me(this,{fragments:Object.freeze(n)});let s=null,i=!1;N(this,Dr,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}me(this,{deploy:o});return;case"fallback":o.inputs.length===0?i=!0:(M(!s||o.payable!==s.payable,"conflicting fallback fragments",`fragments[${a}]`,o),s=o,i=s.payable);return;case"function":c=S(this,ri);break;case"event":c=S(this,ti);break;case"error":c=S(this,ei);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||me(this,{deploy:so.from("constructor()")}),me(this,{fallback:s,receive:i})}format(e){const r=e?"minimal":"full";return this.fragments.map(s=>s.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return op.defaultAbiCoder()}getFunctionName(e){const r=ee(this,lf,sv).call(this,e,null,!1);return M(r,"no matching function","key",e),r.name}hasFunction(e){return!!ee(this,lf,sv).call(this,e,null,!1)}getFunction(e,r){return ee(this,lf,sv).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(S(this,ri).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;nn.localeCompare(s));for(let n=0;n1){const i=s.map(o=>JSON.stringify(o.format())).join(", ");M(!1,`ambiguous error description (i.e. ${i})`,"name",e)}return s[0]}if(e=pn.from(e).format(),e==="Error(string)")return pn.from("error Error(string)");if(e==="Panic(uint256)")return pn.from("error Panic(uint256)");const n=S(this,ei).get(e);return n||null}forEachError(e){const r=Array.from(S(this,ei).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;ni.type==="string"?Cr(o):i.type==="bytes"?Ct(ne(o)):(i.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":i.type.match(/^u?int/)?o=go(o):i.type.match(/^bytes/)?o=Fee(o,32):i.type==="address"&&S(this,Dr).encode(["address"],[o]),pl(ne(o),32));for(r.forEach((i,o)=>{const a=e.inputs[o];if(!a.indexed){M(i==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?M(!1,"filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(c=>s(a,c))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const o=this.getEvent(e);M(o,"unknown event","eventFragment",e),e=o}const n=[],s=[],i=[];return e.anonymous||n.push(e.topicHash),M(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Cr(c));else if(o.type==="bytes")n.push(Ct(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(S(this,Dr).encode([o.type],[c]))}else s.push(o),i.push(c)}),{data:S(this,Dr).encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const h=this.getEvent(e);M(h,"unknown event","eventFragment",e),e=h}if(n!=null&&!e.anonymous){const h=e.topicHash;M(vt(n[0],32)&&n[0].toLowerCase()===h,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const s=[],i=[],o=[];e.inputs.forEach((h,p)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(s.push(Ar.from({type:"bytes32",name:h.name})),o.push(!0)):(s.push(h),o.push(!1)):(i.push(h),o.push(!1))});const a=n!=null?S(this,Dr).decode(s,ot(n)):null,c=S(this,Dr).decode(i,r,!0),l=[],u=[];let f=0,d=0;return e.inputs.forEach((h,p)=>{let y=null;if(h.indexed)if(a==null)y=new p3(null);else if(o[p])y=new p3(a[d++]);else try{y=a[d++]}catch(g){y=g}else try{y=c[f++]}catch(g){y=g}l.push(y),u.push(h.name||null)}),Uf.fromItems(l,u)}parseTransaction(e){const r=fe(e.data,"tx.data"),n=ye(e.value!=null?e.value:0,"tx.value"),s=this.getFunction(ne(r.slice(0,4)));if(!s)return null;const i=S(this,Dr).decode(s.inputs,r.slice(4));return new Lse(s,s.selector,i,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new Dse(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=ne(e),n=this.getError(xt(r,0,4));if(!n)return null;const s=S(this,Dr).decode(n.inputs,xt(r,4));return new jse(n,n.selector,s)}static from(e){return e instanceof hc?e:typeof e=="string"?new hc(JSON.parse(e)):typeof e.formatJson=="function"?new hc(e.formatJson()):typeof e.format=="function"?new hc(e.format("json")):new hc(e)}};ei=new WeakMap,ti=new WeakMap,ri=new WeakMap,Dr=new WeakMap,lf=new WeakSet,sv=function(e,r,n){if(vt(e)){const i=e.toLowerCase();for(const o of S(this,ri).values())if(i===o.selector)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of S(this,ri))o.split("(")[0]===e&&i.push(a);if(r){const o=r.length>0?r[r.length-1]:null;let a=r.length,c=!0;zr.isTyped(o)&&o.type==="overrides"&&(c=!1,a--);for(let l=i.length-1;l>=0;l--){const u=i[l].inputs.length;u!==a&&(!c||u!==a-1)&&i.splice(l,1)}for(let l=i.length-1;l>=0;l--){const u=i[l].inputs;for(let f=0;f=u.length){if(r[f].type==="overrides")continue;i.splice(l,1);break}if(r[f].type!==u[f].baseType){i.splice(l,1);break}}}}if(i.length===1&&r&&r.length!==i[0].inputs.length){const o=r[r.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&i.splice(0,1)}if(i.length===0)return null;if(i.length>1&&n){const o=i.map(a=>JSON.stringify(a.format())).join(", ");M(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return i[0]}const s=S(this,ri).get(ui.from(e).format());return s||null},uf=new WeakSet,iv=function(e,r,n){if(vt(e)){const i=e.toLowerCase();for(const o of S(this,ti).values())if(i===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of S(this,ti))o.split("(")[0]===e&&i.push(a);if(r){for(let o=i.length-1;o>=0;o--)i[o].inputs.length=0;o--){const a=i[o].inputs;for(let c=0;c1&&n){const o=i.map(a=>JSON.stringify(a.format())).join(", ");M(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return i[0]}const s=S(this,ti).get(li.from(e).format());return s||null};let c2=hc;const rD=BigInt(0);function Nu(t){return t??null}function Gt(t){return t==null?null:t.toString()}class m3{constructor(e,r,n){G(this,"gasPrice");G(this,"maxFeePerGas");G(this,"maxPriorityFeePerGas");me(this,{gasPrice:Nu(e),maxFeePerGas:Nu(r),maxPriorityFeePerGas:Nu(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Gt(e),maxFeePerGas:Gt(r),maxPriorityFeePerGas:Gt(n)}}}function ap(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=ne(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const s of r)!(s in t)||t[s]==null||(e[s]=ye(t[s],`request.${s}`));const n="type,nonce".split(/,/);for(const s of n)!(s in t)||t[s]==null||(e[s]=_e(t[s],`request.${s}`));return t.accessList&&(e.accessList=Pl(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(s=>Um(s)?ne(s):Object.assign({},s))),e}var Ki;class Bse{constructor(e,r){G(this,"provider");G(this,"number");G(this,"hash");G(this,"timestamp");G(this,"parentHash");G(this,"parentBeaconBlockRoot");G(this,"nonce");G(this,"difficulty");G(this,"gasLimit");G(this,"gasUsed");G(this,"stateRoot");G(this,"receiptsRoot");G(this,"blobGasUsed");G(this,"excessBlobGas");G(this,"miner");G(this,"prevRandao");G(this,"extraData");G(this,"baseFeePerGas");W(this,Ki,void 0);N(this,Ki,e.transactions.map(n=>typeof n!="string"?new cp(n,r):n)),me(this,{provider:r,hash:Nu(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:Nu(e.prevRandao),extraData:e.extraData,baseFeePerGas:Nu(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return S(this,Ki).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=S(this,Ki).slice();return e.length===0?[]:(J(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:s,gasUsed:i,hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:f,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,timestamp:y,transactions:g}=this;return{_type:"Block",baseFeePerGas:Gt(e),difficulty:Gt(r),extraData:n,gasLimit:Gt(s),gasUsed:Gt(i),blobGasUsed:Gt(this.blobGasUsed),excessBlobGas:Gt(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:f,timestamp:y,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,transactions:g}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>enew by(s,r))));let n=rD;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),me(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return S(this,_p)}toJSON(){const{to:e,from:r,contractAddress:n,hash:s,index:i,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:u,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:Gt(this.cumulativeGasUsed),from:r,gasPrice:Gt(this.gasPrice),blobGasUsed:Gt(this.blobGasUsed),blobGasPrice:Gt(this.blobGasPrice),gasUsed:Gt(this.gasUsed),hash:s,index:i,logs:l,logsBloom:c,root:f,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(a)return null;const{blockNumber:d,nonce:h}=await Fr({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(h{if(d==null||d.status!==0)return d;J(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:d.to,from:d.from,data:""},receipt:d})},u=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(u);if(u){if(await u.confirmations()>=n)return l(u)}else if(await c(),n===0)return null;return await new Promise((d,h)=>{const p=[],y=()=>{p.forEach(m=>m())};if(p.push(()=>{a=!0}),s>0){const m=setTimeout(()=>{y(),h(Lt("wait for transaction timeout","TIMEOUT"))},s);p.push(()=>{clearTimeout(m)})}const g=async m=>{if(await m.confirmations()>=n){y();try{d(l(m))}catch(x){h(x)}}};if(p.push(()=>{this.provider.off(this.hash,g)}),this.provider.on(this.hash,g),i>=0){const m=async()=>{try{await c()}catch(x){if(Vr(x,"TRANSACTION_REPLACED")){y(),h(x);return}}a||this.provider.once("block",m)};p.push(()=>{this.provider.off("block",m)}),this.provider.once("block",m)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return J(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),iD(this)}reorderedEvent(e){return J(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),J(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),sD(this,e)}replaceableTransaction(e){M(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new Mk(this,this.provider);return N(r,Jo,e),r}};Jo=new WeakMap;let cp=Mk;function Fse(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function sD(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function iD(t){return{orphan:"drop-transaction",tx:t}}function Use(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class jC extends by{constructor(r,n,s){super(r,r.provider);G(this,"interface");G(this,"fragment");G(this,"args");const i=n.decodeEventLog(s,r.data,r.topics);me(this,{args:i,fragment:s,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class oD extends by{constructor(r,n){super(r,r.provider);G(this,"error");me(this,{error:n})}}var ff;class Vse extends nD{constructor(r,n,s){super(s,n);W(this,ff,void 0);N(this,ff,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?S(this,ff).getEvent(r.topics[0]):null;if(n)try{return new jC(r,S(this,ff),n)}catch(s){return new oD(r,s)}return r})}}ff=new WeakMap;var Np;class BC extends cp{constructor(r,n,s){super(s,n);W(this,Np,void 0);N(this,Np,r)}async wait(r,n){const s=await super.wait(r,n);return s==null?null:new Vse(S(this,Np),this.provider,s)}}Np=new WeakMap;class aD extends d7{constructor(r,n,s,i){super(r,n,s);G(this,"log");me(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class $se extends aD{constructor(e,r,n,s,i){super(e,r,n,new jC(i,e.interface,s));const o=e.interface.decodeEventLog(s,this.log.data,this.log.topics);me(this,{args:o,fragment:s})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const g3=BigInt(0);function cD(t){return t&&typeof t.call=="function"}function lD(t){return t&&typeof t.estimateGas=="function"}function Xm(t){return t&&typeof t.resolveName=="function"}function uD(t){return t&&typeof t.sendTransaction=="function"}function fD(t){if(t!=null){if(Xm(t))return t;if(t.provider)return t.provider}}var Mp;class zse{constructor(e,r,n){W(this,Mp,void 0);G(this,"fragment");if(me(this,{fragment:r}),r.inputs.lengthn[c]==null?null:a.walkAsync(n[c],(u,f)=>u==="address"?Array.isArray(f)?Promise.all(f.map(d=>wr(d,i))):wr(f,i):f)));return e.interface.encodeFilterTopics(r,o)}())}getTopicFilter(){return S(this,Mp)}}Mp=new WeakMap;function xl(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function Sc(t){return t==null?null:t.provider||null}async function dD(t,e){const r=zr.dereference(t,"overrides");M(typeof r=="object","invalid overrides parameter","overrides",t);const n=ap(r);return M(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),M(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function Hse(t,e,r){const n=xl(t,"resolveName"),s=Xm(n)?n:null;return await Promise.all(e.map((i,o)=>i.walkAsync(r[o],(a,c)=>(c=zr.dereference(c,a),a==="address"?wr(c,s):c))))}function Gse(t){const e=async function(o){const a=await dD(o,["data"]);a.to=await t.getAddress(),a.from&&(a.from=await wr(a.from,fD(t.runner)));const c=t.interface,l=ye(a.value||g3,"overrides.value")===g3,u=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!u&&!l&&M(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),M(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data);const f=c.receive||c.fallback&&c.fallback.payable;return M(f||l,"cannot send value to non-payable fallback","overrides.value",a.value),M(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data),a},r=async function(o){const a=xl(t.runner,"call");J(cD(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await a.call(c)}catch(l){throw vC(l)&&l.data?t.interface.makeError(l.data,c):l}},n=async function(o){const a=t.runner;J(uD(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=Sc(t.runner);return new BC(t.interface,l,c)},s=async function(o){const a=xl(t.runner,"estimateGas");return J(lD(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},i=async o=>await n(o);return me(i,{_contract:t,estimateGas:s,populateTransaction:e,send:n,staticCall:r}),i}function qse(t,e){const r=function(...l){const u=t.interface.getFunction(e,l);return J(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),u},n=async function(...l){const u=r(...l);let f={};if(u.inputs.length+1===l.length&&(f=await dD(l.pop()),f.from&&(f.from=await wr(f.from,fD(t.runner)))),u.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const d=await Hse(t.runner,u.inputs,l);return Object.assign({},f,await Fr({to:t.getAddress(),data:t.interface.encodeFunctionData(u,d)}))},s=async function(...l){const u=await a(...l);return u.length===1?u[0]:u},i=async function(...l){const u=t.runner;J(uD(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await u.sendTransaction(await n(...l)),d=Sc(t.runner);return new BC(t.interface,d,f)},o=async function(...l){const u=xl(t.runner,"estimateGas");return J(lD(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await n(...l))},a=async function(...l){const u=xl(t.runner,"call");J(cD(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await n(...l);let d="0x";try{d=await u.call(f)}catch(p){throw vC(p)&&p.data?t.interface.makeError(p.data,f):p}const h=r(...l);return t.interface.decodeFunctionResult(h,d)},c=async(...l)=>r(...l).constant?await s(...l):await i(...l);return me(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:o,populateTransaction:n,send:i,staticCall:s,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=t.interface.getFunction(e);return J(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function Wse(t,e){const r=function(...s){const i=t.interface.getEvent(e,s);return J(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:s}}),i},n=function(...s){return new zse(t,r(...s),s)};return me(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const s=t.interface.getEvent(e);return J(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),s}}),n}const m0=Symbol.for("_ethersInternal_contract"),hD=new WeakMap;function Kse(t,e){hD.set(t[m0],e)}function An(t){return hD.get(t[m0])}function Qse(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function FC(t,e){let r,n=null;if(Array.isArray(e)){const i=function(o){if(vt(o,32))return o;const a=t.interface.getEvent(o);return M(a,"unknown fragment","name",o),a.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(i):i(o))}else e==="*"?r=[null]:typeof e=="string"?vt(e,32)?r=[e]:(n=t.interface.getEvent(e),M(n,"unknown fragment","event",e),r=[n.topicHash]):Qse(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):M(!1,"unknown event name","event",e);r=r.map(i=>{if(i==null)return null;if(Array.isArray(i)){const o=Array.from(new Set(i.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return i.toLowerCase()});const s=r.map(i=>i==null?"null":Array.isArray(i)?i.join("|"):i).join("&");return{fragment:n,tag:s,topics:r}}async function Zd(t,e){const{subs:r}=An(t);return r.get((await FC(t,e)).tag)||null}async function x3(t,e,r){const n=Sc(t.runner);J(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:s,tag:i,topics:o}=await FC(t,r),{addr:a,subs:c}=An(t);let l=c.get(i);if(!l){const f={address:a||t,topics:o},d=g=>{let m=s;if(m==null)try{m=t.interface.getEvent(g.topics[0])}catch{}if(m){const x=m,b=s?t.interface.decodeEventLog(s,g.data,g.topics):[];u2(t,r,b,w=>new $se(t,w,r,x,g))}else u2(t,r,[],x=>new aD(t,x,r,g))};let h=[];l={tag:i,listeners:[],start:()=>{h.length||h.push(n.on(f,d))},stop:async()=>{if(h.length==0)return;let g=h;h=[],await Promise.all(g),n.off(f,d)}},c.set(i,l)}return l}let l2=Promise.resolve();async function Yse(t,e,r,n){await l2;const s=await Zd(t,e);if(!s)return!1;const i=s.listeners.length;return s.listeners=s.listeners.filter(({listener:o,once:a})=>{const c=Array.from(r);n&&c.push(n(a?null:o));try{o.call(t,...c)}catch{}return!a}),s.listeners.length===0&&(s.stop(),An(t).subs.delete(s.tag)),i>0}async function u2(t,e,r,n){try{await l2}catch{}const s=Yse(t,e,r,n);return l2=s,await s}const b1=["then"];var P1e;const Ch=class Ch{constructor(e,r,n,s){G(this,"target");G(this,"interface");G(this,"runner");G(this,"filters");G(this,P1e);G(this,"fallback");M(typeof e=="string"||xM(e),"invalid value for Contract target","target",e),n==null&&(n=null);const i=c2.from(r);me(this,{target:e,runner:n,interface:i}),Object.defineProperty(this,m0,{value:{}});let o,a=null,c=null;if(s){const f=Sc(n);c=new BC(this.interface,f,s)}let l=new Map;if(typeof e=="string")if(vt(e))a=e,o=Promise.resolve(e);else{const f=xl(n,"resolveName");if(!Xm(f))throw Lt("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(d=>{if(d==null)throw Lt("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return An(this).addr=d,d})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return An(this).addr=f,f});Kse(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const u=new Proxy({},{get:(f,d,h)=>{if(typeof d=="symbol"||b1.indexOf(d)>=0)return Reflect.get(f,d,h);try{return this.getEvent(d)}catch(p){if(!Vr(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(f,d)=>b1.indexOf(d)>=0?Reflect.has(f,d):Reflect.has(f,d)||this.interface.hasEvent(String(d))});return me(this,{filters:u}),me(this,{fallback:i.receive||i.fallback?Gse(this):null}),new Proxy(this,{get:(f,d,h)=>{if(typeof d=="symbol"||d in f||b1.indexOf(d)>=0)return Reflect.get(f,d,h);try{return f.getFunction(d)}catch(p){if(!Vr(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(f,d)=>typeof d=="symbol"||d in f||b1.indexOf(d)>=0?Reflect.has(f,d):f.interface.hasFunction(d)})}connect(e){return new Ch(this.target,this.interface,e)}attach(e){return new Ch(e,this.interface,this.runner)}async getAddress(){return await An(this).addrPromise}async getDeployedCode(){const e=Sc(this.runner);J(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=Sc(this.runner);return J(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((s,i)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return s(this);n.once("block",o)}catch(a){i(a)}};o()})}deploymentTransaction(){return An(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),qse(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),Wse(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:s,addrPromise:i}=An(this),o=s||await i,{fragment:a,topics:c}=await FC(this,e),l={address:o,topics:c,fromBlock:r,toBlock:n},u=Sc(this.runner);return J(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(l)).map(f=>{let d=a;if(d==null)try{d=this.interface.getEvent(f.topics[0])}catch{}if(d)try{return new jC(f,this.interface,d)}catch(h){return new oD(f,h)}return new by(f,u)})}async on(e,r){const n=await x3(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await x3(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await u2(this,e,r,null)}async listenerCount(e){if(e){const s=await Zd(this,e);return s?s.listeners.length:0}const{subs:r}=An(this);let n=0;for(const{listeners:s}of r.values())n+=s.length;return n}async listeners(e){if(e){const s=await Zd(this,e);return s?s.listeners.map(({listener:i})=>i):[]}const{subs:r}=An(this);let n=[];for(const{listeners:s}of r.values())n=n.concat(s.map(({listener:i})=>i));return n}async off(e,r){const n=await Zd(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(r==null||n.listeners.length===0)&&(n.stop(),An(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await Zd(this,e);if(!r)return this;r.stop(),An(this).subs.delete(r.tag)}else{const{subs:r}=An(this);for(const{tag:n,stop:s}of r.values())s(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends Ch{constructor(s,i=null){super(s,e,i)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};P1e=m0;let f2=Ch;function Jse(){return f2}class Mu extends Jse(){}function Ix(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):M(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class Xse{constructor(e){G(this,"name");me(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const pD=new RegExp("^(ipfs)://(.*)$","i"),b3=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),pD,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Xo,Bc,Zo,Kl,U0,yD;const gu=class gu{constructor(e,r,n){W(this,Zo);G(this,"provider");G(this,"address");G(this,"name");W(this,Xo,void 0);W(this,Bc,void 0);me(this,{provider:e,address:r,name:n}),N(this,Xo,null),N(this,Bc,new Mu(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return S(this,Xo)==null&&N(this,Xo,(async()=>{try{return await S(this,Bc).supportsInterface("0x9061b923")}catch(e){if(Vr(e,"CALL_EXCEPTION"))return!1;throw N(this,Xo,null),e}})()),await S(this,Xo)}async getAddress(e){if(e==null&&(e=60),e===60)try{const i=await ee(this,Zo,Kl).call(this,"addr(bytes32)");return i==null||i===vl?null:i}catch(i){if(Vr(i,"CALL_EXCEPTION"))return null;throw i}if(e>=0&&e<2147483648){let i=e+2147483648;const o=await ee(this,Zo,Kl).call(this,"addr(bytes32,uint)",[i]);if(vt(o,20))return Xe(o)}let r=null;for(const i of this.provider.plugins)if(i instanceof Xse&&i.supportsCoinType(e)){r=i;break}if(r==null)return null;const n=await ee(this,Zo,Kl).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const s=await r.decodeAddress(e,n);if(s!=null)return s;J(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await ee(this,Zo,Kl).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await ee(this,Zo,Kl).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const s=r[1]==="e3010170"?"ipfs":"ipns",i=parseInt(r[4],16);if(r[5].length===i*2)return`${s}://${f7("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;J(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n{if(e&&r==null)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map(n=>t(n))}}function wy(t,e){return r=>{const n={};for(const s in t){let i=s;if(e&&s in e&&!(i in r)){for(const o of e[s])if(o in r){i=o;break}}try{const o=t[s](r[i]);o!==void 0&&(n[s]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";J(!1,`invalid value for value.${s} (${a})`,"BAD_DATA",{value:r})}}return n}}function Zse(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}M(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Qf(t){return M(vt(t,!0),"invalid data","value",t),t}function xr(t){return M(vt(t,32),"invalid hash","value",t),t}const eie=wy({address:Xe,blockHash:xr,blockNumber:_e,data:Qf,index:_e,removed:Ge(Zse,!1),topics:Zm(xr),transactionHash:xr,transactionIndex:_e},{index:["logIndex"]});function tie(t){return eie(t)}const rie=wy({hash:Ge(xr),parentHash:xr,parentBeaconBlockRoot:Ge(xr,null),number:_e,timestamp:_e,nonce:Ge(Qf),difficulty:ye,gasLimit:ye,gasUsed:ye,stateRoot:Ge(xr,null),receiptsRoot:Ge(xr,null),blobGasUsed:Ge(ye,null),excessBlobGas:Ge(ye,null),miner:Ge(Xe),prevRandao:Ge(xr,null),extraData:Qf,baseFeePerGas:Ge(ye)},{prevRandao:["mixHash"]});function nie(t){const e=rie(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:vD(r)),e}const sie=wy({transactionIndex:_e,blockNumber:_e,transactionHash:xr,address:Xe,topics:Zm(xr),data:Qf,index:_e,blockHash:xr},{index:["logIndex"]});function iie(t){return sie(t)}const oie=wy({to:Ge(Xe,null),from:Ge(Xe,null),contractAddress:Ge(Xe,null),index:_e,root:Ge(ne),gasUsed:ye,blobGasUsed:Ge(ye,null),logsBloom:Ge(Qf),blockHash:xr,hash:xr,logs:Zm(iie),blockNumber:_e,cumulativeGasUsed:ye,effectiveGasPrice:Ge(ye),blobGasPrice:Ge(ye,null),status:Ge(_e),type:Ge(_e,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function aie(t){return oie(t)}function vD(t){t.to&&ye(t.to)===w3&&(t.to="0x0000000000000000000000000000000000000000");const e=wy({hash:xr,index:Ge(_e,void 0),type:r=>r==="0x"||r==null?0:_e(r),accessList:Ge(Pl,null),blobVersionedHashes:Ge(Zm(xr,!0),null),blockHash:Ge(xr,null),blockNumber:Ge(_e,null),transactionIndex:Ge(_e,null),from:Xe,gasPrice:Ge(ye),maxPriorityFeePerGas:Ge(ye),maxFeePerGas:Ge(ye),maxFeePerBlobGas:Ge(ye,null),gasLimit:ye,to:Ge(Xe,null),value:ye,nonce:_e,data:Qf,creates:Ge(Xe,null),chainId:Ge(ye,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=Zre(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Us.from(t.signature):e.signature=Us.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&ye(e.blockHash)===w3&&(e.blockHash=null),e}const cie="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Ey{constructor(e){G(this,"name");me(this,{name:e})}clone(){return new Ey(this.name)}}class eg extends Ey{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);G(this,"effectiveBlock");G(this,"txBase");G(this,"txCreate");G(this,"txDataZero");G(this,"txDataNonzero");G(this,"txAccessListStorageKey");G(this,"txAccessListAddress");const s={effectiveBlock:r};function i(o,a){let c=(n||{})[o];c==null&&(c=a),M(typeof c=="number",`invalud value for ${o}`,"costs",n),s[o]=c}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),me(this,s)}clone(){return new eg(this.effectiveBlock,this)}}class tg extends Ey{constructor(r,n){super("org.ethers.plugins.network.Ens");G(this,"address");G(this,"targetNetwork");me(this,{address:r||cie,targetNetwork:n??1})}clone(){return new tg(this.address,this.targetNetwork)}}var Dp,Lp;class lie extends Ey{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");W(this,Dp,void 0);W(this,Lp,void 0);N(this,Dp,r),N(this,Lp,n)}get url(){return S(this,Dp)}get processFunc(){return S(this,Lp)}clone(){return this}}Dp=new WeakMap,Lp=new WeakMap;const Ox=new Map;var df,hf,ea;const xu=class xu{constructor(e,r){W(this,df,void 0);W(this,hf,void 0);W(this,ea,void 0);N(this,df,e),N(this,hf,ye(r)),N(this,ea,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return S(this,df)}set name(e){N(this,df,e)}get chainId(){return S(this,hf)}set chainId(e){N(this,hf,ye(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===ye(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===ye(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===ye(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(S(this,ea).values())}attachPlugin(e){if(S(this,ea).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return S(this,ea).set(e.name,e.clone()),this}getPlugin(e){return S(this,ea).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new xu(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new eg;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let s=2;s9){let s=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||s++,n[1]=s.toString()}return BigInt(n[0]+n[1])}function S3(t){return new lie(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let s;try{const[i,o]=await Promise.all([n.send(),e()]);s=i;const a=s.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:E3(a.maxFee,9),maxPriorityFeePerGas:E3(a.maxPriorityFee,9)}}catch(i){J(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:s,error:i})}})}let C3=!1;function uie(){if(C3)return;C3=!0;function t(e,r,n){const s=function(){const i=new pi(e,r);return n.ensNetwork!=null&&i.attachPlugin(new tg(null,n.ensNetwork)),i.attachPlugin(new eg),(n.plugins||[]).forEach(o=>{i.attachPlugin(o)}),i};pi.register(e,s),pi.register(r,s),n.altNames&&n.altNames.forEach(i=>{pi.register(i,s)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("linea-sepolia",59141,{}),t("matic",137,{ensNetwork:1,plugins:[S3("https://gasstation.polygon.technology/v2")]}),t("matic-amoy",80002,{}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[S3("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function d2(t){return JSON.parse(JSON.stringify(t))}var Qi,es,ta,ni,pf,ov;class fie{constructor(e){W(this,pf);W(this,Qi,void 0);W(this,es,void 0);W(this,ta,void 0);W(this,ni,void 0);N(this,Qi,e),N(this,es,null),N(this,ta,4e3),N(this,ni,-2)}get pollingInterval(){return S(this,ta)}set pollingInterval(e){N(this,ta,e)}start(){S(this,es)||(N(this,es,S(this,Qi)._setTimeout(ee(this,pf,ov).bind(this),S(this,ta))),ee(this,pf,ov).call(this))}stop(){S(this,es)&&(S(this,Qi)._clearTimeout(S(this,es)),N(this,es,null))}pause(e){this.stop(),e&&N(this,ni,-2)}resume(){this.start()}}Qi=new WeakMap,es=new WeakMap,ta=new WeakMap,ni=new WeakMap,pf=new WeakSet,ov=async function(){try{const e=await S(this,Qi).getBlockNumber();if(S(this,ni)===-2){N(this,ni,e);return}if(e!==S(this,ni)){for(let r=S(this,ni)+1;r<=e;r++){if(S(this,es)==null)return;await S(this,Qi).emit("block",r)}N(this,ni,e)}}catch{}S(this,es)!=null&&N(this,es,S(this,Qi)._setTimeout(ee(this,pf,ov).bind(this),S(this,ta)))};var Fc,Uc,ra;class UC{constructor(e){W(this,Fc,void 0);W(this,Uc,void 0);W(this,ra,void 0);N(this,Fc,e),N(this,ra,!1),N(this,Uc,r=>{this._poll(r,S(this,Fc))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){S(this,ra)||(N(this,ra,!0),S(this,Uc).call(this,-2),S(this,Fc).on("block",S(this,Uc)))}stop(){S(this,ra)&&(N(this,ra,!1),S(this,Fc).off("block",S(this,Uc)))}pause(e){this.stop()}resume(){this.start()}}Fc=new WeakMap,Uc=new WeakMap,ra=new WeakMap;var yf,Yi;class die extends UC{constructor(r,n){super(r);W(this,yf,void 0);W(this,Yi,void 0);N(this,yf,n),N(this,Yi,-2)}pause(r){r&&N(this,Yi,-2),super.pause(r)}async _poll(r,n){const s=await n.getBlock(S(this,yf));s!=null&&(S(this,Yi)===-2?N(this,Yi,s.number):s.number>S(this,Yi)&&(n.emit(S(this,yf),s.number),N(this,Yi,s.number)))}}yf=new WeakMap,Yi=new WeakMap;var V0;class hie extends UC{constructor(r,n){super(r);W(this,V0,void 0);N(this,V0,d2(n))}async _poll(r,n){throw new Error("@TODO")}}V0=new WeakMap;var vf;class pie extends UC{constructor(r,n){super(r);W(this,vf,void 0);N(this,vf,n)}async _poll(r,n){const s=await n.getTransactionReceipt(S(this,vf));s&&n.emit(S(this,vf),s)}}vf=new WeakMap;var Ji,mf,gf,na,ts,$0,mD;class VC{constructor(e,r){W(this,$0);W(this,Ji,void 0);W(this,mf,void 0);W(this,gf,void 0);W(this,na,void 0);W(this,ts,void 0);N(this,Ji,e),N(this,mf,d2(r)),N(this,gf,ee(this,$0,mD).bind(this)),N(this,na,!1),N(this,ts,-2)}start(){S(this,na)||(N(this,na,!0),S(this,ts)===-2&&S(this,Ji).getBlockNumber().then(e=>{N(this,ts,e)}),S(this,Ji).on("block",S(this,gf)))}stop(){S(this,na)&&(N(this,na,!1),S(this,Ji).off("block",S(this,gf)))}pause(e){this.stop(),e&&N(this,ts,-2)}resume(){this.start()}}Ji=new WeakMap,mf=new WeakMap,gf=new WeakMap,na=new WeakMap,ts=new WeakMap,$0=new WeakSet,mD=async function(e){if(S(this,ts)===-2)return;const r=d2(S(this,mf));r.fromBlock=S(this,ts)+1,r.toBlock=e;const n=await S(this,Ji).getLogs(r);if(n.length===0){S(this,ts){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const s=Object.keys(n);return s.sort(),s.reduce((i,o)=>(i[o]=n[o],i),{})}return n})}class gD{constructor(e){G(this,"name");me(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function mie(t){return JSON.parse(JSON.stringify(t))}function h2(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function _x(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(vt(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:av("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:av("orphan",r),filter:mie(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(s=>s==null?null:Array.isArray(s)?h2(s.map(i=>i.toLowerCase())):s.toLowerCase())};if(r.address){const s=[],i=[],o=a=>{vt(a)?s.push(a):i.push((async()=>{s.push(await wr(a,e))})())};Array.isArray(r.address)?r.address.forEach(o):o(r.address),i.length&&await Promise.all(i),n.address=h2(s.map(a=>a.toLowerCase()))}return{filter:n,tag:av("event",n),type:"event"}}M(!1,"unknown ProviderEvent","event",t)}function Nx(){return new Date().getTime()}const gie={cacheTimeout:250,pollingInterval:4e3};var Lr,sa,jr,xf,Rn,Vc,ia,Xi,jp,rs,bf,wf,Jr,Cn,Bp,p2,Fp,y2,$c,eh,Up,v2,zc,th,Ef,cv;class xie{constructor(e,r){W(this,Jr);W(this,Bp);W(this,Fp);W(this,$c);W(this,Up);W(this,zc);W(this,Ef);W(this,Lr,void 0);W(this,sa,void 0);W(this,jr,void 0);W(this,xf,void 0);W(this,Rn,void 0);W(this,Vc,void 0);W(this,ia,void 0);W(this,Xi,void 0);W(this,jp,void 0);W(this,rs,void 0);W(this,bf,void 0);W(this,wf,void 0);if(N(this,wf,Object.assign({},gie,r||{})),e==="any")N(this,Vc,!0),N(this,Rn,null);else if(e){const n=pi.from(e);N(this,Vc,!1),N(this,Rn,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else N(this,Vc,!1),N(this,Rn,null);N(this,Xi,-1),N(this,ia,new Map),N(this,Lr,new Map),N(this,sa,new Map),N(this,jr,null),N(this,xf,!1),N(this,jp,1),N(this,rs,new Map),N(this,bf,!1)}get pollingInterval(){return S(this,wf).pollingInterval}get provider(){return this}get plugins(){return Array.from(S(this,sa).values())}attachPlugin(e){if(S(this,sa).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return S(this,sa).set(e.name,e.connect(this)),this}getPlugin(e){return S(this,sa).get(e)||null}get disableCcipRead(){return S(this,bf)}set disableCcipRead(e){N(this,bf,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:f}}),o.push(f)}J(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,r){return new Bse(nie(e),this)}_wrapLog(e,r){return new by(tie(e),this)}_wrapTransactionReceipt(e,r){return new nD(aie(e),this)}_wrapTransactionResponse(e,r){return new cp(vD(e),this)}_detectNetwork(){J(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){J(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=_e(await ee(this,Jr,Cn).call(this,{method:"getBlockNumber"}),"%response");return S(this,Xi)>=0&&N(this,Xi,e),e}_getAddress(e){return wr(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(vt(e))return vt(e,32)?e:yu(e);if(typeof e=="bigint"&&(e=_e(e,"blockTag")),typeof e=="number")return e>=0?yu(e):S(this,Xi)>=0?yu(S(this,Xi)+e):this.getBlockNumber().then(r=>yu(r+e));M(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?h2(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,s=(c,l,u)=>{let f;switch(c.length){case 0:break;case 1:f=c[0];break;default:c.sort(),f=c}if(n&&(l!=null||u!=null))throw new Error("invalid filter");const d={};return f&&(d.address=f),r.length&&(d.topics=r),l&&(d.fromBlock=l),u&&(d.toBlock=u),n&&(d.blockHash=n),d};let i=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)i.push(this._getAddress(c));else i.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),i.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(i),o,a]).then(c=>s(c[0],c[1],c[2])):s(i,o,a)}_getTransactionRequest(e){const r=ap(e),n=[];if(["to","from"].forEach(s=>{if(r[s]==null)return;const i=wr(r[s],this);w1(i)?n.push(async function(){r[s]=await i}()):r[s]=i}),r.blockTag!=null){const s=this._getBlockTag(r.blockTag);w1(s)?n.push(async function(){r.blockTag=await s}()):r.blockTag=s}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(S(this,Rn)==null){const s=(async()=>{try{const i=await this._detectNetwork();return this.emit("network",i,null),i}catch(i){throw S(this,Rn)===s&&N(this,Rn,null),i}})();return N(this,Rn,s),(await s).clone()}const e=S(this,Rn),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(S(this,Vc)?(this.emit("network",n,r),S(this,Rn)===e&&N(this,Rn,Promise.resolve(n))):J(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:s,gasPrice:i,priorityFee:o}=await Fr({_block:ee(this,Up,v2).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ee(this,Jr,Cn).call(this,{method:"getGasPrice"});return ye(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ee(this,Jr,Cn).call(this,{method:"getPriorityFee"});return ye(u,"%response")}catch{}return null})()});let a=null,c=null;const l=this._wrapBlock(s,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*yie+c),new m3(i,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const s=new xo(n.url),i=await n.processFunc(r,this,s);return new m3(i.gasPrice,i.maxFeePerGas,i.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return w1(r)&&(r=await r),ye(await ee(this,Jr,Cn).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await Fr({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ee(this,Fp,y2).call(this,ee(this,Bp,p2).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return ye(await ee(this,$c,eh).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return _e(await ee(this,$c,eh).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return ne(await ee(this,$c,eh).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const s=ye(r,"position");return ne(await ee(this,$c,eh).call(this,{method:"getStorage",position:s},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:s}=await Fr({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=sp.from(e);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,s).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:s}=await Fr({network:this.getNetwork(),params:ee(this,Up,v2).call(this,e,!!r)});return s==null?null:this._wrapBlock(s,n)}async getTransaction(e){const{network:r,params:n}=await Fr({network:this.getNetwork(),params:ee(this,Jr,Cn).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await Fr({network:this.getNetwork(),params:ee(this,Jr,Cn).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const s=await ee(this,Jr,Cn).call(this,{method:"getTransaction",hash:e});if(s==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=s.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await Fr({network:this.getNetwork(),result:ee(this,Jr,Cn).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:ne(r)}async getLogs(e){let r=this._getFilter(e);w1(r)&&(r=await r);const{network:n,params:s}=await Fr({network:this.getNetwork(),params:ee(this,Jr,Cn).call(this,{method:"getLogs",filter:r})});return s.map(i=>this._wrapLog(i,n))}_getProvider(e){J(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await g0.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=Xe(e);const r=o2(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await g0.getEnsAddress(this),i=await new Mu(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(i==null||i===vl)return null;const a=await new Mu(i,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(a)!==e?null:a}catch(n){if(Vr(n,"BAD_DATA")&&n.value==="0x"||Vr(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const s=r??1;return s===0?this.getTransactionReceipt(e):new Promise(async(i,o)=>{let a=null;const c=async l=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&l-u.blockNumber+1>=s){i(u),a&&(clearTimeout(a),a=null);return}}catch(u){console.log("EEE",u)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(Lt("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){J(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=S(this,rs).get(e);r&&(r.timer&&clearTimeout(r.timer),S(this,rs).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=Ed(this,jp)._++,s=()=>{S(this,rs).delete(n),e()};if(this.paused)S(this,rs).set(n,{timer:null,func:s,time:r});else{const i=setTimeout(s,r);S(this,rs).set(n,{timer:i,func:s,time:Nx()})}return n}_forEachSubscriber(e){for(const r of S(this,Lr).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new gD(e.type);case"block":{const r=new fie(this);return r.pollingInterval=this.pollingInterval,r}case"safe":case"finalized":return new die(this,e.type);case"event":return new VC(this,e.filter);case"transaction":return new pie(this,e.hash);case"orphan":return new hie(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of S(this,Lr).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),S(this,jr)!=null&&r.pause(S(this,jr));break}}async on(e,r){const n=await ee(this,Ef,cv).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,S(this,jr)!=null&&n.subscriber.pause(S(this,jr))),this}async once(e,r){const n=await ee(this,Ef,cv).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,S(this,jr)!=null&&n.subscriber.pause(S(this,jr))),this}async emit(e,...r){const n=await ee(this,zc,th).call(this,e,r);if(!n||n.listeners.length===0)return!1;const s=n.listeners.length;return n.listeners=n.listeners.filter(({listener:i,once:o})=>{const a=new d7(this,o?null:i,e);try{i.call(this,...r,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),S(this,Lr).delete(n.tag)),s>0}async listenerCount(e){if(e){const n=await ee(this,zc,th).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of S(this,Lr).values())r+=n.length;return r}async listeners(e){if(e){const n=await ee(this,zc,th).call(this,e);return n?n.listeners.map(({listener:s})=>s):[]}let r=[];for(const{listeners:n}of S(this,Lr).values())r=r.concat(n.map(({listener:s})=>s));return r}async off(e,r){const n=await ee(this,zc,th).call(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),S(this,Lr).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:s}=await ee(this,Ef,cv).call(this,e);n&&s.stop(),S(this,Lr).delete(r)}else for(const[r,{started:n,subscriber:s}]of S(this,Lr))n&&s.stop(),S(this,Lr).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return S(this,xf)}destroy(){this.removeAllListeners();for(const e of S(this,rs).keys())this._clearTimeout(e);N(this,xf,!0)}get paused(){return S(this,jr)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(N(this,Xi,-1),S(this,jr)!=null){if(S(this,jr)==!!e)return;J(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),N(this,jr,!!e);for(const r of S(this,rs).values())r.timer&&clearTimeout(r.timer),r.time=Nx()-r.time}resume(){if(S(this,jr)!=null){this._forEachSubscriber(e=>e.resume()),N(this,jr,null);for(const e of S(this,rs).values()){let r=e.time;r<0&&(r=0),e.time=Nx(),setTimeout(e.func,r)}}}}Lr=new WeakMap,sa=new WeakMap,jr=new WeakMap,xf=new WeakMap,Rn=new WeakMap,Vc=new WeakMap,ia=new WeakMap,Xi=new WeakMap,jp=new WeakMap,rs=new WeakMap,bf=new WeakMap,wf=new WeakMap,Jr=new WeakSet,Cn=async function(e){const r=S(this,wf).cacheTimeout;if(r<0)return await this._perform(e);const n=av(e.method,e);let s=S(this,ia).get(n);return s||(s=this._perform(e),S(this,ia).set(n,s),setTimeout(()=>{S(this,ia).get(n)===s&&S(this,ia).delete(n)},r)),await s},Bp=new WeakSet,p2=async function(e,r,n){J(n=0&&r==="latest"&&s.to!=null&&xt(i.data,0,4)==="0x556f1830"){const o=i.data,a=await wr(s.to,this);let c;try{c=Cie(xt(i.data,4))}catch(f){J(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:s,info:{data:o}})}J(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:s,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const l=await this.ccipReadFetch(s,c.calldata,c.urls);J(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:s,info:{data:i.data,errorArgs:c.errorArgs}});const u={to:a,data:ot([c.selector,Sie([l,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{const f=await ee(this,Bp,p2).call(this,u,r,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:f}),f}}throw i}},Fp=new WeakSet,y2=async function(e){const{value:r}=await Fr({network:this.getNetwork(),value:e});return r},$c=new WeakSet,eh=async function(e,r,n){let s=this._getAddress(r),i=this._getBlockTag(n);return(typeof s!="string"||typeof i!="string")&&([s,i]=await Promise.all([s,i])),await ee(this,Fp,y2).call(this,ee(this,Jr,Cn).call(this,Object.assign(e,{address:s,blockTag:i})))},Up=new WeakSet,v2=async function(e,r){if(vt(e,32))return await ee(this,Jr,Cn).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await ee(this,Jr,Cn).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},zc=new WeakSet,th=async function(e,r){let n=await _x(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await _x({orphan:"drop-log",log:r[0]},this)),S(this,Lr).get(n.tag)||null},Ef=new WeakSet,cv=async function(e){const r=await _x(e,this),n=r.tag;let s=S(this,Lr).get(n);return s||(s={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},S(this,Lr).set(n,s)),s};function bie(t,e){try{const r=m2(t,e);if(r)return u0(r)}catch{}return null}function m2(t,e){if(t==="0x")return null;try{const r=_e(xt(t,e,e+32)),n=_e(xt(t,r,r+32));return xt(t,r+32,r+32+n)}catch{}return null}function A3(t){const e=$r(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 wie(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const Eie=new Uint8Array([]);function Sie(t){const e=[];let r=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=xt(t,0,32);J(xt(r,0,12)===xt(k3,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=xt(r,12);try{const n=[],s=_e(xt(t,32,64)),i=_e(xt(t,s,s+32)),o=xt(t,s+32);for(let a=0;ae[n]),e}function Ul(t,e){if(t.provider)return t.provider;J(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function T3(t,e){let r=ap(e);if(r.to!=null&&(r.to=wr(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),wr(n,t)]).then(([s,i])=>(M(s.toLowerCase()===i.toLowerCase(),"transaction from mismatch","tx.from",i),s))}else r.from=t.getAddress();return await Fr(r)}class $C{constructor(e){G(this,"provider");me(this,{provider:e||null})}async getNonce(e){return Ul(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await T3(this,e)}async populateTransaction(e){const r=Ul(this,"populateTransaction"),n=await T3(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const s=await this.provider.getNetwork();if(n.chainId!=null){const o=ye(n.chainId);M(o===s.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=s.chainId;const i=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||i)?M(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&i&&M(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await r.getFeeData();J(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await r.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(J(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):J(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await Fr(n)}async estimateGas(e){return Ul(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Ul(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Ul(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=Ul(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const s=sp.from(n);return await r.broadcastTransaction(await this.signTransaction(s))}}var Sf,lv;const Dk=class Dk extends $C{constructor(r,n){super(n);W(this,Sf);G(this,"address");me(this,{address:r})}async getAddress(){return this.address}connect(r){return new Dk(this.address,r)}async signTransaction(r){ee(this,Sf,lv).call(this,"transactions","signTransaction")}async signMessage(r){ee(this,Sf,lv).call(this,"messages","signMessage")}async signTypedData(r,n,s){ee(this,Sf,lv).call(this,"typed-data","signTypedData")}};Sf=new WeakSet,lv=function(r,n){J(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let g2=Dk;function Aie(t){return JSON.parse(JSON.stringify(t))}var Xr,si,Hc,oa,Gc,Cf,Vp,x2,$p,b2;class xD{constructor(e){W(this,Vp);W(this,$p);W(this,Xr,void 0);W(this,si,void 0);W(this,Hc,void 0);W(this,oa,void 0);W(this,Gc,void 0);W(this,Cf,void 0);N(this,Xr,e),N(this,si,null),N(this,Hc,ee(this,Vp,x2).bind(this)),N(this,oa,!1),N(this,Gc,null),N(this,Cf,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){S(this,oa)||(N(this,oa,!0),ee(this,Vp,x2).call(this,-2))}stop(){S(this,oa)&&(N(this,oa,!1),N(this,Cf,!0),ee(this,$p,b2).call(this),S(this,Xr).off("block",S(this,Hc)))}pause(e){e&&ee(this,$p,b2).call(this),S(this,Xr).off("block",S(this,Hc))}resume(){this.start()}}Xr=new WeakMap,si=new WeakMap,Hc=new WeakMap,oa=new WeakMap,Gc=new WeakMap,Cf=new WeakMap,Vp=new WeakSet,x2=async function(e){try{S(this,si)==null&&N(this,si,this._subscribe(S(this,Xr)));let r=null;try{r=await S(this,si)}catch(i){if(!Vr(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(r==null){N(this,si,null),S(this,Xr)._recoverSubscriber(this,this._recover(S(this,Xr)));return}const n=await S(this,Xr).getNetwork();if(S(this,Gc)||N(this,Gc,n),S(this,Gc).chainId!==n.chainId)throw new Error("chaid changed");if(S(this,Cf))return;const s=await S(this,Xr).send("eth_getFilterChanges",[r]);await this._emitResults(S(this,Xr),s)}catch(r){console.log("@TODO",r)}S(this,Xr).once("block",S(this,Hc))},$p=new WeakSet,b2=function(){const e=S(this,si);e&&(N(this,si,null),e.then(r=>{S(this,Xr).destroyed||S(this,Xr).send("eth_uninstallFilter",[r])}))};var qc;class kie extends xD{constructor(r,n){super(r);W(this,qc,void 0);N(this,qc,Aie(n))}_recover(r){return new VC(r,S(this,qc))}async _subscribe(r){return await r.send("eth_newFilter",[S(this,qc)])}async _emitResults(r,n){for(const s of n)r.emit(S(this,qc),r._wrapLog(s,r._network))}}qc=new WeakMap;class Tie extends xD{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const Pie="bigint,boolean,function,number,string,symbol".split(/,/g);function uv(t){if(t==null||Pie.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(uv);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function Rie(t){return new Promise(e=>{setTimeout(e,t)})}function Vl(t){return t&&t.toLowerCase()}function P3(t){return t&&typeof t.pollingInterval=="number"}const bD={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class Mx extends $C{constructor(r,n){super(r);G(this,"address");n=Xe(n),me(this,{address:n})}connect(r){J(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(r){return await this.populateCall(r)}async sendUncheckedTransaction(r){const n=uv(r),s=[];if(n.from){const o=n.from;s.push((async()=>{const a=await wr(o,this.provider);M(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=a})())}else n.from=this.address;if(n.gasLimit==null&&s.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;s.push((async()=>{n.to=await wr(o,this.provider)})())}s.length&&await Promise.all(s);const i=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(r){const n=await this.provider.getBlockNumber(),s=await this.sendUncheckedTransaction(r);return await new Promise((i,o)=>{const a=[1e3,100];let c=0;const l=async()=>{try{const u=await this.provider.getTransaction(s);if(u!=null){i(u.replaceableTransaction(n));return}}catch(u){if(Vr(u,"CANCELLED")||Vr(u,"BAD_DATA")||Vr(u,"NETWORK_ERROR")){u.info==null&&(u.info={}),u.info.sendTransactionHash=s,o(u);return}if(Vr(u,"INVALID_ARGUMENT")&&(c++,u.info==null&&(u.info={}),u.info.sendTransactionHash=s,c>10)){o(u);return}this.provider.emit("error",Lt("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:u}))}this.provider._setTimeout(()=>{l()},a.pop()||4e3)};l()})}async signTransaction(r){const n=uv(r);if(n.from){const i=await wr(n.from,this.provider);M(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=i}else n.from=this.address;const s=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[s])}async signMessage(r){const n=typeof r=="string"?Sr(r):r;return await this.provider.send("personal_sign",[ne(n),this.address.toLowerCase()])}async signTypedData(r,n,s){const i=uv(s),o=await Kf.resolveNames(r,n,i,async a=>{const c=await wr(a);return M(c!=null,"TypedData does not support null address","value",a),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(Kf.getPayload(o.domain,n,o.value))])}async unlock(r){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),r,null])}async _legacySignMessage(r){const n=typeof r=="string"?Sr(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),ne(n)])}}var Wc,Af,Zi,ii,Rs,ns,fn,zp,w2;class Iie extends xie{constructor(r,n){super(r,n);W(this,zp);W(this,Wc,void 0);W(this,Af,void 0);W(this,Zi,void 0);W(this,ii,void 0);W(this,Rs,void 0);W(this,ns,void 0);W(this,fn,void 0);N(this,Af,1),N(this,Wc,Object.assign({},bD,n||{})),N(this,Zi,[]),N(this,ii,null),N(this,ns,null),N(this,fn,null);{let i=null;const o=new Promise(a=>{i=a});N(this,Rs,{promise:o,resolve:i})}const s=this._getOption("staticNetwork");typeof s=="boolean"?(M(!s||r!=="any","staticNetwork cannot be used on special network 'any'","options",n),s&&r!=null&&N(this,ns,pi.from(r))):s&&(M(r==null||s.matches(r),"staticNetwork MUST match network object","options",n),N(this,ns,s))}_getOption(r){return S(this,Wc)[r]}get _network(){return J(S(this,ns),"network is not available yet","NETWORK_ERROR"),S(this,ns)}async _perform(r){if(r.method==="call"||r.method==="estimateGas"){let s=r.transaction;if(s&&s.type!=null&&ye(s.type)&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=Object.assign({},r,{transaction:Object.assign({},s,{type:void 0})}))}}const n=this.getRpcRequest(r);return n!=null?await this.send(n.method,n.args):super._perform(r)}async _detectNetwork(){const r=this._getOption("staticNetwork");if(r)if(r===!0){if(S(this,ns))return S(this,ns)}else return r;return S(this,fn)?await S(this,fn):this.ready?(N(this,fn,(async()=>{try{const n=pi.from(ye(await this.send("eth_chainId",[])));return N(this,fn,null),n}catch(n){throw N(this,fn,null),n}})()),await S(this,fn)):(N(this,fn,(async()=>{const n={id:Ed(this,Af)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let s;try{s=(await this._send(n))[0],N(this,fn,null)}catch(i){throw N(this,fn,null),this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:s}),"result"in s)return pi.from(ye(s.result));throw this.getRpcError(n,s)})()),await S(this,fn))}_start(){S(this,Rs)==null||S(this,Rs).resolve==null||(S(this,Rs).resolve(),N(this,Rs,null),(async()=>{for(;S(this,ns)==null&&!this.destroyed;)try{N(this,ns,await this._detectNetwork())}catch(r){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Lt("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:r}})),await Rie(1e3)}ee(this,zp,w2).call(this)})())}async _waitUntilReady(){if(S(this,Rs)!=null)return await S(this,Rs).promise}_getSubscriber(r){return r.type==="pending"?new Tie(this):r.type==="event"?this._getOption("polling")?new VC(this,r.filter):new kie(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new gD("orphan"):super._getSubscriber(r)}get ready(){return S(this,Rs)==null}getRpcTransaction(r){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(s=>{if(r[s]==null)return;let i=s;s==="gasLimit"&&(i="gas"),n[i]=yu(ye(r[s],`tx.${s}`))}),["from","to","data"].forEach(s=>{r[s]!=null&&(n[s]=ne(r[s]))}),r.accessList&&(n.accessList=Pl(r.accessList)),r.blobVersionedHashes&&(n.blobVersionedHashes=r.blobVersionedHashes.map(s=>s.toLowerCase())),n}getRpcRequest(r){switch(r.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Vl(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Vl(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[Vl(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Vl(r.address),"0x"+r.position.toString(16),r.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[r.signedTransaction]};case"getBlock":if("blockTag"in r)return{method:"eth_getBlockByNumber",args:[r.blockTag,!!r.includeTransactions]};if("blockHash"in r)return{method:"eth_getBlockByHash",args:[r.blockHash,!!r.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[r.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[r.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(r.transaction),r.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(r.transaction)]};case"getLogs":return r.filter&&r.filter.address!=null&&(Array.isArray(r.filter.address)?r.filter.address=r.filter.address.map(Vl):r.filter.address=Vl(r.filter.address)),{method:"eth_getLogs",args:[r.filter]}}return null}getRpcError(r,n){const{method:s}=r,{error:i}=n;if(s==="eth_estimateGas"&&i.message){const c=i.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return Lt("insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.params[0],info:{payload:r,error:i}})}if(s==="eth_call"||s==="eth_estimateGas"){const c=E2(i),l=op.getBuiltinCallException(s==="eth_call"?"call":"estimateGas",r.params[0],c?c.data:null);return l.info={error:i,payload:r},l}const o=JSON.stringify(_ie(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return Lt("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[s]||"unknown",reason:"rejected",info:{payload:r,error:i}});if(s==="eth_sendRawTransaction"||s==="eth_sendTransaction"){const c=r.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return Lt("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return Lt("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return Lt("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:i}});if(o.match(/only replay-protected/i))return Lt("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:s,info:{transaction:c,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?Lt("unsupported operation","UNSUPPORTED_OPERATION",{operation:r.method,info:{error:i,payload:r}}):Lt("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:r})}send(r,n){if(this.destroyed)return Promise.reject(Lt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r}));const s=Ed(this,Af)._++,i=new Promise((o,a)=>{S(this,Zi).push({resolve:o,reject:a,payload:{method:r,params:n,id:s,jsonrpc:"2.0"}})});return ee(this,zp,w2).call(this),i}async getSigner(r){r==null&&(r=0);const n=this.send("eth_accounts",[]);if(typeof r=="number"){const i=await n;if(r>=i.length)throw new Error("no such account");return new Mx(this,i[r])}const{accounts:s}=await Fr({network:this.getNetwork(),accounts:n});r=Xe(r);for(const i of s)if(Xe(i)===r)return new Mx(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new Mx(this,n))}destroy(){S(this,ii)&&(clearTimeout(S(this,ii)),N(this,ii,null));for(const{payload:r,reject:n}of S(this,Zi))n(Lt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));N(this,Zi,[]),super.destroy()}}Wc=new WeakMap,Af=new WeakMap,Zi=new WeakMap,ii=new WeakMap,Rs=new WeakMap,ns=new WeakMap,fn=new WeakMap,zp=new WeakSet,w2=function(){if(S(this,ii))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");N(this,ii,setTimeout(()=>{N(this,ii,null);const n=S(this,Zi);for(N(this,Zi,[]);n.length;){const s=[n.shift()];for(;n.length&&s.length!==S(this,Wc).batchMaxCount;)if(s.push(n.shift()),JSON.stringify(s.map(o=>o.payload)).length>S(this,Wc).batchMaxSize){n.unshift(s.pop());break}(async()=>{const i=s.length===1?s[0].payload:s.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const o=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:c,payload:l}of s){if(this.destroyed){c(Lt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:l.method}));continue}const u=o.filter(f=>f.id===l.id)[0];if(u==null){const f=Lt("missing response for request","BAD_DATA",{value:o,info:{payload:l}});this.emit("error",f),c(f);continue}if("error"in u){c(this.getRpcError(l,u));continue}a(u.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of s)a(o)}})()}},r))};var aa;class Oie extends Iie{constructor(r,n){super(r,n);W(this,aa,void 0);let s=this._getOption("pollingInterval");s==null&&(s=bD.pollingInterval),N(this,aa,s)}_getSubscriber(r){const n=super._getSubscriber(r);return P3(n)&&(n.pollingInterval=S(this,aa)),n}get pollingInterval(){return S(this,aa)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");N(this,aa,r),this._forEachSubscriber(n=>{P3(n)&&(n.pollingInterval=S(this,aa))})}}aa=new WeakMap;var kf,J8;let wD=(J8=class extends Oie{constructor(r,n,s){r==null&&(r="http://localhost:8545");super(n,s);W(this,kf,void 0);typeof r=="string"?N(this,kf,new xo(r)):N(this,kf,r.clone())}_getConnection(){return S(this,kf).clone()}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){const n=this._getConnection();n.body=JSON.stringify(r),n.setHeader("content-type","application/json");const s=await n.send();s.assertOk();let i=s.bodyJson;return Array.isArray(i)||(i=[i]),i}},kf=new WeakMap,J8);function E2(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&vt(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=E2(t[e]);if(r)return r}return null}if(typeof t=="string")try{return E2(JSON.parse(t))}catch{}return null}function S2(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)S2(t[r],e);if(typeof t=="string")try{return S2(JSON.parse(t),e)}catch{}}}function _ie(t){const e=[];return S2(t,e),e}var Tf;const Lk=class Lk extends $C{constructor(r,n){super(n);G(this,"address");W(this,Tf,void 0);M(r&&typeof r.sign=="function","invalid private key","privateKey","[ REDACTED ]"),N(this,Tf,r);const s=gy(this.signingKey.publicKey);me(this,{address:s})}get signingKey(){return S(this,Tf)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(r){return new Lk(S(this,Tf),r)}async signTransaction(r){r=ap(r);const{to:n,from:s}=await Fr({to:r.to?wr(r.to,this.provider):void 0,from:r.from?wr(r.from,this.provider):void 0});n!=null&&(r.to=n),s!=null&&(r.from=s),r.from!=null&&(M(Xe(r.from)===this.address,"transaction from address mismatch","tx.from",r.from),delete r.from);const i=sp.from(r);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(r){return this.signMessageSync(r)}signMessageSync(r){return this.signingKey.sign(hse(r)).serialized}async signTypedData(r,n,s){const i=await Kf.resolveNames(r,n,s,async o=>{J(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:o}});const a=await this.provider.resolveName(o);return J(a!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:o}),a});return this.signingKey.sign(Kf.hash(i.domain,n,i.value)).serialized}};Tf=new WeakMap;let x0=Lk;const b0=" !#$%&'()*+,-./<=>?@[]^_`{|}~",Nie=/^[a-z]*$/i;function R3(t,e){let r=97;return t.reduce((n,s)=>(s===e?r++:s.match(Nie)?n.push(String.fromCharCode(r)+s):(r=97,n.push(s)),n),[])}function Mie(t,e){for(let s=b0.length-1;s>=0;s--)t=t.split(b0[s]).join(e.substring(2*s,2*s+2));const r=[],n=t.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(s,i,o,a)=>{if(o)for(let c=parseInt(o);c>=0;c--)r.push(";");else r.push(i.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return R3(R3(r,";"),":")}function Die(t){return M(t[0]==="0","unsupported auwl data","data",t),Mie(t.substring(1+2*b0.length),t.substring(1,1+2*b0.length))}class Lie{constructor(e){G(this,"locale");me(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var Pf,Hp,Kc,Gp,C2;class jie extends Lie{constructor(r,n,s){super(r);W(this,Gp);W(this,Pf,void 0);W(this,Hp,void 0);W(this,Kc,void 0);N(this,Pf,n),N(this,Hp,s),N(this,Kc,null)}get _data(){return S(this,Pf)}_decodeWords(){return Die(S(this,Pf))}getWord(r){const n=ee(this,Gp,C2).call(this);return M(r>=0&&r{const{value:e,digits:r=6,onChange:n,disabled:s=!1}=t,i=v.useMemo(()=>h4(0,r).map(()=>v.createRef()),[]);v.useEffect(()=>{var l,u;(u=(l=i[0])==null?void 0:l.current)==null||u.focus()},[]);const o=(l,u)=>{var d,h;/^\d$/.test(u)||(u="");const f=[...e];f[l]=u,u!==""&&((h=(d=i[l+1])==null?void 0:d.current)==null||h.focus()),n(f)},a=(l,u)=>{var p,y;const f=i[l].current,d=(p=i[l-1])==null?void 0:p.current,h=(y=i[l+1])==null?void 0:y.current;switch(u.key){case"Backspace":u.preventDefault(),f&&(f.value="",o(l,"")),d==null||d.focus();break;case"ArrowLeft":u.preventDefault(),d==null||d.focus();break;case"ArrowRight":u.preventDefault(),h==null||h.focus();break;default:(f==null?void 0:f.value)===u.key&&(u.preventDefault(),o(l,u.key))}},c=(l,u)=>{var h,p;const d=u.clipboardData.getData("text/plain").replace(/\D/g,"");/^\d{6}$/.test(d)&&((p=(h=i[0])==null?void 0:h.current)==null||p.focus(),n(d.split("")),setTimeout(()=>{var y,g;(g=(y=i[i.length-1])==null?void 0:y.current)==null||g.focus()}))};return k.jsx(q,{gap:"2",children:h4(0,r).map(l=>k.jsxs(v.Fragment,{children:[l===r/2&&k.jsx("span",{}),k.jsx(q,{as:"input",className:jee,value:e[l]||"",ref:i[l],type:"text",inputMode:"numeric",maxLength:1,disabled:s,onFocus:u=>u.target.select(),onPaste:u=>c(l,u),onChange:u=>o(l,u.target.value),onKeyDown:u=>{a(l,u)}})]},l))})},h4=(t,e)=>Array.from({length:e-t},(r,n)=>n+t),s7=()=>k.jsxs(q,{gap:"2",flexDirection:"column",borderStyle:"solid",width:"1/3",padding:"4",borderWidth:"thin",borderColor:"borderNormal",borderRadius:"sm",children:[k.jsx(ue,{variant:"xlarge",fontWeight:"bold",color:"gnosisLight",children:"Demo App"}),k.jsx(ue,{variant:"normal",marginLeft:"auto",color:"polygonLight",children:"Showcasing WaaS"})]}),i7="6.13.2";function Bee(t,e,r){const n=e.split("|").map(i=>i.trim());for(let i=0;iPromise.resolve(t[n])))).reduce((n,s,i)=>(n[e[i]]=s,n),{})}function me(t,e,r){for(let n in e){let s=e[n];const i=r?r[n]:null;i&&Bee(s,i,n),Object.defineProperty(t,n,{enumerable:!0,value:s,writable:!1})}}function hu(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(hu).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return hu(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${hu(r)}: ${hu(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Vr(t,e){return t&&t.code===e}function vC(t){return Vr(t,"CALL_EXCEPTION")}function Lt(t,e,r){let n=t;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${hu(r)}`);for(const o in r){if(o==="shortMessage")continue;const a=r[o];i.push(o+"="+hu(a))}}i.push(`code=${e}`),i.push(`version=${i7}`),i.length&&(t+=" ("+i.join(", ")+")")}let s;switch(e){case"INVALID_ARGUMENT":s=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(t);break;default:s=new Error(t)}return me(s,{code:e}),r&&Object.assign(s,r),s.shortMessage==null&&me(s,{shortMessage:n}),s}function J(t,e,r,n){if(!t)throw Lt(e,r,n)}function M(t,e,r,n){J(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function o7(t,e,r){r==null&&(r=""),r&&(r=": "+r),J(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),J(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const Fee=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"){const r=String.fromCharCode(233).normalize("NFD"),n=String.fromCharCode(101,769);if(r!==n)throw new Error("broken")}t.push(e)}catch{}return t},[]);function a7(t){J(Fee.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function $a(t,e,r){if(r==null&&(r=""),t!==e){let n=r,s="new";r&&(n+=".",s+=" "+r),J(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function c7(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let s=2;for(let i=0;i>4]+p4[s&15]}return r}function ot(t){return"0x"+t.map(e=>ne(e).substring(2)).join("")}function Ru(t){return vt(t,!0)?(t.length-2)/2:fe(t).length}function xt(t,e,r){const n=fe(t);return r!=null&&r>n.length&&J(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),ne(n.slice(e??0,r??n.length))}function l7(t,e,r){const n=fe(t);J(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const s=new Uint8Array(e);return s.fill(0),r?s.set(n,e-n.length):s.set(n,0),ne(s)}function pl(t,e){return l7(t,e,!0)}function Uee(t,e){return l7(t,e,!1)}const Vm=BigInt(0),Ns=BigInt(1),pu=9007199254740991;function c0(t,e){const r=$m(t,"value"),n=BigInt(_e(e,"width"));if(J(r>>n===Vm,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ns){const s=(Ns<=-pu&&t<=pu,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){M(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}M(!1,"invalid BigNumberish value",e||"value",t)}function $m(t,e){const r=ye(t,e);return J(r>=Vm,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const y4="0123456789abcdef";function vy(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=y4[r>>4],e+=y4[r&15];return BigInt(e)}return ye(t)}function _e(t,e){switch(typeof t){case"bigint":return M(t>=-pu&&t<=pu,"overflow",e||"value",t),Number(t);case"number":return M(Number.isInteger(t),"underflow",e||"value",t),M(t>=-pu&&t<=pu,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return _e(BigInt(t),e)}catch(r){M(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}M(!1,"invalid numeric value",e||"value",t)}function Vee(t){return _e(vy(t))}function go(t,e){let n=$m(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const s=_e(e,"width");for(J(s*2>=n.length,`value exceeds width (${s} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length>6===2;o++)i++;return i}return t==="OVERRUN"?r.length-e-1:0}function Kee(t,e,r,n,s){return t==="OVERLONG"?(M(typeof s=="number","invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),h7(t,e,r))}const Qee=Object.freeze({error:Wee,ignore:h7,replace:Kee});function Yee(t,e){e==null&&(e=Qee.error);const r=fe(t,"bytes"),n=[];let s=0;for(;s>7)){n.push(i);continue}let o=null,a=null;if((i&224)===192)o=1,a=127;else if((i&240)===224)o=2,a=2047;else if((i&248)===240)o=3,a=65535;else{(i&192)===128?s+=e("UNEXPECTED_CONTINUE",s-1,r,n):s+=e("BAD_PREFIX",s-1,r,n);continue}if(s-1+o>=r.length){s+=e("OVERRUN",s-1,r,n);continue}let c=i&(1<<8-o-1)-1;for(let l=0;l1114111){s+=e("OUT_OF_RANGE",s-1-o,r,n,c);continue}if(c>=55296&&c<=57343){s+=e("UTF16_SURROGATE",s-1-o,r,n,c);continue}if(c<=a){s+=e("OVERLONG",s-1-o,r,n,c);continue}n.push(c)}}return n}function Sr(t,e){M(typeof t=="string","invalid string value","str",t),e!=null&&(a7(e),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);M(n>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return new Uint8Array(r)}function Jee(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function u0(t,e){return Jee(Yee(t,e))}function p7(t){async function e(r,n){J(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const s=r.url.split(":")[0].toLowerCase();J(s==="http"||s==="https",`unsupported protocol ${s}`,"UNSUPPORTED_OPERATION",{info:{protocol:s},operation:"request"}),J(s==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const o=new AbortController,a=setTimeout(()=>{i=Lt("request timeout","TIMEOUT"),o.abort()},r.timeout);n&&n.addListener(()=>{i=Lt("request cancelled","CANCELLED"),o.abort()});const c={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:o.signal};let l;try{l=await fetch(r.url,c)}catch(h){throw clearTimeout(a),i||h}clearTimeout(a);const u={};l.headers.forEach((h,p)=>{u[p.toLowerCase()]=h});const f=await l.arrayBuffer(),d=f==null?null:new Uint8Array(f);return{statusCode:l.status,statusMessage:l.statusText,headers:u,body:d}}return e}const Xee=12,Zee=250;let v4=p7();const ete=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),tte=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let gx=!1;async function y7(t,e){try{const r=t.match(ete);if(!r)throw new Error("invalid data");return new Ea(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?Gee(r[3]):nte(r[3]))}catch{return new Ea(599,"BAD REQUEST (invalid data: URI)",{},null,new xo(t))}}function v7(t){async function e(r,n){try{const s=r.match(tte);if(!s)throw new Error("invalid link");return new xo(`${t}${s[2]}`)}catch{return new Ea(599,"BAD REQUEST (invalid IPFS URI)",{},null,new xo(r))}}return e}const f1={data:y7,ipfs:v7("https://gateway.ipfs.io/ipfs/")},m7=new WeakMap;var kc,Go;class rte{constructor(e){W(this,kc,void 0);W(this,Go,void 0);N(this,kc,[]),N(this,Go,!1),m7.set(e,()=>{if(!S(this,Go)){N(this,Go,!0);for(const r of S(this,kc))setTimeout(()=>{r()},0);N(this,kc,[])}})}addListener(e){J(!S(this,Go),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),S(this,kc).push(e)}get cancelled(){return S(this,Go)}checkSignal(){J(!this.cancelled,"cancelled","CANCELLED",{})}}kc=new WeakMap,Go=new WeakMap;function d1(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var Bu,Fu,Cs,Vi,Uu,Vu,or,kn,$i,Tc,Pc,Rc,Xs,As,qo,Ic,Jd;const D0=class D0{constructor(e){W(this,Ic);W(this,Bu,void 0);W(this,Fu,void 0);W(this,Cs,void 0);W(this,Vi,void 0);W(this,Uu,void 0);W(this,Vu,void 0);W(this,or,void 0);W(this,kn,void 0);W(this,$i,void 0);W(this,Tc,void 0);W(this,Pc,void 0);W(this,Rc,void 0);W(this,Xs,void 0);W(this,As,void 0);W(this,qo,void 0);N(this,Vu,String(e)),N(this,Bu,!1),N(this,Fu,!0),N(this,Cs,{}),N(this,Vi,""),N(this,Uu,3e5),N(this,As,{slotInterval:Zee,maxAttempts:Xee}),N(this,qo,null)}get url(){return S(this,Vu)}set url(e){N(this,Vu,String(e))}get body(){return S(this,or)==null?null:new Uint8Array(S(this,or))}set body(e){if(e==null)N(this,or,void 0),N(this,kn,void 0);else if(typeof e=="string")N(this,or,Sr(e)),N(this,kn,"text/plain");else if(e instanceof Uint8Array)N(this,or,e),N(this,kn,"application/octet-stream");else if(typeof e=="object")N(this,or,Sr(JSON.stringify(e))),N(this,kn,"application/json");else throw new Error("invalid body")}hasBody(){return S(this,or)!=null}get method(){return S(this,Vi)?S(this,Vi):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),N(this,Vi,String(e).toUpperCase())}get headers(){const e=Object.assign({},S(this,Cs));return S(this,$i)&&(e.authorization=`Basic ${qee(Sr(S(this,$i)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&S(this,kn)&&(e["content-type"]=S(this,kn)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){S(this,Cs)[String(e).toLowerCase()]=String(r)}clearHeaders(){N(this,Cs,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),N(this,Uu,e)}get preflightFunc(){return S(this,Tc)||null}set preflightFunc(e){N(this,Tc,e)}get processFunc(){return S(this,Pc)||null}set processFunc(e){N(this,Pc,e)}get retryFunc(){return S(this,Rc)||null}set retryFunc(e){N(this,Rc,e)}get getUrlFunc(){return S(this,qo)||v4}set getUrlFunc(e){N(this,qo,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(S(this,As).slotInterval=e.slotInterval),e.maxAttempts!=null&&(S(this,As).maxAttempts=e.maxAttempts)}send(){return J(S(this,Xs)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),N(this,Xs,new rte(this)),ee(this,Ic,Jd).call(this,0,m4()+this.timeout,0,this,new Ea(0,"",{},null,this))}cancel(){J(S(this,Xs)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=m7.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();J(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const s=new D0(e);return s.method="GET",s.allowGzip=this.allowGzip,s.timeout=this.timeout,N(s,Cs,Object.assign({},S(this,Cs))),S(this,or)&&N(s,or,new Uint8Array(S(this,or))),N(s,kn,S(this,kn)),s}clone(){const e=new D0(this.url);return N(e,Vi,S(this,Vi)),S(this,or)&&N(e,or,S(this,or)),N(e,kn,S(this,kn)),N(e,Cs,Object.assign({},S(this,Cs))),N(e,$i,S(this,$i)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),N(e,Tc,S(this,Tc)),N(e,Pc,S(this,Pc)),N(e,Rc,S(this,Rc)),N(e,As,Object.assign({},S(this,As))),N(e,qo,S(this,qo)),e}static lockConfig(){gx=!0}static getGateway(e){return f1[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(gx)throw new Error("gateways locked");f1[e]=r}static registerGetUrl(e){if(gx)throw new Error("gateways locked");v4=e}static createGetUrlFunc(e){return p7()}static createDataGateway(){return y7}static createIpfsGatewayFunc(e){return v7(e)}};Bu=new WeakMap,Fu=new WeakMap,Cs=new WeakMap,Vi=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,or=new WeakMap,kn=new WeakMap,$i=new WeakMap,Tc=new WeakMap,Pc=new WeakMap,Rc=new WeakMap,Xs=new WeakMap,As=new WeakMap,qo=new WeakMap,Ic=new WeakSet,Jd=async function(e,r,n,s,i){var u,f,d;if(e>=S(this,As).maxAttempts)return i.makeServerError("exceeded maximum retry limit");J(m4()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:s}),n>0&&await ste(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in f1){const h=await f1[a](o.url,d1(S(s,Xs)));if(h instanceof Ea){let p=h;if(this.processFunc){d1(S(s,Xs));try{p=await this.processFunc(o,p)}catch(y){(y.throttle==null||typeof y.stall!="number")&&p.makeServerError("error in post-processing function",y).assertOk()}}return p}o=h}this.preflightFunc&&(o=await this.preflightFunc(o));const c=await this.getUrlFunc(o,d1(S(s,Xs)));let l=new Ea(c.statusCode,c.statusMessage,c.headers,c.body,s);if(l.statusCode===301||l.statusCode===302){try{const h=l.headers.location||"";return ee(u=o.redirect(h),Ic,Jd).call(u,e+1,r,0,s,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,l,e))){const h=l.headers["retry-after"];let p=S(this,As).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof h=="string"&&h.match(/^[1-9][0-9]*$/)&&(p=parseInt(h)),ee(f=o.clone(),Ic,Jd).call(f,e+1,r,p,s,l)}if(this.processFunc){d1(S(s,Xs));try{l=await this.processFunc(o,l)}catch(h){(h.throttle==null||typeof h.stall!="number")&&l.makeServerError("error in post-processing function",h).assertOk();let p=S(this,As).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return h.stall>=0&&(p=h.stall),ee(d=o.clone(),Ic,Jd).call(d,e+1,r,p,s,l)}}return l};let xo=D0;var Ep,Sp,Cp,Tn,$u,Oc;const _k=class _k{constructor(e,r,n,s,i){W(this,Ep,void 0);W(this,Sp,void 0);W(this,Cp,void 0);W(this,Tn,void 0);W(this,$u,void 0);W(this,Oc,void 0);N(this,Ep,e),N(this,Sp,r),N(this,Cp,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),N(this,Tn,s==null?null:new Uint8Array(s)),N(this,$u,i||null),N(this,Oc,{message:""})}toString(){return``}get statusCode(){return S(this,Ep)}get statusMessage(){return S(this,Sp)}get headers(){return Object.assign({},S(this,Cp))}get body(){return S(this,Tn)==null?null:new Uint8Array(S(this,Tn))}get bodyText(){try{return S(this,Tn)==null?"":u0(S(this,Tn))}catch{J(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{J(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw me(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return S(this,Tn)!=null}get request(){return S(this,$u)}ok(){return S(this,Oc).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=S(this,Oc);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let s=null;try{S(this,Tn)&&(s=u0(S(this,Tn)))}catch{}J(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r,info:{requestUrl:n,responseBody:s,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};Ep=new WeakMap,Sp=new WeakMap,Cp=new WeakMap,Tn=new WeakMap,$u=new WeakMap,Oc=new WeakMap;let Ea=_k;function m4(){return new Date().getTime()}function nte(t){return Sr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function ste(t){return new Promise(e=>setTimeout(e,t))}const ite=BigInt(-1),xs=BigInt(0),vu=BigInt(1),ote=BigInt(5),Bl={};let Iu="0000";for(;Iu.length<80;)Iu+=Iu;function Xa(t){let e=Iu;for(;e.length=-s&&txs?t=c0(bc(t,n),n):t=-c0(bc(-t,n),n)}else{const s=vu<=0&&ti[a]==null?l:(M(typeof i[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,i[a]),i[a]);e=o("signed","boolean",e),r=o("width","number",r),n=o("decimals","number",n)}M(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),M(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const s=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:s}}function ate(t,e){let r="";t0?n*=Xa(s):s<0&&(r*=Xa(-s)),rn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=S(this,st);return S(this,st)xs&&(e+=S(this,Yr)-vu),e=S(this,st)/S(this,Yr)*S(this,Yr),ee(this,Ts,Ii).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=ote*Xa(r-1);let s=this.value+n;const i=Xa(r);return s=s/i*i,jd(s,S(this,ks),"round"),new $o(Bl,s,S(this,ks))}isZero(){return S(this,st)===xs}isNegative(){return S(this,st)0){const c=Xa(a);J(o%c===xs,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=Xa(-a));return jd(o,i,"fromValue"),new $o(Bl,o,i)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);M(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const s=xx(r);let i=n[2]||"0",o=n[3]||"";for(;o.length{J(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const s=g4(t,e+1,n);return r(e+1+n+s),x4(t,e,e+1+n,n+s)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),x4(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const s=g4(t,e+1,n);r(e+1+n+s);const i=ne(t.slice(e+1+n,e+1+n+s));return{consumed:1+n+s,result:i}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const s=ne(t.slice(e+1,e+1+n));return{consumed:1+n,result:s}}return{consumed:1,result:cte(t[e])}}function zm(t){const e=fe(t,"data"),r=g7(e,0);return M(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function b4(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function x7(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(i){n=n.concat(x7(i))}),n.length<=55)return n.unshift(192+n.length),n;const s=b4(n.length);return s.unshift(247+s.length),s.concat(n)}const e=Array.prototype.slice.call(fe(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=b4(e.length);return r.unshift(183+r.length),r.concat(e)}const w4="0123456789abcdef";function yl(t){let e="0x";for(const r of x7(t))e+=w4[r>>4],e+=w4[r&15];return e}const b7=["wei","kwei","mwei","gwei","szabo","finney","ether"];function mC(t,e){let r=18;if(typeof e=="string"){const n=b7.indexOf(e);M(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=_e(e,"unit"));return f0.fromValue(t,r,{decimals:r,width:512}).toString()}function Xh(t,e){M(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=b7.indexOf(e);M(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=_e(e,"unit"));return f0.fromString(t,{decimals:r,width:512}).value}function lte(t){return mC(t,18)}function E4(t){return Xh(t,18)}function ute(t){const e=fe(t,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=ne(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const rn=32,Gw=new Uint8Array(rn),fte=["then"],h1={},w7=new WeakMap;function lc(t){return w7.get(t)}function S4(t,e){w7.set(t,e)}function Bd(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}function qw(t,e,r){return t.indexOf(null)>=0?e.map((n,s)=>n instanceof Uf?qw(lc(n),n,r):n):t.reduce((n,s,i)=>{let o=e.getValue(s);return s in n||(r&&o instanceof Uf&&(o=qw(lc(o),o,r)),n[s]=o),n},{})}var zu;const mu=class mu extends Array{constructor(...r){const n=r[0];let s=r[1],i=(r[2]||[]).slice(),o=!0;n!==h1&&(s=r,i=[],o=!1);super(s.length);W(this,zu,void 0);s.forEach((l,u)=>{this[u]=l});const a=i.reduce((l,u)=>(typeof u=="string"&&l.set(u,(l.get(u)||0)+1),l),new Map);if(S4(this,Object.freeze(s.map((l,u)=>{const f=i[u];return f!=null&&a.get(f)===1?f:null}))),N(this,zu,[]),S(this,zu)==null&&S(this,zu),!o)return;Object.freeze(this);const c=new Proxy(this,{get:(l,u,f)=>{if(typeof u=="string"){if(u.match(/^[0-9]+$/)){const h=_e(u,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const p=l[h];return p instanceof Error&&Bd(`index ${h}`,p),p}if(fte.indexOf(u)>=0)return Reflect.get(l,u,f);const d=l[u];if(d instanceof Function)return function(...h){return d.apply(this===f?l:this,h)};if(!(u in l))return l.getValue.apply(this===f?l:this,[u])}return Reflect.get(l,u,f)}});return S4(c,lc(this)),c}toArray(r){const n=[];return this.forEach((s,i)=>{s instanceof Error&&Bd(`index ${i}`,s),r&&s instanceof mu&&(s=s.toArray(r)),n.push(s)}),n}toObject(r){const n=lc(this);return n.reduce((s,i,o)=>(J(i!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),qw(n,this,r)),{})}slice(r,n){r==null&&(r=0),r<0&&(r+=this.length,r<0&&(r=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const s=lc(this),i=[],o=[];for(let a=r;a{S(this,Hi)[e]=C4(r)}}}Hi=new WeakMap,_c=new WeakMap,Hu=new WeakSet,X1=function(e){return S(this,Hi).push(e),N(this,_c,S(this,_c)+e.length),e.length};var un,Pn,Nc,Mc,Wo,Rp,Qw,L0,E7;const Nk=class Nk{constructor(e,r,n){W(this,Rp);W(this,L0);G(this,"allowLoose");W(this,un,void 0);W(this,Pn,void 0);W(this,Nc,void 0);W(this,Mc,void 0);W(this,Wo,void 0);me(this,{allowLoose:!!r}),N(this,un,br(e)),N(this,Nc,0),N(this,Mc,null),N(this,Wo,n??1024),N(this,Pn,0)}get data(){return ne(S(this,un))}get dataLength(){return S(this,un).length}get consumed(){return S(this,Pn)}get bytes(){return new Uint8Array(S(this,un))}subReader(e){const r=new Nk(S(this,un).slice(S(this,Pn)+e),this.allowLoose,S(this,Wo));return N(r,Mc,this),r}readBytes(e,r){let n=ee(this,L0,E7).call(this,0,e,!!r);return ee(this,Rp,Qw).call(this,e),N(this,Pn,S(this,Pn)+n.length),n.slice(0,e)}readValue(){return vy(this.readBytes(rn))}readIndex(){return Vee(this.readBytes(rn))}};un=new WeakMap,Pn=new WeakMap,Nc=new WeakMap,Mc=new WeakMap,Wo=new WeakMap,Rp=new WeakSet,Qw=function(e){var r;if(S(this,Mc))return ee(r=S(this,Mc),Rp,Qw).call(r,e);N(this,Nc,S(this,Nc)+e),J(S(this,Wo)<1||S(this,Nc)<=S(this,Wo)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${S(this,Wo)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:br(S(this,un)),offset:S(this,Pn),length:e,info:{bytesRead:S(this,Nc),dataLength:this.dataLength}})},L0=new WeakSet,E7=function(e,r,n){let s=Math.ceil(r/rn)*rn;return S(this,Pn)+s>S(this,un).length&&(this.allowLoose&&n&&S(this,Pn)+r<=S(this,un).length?s=r:J(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:br(S(this,un)),length:S(this,un).length,offset:S(this,Pn)+s})),S(this,un).slice(S(this,Pn),S(this,Pn)+s)};let Kw=Nk;function Nn(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function gC(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function S7(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Nn(t.outputLen),Nn(t.blockLen)}function Vf(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function C7(t,e){gC(t);const r=e.outputLen;if(t.lengtht instanceof Uint8Array,Z1=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),ev=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),qs=(t,e)=>t<<32-e|t>>>e,dte=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!dte)throw new Error("Non little-endian hardware is not supported");const hte=async()=>{};async function A4(t,e,r){let n=Date.now();for(let s=0;s=0&&in+s.length,0));let r=0;return t.forEach(n=>{if(!A7(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class xC{clone(){return this._cloneInto()}}const vte={}.toString;function k7(t,e){if(e!==void 0&&vte.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function Hm(t){const e=n=>t().update($f(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function mte(t=32){if(bx&&typeof bx.getRandomValues=="function")return bx.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class T7 extends xC{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,S7(e);const n=$f(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(n.length>s?e.create().update(n).digest():n);for(let o=0;onew T7(t,e).update(r).digest();Gm.create=(t,e)=>new T7(t,e);function gte(t,e,r,n){S7(t);const s=k7({dkLen:32,asyncTick:10},n),{c:i,dkLen:o,asyncTick:a}=s;if(Nn(i),Nn(o),Nn(a),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=$f(e),l=$f(r),u=new Uint8Array(o),f=Gm.create(t,c),d=f._cloneInto().update(l);return{c:i,dkLen:o,asyncTick:a,DK:u,PRF:f,PRFSalt:d}}function xte(t,e,r,n,s){return t.destroy(),e.destroy(),n&&n.destroy(),s.fill(0),r}function bC(t,e,r,n){const{c:s,dkLen:i,DK:o,PRF:a,PRFSalt:c}=gte(t,e,r,n);let l;const u=new Uint8Array(4),f=ev(u),d=new Uint8Array(a.outputLen);for(let h=1,p=0;p>s&i),a=Number(r&i),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}class wC extends xC{constructor(e,r,n,s){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ev(this.buffer)}update(e){Vf(this);const{view:r,buffer:n,blockLen:s}=this;e=$f(e);const i=e.length;for(let o=0;os-o&&(this.process(n,0),o=0);for(let f=o;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&r,Ete=(t,e,r)=>t&e^t&r^e&r,Ste=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ro=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Io=new Uint32Array(64);class Cte extends wC{constructor(){super(64,32,8,!1),this.A=Ro[0]|0,this.B=Ro[1]|0,this.C=Ro[2]|0,this.D=Ro[3]|0,this.E=Ro[4]|0,this.F=Ro[5]|0,this.G=Ro[6]|0,this.H=Ro[7]|0}get(){const{A:e,B:r,C:n,D:s,E:i,F:o,G:a,H:c}=this;return[e,r,n,s,i,o,a,c]}set(e,r,n,s,i,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)Io[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){const d=Io[f-15],h=Io[f-2],p=qs(d,7)^qs(d,18)^d>>>3,y=qs(h,17)^qs(h,19)^h>>>10;Io[f]=y+Io[f-7]+p+Io[f-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=qs(a,6)^qs(a,11)^qs(a,25),h=u+d+wte(a,c,l)+Ste[f]+Io[f]|0,y=(qs(n,2)^qs(n,13)^qs(n,22))+Ete(n,s,i)|0;u=l,l=c,c=a,a=o+h|0,o=i,i=s,s=n,n=h+y|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,i,o,a,c,l,u)}roundClean(){Io.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const dd=Hm(()=>new Cte),p1=BigInt(2**32-1),Yw=BigInt(32);function P7(t,e=!1){return e?{h:Number(t&p1),l:Number(t>>Yw&p1)}:{h:Number(t>>Yw&p1)|0,l:Number(t&p1)|0}}function R7(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;sBigInt(t>>>0)<>>0),kte=(t,e,r)=>t>>>r,Tte=(t,e,r)=>t<<32-r|e>>>r,Pte=(t,e,r)=>t>>>r|e<<32-r,Rte=(t,e,r)=>t<<32-r|e>>>r,Ite=(t,e,r)=>t<<64-r|e>>>r-32,Ote=(t,e,r)=>t>>>r-32|e<<64-r,_te=(t,e)=>e,Nte=(t,e)=>t,I7=(t,e,r)=>t<>>32-r,O7=(t,e,r)=>e<>>32-r,_7=(t,e,r)=>e<>>64-r,N7=(t,e,r)=>t<>>64-r;function Mte(t,e,r,n){const s=(e>>>0)+(n>>>0);return{h:t+r+(s/2**32|0)|0,l:s|0}}const Dte=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Lte=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,jte=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Bte=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,Fte=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),Ute=(t,e,r,n,s,i)=>e+r+n+s+i+(t/2**32|0)|0,Vte={fromBig:P7,split:R7,toBig:Ate,shrSH:kte,shrSL:Tte,rotrSH:Pte,rotrSL:Rte,rotrBH:Ite,rotrBL:Ote,rotr32H:_te,rotr32L:Nte,rotlSH:I7,rotlSL:O7,rotlBH:_7,rotlBL:N7,add:Mte,add3L:Dte,add3H:Lte,add4L:jte,add4H:Bte,add5H:Ute,add5L:Fte},je=Vte,[$te,zte]=(()=>je.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))))(),Oo=new Uint32Array(80),_o=new Uint32Array(80);class Hte extends wC{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:f,Fl:d,Gh:h,Gl:p,Hh:y,Hl:g}=this;return[e,r,n,s,i,o,a,c,l,u,f,d,h,p,y,g]}set(e,r,n,s,i,o,a,c,l,u,f,d,h,p,y,g){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=f|0,this.Fl=d|0,this.Gh=h|0,this.Gl=p|0,this.Hh=y|0,this.Hl=g|0}process(e,r){for(let b=0;b<16;b++,r+=4)Oo[b]=e.getUint32(r),_o[b]=e.getUint32(r+=4);for(let b=16;b<80;b++){const w=Oo[b-15]|0,A=_o[b-15]|0,O=je.rotrSH(w,A,1)^je.rotrSH(w,A,8)^je.shrSH(w,A,7),_=je.rotrSL(w,A,1)^je.rotrSL(w,A,8)^je.shrSL(w,A,7),C=Oo[b-2]|0,j=_o[b-2]|0,V=je.rotrSH(C,j,19)^je.rotrBH(C,j,61)^je.shrSH(C,j,6),B=je.rotrSL(C,j,19)^je.rotrBL(C,j,61)^je.shrSL(C,j,6),$=je.add4L(_,B,_o[b-7],_o[b-16]),Y=je.add4H($,O,V,Oo[b-7],Oo[b-16]);Oo[b]=Y|0,_o[b]=$|0}let{Ah:n,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:f,El:d,Fh:h,Fl:p,Gh:y,Gl:g,Hh:m,Hl:x}=this;for(let b=0;b<80;b++){const w=je.rotrSH(f,d,14)^je.rotrSH(f,d,18)^je.rotrBH(f,d,41),A=je.rotrSL(f,d,14)^je.rotrSL(f,d,18)^je.rotrBL(f,d,41),O=f&h^~f&y,_=d&p^~d&g,C=je.add5L(x,A,_,zte[b],_o[b]),j=je.add5H(C,m,w,O,$te[b],Oo[b]),V=C|0,B=je.rotrSH(n,s,28)^je.rotrBH(n,s,34)^je.rotrBH(n,s,39),$=je.rotrSL(n,s,28)^je.rotrBL(n,s,34)^je.rotrBL(n,s,39),Y=n&i^n&a^i&a,H=s&o^s&c^o&c;m=y|0,x=g|0,y=h|0,g=p|0,h=f|0,p=d|0,{h:f,l:d}=je.add(l|0,u|0,j|0,V|0),l=a|0,u=c|0,a=i|0,c=o|0,i=n|0,o=s|0;const L=je.add3L(V,$,H);n=je.add3H(L,j,B,Y),s=L|0}({h:n,l:s}=je.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:o}=je.add(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=je.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=je.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:f,l:d}=je.add(this.Eh|0,this.El|0,f|0,d|0),{h,l:p}=je.add(this.Fh|0,this.Fl|0,h|0,p|0),{h:y,l:g}=je.add(this.Gh|0,this.Gl|0,y|0,g|0),{h:m,l:x}=je.add(this.Hh|0,this.Hl|0,m|0,x|0),this.set(n,s,i,o,a,c,l,u,f,d,h,p,y,g,m,x)}roundClean(){Oo.fill(0),_o.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const EC=Hm(()=>new Hte);function Gte(){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 k4=Gte(),T4=k4.crypto||k4.msCrypto;function qte(t){switch(t){case"sha256":return dd.create();case"sha512":return EC.create()}M(!1,"invalid hashing algorithm name","algorithm",t)}function Wte(t,e){const r={sha256:dd,sha512:EC}[t];return M(r!=null,"invalid hmac algorithm","algorithm",t),Gm.create(r,e)}function Kte(t,e,r,n,s){const i={sha256:dd,sha512:EC}[s];return M(i!=null,"invalid pbkdf2 algorithm","algorithm",s),bC(i,t,e,{c:r,dkLen:n})}function Qte(t){J(T4!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),M(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return T4.getRandomValues(e),e}let M7=!1;const D7=function(t,e,r){return Wte(t,e).update(r).digest()};let L7=D7;function hd(t,e,r){const n=fe(e,"key"),s=fe(r,"data");return ne(L7(t,n,s))}hd._=D7;hd.lock=function(){M7=!0};hd.register=function(t){if(M7)throw new Error("computeHmac is locked");L7=t};Object.freeze(hd);const[j7,B7,F7]=[[],[],[]],Yte=BigInt(0),Fd=BigInt(1),Jte=BigInt(2),Xte=BigInt(7),Zte=BigInt(256),ere=BigInt(113);for(let t=0,e=Fd,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],j7.push(2*(5*n+r)),B7.push((t+1)*(t+2)/2%64);let s=Yte;for(let i=0;i<7;i++)e=(e<>Xte)*ere)%Zte,e&Jte&&(s^=Fd<<(Fd<r>32?_7(t,e,r):I7(t,e,r),R4=(t,e,r)=>r>32?N7(t,e,r):O7(t,e,r);function nre(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=P4(l,u,1)^r[a],d=R4(l,u,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=d}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=B7[o],c=P4(s,i,a),l=R4(s,i,a),u=j7[o];s=t[u],i=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=tre[n],t[1]^=rre[n]}r.fill(0)}class SC extends xC{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Nn(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Z1(this.state)}keccak(){nre(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Vf(this);const{blockLen:r,state:n}=this;e=$f(e);const s=e.length;for(let i=0;i=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Nn(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(C7(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new SC(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const sre=(t,e,r)=>Hm(()=>new SC(e,t,r)),ire=sre(1,136,256/8);let U7=!1;const V7=function(t){return ire(t)};let $7=V7;function Ct(t){const e=fe(t,"data");return ne($7(e))}Ct._=V7;Ct.lock=function(){U7=!0};Ct.register=function(t){if(U7)throw new TypeError("keccak256 is locked");$7=t};Object.freeze(Ct);const ore=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),z7=Uint8Array.from({length:16},(t,e)=>e),are=z7.map(t=>(9*t+5)%16);let CC=[z7],AC=[are];for(let t=0;t<4;t++)for(let e of[CC,AC])e.push(e[t].map(r=>ore[r]));const H7=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),cre=CC.map((t,e)=>t.map(r=>H7[e][r])),lre=AC.map((t,e)=>t.map(r=>H7[e][r])),ure=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),fre=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),y1=(t,e)=>t<>>32-e;function I4(t,e,r,n){return t===0?e^r^n:t===1?e&r|~e&n:t===2?(e|~r)^n:t===3?e&n|r&~n:e^(r|~n)}const v1=new Uint32Array(16);class dre extends wC{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:r,h2:n,h3:s,h4:i}=this;return[e,r,n,s,i]}set(e,r,n,s,i){this.h0=e|0,this.h1=r|0,this.h2=n|0,this.h3=s|0,this.h4=i|0}process(e,r){for(let h=0;h<16;h++,r+=4)v1[h]=e.getUint32(r,!0);let n=this.h0|0,s=n,i=this.h1|0,o=i,a=this.h2|0,c=a,l=this.h3|0,u=l,f=this.h4|0,d=f;for(let h=0;h<5;h++){const p=4-h,y=ure[h],g=fre[h],m=CC[h],x=AC[h],b=cre[h],w=lre[h];for(let A=0;A<16;A++){const O=y1(n+I4(h,i,a,l)+v1[m[A]]+y,b[A])+f|0;n=f,f=l,l=y1(a,10)|0,a=i,i=O}for(let A=0;A<16;A++){const O=y1(s+I4(p,o,c,u)+v1[x[A]]+g,w[A])+d|0;s=d,d=u,u=y1(c,10)|0,c=o,o=O}}this.set(this.h1+a+u|0,this.h2+l+d|0,this.h3+f+s|0,this.h4+n+o|0,this.h0+i+c|0)}roundClean(){v1.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const hre=Hm(()=>new dre);let G7=!1;const q7=function(t){return hre(t)};let W7=q7;function pd(t){const e=fe(t,"data");return ne(W7(e))}pd._=q7;pd.lock=function(){G7=!0};pd.register=function(t){if(G7)throw new TypeError("ripemd160 is locked");W7=t};Object.freeze(pd);let K7=!1;const Q7=function(t,e,r,n,s){return Kte(t,e,r,n,s)};let Y7=Q7;function za(t,e,r,n,s){const i=fe(t,"password"),o=fe(e,"salt");return ne(Y7(i,o,r,n,s))}za._=Q7;za.lock=function(){K7=!0};za.register=function(t){if(K7)throw new Error("pbkdf2 is locked");Y7=t};Object.freeze(za);let J7=!1;const X7=function(t){return new Uint8Array(Qte(t))};let Z7=X7;function co(t){return Z7(t)}co._=X7;co.lock=function(){J7=!0};co.register=function(t){if(J7)throw new Error("randomBytes is locked");Z7=t};Object.freeze(co);const Ye=(t,e)=>t<>>32-e;function O4(t,e,r,n,s,i){let o=t[e++]^r[n++],a=t[e++]^r[n++],c=t[e++]^r[n++],l=t[e++]^r[n++],u=t[e++]^r[n++],f=t[e++]^r[n++],d=t[e++]^r[n++],h=t[e++]^r[n++],p=t[e++]^r[n++],y=t[e++]^r[n++],g=t[e++]^r[n++],m=t[e++]^r[n++],x=t[e++]^r[n++],b=t[e++]^r[n++],w=t[e++]^r[n++],A=t[e++]^r[n++],O=o,_=a,C=c,j=l,V=u,B=f,$=d,Y=h,H=p,L=y,T=g,P=m,R=x,I=b,U=w,F=A;for(let X=0;X<8;X+=2)V^=Ye(O+R|0,7),H^=Ye(V+O|0,9),R^=Ye(H+V|0,13),O^=Ye(R+H|0,18),L^=Ye(B+_|0,7),I^=Ye(L+B|0,9),_^=Ye(I+L|0,13),B^=Ye(_+I|0,18),U^=Ye(T+$|0,7),C^=Ye(U+T|0,9),$^=Ye(C+U|0,13),T^=Ye($+C|0,18),j^=Ye(F+P|0,7),Y^=Ye(j+F|0,9),P^=Ye(Y+j|0,13),F^=Ye(P+Y|0,18),_^=Ye(O+j|0,7),C^=Ye(_+O|0,9),j^=Ye(C+_|0,13),O^=Ye(j+C|0,18),$^=Ye(B+V|0,7),Y^=Ye($+B|0,9),V^=Ye(Y+$|0,13),B^=Ye(V+Y|0,18),P^=Ye(T+L|0,7),H^=Ye(P+T|0,9),L^=Ye(H+P|0,13),T^=Ye(L+H|0,18),R^=Ye(F+U|0,7),I^=Ye(R+F|0,9),U^=Ye(I+R|0,13),F^=Ye(U+I|0,18);s[i++]=o+O|0,s[i++]=a+_|0,s[i++]=c+C|0,s[i++]=l+j|0,s[i++]=u+V|0,s[i++]=f+B|0,s[i++]=d+$|0,s[i++]=h+Y|0,s[i++]=p+H|0,s[i++]=y+L|0,s[i++]=g+T|0,s[i++]=m+P|0,s[i++]=x+R|0,s[i++]=b+I|0,s[i++]=w+U|0,s[i++]=A+F|0}function Ou(t,e,r,n,s){let i=n+0,o=n+16*s;for(let a=0;a<16;a++)r[o+a]=t[e+(2*s-1)*16+a];for(let a=0;a0&&(o+=16),O4(r,i,t,e+=16,r,o)}function eM(t,e,r){const n=k7({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:s,r:i,p:o,dkLen:a,asyncTick:c,maxmem:l,onProgress:u}=n;if(Nn(s),Nn(i),Nn(o),Nn(a),Nn(c),Nn(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const f=128*i,d=f/4;if(s<=1||s&s-1||s>=2**(f/8)||s>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/f)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const h=f*(s+o);if(h>l)throw new Error(`Scrypt: parameters too large, ${h} (128 * r * (N + p)) > ${l} (maxmem)`);const p=bC(dd,t,e,{c:1,dkLen:f*o}),y=Z1(p),g=Z1(new Uint8Array(f*s)),m=Z1(new Uint8Array(f));let x=()=>{};if(u){const b=2*s*o,w=Math.max(Math.floor(b/1e4),1);let A=0;x=()=>{A++,u&&(!(A%w)||A===b)&&u(A/b)}}return{N:s,r:i,p:o,dkLen:a,blockSize32:d,V:g,B32:y,B:p,tmp:m,blockMixCb:x,asyncTick:c}}function tM(t,e,r,n,s){const i=bC(dd,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),s.fill(0),i}function pre(t,e,r){const{N:n,r:s,p:i,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:f,blockMixCb:d}=eM(t,e,r);for(let h=0;h{Ou(c,g,c,g+=a,s),d()}),Ou(c,(n-1)*a,l,y,s),d(),await A4(n,h,()=>{const m=l[y+a-16]%n;for(let x=0;xt instanceof Uint8Array,mre=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function zf(t){if(!Wm(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rn+s.length,0));let r=0;return t.forEach(n=>{if(!Wm(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function xre(t,e){if(t.length!==e.length)return!1;for(let r=0;rfM;t>>=qm,e+=1);return e}function Ere(t,e){return t>>BigInt(e)&qm}const Sre=(t,e,r)=>t|(r?qm:fM)<(vre<new Uint8Array(t),_4=t=>Uint8Array.from(t);function hM(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=wx(t),s=wx(t),i=0;const o=()=>{n.fill(1),s.fill(0),i=0},a=(...f)=>r(s,n,...f),c=(f=wx())=>{s=a(_4([0]),f),n=a(),f.length!==0&&(s=a(_4([1]),f),n=a())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const d=[];for(;f{o(),c(f);let h;for(;!(h=d(l()));)c();return o(),h}}const Cre={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function my(t,e,r={}){const n=(s,i,o)=>{const a=Cre[i];if(typeof a!="function")throw new Error(`Invalid validator "${i}", expected function`);const c=t[s];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(s)}=${c} (${typeof c}), expected ${i}`)};for(const[s,i]of Object.entries(e))n(s,i,!1);for(const[s,i]of Object.entries(r))n(s,i,!0);return t}const Are=Object.freeze(Object.defineProperty({__proto__:null,bitGet:Ere,bitLen:wre,bitMask:RC,bitSet:Sre,bytesToHex:zf,bytesToNumberBE:tl,bytesToNumberLE:TC,concatBytes:Zh,createHmacDrbg:hM,ensureBytes:Ss,equalBytes:xre,hexToBytes:Hf,hexToNumber:kC,numberToBytesBE:Gf,numberToBytesLE:PC,numberToHexUnpadded:dM,numberToVarBytesBE:gre,utf8ToBytes:bre,validateObject:my},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const fr=BigInt(0),Kt=BigInt(1),uc=BigInt(2),kre=BigInt(3),Jw=BigInt(4),N4=BigInt(5),M4=BigInt(8);BigInt(9);BigInt(16);function dn(t,e){const r=t%e;return r>=fr?r:e+r}function Tre(t,e,r){if(r<=fr||e 0");if(r===Kt)return fr;let n=Kt;for(;e>fr;)e&Kt&&(n=n*t%r),t=t*t%r,e>>=Kt;return n}function qn(t,e,r){let n=t;for(;e-- >fr;)n*=n,n%=r;return n}function Xw(t,e){if(t===fr||e<=fr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=dn(t,e),n=e,s=fr,i=Kt;for(;r!==fr;){const a=n/r,c=n%r,l=s-i*a;n=r,r=c,s=i,i=l}if(n!==Kt)throw new Error("invert: does not exist");return dn(s,e)}function Pre(t){const e=(t-Kt)/uc;let r,n,s;for(r=t-Kt,n=0;r%uc===fr;r/=uc,n++);for(s=uc;s(n[s]="function",n),e);return my(t,r)}function _re(t,e,r){if(r 0");if(r===fr)return t.ONE;if(r===Kt)return e;let n=t.ONE,s=e;for(;r>fr;)r&Kt&&(n=t.mul(n,s)),s=t.sqr(s),r>>=Kt;return n}function Nre(t,e){const r=new Array(e.length),n=e.reduce((i,o,a)=>t.is0(o)?i:(r[a]=i,t.mul(i,o)),t.ONE),s=t.inv(n);return e.reduceRight((i,o,a)=>t.is0(o)?i:(r[a]=t.mul(i,r[a]),t.mul(i,o)),s),r}function pM(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Mre(t,e,r=!1,n={}){if(t<=fr)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:s,nByteLength:i}=pM(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=Rre(t),a=Object.freeze({ORDER:t,BITS:s,BYTES:i,MASK:RC(s),ZERO:fr,ONE:Kt,create:c=>dn(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return fr<=c&&cc===fr,isOdd:c=>(c&Kt)===Kt,neg:c=>dn(-c,t),eql:(c,l)=>c===l,sqr:c=>dn(c*c,t),add:(c,l)=>dn(c+l,t),sub:(c,l)=>dn(c-l,t),mul:(c,l)=>dn(c*l,t),pow:(c,l)=>_re(a,c,l),div:(c,l)=>dn(c*Xw(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Xw(c,t),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>Nre(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?PC(c,i):Gf(c,i),fromBytes:c=>{if(c.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${c.length}`);return r?TC(c):tl(c)}});return Object.freeze(a)}function yM(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function vM(t){const e=yM(t);return e+Math.ceil(e/2)}function Dre(t,e,r=!1){const n=t.length,s=yM(e),i=vM(e);if(n<16||n1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const o=r?tl(t):TC(t),a=dn(o,e-Kt)+Kt;return r?PC(a,s):Gf(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Lre=BigInt(0),Ex=BigInt(1);function jre(t,e){const r=(s,i)=>{const o=i.negate();return s?o:i},n=s=>{const i=Math.ceil(e/s)+1,o=2**(s-1);return{windows:i,windowSize:o}};return{constTimeNegate:r,unsafeLadder(s,i){let o=t.ZERO,a=s;for(;i>Lre;)i&Ex&&(o=o.add(a)),a=a.double(),i>>=Ex;return o},precomputeWindow(s,i){const{windows:o,windowSize:a}=n(i),c=[];let l=s,u=l;for(let f=0;f>=h,g>c&&(g-=d,o+=Ex);const m=y,x=y+Math.abs(g)-1,b=p%2!==0,w=g<0;g===0?u=u.add(r(b,i[m])):l=l.add(r(w,i[x]))}return{p:l,f:u}},wNAFCached(s,i,o,a){const c=s._WINDOW_SIZE||1;let l=i.get(s);return l||(l=this.precomputeWindow(s,c),c!==1&&i.set(s,a(l))),this.wNAF(c,l,o)}}}function mM(t){return Ore(t.Fp),my(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...pM(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Bre(t){const e=mM(t);my(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:s}=e;if(r){if(!n.eql(s,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:Fre,hexToBytes:Ure}=Are,wc={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=wc;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:Fre(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=wc,r=typeof t=="string"?Ure(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:s,l:i}=wc._parseInt(r.subarray(2)),{d:o,l:a}=wc._parseInt(i);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:s,s:o}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,r=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},n=e(r(t.s)),s=e(r(t.r)),i=n.length/2,o=s.length/2,a=r(i),c=r(o);return`30${r(o+i+4)}02${c}${s}02${a}${n}`}},eo=BigInt(0),ss=BigInt(1);BigInt(2);const D4=BigInt(3);BigInt(4);function Vre(t){const e=Bre(t),{Fp:r}=e,n=e.toBytes||((p,y,g)=>{const m=y.toAffine();return Zh(Uint8Array.from([4]),r.toBytes(m.x),r.toBytes(m.y))}),s=e.fromBytes||(p=>{const y=p.subarray(1),g=r.fromBytes(y.subarray(0,r.BYTES)),m=r.fromBytes(y.subarray(r.BYTES,2*r.BYTES));return{x:g,y:m}});function i(p){const{a:y,b:g}=e,m=r.sqr(p),x=r.mul(m,p);return r.add(r.add(x,r.mul(p,y)),g)}if(!r.eql(r.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function o(p){return typeof p=="bigint"&&eor.eql(b,r.ZERO);return x(g)&&x(m)?f.ZERO:new f(g,m,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){const g=r.invertBatch(y.map(m=>m.pz));return y.map((m,x)=>m.toAffine(g[x])).map(f.fromAffine)}static fromHex(y){const g=f.fromAffine(s(Ss("pointHex",y)));return g.assertValidity(),g}static fromPrivateKey(y){return f.BASE.multiply(c(y))}_setWindowSize(y){this._WINDOW_SIZE=y,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:y,y:g}=this.toAffine();if(!r.isValid(y)||!r.isValid(g))throw new Error("bad point: x or y not FE");const m=r.sqr(g),x=i(y);if(!r.eql(m,x))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y}=this.toAffine();if(r.isOdd)return!r.isOdd(y);throw new Error("Field doesn't support isOdd")}equals(y){u(y);const{px:g,py:m,pz:x}=this,{px:b,py:w,pz:A}=y,O=r.eql(r.mul(g,A),r.mul(b,x)),_=r.eql(r.mul(m,A),r.mul(w,x));return O&&_}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){const{a:y,b:g}=e,m=r.mul(g,D4),{px:x,py:b,pz:w}=this;let A=r.ZERO,O=r.ZERO,_=r.ZERO,C=r.mul(x,x),j=r.mul(b,b),V=r.mul(w,w),B=r.mul(x,b);return B=r.add(B,B),_=r.mul(x,w),_=r.add(_,_),A=r.mul(y,_),O=r.mul(m,V),O=r.add(A,O),A=r.sub(j,O),O=r.add(j,O),O=r.mul(A,O),A=r.mul(B,A),_=r.mul(m,_),V=r.mul(y,V),B=r.sub(C,V),B=r.mul(y,B),B=r.add(B,_),_=r.add(C,C),C=r.add(_,C),C=r.add(C,V),C=r.mul(C,B),O=r.add(O,C),V=r.mul(b,w),V=r.add(V,V),C=r.mul(V,B),A=r.sub(A,C),_=r.mul(V,j),_=r.add(_,_),_=r.add(_,_),new f(A,O,_)}add(y){u(y);const{px:g,py:m,pz:x}=this,{px:b,py:w,pz:A}=y;let O=r.ZERO,_=r.ZERO,C=r.ZERO;const j=e.a,V=r.mul(e.b,D4);let B=r.mul(g,b),$=r.mul(m,w),Y=r.mul(x,A),H=r.add(g,m),L=r.add(b,w);H=r.mul(H,L),L=r.add(B,$),H=r.sub(H,L),L=r.add(g,x);let T=r.add(b,A);return L=r.mul(L,T),T=r.add(B,Y),L=r.sub(L,T),T=r.add(m,x),O=r.add(w,A),T=r.mul(T,O),O=r.add($,Y),T=r.sub(T,O),C=r.mul(j,L),O=r.mul(V,Y),C=r.add(O,C),O=r.sub($,C),C=r.add($,C),_=r.mul(O,C),$=r.add(B,B),$=r.add($,B),Y=r.mul(j,Y),L=r.mul(V,L),$=r.add($,Y),Y=r.sub(B,Y),Y=r.mul(j,Y),L=r.add(L,Y),B=r.mul($,L),_=r.add(_,B),B=r.mul(T,L),O=r.mul(H,O),O=r.sub(O,B),B=r.mul(H,$),C=r.mul(T,C),C=r.add(C,B),new f(O,_,C)}subtract(y){return this.add(y.negate())}is0(){return this.equals(f.ZERO)}wNAF(y){return h.wNAFCached(this,l,y,g=>{const m=r.invertBatch(g.map(x=>x.pz));return g.map((x,b)=>x.toAffine(m[b])).map(f.fromAffine)})}multiplyUnsafe(y){const g=f.ZERO;if(y===eo)return g;if(a(y),y===ss)return this;const{endo:m}=e;if(!m)return h.unsafeLadder(this,y);let{k1neg:x,k1:b,k2neg:w,k2:A}=m.splitScalar(y),O=g,_=g,C=this;for(;b>eo||A>eo;)b&ss&&(O=O.add(C)),A&ss&&(_=_.add(C)),C=C.double(),b>>=ss,A>>=ss;return x&&(O=O.negate()),w&&(_=_.negate()),_=new f(r.mul(_.px,m.beta),_.py,_.pz),O.add(_)}multiply(y){a(y);let g=y,m,x;const{endo:b}=e;if(b){const{k1neg:w,k1:A,k2neg:O,k2:_}=b.splitScalar(g);let{p:C,f:j}=this.wNAF(A),{p:V,f:B}=this.wNAF(_);C=h.constTimeNegate(w,C),V=h.constTimeNegate(O,V),V=new f(r.mul(V.px,b.beta),V.py,V.pz),m=C.add(V),x=j.add(B)}else{const{p:w,f:A}=this.wNAF(g);m=w,x=A}return f.normalizeZ([m,x])[0]}multiplyAndAddUnsafe(y,g,m){const x=f.BASE,b=(A,O)=>O===eo||O===ss||!A.equals(x)?A.multiplyUnsafe(O):A.multiply(O),w=b(this,g).add(b(y,m));return w.is0()?void 0:w}toAffine(y){const{px:g,py:m,pz:x}=this,b=this.is0();y==null&&(y=b?r.ONE:r.inv(x));const w=r.mul(g,y),A=r.mul(m,y),O=r.mul(x,y);if(b)return{x:r.ZERO,y:r.ZERO};if(!r.eql(O,r.ONE))throw new Error("invZ was invalid");return{x:w,y:A}}isTorsionFree(){const{h:y,isTorsionFree:g}=e;if(y===ss)return!0;if(g)return g(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:y,clearCofactor:g}=e;return y===ss?this:g?g(f,this):this.multiplyUnsafe(e.h)}toRawBytes(y=!0){return this.assertValidity(),n(f,this,y)}toHex(y=!0){return zf(this.toRawBytes(y))}}f.BASE=new f(e.Gx,e.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);const d=e.nBitLength,h=jre(f,e.endo?Math.ceil(d/2):d);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:o}}function $re(t){const e=mM(t);return my(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function zre(t){const e=$re(t),{Fp:r,n}=e,s=r.BYTES+1,i=2*r.BYTES+1;function o(L){return eozf(Gf(L,e.nByteLength));function p(L){const T=n>>ss;return L>T}function y(L){return p(L)?a(-L):L}const g=(L,T,P)=>tl(L.slice(T,P));class m{constructor(T,P,R){this.r=T,this.s=P,this.recovery=R,this.assertValidity()}static fromCompact(T){const P=e.nByteLength;return T=Ss("compactSignature",T,P*2),new m(g(T,0,P),g(T,P,2*P))}static fromDER(T){const{r:P,s:R}=wc.toSig(Ss("DER",T));return new m(P,R)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(T){return new m(this.r,this.s,T)}recoverPublicKey(T){const{r:P,s:R,recovery:I}=this,U=_(Ss("msgHash",T));if(I==null||![0,1,2,3].includes(I))throw new Error("recovery id invalid");const F=I===2||I===3?P+e.n:P;if(F>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const X=I&1?"03":"02",oe=l.fromHex(X+h(F)),ae=c(F),ke=a(-U*ae),ve=a(R*ae),ie=l.BASE.multiplyAndAddUnsafe(oe,ke,ve);if(!ie)throw new Error("point at infinify");return ie.assertValidity(),ie}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Hf(this.toDERHex())}toDERHex(){return wc.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Hf(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const x={isValidPrivateKey(L){try{return u(L),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const L=vM(e.n);return Dre(e.randomBytes(L),e.n)},precompute(L=8,T=l.BASE){return T._setWindowSize(L),T.multiply(BigInt(3)),T}};function b(L,T=!0){return l.fromPrivateKey(L).toRawBytes(T)}function w(L){const T=L instanceof Uint8Array,P=typeof L=="string",R=(T||P)&&L.length;return T?R===s||R===i:P?R===2*s||R===2*i:L instanceof l}function A(L,T,P=!0){if(w(L))throw new Error("first arg must be private key");if(!w(T))throw new Error("second arg must be public key");return l.fromHex(T).multiply(u(L)).toRawBytes(P)}const O=e.bits2int||function(L){const T=tl(L),P=L.length*8-e.nBitLength;return P>0?T>>BigInt(P):T},_=e.bits2int_modN||function(L){return a(O(L))},C=RC(e.nBitLength);function j(L){if(typeof L!="bigint")throw new Error("bigint expected");if(!(eo<=L&&LBe in P))throw new Error("sign() legacy options not supported");const{hash:R,randomBytes:I}=e;let{lowS:U,prehash:F,extraEntropy:X}=P;U==null&&(U=!0),L=Ss("msgHash",L),F&&(L=Ss("prehashed msgHash",R(L)));const oe=_(L),ae=u(T),ke=[j(ae),j(oe)];if(X!=null){const Be=X===!0?I(r.BYTES):X;ke.push(Ss("extraEntropy",Be))}const ve=Zh(...ke),ie=oe;function Me(Be){const Te=O(Be);if(!d(Te))return;const De=c(Te),ze=l.BASE.multiply(Te).toAffine(),at=a(ze.x);if(at===eo)return;const qe=a(De*a(ie+at*ae));if(qe===eo)return;let Kr=(ze.x===at?0:2)|Number(ze.y&ss),vs=qe;return U&&p(qe)&&(vs=y(qe),Kr^=1),new m(at,vs,Kr)}return{seed:ve,k2sig:Me}}const B={lowS:e.lowS,prehash:!1},$={lowS:e.lowS,prehash:!1};function Y(L,T,P=B){const{seed:R,k2sig:I}=V(L,T,P),U=e;return hM(U.hash.outputLen,U.nByteLength,U.hmac)(R,I)}l.BASE._setWindowSize(8);function H(L,T,P,R=$){var ze;const I=L;if(T=Ss("msgHash",T),P=Ss("publicKey",P),"strict"in R)throw new Error("options.strict was renamed to lowS");const{lowS:U,prehash:F}=R;let X,oe;try{if(typeof I=="string"||I instanceof Uint8Array)try{X=m.fromDER(I)}catch(at){if(!(at instanceof wc.Err))throw at;X=m.fromCompact(I)}else if(typeof I=="object"&&typeof I.r=="bigint"&&typeof I.s=="bigint"){const{r:at,s:qe}=I;X=new m(at,qe)}else throw new Error("PARSE");oe=l.fromHex(P)}catch(at){if(at.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(U&&X.hasHighS())return!1;F&&(T=e.hash(T));const{r:ae,s:ke}=X,ve=_(T),ie=c(ke),Me=a(ve*ie),Be=a(ae*ie),Te=(ze=l.BASE.multiplyAndAddUnsafe(oe,Me,Be))==null?void 0:ze.toAffine();return Te?a(Te.x)===ae:!1}return{CURVE:e,getPublicKey:b,getSharedSecret:A,sign:Y,verify:H,ProjectivePoint:l,Signature:m,utils:x}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Hre(t){return{hash:t,hmac:(e,...r)=>Gm(t,e,yte(...r)),randomBytes:mte}}function Gre(t,e){const r=n=>zre({...t,...Hre(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const gM=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),L4=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),qre=BigInt(1),Zw=BigInt(2),j4=(t,e)=>(t+e/Zw)/e;function Wre(t){const e=gM,r=BigInt(3),n=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,f=qn(u,r,e)*u%e,d=qn(f,r,e)*u%e,h=qn(d,Zw,e)*l%e,p=qn(h,s,e)*h%e,y=qn(p,i,e)*p%e,g=qn(y,a,e)*y%e,m=qn(g,c,e)*g%e,x=qn(m,a,e)*y%e,b=qn(x,r,e)*u%e,w=qn(b,o,e)*p%e,A=qn(w,n,e)*l%e,O=qn(A,Zw,e);if(!e2.eql(e2.sqr(O),t))throw new Error("Cannot find square root");return O}const e2=Mre(gM,void 0,void 0,{sqrt:Wre}),jo=Gre({a:BigInt(0),b:BigInt(7),Fp:e2,n:L4,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=L4,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-qre*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,o=BigInt("0x100000000000000000000000000000000"),a=j4(i*t,e),c=j4(-n*t,e);let l=dn(t-a*r-c*s,e),u=dn(-a*n-c*i,e);const f=l>o,d=u>o;if(f&&(l=e-l),d&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:l,k2neg:d,k2:u}}}},dd);BigInt(0);jo.ProjectivePoint;const vl="0x0000000000000000000000000000000000000000",B4="0x0000000000000000000000000000000000000000000000000000000000000000",Kre=`Ethereum Signed Message: +`,F4=BigInt(0),U4=BigInt(1),V4=BigInt(2),$4=BigInt(27),z4=BigInt(28),m1=BigInt(35),Fl={};function H4(t){return pl($r(t),32)}var Gu,qu,Wu,Dc;const bs=class bs{constructor(e,r,n,s){W(this,Gu,void 0);W(this,qu,void 0);W(this,Wu,void 0);W(this,Dc,void 0);$a(e,Fl,"Signature"),N(this,Gu,r),N(this,qu,n),N(this,Wu,s),N(this,Dc,null)}get r(){return S(this,Gu)}set r(e){M(Ru(e)===32,"invalid r","value",e),N(this,Gu,ne(e))}get s(){return S(this,qu)}set s(e){M(Ru(e)===32,"invalid s","value",e);const r=ne(e);M(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),N(this,qu,r)}get v(){return S(this,Wu)}set v(e){const r=_e(e,"value");M(r===27||r===28,"invalid v","v",e),N(this,Wu,r)}get networkV(){return S(this,Dc)}get legacyChainId(){const e=this.networkV;return e==null?null:bs.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=fe(this.s);return this.yParity&&(e[0]|=128),ne(e)}get compactSerialized(){return ot([this.r,this.yParityAndS])}get serialized(){return ot([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new bs(Fl,this.r,this.s,this.v);return this.networkV&&N(e,Dc,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=ye(e,"v");return r==$4||r==z4?F4:(M(r>=m1,"invalid EIP-155 v","v",e),(r-m1)/V4)}static getChainIdV(e,r){return ye(e)*V4+BigInt(35+r-27)}static getNormalizedV(e){const r=ye(e);return r===F4||r===$4?27:r===U4||r===z4?28:(M(r>=m1,"invalid v","v",e),r&U4?27:28)}static from(e){function r(l,u){M(l,u,"signature",e)}if(e==null)return new bs(Fl,B4,B4,27);if(typeof e=="string"){const l=fe(e,"signature");if(l.length===64){const u=ne(l.slice(0,32)),f=l.slice(32,64),d=f[0]&128?28:27;return f[0]&=127,new bs(Fl,u,ne(f),d)}if(l.length===65){const u=ne(l.slice(0,32)),f=l.slice(32,64);r((f[0]&128)===0,"non-canonical s");const d=bs.getNormalizedV(l[64]);return new bs(Fl,u,ne(f),d)}r(!1,"invalid raw signature length")}if(e instanceof bs)return e.clone();const n=e.r;r(n!=null,"missing r");const s=H4(n),i=function(l,u){if(l!=null)return H4(l);if(u!=null){r(vt(u,32),"invalid yParityAndS");const f=fe(u);return f[0]&=127,ne(f)}r(!1,"missing s")}(e.s,e.yParityAndS);r((fe(i)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(l,u,f){if(l!=null){const d=ye(l);return{networkV:d>=m1?d:void 0,v:bs.getNormalizedV(d)}}if(u!=null)return r(vt(u,32),"invalid yParityAndS"),{v:fe(u)[0]&128?28:27};if(f!=null){switch(_e(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new bs(Fl,s,i,a);return o&&N(c,Dc,o),r(e.yParity==null||_e(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};Gu=new WeakMap,qu=new WeakMap,Wu=new WeakMap,Dc=new WeakMap;let Us=bs;var Gi;const dc=class dc{constructor(e){W(this,Gi,void 0);M(Ru(e)===32,"invalid private key","privateKey","[REDACTED]"),N(this,Gi,ne(e))}get privateKey(){return S(this,Gi)}get publicKey(){return dc.computePublicKey(S(this,Gi))}get compressedPublicKey(){return dc.computePublicKey(S(this,Gi),!0)}sign(e){M(Ru(e)===32,"invalid digest length","digest",e);const r=jo.sign(br(e),br(S(this,Gi)),{lowS:!0});return Us.from({r:go(r.r,32),s:go(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=dc.computePublicKey(e);return ne(jo.getSharedSecret(br(S(this,Gi)),fe(r),!1))}static computePublicKey(e,r){let n=fe(e,"key");if(n.length===32){const i=jo.getPublicKey(n,!!r);return ne(i)}if(n.length===64){const i=new Uint8Array(65);i[0]=4,i.set(n,1),n=i}const s=jo.ProjectivePoint.fromHex(n);return ne(s.toRawBytes(r))}static recoverPublicKey(e,r){M(Ru(e)===32,"invalid digest length","digest",e);const n=Us.from(r);let s=jo.Signature.fromCompact(br(ot([n.r,n.s])));s=s.addRecoveryBit(n.yParity);const i=s.recoverPublicKey(br(e));return M(i!=null,"invalid signautre for digest","signature",r),"0x"+i.toHex(!1)}static addPoints(e,r,n){const s=jo.ProjectivePoint.fromHex(dc.computePublicKey(e).substring(2)),i=jo.ProjectivePoint.fromHex(dc.computePublicKey(r).substring(2));return"0x"+s.add(i).toHex(!!n)}};Gi=new WeakMap;let gi=dc;const Qre=BigInt(0),Yre=BigInt(36);function G4(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=fe(Ct(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const IC={};for(let t=0;t<10;t++)IC[String(t)]=String(t);for(let t=0;t<26;t++)IC[String.fromCharCode(65+t)]=String(10+t);const q4=15;function Jre(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>IC[n]).join("");for(;e.length>=q4;){let n=e.substring(0,q4);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}const Xre=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function Zre(t){t=t.toLowerCase();let e=Qre;for(let r=0;re.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return S(this,Lc)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return S(this,Lc)===!0?-1:S(this,Lc)===!1?this.value.length:null}static from(e,r){return new Li(Di,e,r)}static uint8(e){return he(e,8)}static uint16(e){return he(e,16)}static uint24(e){return he(e,24)}static uint32(e){return he(e,32)}static uint40(e){return he(e,40)}static uint48(e){return he(e,48)}static uint56(e){return he(e,56)}static uint64(e){return he(e,64)}static uint72(e){return he(e,72)}static uint80(e){return he(e,80)}static uint88(e){return he(e,88)}static uint96(e){return he(e,96)}static uint104(e){return he(e,104)}static uint112(e){return he(e,112)}static uint120(e){return he(e,120)}static uint128(e){return he(e,128)}static uint136(e){return he(e,136)}static uint144(e){return he(e,144)}static uint152(e){return he(e,152)}static uint160(e){return he(e,160)}static uint168(e){return he(e,168)}static uint176(e){return he(e,176)}static uint184(e){return he(e,184)}static uint192(e){return he(e,192)}static uint200(e){return he(e,200)}static uint208(e){return he(e,208)}static uint216(e){return he(e,216)}static uint224(e){return he(e,224)}static uint232(e){return he(e,232)}static uint240(e){return he(e,240)}static uint248(e){return he(e,248)}static uint256(e){return he(e,256)}static uint(e){return he(e,256)}static int8(e){return he(e,-8)}static int16(e){return he(e,-16)}static int24(e){return he(e,-24)}static int32(e){return he(e,-32)}static int40(e){return he(e,-40)}static int48(e){return he(e,-48)}static int56(e){return he(e,-56)}static int64(e){return he(e,-64)}static int72(e){return he(e,-72)}static int80(e){return he(e,-80)}static int88(e){return he(e,-88)}static int96(e){return he(e,-96)}static int104(e){return he(e,-104)}static int112(e){return he(e,-112)}static int120(e){return he(e,-120)}static int128(e){return he(e,-128)}static int136(e){return he(e,-136)}static int144(e){return he(e,-144)}static int152(e){return he(e,-152)}static int160(e){return he(e,-160)}static int168(e){return he(e,-168)}static int176(e){return he(e,-176)}static int184(e){return he(e,-184)}static int192(e){return he(e,-192)}static int200(e){return he(e,-200)}static int208(e){return he(e,-208)}static int216(e){return he(e,-216)}static int224(e){return he(e,-224)}static int232(e){return he(e,-232)}static int240(e){return he(e,-240)}static int248(e){return he(e,-248)}static int256(e){return he(e,-256)}static int(e){return he(e,-256)}static bytes1(e){return Je(e,1)}static bytes2(e){return Je(e,2)}static bytes3(e){return Je(e,3)}static bytes4(e){return Je(e,4)}static bytes5(e){return Je(e,5)}static bytes6(e){return Je(e,6)}static bytes7(e){return Je(e,7)}static bytes8(e){return Je(e,8)}static bytes9(e){return Je(e,9)}static bytes10(e){return Je(e,10)}static bytes11(e){return Je(e,11)}static bytes12(e){return Je(e,12)}static bytes13(e){return Je(e,13)}static bytes14(e){return Je(e,14)}static bytes15(e){return Je(e,15)}static bytes16(e){return Je(e,16)}static bytes17(e){return Je(e,17)}static bytes18(e){return Je(e,18)}static bytes19(e){return Je(e,19)}static bytes20(e){return Je(e,20)}static bytes21(e){return Je(e,21)}static bytes22(e){return Je(e,22)}static bytes23(e){return Je(e,23)}static bytes24(e){return Je(e,24)}static bytes25(e){return Je(e,25)}static bytes26(e){return Je(e,26)}static bytes27(e){return Je(e,27)}static bytes28(e){return Je(e,28)}static bytes29(e){return Je(e,29)}static bytes30(e){return Je(e,30)}static bytes31(e){return Je(e,31)}static bytes32(e){return Je(e,32)}static address(e){return new Li(Di,"address",e)}static bool(e){return new Li(Di,"bool",!!e)}static bytes(e){return new Li(Di,"bytes",e)}static string(e){return new Li(Di,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new Li(Di,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===W4}static dereference(e,r){if(Li.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Lc=new WeakMap;let zr=Li;class rne extends Co{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=zr.dereference(r,"string");try{n=Xe(n)}catch(s){return this._throwError(s.message,r)}return e.writeValue(n)}decode(e){return Xe(go(e.readValue(),20))}}class nne extends Co{constructor(r){super(r.name,r.type,"_",r.dynamic);G(this,"coder");this.coder=r}defaultValue(){return this.coder.defaultValue()}encode(r,n){return this.coder.encode(r,n)}decode(r){return this.coder.decode(r)}}function bM(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return J(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),J(!c[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),c[u]=!0,r[u]})}else M(!1,"invalid tuple value","tuple",r);M(e.length===n.length,"types/value length mismatch","tuple",r);let s=new Ww,i=new Ww,o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let f=i.length;c.encode(i,u);let d=s.writeUpdatableValue();o.push(h=>{d(h+f)})}else c.encode(s,u)}),o.forEach(c=>{c(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function wM(t,e){let r=[],n=[],s=t.subReader(0);return e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readIndex(),c=s.subReader(a);try{o=i.decode(c)}catch(l){if(Vr(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(Vr(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}if(o==null)throw new Error("investigate");r.push(o),n.push(i.localName||null)}),Uf.fromItems(r,n)}class sne extends Co{constructor(r,n,s){const i=r.type+"["+(n>=0?n:"")+"]",o=n===-1||r.dynamic;super("array",i,s,o);G(this,"coder");G(this,"length");me(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let s=0;so||s<-(o+fne))&&this._throwError("value out-of-bounds",n),s=u7(s,8*rn)}else(sbc(i,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(s)}decode(r){let n=bc(r.readValue(),this.size*8);return this.signed&&(n=c0(n,this.size*8)),n}}class pne extends EM{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Sr(zr.dereference(r,"string")))}decode(e){return u0(super.decode(e))}}class g1 extends Co{constructor(r,n){let s=!1;const i=[];r.forEach(a=>{a.dynamic&&(s=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,n,s);G(this,"coders");me(this,{coders:Object.freeze(r.slice())})}defaultValue(){const r=[];this.coders.forEach(s=>{r.push(s.defaultValue())});const n=this.coders.reduce((s,i)=>{const o=i.localName;return o&&(s[o]||(s[o]=0),s[o]++),s},{});return this.coders.forEach((s,i)=>{let o=s.localName;!o||n[o]!==1||(o==="length"&&(o="_length"),r[o]==null&&(r[o]=r[i]))}),Object.freeze(r)}encode(r,n){const s=zr.dereference(n,"tuple");return bM(r,this.coders,s)}decode(r){return wM(r,this.coders)}}function Cr(t){return Ct(Sr(t))}var yne="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const K4=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),Q4=4;function vne(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),s=1,i=[0,1];for(let A=1;A>--c&1}const f=31,d=2**f,h=d>>>1,p=h>>1,y=d-1;let g=0;for(let A=0;A1;){let V=O+_>>>1;A>>1|u(),C=C<<1^h,j=(j^h)<<1|h|1;x=C,b=1+j-C}let w=n-4;return m.map(A=>{switch(A-w){case 3:return w+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return w+256+(t[a++]<<8|t[a++]);case 1:return w+t[a++];default:return A-1}})}function mne(t){let e=0;return()=>t[e++]}function SM(t){return mne(vne(gne(t)))}function gne(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((s,i)=>e[s.charCodeAt(0)]=i);let r=t.length,n=new Uint8Array(6*r>>3);for(let s=0,i=0,o=0,a=0;s=8&&(n[i++]=a>>(o-=8));return n}function xne(t){return t&1?~t>>1:t>>1}function bne(t,e){let r=Array(t);for(let n=0,s=0;n{let e=ep(t);if(e.length)return e})}function AM(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(wne(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Ene(r,t))}return e.flat()}function tp(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function kM(t,e,r){let n=Array(t).fill().map(()=>[]);for(let s=0;sn[o].push(i));return n}function wne(t,e){let r=1+e(),n=e(),s=tp(e);return kM(s.length,1+t,e).flatMap((o,a)=>{let[c,...l]=o;return Array(s[a]).fill().map((u,f)=>{let d=f*n;return[c+f*r,l.map(h=>h+d)]})})}function Ene(t,e){let r=1+e();return kM(r,1+t,e).map(s=>[s[0],s.slice(1)])}function Sne(t){let e=[],r=ep(t);return s(n([]),[]),e;function n(i){let o=t(),a=tp(()=>{let c=ep(t).map(l=>r[l]);if(c.length)return n(c)});return{S:o,B:a,Q:i}}function s({S:i,B:o},a,c){if(!(i&4&&c===a[a.length-1])){i&2&&(c=a[a.length-1]),i&1&&e.push(a);for(let l of o)for(let u of l.Q)s(l,[...a,u],c)}}}function Cne(t){return t.toString(16).toUpperCase().padStart(2,"0")}function TM(t){return`{${Cne(t)}}`}function Ane(t){let e=[];for(let r=0,n=t.length;r>24&255}function IM(t){return t&16777215}let t2,Y4,r2,tv;function Nne(){let t=SM(Tne);t2=new Map(CM(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),Y4=new Set(ep(t)),r2=new Map,tv=new Map;for(let[e,r]of AM(t)){if(!Y4.has(e)&&r.length==2){let[n,s]=r,i=tv.get(n);i||(i=new Map,tv.set(n,i)),i.set(s,e)}r2.set(e,r.reverse())}}function OM(t){return t>=rp&&t=d0&&t=h0&&ep0&&e<_ne&&(t-rp)%Wf==0)return t+(e-p0);{let r=tv.get(t);return r&&(r=r.get(e),r)?r:-1}}function _M(t){t2||Nne();let e=[],r=[],n=!1;function s(i){let o=t2.get(i);o&&(n=!0,i|=o),e.push(i)}for(let i of t)for(;;){if(i<128)e.push(i);else if(OM(i)){let o=i-rp,a=o/y0|0,c=o%y0/Wf|0,l=o%Wf;s(d0+a),s(h0+c),l>0&&s(p0+l)}else{let o=r2.get(i);o?r.push(...o):s(i)}if(!r.length)break;i=r.pop()}if(n&&e.length>1){let i=Xd(e[0]);for(let o=1;o0&&s>=o)o==0?(e.push(n,...r),r.length=0,n=a):r.push(a),s=o;else{let c=Mne(n,a);c>=0?n=c:s==0&&o==0?(e.push(n),n=a):(r.push(a),s=o)}}return n>=0&&e.push(n,...r),e}function NM(t){return _M(t).map(IM)}function Lne(t){return Dne(_M(t))}const J4=45,MM=".",DM=65039,LM=1,v0=t=>Array.from(t);function np(t,e){return t.P.has(e)||t.Q.has(e)}class jne extends Array{get is_emoji(){return!0}}let n2,jM,Ec,s2,BM,_u,Cx,ql,oc,X4,i2;function OC(){if(n2)return;let t=SM(yne);const e=()=>ep(t),r=()=>new Set(e()),n=(u,f)=>f.forEach(d=>u.add(d));n2=new Map(AM(t)),jM=r(),Ec=e(),s2=new Set(e().map(u=>Ec[u])),Ec=new Set(Ec),BM=r(),r();let s=CM(t),i=t();const o=()=>{let u=new Set;return e().forEach(f=>n(u,s[f])),n(u,e()),u};_u=tp(u=>{let f=tp(t).map(d=>d+96);if(f.length){let d=u>=i;f[0]-=32,f=qf(f),d&&(f=`Restricted[${f}]`);let h=o(),p=o(),y=!t();return{N:f,P:h,Q:p,M:y,R:d}}}),Cx=r(),ql=new Map;let a=e().concat(v0(Cx)).sort((u,f)=>u-f);a.forEach((u,f)=>{let d=t(),h=a[f]=d?a[f-d]:{V:[],M:new Map};h.V.push(u),Cx.has(u)||ql.set(u,h)});for(let{V:u,M:f}of new Set(ql.values())){let d=[];for(let p of u){let y=_u.filter(m=>np(m,p)),g=d.find(({G:m})=>y.some(x=>m.has(x)));g||(g={G:new Set,V:[]},d.push(g)),g.V.push(p),n(g.G,y)}let h=d.flatMap(p=>v0(p.G));for(let{G:p,V:y}of d){let g=new Set(h.filter(m=>!p.has(m)));for(let m of y)f.set(m,g)}}oc=new Set;let c=new Set;const l=u=>oc.has(u)?c.add(u):oc.add(u);for(let u of _u){for(let f of u.P)l(f);for(let f of u.Q)l(f)}for(let u of oc)!ql.has(u)&&!c.has(u)&&ql.set(u,LM);n(oc,NM(oc)),X4=Sne(t).map(u=>jne.from(u)).sort(kne),i2=new Map;for(let u of X4){let f=[i2];for(let d of u){let h=f.map(p=>{let y=p.get(d);return y||(y=new Map,p.set(d,y)),y});d===DM?f.push(...h):f=h}for(let d of f)d.V=u}}function _C(t){return(FM(t)?"":`${NC(Km([t]))} `)+TM(t)}function NC(t){return`"${t}"‎`}function Bne(t){if(t.length>=4&&t[2]==J4&&t[3]==J4)throw new Error(`invalid label extension: "${qf(t.slice(0,4))}"`)}function Fne(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function Une(t){let e=t[0],r=K4.get(e);if(r)throw xh(`leading ${r}`);let n=t.length,s=-1;for(let i=1;ie&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let s=0,i=t.length;for(let o=0;o{let i=Ane(s),o={input:i,offset:n};n+=i.length+1;try{let a=o.tokens=Kne(i,e,r),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(Fne(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))Bne(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(Ec.has(u[0]))throw xh("leading combining mark");for(let y=1;yo.has(a)):v0(o),!r.length)return}else n.push(s)}if(r){for(let s of r)if(n.every(i=>np(s,i)))throw new Error(`whole-script confusable: ${t.N}/${s.N}`)}}function Gne(t){let e=_u;for(let r of t){let n=e.filter(s=>np(s,r));if(!n.length)throw _u.some(s=>np(s,r))?VM(e[0],r):UM(r);if(e=n,n.length==1)break}return e}function qne(t){return t.map(({input:e,error:r,output:n})=>{if(r){let s=r.message;throw new Error(t.length==1?s:`Invalid label ${NC(Km(e,63))}: ${s}`)}return qf(n)}).join(MM)}function UM(t){return new Error(`disallowed character: ${_C(t)}`)}function VM(t,e){let r=_C(e),n=_u.find(s=>s.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function xh(t){return new Error(`illegal placement: ${t}`)}function Wne(t,e){for(let r of e)if(!np(t,r))throw VM(t,r);if(t.M){let r=NM(e);for(let n=1,s=r.length;nQ4)throw new Error(`excessive non-spacing marks: ${NC(Km(r.slice(n-1,i)))} (${i-n}/${Q4})`);n=i}}}function Kne(t,e,r){let n=[],s=[];for(t=t.slice().reverse();t.length;){let i=Yne(t);if(i)s.length&&(n.push(e(s)),s=[]),n.push(r(i));else{let o=t.pop();if(oc.has(o))s.push(o);else{let a=n2.get(o);if(a)s.push(...a);else if(!jM.has(o))throw UM(o)}}}return s.length&&n.push(e(s)),n}function Qne(t){return t.filter(e=>e!=DM)}function Yne(t,e){let r=i2,n,s=t.length;for(;s&&(r=r.get(t[--s]),!!r);){let{V:i}=r;i&&(n=i,e&&e.push(...t.slice(s).reverse()),t.length=s)}return n}const $M=new Uint8Array(32);$M.fill(0);function Z4(t){return M(t.length!==0,"invalid ENS name; empty component","comp",t),t}function zM(t){const e=Sr(Jne(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s{M(n.length<=r,`label ${JSON.stringify(t)} exceeds ${r} bytes`,"name",t);const s=new Uint8Array(n.length+1);return s.set(n,1),s[0]=s.length-1,s})))+"00"}function Ax(t,e){return{address:Xe(t),storageKeys:e.map((r,n)=>(M(vt(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function Pl(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(M(r.length===2,"invalid slot set",`value[${n}]`,r),Ax(r[0],r[1])):(M(r!=null&&typeof r=="object","invalid address-slot set","value",t),Ax(r.address,r.storageKeys)));M(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return Ax(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function gy(t){let e;return typeof t=="string"?e=gi.computePublicKey(t,!1):e=t.publicKey,Xe(Ct("0x"+e.substring(4)).substring(26))}function Zne(t,e){return gy(gi.recoverPublicKey(t,e))}const lr=BigInt(0),ese=BigInt(2),tse=BigInt(27),rse=BigInt(28),nse=BigInt(35),sse=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),kx=4096*32;function e3(t,e){let r=t.toString(16);for(;r.length<2;)r="0"+r;return r+=ys(e).substring(4),"0x"+r}function Qm(t){return t==="0x"?null:Xe(t)}function MC(t,e){try{return Pl(t)}catch(r){M(!1,r.message,e,t)}}function xy(t,e){return t==="0x"?0:_e(t,e)}function Qt(t,e){if(t==="0x")return lr;const r=ye(t,e);return M(r<=sse,"value exceeds uint size",e,r),r}function bt(t,e){const r=ye(t,"value"),n=$r(r);return M(n.length<=32,"value too large",`tx.${e}`,r),n}function DC(t){return Pl(t).map(e=>[e.address,e.storageKeys])}function ise(t,e){M(Array.isArray(t),`invalid ${e}`,"value",t);for(let r=0;rs.data),r.map(s=>s.commitment),r.map(s=>s.proof)])]):ot(["0x03",yl(n)])}var Zs,Ku,Qu,Yu,Ju,Xu,Zu,ef,tf,rf,nf,sf,jc,Ko,qi,Qo,of,rv;const ji=class ji{constructor(){W(this,of);W(this,Zs,void 0);W(this,Ku,void 0);W(this,Qu,void 0);W(this,Yu,void 0);W(this,Ju,void 0);W(this,Xu,void 0);W(this,Zu,void 0);W(this,ef,void 0);W(this,tf,void 0);W(this,rf,void 0);W(this,nf,void 0);W(this,sf,void 0);W(this,jc,void 0);W(this,Ko,void 0);W(this,qi,void 0);W(this,Qo,void 0);N(this,Zs,null),N(this,Ku,null),N(this,Yu,0),N(this,Ju,lr),N(this,Xu,null),N(this,Zu,null),N(this,ef,null),N(this,Qu,"0x"),N(this,tf,lr),N(this,rf,lr),N(this,nf,null),N(this,sf,null),N(this,jc,null),N(this,Ko,null),N(this,Qo,null),N(this,qi,null)}get type(){return S(this,Zs)}set type(e){switch(e){case null:N(this,Zs,null);break;case 0:case"legacy":N(this,Zs,0);break;case 1:case"berlin":case"eip-2930":N(this,Zs,1);break;case 2:case"london":case"eip-1559":N(this,Zs,2);break;case 3:case"cancun":case"eip-4844":N(this,Zs,3);break;default:M(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=S(this,Ku);return e==null&&this.type===3?vl:e}set to(e){N(this,Ku,e==null?null:Xe(e))}get nonce(){return S(this,Yu)}set nonce(e){N(this,Yu,_e(e,"value"))}get gasLimit(){return S(this,Ju)}set gasLimit(e){N(this,Ju,ye(e))}get gasPrice(){const e=S(this,Xu);return e==null&&(this.type===0||this.type===1)?lr:e}set gasPrice(e){N(this,Xu,e==null?null:ye(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=S(this,Zu);return e??(this.type===2||this.type===3?lr:null)}set maxPriorityFeePerGas(e){N(this,Zu,e==null?null:ye(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=S(this,ef);return e??(this.type===2||this.type===3?lr:null)}set maxFeePerGas(e){N(this,ef,e==null?null:ye(e,"maxFeePerGas"))}get data(){return S(this,Qu)}set data(e){N(this,Qu,ne(e))}get value(){return S(this,tf)}set value(e){N(this,tf,ye(e,"value"))}get chainId(){return S(this,rf)}set chainId(e){N(this,rf,ye(e))}get signature(){return S(this,nf)||null}set signature(e){N(this,nf,e==null?null:Us.from(e))}get accessList(){const e=S(this,sf)||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){N(this,sf,e==null?null:Pl(e))}get maxFeePerBlobGas(){const e=S(this,jc);return e==null&&this.type===3?lr:e}set maxFeePerBlobGas(e){N(this,jc,e==null?null:ye(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=S(this,Ko);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){M(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let r=0;rObject.assign({},e))}set blobs(e){if(e==null){N(this,Qo,null);return}const r=[],n=[];for(let s=0;s=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,s=S(this,jc)!=null||S(this,Ko);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&J(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),J(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),J(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):r?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(s&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return ji.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new ji;if(typeof e=="string"){const n=fe(e);if(n[0]>=127)return ji.from(ose(n));switch(n[0]){case 1:return ji.from(use(n));case 2:return ji.from(cse(n));case 3:return ji.from(dse(n))}J(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new ji;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(r.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=Us.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.blobVersionedHashes!=null&&(r.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(r.kzg=e.kzg),e.blobs!=null&&(r.blobs=e.blobs),e.hash!=null&&(M(r.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),M(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(M(r.isSigned(),"unsigned transaction cannot define '.from'","tx",e),M(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};Zs=new WeakMap,Ku=new WeakMap,Qu=new WeakMap,Yu=new WeakMap,Ju=new WeakMap,Xu=new WeakMap,Zu=new WeakMap,ef=new WeakMap,tf=new WeakMap,rf=new WeakMap,nf=new WeakMap,sf=new WeakMap,jc=new WeakMap,Ko=new WeakMap,qi=new WeakMap,Qo=new WeakMap,of=new WeakSet,rv=function(e,r){J(!e||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=e?this.signature:null;switch(this.inferType()){case 0:return ase(this,n);case 1:return fse(this,n);case 2:return lse(this,n);case 3:return hse(this,n,r?this.blobs:null)}J(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let sp=ji;function pse(t){return typeof t=="string"&&(t=Sr(t)),Ct(ot([Sr(Kre),Sr(String(t.length)),t]))}const HM=new Uint8Array(32);HM.fill(0);const yse=BigInt(-1),GM=BigInt(0),qM=BigInt(1),vse=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function mse(t){const e=fe(t),r=e.length%32;return r?ot([e,HM.slice(r)]):ne(e)}const gse=go(qM,32),xse=go(GM,32),t3={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Tx=["name","version","chainId","verifyingContract","salt"];function r3(t){return function(e){return M(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const bse={name:r3("name"),version:r3("version"),chainId:function(t){const e=ye(t,"domain.chainId");return M(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):yu(e)},verifyingContract:function(t){try{return Xe(t).toLowerCase()}catch{}M(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=fe(t,"domain.salt");return M(e.length===32,'invalid domain value "salt"',"domain.salt",t),ne(e)}};function Px(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const r=e[1]==="",n=parseInt(e[2]);M(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",t);const s=bc(vse,r?n-1:n),i=r?(s+qM)*yse:GM;return function(o){const a=ye(o,"value");return M(a>=i&&a<=s,`value out-of-bounds for ${t}`,"value",a),go(r?u7(a,256):a,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return M(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const s=fe(n);return M(s.length===r,`invalid length for ${t}`,"value",n),mse(n)}}}switch(t){case"address":return function(e){return pl(Xe(e),32)};case"bool":return function(e){return e?gse:xse};case"bytes":return function(e){return Ct(e)};case"string":return function(e){return Cr(e)}}return null}function n3(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}function x1(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var Ip,Wi,af,j0,WM;const Xn=class Xn{constructor(e){W(this,j0);G(this,"primaryType");W(this,Ip,void 0);W(this,Wi,void 0);W(this,af,void 0);N(this,Wi,new Map),N(this,af,new Map);const r=new Map,n=new Map,s=new Map,i={};Object.keys(e).forEach(c=>{i[c]=e[c].map(({name:l,type:u})=>{let{base:f,index:d}=x1(u);return f==="int"&&!e.int&&(f="int256"),f==="uint"&&!e.uint&&(f="uint256"),{name:l,type:f+(d||"")}}),r.set(c,new Set),n.set(c,[]),s.set(c,new Set)}),N(this,Ip,JSON.stringify(i));for(const c in i){const l=new Set;for(const u of i[c]){M(!l.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(c)}`,"types",e),l.add(u.name);const f=x1(u.type).base;M(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),!Px(f)&&(M(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),n.get(f).push(c),r.get(c).add(f))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);M(o.length!==0,"missing primary type","types",e),M(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),me(this,{primaryType:o[0]});function a(c,l){M(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(const u of r.get(c))if(n.has(u)){a(u,l);for(const f of l)s.get(f).add(u)}l.delete(c)}a(this.primaryType,new Set);for(const[c,l]of s){const u=Array.from(l);u.sort(),S(this,Wi).set(c,n3(c,i[c])+u.map(f=>n3(f,i[f])).join(""))}}get types(){return JSON.parse(S(this,Ip))}getEncoder(e){let r=S(this,af).get(e);return r||(r=ee(this,j0,WM).call(this,e),S(this,af).set(e,r)),r}encodeType(e){const r=S(this,Wi).get(e);return M(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Ct(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(Px(e))return n(e,r);const s=x1(e).array;if(s)return M(s.count===-1||s.count===r.length,`array length mismatch; expected length ${s.count}`,"value",r),r.map(o=>this._visit(s.prefix,o,n));const i=this.types[e];if(i)return i.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{});M(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Xn(e)}static getPrimaryType(e){return Xn.from(e).primaryType}static hashStruct(e,r,n){return Xn.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const s=t3[n];M(s,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>Tx.indexOf(n.name)-Tx.indexOf(s.name)),Xn.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return ot(["0x1901",Xn.hashDomain(e),Xn.from(r).hash(n)])}static hash(e,r,n){return Ct(Xn.encode(e,r,n))}static async resolveNames(e,r,n,s){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const i={};e.verifyingContract&&!vt(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Xn.from(r);o.visit(n,(a,c)=>(a==="address"&&!vt(c,20)&&(i[c]="0x"),c));for(const a in i)i[a]=await s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&i[c]?i[c]:c),{domain:e,value:n}}static getPayload(e,r,n){Xn.hashDomain(e);const s={},i=[];Tx.forEach(c=>{const l=e[c];l!=null&&(s[c]=bse[c](l),i.push({name:c,type:t3[c]}))});const o=Xn.from(r);r=o.types;const a=Object.assign({},r);return M(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return ne(fe(l));if(c.match(/^u?int/))return ye(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return M(typeof l=="string","invalid string","value",l),l}M(!1,"unsupported type","type",c)})}}};Ip=new WeakMap,Wi=new WeakMap,af=new WeakMap,j0=new WeakSet,WM=function(e){{const s=Px(e);if(s)return s}const r=x1(e).array;if(r){const s=r.prefix,i=this.getEncoder(s);return o=>{M(r.count===-1||r.count===o.length,`array length mismatch; expected length ${r.count}`,"value",o);let a=o.map(i);return S(this,Wi).has(s)&&(a=a.map(Ct)),Ct(ot(a))}}const n=this.types[e];if(n){const s=Cr(S(this,Wi).get(e));return i=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(i[a]);return S(this,Wi).has(c)?Ct(l):l});return o.unshift(s),ot(o)}}M(!1,`unknown type: ${e}`,"type",e)};let Kf=Xn;function nn(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const wse="external public payable override",Ese=nn(wse.split(" ")),KM="constant external internal payable private public pure view override",Sse=nn(KM.split(" ")),QM="constructor error event fallback function receive struct",YM=nn(QM.split(" ")),JM="calldata memory storage payable indexed",Cse=nn(JM.split(" ")),Ase="tuple returns",kse=[QM,JM,Ase,KM].join(" "),Tse=nn(kse.split(" ")),Pse={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},Rse=new RegExp("^(\\s*)"),Ise=new RegExp("^([0-9]+)"),Ose=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),XM=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),ZM=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var vr,Ps,Op,a2;const B0=class B0{constructor(e){W(this,Op);W(this,vr,void 0);W(this,Ps,void 0);N(this,vr,0),N(this,Ps,e.slice())}get offset(){return S(this,vr)}get length(){return S(this,Ps).length-S(this,vr)}clone(){return new B0(S(this,Ps))}reset(){N(this,vr,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const r=this.peek();throw new Error(`expected ${e}; got ${r.type} ${JSON.stringify(r.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=ee(this,Op,a2).call(this,S(this,vr)+1,e.match+1);return N(this,vr,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;S(this,vr)=S(this,Ps).length)throw new Error("out-of-bounds");return S(this,Ps)[S(this,vr)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return Ed(this,vr)._++,e}toString(){const e=[];for(let r=S(this,vr);r`}};vr=new WeakMap,Ps=new WeakMap,Op=new WeakSet,a2=function(e=0,r=0){return new B0(S(this,Ps).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let Vs=B0;function Ha(t){const e=[],r=o=>{const a=i0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;u=f+u,e[e.length-1].value=_e(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(a=o.match(Ose),a){if(c.text=a[1],i+=c.text.length,Tse.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(ZM)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(Ise),a){c.text=a[1],c.type="NUMBER",i+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${i}`)}return new Vs(e.map(o=>Object.freeze(o)))}function s3(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function Ym(t,e){if(e.peekKeyword(YM)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function bo(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function eD(t){let e=bo(t,Sse);return s3(e,nn("constant payable nonpayable".split(" "))),s3(e,nn("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function lo(t,e){return t.popParams().map(r=>Ar.from(r,e))}function tD(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return ye(t.pop().text);throw new Error("invalid gas")}return null}function ml(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const _se=new RegExp(/^(.*)\[([0-9]*)\]$/);function i3(t){const e=t.match(ZM);if(M(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);M(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);M(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const Pt={},bn=Symbol.for("_ethers_internal"),o3="_ParamTypeInternal",a3="_ErrorInternal",c3="_EventInternal",l3="_ConstructorInternal",u3="_FallbackInternal",f3="_FunctionInternal",d3="_StructInternal";var cf,nv;const Zn=class Zn{constructor(e,r,n,s,i,o,a,c){W(this,cf);G(this,"name");G(this,"type");G(this,"baseType");G(this,"indexed");G(this,"components");G(this,"arrayLength");G(this,"arrayChildren");if($a(e,Pt,"ParamType"),Object.defineProperty(this,bn,{value:o3}),o&&(o=Object.freeze(o.slice())),s==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(s==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");me(this,{name:r,type:n,baseType:s,indexed:i,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const i=JSON.parse(this.arrayChildren.format("json"));return i.name=n,i.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(i)}const s={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(s.indexed=this.indexed),this.isTuple()&&(s.components=this.components.map(i=>JSON.parse(i.format(e)))),JSON.stringify(s)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(s=>n.arrayChildren.walk(s,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((s,i)=>n.components[i].walk(s,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],s=[e];return ee(this,cf,nv).call(this,n,e,r,i=>{s[0]=i}),n.length&&await Promise.all(n),s[0]}static from(e,r){if(Zn.isParamType(e))return e;if(typeof e=="string")try{return Zn.from(Ha(e),r)}catch{M(!1,"invalid param type","obj",e)}else if(e instanceof Vs){let a="",c="",l=null;bo(e,nn(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(y=>Zn.from(y)),a=`tuple(${l.map(y=>y.format()).join(",")})`):(a=i3(e.popType("TYPE")),c=a);let u=null,f=null;for(;e.length&&e.peekType("BRACKET");){const y=e.pop();u=new Zn(Pt,"",a,c,null,l,f,u),f=y.value,a+=y.text,c="array",l=null}let d=null;if(bo(e,Cse).has("indexed")){if(!r)throw new Error("");d=!0}const p=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Zn(Pt,p,a,c,d,l,f,u)}const n=e.name;M(!n||typeof n=="string"&&n.match(XM),"invalid name","obj.name",n);let s=e.indexed;s!=null&&(M(r,"parameter cannot be indexed","obj.indexed",e.indexed),s=!!s);let i=e.type,o=i.match(_se);if(o){const a=parseInt(o[2]||"-1"),c=Zn.from({type:o[1],components:e.components});return new Zn(Pt,n||"",i,"array",s,null,a,c)}if(i==="tuple"||i.startsWith("tuple(")||i.startsWith("(")){const a=e.components!=null?e.components.map(l=>Zn.from(l)):null;return new Zn(Pt,n||"",i,"tuple",s,a,null,null)}return i=i3(e.type),new Zn(Pt,n||"",i,i,s,null,null,null)}static isParamType(e){return e&&e[bn]===o3}};cf=new WeakSet,nv=function(e,r,n,s){if(this.isArray()){if(!Array.isArray(r))throw new Error("invalid array value");if(this.arrayLength!==-1&&r.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,a=r.slice();a.forEach((c,l)=>{var u;ee(u=o,cf,nv).call(u,e,c,n,f=>{a[l]=f})}),s(a);return}if(this.isTuple()){const o=this.components;let a;if(Array.isArray(r))a=r.slice();else{if(r==null||typeof r!="object")throw new Error("invalid tuple value");a=o.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in r))throw new Error(`missing value for component ${c.name}`);return r[c.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((c,l)=>{var u;ee(u=o[l],cf,nv).call(u,e,c,n,f=>{a[l]=f})}),s(a);return}const i=n(this.type,r);i.then?e.push(async function(){s(await i)}()):s(i)};let Ar=Zn;class gl{constructor(e,r,n){G(this,"type");G(this,"inputs");$a(e,Pt,"Fragment"),n=Object.freeze(n.slice()),me(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{gl.from(JSON.parse(e))}catch{}return gl.from(Ha(e))}if(e instanceof Vs)switch(e.peekKeyword(YM)){case"constructor":return so.from(e);case"error":return pn.from(e);case"event":return li.from(e);case"fallback":case"receive":return Fi.from(e);case"function":return ui.from(e);case"struct":return rl.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return so.from(e);case"error":return pn.from(e);case"event":return li.from(e);case"fallback":case"receive":return Fi.from(e);case"function":return ui.from(e);case"struct":return rl.from(e)}J(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}M(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return so.isFragment(e)}static isError(e){return pn.isFragment(e)}static isEvent(e){return li.isFragment(e)}static isFunction(e){return ui.isFragment(e)}static isStruct(e){return rl.isFragment(e)}}class Jm extends gl{constructor(r,n,s,i){super(r,n,i);G(this,"name");M(typeof s=="string"&&s.match(XM),"invalid identifier","name",s),i=Object.freeze(i.slice()),me(this,{name:s})}}function ip(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class pn extends Jm{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,bn,{value:a3})}get selector(){return Cr(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+ip(e,this.inputs)),r.join(" ")}static from(e){if(pn.isFragment(e))return e;if(typeof e=="string")return pn.from(Ha(e));if(e instanceof Vs){const r=Ym("error",e),n=lo(e);return ml(e),new pn(Pt,r,n)}return new pn(Pt,e.name,e.inputs?e.inputs.map(Ar.from):[])}static isFragment(e){return e&&e[bn]===a3}}class li extends Jm{constructor(r,n,s,i){super(r,"event",n,s);G(this,"anonymous");Object.defineProperty(this,bn,{value:c3}),me(this,{anonymous:i})}get topicHash(){return Cr(this.format("sighash"))}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(s=>JSON.parse(s.format(r)))});const n=[];return r!=="sighash"&&n.push("event"),n.push(this.name+ip(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(i=>Ar.from(i)),new li(Pt,r,n,!1).topicHash}static from(r){if(li.isFragment(r))return r;if(typeof r=="string")try{return li.from(Ha(r))}catch{M(!1,"invalid event fragment","obj",r)}else if(r instanceof Vs){const n=Ym("event",r),s=lo(r,!0),i=!!bo(r,nn(["anonymous"])).has("anonymous");return ml(r),new li(Pt,n,s,i)}return new li(Pt,r.name,r.inputs?r.inputs.map(n=>Ar.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[bn]===c3}}class so extends gl{constructor(r,n,s,i,o){super(r,n,s);G(this,"payable");G(this,"gas");Object.defineProperty(this,bn,{value:l3}),me(this,{payable:i,gas:o})}format(r){if(J(r!=null&&r!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),r==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(s=>JSON.parse(s.format(r)))});const n=[`constructor${ip(r,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(so.isFragment(r))return r;if(typeof r=="string")try{return so.from(Ha(r))}catch{M(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof Vs){bo(r,nn(["constructor"]));const n=lo(r),s=!!bo(r,Ese).has("payable"),i=tD(r);return ml(r),new so(Pt,"constructor",n,s,i)}return new so(Pt,"constructor",r.inputs?r.inputs.map(Ar.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[bn]===l3}}class Fi extends gl{constructor(r,n,s){super(r,"fallback",n);G(this,"payable");Object.defineProperty(this,bn,{value:u3}),me(this,{payable:s})}format(r){const n=this.inputs.length===0?"receive":"fallback";if(r==="json"){const s=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:s})}return`${n}()${this.payable?" payable":""}`}static from(r){if(Fi.isFragment(r))return r;if(typeof r=="string")try{return Fi.from(Ha(r))}catch{M(!1,"invalid fallback fragment","obj",r)}else if(r instanceof Vs){const n=r.toString(),s=r.peekKeyword(nn(["fallback","receive"]));if(M(s,"type must be fallback or receive","obj",n),r.popKeyword(nn(["fallback","receive"]))==="receive"){const c=lo(r);return M(c.length===0,"receive cannot have arguments","obj.inputs",c),bo(r,nn(["payable"])),ml(r),new Fi(Pt,[],!0)}let o=lo(r);o.length?M(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(c=>c.format("minimal")).join(", ")):o=[Ar.from("bytes")];const a=eD(r);if(M(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),bo(r,nn(["returns"])).has("returns")){const c=lo(r);M(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(l=>l.format("minimal")).join(", "))}return ml(r),new Fi(Pt,o,a==="payable")}if(r.type==="receive")return new Fi(Pt,[],!0);if(r.type==="fallback"){const n=[Ar.from("bytes")],s=r.stateMutability==="payable";return new Fi(Pt,n,s)}M(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[bn]===u3}}class ui extends Jm{constructor(r,n,s,i,o,a){super(r,"function",n,i);G(this,"constant");G(this,"outputs");G(this,"stateMutability");G(this,"payable");G(this,"gas");Object.defineProperty(this,bn,{value:f3}),o=Object.freeze(o.slice()),me(this,{constant:s==="view"||s==="pure",gas:a,outputs:o,payable:s==="payable",stateMutability:s})}get selector(){return Cr(this.format("sighash")).substring(0,10)}format(r){if(r==null&&(r="sighash"),r==="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!=null?this.gas:void 0,inputs:this.inputs.map(s=>JSON.parse(s.format(r))),outputs:this.outputs.map(s=>JSON.parse(s.format(r)))});const n=[];return r!=="sighash"&&n.push("function"),n.push(this.name+ip(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(ip(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(i=>Ar.from(i)),new ui(Pt,r,"view",n,[],null).selector}static from(r){if(ui.isFragment(r))return r;if(typeof r=="string")try{return ui.from(Ha(r))}catch{M(!1,"invalid function fragment","obj",r)}else if(r instanceof Vs){const s=Ym("function",r),i=lo(r),o=eD(r);let a=[];bo(r,nn(["returns"])).has("returns")&&(a=lo(r));const c=tD(r);return ml(r),new ui(Pt,s,o,i,a,c)}let n=r.stateMutability;return n==null&&(n="payable",typeof r.constant=="boolean"?(n="view",r.constant||(n="payable",typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable"))):typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable")),new ui(Pt,r.name,n,r.inputs?r.inputs.map(Ar.from):[],r.outputs?r.outputs.map(Ar.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[bn]===f3}}class rl extends Jm{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,bn,{value:d3})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return rl.from(Ha(e))}catch{M(!1,"invalid struct fragment","obj",e)}else if(e instanceof Vs){const r=Ym("struct",e),n=lo(e);return ml(e),new rl(Pt,r,n)}return new rl(Pt,e.name,e.inputs?e.inputs.map(Ar.from):[])}static isFragment(e){return e&&e[bn]===d3}}const zs=new Map;zs.set(0,"GENERIC_PANIC");zs.set(1,"ASSERT_FALSE");zs.set(17,"OVERFLOW");zs.set(18,"DIVIDE_BY_ZERO");zs.set(33,"ENUM_RANGE_ERROR");zs.set(34,"BAD_STORAGE_DATA");zs.set(49,"STACK_UNDERFLOW");zs.set(50,"ARRAY_RANGE_ERROR");zs.set(65,"OUT_OF_MEMORY");zs.set(81,"UNINITIALIZED_FUNCTION_CALL");const Nse=new RegExp(/^bytes([0-9]*)$/),Mse=new RegExp(/^(u?int)([0-9]*)$/);let Rx=null,h3=1024;function Dse(t,e,r,n){let s="missing revert data",i=null;const o=null;let a=null;if(r){s="execution reverted";const l=fe(r);if(r=ne(r),l.length===0)s+=" (no data present; likely require(false) occurred",i="require(false)";else if(l.length%32!==4)s+=" (could not decode reason; invalid data length)";else if(ne(l.slice(0,4))==="0x08c379a0")try{i=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[i]},s+=`: ${JSON.stringify(i)}`}catch{s+=" (could not decode reason; invalid string data)"}else if(ne(l.slice(0,4))==="0x4e487b71")try{const u=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[u]},i=`Panic due to ${zs.get(u)||"UNKNOWN"}(${u})`,s+=`: ${i}`}catch{s+=" (could not decode panic code)"}else s+=" (unknown custom error)"}const c={to:e.to?Xe(e.to):null,data:e.data||"0x"};return e.from&&(c.from=Xe(e.from)),Lt(s,"CALL_EXCEPTION",{action:t,data:r,reason:i,transaction:c,invocation:o,revert:a})}var Yo,Wl;const F0=class F0{constructor(){W(this,Yo)}getDefaultValue(e){const r=e.map(s=>ee(this,Yo,Wl).call(this,Ar.from(s)));return new g1(r,"_").defaultValue()}encode(e,r){o7(r.length,e.length,"types/values length mismatch");const n=e.map(o=>ee(this,Yo,Wl).call(this,Ar.from(o))),s=new g1(n,"_"),i=new Ww;return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>ee(this,Yo,Wl).call(this,Ar.from(o)));return new g1(s,"_").decode(new Kw(r,n,h3))}static _setDefaultMaxInflation(e){M(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),h3=e}static defaultAbiCoder(){return Rx==null&&(Rx=new F0),Rx}static getBuiltinCallException(e,r,n){return Dse(e,r,n,F0.defaultAbiCoder())}};Yo=new WeakSet,Wl=function(e){if(e.isArray())return new sne(ee(this,Yo,Wl).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new g1(e.components.map(n=>ee(this,Yo,Wl).call(this,n)),e.name);switch(e.baseType){case"address":return new rne(e.name);case"bool":return new ine(e.name);case"string":return new pne(e.name);case"bytes":return new one(e.name);case"":return new lne(e.name)}let r=e.type.match(Mse);if(r){let n=parseInt(r[2]||"256");return M(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new hne(n/8,r[1]==="int",e.name)}if(r=e.type.match(Nse),r){let n=parseInt(r[1]);return M(n!==0&&n<=32,"invalid bytes length","param",e),new ane(n,e.name)}M(!1,"invalid type","type",e.type)};let op=F0;class Lse{constructor(e,r,n){G(this,"fragment");G(this,"name");G(this,"signature");G(this,"topic");G(this,"args");const s=e.name,i=e.format();me(this,{fragment:e,name:s,signature:i,topic:r,args:n})}}class jse{constructor(e,r,n,s){G(this,"fragment");G(this,"name");G(this,"args");G(this,"signature");G(this,"selector");G(this,"value");const i=e.name,o=e.format();me(this,{fragment:e,name:i,args:n,signature:o,selector:r,value:s})}}class Bse{constructor(e,r,n){G(this,"fragment");G(this,"name");G(this,"args");G(this,"signature");G(this,"selector");const s=e.name,i=e.format();me(this,{fragment:e,name:s,args:n,signature:i,selector:r})}}class p3{constructor(e){G(this,"hash");G(this,"_isIndexed");me(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const y3={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},v3={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&y3[t.toString()]&&(e=y3[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var ei,ti,ri,Dr,lf,sv,uf,iv;const hc=class hc{constructor(e){W(this,lf);W(this,uf);G(this,"fragments");G(this,"deploy");G(this,"fallback");G(this,"receive");W(this,ei,void 0);W(this,ti,void 0);W(this,ri,void 0);W(this,Dr,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,N(this,ri,new Map),N(this,ei,new Map),N(this,ti,new Map);const n=[];for(const o of r)try{n.push(gl.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}me(this,{fragments:Object.freeze(n)});let s=null,i=!1;N(this,Dr,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}me(this,{deploy:o});return;case"fallback":o.inputs.length===0?i=!0:(M(!s||o.payable!==s.payable,"conflicting fallback fragments",`fragments[${a}]`,o),s=o,i=s.payable);return;case"function":c=S(this,ri);break;case"event":c=S(this,ti);break;case"error":c=S(this,ei);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||me(this,{deploy:so.from("constructor()")}),me(this,{fallback:s,receive:i})}format(e){const r=e?"minimal":"full";return this.fragments.map(s=>s.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return op.defaultAbiCoder()}getFunctionName(e){const r=ee(this,lf,sv).call(this,e,null,!1);return M(r,"no matching function","key",e),r.name}hasFunction(e){return!!ee(this,lf,sv).call(this,e,null,!1)}getFunction(e,r){return ee(this,lf,sv).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(S(this,ri).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;nn.localeCompare(s));for(let n=0;n1){const i=s.map(o=>JSON.stringify(o.format())).join(", ");M(!1,`ambiguous error description (i.e. ${i})`,"name",e)}return s[0]}if(e=pn.from(e).format(),e==="Error(string)")return pn.from("error Error(string)");if(e==="Panic(uint256)")return pn.from("error Panic(uint256)");const n=S(this,ei).get(e);return n||null}forEachError(e){const r=Array.from(S(this,ei).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;ni.type==="string"?Cr(o):i.type==="bytes"?Ct(ne(o)):(i.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":i.type.match(/^u?int/)?o=go(o):i.type.match(/^bytes/)?o=Uee(o,32):i.type==="address"&&S(this,Dr).encode(["address"],[o]),pl(ne(o),32));for(r.forEach((i,o)=>{const a=e.inputs[o];if(!a.indexed){M(i==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?M(!1,"filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(c=>s(a,c))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const o=this.getEvent(e);M(o,"unknown event","eventFragment",e),e=o}const n=[],s=[],i=[];return e.anonymous||n.push(e.topicHash),M(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Cr(c));else if(o.type==="bytes")n.push(Ct(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(S(this,Dr).encode([o.type],[c]))}else s.push(o),i.push(c)}),{data:S(this,Dr).encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const h=this.getEvent(e);M(h,"unknown event","eventFragment",e),e=h}if(n!=null&&!e.anonymous){const h=e.topicHash;M(vt(n[0],32)&&n[0].toLowerCase()===h,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const s=[],i=[],o=[];e.inputs.forEach((h,p)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(s.push(Ar.from({type:"bytes32",name:h.name})),o.push(!0)):(s.push(h),o.push(!1)):(i.push(h),o.push(!1))});const a=n!=null?S(this,Dr).decode(s,ot(n)):null,c=S(this,Dr).decode(i,r,!0),l=[],u=[];let f=0,d=0;return e.inputs.forEach((h,p)=>{let y=null;if(h.indexed)if(a==null)y=new p3(null);else if(o[p])y=new p3(a[d++]);else try{y=a[d++]}catch(g){y=g}else try{y=c[f++]}catch(g){y=g}l.push(y),u.push(h.name||null)}),Uf.fromItems(l,u)}parseTransaction(e){const r=fe(e.data,"tx.data"),n=ye(e.value!=null?e.value:0,"tx.value"),s=this.getFunction(ne(r.slice(0,4)));if(!s)return null;const i=S(this,Dr).decode(s.inputs,r.slice(4));return new jse(s,s.selector,i,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new Lse(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=ne(e),n=this.getError(xt(r,0,4));if(!n)return null;const s=S(this,Dr).decode(n.inputs,xt(r,4));return new Bse(n,n.selector,s)}static from(e){return e instanceof hc?e:typeof e=="string"?new hc(JSON.parse(e)):typeof e.formatJson=="function"?new hc(e.formatJson()):typeof e.format=="function"?new hc(e.format("json")):new hc(e)}};ei=new WeakMap,ti=new WeakMap,ri=new WeakMap,Dr=new WeakMap,lf=new WeakSet,sv=function(e,r,n){if(vt(e)){const i=e.toLowerCase();for(const o of S(this,ri).values())if(i===o.selector)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of S(this,ri))o.split("(")[0]===e&&i.push(a);if(r){const o=r.length>0?r[r.length-1]:null;let a=r.length,c=!0;zr.isTyped(o)&&o.type==="overrides"&&(c=!1,a--);for(let l=i.length-1;l>=0;l--){const u=i[l].inputs.length;u!==a&&(!c||u!==a-1)&&i.splice(l,1)}for(let l=i.length-1;l>=0;l--){const u=i[l].inputs;for(let f=0;f=u.length){if(r[f].type==="overrides")continue;i.splice(l,1);break}if(r[f].type!==u[f].baseType){i.splice(l,1);break}}}}if(i.length===1&&r&&r.length!==i[0].inputs.length){const o=r[r.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&i.splice(0,1)}if(i.length===0)return null;if(i.length>1&&n){const o=i.map(a=>JSON.stringify(a.format())).join(", ");M(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return i[0]}const s=S(this,ri).get(ui.from(e).format());return s||null},uf=new WeakSet,iv=function(e,r,n){if(vt(e)){const i=e.toLowerCase();for(const o of S(this,ti).values())if(i===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of S(this,ti))o.split("(")[0]===e&&i.push(a);if(r){for(let o=i.length-1;o>=0;o--)i[o].inputs.length=0;o--){const a=i[o].inputs;for(let c=0;c1&&n){const o=i.map(a=>JSON.stringify(a.format())).join(", ");M(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return i[0]}const s=S(this,ti).get(li.from(e).format());return s||null};let c2=hc;const rD=BigInt(0);function Nu(t){return t??null}function Gt(t){return t==null?null:t.toString()}class m3{constructor(e,r,n){G(this,"gasPrice");G(this,"maxFeePerGas");G(this,"maxPriorityFeePerGas");me(this,{gasPrice:Nu(e),maxFeePerGas:Nu(r),maxPriorityFeePerGas:Nu(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Gt(e),maxFeePerGas:Gt(r),maxPriorityFeePerGas:Gt(n)}}}function ap(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=ne(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const s of r)!(s in t)||t[s]==null||(e[s]=ye(t[s],`request.${s}`));const n="type,nonce".split(/,/);for(const s of n)!(s in t)||t[s]==null||(e[s]=_e(t[s],`request.${s}`));return t.accessList&&(e.accessList=Pl(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(s=>Um(s)?ne(s):Object.assign({},s))),e}var Ki;class Fse{constructor(e,r){G(this,"provider");G(this,"number");G(this,"hash");G(this,"timestamp");G(this,"parentHash");G(this,"parentBeaconBlockRoot");G(this,"nonce");G(this,"difficulty");G(this,"gasLimit");G(this,"gasUsed");G(this,"stateRoot");G(this,"receiptsRoot");G(this,"blobGasUsed");G(this,"excessBlobGas");G(this,"miner");G(this,"prevRandao");G(this,"extraData");G(this,"baseFeePerGas");W(this,Ki,void 0);N(this,Ki,e.transactions.map(n=>typeof n!="string"?new cp(n,r):n)),me(this,{provider:r,hash:Nu(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:Nu(e.prevRandao),extraData:e.extraData,baseFeePerGas:Nu(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return S(this,Ki).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=S(this,Ki).slice();return e.length===0?[]:(J(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:s,gasUsed:i,hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:f,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,timestamp:y,transactions:g}=this;return{_type:"Block",baseFeePerGas:Gt(e),difficulty:Gt(r),extraData:n,gasLimit:Gt(s),gasUsed:Gt(i),blobGasUsed:Gt(this.blobGasUsed),excessBlobGas:Gt(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:f,timestamp:y,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,transactions:g}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>enew by(s,r))));let n=rD;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),me(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return S(this,_p)}toJSON(){const{to:e,from:r,contractAddress:n,hash:s,index:i,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:u,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:Gt(this.cumulativeGasUsed),from:r,gasPrice:Gt(this.gasPrice),blobGasUsed:Gt(this.blobGasUsed),blobGasPrice:Gt(this.blobGasPrice),gasUsed:Gt(this.gasUsed),hash:s,index:i,logs:l,logsBloom:c,root:f,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(a)return null;const{blockNumber:d,nonce:h}=await Fr({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(h{if(d==null||d.status!==0)return d;J(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:d.to,from:d.from,data:""},receipt:d})},u=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(u);if(u){if(await u.confirmations()>=n)return l(u)}else if(await c(),n===0)return null;return await new Promise((d,h)=>{const p=[],y=()=>{p.forEach(m=>m())};if(p.push(()=>{a=!0}),s>0){const m=setTimeout(()=>{y(),h(Lt("wait for transaction timeout","TIMEOUT"))},s);p.push(()=>{clearTimeout(m)})}const g=async m=>{if(await m.confirmations()>=n){y();try{d(l(m))}catch(x){h(x)}}};if(p.push(()=>{this.provider.off(this.hash,g)}),this.provider.on(this.hash,g),i>=0){const m=async()=>{try{await c()}catch(x){if(Vr(x,"TRANSACTION_REPLACED")){y(),h(x);return}}a||this.provider.once("block",m)};p.push(()=>{this.provider.off("block",m)}),this.provider.once("block",m)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return J(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),iD(this)}reorderedEvent(e){return J(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),J(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),sD(this,e)}replaceableTransaction(e){M(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new Mk(this,this.provider);return N(r,Jo,e),r}};Jo=new WeakMap;let cp=Mk;function Use(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function sD(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function iD(t){return{orphan:"drop-transaction",tx:t}}function Vse(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class jC extends by{constructor(r,n,s){super(r,r.provider);G(this,"interface");G(this,"fragment");G(this,"args");const i=n.decodeEventLog(s,r.data,r.topics);me(this,{args:i,fragment:s,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class oD extends by{constructor(r,n){super(r,r.provider);G(this,"error");me(this,{error:n})}}var ff;class $se extends nD{constructor(r,n,s){super(s,n);W(this,ff,void 0);N(this,ff,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?S(this,ff).getEvent(r.topics[0]):null;if(n)try{return new jC(r,S(this,ff),n)}catch(s){return new oD(r,s)}return r})}}ff=new WeakMap;var Np;class BC extends cp{constructor(r,n,s){super(s,n);W(this,Np,void 0);N(this,Np,r)}async wait(r,n){const s=await super.wait(r,n);return s==null?null:new $se(S(this,Np),this.provider,s)}}Np=new WeakMap;class aD extends d7{constructor(r,n,s,i){super(r,n,s);G(this,"log");me(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class zse extends aD{constructor(e,r,n,s,i){super(e,r,n,new jC(i,e.interface,s));const o=e.interface.decodeEventLog(s,this.log.data,this.log.topics);me(this,{args:o,fragment:s})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const g3=BigInt(0);function cD(t){return t&&typeof t.call=="function"}function lD(t){return t&&typeof t.estimateGas=="function"}function Xm(t){return t&&typeof t.resolveName=="function"}function uD(t){return t&&typeof t.sendTransaction=="function"}function fD(t){if(t!=null){if(Xm(t))return t;if(t.provider)return t.provider}}var Mp;class Hse{constructor(e,r,n){W(this,Mp,void 0);G(this,"fragment");if(me(this,{fragment:r}),r.inputs.lengthn[c]==null?null:a.walkAsync(n[c],(u,f)=>u==="address"?Array.isArray(f)?Promise.all(f.map(d=>wr(d,i))):wr(f,i):f)));return e.interface.encodeFilterTopics(r,o)}())}getTopicFilter(){return S(this,Mp)}}Mp=new WeakMap;function xl(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function Sc(t){return t==null?null:t.provider||null}async function dD(t,e){const r=zr.dereference(t,"overrides");M(typeof r=="object","invalid overrides parameter","overrides",t);const n=ap(r);return M(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),M(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function Gse(t,e,r){const n=xl(t,"resolveName"),s=Xm(n)?n:null;return await Promise.all(e.map((i,o)=>i.walkAsync(r[o],(a,c)=>(c=zr.dereference(c,a),a==="address"?wr(c,s):c))))}function qse(t){const e=async function(o){const a=await dD(o,["data"]);a.to=await t.getAddress(),a.from&&(a.from=await wr(a.from,fD(t.runner)));const c=t.interface,l=ye(a.value||g3,"overrides.value")===g3,u=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!u&&!l&&M(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),M(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data);const f=c.receive||c.fallback&&c.fallback.payable;return M(f||l,"cannot send value to non-payable fallback","overrides.value",a.value),M(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data),a},r=async function(o){const a=xl(t.runner,"call");J(cD(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await a.call(c)}catch(l){throw vC(l)&&l.data?t.interface.makeError(l.data,c):l}},n=async function(o){const a=t.runner;J(uD(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=Sc(t.runner);return new BC(t.interface,l,c)},s=async function(o){const a=xl(t.runner,"estimateGas");return J(lD(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},i=async o=>await n(o);return me(i,{_contract:t,estimateGas:s,populateTransaction:e,send:n,staticCall:r}),i}function Wse(t,e){const r=function(...l){const u=t.interface.getFunction(e,l);return J(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),u},n=async function(...l){const u=r(...l);let f={};if(u.inputs.length+1===l.length&&(f=await dD(l.pop()),f.from&&(f.from=await wr(f.from,fD(t.runner)))),u.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const d=await Gse(t.runner,u.inputs,l);return Object.assign({},f,await Fr({to:t.getAddress(),data:t.interface.encodeFunctionData(u,d)}))},s=async function(...l){const u=await a(...l);return u.length===1?u[0]:u},i=async function(...l){const u=t.runner;J(uD(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await u.sendTransaction(await n(...l)),d=Sc(t.runner);return new BC(t.interface,d,f)},o=async function(...l){const u=xl(t.runner,"estimateGas");return J(lD(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await n(...l))},a=async function(...l){const u=xl(t.runner,"call");J(cD(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await n(...l);let d="0x";try{d=await u.call(f)}catch(p){throw vC(p)&&p.data?t.interface.makeError(p.data,f):p}const h=r(...l);return t.interface.decodeFunctionResult(h,d)},c=async(...l)=>r(...l).constant?await s(...l):await i(...l);return me(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:o,populateTransaction:n,send:i,staticCall:s,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=t.interface.getFunction(e);return J(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function Kse(t,e){const r=function(...s){const i=t.interface.getEvent(e,s);return J(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:s}}),i},n=function(...s){return new Hse(t,r(...s),s)};return me(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const s=t.interface.getEvent(e);return J(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),s}}),n}const m0=Symbol.for("_ethersInternal_contract"),hD=new WeakMap;function Qse(t,e){hD.set(t[m0],e)}function An(t){return hD.get(t[m0])}function Yse(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function FC(t,e){let r,n=null;if(Array.isArray(e)){const i=function(o){if(vt(o,32))return o;const a=t.interface.getEvent(o);return M(a,"unknown fragment","name",o),a.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(i):i(o))}else e==="*"?r=[null]:typeof e=="string"?vt(e,32)?r=[e]:(n=t.interface.getEvent(e),M(n,"unknown fragment","event",e),r=[n.topicHash]):Yse(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):M(!1,"unknown event name","event",e);r=r.map(i=>{if(i==null)return null;if(Array.isArray(i)){const o=Array.from(new Set(i.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return i.toLowerCase()});const s=r.map(i=>i==null?"null":Array.isArray(i)?i.join("|"):i).join("&");return{fragment:n,tag:s,topics:r}}async function Zd(t,e){const{subs:r}=An(t);return r.get((await FC(t,e)).tag)||null}async function x3(t,e,r){const n=Sc(t.runner);J(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:s,tag:i,topics:o}=await FC(t,r),{addr:a,subs:c}=An(t);let l=c.get(i);if(!l){const f={address:a||t,topics:o},d=g=>{let m=s;if(m==null)try{m=t.interface.getEvent(g.topics[0])}catch{}if(m){const x=m,b=s?t.interface.decodeEventLog(s,g.data,g.topics):[];u2(t,r,b,w=>new zse(t,w,r,x,g))}else u2(t,r,[],x=>new aD(t,x,r,g))};let h=[];l={tag:i,listeners:[],start:()=>{h.length||h.push(n.on(f,d))},stop:async()=>{if(h.length==0)return;let g=h;h=[],await Promise.all(g),n.off(f,d)}},c.set(i,l)}return l}let l2=Promise.resolve();async function Jse(t,e,r,n){await l2;const s=await Zd(t,e);if(!s)return!1;const i=s.listeners.length;return s.listeners=s.listeners.filter(({listener:o,once:a})=>{const c=Array.from(r);n&&c.push(n(a?null:o));try{o.call(t,...c)}catch{}return!a}),s.listeners.length===0&&(s.stop(),An(t).subs.delete(s.tag)),i>0}async function u2(t,e,r,n){try{await l2}catch{}const s=Jse(t,e,r,n);return l2=s,await s}const b1=["then"];var P1e;const Ch=class Ch{constructor(e,r,n,s){G(this,"target");G(this,"interface");G(this,"runner");G(this,"filters");G(this,P1e);G(this,"fallback");M(typeof e=="string"||xM(e),"invalid value for Contract target","target",e),n==null&&(n=null);const i=c2.from(r);me(this,{target:e,runner:n,interface:i}),Object.defineProperty(this,m0,{value:{}});let o,a=null,c=null;if(s){const f=Sc(n);c=new BC(this.interface,f,s)}let l=new Map;if(typeof e=="string")if(vt(e))a=e,o=Promise.resolve(e);else{const f=xl(n,"resolveName");if(!Xm(f))throw Lt("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(d=>{if(d==null)throw Lt("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return An(this).addr=d,d})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return An(this).addr=f,f});Qse(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const u=new Proxy({},{get:(f,d,h)=>{if(typeof d=="symbol"||b1.indexOf(d)>=0)return Reflect.get(f,d,h);try{return this.getEvent(d)}catch(p){if(!Vr(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(f,d)=>b1.indexOf(d)>=0?Reflect.has(f,d):Reflect.has(f,d)||this.interface.hasEvent(String(d))});return me(this,{filters:u}),me(this,{fallback:i.receive||i.fallback?qse(this):null}),new Proxy(this,{get:(f,d,h)=>{if(typeof d=="symbol"||d in f||b1.indexOf(d)>=0)return Reflect.get(f,d,h);try{return f.getFunction(d)}catch(p){if(!Vr(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(f,d)=>typeof d=="symbol"||d in f||b1.indexOf(d)>=0?Reflect.has(f,d):f.interface.hasFunction(d)})}connect(e){return new Ch(this.target,this.interface,e)}attach(e){return new Ch(e,this.interface,this.runner)}async getAddress(){return await An(this).addrPromise}async getDeployedCode(){const e=Sc(this.runner);J(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=Sc(this.runner);return J(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((s,i)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return s(this);n.once("block",o)}catch(a){i(a)}};o()})}deploymentTransaction(){return An(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),Wse(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),Kse(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:s,addrPromise:i}=An(this),o=s||await i,{fragment:a,topics:c}=await FC(this,e),l={address:o,topics:c,fromBlock:r,toBlock:n},u=Sc(this.runner);return J(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(l)).map(f=>{let d=a;if(d==null)try{d=this.interface.getEvent(f.topics[0])}catch{}if(d)try{return new jC(f,this.interface,d)}catch(h){return new oD(f,h)}return new by(f,u)})}async on(e,r){const n=await x3(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await x3(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await u2(this,e,r,null)}async listenerCount(e){if(e){const s=await Zd(this,e);return s?s.listeners.length:0}const{subs:r}=An(this);let n=0;for(const{listeners:s}of r.values())n+=s.length;return n}async listeners(e){if(e){const s=await Zd(this,e);return s?s.listeners.map(({listener:i})=>i):[]}const{subs:r}=An(this);let n=[];for(const{listeners:s}of r.values())n=n.concat(s.map(({listener:i})=>i));return n}async off(e,r){const n=await Zd(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(r==null||n.listeners.length===0)&&(n.stop(),An(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await Zd(this,e);if(!r)return this;r.stop(),An(this).subs.delete(r.tag)}else{const{subs:r}=An(this);for(const{tag:n,stop:s}of r.values())s(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends Ch{constructor(s,i=null){super(s,e,i)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};P1e=m0;let f2=Ch;function Xse(){return f2}class Mu extends Xse(){}function Ix(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):M(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class Zse{constructor(e){G(this,"name");me(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const pD=new RegExp("^(ipfs)://(.*)$","i"),b3=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),pD,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Xo,Bc,Zo,Kl,U0,yD;const gu=class gu{constructor(e,r,n){W(this,Zo);G(this,"provider");G(this,"address");G(this,"name");W(this,Xo,void 0);W(this,Bc,void 0);me(this,{provider:e,address:r,name:n}),N(this,Xo,null),N(this,Bc,new Mu(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return S(this,Xo)==null&&N(this,Xo,(async()=>{try{return await S(this,Bc).supportsInterface("0x9061b923")}catch(e){if(Vr(e,"CALL_EXCEPTION"))return!1;throw N(this,Xo,null),e}})()),await S(this,Xo)}async getAddress(e){if(e==null&&(e=60),e===60)try{const i=await ee(this,Zo,Kl).call(this,"addr(bytes32)");return i==null||i===vl?null:i}catch(i){if(Vr(i,"CALL_EXCEPTION"))return null;throw i}if(e>=0&&e<2147483648){let i=e+2147483648;const o=await ee(this,Zo,Kl).call(this,"addr(bytes32,uint)",[i]);if(vt(o,20))return Xe(o)}let r=null;for(const i of this.provider.plugins)if(i instanceof Zse&&i.supportsCoinType(e)){r=i;break}if(r==null)return null;const n=await ee(this,Zo,Kl).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const s=await r.decodeAddress(e,n);if(s!=null)return s;J(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await ee(this,Zo,Kl).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await ee(this,Zo,Kl).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const s=r[1]==="e3010170"?"ipfs":"ipns",i=parseInt(r[4],16);if(r[5].length===i*2)return`${s}://${f7("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;J(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n{if(e&&r==null)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map(n=>t(n))}}function wy(t,e){return r=>{const n={};for(const s in t){let i=s;if(e&&s in e&&!(i in r)){for(const o of e[s])if(o in r){i=o;break}}try{const o=t[s](r[i]);o!==void 0&&(n[s]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";J(!1,`invalid value for value.${s} (${a})`,"BAD_DATA",{value:r})}}return n}}function eie(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}M(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Qf(t){return M(vt(t,!0),"invalid data","value",t),t}function xr(t){return M(vt(t,32),"invalid hash","value",t),t}const tie=wy({address:Xe,blockHash:xr,blockNumber:_e,data:Qf,index:_e,removed:Ge(eie,!1),topics:Zm(xr),transactionHash:xr,transactionIndex:_e},{index:["logIndex"]});function rie(t){return tie(t)}const nie=wy({hash:Ge(xr),parentHash:xr,parentBeaconBlockRoot:Ge(xr,null),number:_e,timestamp:_e,nonce:Ge(Qf),difficulty:ye,gasLimit:ye,gasUsed:ye,stateRoot:Ge(xr,null),receiptsRoot:Ge(xr,null),blobGasUsed:Ge(ye,null),excessBlobGas:Ge(ye,null),miner:Ge(Xe),prevRandao:Ge(xr,null),extraData:Qf,baseFeePerGas:Ge(ye)},{prevRandao:["mixHash"]});function sie(t){const e=nie(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:vD(r)),e}const iie=wy({transactionIndex:_e,blockNumber:_e,transactionHash:xr,address:Xe,topics:Zm(xr),data:Qf,index:_e,blockHash:xr},{index:["logIndex"]});function oie(t){return iie(t)}const aie=wy({to:Ge(Xe,null),from:Ge(Xe,null),contractAddress:Ge(Xe,null),index:_e,root:Ge(ne),gasUsed:ye,blobGasUsed:Ge(ye,null),logsBloom:Ge(Qf),blockHash:xr,hash:xr,logs:Zm(oie),blockNumber:_e,cumulativeGasUsed:ye,effectiveGasPrice:Ge(ye),blobGasPrice:Ge(ye,null),status:Ge(_e),type:Ge(_e,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function cie(t){return aie(t)}function vD(t){t.to&&ye(t.to)===w3&&(t.to="0x0000000000000000000000000000000000000000");const e=wy({hash:xr,index:Ge(_e,void 0),type:r=>r==="0x"||r==null?0:_e(r),accessList:Ge(Pl,null),blobVersionedHashes:Ge(Zm(xr,!0),null),blockHash:Ge(xr,null),blockNumber:Ge(_e,null),transactionIndex:Ge(_e,null),from:Xe,gasPrice:Ge(ye),maxPriorityFeePerGas:Ge(ye),maxFeePerGas:Ge(ye),maxFeePerBlobGas:Ge(ye,null),gasLimit:ye,to:Ge(Xe,null),value:ye,nonce:_e,data:Qf,creates:Ge(Xe,null),chainId:Ge(ye,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=ene(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Us.from(t.signature):e.signature=Us.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&ye(e.blockHash)===w3&&(e.blockHash=null),e}const lie="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Ey{constructor(e){G(this,"name");me(this,{name:e})}clone(){return new Ey(this.name)}}class eg extends Ey{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);G(this,"effectiveBlock");G(this,"txBase");G(this,"txCreate");G(this,"txDataZero");G(this,"txDataNonzero");G(this,"txAccessListStorageKey");G(this,"txAccessListAddress");const s={effectiveBlock:r};function i(o,a){let c=(n||{})[o];c==null&&(c=a),M(typeof c=="number",`invalud value for ${o}`,"costs",n),s[o]=c}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),me(this,s)}clone(){return new eg(this.effectiveBlock,this)}}class tg extends Ey{constructor(r,n){super("org.ethers.plugins.network.Ens");G(this,"address");G(this,"targetNetwork");me(this,{address:r||lie,targetNetwork:n??1})}clone(){return new tg(this.address,this.targetNetwork)}}var Dp,Lp;class uie extends Ey{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");W(this,Dp,void 0);W(this,Lp,void 0);N(this,Dp,r),N(this,Lp,n)}get url(){return S(this,Dp)}get processFunc(){return S(this,Lp)}clone(){return this}}Dp=new WeakMap,Lp=new WeakMap;const Ox=new Map;var df,hf,ea;const xu=class xu{constructor(e,r){W(this,df,void 0);W(this,hf,void 0);W(this,ea,void 0);N(this,df,e),N(this,hf,ye(r)),N(this,ea,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return S(this,df)}set name(e){N(this,df,e)}get chainId(){return S(this,hf)}set chainId(e){N(this,hf,ye(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===ye(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===ye(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===ye(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(S(this,ea).values())}attachPlugin(e){if(S(this,ea).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return S(this,ea).set(e.name,e.clone()),this}getPlugin(e){return S(this,ea).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new xu(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new eg;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let s=2;s9){let s=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||s++,n[1]=s.toString()}return BigInt(n[0]+n[1])}function S3(t){return new uie(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let s;try{const[i,o]=await Promise.all([n.send(),e()]);s=i;const a=s.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:E3(a.maxFee,9),maxPriorityFeePerGas:E3(a.maxPriorityFee,9)}}catch(i){J(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:s,error:i})}})}let C3=!1;function fie(){if(C3)return;C3=!0;function t(e,r,n){const s=function(){const i=new pi(e,r);return n.ensNetwork!=null&&i.attachPlugin(new tg(null,n.ensNetwork)),i.attachPlugin(new eg),(n.plugins||[]).forEach(o=>{i.attachPlugin(o)}),i};pi.register(e,s),pi.register(r,s),n.altNames&&n.altNames.forEach(i=>{pi.register(i,s)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("linea-sepolia",59141,{}),t("matic",137,{ensNetwork:1,plugins:[S3("https://gasstation.polygon.technology/v2")]}),t("matic-amoy",80002,{}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[S3("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function d2(t){return JSON.parse(JSON.stringify(t))}var Qi,es,ta,ni,pf,ov;class die{constructor(e){W(this,pf);W(this,Qi,void 0);W(this,es,void 0);W(this,ta,void 0);W(this,ni,void 0);N(this,Qi,e),N(this,es,null),N(this,ta,4e3),N(this,ni,-2)}get pollingInterval(){return S(this,ta)}set pollingInterval(e){N(this,ta,e)}start(){S(this,es)||(N(this,es,S(this,Qi)._setTimeout(ee(this,pf,ov).bind(this),S(this,ta))),ee(this,pf,ov).call(this))}stop(){S(this,es)&&(S(this,Qi)._clearTimeout(S(this,es)),N(this,es,null))}pause(e){this.stop(),e&&N(this,ni,-2)}resume(){this.start()}}Qi=new WeakMap,es=new WeakMap,ta=new WeakMap,ni=new WeakMap,pf=new WeakSet,ov=async function(){try{const e=await S(this,Qi).getBlockNumber();if(S(this,ni)===-2){N(this,ni,e);return}if(e!==S(this,ni)){for(let r=S(this,ni)+1;r<=e;r++){if(S(this,es)==null)return;await S(this,Qi).emit("block",r)}N(this,ni,e)}}catch{}S(this,es)!=null&&N(this,es,S(this,Qi)._setTimeout(ee(this,pf,ov).bind(this),S(this,ta)))};var Fc,Uc,ra;class UC{constructor(e){W(this,Fc,void 0);W(this,Uc,void 0);W(this,ra,void 0);N(this,Fc,e),N(this,ra,!1),N(this,Uc,r=>{this._poll(r,S(this,Fc))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){S(this,ra)||(N(this,ra,!0),S(this,Uc).call(this,-2),S(this,Fc).on("block",S(this,Uc)))}stop(){S(this,ra)&&(N(this,ra,!1),S(this,Fc).off("block",S(this,Uc)))}pause(e){this.stop()}resume(){this.start()}}Fc=new WeakMap,Uc=new WeakMap,ra=new WeakMap;var yf,Yi;class hie extends UC{constructor(r,n){super(r);W(this,yf,void 0);W(this,Yi,void 0);N(this,yf,n),N(this,Yi,-2)}pause(r){r&&N(this,Yi,-2),super.pause(r)}async _poll(r,n){const s=await n.getBlock(S(this,yf));s!=null&&(S(this,Yi)===-2?N(this,Yi,s.number):s.number>S(this,Yi)&&(n.emit(S(this,yf),s.number),N(this,Yi,s.number)))}}yf=new WeakMap,Yi=new WeakMap;var V0;class pie extends UC{constructor(r,n){super(r);W(this,V0,void 0);N(this,V0,d2(n))}async _poll(r,n){throw new Error("@TODO")}}V0=new WeakMap;var vf;class yie extends UC{constructor(r,n){super(r);W(this,vf,void 0);N(this,vf,n)}async _poll(r,n){const s=await n.getTransactionReceipt(S(this,vf));s&&n.emit(S(this,vf),s)}}vf=new WeakMap;var Ji,mf,gf,na,ts,$0,mD;class VC{constructor(e,r){W(this,$0);W(this,Ji,void 0);W(this,mf,void 0);W(this,gf,void 0);W(this,na,void 0);W(this,ts,void 0);N(this,Ji,e),N(this,mf,d2(r)),N(this,gf,ee(this,$0,mD).bind(this)),N(this,na,!1),N(this,ts,-2)}start(){S(this,na)||(N(this,na,!0),S(this,ts)===-2&&S(this,Ji).getBlockNumber().then(e=>{N(this,ts,e)}),S(this,Ji).on("block",S(this,gf)))}stop(){S(this,na)&&(N(this,na,!1),S(this,Ji).off("block",S(this,gf)))}pause(e){this.stop(),e&&N(this,ts,-2)}resume(){this.start()}}Ji=new WeakMap,mf=new WeakMap,gf=new WeakMap,na=new WeakMap,ts=new WeakMap,$0=new WeakSet,mD=async function(e){if(S(this,ts)===-2)return;const r=d2(S(this,mf));r.fromBlock=S(this,ts)+1,r.toBlock=e;const n=await S(this,Ji).getLogs(r);if(n.length===0){S(this,ts){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const s=Object.keys(n);return s.sort(),s.reduce((i,o)=>(i[o]=n[o],i),{})}return n})}class gD{constructor(e){G(this,"name");me(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function gie(t){return JSON.parse(JSON.stringify(t))}function h2(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function _x(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(vt(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:av("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:av("orphan",r),filter:gie(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(s=>s==null?null:Array.isArray(s)?h2(s.map(i=>i.toLowerCase())):s.toLowerCase())};if(r.address){const s=[],i=[],o=a=>{vt(a)?s.push(a):i.push((async()=>{s.push(await wr(a,e))})())};Array.isArray(r.address)?r.address.forEach(o):o(r.address),i.length&&await Promise.all(i),n.address=h2(s.map(a=>a.toLowerCase()))}return{filter:n,tag:av("event",n),type:"event"}}M(!1,"unknown ProviderEvent","event",t)}function Nx(){return new Date().getTime()}const xie={cacheTimeout:250,pollingInterval:4e3};var Lr,sa,jr,xf,Rn,Vc,ia,Xi,jp,rs,bf,wf,Jr,Cn,Bp,p2,Fp,y2,$c,eh,Up,v2,zc,th,Ef,cv;class bie{constructor(e,r){W(this,Jr);W(this,Bp);W(this,Fp);W(this,$c);W(this,Up);W(this,zc);W(this,Ef);W(this,Lr,void 0);W(this,sa,void 0);W(this,jr,void 0);W(this,xf,void 0);W(this,Rn,void 0);W(this,Vc,void 0);W(this,ia,void 0);W(this,Xi,void 0);W(this,jp,void 0);W(this,rs,void 0);W(this,bf,void 0);W(this,wf,void 0);if(N(this,wf,Object.assign({},xie,r||{})),e==="any")N(this,Vc,!0),N(this,Rn,null);else if(e){const n=pi.from(e);N(this,Vc,!1),N(this,Rn,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else N(this,Vc,!1),N(this,Rn,null);N(this,Xi,-1),N(this,ia,new Map),N(this,Lr,new Map),N(this,sa,new Map),N(this,jr,null),N(this,xf,!1),N(this,jp,1),N(this,rs,new Map),N(this,bf,!1)}get pollingInterval(){return S(this,wf).pollingInterval}get provider(){return this}get plugins(){return Array.from(S(this,sa).values())}attachPlugin(e){if(S(this,sa).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return S(this,sa).set(e.name,e.connect(this)),this}getPlugin(e){return S(this,sa).get(e)||null}get disableCcipRead(){return S(this,bf)}set disableCcipRead(e){N(this,bf,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:f}}),o.push(f)}J(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,r){return new Fse(sie(e),this)}_wrapLog(e,r){return new by(rie(e),this)}_wrapTransactionReceipt(e,r){return new nD(cie(e),this)}_wrapTransactionResponse(e,r){return new cp(vD(e),this)}_detectNetwork(){J(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){J(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=_e(await ee(this,Jr,Cn).call(this,{method:"getBlockNumber"}),"%response");return S(this,Xi)>=0&&N(this,Xi,e),e}_getAddress(e){return wr(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(vt(e))return vt(e,32)?e:yu(e);if(typeof e=="bigint"&&(e=_e(e,"blockTag")),typeof e=="number")return e>=0?yu(e):S(this,Xi)>=0?yu(S(this,Xi)+e):this.getBlockNumber().then(r=>yu(r+e));M(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?h2(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,s=(c,l,u)=>{let f;switch(c.length){case 0:break;case 1:f=c[0];break;default:c.sort(),f=c}if(n&&(l!=null||u!=null))throw new Error("invalid filter");const d={};return f&&(d.address=f),r.length&&(d.topics=r),l&&(d.fromBlock=l),u&&(d.toBlock=u),n&&(d.blockHash=n),d};let i=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)i.push(this._getAddress(c));else i.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),i.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(i),o,a]).then(c=>s(c[0],c[1],c[2])):s(i,o,a)}_getTransactionRequest(e){const r=ap(e),n=[];if(["to","from"].forEach(s=>{if(r[s]==null)return;const i=wr(r[s],this);w1(i)?n.push(async function(){r[s]=await i}()):r[s]=i}),r.blockTag!=null){const s=this._getBlockTag(r.blockTag);w1(s)?n.push(async function(){r.blockTag=await s}()):r.blockTag=s}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(S(this,Rn)==null){const s=(async()=>{try{const i=await this._detectNetwork();return this.emit("network",i,null),i}catch(i){throw S(this,Rn)===s&&N(this,Rn,null),i}})();return N(this,Rn,s),(await s).clone()}const e=S(this,Rn),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(S(this,Vc)?(this.emit("network",n,r),S(this,Rn)===e&&N(this,Rn,Promise.resolve(n))):J(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:s,gasPrice:i,priorityFee:o}=await Fr({_block:ee(this,Up,v2).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ee(this,Jr,Cn).call(this,{method:"getGasPrice"});return ye(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ee(this,Jr,Cn).call(this,{method:"getPriorityFee"});return ye(u,"%response")}catch{}return null})()});let a=null,c=null;const l=this._wrapBlock(s,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*vie+c),new m3(i,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const s=new xo(n.url),i=await n.processFunc(r,this,s);return new m3(i.gasPrice,i.maxFeePerGas,i.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return w1(r)&&(r=await r),ye(await ee(this,Jr,Cn).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await Fr({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ee(this,Fp,y2).call(this,ee(this,Bp,p2).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return ye(await ee(this,$c,eh).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return _e(await ee(this,$c,eh).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return ne(await ee(this,$c,eh).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const s=ye(r,"position");return ne(await ee(this,$c,eh).call(this,{method:"getStorage",position:s},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:s}=await Fr({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=sp.from(e);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,s).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:s}=await Fr({network:this.getNetwork(),params:ee(this,Up,v2).call(this,e,!!r)});return s==null?null:this._wrapBlock(s,n)}async getTransaction(e){const{network:r,params:n}=await Fr({network:this.getNetwork(),params:ee(this,Jr,Cn).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await Fr({network:this.getNetwork(),params:ee(this,Jr,Cn).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const s=await ee(this,Jr,Cn).call(this,{method:"getTransaction",hash:e});if(s==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=s.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await Fr({network:this.getNetwork(),result:ee(this,Jr,Cn).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:ne(r)}async getLogs(e){let r=this._getFilter(e);w1(r)&&(r=await r);const{network:n,params:s}=await Fr({network:this.getNetwork(),params:ee(this,Jr,Cn).call(this,{method:"getLogs",filter:r})});return s.map(i=>this._wrapLog(i,n))}_getProvider(e){J(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await g0.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=Xe(e);const r=o2(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await g0.getEnsAddress(this),i=await new Mu(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(i==null||i===vl)return null;const a=await new Mu(i,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(a)!==e?null:a}catch(n){if(Vr(n,"BAD_DATA")&&n.value==="0x"||Vr(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const s=r??1;return s===0?this.getTransactionReceipt(e):new Promise(async(i,o)=>{let a=null;const c=async l=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&l-u.blockNumber+1>=s){i(u),a&&(clearTimeout(a),a=null);return}}catch(u){console.log("EEE",u)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(Lt("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){J(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=S(this,rs).get(e);r&&(r.timer&&clearTimeout(r.timer),S(this,rs).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=Ed(this,jp)._++,s=()=>{S(this,rs).delete(n),e()};if(this.paused)S(this,rs).set(n,{timer:null,func:s,time:r});else{const i=setTimeout(s,r);S(this,rs).set(n,{timer:i,func:s,time:Nx()})}return n}_forEachSubscriber(e){for(const r of S(this,Lr).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new gD(e.type);case"block":{const r=new die(this);return r.pollingInterval=this.pollingInterval,r}case"safe":case"finalized":return new hie(this,e.type);case"event":return new VC(this,e.filter);case"transaction":return new yie(this,e.hash);case"orphan":return new pie(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of S(this,Lr).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),S(this,jr)!=null&&r.pause(S(this,jr));break}}async on(e,r){const n=await ee(this,Ef,cv).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,S(this,jr)!=null&&n.subscriber.pause(S(this,jr))),this}async once(e,r){const n=await ee(this,Ef,cv).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,S(this,jr)!=null&&n.subscriber.pause(S(this,jr))),this}async emit(e,...r){const n=await ee(this,zc,th).call(this,e,r);if(!n||n.listeners.length===0)return!1;const s=n.listeners.length;return n.listeners=n.listeners.filter(({listener:i,once:o})=>{const a=new d7(this,o?null:i,e);try{i.call(this,...r,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),S(this,Lr).delete(n.tag)),s>0}async listenerCount(e){if(e){const n=await ee(this,zc,th).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of S(this,Lr).values())r+=n.length;return r}async listeners(e){if(e){const n=await ee(this,zc,th).call(this,e);return n?n.listeners.map(({listener:s})=>s):[]}let r=[];for(const{listeners:n}of S(this,Lr).values())r=r.concat(n.map(({listener:s})=>s));return r}async off(e,r){const n=await ee(this,zc,th).call(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),S(this,Lr).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:s}=await ee(this,Ef,cv).call(this,e);n&&s.stop(),S(this,Lr).delete(r)}else for(const[r,{started:n,subscriber:s}]of S(this,Lr))n&&s.stop(),S(this,Lr).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return S(this,xf)}destroy(){this.removeAllListeners();for(const e of S(this,rs).keys())this._clearTimeout(e);N(this,xf,!0)}get paused(){return S(this,jr)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(N(this,Xi,-1),S(this,jr)!=null){if(S(this,jr)==!!e)return;J(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),N(this,jr,!!e);for(const r of S(this,rs).values())r.timer&&clearTimeout(r.timer),r.time=Nx()-r.time}resume(){if(S(this,jr)!=null){this._forEachSubscriber(e=>e.resume()),N(this,jr,null);for(const e of S(this,rs).values()){let r=e.time;r<0&&(r=0),e.time=Nx(),setTimeout(e.func,r)}}}}Lr=new WeakMap,sa=new WeakMap,jr=new WeakMap,xf=new WeakMap,Rn=new WeakMap,Vc=new WeakMap,ia=new WeakMap,Xi=new WeakMap,jp=new WeakMap,rs=new WeakMap,bf=new WeakMap,wf=new WeakMap,Jr=new WeakSet,Cn=async function(e){const r=S(this,wf).cacheTimeout;if(r<0)return await this._perform(e);const n=av(e.method,e);let s=S(this,ia).get(n);return s||(s=this._perform(e),S(this,ia).set(n,s),setTimeout(()=>{S(this,ia).get(n)===s&&S(this,ia).delete(n)},r)),await s},Bp=new WeakSet,p2=async function(e,r,n){J(n=0&&r==="latest"&&s.to!=null&&xt(i.data,0,4)==="0x556f1830"){const o=i.data,a=await wr(s.to,this);let c;try{c=Aie(xt(i.data,4))}catch(f){J(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:s,info:{data:o}})}J(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:s,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const l=await this.ccipReadFetch(s,c.calldata,c.urls);J(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:s,info:{data:i.data,errorArgs:c.errorArgs}});const u={to:a,data:ot([c.selector,Cie([l,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{const f=await ee(this,Bp,p2).call(this,u,r,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:f}),f}}throw i}},Fp=new WeakSet,y2=async function(e){const{value:r}=await Fr({network:this.getNetwork(),value:e});return r},$c=new WeakSet,eh=async function(e,r,n){let s=this._getAddress(r),i=this._getBlockTag(n);return(typeof s!="string"||typeof i!="string")&&([s,i]=await Promise.all([s,i])),await ee(this,Fp,y2).call(this,ee(this,Jr,Cn).call(this,Object.assign(e,{address:s,blockTag:i})))},Up=new WeakSet,v2=async function(e,r){if(vt(e,32))return await ee(this,Jr,Cn).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await ee(this,Jr,Cn).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},zc=new WeakSet,th=async function(e,r){let n=await _x(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await _x({orphan:"drop-log",log:r[0]},this)),S(this,Lr).get(n.tag)||null},Ef=new WeakSet,cv=async function(e){const r=await _x(e,this),n=r.tag;let s=S(this,Lr).get(n);return s||(s={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},S(this,Lr).set(n,s)),s};function wie(t,e){try{const r=m2(t,e);if(r)return u0(r)}catch{}return null}function m2(t,e){if(t==="0x")return null;try{const r=_e(xt(t,e,e+32)),n=_e(xt(t,r,r+32));return xt(t,r+32,r+32+n)}catch{}return null}function A3(t){const e=$r(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 Eie(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const Sie=new Uint8Array([]);function Cie(t){const e=[];let r=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=xt(t,0,32);J(xt(r,0,12)===xt(k3,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=xt(r,12);try{const n=[],s=_e(xt(t,32,64)),i=_e(xt(t,s,s+32)),o=xt(t,s+32);for(let a=0;ae[n]),e}function Ul(t,e){if(t.provider)return t.provider;J(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function T3(t,e){let r=ap(e);if(r.to!=null&&(r.to=wr(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),wr(n,t)]).then(([s,i])=>(M(s.toLowerCase()===i.toLowerCase(),"transaction from mismatch","tx.from",i),s))}else r.from=t.getAddress();return await Fr(r)}class $C{constructor(e){G(this,"provider");me(this,{provider:e||null})}async getNonce(e){return Ul(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await T3(this,e)}async populateTransaction(e){const r=Ul(this,"populateTransaction"),n=await T3(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const s=await this.provider.getNetwork();if(n.chainId!=null){const o=ye(n.chainId);M(o===s.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=s.chainId;const i=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||i)?M(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&i&&M(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await r.getFeeData();J(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await r.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(J(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):J(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await Fr(n)}async estimateGas(e){return Ul(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Ul(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Ul(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=Ul(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const s=sp.from(n);return await r.broadcastTransaction(await this.signTransaction(s))}}var Sf,lv;const Dk=class Dk extends $C{constructor(r,n){super(n);W(this,Sf);G(this,"address");me(this,{address:r})}async getAddress(){return this.address}connect(r){return new Dk(this.address,r)}async signTransaction(r){ee(this,Sf,lv).call(this,"transactions","signTransaction")}async signMessage(r){ee(this,Sf,lv).call(this,"messages","signMessage")}async signTypedData(r,n,s){ee(this,Sf,lv).call(this,"typed-data","signTypedData")}};Sf=new WeakSet,lv=function(r,n){J(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let g2=Dk;function kie(t){return JSON.parse(JSON.stringify(t))}var Xr,si,Hc,oa,Gc,Cf,Vp,x2,$p,b2;class xD{constructor(e){W(this,Vp);W(this,$p);W(this,Xr,void 0);W(this,si,void 0);W(this,Hc,void 0);W(this,oa,void 0);W(this,Gc,void 0);W(this,Cf,void 0);N(this,Xr,e),N(this,si,null),N(this,Hc,ee(this,Vp,x2).bind(this)),N(this,oa,!1),N(this,Gc,null),N(this,Cf,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){S(this,oa)||(N(this,oa,!0),ee(this,Vp,x2).call(this,-2))}stop(){S(this,oa)&&(N(this,oa,!1),N(this,Cf,!0),ee(this,$p,b2).call(this),S(this,Xr).off("block",S(this,Hc)))}pause(e){e&&ee(this,$p,b2).call(this),S(this,Xr).off("block",S(this,Hc))}resume(){this.start()}}Xr=new WeakMap,si=new WeakMap,Hc=new WeakMap,oa=new WeakMap,Gc=new WeakMap,Cf=new WeakMap,Vp=new WeakSet,x2=async function(e){try{S(this,si)==null&&N(this,si,this._subscribe(S(this,Xr)));let r=null;try{r=await S(this,si)}catch(i){if(!Vr(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(r==null){N(this,si,null),S(this,Xr)._recoverSubscriber(this,this._recover(S(this,Xr)));return}const n=await S(this,Xr).getNetwork();if(S(this,Gc)||N(this,Gc,n),S(this,Gc).chainId!==n.chainId)throw new Error("chaid changed");if(S(this,Cf))return;const s=await S(this,Xr).send("eth_getFilterChanges",[r]);await this._emitResults(S(this,Xr),s)}catch(r){console.log("@TODO",r)}S(this,Xr).once("block",S(this,Hc))},$p=new WeakSet,b2=function(){const e=S(this,si);e&&(N(this,si,null),e.then(r=>{S(this,Xr).destroyed||S(this,Xr).send("eth_uninstallFilter",[r])}))};var qc;class Tie extends xD{constructor(r,n){super(r);W(this,qc,void 0);N(this,qc,kie(n))}_recover(r){return new VC(r,S(this,qc))}async _subscribe(r){return await r.send("eth_newFilter",[S(this,qc)])}async _emitResults(r,n){for(const s of n)r.emit(S(this,qc),r._wrapLog(s,r._network))}}qc=new WeakMap;class Pie extends xD{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const Rie="bigint,boolean,function,number,string,symbol".split(/,/g);function uv(t){if(t==null||Rie.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(uv);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function Iie(t){return new Promise(e=>{setTimeout(e,t)})}function Vl(t){return t&&t.toLowerCase()}function P3(t){return t&&typeof t.pollingInterval=="number"}const bD={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class Mx extends $C{constructor(r,n){super(r);G(this,"address");n=Xe(n),me(this,{address:n})}connect(r){J(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(r){return await this.populateCall(r)}async sendUncheckedTransaction(r){const n=uv(r),s=[];if(n.from){const o=n.from;s.push((async()=>{const a=await wr(o,this.provider);M(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=a})())}else n.from=this.address;if(n.gasLimit==null&&s.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;s.push((async()=>{n.to=await wr(o,this.provider)})())}s.length&&await Promise.all(s);const i=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(r){const n=await this.provider.getBlockNumber(),s=await this.sendUncheckedTransaction(r);return await new Promise((i,o)=>{const a=[1e3,100];let c=0;const l=async()=>{try{const u=await this.provider.getTransaction(s);if(u!=null){i(u.replaceableTransaction(n));return}}catch(u){if(Vr(u,"CANCELLED")||Vr(u,"BAD_DATA")||Vr(u,"NETWORK_ERROR")){u.info==null&&(u.info={}),u.info.sendTransactionHash=s,o(u);return}if(Vr(u,"INVALID_ARGUMENT")&&(c++,u.info==null&&(u.info={}),u.info.sendTransactionHash=s,c>10)){o(u);return}this.provider.emit("error",Lt("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:u}))}this.provider._setTimeout(()=>{l()},a.pop()||4e3)};l()})}async signTransaction(r){const n=uv(r);if(n.from){const i=await wr(n.from,this.provider);M(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=i}else n.from=this.address;const s=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[s])}async signMessage(r){const n=typeof r=="string"?Sr(r):r;return await this.provider.send("personal_sign",[ne(n),this.address.toLowerCase()])}async signTypedData(r,n,s){const i=uv(s),o=await Kf.resolveNames(r,n,i,async a=>{const c=await wr(a);return M(c!=null,"TypedData does not support null address","value",a),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(Kf.getPayload(o.domain,n,o.value))])}async unlock(r){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),r,null])}async _legacySignMessage(r){const n=typeof r=="string"?Sr(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),ne(n)])}}var Wc,Af,Zi,ii,Rs,ns,fn,zp,w2;class Oie extends bie{constructor(r,n){super(r,n);W(this,zp);W(this,Wc,void 0);W(this,Af,void 0);W(this,Zi,void 0);W(this,ii,void 0);W(this,Rs,void 0);W(this,ns,void 0);W(this,fn,void 0);N(this,Af,1),N(this,Wc,Object.assign({},bD,n||{})),N(this,Zi,[]),N(this,ii,null),N(this,ns,null),N(this,fn,null);{let i=null;const o=new Promise(a=>{i=a});N(this,Rs,{promise:o,resolve:i})}const s=this._getOption("staticNetwork");typeof s=="boolean"?(M(!s||r!=="any","staticNetwork cannot be used on special network 'any'","options",n),s&&r!=null&&N(this,ns,pi.from(r))):s&&(M(r==null||s.matches(r),"staticNetwork MUST match network object","options",n),N(this,ns,s))}_getOption(r){return S(this,Wc)[r]}get _network(){return J(S(this,ns),"network is not available yet","NETWORK_ERROR"),S(this,ns)}async _perform(r){if(r.method==="call"||r.method==="estimateGas"){let s=r.transaction;if(s&&s.type!=null&&ye(s.type)&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=Object.assign({},r,{transaction:Object.assign({},s,{type:void 0})}))}}const n=this.getRpcRequest(r);return n!=null?await this.send(n.method,n.args):super._perform(r)}async _detectNetwork(){const r=this._getOption("staticNetwork");if(r)if(r===!0){if(S(this,ns))return S(this,ns)}else return r;return S(this,fn)?await S(this,fn):this.ready?(N(this,fn,(async()=>{try{const n=pi.from(ye(await this.send("eth_chainId",[])));return N(this,fn,null),n}catch(n){throw N(this,fn,null),n}})()),await S(this,fn)):(N(this,fn,(async()=>{const n={id:Ed(this,Af)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let s;try{s=(await this._send(n))[0],N(this,fn,null)}catch(i){throw N(this,fn,null),this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:s}),"result"in s)return pi.from(ye(s.result));throw this.getRpcError(n,s)})()),await S(this,fn))}_start(){S(this,Rs)==null||S(this,Rs).resolve==null||(S(this,Rs).resolve(),N(this,Rs,null),(async()=>{for(;S(this,ns)==null&&!this.destroyed;)try{N(this,ns,await this._detectNetwork())}catch(r){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Lt("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:r}})),await Iie(1e3)}ee(this,zp,w2).call(this)})())}async _waitUntilReady(){if(S(this,Rs)!=null)return await S(this,Rs).promise}_getSubscriber(r){return r.type==="pending"?new Pie(this):r.type==="event"?this._getOption("polling")?new VC(this,r.filter):new Tie(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new gD("orphan"):super._getSubscriber(r)}get ready(){return S(this,Rs)==null}getRpcTransaction(r){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(s=>{if(r[s]==null)return;let i=s;s==="gasLimit"&&(i="gas"),n[i]=yu(ye(r[s],`tx.${s}`))}),["from","to","data"].forEach(s=>{r[s]!=null&&(n[s]=ne(r[s]))}),r.accessList&&(n.accessList=Pl(r.accessList)),r.blobVersionedHashes&&(n.blobVersionedHashes=r.blobVersionedHashes.map(s=>s.toLowerCase())),n}getRpcRequest(r){switch(r.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Vl(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Vl(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[Vl(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Vl(r.address),"0x"+r.position.toString(16),r.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[r.signedTransaction]};case"getBlock":if("blockTag"in r)return{method:"eth_getBlockByNumber",args:[r.blockTag,!!r.includeTransactions]};if("blockHash"in r)return{method:"eth_getBlockByHash",args:[r.blockHash,!!r.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[r.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[r.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(r.transaction),r.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(r.transaction)]};case"getLogs":return r.filter&&r.filter.address!=null&&(Array.isArray(r.filter.address)?r.filter.address=r.filter.address.map(Vl):r.filter.address=Vl(r.filter.address)),{method:"eth_getLogs",args:[r.filter]}}return null}getRpcError(r,n){const{method:s}=r,{error:i}=n;if(s==="eth_estimateGas"&&i.message){const c=i.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return Lt("insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.params[0],info:{payload:r,error:i}})}if(s==="eth_call"||s==="eth_estimateGas"){const c=E2(i),l=op.getBuiltinCallException(s==="eth_call"?"call":"estimateGas",r.params[0],c?c.data:null);return l.info={error:i,payload:r},l}const o=JSON.stringify(Nie(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return Lt("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[s]||"unknown",reason:"rejected",info:{payload:r,error:i}});if(s==="eth_sendRawTransaction"||s==="eth_sendTransaction"){const c=r.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return Lt("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return Lt("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return Lt("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:i}});if(o.match(/only replay-protected/i))return Lt("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:s,info:{transaction:c,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?Lt("unsupported operation","UNSUPPORTED_OPERATION",{operation:r.method,info:{error:i,payload:r}}):Lt("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:r})}send(r,n){if(this.destroyed)return Promise.reject(Lt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r}));const s=Ed(this,Af)._++,i=new Promise((o,a)=>{S(this,Zi).push({resolve:o,reject:a,payload:{method:r,params:n,id:s,jsonrpc:"2.0"}})});return ee(this,zp,w2).call(this),i}async getSigner(r){r==null&&(r=0);const n=this.send("eth_accounts",[]);if(typeof r=="number"){const i=await n;if(r>=i.length)throw new Error("no such account");return new Mx(this,i[r])}const{accounts:s}=await Fr({network:this.getNetwork(),accounts:n});r=Xe(r);for(const i of s)if(Xe(i)===r)return new Mx(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new Mx(this,n))}destroy(){S(this,ii)&&(clearTimeout(S(this,ii)),N(this,ii,null));for(const{payload:r,reject:n}of S(this,Zi))n(Lt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));N(this,Zi,[]),super.destroy()}}Wc=new WeakMap,Af=new WeakMap,Zi=new WeakMap,ii=new WeakMap,Rs=new WeakMap,ns=new WeakMap,fn=new WeakMap,zp=new WeakSet,w2=function(){if(S(this,ii))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");N(this,ii,setTimeout(()=>{N(this,ii,null);const n=S(this,Zi);for(N(this,Zi,[]);n.length;){const s=[n.shift()];for(;n.length&&s.length!==S(this,Wc).batchMaxCount;)if(s.push(n.shift()),JSON.stringify(s.map(o=>o.payload)).length>S(this,Wc).batchMaxSize){n.unshift(s.pop());break}(async()=>{const i=s.length===1?s[0].payload:s.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const o=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:c,payload:l}of s){if(this.destroyed){c(Lt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:l.method}));continue}const u=o.filter(f=>f.id===l.id)[0];if(u==null){const f=Lt("missing response for request","BAD_DATA",{value:o,info:{payload:l}});this.emit("error",f),c(f);continue}if("error"in u){c(this.getRpcError(l,u));continue}a(u.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of s)a(o)}})()}},r))};var aa;class _ie extends Oie{constructor(r,n){super(r,n);W(this,aa,void 0);let s=this._getOption("pollingInterval");s==null&&(s=bD.pollingInterval),N(this,aa,s)}_getSubscriber(r){const n=super._getSubscriber(r);return P3(n)&&(n.pollingInterval=S(this,aa)),n}get pollingInterval(){return S(this,aa)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");N(this,aa,r),this._forEachSubscriber(n=>{P3(n)&&(n.pollingInterval=S(this,aa))})}}aa=new WeakMap;var kf,J8;let wD=(J8=class extends _ie{constructor(r,n,s){r==null&&(r="http://localhost:8545");super(n,s);W(this,kf,void 0);typeof r=="string"?N(this,kf,new xo(r)):N(this,kf,r.clone())}_getConnection(){return S(this,kf).clone()}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){const n=this._getConnection();n.body=JSON.stringify(r),n.setHeader("content-type","application/json");const s=await n.send();s.assertOk();let i=s.bodyJson;return Array.isArray(i)||(i=[i]),i}},kf=new WeakMap,J8);function E2(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&vt(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=E2(t[e]);if(r)return r}return null}if(typeof t=="string")try{return E2(JSON.parse(t))}catch{}return null}function S2(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)S2(t[r],e);if(typeof t=="string")try{return S2(JSON.parse(t),e)}catch{}}}function Nie(t){const e=[];return S2(t,e),e}var Tf;const Lk=class Lk extends $C{constructor(r,n){super(n);G(this,"address");W(this,Tf,void 0);M(r&&typeof r.sign=="function","invalid private key","privateKey","[ REDACTED ]"),N(this,Tf,r);const s=gy(this.signingKey.publicKey);me(this,{address:s})}get signingKey(){return S(this,Tf)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(r){return new Lk(S(this,Tf),r)}async signTransaction(r){r=ap(r);const{to:n,from:s}=await Fr({to:r.to?wr(r.to,this.provider):void 0,from:r.from?wr(r.from,this.provider):void 0});n!=null&&(r.to=n),s!=null&&(r.from=s),r.from!=null&&(M(Xe(r.from)===this.address,"transaction from address mismatch","tx.from",r.from),delete r.from);const i=sp.from(r);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(r){return this.signMessageSync(r)}signMessageSync(r){return this.signingKey.sign(pse(r)).serialized}async signTypedData(r,n,s){const i=await Kf.resolveNames(r,n,s,async o=>{J(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:o}});const a=await this.provider.resolveName(o);return J(a!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:o}),a});return this.signingKey.sign(Kf.hash(i.domain,n,i.value)).serialized}};Tf=new WeakMap;let x0=Lk;const b0=" !#$%&'()*+,-./<=>?@[]^_`{|}~",Mie=/^[a-z]*$/i;function R3(t,e){let r=97;return t.reduce((n,s)=>(s===e?r++:s.match(Mie)?n.push(String.fromCharCode(r)+s):(r=97,n.push(s)),n),[])}function Die(t,e){for(let s=b0.length-1;s>=0;s--)t=t.split(b0[s]).join(e.substring(2*s,2*s+2));const r=[],n=t.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(s,i,o,a)=>{if(o)for(let c=parseInt(o);c>=0;c--)r.push(";");else r.push(i.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return R3(R3(r,";"),":")}function Lie(t){return M(t[0]==="0","unsupported auwl data","data",t),Die(t.substring(1+2*b0.length),t.substring(1,1+2*b0.length))}class jie{constructor(e){G(this,"locale");me(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var Pf,Hp,Kc,Gp,C2;class Bie extends jie{constructor(r,n,s){super(r);W(this,Gp);W(this,Pf,void 0);W(this,Hp,void 0);W(this,Kc,void 0);N(this,Pf,n),N(this,Hp,s),N(this,Kc,null)}get _data(){return S(this,Pf)}_decodeWords(){return Lie(S(this,Pf))}getWord(r){const n=ee(this,Gp,C2).call(this);return M(r>=0&&r=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*r.length/8));let s=0;for(let l=0;l=0,`invalid mnemonic word at index ${l}`,"mnemonic","[ REDACTED ]");for(let f=0;f<11;f++)u&1<<10-f&&(n[s>>3]|=1<<7-s%8),s++}const i=32*r.length/3,o=r.length/3,a=ED(o),c=fe(ys(n.slice(0,i/8)))[0]&a;return M(c===(n[n.length-1]&a),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),ne(n.slice(0,i/8))}function jx(t,e){M(t.length%4===0&&t.length>=16&&t.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=Na.wordlist());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]&Uie(8-n)),n+=3);const s=t.length/4,i=parseInt(ys(t).substring(2,4),16)&ED(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}const Bx={};class Yf{constructor(e,r,n,s,i){G(this,"phrase");G(this,"password");G(this,"wordlist");G(this,"entropy");s==null&&(s=""),i==null&&(i=Na.wordlist()),$a(e,Bx,"Mnemonic"),me(this,{phrase:n,password:s,wordlist:i,entropy:r})}computeSeed(){const e=Sr("mnemonic"+this.password,"NFKD");return za(Sr(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,r,n){const s=Lx(e,n);return e=jx(fe(s),n),new Yf(Bx,s,e,r,n)}static fromEntropy(e,r,n){const s=fe(e,"entropy"),i=jx(s,n);return new Yf(Bx,ne(s),i,r,n)}static entropyToPhrase(e,r){const n=fe(e,"entropy");return jx(n,r)}static phraseToEntropy(e,r){return Lx(e,r)}static isValidMnemonic(e,r){try{return Lx(e,r),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. */var hr=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Fx=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},fv,Qn,Ks;const Vie={16:10,24:12,32:14},$ie=[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],Wn=[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],E1=[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],zie=[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],Hie=[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],Gie=[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],qie=[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],Wie=[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],Kie=[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],Qie=[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],Yie=[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],Jie=[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],Xie=[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],Zie=[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],eoe=[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 Ux(t){const e=[];for(let r=0;r>2,hr(this,Ks,"f")[o][u%4]=i[u],hr(this,Qn,"f")[r-o][u%4]=i[u];let a=0,c=s,l;for(;c>16&255]<<24^Wn[l>>8&255]<<16^Wn[l&255]<<8^Wn[l>>24&255]^$ie[a]<<24,a+=1,s!=8)for(let h=1;h>8&255]<<8^Wn[l>>16&255]<<16^Wn[l>>24&255]<<24;for(let h=s/2+1;h>2,d=c%4,hr(this,Ks,"f")[f][d]=i[u],hr(this,Qn,"f")[r-f][d]=i[u++],c++}for(let u=1;u>24&255]^Xie[l>>16&255]^Zie[l>>8&255]^eoe[l&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const r=hr(this,Ks,"f").length-1,n=[0,0,0,0];let s=Ux(e);for(let a=0;a<4;a++)s[a]^=hr(this,Ks,"f")[0][a];for(let a=1;a>24&255]^Hie[s[(c+1)%4]>>16&255]^Gie[s[(c+2)%4]>>8&255]^qie[s[(c+3)%4]&255]^hr(this,Ks,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=hr(this,Ks,"f")[r][a],i[4*a]=(Wn[s[a]>>24&255]^o>>24)&255,i[4*a+1]=(Wn[s[(a+1)%4]>>16&255]^o>>16)&255,i[4*a+2]=(Wn[s[(a+2)%4]>>8&255]^o>>8)&255,i[4*a+3]=(Wn[s[(a+3)%4]&255]^o)&255;return i}decrypt(e){if(e.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const r=hr(this,Qn,"f").length-1,n=[0,0,0,0];let s=Ux(e);for(let a=0;a<4;a++)s[a]^=hr(this,Qn,"f")[0][a];for(let a=1;a>24&255]^Kie[s[(c+3)%4]>>16&255]^Qie[s[(c+2)%4]>>8&255]^Yie[s[(c+1)%4]&255]^hr(this,Qn,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=hr(this,Qn,"f")[r][a],i[4*a]=(E1[s[a]>>24&255]^o>>24)&255,i[4*a+1]=(E1[s[(a+3)%4]>>16&255]^o>>16)&255,i[4*a+2]=(E1[s[(a+2)%4]>>8&255]^o>>8)&255,i[4*a+3]=(E1[s[(a+1)%4]&255]^o)&255;return i}}fv=new WeakMap,Qn=new WeakMap,Ks=new WeakMap;class SD{constructor(e,r,n){if(n&&!(this instanceof n))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new zC(r)},name:{enumerable:!0,value:e}})}}var S1=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},$l=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},rh,Oi;class HC extends SD{constructor(e,r){if(super("ECC",e,HC),rh.set(this,void 0),Oi.set(this,void 0),r){if(r.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");S1(this,rh,new Uint8Array(r),"f")}else S1(this,rh,new Uint8Array(16),"f");S1(this,Oi,this.iv,"f")}get iv(){return new Uint8Array($l(this,rh,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const r=new Uint8Array(e.length);for(let n=0;nNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let r=15;r>=0;--r)Kn(this,Yn,"f")[r]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");Kn(this,Yn,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(Kn(this,Yn,"f")[e]===255)Kn(this,Yn,"f")[e]=0;else{Kn(this,Yn,"f")[e]++;break}}encrypt(e){var r,n;const s=new Uint8Array(e);for(let i=0;i16)throw new TypeError("PKCS#7 padding byte out of range");const r=t.length-e;for(let n=0;n0&&(n&n-1)===0,"invalid kdf.N","kdf.N",n),M(s>0&&i>0,"invalid kdf","kdf",e);const o=Ht(t,"crypto.kdfparams.dklen:int!");return M(o===32,"invalid kdf.dklen","kdf.dflen",o),{name:"scrypt",salt:r,N:n,r:s,p:i,dkLen:64}}else if(e.toLowerCase()==="pbkdf2"){const r=Ht(t,"crypto.kdfparams.salt:data!"),n=Ht(t,"crypto.kdfparams.prf:string!"),s=n.split("-").pop();M(s==="sha256"||s==="sha512","invalid kdf.pdf","kdf.pdf",n);const i=Ht(t,"crypto.kdfparams.c:int!"),o=Ht(t,"crypto.kdfparams.dklen:int!");return M(o===32,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:r,count:i,dkLen:o,algorithm:s}}}M(!1,"unsupported key-derivation function","kdf",e)}function noe(t,e){const r=JSON.parse(t),n=Sy(e),s=kD(r);if(s.name==="pbkdf2"){const{salt:f,count:d,dkLen:h,algorithm:p}=s,y=za(n,f,d,h,p);return w0(r,y)}J(s.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:i,N:o,r:a,p:c,dkLen:l}=s,u=vd(n,i,o,a,c,l);return w0(r,u)}function O3(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}async function soe(t,e,r){const n=JSON.parse(t),s=Sy(e),i=kD(n);if(i.name==="pbkdf2"){r&&(r(0),await O3(0));const{salt:d,count:h,dkLen:p,algorithm:y}=i,g=za(s,d,h,p,y);return r&&(r(1),await O3(0)),w0(n,g)}J(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:o,N:a,r:c,p:l,dkLen:u}=i,f=await yd(s,o,a,c,l,u,r);return w0(n,f)}function TD(t){const e=t.salt!=null?fe(t.salt,"options.salt"):co(32);let r=1<<17,n=8,s=1;return t.scrypt&&(t.scrypt.N&&(r=t.scrypt.N),t.scrypt.r&&(n=t.scrypt.r),t.scrypt.p&&(s=t.scrypt.p)),M(typeof r=="number"&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),M(typeof n=="number"&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),M(typeof s=="number"&&s>0&&Number.isSafeInteger(s),"invalid scrypt p parameter","options.p",s),{name:"scrypt",dkLen:32,salt:e,N:r,r:n,p:s}}function PD(t,e,r,n){const s=fe(r.privateKey,"privateKey"),i=n.iv!=null?fe(n.iv,"options.iv"):co(16);M(i.length===16,"invalid options.iv length","options.iv",n.iv);const o=n.uuid!=null?fe(n.uuid,"options.uuid"):co(16);M(o.length===16,"invalid options.uuid length","options.uuid",n.iv);const a=t.slice(0,16),c=t.slice(16,32),l=new Jf(a,i),u=fe(l.encrypt(s)),f=Ct(ot([c,u])),d={address:r.address.substring(2).toLowerCase(),id:lte(o),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:ne(i).substring(2)},ciphertext:ne(u).substring(2),kdf:"scrypt",kdfparams:{salt:ne(e.salt).substring(2),n:e.N,dklen:32,p:e.p,r:e.r},mac:f.substring(2)}};if(r.mnemonic){const h=n.client!=null?n.client:`ethers/${i7}`,p=r.mnemonic.path||AD,y=r.mnemonic.locale||"en",g=t.slice(32,64),m=fe(r.mnemonic.entropy,"account.mnemonic.entropy"),x=co(16),b=new Jf(g,x),w=fe(b.encrypt(m)),A=new Date,_="UTC--"+(A.getUTCFullYear()+"-"+Ud(A.getUTCMonth()+1,2)+"-"+Ud(A.getUTCDate(),2)+"T"+Ud(A.getUTCHours(),2)+"-"+Ud(A.getUTCMinutes(),2)+"-"+Ud(A.getUTCSeconds(),2)+".0Z")+"--"+d.address;d["x-ethers"]={client:h,gethFilename:_,path:p,locale:y,mnemonicCounter:ne(x).substring(2),mnemonicCiphertext:ne(w).substring(2),version:"0.1"}}return JSON.stringify(d)}function RD(t,e,r){r==null&&(r={});const n=Sy(e),s=TD(r),i=vd(n,s.salt,s.N,s.r,s.p,64);return PD(fe(i),s,t,r)}async function ID(t,e,r){r==null&&(r={});const n=Sy(e),s=TD(r),i=await yd(n,s.salt,s.N,s.r,s.p,64,r.progressCallback);return PD(fe(i),s,t,r)}const Vx="m/44'/60'/0'/0/0",ioe=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),Sa=2147483648,ooe=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),aoe="0123456789abcdef";function E0(t,e){let r="";for(;t;)r=aoe[t%16]+r,t=Math.trunc(t/16);for(;r.length=0;o-=8)s[33+(o>>3)]=t>>24-o&255;const i=fe(hd("sha512",e,s));return{IL:i.slice(0,32),IR:i.slice(32)}}function _D(t,e){const r=e.split("/");M(r.length>0,"invalid path","path",e),r[0]==="m"&&(M(t.depth===0,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${t.depth}`,"path",e),r.shift());let n=t;for(let s=0;s=16&&s.length<=64,"invalid seed","seed","[REDACTED]");const i=fe(hd("sha512",ioe,s)),o=new gi(ne(i.slice(0,32)));return new ws(Js,o,"0x00000000",ne(i.slice(32)),"m",0,0,n,null)},W(ws,Qc);let bh=ws;class lp extends g2{constructor(r,n,s,i,o,a,c,l,u){super(n,u);G(this,"publicKey");G(this,"fingerprint");G(this,"parentFingerprint");G(this,"chainCode");G(this,"path");G(this,"index");G(this,"depth");$a(r,Js,"HDNodeVoidWallet"),me(this,{publicKey:s});const f=xt(pd(ys(s)),0,4);me(this,{publicKey:s,fingerprint:f,parentFingerprint:i,chainCode:o,path:a,index:c,depth:l})}connect(r){return new lp(Js,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,r)}get extendedKey(){return J(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),A2(ot(["0x0488B21E",E0(this.depth,1),this.parentFingerprint,E0(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(r){const n=_e(r,"index");M(n<=4294967295,"invalid index","index",n);let s=this.path;s&&(s+="/"+(n&~Sa),n&Sa&&(s+="'"));const{IR:i,IL:o}=OD(n,this.chainCode,this.publicKey,null),a=gi.addPoints(o,this.publicKey,!0),c=gy(a);return new lp(Js,c,a,this.fingerprint,ne(i),s,n,this.depth+1,this.provider)}derivePath(r){return _D(this,r)}}function _3(t){try{if(JSON.parse(t).encseed)return!0}catch{}return!1}function N3(t,e){const r=JSON.parse(t),n=Sy(e),s=Xe(Ht(r,"ethaddr:string!")),i=CD(Ht(r,"encseed:string!"));M(i&&i.length%16===0,"invalid encseed","json",t);const o=fe(za(n,n,2e3,32,"sha256")).slice(0,16),a=i.slice(0,16),c=i.slice(16),l=new HC(o,a),u=toe(fe(l.decrypt(c)));let f="";for(let d=0;d{setTimeout(()=>{e()},t)})}var Wp,T2;const pc=class pc extends x0{constructor(e,r){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new gi(e):e;super(n,r)}connect(e){return new pc(this.signingKey,e)}async encrypt(e,r){const n={address:this.address,privateKey:this.privateKey};return await ID(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return RD(r,e)}static async fromEncryptedJson(e,r,n){var i;let s=null;return I3(e)?s=await soe(e,r,n):_3(e)&&(n&&(n(0),await M3(0)),s=N3(e,r),n&&(n(1),await M3(0))),ee(i=pc,Wp,T2).call(i,s)}static fromEncryptedJsonSync(e,r){var s;let n=null;return I3(e)?n=noe(e,r):_3(e)?n=N3(e,r):M(!1,"invalid JSON wallet","json","[ REDACTED ]"),ee(s=pc,Wp,T2).call(s,n)}static createRandom(e){const r=bh.createRandom();return e?r.connect(e):r}static fromPhrase(e,r){const n=bh.fromPhrase(e);return r?n.connect(r):n}};Wp=new WeakSet,T2=function(e){if(M(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=Yf.fromEntropy(e.mnemonic.entropy),s=bh.fromMnemonic(n,e.mnemonic.path);if(s.address===e.address&&s.privateKey===e.privateKey)return s;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const r=new pc(e.privateKey);return M(r.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),r},W(pc,Wp);let up=pc;const coe={en:Na.wordlist()};BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const GC=t=>{const e=t.toString(16);return`${e.length%2===0?"0x":"0x0"}${e}`};function P2(){return P2=Object.assign?Object.assign.bind():function(t){for(var e=1;e0&&(e+=","),e+=JSON.stringify(i),e+=":",r(s[i])}}let K=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.B3_SEPOLIA=1993]="B3_SEPOLIA",t[t.APECHAIN_TESTNET=33111]="APECHAIN_TESTNET",t[t.BLAST=81457]="BLAST",t[t.BLAST_SEPOLIA=168587773]="BLAST_SEPOLIA",t[t.BORNE_TESTNET=94984]="BORNE_TESTNET",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t}({}),Fe=function(t){return t.MAINNET="mainnet",t.TESTNET="testnet",t}({});const S0={[K.MAINNET]:{chainId:K.MAINNET,type:Fe.MAINNET,name:"mainnet",title:"Ethereum",logoURI:`https://assets.sequence.info/images/networks/medium/${K.MAINNET}.webp`,blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[K.ROPSTEN]:{chainId:K.ROPSTEN,type:Fe.TESTNET,name:"ropsten",title:"Ropsten",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.RINKEBY]:{chainId:K.RINKEBY,type:Fe.TESTNET,name:"rinkeby",title:"Rinkeby",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.GOERLI]:{chainId:K.GOERLI,type:Fe.TESTNET,name:"goerli",title:"Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.KOVAN]:{chainId:K.KOVAN,type:Fe.TESTNET,name:"kovan",title:"Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${K.KOVAN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"},nativeToken:{symbol:"kETH",name:"Kovan Ether",decimals:18},deprecated:!0},[K.SEPOLIA]:{chainId:K.SEPOLIA,type:Fe.TESTNET,name:"sepolia",title:"Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Sepolia)",rootUrl:"https://sepolia.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[K.POLYGON]:{chainId:K.POLYGON,type:Fe.MAINNET,name:"polygon",title:"Polygon",logoURI:`https://assets.sequence.info/images/networks/medium/${K.POLYGON}.webp`,blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},nativeToken:{symbol:"MATIC",name:"Polygon",decimals:18}},[K.POLYGON_MUMBAI]:{chainId:K.POLYGON_MUMBAI,type:Fe.TESTNET,name:"mumbai",title:"Polygon Mumbai",logoURI:`https://assets.sequence.info/images/networks/medium/${K.POLYGON_MUMBAI}.webp`,testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"},nativeToken:{symbol:"mMATIC",name:"Mumbai Polygon",decimals:18},deprecated:!0},[K.POLYGON_AMOY]:{chainId:K.POLYGON_AMOY,type:Fe.TESTNET,name:"amoy",title:"Polygon Amoy",logoURI:`https://assets.sequence.info/images/networks/medium/${K.POLYGON_AMOY}.webp`,testnet:!0,blockExplorer:{name:"OKLink (Amoy)",rootUrl:"https://www.oklink.com/amoy/"},nativeToken:{symbol:"aMATIC",name:"Amoy Polygon",decimals:18}},[K.POLYGON_ZKEVM]:{chainId:K.POLYGON_ZKEVM,type:Fe.MAINNET,name:"polygon-zkevm",title:"Polygon zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${K.POLYGON_ZKEVM}.webp`,blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.BSC]:{chainId:K.BSC,type:Fe.MAINNET,name:"bsc",title:"BNB Smart Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BSC}.webp`,blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"},nativeToken:{symbol:"BNB",name:"BNB",decimals:18}},[K.BSC_TESTNET]:{chainId:K.BSC_TESTNET,type:Fe.TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BSC_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"},nativeToken:{symbol:"tBNB",name:"Testnet BNB",decimals:18}},[K.OPTIMISM]:{chainId:K.OPTIMISM,type:Fe.MAINNET,name:"optimism",title:"Optimism",logoURI:`https://assets.sequence.info/images/networks/medium/${K.OPTIMISM}.webp`,blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.OPTIMISM_KOVAN]:{chainId:K.OPTIMISM_KOVAN,type:Fe.TESTNET,name:"optimism-kovan",title:"Optimism Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.OPTIMISM_GOERLI]:{chainId:K.OPTIMISM_GOERLI,type:Fe.TESTNET,name:"optimism-goerli",title:"Optimism Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.OPTIMISM_SEPOLIA]:{chainId:K.OPTIMISM_SEPOLIA,type:Fe.TESTNET,name:"optimism-sepolia",title:"Optimism Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.OPTIMISM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Sepolia)",rootUrl:"https://sepolia-optimistic.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[K.ARBITRUM]:{chainId:K.ARBITRUM,type:Fe.MAINNET,name:"arbitrum",title:"Arbitrum One",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ARBITRUM}.webp`,blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.ARBITRUM_GOERLI]:{chainId:K.ARBITRUM_GOERLI,type:Fe.TESTNET,name:"arbitrum-goerli",title:"Arbitrum Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.ARBITRUM_SEPOLIA]:{chainId:K.ARBITRUM_SEPOLIA,type:Fe.TESTNET,name:"arbitrum-sepolia",title:"Arbitrum Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ARBITRUM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Arbiscan (Sepolia Testnet)",rootUrl:"https://sepolia.arbiscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[K.ARBITRUM_NOVA]:{chainId:K.ARBITRUM_NOVA,type:Fe.MAINNET,name:"arbitrum-nova",title:"Arbitrum Nova",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ARBITRUM_NOVA}.webp`,blockExplorer:{name:"Arbiscan Nova",rootUrl:"https://nova.arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.AVALANCHE]:{chainId:K.AVALANCHE,type:Fe.MAINNET,name:"avalanche",title:"Avalanche",logoURI:`https://assets.sequence.info/images/networks/medium/${K.AVALANCHE}.webp`,blockExplorer:{name:"Snowtrace",rootUrl:"https://subnets.avax.network/c-chain/"},nativeToken:{symbol:"AVAX",name:"AVAX",decimals:18}},[K.AVALANCHE_TESTNET]:{chainId:K.AVALANCHE_TESTNET,type:Fe.TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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}},[K.GNOSIS]:{chainId:K.GNOSIS,type:Fe.MAINNET,name:"gnosis",title:"Gnosis Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${K.GNOSIS}.webp`,blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"},nativeToken:{symbol:"XDAI",name:"XDAI",decimals:18}},[K.BASE]:{chainId:K.BASE,type:Fe.MAINNET,name:"base",title:"Base (Coinbase)",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BASE}.webp`,blockExplorer:{name:"Base Explorer",rootUrl:"https://basescan.org/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.BASE_GOERLI]:{chainId:K.BASE_GOERLI,type:Fe.TESTNET,name:"base-goerli",title:"Base Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.BASE_SEPOLIA]:{chainId:K.BASE_SEPOLIA,type:Fe.TESTNET,name:"base-sepolia",title:"Base Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BASE_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Base Sepolia Explorer",rootUrl:"https://base-sepolia.blockscout.com/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[K.HOMEVERSE]:{chainId:K.HOMEVERSE,type:Fe.MAINNET,name:"homeverse",title:"Oasys Homeverse",logoURI:`https://assets.sequence.info/images/networks/medium/${K.HOMEVERSE}.webp`,blockExplorer:{name:"Oasys Homeverse Explorer",rootUrl:"https://explorer.oasys.homeverse.games/"},nativeToken:{symbol:"OAS",name:"OAS",decimals:18}},[K.HOMEVERSE_TESTNET]:{chainId:K.HOMEVERSE_TESTNET,type:Fe.TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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}},[K.XAI]:{chainId:K.XAI,type:Fe.MAINNET,name:"xai",title:"Xai",logoURI:`https://assets.sequence.info/images/networks/medium/${K.XAI}.webp`,blockExplorer:{name:"Xai Explorer",rootUrl:"https://explorer.xai-chain.net/"},nativeToken:{symbol:"XAI",name:"XAI",decimals:18}},[K.XAI_SEPOLIA]:{chainId:K.XAI_SEPOLIA,type:Fe.TESTNET,name:"xai-sepolia",title:"Xai Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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}},[K.ASTAR_ZKEVM]:{chainId:K.ASTAR_ZKEVM,type:Fe.MAINNET,name:"astar-zkevm",title:"Astar zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ASTAR_ZKEVM}.webp`,blockExplorer:{name:"Astar zkEVM Explorer",rootUrl:"https://astar-zkevm.explorer.startale.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.ASTAR_ZKYOTO]:{chainId:K.ASTAR_ZKYOTO,type:Fe.TESTNET,name:"astar-zkyoto",title:"Astar zKyoto Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ASTAR_ZKYOTO}.webp`,testnet:!0,blockExplorer:{name:"Astar zKyoto Explorer",rootUrl:"https://astar-zkyoto.blockscout.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.XR_SEPOLIA]:{chainId:K.XR_SEPOLIA,type:Fe.TESTNET,name:"xr-sepolia",title:"XR Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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}},[K.B3_SEPOLIA]:{chainId:K.B3_SEPOLIA,type:Fe.TESTNET,name:"b3-sepolia",title:"B3 Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.B3_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"B3 Sepolia Explorer",rootUrl:"https://sepolia.explorer.b3.fun/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.APECHAIN_TESTNET]:{chainId:K.APECHAIN_TESTNET,type:Fe.TESTNET,name:"apechain-testnet",title:"APE Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.APECHAIN_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"APE Chain Explorer",rootUrl:"https://curtis.explorer.caldera.xyz/"},nativeToken:{symbol:"APE",name:"ApeCoin",decimals:18}},[K.BLAST]:{chainId:K.BLAST,type:Fe.MAINNET,name:"blast",title:"Blast",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BLAST}.webp`,blockExplorer:{name:"Blast Explorer",rootUrl:"https://blastscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.BLAST_SEPOLIA]:{chainId:K.BLAST_SEPOLIA,type:Fe.TESTNET,name:"blast-sepolia",title:"Blast Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BLAST_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Blast Sepolia Explorer",rootUrl:"https://sepolia.blastexplorer.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.TELOS]:{chainId:K.TELOS,type:Fe.MAINNET,name:"telos",title:"Telos",logoURI:`https://assets.sequence.info/images/networks/medium/${K.TELOS}.webp`,blockExplorer:{name:"Telos Explorer",rootUrl:"https://explorer.telos.net/network/"},nativeToken:{symbol:"TLOS",name:"TLOS",decimals:18}},[K.BORNE_TESTNET]:{chainId:K.BORNE_TESTNET,type:Fe.TESTNET,name:"borne-testnet",title:"Borne Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BORNE_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"Borne Testnet Explorer",rootUrl:"https://subnets-test.avax.network/bornegfdn"},nativeToken:{symbol:"BORNE",name:"BORNE",decimals:18}},[K.HARDHAT]:{chainId:K.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.HARDHAT_2]:{chainId:K.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}}};function Xf(){return Xf=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 s=n.map(l=>l.chainId).sort(),i=s.filter((l,u)=>s.indexOf(l)!==u);if(i.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${i}`);return!1}n.forEach(l=>l.name=l.name.toLowerCase());const o=n.map(l=>l.name).sort(),a=o.filter((l,u)=>o.indexOf(l)!==u);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let c=!1;for(let l=0;l(doe(t,!0,e),t),poe=t=>hoe(voe(t)),yoe=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=Number(e);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(typeof e=="bigint"){const r=Number(e);return t.find(n=>n.chainId===r)}else return}},voe=t=>{if(!t)return[];const e=t.sort((n,s)=>n.chainId===s.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},qC=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let s=e[n];return typeof s=="function"?s=s():s==null?s="":typeof s=="object"||typeof s=="symbol"?s=s.toString():s=s.valueOf(),s})):"",ND=t=>qC("https://${network}-indexer.sequence.app",{network:t}),moe=t=>qC("https://${network}-relayer.sequence.app",{network:t}),goe=t=>qC("https://nodes.sequence.app/${network}",{network:t});function fp(t){return yoe(boe,t)}const Ke=(t,e)=>{const r=S0[t];if(!r)throw new Error(`Network with chainId ${t} not found`);const n=goe(r.name);return Xf({},r,{rpcUrl:n,indexerUrl:ND(r.name),relayer:{url:moe(r.name),provider:{url:n}}},e)},xoe=[Xf({},S0[K.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Xf({},S0[K.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})],boe=poe([Xf({},Ke(K.POLYGON),{isDefaultChain:!0,isAuthChain:!0}),Ke(K.MAINNET),Ke(K.BSC),Ke(K.AVALANCHE),Ke(K.ARBITRUM),Ke(K.ARBITRUM_NOVA),Ke(K.OPTIMISM),Ke(K.OPTIMISM_SEPOLIA),Ke(K.POLYGON_ZKEVM),Ke(K.GNOSIS),Ke(K.RINKEBY,{disabled:!0}),Ke(K.GOERLI,{disabled:!0}),Ke(K.SEPOLIA),Ke(K.POLYGON_MUMBAI,{disabled:!0}),Ke(K.POLYGON_AMOY),Ke(K.BSC_TESTNET),Ke(K.ARBITRUM_SEPOLIA),Ke(K.BASE),Ke(K.BASE_SEPOLIA),Ke(K.HOMEVERSE),Ke(K.HOMEVERSE_TESTNET),Ke(K.XAI),Ke(K.XAI_SEPOLIA),Ke(K.AVALANCHE_TESTNET),Ke(K.ASTAR_ZKEVM),Ke(K.ASTAR_ZKYOTO),Ke(K.XR_SEPOLIA),Ke(K.B3_SEPOLIA),Ke(K.APECHAIN_TESTNET),Ke(K.BLAST),Ke(K.BLAST_SEPOLIA),Ke(K.TELOS),Ke(K.BORNE_TESTNET),...xoe]),woe=(t,e)=>e.some(r=>t instanceof r);let D3,L3;function Eoe(){return D3||(D3=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Soe(){return L3||(L3=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const MD=new WeakMap,R2=new WeakMap,DD=new WeakMap,$x=new WeakMap,WC=new WeakMap;function Coe(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Ca(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&MD.set(r,t)}).catch(()=>{}),WC.set(e,t),e}function Aoe(t){if(R2.has(t))return;const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),s()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});R2.set(t,e)}let I2={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return R2.get(t);if(e==="objectStoreNames")return t.objectStoreNames||DD.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ca(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 koe(t){I2=t(I2)}function Toe(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(zx(this),e,...r);return DD.set(n,e.sort?e.sort():[e]),Ca(n)}:Soe().includes(t)?function(...e){return t.apply(zx(this),e),Ca(MD.get(this))}:function(...e){return Ca(t.apply(zx(this),e))}}function Poe(t){return typeof t=="function"?Toe(t):(t instanceof IDBTransaction&&Aoe(t),woe(t,Eoe())?new Proxy(t,I2):t)}function Ca(t){if(t instanceof IDBRequest)return Coe(t);if($x.has(t))return $x.get(t);const e=Poe(t);return e!==t&&($x.set(t,e),WC.set(e,t)),e}const zx=t=>WC.get(t);function Roe(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Ca(o);return n&&o.addEventListener("upgradeneeded",c=>{n(Ca(o.result),c.oldVersion,c.newVersion,Ca(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),a.then(c=>{i&&c.addEventListener("close",()=>i()),s&&c.addEventListener("versionchange",l=>s(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const Ioe=["get","getKey","getAll","getAllKeys","count"],Ooe=["put","add","delete","clear"],Hx=new Map;function j3(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Hx.get(e))return Hx.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=Ooe.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||Ioe.includes(r)))return;const i=async function(o,...a){const c=this.transaction(o,s?"readwrite":"readonly");let l=c.store;return n&&(l=l.index(a.shift())),(await Promise.all([l[r](...a),s&&c.done]))[0]};return Hx.set(e,i),i}koe(t=>({...t,get:(e,r,n)=>j3(e,r)||t.get(e,r,n),has:(e,r)=>!!j3(e,r)||t.has(e,r)}));const _oe=t=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},Noe=t=>({httpHandler:t.httpHandler()});var B3;(function(t){t.HEADER="header",t.QUERY="query"})(B3||(B3={}));var F3;(function(t){t.HEADER="header",t.QUERY="query"})(F3||(F3={}));var dp;(function(t){t.HTTP="http",t.HTTPS="https"})(dp||(dp={}));var C0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(C0||(C0={}));var U3;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(U3||(U3={}));const O2="__smithy_context";var V3;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(V3||(V3={}));var $3;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})($3||($3={}));class Vn{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 Vn({...e,headers:{...e.headers}});return r.query&&(r.query=Moe(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 Vn.clone(this)}}function Moe(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}class A0{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 Doe=t=>e=>async r=>{if(!Vn.isInstance(r.request))return e(r);const{request:n}=r,{handlerProtocol:s=""}=t.requestHandler.metadata||{};if(s.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 i=n.hostname;n.port!=null&&(i+=`:${n.port}`),n.headers.host=i}return e(r)},Loe={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},joe=t=>({applyToStack:e=>{e.add(Doe(t),Loe)}}),Boe=()=>(t,e)=>async r=>{var n,s;try{const i=await t(r),{clientName:o,commandName:a,logger:c,dynamoDbDocumentClientOptions:l={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:f}=l,d=u??e.inputFilterSensitiveLog,h=f??e.outputFilterSensitiveLog,{$metadata:p,...y}=i.output;return(n=c==null?void 0:c.info)==null||n.call(c,{clientName:o,commandName:a,input:d(r.input),output:h(y),metadata:p}),i}catch(i){const{clientName:o,commandName:a,logger:c,dynamoDbDocumentClientOptions:l={}}=e,{overrideInputFilterSensitiveLog:u}=l,f=u??e.inputFilterSensitiveLog;throw(s=c==null?void 0:c.error)==null||s.call(c,{clientName:o,commandName:a,input:f(r.input),error:i,metadata:i.$metadata}),i}},Foe={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Uoe=t=>({applyToStack:e=>{e.add(Boe(),Foe)}}),z3="X-Amzn-Trace-Id",Voe="AWS_LAMBDA_FUNCTION_NAME",$oe="_X_AMZN_TRACE_ID",zoe=t=>e=>async r=>{const{request:n}=r;if(!Vn.isInstance(n)||t.runtime!=="node"||n.headers.hasOwnProperty(z3))return e(r);const s=process.env[Voe],i=process.env[$oe],o=a=>typeof a=="string"&&a.length>0;return o(s)&&o(i)&&(n.headers[z3]=i),e({...r,request:n})},Hoe={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Goe=t=>({applyToStack:e=>{e.add(zoe(t),Hoe)}});function qoe(t){return{...t,customUserAgent:typeof t.customUserAgent=="string"?[[t.customUserAgent]]:t.customUserAgent}}class Woe{constructor({size:e,params:r}){this.data=new Map,this.parameters=[],this.capacity=e??50,r&&(this.parameters=r)}get(e,r){const n=this.hash(e);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const s=this.data.keys();let i=0;for(;;){const{value:o,done:a}=s.next();if(this.data.delete(o),a||++i>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(e){let r="";const{parameters:n}=this;if(n.length===0)return!1;for(const s of n){const i=String(e[s]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}}const Koe=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}$"),LD=t=>Koe.test(t)||t.startsWith("[")&&t.endsWith("]"),Qoe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),KC=(t,e=!1)=>{if(!e)return Qoe.test(t);const r=t.split(".");for(const n of r)if(!KC(n))return!1;return!0},k0={},hp="endpoints";function Ma(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Ma(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Ma).join(", ")})`:JSON.stringify(t,null,2)}class $n extends Error{constructor(e){super(e),this.name="EndpointError"}}const Yoe=(t,e)=>t===e,Joe=t=>{const e=t.split("."),r=[];for(const n of e){const s=n.indexOf("[");if(s!==-1){if(n.indexOf("]")!==n.length-1)throw new $n(`Path: '${t}' does not end with ']'`);const i=n.slice(s+1,-1);if(Number.isNaN(parseInt(i)))throw new $n(`Invalid array index: '${i}' in path: '${t}'`);s!==0&&r.push(n.slice(0,s)),r.push(i)}else r.push(n)}return r},jD=(t,e)=>Joe(e).reduce((r,n)=>{if(typeof r!="object")throw new $n(`Index '${n}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]},t),Xoe=t=>t!=null,Zoe=t=>!t,Gx={[dp.HTTP]:80,[dp.HTTPS]:443},eae=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:y="",query:g={}}=t,m=new URL(`${p}//${d}${h?`:${h}`:""}${y}`);return m.search=Object.entries(g).map(([x,b])=>`${x}=${b}`).join("&"),m}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:s,pathname:i,protocol:o,search:a}=e;if(a)return null;const c=o.slice(0,-1);if(!Object.values(dp).includes(c))return null;const l=LD(s),u=r.includes(`${n}:${Gx[c]}`)||typeof t=="string"&&t.includes(`${n}:${Gx[c]}`),f=`${n}${u?`:${Gx[c]}`:""}`;return{scheme:c,authority:f,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:l}},tae=(t,e)=>t===e,rae=(t,e,r,n)=>e>=r||t.lengthencodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),sae={booleanEquals:Yoe,getAttr:jD,isSet:Xoe,isValidHostLabel:KC,not:Zoe,parseURL:eae,stringEquals:tae,substring:rae,uriEncode:nae},BD=(t,e)=>{const r=[],n={...e.endpointParams,...e.referenceRecord};let s=0;for(;s({...e.endpointParams,...e.referenceRecord})[t],rg=(t,e,r)=>{if(typeof t=="string")return BD(t,r);if(t.fn)return FD(t,r);if(t.ref)return iae(t,r);throw new $n(`'${e}': ${String(t)} is not a string, function or reference.`)},FD=({fn:t,argv:e},r)=>{const n=e.map(i=>["boolean","number"].includes(typeof i)?i:rg(i,"arg",r)),s=t.split(".");return s[0]in k0&&s[1]!=null?k0[s[0]][s[1]](...n):sae[t](...n)},oae=({assign:t,...e},r)=>{var s,i;if(t&&t in r.referenceRecord)throw new $n(`'${t}' is already defined in Reference Record.`);const n=FD(e,r);return(i=(s=r.logger)==null?void 0:s.debug)==null||i.call(s,`${hp} evaluateCondition: ${Ma(e)} = ${Ma(n)}`),{result:n===""?!0:!!n,...t!=null&&{toAssign:{name:t,value:n}}}},QC=(t=[],e)=>{var n,s;const r={};for(const i of t){const{result:o,toAssign:a}=oae(i,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!o)return{result:o};a&&(r[a.name]=a.value,(s=(n=e.logger)==null?void 0:n.debug)==null||s.call(n,`${hp} assign: ${a.name} := ${Ma(a.value)}`))}return{result:!0,referenceRecord:r}},aae=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:s.map(i=>{const o=rg(i,"Header value entry",e);if(typeof o!="string")throw new $n(`Header '${n}' value '${o}' is not a string`);return o})}),{}),UD=(t,e)=>{if(Array.isArray(t))return t.map(r=>UD(r,e));switch(typeof t){case"string":return BD(t,e);case"object":if(t===null)throw new $n(`Unexpected endpoint property: ${t}`);return VD(t,e);case"boolean":return t;default:throw new $n(`Unexpected endpoint property type: ${typeof t}`)}},VD=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:UD(s,e)}),{}),cae=(t,e)=>{const r=rg(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 $n(`Endpoint URL must be a string, got ${typeof r}`)},lae=(t,e)=>{var u,f;const{conditions:r,endpoint:n}=t,{result:s,referenceRecord:i}=QC(r,e);if(!s)return;const o={...e,referenceRecord:{...e.referenceRecord,...i}},{url:a,properties:c,headers:l}=n;return(f=(u=e.logger)==null?void 0:u.debug)==null||f.call(u,`${hp} Resolving endpoint from template: ${Ma(n)}`),{...l!=null&&{headers:aae(l,o)},...c!=null&&{properties:VD(c,o)},url:cae(a,o)}},uae=(t,e)=>{const{conditions:r,error:n}=t,{result:s,referenceRecord:i}=QC(r,e);if(s)throw new $n(rg(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},fae=(t,e)=>{const{conditions:r,rules:n}=t,{result:s,referenceRecord:i}=QC(r,e);if(s)return $D(n,{...e,referenceRecord:{...e.referenceRecord,...i}})},$D=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const n=lae(r,e);if(n)return n}else if(r.type==="error")uae(r,e);else if(r.type==="tree"){const n=fae(r,e);if(n)return n}else throw new $n(`Unknown endpoint rule: ${r}`);throw new $n("Rules evaluation failed")},dae=(t,e)=>{var l,u,f,d;const{endpointParams:r,logger:n}=e,{parameters:s,rules:i}=t;(u=(l=e.logger)==null?void 0:l.debug)==null||u.call(l,`${hp} Initial EndpointParams: ${Ma(r)}`);const o=Object.entries(s).filter(([,h])=>h.default!=null).map(([h,p])=>[h,p.default]);if(o.length>0)for(const[h,p]of o)r[h]=r[h]??p;const a=Object.entries(s).filter(([,h])=>h.required).map(([h])=>h);for(const h of a)if(r[h]==null)throw new $n(`Missing required parameter: '${h}'`);const c=$D(i,{endpointParams:r,logger:n,referenceRecord:{}});return(d=(f=e.logger)==null?void 0:f.debug)==null||d.call(f,`${hp} Resolved endpoint: ${Ma(c)}`),c},zD=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!zD(r))return!1;return!0}return!(!KC(t)||t.length<3||t.length>63||t!==t.toLowerCase()||LD(t))},H3=":",hae="/",pae=t=>{const e=t.split(H3);if(e.length<6)return null;const[r,n,s,i,o,...a]=e;if(r!=="arn"||n===""||s===""||a.join(H3)==="")return null;const c=a.map(l=>l.split(hae)).flat();return{partition:n,service:s,region:i,accountId:o,resourceId:c}},yae=[{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|mx)\\-\\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)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"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:{}}],vae="1.1",mae={partitions:yae,version:vae};let gae=mae;const xae=t=>{const{partitions:e}=gae;for(const n of e){const{regions:s,outputs:i}=n;for(const[o,a]of Object.entries(s))if(o===t)return{...i,...a}}for(const n of e){const{regionRegex:s,outputs:i}=n;if(new RegExp(s).test(t))return{...i}}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}},HD={isVirtualHostableS3Bucket:zD,parseArn:pae,partition:xae};k0.aws=HD;const G3="user-agent",qx="x-amz-user-agent",q3=" ",Wx="/",bae=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,wae=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,W3="-",Eae=t=>(e,r)=>async n=>{var f,d;const{request:s}=n;if(!Vn.isInstance(s))return e(n);const{headers:i}=s,o=((f=r==null?void 0:r.userAgent)==null?void 0:f.map(Kx))||[],a=(await t.defaultUserAgentProvider()).map(Kx),c=((d=t==null?void 0:t.customUserAgent)==null?void 0:d.map(Kx))||[],l=[].concat([...a,...o,...c]).join(q3),u=[...a.filter(h=>h.startsWith("aws-sdk-")),...c].join(q3);return t.runtime!=="browser"?(u&&(i[qx]=i[qx]?`${i[G3]} ${u}`:u),i[G3]=l):i[qx]=l,e({...n,request:s})},Kx=t=>{var o;const e=t[0].split(Wx).map(a=>a.replace(bae,W3)).join(Wx),r=(o=t[1])==null?void 0:o.replace(wae,W3),n=e.indexOf(Wx),s=e.substring(0,n);let i=e.substring(n+1);return s==="api"&&(i=i.toLowerCase()),[s,i,r].filter(a=>a&&a.length>0).reduce((a,c,l)=>{switch(l){case 0:return c;case 1:return`${a}/${c}`;default:return`${a}#${c}`}},"")},Sae={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Cae=t=>({applyToStack:e=>{e.add(Eae(t),Sae)}});var K3;(function(t){t.ENV="env",t.CONFIG="shared config entry"})(K3||(K3={}));const Aae=!1,kae=!1,ng=t=>t[O2]||(t[O2]={}),Aa=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},GD=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),Q3=t=>GD(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,Tae=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return{...t,region:async()=>{if(typeof e=="string")return Q3(e);const n=await e();return Q3(n)},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return GD(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}}};function Pae(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const Rae=(t,e)=>(r,n)=>async s=>{var l;const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,n,s.input)),o=Pae(t.httpAuthSchemes),a=ng(n),c=[];for(const u of i){const f=o.get(u.schemeId);if(!f){c.push(`HttpAuthScheme \`${u.schemeId}\` was not enabled for this service.`);continue}const d=f.identityProvider(await e.identityProviderConfigProvider(t));if(!d){c.push(`HttpAuthScheme \`${u.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:h={},signingProperties:p={}}=((l=u.propertiesExtractor)==null?void 0:l.call(u,t,n))||{};u.identityProperties=Object.assign(u.identityProperties||{},h),u.signingProperties=Object.assign(u.signingProperties||{},p),a.selectedHttpAuthScheme={httpAuthOption:u,identity:await d(u.identityProperties),signer:f.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join(` -`));return r(s)},Iae=async t=>{const e=(t==null?void 0:t.Bucket)||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Dae(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Mae(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},Oae=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,_ae=/(\d+\.){3}\d+/,Nae=/\.\./,Mae=t=>Oae.test(t)&&!_ae.test(t)&&!Nae.test(t),Dae=t=>{const[e,r,n,,,s]=t.split(":"),i=e==="arn"&&t.split(":").length>=6,o=!!(i&&r&&n&&s);if(i&&!o)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return o},Lae=(t,e,r)=>{const n=async()=>{const s=r[t]??r[e];return typeof s=="function"?s():s};return t==="credentialScope"||e==="CredentialScope"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return(s==null?void 0:s.credentialScope)??(s==null?void 0:s.CredentialScope)}:t==="accountId"||e==="AccountId"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return(s==null?void 0:s.accountId)??(s==null?void 0:s.AccountId)}:t==="endpoint"||e==="endpoint"?async()=>{const s=await n();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){const{protocol:i,hostname:o,port:a,path:c}=s;return`${i}//${o}${a?":"+a:""}${c}`}}return s}:n},qD=async t=>{};function jae(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[n,s=null]=r.split("=");n=decodeURIComponent(n),s&&(s=decodeURIComponent(s)),n in e?Array.isArray(e[n])?e[n].push(s):e[n]=[e[n],s]:e[n]=s}return e}const T0=t=>{if(typeof t=="string")return T0(new URL(t));const{hostname:e,pathname:r,port:n,protocol:s,search:i}=t;let o;return i&&(o=jae(i)),{hostname:e,port:n?parseInt(n):void 0,protocol:s,path:r,query:o}},WD=t=>typeof t=="object"?"url"in t?T0(t.url):t:T0(t),Bae=async(t,e,r,n)=>{if(!r.endpoint){let o;r.serviceConfiguredEndpoint?o=await r.serviceConfiguredEndpoint():o=await qD(r.serviceId),o&&(r.endpoint=()=>Promise.resolve(WD(o)))}const s=await Fae(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,n)},Fae=async(t,e,r)=>{var i;const n={},s=((i=e==null?void 0:e.getEndpointParameterInstructions)==null?void 0:i.call(e))||{};for(const[o,a]of Object.entries(s))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 Lae(a.name,o,r)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(s).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await Iae(n),n},Uae=({config:t,instructions:e})=>(r,n)=>async s=>{var a,c,l;const i=await Bae(s.input,{getEndpointParameterInstructions(){return e}},{...t},n);n.endpointV2=i,n.authSchemes=(a=i.properties)==null?void 0:a.authSchemes;const o=(c=n.authSchemes)==null?void 0:c[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const u=ng(n),f=(l=u==null?void 0:u.selectedHttpAuthScheme)==null?void 0:l.httpAuthOption;f&&(f.signingProperties=Object.assign(f.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return r({...s})},Vae=(t,e)=>r=>async n=>{const{response:s}=await r(n);try{const i=await e(s,t);return{response:s,output:i}}catch(i){if(Object.defineProperty(i,"$response",{value:s}),!("$metadata"in i)){const o="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";i.message+=` - `+o,typeof i.$responseBodyText<"u"&&i.$response&&(i.$response.body=i.$responseBodyText)}throw i}},$ae=(t,e)=>(r,n)=>async s=>{var a;const i=(a=n.endpointV2)!=null&&a.url&&t.urlParser?async()=>t.urlParser(n.endpointV2.url):t.endpoint;if(!i)throw new Error("No valid endpoint provider available.");const o=await e(s.input,{...t,endpoint:i});return r({...s,request:o})},zae={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},YC={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function JC(t,e,r){return{applyToStack:n=>{n.add(Vae(t,r),zae),n.add($ae(t,e),YC)}}}const KD={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:YC.name},XC=(t,e)=>({applyToStack:r=>{r.addRelativeTo(Uae({config:t,instructions:e}),KD)}}),Hae=t=>{const e=t.tls??!0,{endpoint:r}=t,n=r!=null?async()=>WD(await Aa(r)()):void 0,i={...t,endpoint:n,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:Aa(t.useDualstackEndpoint??!1),useFipsEndpoint:Aa(t.useFipsEndpoint??!1)};let o;return i.serviceConfiguredEndpoint=async()=>(t.serviceId&&!o&&(o=qD(t.serviceId)),o),i},Gae={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:KD.name},qae=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Rae(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Gae)}});YC.name;const Wae=t=>e=>{throw e},Kae=(t,e)=>{},Qae=t=>(e,r)=>async n=>{if(!Vn.isInstance(n.request))return e(n);const i=ng(r).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:o={}},identity:a,signer:c}=i,l=await e({...n,request:await c.sign(n.request,a,o)}).catch((c.errorHandler||Wae)(o));return(c.successHandler||Kae)(l.response,o),l};var Zf;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(Zf||(Zf={}));const P0=3,Yae=Zf.STANDARD,Jae=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Xae=["TimeoutError","RequestTimeout","RequestTimeoutException"],Zae=[500,502,503,504],ece=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],tce=t=>{var e;return(e=t.$metadata)==null?void 0:e.clockSkewCorrected},QD=t=>{var e,r;return((e=t.$metadata)==null?void 0:e.httpStatusCode)===429||Jae.includes(t.name)||((r=t.$retryable)==null?void 0:r.throttling)==!0},YD=t=>{var e;return tce(t)||Xae.includes(t.name)||ece.includes((t==null?void 0:t.code)||"")||Zae.includes(((e=t.$metadata)==null?void 0:e.httpStatusCode)||0)},rce=t=>{var e;if(((e=t.$metadata)==null?void 0:e.httpStatusCode)!==void 0){const r=t.$metadata.httpStatusCode;return 500<=r&&r<=599&&!YD(t)}return!1};class nce{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(),QD(e)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(s),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 _2=100,JD=20*1e3,sce=500,Y3=500,ice=5,oce=10,ace=1,cce="amz-sdk-invocation-id",lce="amz-sdk-request",uce=()=>{let t=_2;return{computeNextBackoffDelay:n=>Math.floor(Math.min(JD,Math.random()*2**n*t)),setDelayBase:n=>{t=n}}},J3=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(JD,t),getRetryCost:()=>r});class XD{constructor(e){this.maxAttempts=e,this.mode=Zf.STANDARD,this.capacity=Y3,this.retryBackoffStrategy=uce(),this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return J3({retryDelay:_2,retryCount:0})}async refreshRetryTokenForRetry(e,r){const n=await this.getMaxAttempts();if(this.shouldRetry(e,r,n)){const s=r.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?sce:_2);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,i):i,a=this.getCapacityCost(s);return this.capacity-=a,J3({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(Y3,this.capacity+(e.getRetryCost()??ace))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${P0}`),P0}}shouldRetry(e,r,n){return e.getRetryCount()+1=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?oce:ice}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class fce{constructor(e,r){this.maxAttemptsProvider=e,this.mode=Zf.ADAPTIVE;const{rateLimiter:n}=r??{};this.rateLimiter=n??new nce,this.standardRetryStrategy=new XD(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 C1;const dce=new Uint8Array(16);function hce(){if(!C1&&(C1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!C1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return C1(dce)}const pr=[];for(let t=0;t<256;++t)pr.push((t+256).toString(16).slice(1));function pce(t,e=0){return pr[t[e+0]]+pr[t[e+1]]+pr[t[e+2]]+pr[t[e+3]]+"-"+pr[t[e+4]]+pr[t[e+5]]+"-"+pr[t[e+6]]+pr[t[e+7]]+"-"+pr[t[e+8]]+pr[t[e+9]]+"-"+pr[t[e+10]]+pr[t[e+11]]+pr[t[e+12]]+pr[t[e+13]]+pr[t[e+14]]+pr[t[e+15]]}const yce=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),X3={randomUUID:yce};function vce(t,e,r){if(X3.randomUUID&&!e&&!t)return X3.randomUUID();t=t||{};const n=t.random||(t.rng||hce)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let s=0;s<16;++s)e[r+s]=n[s];return e}return pce(n)}const mce=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}`),gce=t=>{const{retryStrategy:e}=t,r=Aa(t.maxAttempts??P0);return{...t,maxAttempts:r,retryStrategy:async()=>e||(await Aa(t.retryMode)()===Zf.ADAPTIVE?new fce(r):new XD(r))}};class ZD{trace(){}debug(){}info(){}warn(){}error(){}}const Za=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const n of e)r.push(n);return r},No=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,R0=()=>{let t=[],e=[],r=!1;const n=new Set,s=f=>f.sort((d,h)=>Z3[h.step]-Z3[d.step]||e8[h.priority||"normal"]-e8[d.priority||"normal"]),i=f=>{let d=!1;const h=p=>{const y=Za(p.name,p.aliases);if(y.includes(f)){d=!0;for(const g of y)n.delete(g);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},o=f=>{let d=!1;const h=p=>{if(p.middleware===f){d=!0;for(const y of Za(p.name,p.aliases))n.delete(y);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},a=f=>{var d;return t.forEach(h=>{f.add(h.middleware,{...h})}),e.forEach(h=>{f.addRelativeTo(h.middleware,{...h})}),(d=f.identifyOnResolve)==null||d.call(f,u.identifyOnResolve()),f},c=f=>{const d=[];return f.before.forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...c(h))}),d.push(f),f.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...c(h))}),d},l=(f=!1)=>{const d=[],h=[],p={};return t.forEach(g=>{const m={...g,before:[],after:[]};for(const x of Za(m.name,m.aliases))p[x]=m;d.push(m)}),e.forEach(g=>{const m={...g,before:[],after:[]};for(const x of Za(m.name,m.aliases))p[x]=m;h.push(m)}),h.forEach(g=>{if(g.toMiddleware){const m=p[g.toMiddleware];if(m===void 0){if(f)return;throw new Error(`${g.toMiddleware} is not found when adding ${No(g.name,g.aliases)} middleware ${g.relation} ${g.toMiddleware}`)}g.relation==="after"&&m.after.push(g),g.relation==="before"&&m.before.push(g)}}),s(d).map(c).reduce((g,m)=>(g.push(...m),g),[])},u={add:(f,d={})=>{const{name:h,override:p,aliases:y}=d,g={step:"initialize",priority:"normal",middleware:f,...d},m=Za(h,y);if(m.length>0){if(m.some(x=>n.has(x))){if(!p)throw new Error(`Duplicate middleware name '${No(h,y)}'`);for(const x of m){const b=t.findIndex(A=>{var O;return A.name===x||((O=A.aliases)==null?void 0:O.some(_=>_===x))});if(b===-1)continue;const w=t[b];if(w.step!==g.step||g.priority!==w.priority)throw new Error(`"${No(w.name,w.aliases)}" middleware with ${w.priority} priority in ${w.step} step cannot be overridden by "${No(h,y)}" middleware with ${g.priority} priority in ${g.step} step.`);t.splice(b,1)}}for(const x of m)n.add(x)}t.push(g)},addRelativeTo:(f,d)=>{const{name:h,override:p,aliases:y}=d,g={middleware:f,...d},m=Za(h,y);if(m.length>0){if(m.some(x=>n.has(x))){if(!p)throw new Error(`Duplicate middleware name '${No(h,y)}'`);for(const x of m){const b=e.findIndex(A=>{var O;return A.name===x||((O=A.aliases)==null?void 0:O.some(_=>_===x))});if(b===-1)continue;const w=e[b];if(w.toMiddleware!==g.toMiddleware||w.relation!==g.relation)throw new Error(`"${No(w.name,w.aliases)}" middleware ${w.relation} "${w.toMiddleware}" middleware cannot be overridden by "${No(h,y)}" middleware ${g.relation} "${g.toMiddleware}" middleware.`);e.splice(b,1)}}for(const x of m)n.add(x)}e.push(g)},clone:()=>a(R0()),use:f=>{f.applyToStack(u)},remove:f=>typeof f=="string"?i(f):o(f),removeByTag:f=>{let d=!1;const h=p=>{const{tags:y,name:g,aliases:m}=p;if(y&&y.includes(f)){const x=Za(g,m);for(const b of x)n.delete(b);return d=!0,!1}return!0};return t=t.filter(h),e=e.filter(h),d},concat:f=>{var h;const d=a(R0());return d.use(f),d.identifyOnResolve(r||d.identifyOnResolve()||(((h=f.identifyOnResolve)==null?void 0:h.call(f))??!1)),d},applyToStack:a,identify:()=>l(!0).map(f=>{const d=f.step??f.relation+" "+f.toMiddleware;return No(f.name,f.aliases)+" - "+d}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,d)=>{for(const h of l().map(p=>p.middleware).reverse())f=h(f,d);return r&&console.log(u.identify()),f}};return u},Z3={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},e8={high:3,normal:2,low:1};class xce{constructor(e){this.config=e,this.middlewareStack=R0()}send(e,r,n){const s=typeof r!="function"?r:void 0,i=typeof r=="function"?r:n,o=s===void 0&&this.config.cacheMiddleware===!0;let a;if(o){this.handlers||(this.handlers=new WeakMap);const c=this.handlers;c.has(e.constructor)?a=c.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,s),c.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,s);if(i)a(e).then(c=>i(null,c.output),c=>i(c)).catch(()=>{});else return a(e).then(c=>c.output)}destroy(){var e,r,n;(n=(r=(e=this.config)==null?void 0:e.requestHandler)==null?void 0:r.destroy)==null||n.call(r),delete this.handlers}}const Da={},md=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);Da[n]=t,md[t]=n}for(let t=0,e="a".charCodeAt(0),r="z".charCodeAt(0);t+e<=r;t++){const n=String.fromCharCode(t+e),s=t+26;Da[n]=s,md[s]=n}for(let t=0;t<10;t++){Da[t.toString(10)]=t+52;const e=t.toString(10),r=t+52;Da[e]=r,md[r]=e}Da["+"]=62;md[62]="+";Da["/"]=63;md[63]="/";const Du=6,wh=8,bce=63,ZC=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 s=0;s>=Du;const a=s/4*3;i>>=o%wh;const c=Math.floor(o/wh);for(let l=0;l>u)}}return new Uint8Array(r)},ed=t=>new TextEncoder().encode(t),Eh=t=>typeof t=="string"?ed(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),eL=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 tL(t){let e;typeof t=="string"?e=ed(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 s="";for(let i=0;i>u]}s+="==".slice(0,4-c)}return s}function wce(t,e="utf-8"){return e==="base64"?tL(t):eL(t)}function Ece(t,e){return e==="base64"?nl.mutate(ZC(t)):nl.mutate(ed(t))}class nl extends Uint8Array{static fromString(e,r="utf-8"){switch(typeof e){case"string":return Ece(e,r);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,nl.prototype),e}transformToString(e="utf-8"){return wce(this,e)}}const fa=t=>encodeURIComponent(t).replace(/[!'()*]/g,Sce),Sce=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function Cce(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=fa(r),Array.isArray(n))for(let s=0,i=n.length;s{t&&setTimeout(()=>{const n=new Error(`Request did not complete within ${t} ms`);n.name="TimeoutError",r(n)},t)})}const Qx={supported:void 0};class eA{static create(e){return typeof(e==null?void 0:e.handle)=="function"?e:new eA(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(r=>r||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Qx.supported===void 0&&(Qx.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,s=this.config.keepAlive===!0,i=this.config.credentials;if(r!=null&&r.aborted){const m=new Error("Request aborted");return m.name="AbortError",Promise.reject(m)}let o=e.path;const a=Cce(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(e.username!=null||e.password!=null){const m=e.username??"",x=e.password??"";c=`${m}:${x}@`}const{port:l,method:u}=e,f=`${e.protocol}//${c}${e.hostname}${l?`:${l}`:""}${o}`,d=u==="GET"||u==="HEAD"?void 0:e.body,h={body:d,headers:new Headers(e.headers),method:u,credentials:i};d&&(h.duplex="half"),typeof AbortController<"u"&&(h.signal=r),Qx.supported&&(h.keepalive=s);let p=()=>{};const y=new Request(f,h),g=[fetch(y).then(m=>{const x=m.headers,b={};for(const A of x.entries())b[A[0]]=A[1];return m.body!=null?{response:new A0({headers:b,reason:m.statusText,statusCode:m.status,body:m.body})}:m.blob().then(A=>({response:new A0({headers:b,reason:m.statusText,statusCode:m.status,body:A})}))}),Ace(n)];return r&&g.push(new Promise((m,x)=>{const b=()=>{const w=new Error("Request aborted");w.name="AbortError",x(w)};if(typeof r.addEventListener=="function"){const w=r;w.addEventListener("abort",b,{once:!0}),p=()=>w.removeEventListener("abort",b)}else r.onabort=b})),Promise.race(g).finally(p)}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=r,n))}httpHandlerConfigs(){return this.config??{}}}const kce=t=>typeof Blob=="function"&&t instanceof Blob?Tce(t):Pce(t);async function Tce(t){const e=await Rce(t),r=ZC(e);return new Uint8Array(r)}async function Pce(t){const e=[],r=t.getReader();let n=!1,s=0;for(;!n;){const{done:a,value:c}=await r.read();c&&(e.push(c),s+=c.length),n=a}const i=new Uint8Array(s);let o=0;for(const a of e)i.set(a,o),o+=a.length;return i}function Rce(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 s=n.result??"",i=s.indexOf(","),o=i>-1?i+1:s.length;e(s.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})}const rL={},N2={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),rL[t]=e,N2[e]=t}function Ice(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 nl.mutate(t);if(!t)return nl.mutate(new Uint8Array);const r=e.streamCollector(t);return nl.mutate(await r)};class sg{constructor(){this.middlewareStack=R0()}static classBuilder(){return new _ce}resolveMiddlewareWithContext(e,r,n,{middlewareFn:s,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:l,additionalContext:u,CommandCtor:f}){for(const g of s.bind(this)(f,e,r,n))this.middlewareStack.use(g);const d=e.concat(this.middlewareStack),{logger:h}=r,p={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[O2]:{commandInstance:this,...l},...u},{requestHandler:y}=r;return d.resolve(g=>y.handle(g.request,n||{}),p)}}class _ce{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 sg{static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=n??{},e._init(this)}resolveMiddleware(n,s,i){return this.resolveMiddlewareWithContext(n,s,i,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const ur="***SensitiveInformation***";class tA extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,tA.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const Ne=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,s])=>{(t[n]==null||t[n]==="")&&(t[n]=s)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},Nce=({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{const s=Dce(t),i=s.httpStatusCode?s.httpStatusCode+"":void 0,o=new r({name:(e==null?void 0:e.code)||(e==null?void 0:e.Code)||n||i||"UnknownError",$fault:"client",$metadata:s});throw Ne(o,e)},Mce=t=>({output:e,parsedBody:r,errorCode:n})=>{Nce({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})},Dce=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"]}),Lce=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{}}},jce=t=>{const e=[];for(const r in C0){const n=C0[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}}},Bce=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},Fce=t=>{let e=t.retryStrategy;return{setRetryStrategy(r){e=r},retryStrategy(){return e}}},Uce=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},Vce=t=>({...jce(t),...Fce(t)}),$ce=t=>({...Bce(t),...Uce(t)}),M2=function(){const t=Object.getPrototypeOf(this).constructor,e=Function.bind.apply(String,[null,...arguments]),r=new e;return Object.setPrototypeOf(r,t.prototype),r};M2.prototype=Object.create(String.prototype,{constructor:{value:M2,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(M2,String);const Ce=t=>{if(t==null)return{};if(Array.isArray(t))return t.filter(e=>e!=null).map(Ce);if(typeof t=="object"){const e={};for(const r of Object.keys(t))t[r]!=null&&(e[r]=Ce(t[r]));return e}return t},zce=t=>(t==null?void 0:t.body)instanceof ReadableStream,Hce=t=>(e,r)=>async n=>{var o;let s=await t.retryStrategy();const i=await t.maxAttempts();if(Gce(s)){s=s;let a=await s.acquireInitialRetryToken(r.partition_id),c=new Error,l=0,u=0;const{request:f}=n,d=Vn.isInstance(f);for(d&&(f.headers[cce]=vce());;)try{d&&(f.headers[lce]=`attempt=${l+1}; max=${i}`);const{response:h,output:p}=await e(n);return s.recordSuccess(a),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=u,{response:h,output:p}}catch(h){const p=qce(h);if(c=mce(h),d&&zce(f))throw(o=r.logger instanceof ZD?console:r.logger)==null||o.warn("An error was encountered in a non-retryable streaming request."),c;try{a=await s.refreshRetryTokenForRetry(a,p)}catch{throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=l+1,c.$metadata.totalRetryDelay=u,c}l=a.getRetryCount();const y=a.getRetryDelay();u+=y,await new Promise(g=>setTimeout(g,y))}}else return s=s,s!=null&&s.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(e,n)},Gce=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",qce=t=>{const e={error:t,errorType:Wce(t)},r=Qce(t.$response);return r&&(e.retryAfterHint=r),e},Wce=t=>QD(t)?"THROTTLING":YD(t)?"TRANSIENT":rce(t)?"SERVER_ERROR":"CLIENT_ERROR",nL={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Kce=t=>({applyToStack:e=>{e.add(Hce(t),nL)}}),Qce=t=>{if(!A0.isInstance(t))return;const e=Object.keys(t.headers).find(i=>i.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)},Yce={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:nL.name},Jce=t=>({applyToStack:e=>{e.addRelativeTo(Qae(),Yce)}});class Xce{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 Zce{async sign(e,r,n){return e}}const ele=t=>e=>sL(e)&&e.expiration.getTime()-Date.now()t.expiration!==void 0,nle=(t,e,r)=>{if(t===void 0)return;const n=typeof t!="function"?async()=>Promise.resolve(t):t;let s,i,o,a=!1;const c=async l=>{i||(i=n(l));try{s=await i,o=!0,a=!1}finally{i=void 0}return s};return e===void 0?async l=>((!o||l!=null&&l.forceRefresh)&&(s=await c(l)),s):async l=>((!o||l!=null&&l.forceRefresh)&&(s=await c(l)),a?s:r(s)?(e(s)&&await c(l),s):(a=!0,s))},A1=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},t8="content-length";function sle(t){return e=>async r=>{const n=r.request;if(Vn.isInstance(n)){const{body:s,headers:i}=n;if(s&&Object.keys(i).map(o=>o.toLowerCase()).indexOf(t8)===-1)try{const o=t(s);n.headers={...n.headers,[t8]:String(o)}}catch{}}return e({...r,request:n})}}const ile={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ole=t=>({applyToStack:e=>{e.add(sle(t.bodyLengthChecker),ile)}}),r8=t=>{var e,r;return A0.isInstance(t)?((e=t.headers)==null?void 0:e.date)??((r=t.headers)==null?void 0:r.Date):void 0},iL=t=>new Date(Date.now()+t),ale=(t,e)=>Math.abs(iL(e).getTime()-t)>=3e5,n8=(t,e)=>{const r=Date.parse(t);return ale(r,e)?r-Date.now():e},Sh=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},cle=async t=>{var l,u,f;const e=Sh("context",t.context),r=Sh("config",t.config),n=(f=(u=(l=e.endpointV2)==null?void 0:l.properties)==null?void 0:u.authSchemes)==null?void 0:f[0],i=await Sh("signer",r.signer)(n),o=t==null?void 0:t.signingRegion,a=t==null?void 0:t.signingRegionSet,c=t==null?void 0:t.signingName;return{config:r,signer:i,signingRegion:o,signingRegionSet:a,signingName:c}};class lle{async sign(e,r,n){var f;if(!Vn.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await cle(n),{config:i,signer:o}=s;let{signingRegion:a,signingName:c}=s;const l=n.context;if(((f=l==null?void 0:l.authSchemes)==null?void 0:f.length)??0>1){const[d,h]=l.authSchemes;(d==null?void 0:d.name)==="sigv4a"&&(h==null?void 0:h.name)==="sigv4"&&(a=(h==null?void 0:h.signingRegion)??a,c=(h==null?void 0:h.signingName)??c)}return await o.sign(e,{signingDate:iL(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return r=>{const n=r.ServerTime??r8(r.$response);if(n){const s=Sh("config",e.config),i=s.systemClockOffset;s.systemClockOffset=n8(n,s.systemClockOffset),s.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const n=r8(e);if(n){const s=Sh("config",r.config);s.systemClockOffset=n8(n,s.systemClockOffset)}}}const ule=(t,e,r)=>{let n,s,i,o=!1;const a=async()=>{s||(s=t());try{n=await s,i=!0,o=!1}finally{s=void 0}return n};return e===void 0?async c=>((!i||c!=null&&c.forceRefresh)&&(n=await a()),n):async c=>((!i||c!=null&&c.forceRefresh)&&(n=await a()),o?n:r&&!r(n)?(o=!0,n):(e(n)&&await a(),n))},fle="X-Amz-Algorithm",dle="X-Amz-Credential",oL="X-Amz-Date",hle="X-Amz-SignedHeaders",ple="X-Amz-Expires",aL="X-Amz-Signature",cL="X-Amz-Security-Token",lL="authorization",uL=oL.toLowerCase(),yle="date",vle=[lL,uL,yle],mle=aL.toLowerCase(),D2="x-amz-content-sha256",gle=cL.toLowerCase(),xle={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},ble=/^proxy-/,wle=/^sec-/,Yx="AWS4-HMAC-SHA256",Ele="AWS4-HMAC-SHA256-PAYLOAD",Sle="UNSIGNED-PAYLOAD",Cle=50,fL="aws4_request",Ale=60*60*24*7,k1={},Jx=[],Xx=(t,e,r)=>`${t}/${e}/${r}/${fL}`,kle=async(t,e,r,n,s)=>{const i=await s8(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${n}:${s}:${Cc(i)}:${e.sessionToken}`;if(o in k1)return k1[o];for(Jx.push(o);Jx.length>Cle;)delete k1[Jx.shift()];let a=`AWS4${e.secretAccessKey}`;for(const c of[r,n,s,fL])a=await s8(t,a,c);return k1[o]=a},s8=(t,e,r)=>{const n=new t(e);return n.update(Eh(r)),n.digest()},i8=({headers:t},e,r)=>{const n={};for(const s of Object.keys(t).sort()){if(t[s]==null)continue;const i=s.toLowerCase();(i in xle||e!=null&&e.has(i)||ble.test(i)||wle.test(i))&&(!r||r&&!r.has(i))||(n[i]=t[s].trim().replace(/\s+/g," "))}return n},Tle=({query:t={}})=>{const e=[],r={};for(const n of Object.keys(t).sort()){if(n.toLowerCase()===mle)continue;e.push(n);const s=t[n];typeof s=="string"?r[n]=`${fa(n)}=${fa(s)}`:Array.isArray(s)&&(r[n]=s.slice(0).reduce((i,o)=>i.concat([`${fa(n)}=${fa(o)}`]),[]).sort().join("&"))}return e.map(n=>r[n]).filter(n=>n).join("&")},Ple=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",Zx=async({headers:t,body:e},r)=>{for(const n of Object.keys(t))if(n.toLowerCase()===D2)return t[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||Ple(e)){const n=new r;return n.update(Eh(e)),Cc(await n.digest())}return Sle};class Rle{format(e){const r=[];for(const i of Object.keys(e)){const o=ed(i);r.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[i]))}const n=new Uint8Array(r.reduce((i,o)=>i+o.byteLength,0));let s=0;for(const i of r)n.set(i,s),s+=i.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 s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const a=ed(e.value),c=new DataView(new ArrayBuffer(3+a.byteLength));c.setUint8(0,7),c.setUint16(1,a.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(a,3),l;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(rA.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ile.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(Ice(e.value.replace(/\-/g,"")),1),f}}}var o8;(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"})(o8||(o8={}));const Ile=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class rA{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,s=Math.abs(Math.round(e));n>-1&&s>0;n--,s/=256)r[n]=s;return e<0&&a8(r),new rA(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&a8(e),parseInt(Cc(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function a8(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Ole=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},_le=(t,e={})=>{var s;const{headers:r,query:n={}}=Vn.clone(t);for(const i of Object.keys(r)){const o=i.toLowerCase();o.slice(0,6)==="x-amz-"&&!((s=e.unhoistableHeaders)!=null&&s.has(o))&&(n[i]=r[i],delete r[i])}return{...t,headers:r,query:n}},c8=t=>{t=Vn.clone(t);for(const e of Object.keys(t.headers))vle.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},Nle=t=>Mle(t).toISOString().replace(/\.\d{3}Z$/,"Z"),Mle=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class l8{constructor({applyChecksum:e,credentials:r,region:n,service:s,sha256:i,uriEscapePath:o=!0}){this.headerFormatter=new Rle,this.service=s,this.sha256=i,this.uriEscapePath=o,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=Aa(n),this.credentialProvider=Aa(r)}async presign(e,r={}){const{signingDate:n=new Date,expiresIn:s=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:a,signingRegion:c,signingService:l}=r,u=await this.credentialProvider();this.validateResolvedCredentials(u);const f=c??await this.regionProvider(),{longDate:d,shortDate:h}=T1(n);if(s>Ale)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Xx(h,f,l??this.service),y=_le(c8(e),{unhoistableHeaders:o});u.sessionToken&&(y.query[cL]=u.sessionToken),y.query[fle]=Yx,y.query[dle]=`${u.accessKeyId}/${p}`,y.query[oL]=d,y.query[ple]=s.toString(10);const g=i8(y,i,a);return y.query[hle]=u8(g),y.query[aL]=await this.getSignature(d,p,this.getSigningKey(u,f,h,l),this.createCanonicalRequest(y,g,await Zx(e,this.sha256))),y}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:s,signingRegion:i,signingService:o}){const a=i??await this.regionProvider(),{shortDate:c,longDate:l}=T1(n),u=Xx(c,a,o??this.service),f=await Zx({headers:{},body:r},this.sha256),d=new this.sha256;d.update(e);const h=Cc(await d.digest()),p=[Ele,l,u,s,h,f].join(` -`);return this.signString(p,{signingDate:n,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:r=new Date,signingRegion:n,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:n,signingService:s,priorSignature:e.priorSignature}).then(o=>({message:e.message,signature:o}))}async signString(e,{signingDate:r=new Date,signingRegion:n,signingService:s}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=n??await this.regionProvider(),{shortDate:a}=T1(r),c=new this.sha256(await this.getSigningKey(i,o,a,s));return c.update(Eh(e)),Cc(await c.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:s,signingRegion:i,signingService:o}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const c=i??await this.regionProvider(),l=c8(e),{longDate:u,shortDate:f}=T1(r),d=Xx(f,c,o??this.service);l.headers[uL]=u,a.sessionToken&&(l.headers[gle]=a.sessionToken);const h=await Zx(l,this.sha256);!Ole(D2,l.headers)&&this.applyChecksum&&(l.headers[D2]=h);const p=i8(l,s,n),y=await this.getSignature(u,d,this.getSigningKey(a,c,f,o),this.createCanonicalRequest(l,p,h));return l.headers[lL]=`${Yx} Credential=${a.accessKeyId}/${d}, SignedHeaders=${u8(p)}, Signature=${y}`,l}createCanonicalRequest(e,r,n){const s=Object.keys(r).sort();return`${e.method} +`)!==S(this,Hp))throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);N(this,Kc,r)}return S(this,Kc)};const Fie="0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO",Uie="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60";let Dx=null;class Na extends Bie{constructor(){super("en",Fie,Uie)}static wordlist(){return Dx==null&&(Dx=new Na),Dx}}function ED(t){return(1<=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*r.length/8));let s=0;for(let l=0;l=0,`invalid mnemonic word at index ${l}`,"mnemonic","[ REDACTED ]");for(let f=0;f<11;f++)u&1<<10-f&&(n[s>>3]|=1<<7-s%8),s++}const i=32*r.length/3,o=r.length/3,a=ED(o),c=fe(ys(n.slice(0,i/8)))[0]&a;return M(c===(n[n.length-1]&a),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),ne(n.slice(0,i/8))}function jx(t,e){M(t.length%4===0&&t.length>=16&&t.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=Na.wordlist());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]&Vie(8-n)),n+=3);const s=t.length/4,i=parseInt(ys(t).substring(2,4),16)&ED(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}const Bx={};class Yf{constructor(e,r,n,s,i){G(this,"phrase");G(this,"password");G(this,"wordlist");G(this,"entropy");s==null&&(s=""),i==null&&(i=Na.wordlist()),$a(e,Bx,"Mnemonic"),me(this,{phrase:n,password:s,wordlist:i,entropy:r})}computeSeed(){const e=Sr("mnemonic"+this.password,"NFKD");return za(Sr(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,r,n){const s=Lx(e,n);return e=jx(fe(s),n),new Yf(Bx,s,e,r,n)}static fromEntropy(e,r,n){const s=fe(e,"entropy"),i=jx(s,n);return new Yf(Bx,ne(s),i,r,n)}static entropyToPhrase(e,r){const n=fe(e,"entropy");return jx(n,r)}static phraseToEntropy(e,r){return Lx(e,r)}static isValidMnemonic(e,r){try{return Lx(e,r),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. */var hr=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Fx=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},fv,Qn,Ks;const $ie={16:10,24:12,32:14},zie=[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],Wn=[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],E1=[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],Hie=[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],Gie=[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],qie=[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],Wie=[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],Kie=[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],Qie=[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],Yie=[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],Jie=[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],Xie=[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],Zie=[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],eoe=[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],toe=[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 Ux(t){const e=[];for(let r=0;r>2,hr(this,Ks,"f")[o][u%4]=i[u],hr(this,Qn,"f")[r-o][u%4]=i[u];let a=0,c=s,l;for(;c>16&255]<<24^Wn[l>>8&255]<<16^Wn[l&255]<<8^Wn[l>>24&255]^zie[a]<<24,a+=1,s!=8)for(let h=1;h>8&255]<<8^Wn[l>>16&255]<<16^Wn[l>>24&255]<<24;for(let h=s/2+1;h>2,d=c%4,hr(this,Ks,"f")[f][d]=i[u],hr(this,Qn,"f")[r-f][d]=i[u++],c++}for(let u=1;u>24&255]^Zie[l>>16&255]^eoe[l>>8&255]^toe[l&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const r=hr(this,Ks,"f").length-1,n=[0,0,0,0];let s=Ux(e);for(let a=0;a<4;a++)s[a]^=hr(this,Ks,"f")[0][a];for(let a=1;a>24&255]^Gie[s[(c+1)%4]>>16&255]^qie[s[(c+2)%4]>>8&255]^Wie[s[(c+3)%4]&255]^hr(this,Ks,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=hr(this,Ks,"f")[r][a],i[4*a]=(Wn[s[a]>>24&255]^o>>24)&255,i[4*a+1]=(Wn[s[(a+1)%4]>>16&255]^o>>16)&255,i[4*a+2]=(Wn[s[(a+2)%4]>>8&255]^o>>8)&255,i[4*a+3]=(Wn[s[(a+3)%4]&255]^o)&255;return i}decrypt(e){if(e.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const r=hr(this,Qn,"f").length-1,n=[0,0,0,0];let s=Ux(e);for(let a=0;a<4;a++)s[a]^=hr(this,Qn,"f")[0][a];for(let a=1;a>24&255]^Qie[s[(c+3)%4]>>16&255]^Yie[s[(c+2)%4]>>8&255]^Jie[s[(c+1)%4]&255]^hr(this,Qn,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=hr(this,Qn,"f")[r][a],i[4*a]=(E1[s[a]>>24&255]^o>>24)&255,i[4*a+1]=(E1[s[(a+3)%4]>>16&255]^o>>16)&255,i[4*a+2]=(E1[s[(a+2)%4]>>8&255]^o>>8)&255,i[4*a+3]=(E1[s[(a+1)%4]&255]^o)&255;return i}}fv=new WeakMap,Qn=new WeakMap,Ks=new WeakMap;class SD{constructor(e,r,n){if(n&&!(this instanceof n))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new zC(r)},name:{enumerable:!0,value:e}})}}var S1=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},$l=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},rh,Oi;class HC extends SD{constructor(e,r){if(super("ECC",e,HC),rh.set(this,void 0),Oi.set(this,void 0),r){if(r.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");S1(this,rh,new Uint8Array(r),"f")}else S1(this,rh,new Uint8Array(16),"f");S1(this,Oi,this.iv,"f")}get iv(){return new Uint8Array($l(this,rh,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const r=new Uint8Array(e.length);for(let n=0;nNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let r=15;r>=0;--r)Kn(this,Yn,"f")[r]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");Kn(this,Yn,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(Kn(this,Yn,"f")[e]===255)Kn(this,Yn,"f")[e]=0;else{Kn(this,Yn,"f")[e]++;break}}encrypt(e){var r,n;const s=new Uint8Array(e);for(let i=0;i16)throw new TypeError("PKCS#7 padding byte out of range");const r=t.length-e;for(let n=0;n0&&(n&n-1)===0,"invalid kdf.N","kdf.N",n),M(s>0&&i>0,"invalid kdf","kdf",e);const o=Ht(t,"crypto.kdfparams.dklen:int!");return M(o===32,"invalid kdf.dklen","kdf.dflen",o),{name:"scrypt",salt:r,N:n,r:s,p:i,dkLen:64}}else if(e.toLowerCase()==="pbkdf2"){const r=Ht(t,"crypto.kdfparams.salt:data!"),n=Ht(t,"crypto.kdfparams.prf:string!"),s=n.split("-").pop();M(s==="sha256"||s==="sha512","invalid kdf.pdf","kdf.pdf",n);const i=Ht(t,"crypto.kdfparams.c:int!"),o=Ht(t,"crypto.kdfparams.dklen:int!");return M(o===32,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:r,count:i,dkLen:o,algorithm:s}}}M(!1,"unsupported key-derivation function","kdf",e)}function soe(t,e){const r=JSON.parse(t),n=Sy(e),s=kD(r);if(s.name==="pbkdf2"){const{salt:f,count:d,dkLen:h,algorithm:p}=s,y=za(n,f,d,h,p);return w0(r,y)}J(s.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:i,N:o,r:a,p:c,dkLen:l}=s,u=vd(n,i,o,a,c,l);return w0(r,u)}function O3(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}async function ioe(t,e,r){const n=JSON.parse(t),s=Sy(e),i=kD(n);if(i.name==="pbkdf2"){r&&(r(0),await O3(0));const{salt:d,count:h,dkLen:p,algorithm:y}=i,g=za(s,d,h,p,y);return r&&(r(1),await O3(0)),w0(n,g)}J(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:o,N:a,r:c,p:l,dkLen:u}=i,f=await yd(s,o,a,c,l,u,r);return w0(n,f)}function TD(t){const e=t.salt!=null?fe(t.salt,"options.salt"):co(32);let r=1<<17,n=8,s=1;return t.scrypt&&(t.scrypt.N&&(r=t.scrypt.N),t.scrypt.r&&(n=t.scrypt.r),t.scrypt.p&&(s=t.scrypt.p)),M(typeof r=="number"&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),M(typeof n=="number"&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),M(typeof s=="number"&&s>0&&Number.isSafeInteger(s),"invalid scrypt p parameter","options.p",s),{name:"scrypt",dkLen:32,salt:e,N:r,r:n,p:s}}function PD(t,e,r,n){const s=fe(r.privateKey,"privateKey"),i=n.iv!=null?fe(n.iv,"options.iv"):co(16);M(i.length===16,"invalid options.iv length","options.iv",n.iv);const o=n.uuid!=null?fe(n.uuid,"options.uuid"):co(16);M(o.length===16,"invalid options.uuid length","options.uuid",n.iv);const a=t.slice(0,16),c=t.slice(16,32),l=new Jf(a,i),u=fe(l.encrypt(s)),f=Ct(ot([c,u])),d={address:r.address.substring(2).toLowerCase(),id:ute(o),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:ne(i).substring(2)},ciphertext:ne(u).substring(2),kdf:"scrypt",kdfparams:{salt:ne(e.salt).substring(2),n:e.N,dklen:32,p:e.p,r:e.r},mac:f.substring(2)}};if(r.mnemonic){const h=n.client!=null?n.client:`ethers/${i7}`,p=r.mnemonic.path||AD,y=r.mnemonic.locale||"en",g=t.slice(32,64),m=fe(r.mnemonic.entropy,"account.mnemonic.entropy"),x=co(16),b=new Jf(g,x),w=fe(b.encrypt(m)),A=new Date,_="UTC--"+(A.getUTCFullYear()+"-"+Ud(A.getUTCMonth()+1,2)+"-"+Ud(A.getUTCDate(),2)+"T"+Ud(A.getUTCHours(),2)+"-"+Ud(A.getUTCMinutes(),2)+"-"+Ud(A.getUTCSeconds(),2)+".0Z")+"--"+d.address;d["x-ethers"]={client:h,gethFilename:_,path:p,locale:y,mnemonicCounter:ne(x).substring(2),mnemonicCiphertext:ne(w).substring(2),version:"0.1"}}return JSON.stringify(d)}function RD(t,e,r){r==null&&(r={});const n=Sy(e),s=TD(r),i=vd(n,s.salt,s.N,s.r,s.p,64);return PD(fe(i),s,t,r)}async function ID(t,e,r){r==null&&(r={});const n=Sy(e),s=TD(r),i=await yd(n,s.salt,s.N,s.r,s.p,64,r.progressCallback);return PD(fe(i),s,t,r)}const Vx="m/44'/60'/0'/0/0",ooe=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),Sa=2147483648,aoe=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),coe="0123456789abcdef";function E0(t,e){let r="";for(;t;)r=coe[t%16]+r,t=Math.trunc(t/16);for(;r.length=0;o-=8)s[33+(o>>3)]=t>>24-o&255;const i=fe(hd("sha512",e,s));return{IL:i.slice(0,32),IR:i.slice(32)}}function _D(t,e){const r=e.split("/");M(r.length>0,"invalid path","path",e),r[0]==="m"&&(M(t.depth===0,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${t.depth}`,"path",e),r.shift());let n=t;for(let s=0;s=16&&s.length<=64,"invalid seed","seed","[REDACTED]");const i=fe(hd("sha512",ooe,s)),o=new gi(ne(i.slice(0,32)));return new ws(Js,o,"0x00000000",ne(i.slice(32)),"m",0,0,n,null)},W(ws,Qc);let bh=ws;class lp extends g2{constructor(r,n,s,i,o,a,c,l,u){super(n,u);G(this,"publicKey");G(this,"fingerprint");G(this,"parentFingerprint");G(this,"chainCode");G(this,"path");G(this,"index");G(this,"depth");$a(r,Js,"HDNodeVoidWallet"),me(this,{publicKey:s});const f=xt(pd(ys(s)),0,4);me(this,{publicKey:s,fingerprint:f,parentFingerprint:i,chainCode:o,path:a,index:c,depth:l})}connect(r){return new lp(Js,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,r)}get extendedKey(){return J(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),A2(ot(["0x0488B21E",E0(this.depth,1),this.parentFingerprint,E0(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(r){const n=_e(r,"index");M(n<=4294967295,"invalid index","index",n);let s=this.path;s&&(s+="/"+(n&~Sa),n&Sa&&(s+="'"));const{IR:i,IL:o}=OD(n,this.chainCode,this.publicKey,null),a=gi.addPoints(o,this.publicKey,!0),c=gy(a);return new lp(Js,c,a,this.fingerprint,ne(i),s,n,this.depth+1,this.provider)}derivePath(r){return _D(this,r)}}function _3(t){try{if(JSON.parse(t).encseed)return!0}catch{}return!1}function N3(t,e){const r=JSON.parse(t),n=Sy(e),s=Xe(Ht(r,"ethaddr:string!")),i=CD(Ht(r,"encseed:string!"));M(i&&i.length%16===0,"invalid encseed","json",t);const o=fe(za(n,n,2e3,32,"sha256")).slice(0,16),a=i.slice(0,16),c=i.slice(16),l=new HC(o,a),u=roe(fe(l.decrypt(c)));let f="";for(let d=0;d{setTimeout(()=>{e()},t)})}var Wp,T2;const pc=class pc extends x0{constructor(e,r){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new gi(e):e;super(n,r)}connect(e){return new pc(this.signingKey,e)}async encrypt(e,r){const n={address:this.address,privateKey:this.privateKey};return await ID(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return RD(r,e)}static async fromEncryptedJson(e,r,n){var i;let s=null;return I3(e)?s=await ioe(e,r,n):_3(e)&&(n&&(n(0),await M3(0)),s=N3(e,r),n&&(n(1),await M3(0))),ee(i=pc,Wp,T2).call(i,s)}static fromEncryptedJsonSync(e,r){var s;let n=null;return I3(e)?n=soe(e,r):_3(e)?n=N3(e,r):M(!1,"invalid JSON wallet","json","[ REDACTED ]"),ee(s=pc,Wp,T2).call(s,n)}static createRandom(e){const r=bh.createRandom();return e?r.connect(e):r}static fromPhrase(e,r){const n=bh.fromPhrase(e);return r?n.connect(r):n}};Wp=new WeakSet,T2=function(e){if(M(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=Yf.fromEntropy(e.mnemonic.entropy),s=bh.fromMnemonic(n,e.mnemonic.path);if(s.address===e.address&&s.privateKey===e.privateKey)return s;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const r=new pc(e.privateKey);return M(r.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),r},W(pc,Wp);let up=pc;const loe={en:Na.wordlist()};BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const GC=t=>{const e=t.toString(16);return`${e.length%2===0?"0x":"0x0"}${e}`};function P2(){return P2=Object.assign?Object.assign.bind():function(t){for(var e=1;e0&&(e+=","),e+=JSON.stringify(i),e+=":",r(s[i])}}let K=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.B3_SEPOLIA=1993]="B3_SEPOLIA",t[t.APECHAIN_TESTNET=33111]="APECHAIN_TESTNET",t[t.BLAST=81457]="BLAST",t[t.BLAST_SEPOLIA=168587773]="BLAST_SEPOLIA",t[t.BORNE_TESTNET=94984]="BORNE_TESTNET",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t}({}),Fe=function(t){return t.MAINNET="mainnet",t.TESTNET="testnet",t}({});const S0={[K.MAINNET]:{chainId:K.MAINNET,type:Fe.MAINNET,name:"mainnet",title:"Ethereum",logoURI:`https://assets.sequence.info/images/networks/medium/${K.MAINNET}.webp`,blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[K.ROPSTEN]:{chainId:K.ROPSTEN,type:Fe.TESTNET,name:"ropsten",title:"Ropsten",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.RINKEBY]:{chainId:K.RINKEBY,type:Fe.TESTNET,name:"rinkeby",title:"Rinkeby",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.GOERLI]:{chainId:K.GOERLI,type:Fe.TESTNET,name:"goerli",title:"Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.KOVAN]:{chainId:K.KOVAN,type:Fe.TESTNET,name:"kovan",title:"Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${K.KOVAN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"},nativeToken:{symbol:"kETH",name:"Kovan Ether",decimals:18},deprecated:!0},[K.SEPOLIA]:{chainId:K.SEPOLIA,type:Fe.TESTNET,name:"sepolia",title:"Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Sepolia)",rootUrl:"https://sepolia.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[K.POLYGON]:{chainId:K.POLYGON,type:Fe.MAINNET,name:"polygon",title:"Polygon",logoURI:`https://assets.sequence.info/images/networks/medium/${K.POLYGON}.webp`,blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},nativeToken:{symbol:"MATIC",name:"Polygon",decimals:18}},[K.POLYGON_MUMBAI]:{chainId:K.POLYGON_MUMBAI,type:Fe.TESTNET,name:"mumbai",title:"Polygon Mumbai",logoURI:`https://assets.sequence.info/images/networks/medium/${K.POLYGON_MUMBAI}.webp`,testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"},nativeToken:{symbol:"mMATIC",name:"Mumbai Polygon",decimals:18},deprecated:!0},[K.POLYGON_AMOY]:{chainId:K.POLYGON_AMOY,type:Fe.TESTNET,name:"amoy",title:"Polygon Amoy",logoURI:`https://assets.sequence.info/images/networks/medium/${K.POLYGON_AMOY}.webp`,testnet:!0,blockExplorer:{name:"OKLink (Amoy)",rootUrl:"https://www.oklink.com/amoy/"},nativeToken:{symbol:"aMATIC",name:"Amoy Polygon",decimals:18}},[K.POLYGON_ZKEVM]:{chainId:K.POLYGON_ZKEVM,type:Fe.MAINNET,name:"polygon-zkevm",title:"Polygon zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${K.POLYGON_ZKEVM}.webp`,blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.BSC]:{chainId:K.BSC,type:Fe.MAINNET,name:"bsc",title:"BNB Smart Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BSC}.webp`,blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"},nativeToken:{symbol:"BNB",name:"BNB",decimals:18}},[K.BSC_TESTNET]:{chainId:K.BSC_TESTNET,type:Fe.TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BSC_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"},nativeToken:{symbol:"tBNB",name:"Testnet BNB",decimals:18}},[K.OPTIMISM]:{chainId:K.OPTIMISM,type:Fe.MAINNET,name:"optimism",title:"Optimism",logoURI:`https://assets.sequence.info/images/networks/medium/${K.OPTIMISM}.webp`,blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.OPTIMISM_KOVAN]:{chainId:K.OPTIMISM_KOVAN,type:Fe.TESTNET,name:"optimism-kovan",title:"Optimism Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.OPTIMISM_GOERLI]:{chainId:K.OPTIMISM_GOERLI,type:Fe.TESTNET,name:"optimism-goerli",title:"Optimism Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.OPTIMISM_SEPOLIA]:{chainId:K.OPTIMISM_SEPOLIA,type:Fe.TESTNET,name:"optimism-sepolia",title:"Optimism Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.OPTIMISM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Sepolia)",rootUrl:"https://sepolia-optimistic.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[K.ARBITRUM]:{chainId:K.ARBITRUM,type:Fe.MAINNET,name:"arbitrum",title:"Arbitrum One",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ARBITRUM}.webp`,blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.ARBITRUM_GOERLI]:{chainId:K.ARBITRUM_GOERLI,type:Fe.TESTNET,name:"arbitrum-goerli",title:"Arbitrum Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.ARBITRUM_SEPOLIA]:{chainId:K.ARBITRUM_SEPOLIA,type:Fe.TESTNET,name:"arbitrum-sepolia",title:"Arbitrum Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ARBITRUM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Arbiscan (Sepolia Testnet)",rootUrl:"https://sepolia.arbiscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[K.ARBITRUM_NOVA]:{chainId:K.ARBITRUM_NOVA,type:Fe.MAINNET,name:"arbitrum-nova",title:"Arbitrum Nova",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ARBITRUM_NOVA}.webp`,blockExplorer:{name:"Arbiscan Nova",rootUrl:"https://nova.arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.AVALANCHE]:{chainId:K.AVALANCHE,type:Fe.MAINNET,name:"avalanche",title:"Avalanche",logoURI:`https://assets.sequence.info/images/networks/medium/${K.AVALANCHE}.webp`,blockExplorer:{name:"Snowtrace",rootUrl:"https://subnets.avax.network/c-chain/"},nativeToken:{symbol:"AVAX",name:"AVAX",decimals:18}},[K.AVALANCHE_TESTNET]:{chainId:K.AVALANCHE_TESTNET,type:Fe.TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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}},[K.GNOSIS]:{chainId:K.GNOSIS,type:Fe.MAINNET,name:"gnosis",title:"Gnosis Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${K.GNOSIS}.webp`,blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"},nativeToken:{symbol:"XDAI",name:"XDAI",decimals:18}},[K.BASE]:{chainId:K.BASE,type:Fe.MAINNET,name:"base",title:"Base (Coinbase)",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BASE}.webp`,blockExplorer:{name:"Base Explorer",rootUrl:"https://basescan.org/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.BASE_GOERLI]:{chainId:K.BASE_GOERLI,type:Fe.TESTNET,name:"base-goerli",title:"Base Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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},[K.BASE_SEPOLIA]:{chainId:K.BASE_SEPOLIA,type:Fe.TESTNET,name:"base-sepolia",title:"Base Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BASE_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Base Sepolia Explorer",rootUrl:"https://base-sepolia.blockscout.com/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[K.HOMEVERSE]:{chainId:K.HOMEVERSE,type:Fe.MAINNET,name:"homeverse",title:"Oasys Homeverse",logoURI:`https://assets.sequence.info/images/networks/medium/${K.HOMEVERSE}.webp`,blockExplorer:{name:"Oasys Homeverse Explorer",rootUrl:"https://explorer.oasys.homeverse.games/"},nativeToken:{symbol:"OAS",name:"OAS",decimals:18}},[K.HOMEVERSE_TESTNET]:{chainId:K.HOMEVERSE_TESTNET,type:Fe.TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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}},[K.XAI]:{chainId:K.XAI,type:Fe.MAINNET,name:"xai",title:"Xai",logoURI:`https://assets.sequence.info/images/networks/medium/${K.XAI}.webp`,blockExplorer:{name:"Xai Explorer",rootUrl:"https://explorer.xai-chain.net/"},nativeToken:{symbol:"XAI",name:"XAI",decimals:18}},[K.XAI_SEPOLIA]:{chainId:K.XAI_SEPOLIA,type:Fe.TESTNET,name:"xai-sepolia",title:"Xai Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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}},[K.ASTAR_ZKEVM]:{chainId:K.ASTAR_ZKEVM,type:Fe.MAINNET,name:"astar-zkevm",title:"Astar zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ASTAR_ZKEVM}.webp`,blockExplorer:{name:"Astar zkEVM Explorer",rootUrl:"https://astar-zkevm.explorer.startale.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.ASTAR_ZKYOTO]:{chainId:K.ASTAR_ZKYOTO,type:Fe.TESTNET,name:"astar-zkyoto",title:"Astar zKyoto Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.ASTAR_ZKYOTO}.webp`,testnet:!0,blockExplorer:{name:"Astar zKyoto Explorer",rootUrl:"https://astar-zkyoto.blockscout.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.XR_SEPOLIA]:{chainId:K.XR_SEPOLIA,type:Fe.TESTNET,name:"xr-sepolia",title:"XR Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.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}},[K.B3_SEPOLIA]:{chainId:K.B3_SEPOLIA,type:Fe.TESTNET,name:"b3-sepolia",title:"B3 Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.B3_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"B3 Sepolia Explorer",rootUrl:"https://sepolia.explorer.b3.fun/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.APECHAIN_TESTNET]:{chainId:K.APECHAIN_TESTNET,type:Fe.TESTNET,name:"apechain-testnet",title:"APE Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.APECHAIN_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"APE Chain Explorer",rootUrl:"https://curtis.explorer.caldera.xyz/"},nativeToken:{symbol:"APE",name:"ApeCoin",decimals:18}},[K.BLAST]:{chainId:K.BLAST,type:Fe.MAINNET,name:"blast",title:"Blast",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BLAST}.webp`,blockExplorer:{name:"Blast Explorer",rootUrl:"https://blastscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.BLAST_SEPOLIA]:{chainId:K.BLAST_SEPOLIA,type:Fe.TESTNET,name:"blast-sepolia",title:"Blast Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BLAST_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Blast Sepolia Explorer",rootUrl:"https://sepolia.blastexplorer.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.TELOS]:{chainId:K.TELOS,type:Fe.MAINNET,name:"telos",title:"Telos",logoURI:`https://assets.sequence.info/images/networks/medium/${K.TELOS}.webp`,blockExplorer:{name:"Telos Explorer",rootUrl:"https://explorer.telos.net/network/"},nativeToken:{symbol:"TLOS",name:"TLOS",decimals:18}},[K.BORNE_TESTNET]:{chainId:K.BORNE_TESTNET,type:Fe.TESTNET,name:"borne-testnet",title:"Borne Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${K.BORNE_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"Borne Testnet Explorer",rootUrl:"https://subnets-test.avax.network/bornegfdn"},nativeToken:{symbol:"BORNE",name:"BORNE",decimals:18}},[K.HARDHAT]:{chainId:K.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[K.HARDHAT_2]:{chainId:K.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}}};function Xf(){return Xf=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 s=n.map(l=>l.chainId).sort(),i=s.filter((l,u)=>s.indexOf(l)!==u);if(i.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${i}`);return!1}n.forEach(l=>l.name=l.name.toLowerCase());const o=n.map(l=>l.name).sort(),a=o.filter((l,u)=>o.indexOf(l)!==u);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let c=!1;for(let l=0;l(hoe(t,!0,e),t),yoe=t=>poe(moe(t)),voe=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=Number(e);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(typeof e=="bigint"){const r=Number(e);return t.find(n=>n.chainId===r)}else return}},moe=t=>{if(!t)return[];const e=t.sort((n,s)=>n.chainId===s.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},qC=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let s=e[n];return typeof s=="function"?s=s():s==null?s="":typeof s=="object"||typeof s=="symbol"?s=s.toString():s=s.valueOf(),s})):"",ND=t=>qC("https://${network}-indexer.sequence.app",{network:t}),goe=t=>qC("https://${network}-relayer.sequence.app",{network:t}),xoe=t=>qC("https://nodes.sequence.app/${network}",{network:t});function fp(t){return voe(woe,t)}const Ke=(t,e)=>{const r=S0[t];if(!r)throw new Error(`Network with chainId ${t} not found`);const n=xoe(r.name);return Xf({},r,{rpcUrl:n,indexerUrl:ND(r.name),relayer:{url:goe(r.name),provider:{url:n}}},e)},boe=[Xf({},S0[K.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Xf({},S0[K.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})],woe=yoe([Xf({},Ke(K.POLYGON),{isDefaultChain:!0,isAuthChain:!0}),Ke(K.MAINNET),Ke(K.BSC),Ke(K.AVALANCHE),Ke(K.ARBITRUM),Ke(K.ARBITRUM_NOVA),Ke(K.OPTIMISM),Ke(K.OPTIMISM_SEPOLIA),Ke(K.POLYGON_ZKEVM),Ke(K.GNOSIS),Ke(K.RINKEBY,{disabled:!0}),Ke(K.GOERLI,{disabled:!0}),Ke(K.SEPOLIA),Ke(K.POLYGON_MUMBAI,{disabled:!0}),Ke(K.POLYGON_AMOY),Ke(K.BSC_TESTNET),Ke(K.ARBITRUM_SEPOLIA),Ke(K.BASE),Ke(K.BASE_SEPOLIA),Ke(K.HOMEVERSE),Ke(K.HOMEVERSE_TESTNET),Ke(K.XAI),Ke(K.XAI_SEPOLIA),Ke(K.AVALANCHE_TESTNET),Ke(K.ASTAR_ZKEVM),Ke(K.ASTAR_ZKYOTO),Ke(K.XR_SEPOLIA),Ke(K.B3_SEPOLIA),Ke(K.APECHAIN_TESTNET),Ke(K.BLAST),Ke(K.BLAST_SEPOLIA),Ke(K.TELOS),Ke(K.BORNE_TESTNET),...boe]),Eoe=(t,e)=>e.some(r=>t instanceof r);let D3,L3;function Soe(){return D3||(D3=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Coe(){return L3||(L3=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const MD=new WeakMap,R2=new WeakMap,DD=new WeakMap,$x=new WeakMap,WC=new WeakMap;function Aoe(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Ca(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&MD.set(r,t)}).catch(()=>{}),WC.set(e,t),e}function koe(t){if(R2.has(t))return;const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),s()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});R2.set(t,e)}let I2={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return R2.get(t);if(e==="objectStoreNames")return t.objectStoreNames||DD.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ca(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 Toe(t){I2=t(I2)}function Poe(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(zx(this),e,...r);return DD.set(n,e.sort?e.sort():[e]),Ca(n)}:Coe().includes(t)?function(...e){return t.apply(zx(this),e),Ca(MD.get(this))}:function(...e){return Ca(t.apply(zx(this),e))}}function Roe(t){return typeof t=="function"?Poe(t):(t instanceof IDBTransaction&&koe(t),Eoe(t,Soe())?new Proxy(t,I2):t)}function Ca(t){if(t instanceof IDBRequest)return Aoe(t);if($x.has(t))return $x.get(t);const e=Roe(t);return e!==t&&($x.set(t,e),WC.set(e,t)),e}const zx=t=>WC.get(t);function Ioe(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Ca(o);return n&&o.addEventListener("upgradeneeded",c=>{n(Ca(o.result),c.oldVersion,c.newVersion,Ca(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),a.then(c=>{i&&c.addEventListener("close",()=>i()),s&&c.addEventListener("versionchange",l=>s(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const Ooe=["get","getKey","getAll","getAllKeys","count"],_oe=["put","add","delete","clear"],Hx=new Map;function j3(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Hx.get(e))return Hx.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=_oe.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||Ooe.includes(r)))return;const i=async function(o,...a){const c=this.transaction(o,s?"readwrite":"readonly");let l=c.store;return n&&(l=l.index(a.shift())),(await Promise.all([l[r](...a),s&&c.done]))[0]};return Hx.set(e,i),i}Toe(t=>({...t,get:(e,r,n)=>j3(e,r)||t.get(e,r,n),has:(e,r)=>!!j3(e,r)||t.has(e,r)}));const Noe=t=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},Moe=t=>({httpHandler:t.httpHandler()});var B3;(function(t){t.HEADER="header",t.QUERY="query"})(B3||(B3={}));var F3;(function(t){t.HEADER="header",t.QUERY="query"})(F3||(F3={}));var dp;(function(t){t.HTTP="http",t.HTTPS="https"})(dp||(dp={}));var C0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(C0||(C0={}));var U3;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(U3||(U3={}));const O2="__smithy_context";var V3;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(V3||(V3={}));var $3;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})($3||($3={}));class Vn{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 Vn({...e,headers:{...e.headers}});return r.query&&(r.query=Doe(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 Vn.clone(this)}}function Doe(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}class A0{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 Loe=t=>e=>async r=>{if(!Vn.isInstance(r.request))return e(r);const{request:n}=r,{handlerProtocol:s=""}=t.requestHandler.metadata||{};if(s.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 i=n.hostname;n.port!=null&&(i+=`:${n.port}`),n.headers.host=i}return e(r)},joe={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Boe=t=>({applyToStack:e=>{e.add(Loe(t),joe)}}),Foe=()=>(t,e)=>async r=>{var n,s;try{const i=await t(r),{clientName:o,commandName:a,logger:c,dynamoDbDocumentClientOptions:l={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:f}=l,d=u??e.inputFilterSensitiveLog,h=f??e.outputFilterSensitiveLog,{$metadata:p,...y}=i.output;return(n=c==null?void 0:c.info)==null||n.call(c,{clientName:o,commandName:a,input:d(r.input),output:h(y),metadata:p}),i}catch(i){const{clientName:o,commandName:a,logger:c,dynamoDbDocumentClientOptions:l={}}=e,{overrideInputFilterSensitiveLog:u}=l,f=u??e.inputFilterSensitiveLog;throw(s=c==null?void 0:c.error)==null||s.call(c,{clientName:o,commandName:a,input:f(r.input),error:i,metadata:i.$metadata}),i}},Uoe={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Voe=t=>({applyToStack:e=>{e.add(Foe(),Uoe)}}),z3="X-Amzn-Trace-Id",$oe="AWS_LAMBDA_FUNCTION_NAME",zoe="_X_AMZN_TRACE_ID",Hoe=t=>e=>async r=>{const{request:n}=r;if(!Vn.isInstance(n)||t.runtime!=="node"||n.headers.hasOwnProperty(z3))return e(r);const s=process.env[$oe],i=process.env[zoe],o=a=>typeof a=="string"&&a.length>0;return o(s)&&o(i)&&(n.headers[z3]=i),e({...r,request:n})},Goe={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qoe=t=>({applyToStack:e=>{e.add(Hoe(t),Goe)}});function Woe(t){return{...t,customUserAgent:typeof t.customUserAgent=="string"?[[t.customUserAgent]]:t.customUserAgent}}class Koe{constructor({size:e,params:r}){this.data=new Map,this.parameters=[],this.capacity=e??50,r&&(this.parameters=r)}get(e,r){const n=this.hash(e);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const s=this.data.keys();let i=0;for(;;){const{value:o,done:a}=s.next();if(this.data.delete(o),a||++i>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(e){let r="";const{parameters:n}=this;if(n.length===0)return!1;for(const s of n){const i=String(e[s]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}}const Qoe=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}$"),LD=t=>Qoe.test(t)||t.startsWith("[")&&t.endsWith("]"),Yoe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),KC=(t,e=!1)=>{if(!e)return Yoe.test(t);const r=t.split(".");for(const n of r)if(!KC(n))return!1;return!0},k0={},hp="endpoints";function Ma(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Ma(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Ma).join(", ")})`:JSON.stringify(t,null,2)}class $n extends Error{constructor(e){super(e),this.name="EndpointError"}}const Joe=(t,e)=>t===e,Xoe=t=>{const e=t.split("."),r=[];for(const n of e){const s=n.indexOf("[");if(s!==-1){if(n.indexOf("]")!==n.length-1)throw new $n(`Path: '${t}' does not end with ']'`);const i=n.slice(s+1,-1);if(Number.isNaN(parseInt(i)))throw new $n(`Invalid array index: '${i}' in path: '${t}'`);s!==0&&r.push(n.slice(0,s)),r.push(i)}else r.push(n)}return r},jD=(t,e)=>Xoe(e).reduce((r,n)=>{if(typeof r!="object")throw new $n(`Index '${n}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]},t),Zoe=t=>t!=null,eae=t=>!t,Gx={[dp.HTTP]:80,[dp.HTTPS]:443},tae=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:y="",query:g={}}=t,m=new URL(`${p}//${d}${h?`:${h}`:""}${y}`);return m.search=Object.entries(g).map(([x,b])=>`${x}=${b}`).join("&"),m}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:s,pathname:i,protocol:o,search:a}=e;if(a)return null;const c=o.slice(0,-1);if(!Object.values(dp).includes(c))return null;const l=LD(s),u=r.includes(`${n}:${Gx[c]}`)||typeof t=="string"&&t.includes(`${n}:${Gx[c]}`),f=`${n}${u?`:${Gx[c]}`:""}`;return{scheme:c,authority:f,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:l}},rae=(t,e)=>t===e,nae=(t,e,r,n)=>e>=r||t.lengthencodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),iae={booleanEquals:Joe,getAttr:jD,isSet:Zoe,isValidHostLabel:KC,not:eae,parseURL:tae,stringEquals:rae,substring:nae,uriEncode:sae},BD=(t,e)=>{const r=[],n={...e.endpointParams,...e.referenceRecord};let s=0;for(;s({...e.endpointParams,...e.referenceRecord})[t],rg=(t,e,r)=>{if(typeof t=="string")return BD(t,r);if(t.fn)return FD(t,r);if(t.ref)return oae(t,r);throw new $n(`'${e}': ${String(t)} is not a string, function or reference.`)},FD=({fn:t,argv:e},r)=>{const n=e.map(i=>["boolean","number"].includes(typeof i)?i:rg(i,"arg",r)),s=t.split(".");return s[0]in k0&&s[1]!=null?k0[s[0]][s[1]](...n):iae[t](...n)},aae=({assign:t,...e},r)=>{var s,i;if(t&&t in r.referenceRecord)throw new $n(`'${t}' is already defined in Reference Record.`);const n=FD(e,r);return(i=(s=r.logger)==null?void 0:s.debug)==null||i.call(s,`${hp} evaluateCondition: ${Ma(e)} = ${Ma(n)}`),{result:n===""?!0:!!n,...t!=null&&{toAssign:{name:t,value:n}}}},QC=(t=[],e)=>{var n,s;const r={};for(const i of t){const{result:o,toAssign:a}=aae(i,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!o)return{result:o};a&&(r[a.name]=a.value,(s=(n=e.logger)==null?void 0:n.debug)==null||s.call(n,`${hp} assign: ${a.name} := ${Ma(a.value)}`))}return{result:!0,referenceRecord:r}},cae=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:s.map(i=>{const o=rg(i,"Header value entry",e);if(typeof o!="string")throw new $n(`Header '${n}' value '${o}' is not a string`);return o})}),{}),UD=(t,e)=>{if(Array.isArray(t))return t.map(r=>UD(r,e));switch(typeof t){case"string":return BD(t,e);case"object":if(t===null)throw new $n(`Unexpected endpoint property: ${t}`);return VD(t,e);case"boolean":return t;default:throw new $n(`Unexpected endpoint property type: ${typeof t}`)}},VD=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:UD(s,e)}),{}),lae=(t,e)=>{const r=rg(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 $n(`Endpoint URL must be a string, got ${typeof r}`)},uae=(t,e)=>{var u,f;const{conditions:r,endpoint:n}=t,{result:s,referenceRecord:i}=QC(r,e);if(!s)return;const o={...e,referenceRecord:{...e.referenceRecord,...i}},{url:a,properties:c,headers:l}=n;return(f=(u=e.logger)==null?void 0:u.debug)==null||f.call(u,`${hp} Resolving endpoint from template: ${Ma(n)}`),{...l!=null&&{headers:cae(l,o)},...c!=null&&{properties:VD(c,o)},url:lae(a,o)}},fae=(t,e)=>{const{conditions:r,error:n}=t,{result:s,referenceRecord:i}=QC(r,e);if(s)throw new $n(rg(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},dae=(t,e)=>{const{conditions:r,rules:n}=t,{result:s,referenceRecord:i}=QC(r,e);if(s)return $D(n,{...e,referenceRecord:{...e.referenceRecord,...i}})},$D=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const n=uae(r,e);if(n)return n}else if(r.type==="error")fae(r,e);else if(r.type==="tree"){const n=dae(r,e);if(n)return n}else throw new $n(`Unknown endpoint rule: ${r}`);throw new $n("Rules evaluation failed")},hae=(t,e)=>{var l,u,f,d;const{endpointParams:r,logger:n}=e,{parameters:s,rules:i}=t;(u=(l=e.logger)==null?void 0:l.debug)==null||u.call(l,`${hp} Initial EndpointParams: ${Ma(r)}`);const o=Object.entries(s).filter(([,h])=>h.default!=null).map(([h,p])=>[h,p.default]);if(o.length>0)for(const[h,p]of o)r[h]=r[h]??p;const a=Object.entries(s).filter(([,h])=>h.required).map(([h])=>h);for(const h of a)if(r[h]==null)throw new $n(`Missing required parameter: '${h}'`);const c=$D(i,{endpointParams:r,logger:n,referenceRecord:{}});return(d=(f=e.logger)==null?void 0:f.debug)==null||d.call(f,`${hp} Resolved endpoint: ${Ma(c)}`),c},zD=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!zD(r))return!1;return!0}return!(!KC(t)||t.length<3||t.length>63||t!==t.toLowerCase()||LD(t))},H3=":",pae="/",yae=t=>{const e=t.split(H3);if(e.length<6)return null;const[r,n,s,i,o,...a]=e;if(r!=="arn"||n===""||s===""||a.join(H3)==="")return null;const c=a.map(l=>l.split(pae)).flat();return{partition:n,service:s,region:i,accountId:o,resourceId:c}},vae=[{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|mx)\\-\\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)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"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:{}}],mae="1.1",gae={partitions:vae,version:mae};let xae=gae;const bae=t=>{const{partitions:e}=xae;for(const n of e){const{regions:s,outputs:i}=n;for(const[o,a]of Object.entries(s))if(o===t)return{...i,...a}}for(const n of e){const{regionRegex:s,outputs:i}=n;if(new RegExp(s).test(t))return{...i}}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}},HD={isVirtualHostableS3Bucket:zD,parseArn:yae,partition:bae};k0.aws=HD;const G3="user-agent",qx="x-amz-user-agent",q3=" ",Wx="/",wae=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Eae=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,W3="-",Sae=t=>(e,r)=>async n=>{var f,d;const{request:s}=n;if(!Vn.isInstance(s))return e(n);const{headers:i}=s,o=((f=r==null?void 0:r.userAgent)==null?void 0:f.map(Kx))||[],a=(await t.defaultUserAgentProvider()).map(Kx),c=((d=t==null?void 0:t.customUserAgent)==null?void 0:d.map(Kx))||[],l=[].concat([...a,...o,...c]).join(q3),u=[...a.filter(h=>h.startsWith("aws-sdk-")),...c].join(q3);return t.runtime!=="browser"?(u&&(i[qx]=i[qx]?`${i[G3]} ${u}`:u),i[G3]=l):i[qx]=l,e({...n,request:s})},Kx=t=>{var o;const e=t[0].split(Wx).map(a=>a.replace(wae,W3)).join(Wx),r=(o=t[1])==null?void 0:o.replace(Eae,W3),n=e.indexOf(Wx),s=e.substring(0,n);let i=e.substring(n+1);return s==="api"&&(i=i.toLowerCase()),[s,i,r].filter(a=>a&&a.length>0).reduce((a,c,l)=>{switch(l){case 0:return c;case 1:return`${a}/${c}`;default:return`${a}#${c}`}},"")},Cae={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Aae=t=>({applyToStack:e=>{e.add(Sae(t),Cae)}});var K3;(function(t){t.ENV="env",t.CONFIG="shared config entry"})(K3||(K3={}));const kae=!1,Tae=!1,ng=t=>t[O2]||(t[O2]={}),Aa=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},GD=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),Q3=t=>GD(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,Pae=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return{...t,region:async()=>{if(typeof e=="string")return Q3(e);const n=await e();return Q3(n)},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return GD(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}}};function Rae(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const Iae=(t,e)=>(r,n)=>async s=>{var l;const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,n,s.input)),o=Rae(t.httpAuthSchemes),a=ng(n),c=[];for(const u of i){const f=o.get(u.schemeId);if(!f){c.push(`HttpAuthScheme \`${u.schemeId}\` was not enabled for this service.`);continue}const d=f.identityProvider(await e.identityProviderConfigProvider(t));if(!d){c.push(`HttpAuthScheme \`${u.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:h={},signingProperties:p={}}=((l=u.propertiesExtractor)==null?void 0:l.call(u,t,n))||{};u.identityProperties=Object.assign(u.identityProperties||{},h),u.signingProperties=Object.assign(u.signingProperties||{},p),a.selectedHttpAuthScheme={httpAuthOption:u,identity:await d(u.identityProperties),signer:f.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join(` +`));return r(s)},Oae=async t=>{const e=(t==null?void 0:t.Bucket)||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Lae(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Dae(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},_ae=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Nae=/(\d+\.){3}\d+/,Mae=/\.\./,Dae=t=>_ae.test(t)&&!Nae.test(t)&&!Mae.test(t),Lae=t=>{const[e,r,n,,,s]=t.split(":"),i=e==="arn"&&t.split(":").length>=6,o=!!(i&&r&&n&&s);if(i&&!o)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return o},jae=(t,e,r)=>{const n=async()=>{const s=r[t]??r[e];return typeof s=="function"?s():s};return t==="credentialScope"||e==="CredentialScope"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return(s==null?void 0:s.credentialScope)??(s==null?void 0:s.CredentialScope)}:t==="accountId"||e==="AccountId"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return(s==null?void 0:s.accountId)??(s==null?void 0:s.AccountId)}:t==="endpoint"||e==="endpoint"?async()=>{const s=await n();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){const{protocol:i,hostname:o,port:a,path:c}=s;return`${i}//${o}${a?":"+a:""}${c}`}}return s}:n},qD=async t=>{};function Bae(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[n,s=null]=r.split("=");n=decodeURIComponent(n),s&&(s=decodeURIComponent(s)),n in e?Array.isArray(e[n])?e[n].push(s):e[n]=[e[n],s]:e[n]=s}return e}const T0=t=>{if(typeof t=="string")return T0(new URL(t));const{hostname:e,pathname:r,port:n,protocol:s,search:i}=t;let o;return i&&(o=Bae(i)),{hostname:e,port:n?parseInt(n):void 0,protocol:s,path:r,query:o}},WD=t=>typeof t=="object"?"url"in t?T0(t.url):t:T0(t),Fae=async(t,e,r,n)=>{if(!r.endpoint){let o;r.serviceConfiguredEndpoint?o=await r.serviceConfiguredEndpoint():o=await qD(r.serviceId),o&&(r.endpoint=()=>Promise.resolve(WD(o)))}const s=await Uae(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,n)},Uae=async(t,e,r)=>{var i;const n={},s=((i=e==null?void 0:e.getEndpointParameterInstructions)==null?void 0:i.call(e))||{};for(const[o,a]of Object.entries(s))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 jae(a.name,o,r)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(s).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await Oae(n),n},Vae=({config:t,instructions:e})=>(r,n)=>async s=>{var a,c,l;const i=await Fae(s.input,{getEndpointParameterInstructions(){return e}},{...t},n);n.endpointV2=i,n.authSchemes=(a=i.properties)==null?void 0:a.authSchemes;const o=(c=n.authSchemes)==null?void 0:c[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const u=ng(n),f=(l=u==null?void 0:u.selectedHttpAuthScheme)==null?void 0:l.httpAuthOption;f&&(f.signingProperties=Object.assign(f.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return r({...s})},$ae=(t,e)=>r=>async n=>{const{response:s}=await r(n);try{const i=await e(s,t);return{response:s,output:i}}catch(i){if(Object.defineProperty(i,"$response",{value:s}),!("$metadata"in i)){const o="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";i.message+=` + `+o,typeof i.$responseBodyText<"u"&&i.$response&&(i.$response.body=i.$responseBodyText)}throw i}},zae=(t,e)=>(r,n)=>async s=>{var a;const i=(a=n.endpointV2)!=null&&a.url&&t.urlParser?async()=>t.urlParser(n.endpointV2.url):t.endpoint;if(!i)throw new Error("No valid endpoint provider available.");const o=await e(s.input,{...t,endpoint:i});return r({...s,request:o})},Hae={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},YC={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function JC(t,e,r){return{applyToStack:n=>{n.add($ae(t,r),Hae),n.add(zae(t,e),YC)}}}const KD={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:YC.name},XC=(t,e)=>({applyToStack:r=>{r.addRelativeTo(Vae({config:t,instructions:e}),KD)}}),Gae=t=>{const e=t.tls??!0,{endpoint:r}=t,n=r!=null?async()=>WD(await Aa(r)()):void 0,i={...t,endpoint:n,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:Aa(t.useDualstackEndpoint??!1),useFipsEndpoint:Aa(t.useFipsEndpoint??!1)};let o;return i.serviceConfiguredEndpoint=async()=>(t.serviceId&&!o&&(o=qD(t.serviceId)),o),i},qae={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:KD.name},Wae=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Iae(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),qae)}});YC.name;const Kae=t=>e=>{throw e},Qae=(t,e)=>{},Yae=t=>(e,r)=>async n=>{if(!Vn.isInstance(n.request))return e(n);const i=ng(r).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:o={}},identity:a,signer:c}=i,l=await e({...n,request:await c.sign(n.request,a,o)}).catch((c.errorHandler||Kae)(o));return(c.successHandler||Qae)(l.response,o),l};var Zf;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(Zf||(Zf={}));const P0=3,Jae=Zf.STANDARD,Xae=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Zae=["TimeoutError","RequestTimeout","RequestTimeoutException"],ece=[500,502,503,504],tce=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],rce=t=>{var e;return(e=t.$metadata)==null?void 0:e.clockSkewCorrected},QD=t=>{var e,r;return((e=t.$metadata)==null?void 0:e.httpStatusCode)===429||Xae.includes(t.name)||((r=t.$retryable)==null?void 0:r.throttling)==!0},YD=t=>{var e;return rce(t)||Zae.includes(t.name)||tce.includes((t==null?void 0:t.code)||"")||ece.includes(((e=t.$metadata)==null?void 0:e.httpStatusCode)||0)},nce=t=>{var e;if(((e=t.$metadata)==null?void 0:e.httpStatusCode)!==void 0){const r=t.$metadata.httpStatusCode;return 500<=r&&r<=599&&!YD(t)}return!1};class sce{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(),QD(e)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(s),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 _2=100,JD=20*1e3,ice=500,Y3=500,oce=5,ace=10,cce=1,lce="amz-sdk-invocation-id",uce="amz-sdk-request",fce=()=>{let t=_2;return{computeNextBackoffDelay:n=>Math.floor(Math.min(JD,Math.random()*2**n*t)),setDelayBase:n=>{t=n}}},J3=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(JD,t),getRetryCost:()=>r});class XD{constructor(e){this.maxAttempts=e,this.mode=Zf.STANDARD,this.capacity=Y3,this.retryBackoffStrategy=fce(),this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return J3({retryDelay:_2,retryCount:0})}async refreshRetryTokenForRetry(e,r){const n=await this.getMaxAttempts();if(this.shouldRetry(e,r,n)){const s=r.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?ice:_2);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,i):i,a=this.getCapacityCost(s);return this.capacity-=a,J3({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(Y3,this.capacity+(e.getRetryCost()??cce))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${P0}`),P0}}shouldRetry(e,r,n){return e.getRetryCount()+1=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?ace:oce}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class dce{constructor(e,r){this.maxAttemptsProvider=e,this.mode=Zf.ADAPTIVE;const{rateLimiter:n}=r??{};this.rateLimiter=n??new sce,this.standardRetryStrategy=new XD(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 C1;const hce=new Uint8Array(16);function pce(){if(!C1&&(C1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!C1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return C1(hce)}const pr=[];for(let t=0;t<256;++t)pr.push((t+256).toString(16).slice(1));function yce(t,e=0){return pr[t[e+0]]+pr[t[e+1]]+pr[t[e+2]]+pr[t[e+3]]+"-"+pr[t[e+4]]+pr[t[e+5]]+"-"+pr[t[e+6]]+pr[t[e+7]]+"-"+pr[t[e+8]]+pr[t[e+9]]+"-"+pr[t[e+10]]+pr[t[e+11]]+pr[t[e+12]]+pr[t[e+13]]+pr[t[e+14]]+pr[t[e+15]]}const vce=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),X3={randomUUID:vce};function mce(t,e,r){if(X3.randomUUID&&!e&&!t)return X3.randomUUID();t=t||{};const n=t.random||(t.rng||pce)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let s=0;s<16;++s)e[r+s]=n[s];return e}return yce(n)}const gce=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}`),xce=t=>{const{retryStrategy:e}=t,r=Aa(t.maxAttempts??P0);return{...t,maxAttempts:r,retryStrategy:async()=>e||(await Aa(t.retryMode)()===Zf.ADAPTIVE?new dce(r):new XD(r))}};class ZD{trace(){}debug(){}info(){}warn(){}error(){}}const Za=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const n of e)r.push(n);return r},No=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,R0=()=>{let t=[],e=[],r=!1;const n=new Set,s=f=>f.sort((d,h)=>Z3[h.step]-Z3[d.step]||e8[h.priority||"normal"]-e8[d.priority||"normal"]),i=f=>{let d=!1;const h=p=>{const y=Za(p.name,p.aliases);if(y.includes(f)){d=!0;for(const g of y)n.delete(g);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},o=f=>{let d=!1;const h=p=>{if(p.middleware===f){d=!0;for(const y of Za(p.name,p.aliases))n.delete(y);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},a=f=>{var d;return t.forEach(h=>{f.add(h.middleware,{...h})}),e.forEach(h=>{f.addRelativeTo(h.middleware,{...h})}),(d=f.identifyOnResolve)==null||d.call(f,u.identifyOnResolve()),f},c=f=>{const d=[];return f.before.forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...c(h))}),d.push(f),f.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...c(h))}),d},l=(f=!1)=>{const d=[],h=[],p={};return t.forEach(g=>{const m={...g,before:[],after:[]};for(const x of Za(m.name,m.aliases))p[x]=m;d.push(m)}),e.forEach(g=>{const m={...g,before:[],after:[]};for(const x of Za(m.name,m.aliases))p[x]=m;h.push(m)}),h.forEach(g=>{if(g.toMiddleware){const m=p[g.toMiddleware];if(m===void 0){if(f)return;throw new Error(`${g.toMiddleware} is not found when adding ${No(g.name,g.aliases)} middleware ${g.relation} ${g.toMiddleware}`)}g.relation==="after"&&m.after.push(g),g.relation==="before"&&m.before.push(g)}}),s(d).map(c).reduce((g,m)=>(g.push(...m),g),[])},u={add:(f,d={})=>{const{name:h,override:p,aliases:y}=d,g={step:"initialize",priority:"normal",middleware:f,...d},m=Za(h,y);if(m.length>0){if(m.some(x=>n.has(x))){if(!p)throw new Error(`Duplicate middleware name '${No(h,y)}'`);for(const x of m){const b=t.findIndex(A=>{var O;return A.name===x||((O=A.aliases)==null?void 0:O.some(_=>_===x))});if(b===-1)continue;const w=t[b];if(w.step!==g.step||g.priority!==w.priority)throw new Error(`"${No(w.name,w.aliases)}" middleware with ${w.priority} priority in ${w.step} step cannot be overridden by "${No(h,y)}" middleware with ${g.priority} priority in ${g.step} step.`);t.splice(b,1)}}for(const x of m)n.add(x)}t.push(g)},addRelativeTo:(f,d)=>{const{name:h,override:p,aliases:y}=d,g={middleware:f,...d},m=Za(h,y);if(m.length>0){if(m.some(x=>n.has(x))){if(!p)throw new Error(`Duplicate middleware name '${No(h,y)}'`);for(const x of m){const b=e.findIndex(A=>{var O;return A.name===x||((O=A.aliases)==null?void 0:O.some(_=>_===x))});if(b===-1)continue;const w=e[b];if(w.toMiddleware!==g.toMiddleware||w.relation!==g.relation)throw new Error(`"${No(w.name,w.aliases)}" middleware ${w.relation} "${w.toMiddleware}" middleware cannot be overridden by "${No(h,y)}" middleware ${g.relation} "${g.toMiddleware}" middleware.`);e.splice(b,1)}}for(const x of m)n.add(x)}e.push(g)},clone:()=>a(R0()),use:f=>{f.applyToStack(u)},remove:f=>typeof f=="string"?i(f):o(f),removeByTag:f=>{let d=!1;const h=p=>{const{tags:y,name:g,aliases:m}=p;if(y&&y.includes(f)){const x=Za(g,m);for(const b of x)n.delete(b);return d=!0,!1}return!0};return t=t.filter(h),e=e.filter(h),d},concat:f=>{var h;const d=a(R0());return d.use(f),d.identifyOnResolve(r||d.identifyOnResolve()||(((h=f.identifyOnResolve)==null?void 0:h.call(f))??!1)),d},applyToStack:a,identify:()=>l(!0).map(f=>{const d=f.step??f.relation+" "+f.toMiddleware;return No(f.name,f.aliases)+" - "+d}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,d)=>{for(const h of l().map(p=>p.middleware).reverse())f=h(f,d);return r&&console.log(u.identify()),f}};return u},Z3={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},e8={high:3,normal:2,low:1};class bce{constructor(e){this.config=e,this.middlewareStack=R0()}send(e,r,n){const s=typeof r!="function"?r:void 0,i=typeof r=="function"?r:n,o=s===void 0&&this.config.cacheMiddleware===!0;let a;if(o){this.handlers||(this.handlers=new WeakMap);const c=this.handlers;c.has(e.constructor)?a=c.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,s),c.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,s);if(i)a(e).then(c=>i(null,c.output),c=>i(c)).catch(()=>{});else return a(e).then(c=>c.output)}destroy(){var e,r,n;(n=(r=(e=this.config)==null?void 0:e.requestHandler)==null?void 0:r.destroy)==null||n.call(r),delete this.handlers}}const Da={},md=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);Da[n]=t,md[t]=n}for(let t=0,e="a".charCodeAt(0),r="z".charCodeAt(0);t+e<=r;t++){const n=String.fromCharCode(t+e),s=t+26;Da[n]=s,md[s]=n}for(let t=0;t<10;t++){Da[t.toString(10)]=t+52;const e=t.toString(10),r=t+52;Da[e]=r,md[r]=e}Da["+"]=62;md[62]="+";Da["/"]=63;md[63]="/";const Du=6,wh=8,wce=63,ZC=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 s=0;s>=Du;const a=s/4*3;i>>=o%wh;const c=Math.floor(o/wh);for(let l=0;l>u)}}return new Uint8Array(r)},ed=t=>new TextEncoder().encode(t),Eh=t=>typeof t=="string"?ed(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),eL=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 tL(t){let e;typeof t=="string"?e=ed(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 s="";for(let i=0;i>u]}s+="==".slice(0,4-c)}return s}function Ece(t,e="utf-8"){return e==="base64"?tL(t):eL(t)}function Sce(t,e){return e==="base64"?nl.mutate(ZC(t)):nl.mutate(ed(t))}class nl extends Uint8Array{static fromString(e,r="utf-8"){switch(typeof e){case"string":return Sce(e,r);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,nl.prototype),e}transformToString(e="utf-8"){return Ece(this,e)}}const fa=t=>encodeURIComponent(t).replace(/[!'()*]/g,Cce),Cce=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function Ace(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=fa(r),Array.isArray(n))for(let s=0,i=n.length;s{t&&setTimeout(()=>{const n=new Error(`Request did not complete within ${t} ms`);n.name="TimeoutError",r(n)},t)})}const Qx={supported:void 0};class eA{static create(e){return typeof(e==null?void 0:e.handle)=="function"?e:new eA(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(r=>r||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Qx.supported===void 0&&(Qx.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,s=this.config.keepAlive===!0,i=this.config.credentials;if(r!=null&&r.aborted){const m=new Error("Request aborted");return m.name="AbortError",Promise.reject(m)}let o=e.path;const a=Ace(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(e.username!=null||e.password!=null){const m=e.username??"",x=e.password??"";c=`${m}:${x}@`}const{port:l,method:u}=e,f=`${e.protocol}//${c}${e.hostname}${l?`:${l}`:""}${o}`,d=u==="GET"||u==="HEAD"?void 0:e.body,h={body:d,headers:new Headers(e.headers),method:u,credentials:i};d&&(h.duplex="half"),typeof AbortController<"u"&&(h.signal=r),Qx.supported&&(h.keepalive=s);let p=()=>{};const y=new Request(f,h),g=[fetch(y).then(m=>{const x=m.headers,b={};for(const A of x.entries())b[A[0]]=A[1];return m.body!=null?{response:new A0({headers:b,reason:m.statusText,statusCode:m.status,body:m.body})}:m.blob().then(A=>({response:new A0({headers:b,reason:m.statusText,statusCode:m.status,body:A})}))}),kce(n)];return r&&g.push(new Promise((m,x)=>{const b=()=>{const w=new Error("Request aborted");w.name="AbortError",x(w)};if(typeof r.addEventListener=="function"){const w=r;w.addEventListener("abort",b,{once:!0}),p=()=>w.removeEventListener("abort",b)}else r.onabort=b})),Promise.race(g).finally(p)}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=r,n))}httpHandlerConfigs(){return this.config??{}}}const Tce=t=>typeof Blob=="function"&&t instanceof Blob?Pce(t):Rce(t);async function Pce(t){const e=await Ice(t),r=ZC(e);return new Uint8Array(r)}async function Rce(t){const e=[],r=t.getReader();let n=!1,s=0;for(;!n;){const{done:a,value:c}=await r.read();c&&(e.push(c),s+=c.length),n=a}const i=new Uint8Array(s);let o=0;for(const a of e)i.set(a,o),o+=a.length;return i}function Ice(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 s=n.result??"",i=s.indexOf(","),o=i>-1?i+1:s.length;e(s.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})}const rL={},N2={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),rL[t]=e,N2[e]=t}function Oce(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 nl.mutate(t);if(!t)return nl.mutate(new Uint8Array);const r=e.streamCollector(t);return nl.mutate(await r)};class sg{constructor(){this.middlewareStack=R0()}static classBuilder(){return new Nce}resolveMiddlewareWithContext(e,r,n,{middlewareFn:s,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:l,additionalContext:u,CommandCtor:f}){for(const g of s.bind(this)(f,e,r,n))this.middlewareStack.use(g);const d=e.concat(this.middlewareStack),{logger:h}=r,p={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[O2]:{commandInstance:this,...l},...u},{requestHandler:y}=r;return d.resolve(g=>y.handle(g.request,n||{}),p)}}class Nce{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 sg{static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=n??{},e._init(this)}resolveMiddleware(n,s,i){return this.resolveMiddlewareWithContext(n,s,i,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const ur="***SensitiveInformation***";class tA extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,tA.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const Ne=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,s])=>{(t[n]==null||t[n]==="")&&(t[n]=s)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},Mce=({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{const s=Lce(t),i=s.httpStatusCode?s.httpStatusCode+"":void 0,o=new r({name:(e==null?void 0:e.code)||(e==null?void 0:e.Code)||n||i||"UnknownError",$fault:"client",$metadata:s});throw Ne(o,e)},Dce=t=>({output:e,parsedBody:r,errorCode:n})=>{Mce({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})},Lce=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"]}),jce=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{}}},Bce=t=>{const e=[];for(const r in C0){const n=C0[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}}},Fce=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},Uce=t=>{let e=t.retryStrategy;return{setRetryStrategy(r){e=r},retryStrategy(){return e}}},Vce=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},$ce=t=>({...Bce(t),...Uce(t)}),zce=t=>({...Fce(t),...Vce(t)}),M2=function(){const t=Object.getPrototypeOf(this).constructor,e=Function.bind.apply(String,[null,...arguments]),r=new e;return Object.setPrototypeOf(r,t.prototype),r};M2.prototype=Object.create(String.prototype,{constructor:{value:M2,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(M2,String);const Ce=t=>{if(t==null)return{};if(Array.isArray(t))return t.filter(e=>e!=null).map(Ce);if(typeof t=="object"){const e={};for(const r of Object.keys(t))t[r]!=null&&(e[r]=Ce(t[r]));return e}return t},Hce=t=>(t==null?void 0:t.body)instanceof ReadableStream,Gce=t=>(e,r)=>async n=>{var o;let s=await t.retryStrategy();const i=await t.maxAttempts();if(qce(s)){s=s;let a=await s.acquireInitialRetryToken(r.partition_id),c=new Error,l=0,u=0;const{request:f}=n,d=Vn.isInstance(f);for(d&&(f.headers[lce]=mce());;)try{d&&(f.headers[uce]=`attempt=${l+1}; max=${i}`);const{response:h,output:p}=await e(n);return s.recordSuccess(a),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=u,{response:h,output:p}}catch(h){const p=Wce(h);if(c=gce(h),d&&Hce(f))throw(o=r.logger instanceof ZD?console:r.logger)==null||o.warn("An error was encountered in a non-retryable streaming request."),c;try{a=await s.refreshRetryTokenForRetry(a,p)}catch{throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=l+1,c.$metadata.totalRetryDelay=u,c}l=a.getRetryCount();const y=a.getRetryDelay();u+=y,await new Promise(g=>setTimeout(g,y))}}else return s=s,s!=null&&s.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(e,n)},qce=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",Wce=t=>{const e={error:t,errorType:Kce(t)},r=Yce(t.$response);return r&&(e.retryAfterHint=r),e},Kce=t=>QD(t)?"THROTTLING":YD(t)?"TRANSIENT":nce(t)?"SERVER_ERROR":"CLIENT_ERROR",nL={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Qce=t=>({applyToStack:e=>{e.add(Gce(t),nL)}}),Yce=t=>{if(!A0.isInstance(t))return;const e=Object.keys(t.headers).find(i=>i.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)},Jce={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:nL.name},Xce=t=>({applyToStack:e=>{e.addRelativeTo(Yae(),Jce)}});class Zce{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 ele{async sign(e,r,n){return e}}const tle=t=>e=>sL(e)&&e.expiration.getTime()-Date.now()t.expiration!==void 0,sle=(t,e,r)=>{if(t===void 0)return;const n=typeof t!="function"?async()=>Promise.resolve(t):t;let s,i,o,a=!1;const c=async l=>{i||(i=n(l));try{s=await i,o=!0,a=!1}finally{i=void 0}return s};return e===void 0?async l=>((!o||l!=null&&l.forceRefresh)&&(s=await c(l)),s):async l=>((!o||l!=null&&l.forceRefresh)&&(s=await c(l)),a?s:r(s)?(e(s)&&await c(l),s):(a=!0,s))},A1=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},t8="content-length";function ile(t){return e=>async r=>{const n=r.request;if(Vn.isInstance(n)){const{body:s,headers:i}=n;if(s&&Object.keys(i).map(o=>o.toLowerCase()).indexOf(t8)===-1)try{const o=t(s);n.headers={...n.headers,[t8]:String(o)}}catch{}}return e({...r,request:n})}}const ole={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ale=t=>({applyToStack:e=>{e.add(ile(t.bodyLengthChecker),ole)}}),r8=t=>{var e,r;return A0.isInstance(t)?((e=t.headers)==null?void 0:e.date)??((r=t.headers)==null?void 0:r.Date):void 0},iL=t=>new Date(Date.now()+t),cle=(t,e)=>Math.abs(iL(e).getTime()-t)>=3e5,n8=(t,e)=>{const r=Date.parse(t);return cle(r,e)?r-Date.now():e},Sh=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},lle=async t=>{var l,u,f;const e=Sh("context",t.context),r=Sh("config",t.config),n=(f=(u=(l=e.endpointV2)==null?void 0:l.properties)==null?void 0:u.authSchemes)==null?void 0:f[0],i=await Sh("signer",r.signer)(n),o=t==null?void 0:t.signingRegion,a=t==null?void 0:t.signingRegionSet,c=t==null?void 0:t.signingName;return{config:r,signer:i,signingRegion:o,signingRegionSet:a,signingName:c}};class ule{async sign(e,r,n){var f;if(!Vn.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await lle(n),{config:i,signer:o}=s;let{signingRegion:a,signingName:c}=s;const l=n.context;if(((f=l==null?void 0:l.authSchemes)==null?void 0:f.length)??0>1){const[d,h]=l.authSchemes;(d==null?void 0:d.name)==="sigv4a"&&(h==null?void 0:h.name)==="sigv4"&&(a=(h==null?void 0:h.signingRegion)??a,c=(h==null?void 0:h.signingName)??c)}return await o.sign(e,{signingDate:iL(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return r=>{const n=r.ServerTime??r8(r.$response);if(n){const s=Sh("config",e.config),i=s.systemClockOffset;s.systemClockOffset=n8(n,s.systemClockOffset),s.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const n=r8(e);if(n){const s=Sh("config",r.config);s.systemClockOffset=n8(n,s.systemClockOffset)}}}const fle=(t,e,r)=>{let n,s,i,o=!1;const a=async()=>{s||(s=t());try{n=await s,i=!0,o=!1}finally{s=void 0}return n};return e===void 0?async c=>((!i||c!=null&&c.forceRefresh)&&(n=await a()),n):async c=>((!i||c!=null&&c.forceRefresh)&&(n=await a()),o?n:r&&!r(n)?(o=!0,n):(e(n)&&await a(),n))},dle="X-Amz-Algorithm",hle="X-Amz-Credential",oL="X-Amz-Date",ple="X-Amz-SignedHeaders",yle="X-Amz-Expires",aL="X-Amz-Signature",cL="X-Amz-Security-Token",lL="authorization",uL=oL.toLowerCase(),vle="date",mle=[lL,uL,vle],gle=aL.toLowerCase(),D2="x-amz-content-sha256",xle=cL.toLowerCase(),ble={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},wle=/^proxy-/,Ele=/^sec-/,Yx="AWS4-HMAC-SHA256",Sle="AWS4-HMAC-SHA256-PAYLOAD",Cle="UNSIGNED-PAYLOAD",Ale=50,fL="aws4_request",kle=60*60*24*7,k1={},Jx=[],Xx=(t,e,r)=>`${t}/${e}/${r}/${fL}`,Tle=async(t,e,r,n,s)=>{const i=await s8(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${n}:${s}:${Cc(i)}:${e.sessionToken}`;if(o in k1)return k1[o];for(Jx.push(o);Jx.length>Ale;)delete k1[Jx.shift()];let a=`AWS4${e.secretAccessKey}`;for(const c of[r,n,s,fL])a=await s8(t,a,c);return k1[o]=a},s8=(t,e,r)=>{const n=new t(e);return n.update(Eh(r)),n.digest()},i8=({headers:t},e,r)=>{const n={};for(const s of Object.keys(t).sort()){if(t[s]==null)continue;const i=s.toLowerCase();(i in ble||e!=null&&e.has(i)||wle.test(i)||Ele.test(i))&&(!r||r&&!r.has(i))||(n[i]=t[s].trim().replace(/\s+/g," "))}return n},Ple=({query:t={}})=>{const e=[],r={};for(const n of Object.keys(t).sort()){if(n.toLowerCase()===gle)continue;e.push(n);const s=t[n];typeof s=="string"?r[n]=`${fa(n)}=${fa(s)}`:Array.isArray(s)&&(r[n]=s.slice(0).reduce((i,o)=>i.concat([`${fa(n)}=${fa(o)}`]),[]).sort().join("&"))}return e.map(n=>r[n]).filter(n=>n).join("&")},Rle=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",Zx=async({headers:t,body:e},r)=>{for(const n of Object.keys(t))if(n.toLowerCase()===D2)return t[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||Rle(e)){const n=new r;return n.update(Eh(e)),Cc(await n.digest())}return Cle};class Ile{format(e){const r=[];for(const i of Object.keys(e)){const o=ed(i);r.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[i]))}const n=new Uint8Array(r.reduce((i,o)=>i+o.byteLength,0));let s=0;for(const i of r)n.set(i,s),s+=i.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 s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const a=ed(e.value),c=new DataView(new ArrayBuffer(3+a.byteLength));c.setUint8(0,7),c.setUint16(1,a.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(a,3),l;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(rA.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ole.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(Oce(e.value.replace(/\-/g,"")),1),f}}}var o8;(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"})(o8||(o8={}));const Ole=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class rA{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,s=Math.abs(Math.round(e));n>-1&&s>0;n--,s/=256)r[n]=s;return e<0&&a8(r),new rA(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&a8(e),parseInt(Cc(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function a8(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const _le=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},Nle=(t,e={})=>{var s;const{headers:r,query:n={}}=Vn.clone(t);for(const i of Object.keys(r)){const o=i.toLowerCase();o.slice(0,6)==="x-amz-"&&!((s=e.unhoistableHeaders)!=null&&s.has(o))&&(n[i]=r[i],delete r[i])}return{...t,headers:r,query:n}},c8=t=>{t=Vn.clone(t);for(const e of Object.keys(t.headers))mle.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},Mle=t=>Dle(t).toISOString().replace(/\.\d{3}Z$/,"Z"),Dle=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class l8{constructor({applyChecksum:e,credentials:r,region:n,service:s,sha256:i,uriEscapePath:o=!0}){this.headerFormatter=new Ile,this.service=s,this.sha256=i,this.uriEscapePath=o,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=Aa(n),this.credentialProvider=Aa(r)}async presign(e,r={}){const{signingDate:n=new Date,expiresIn:s=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:a,signingRegion:c,signingService:l}=r,u=await this.credentialProvider();this.validateResolvedCredentials(u);const f=c??await this.regionProvider(),{longDate:d,shortDate:h}=T1(n);if(s>kle)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Xx(h,f,l??this.service),y=Nle(c8(e),{unhoistableHeaders:o});u.sessionToken&&(y.query[cL]=u.sessionToken),y.query[dle]=Yx,y.query[hle]=`${u.accessKeyId}/${p}`,y.query[oL]=d,y.query[yle]=s.toString(10);const g=i8(y,i,a);return y.query[ple]=u8(g),y.query[aL]=await this.getSignature(d,p,this.getSigningKey(u,f,h,l),this.createCanonicalRequest(y,g,await Zx(e,this.sha256))),y}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:s,signingRegion:i,signingService:o}){const a=i??await this.regionProvider(),{shortDate:c,longDate:l}=T1(n),u=Xx(c,a,o??this.service),f=await Zx({headers:{},body:r},this.sha256),d=new this.sha256;d.update(e);const h=Cc(await d.digest()),p=[Sle,l,u,s,h,f].join(` +`);return this.signString(p,{signingDate:n,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:r=new Date,signingRegion:n,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:n,signingService:s,priorSignature:e.priorSignature}).then(o=>({message:e.message,signature:o}))}async signString(e,{signingDate:r=new Date,signingRegion:n,signingService:s}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=n??await this.regionProvider(),{shortDate:a}=T1(r),c=new this.sha256(await this.getSigningKey(i,o,a,s));return c.update(Eh(e)),Cc(await c.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:s,signingRegion:i,signingService:o}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const c=i??await this.regionProvider(),l=c8(e),{longDate:u,shortDate:f}=T1(r),d=Xx(f,c,o??this.service);l.headers[uL]=u,a.sessionToken&&(l.headers[xle]=a.sessionToken);const h=await Zx(l,this.sha256);!_le(D2,l.headers)&&this.applyChecksum&&(l.headers[D2]=h);const p=i8(l,s,n),y=await this.getSignature(u,d,this.getSigningKey(a,c,f,o),this.createCanonicalRequest(l,p,h));return l.headers[lL]=`${Yx} Credential=${a.accessKeyId}/${d}, SignedHeaders=${u8(p)}, Signature=${y}`,l}createCanonicalRequest(e,r,n){const s=Object.keys(r).sort();return`${e.method} ${this.getCanonicalPath(e)} -${Tle(e)} +${Ple(e)} ${s.map(i=>`${i}:${r[i]}`).join(` `)} @@ -178,19 +178,19 @@ ${s.join(";")} ${n}`}async createStringToSign(e,r,n){const s=new this.sha256;s.update(Eh(n));const i=await s.digest();return`${Yx} ${e} ${r} -${Cc(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const r=[];for(const i of e.split("/"))(i==null?void 0:i.length)!==0&&i!=="."&&(i===".."?r.pop():r.push(i));const n=`${e!=null&&e.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&(e!=null&&e.endsWith("/"))?"/":""}`;return fa(n).replace(/%2F/g,"/")}return e}async getSignature(e,r,n,s){const i=await this.createStringToSign(e,r,s),o=new this.sha256(await n);return o.update(Eh(i)),Cc(await o.digest())}getSigningKey(e,r,n,s){return kle(this.sha256,e,n,r,s||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 T1=t=>{const e=Nle(t).replace(/[\-:]/g,"");return{longDate:e,shortDate:e.slice(0,8)}},u8=t=>Object.keys(t).sort().join(";"),Dle=t=>{let e;t.credentials&&(e=nle(t.credentials,rle,sL)),e||(t.credentialDefaultProvider?e=A1(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:s}=t;let i;return t.signer?i=A1(t.signer):t.regionInfoProvider?i=()=>A1(t.region)().then(async o=>[await t.regionInfoProvider(o,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},o]).then(([o,a])=>{const{signingRegion:c,signingService:l}=o;t.signingRegion=t.signingRegion||c||a,t.signingName=t.signingName||l||t.serviceId;const u={...t,credentials:e,region:t.signingRegion,service:t.signingName,sha256:s,uriEscapePath:r},f=t.signerConstructor||l8;return new f(u)}):i=async o=>{o=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await A1(t.region)(),properties:{}},o);const a=o.signingRegion,c=o.signingName;t.signingRegion=t.signingRegion||a,t.signingName=t.signingName||c||t.serviceId;const l={...t,credentials:e,region:t.signingRegion,service:t.signingName,sha256:s,uriEscapePath:r},u=t.signerConstructor||l8;return new u(l)},{...t,systemClockOffset:n,signingEscapePath:r,credentials:e,signer:i}},Lle=(t,e)=>Oce(t,e).then(r=>e.utf8Encoder(r)),ig=(t,e)=>Lle(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{}}),jle=async(t,e)=>{const r=await ig(t,e);return r.message=r.message??r.Message,r},Ble=(t,e)=>{const r=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),n=i=>{let o=i;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},s=r(t.headers,"x-amzn-errortype");if(s!==void 0)return n(t.headers[s]);if(e.code!==void 0)return n(e.code);if(e.__type!==void 0)return n(e.__type)},Fle=async(t,e,r)=>({operation:ng(e).operation,region:await Aa(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ule(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 Vle=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(Ule(t))}return e},$le=t=>({...Dle(t)}),zle=t=>({...t,useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),nA={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Hle="@aws-sdk/client-cognito-identity-provider",Gle="AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native",qle="3.649.0",Wle={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"},Kle="./dist-cjs/index.js",Qle="./dist-types/index.d.ts",Yle="./dist-es/index.js",Jle=!1,Xle={"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.649.0","@aws-sdk/client-sts":"3.649.0","@aws-sdk/core":"3.649.0","@aws-sdk/credential-provider-node":"3.649.0","@aws-sdk/middleware-host-header":"3.649.0","@aws-sdk/middleware-logger":"3.649.0","@aws-sdk/middleware-recursion-detection":"3.649.0","@aws-sdk/middleware-user-agent":"3.649.0","@aws-sdk/region-config-resolver":"3.649.0","@aws-sdk/types":"3.649.0","@aws-sdk/util-endpoints":"3.649.0","@aws-sdk/util-user-agent-browser":"3.649.0","@aws-sdk/util-user-agent-node":"3.649.0","@smithy/config-resolver":"^3.0.6","@smithy/core":"^2.4.1","@smithy/fetch-http-handler":"^3.2.5","@smithy/hash-node":"^3.0.4","@smithy/invalid-dependency":"^3.0.4","@smithy/middleware-content-length":"^3.0.6","@smithy/middleware-endpoint":"^3.1.1","@smithy/middleware-retry":"^3.0.16","@smithy/middleware-serde":"^3.0.4","@smithy/middleware-stack":"^3.0.4","@smithy/node-config-provider":"^3.1.5","@smithy/node-http-handler":"^3.2.0","@smithy/protocol-http":"^4.1.1","@smithy/smithy-client":"^3.3.0","@smithy/types":"^3.4.0","@smithy/url-parser":"^3.0.4","@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.16","@smithy/util-defaults-mode-node":"^3.0.16","@smithy/util-endpoints":"^2.1.0","@smithy/util-middleware":"^3.0.4","@smithy/util-retry":"^3.0.4","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},Zle={"@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"},eue={node:">=16.0.0"},tue={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},rue=["dist-*/**"],nue={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},sue="Apache-2.0",iue={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},oue="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity-provider",aue={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-cognito-identity-provider"},cue={name:Hle,description:Gle,version:qle,scripts:Wle,main:Kle,types:Qle,module:Yle,sideEffects:Jle,dependencies:Xle,devDependencies:Zle,engines:eue,typesVersions:tue,files:rue,author:nue,license:sue,browser:iue,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:oue,repository:aue},lue=t=>new TextEncoder().encode(t);var uue=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:lue;function pp(t){return t instanceof Uint8Array?t:typeof t=="string"?uue(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function L2(t){return typeof t=="string"?t.length===0:t.byteLength===0}var dL={name:"SHA-256"},f8={name:"HMAC",hash:dL},fue=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 due={};function dv(){return typeof window<"u"?window:typeof self<"u"?self:due}var hue=function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!L2(e)){var r=pp(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 dv().crypto.subtle.sign(f8,r,e.toHash).then(function(n){return new Uint8Array(n)})}):L2(this.toHash)?Promise.resolve(fue):Promise.resolve().then(function(){return dv().crypto.subtle.digest(dL,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){dv().crypto.subtle.importKey("raw",pp(e.secret),f8,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},t}();function pue(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?i(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function yue(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(r=0)),r;)try{if(n=1,s&&(i=l[0]&2?s.return:l[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,l[1])).done)return i;switch(s=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,s=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]xue)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[r++],n--,this.bufferLength===is&&(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%is>=is-8){for(var s=this.bufferLength;s>>24&255,i[s*4+1]=this.state[s]>>>16&255,i[s*4+2]=this.state[s]>>>8&255,i[s*4+3]=this.state[s]>>>0&255;return i},t.prototype.hashBuffer=function(){for(var e=this,r=e.buffer,n=e.state,s=n[0],i=n[1],o=n[2],a=n[3],c=n[4],l=n[5],u=n[6],f=n[7],d=0;d>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[d-15];var y=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(y+this.temp[d-16]|0)}var g=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&l^~c&u)|0)+(f+(mue[d]+this.temp[d]|0)|0)|0,m=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&i^s&o^i&o)|0;f=u,u=l,l=c,c=a+g|0,a=o,o=i,i=s,s=g+m|0}n[0]+=s,n[1]+=i,n[2]+=o,n[3]+=a,n[4]+=c,n[5]+=l,n[6]+=u,n[7]+=f},t}(),bue=function(){function t(e){this.secret=e,this.hash=new hv,this.reset()}return t.prototype.update=function(e){if(!(L2(e)||this.error))try{this.hash.update(pp(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 pue(this,void 0,void 0,function(){return yue(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new hv,this.secret){this.outer=new hv;var e=wue(this.secret),r=new Uint8Array(is);r.set(e);for(var n=0;nis){var r=new hv;r.update(e),e=r.digest()}var n=new Uint8Array(is);return n.set(e),n}var Eue=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Sue(t){if(Cue(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return Aue(e)}return!1}function Cue(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function Aue(t){return t&&Eue.every(function(e){return typeof t[e]=="function"})}var kue=function(){function t(e){Sue(dv())?this.hash=new hue(e):this.hash=new bue(e)}return t.prototype.update=function(e,r){this.hash.update(pp(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t}();const Tue={"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"},hL={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"},Vt={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Qr={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"},Bo={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class te{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 s=te.getVersionPrecision(e),i=te.getVersionPrecision(r);let o=Math.max(s,i),a=0;const c=te.map([e,r],l=>{const u=o-te.getVersionPrecision(l),f=l+new Array(u+1).join(".0");return te.map(f.split("."),d=>new Array(20-d.length).join("0")+d).reverse()});for(n&&(a=o-Math.min(s,i)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]{n[c]=o[c]})}return e}static getBrowserAlias(e){return Tue[e]}static getBrowserTypeByAlias(e){return hL[e]||""}}const ct=/version\/(\d+(\.?_?\d+)+)/i,Pue=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=te.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},r=te.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},r=te.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},r=te.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},r=te.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},r=te.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},r=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},r=te.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,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=te.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},r=te.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},r=te.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=te.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},r=te.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},r=te.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},r=te.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=te.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},r=te.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},r=te.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=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},r=te.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},r=te.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},r=te.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=te.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},r=te.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},r=te.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},r=te.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=te.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=te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=/^(.*)\/(.*) /,r=/^(.*)\/(.*)[ \t]\((.*)/,s=t.search("\\(")!==-1?r:e;return{name:te.getFirstMatch(s,t),version:te.getSecondMatch(s,t)}}}],Rue=[{test:[/Roku\/DVP/],describe(t){const e=te.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:Qr.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=te.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:Qr.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=te.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=te.getWindowsVersionName(e);return{name:Qr.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:Qr.iOS},r=te.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=te.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=te.getMacOSVersionName(e),n={name:Qr.MacOS,version:e};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=te.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:Qr.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=te.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=te.getAndroidVersionName(e),n={name:Qr.Android,version:e};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=te.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:Qr.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=te.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||te.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||te.getFirstMatch(/\bbb(\d+)/i,t);return{name:Qr.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=te.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:Qr.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=te.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:Qr.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:Qr.Linux}}},{test:[/CrOS/],describe(){return{name:Qr.ChromeOS}}},{test:[/PlayStation 4/],describe(t){const e=te.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:Qr.PlayStation4,version:e}}}],Iue=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){const e=te.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:Vt.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Vt.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Vt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Vt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Vt.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Vt.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Vt.tablet}}},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=te.getFirstMatch(/(ipod|iphone)/i,t);return{type:Vt.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Vt.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Vt.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Vt.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Vt.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Vt.mobile,vendor:"Microsoft"}}},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Vt.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Vt.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Vt.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Vt.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Vt.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Vt.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Vt.tv}}}],Oue=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Bo.Blink};const r=te.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Bo.EdgeHTML,version:r}}},{test:[/trident/i],describe(t){const e={name:Bo.Trident},r=te.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){return t.test(/presto/i)},describe(t){const e={name:Bo.Presto},r=te.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:Bo.Gecko},r=te.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Bo.Blink}}},{test:[/(apple)?webkit/i],describe(t){const e={name:Bo.WebKit},r=te.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class d8{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=te.find(Pue,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=te.find(Rue,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=te.find(Iue,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=te.find(Oue,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 te.assign({},this.parsedResult)}satisfies(e){const r={};let n=0;const s={};let i=0;if(Object.keys(e).forEach(a=>{const c=e[a];typeof c=="string"?(s[a]=c,i+=1):typeof c=="object"&&(r[a]=c,n+=1)}),n>0){const a=Object.keys(r),c=te.find(a,u=>this.isOS(u));if(c){const u=this.satisfies(r[c]);if(u!==void 0)return u}const l=te.find(a,u=>this.isPlatform(u));if(l){const u=this.satisfies(r[l]);if(u!==void 0)return u}}if(i>0){const a=Object.keys(s),c=te.find(a,l=>this.isBrowser(l,!0));if(c!==void 0)return this.compareVersion(s[c])}}isBrowser(e,r=!1){const n=this.getBrowserName().toLowerCase();let s=e.toLowerCase();const i=te.getBrowserTypeByAlias(s);return r&&i&&(s=i.toLowerCase()),s===n}compareVersion(e){let r=[0],n=e,s=!1;const i=this.getBrowserVersion();if(typeof i=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(s=!0,n=e.substr(2)):r=[],e[0]===">"?r.push(1):r.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(s=!0,n=e.substr(1)),r.indexOf(te.compareVersions(i,n,s))>-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))}}/*! +${Cc(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const r=[];for(const i of e.split("/"))(i==null?void 0:i.length)!==0&&i!=="."&&(i===".."?r.pop():r.push(i));const n=`${e!=null&&e.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&(e!=null&&e.endsWith("/"))?"/":""}`;return fa(n).replace(/%2F/g,"/")}return e}async getSignature(e,r,n,s){const i=await this.createStringToSign(e,r,s),o=new this.sha256(await n);return o.update(Eh(i)),Cc(await o.digest())}getSigningKey(e,r,n,s){return Tle(this.sha256,e,n,r,s||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 T1=t=>{const e=Mle(t).replace(/[\-:]/g,"");return{longDate:e,shortDate:e.slice(0,8)}},u8=t=>Object.keys(t).sort().join(";"),Lle=t=>{let e;t.credentials&&(e=sle(t.credentials,nle,sL)),e||(t.credentialDefaultProvider?e=A1(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:s}=t;let i;return t.signer?i=A1(t.signer):t.regionInfoProvider?i=()=>A1(t.region)().then(async o=>[await t.regionInfoProvider(o,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},o]).then(([o,a])=>{const{signingRegion:c,signingService:l}=o;t.signingRegion=t.signingRegion||c||a,t.signingName=t.signingName||l||t.serviceId;const u={...t,credentials:e,region:t.signingRegion,service:t.signingName,sha256:s,uriEscapePath:r},f=t.signerConstructor||l8;return new f(u)}):i=async o=>{o=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await A1(t.region)(),properties:{}},o);const a=o.signingRegion,c=o.signingName;t.signingRegion=t.signingRegion||a,t.signingName=t.signingName||c||t.serviceId;const l={...t,credentials:e,region:t.signingRegion,service:t.signingName,sha256:s,uriEscapePath:r},u=t.signerConstructor||l8;return new u(l)},{...t,systemClockOffset:n,signingEscapePath:r,credentials:e,signer:i}},jle=(t,e)=>_ce(t,e).then(r=>e.utf8Encoder(r)),ig=(t,e)=>jle(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{}}),Ble=async(t,e)=>{const r=await ig(t,e);return r.message=r.message??r.Message,r},Fle=(t,e)=>{const r=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),n=i=>{let o=i;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},s=r(t.headers,"x-amzn-errortype");if(s!==void 0)return n(t.headers[s]);if(e.code!==void 0)return n(e.code);if(e.__type!==void 0)return n(e.__type)},Ule=async(t,e,r)=>({operation:ng(e).operation,region:await Aa(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Vle(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 $le=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(Vle(t))}return e},zle=t=>({...Lle(t)}),Hle=t=>({...t,useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),nA={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Gle="@aws-sdk/client-cognito-identity-provider",qle="AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native",Wle="3.649.0",Kle={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"},Qle="./dist-cjs/index.js",Yle="./dist-types/index.d.ts",Jle="./dist-es/index.js",Xle=!1,Zle={"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.649.0","@aws-sdk/client-sts":"3.649.0","@aws-sdk/core":"3.649.0","@aws-sdk/credential-provider-node":"3.649.0","@aws-sdk/middleware-host-header":"3.649.0","@aws-sdk/middleware-logger":"3.649.0","@aws-sdk/middleware-recursion-detection":"3.649.0","@aws-sdk/middleware-user-agent":"3.649.0","@aws-sdk/region-config-resolver":"3.649.0","@aws-sdk/types":"3.649.0","@aws-sdk/util-endpoints":"3.649.0","@aws-sdk/util-user-agent-browser":"3.649.0","@aws-sdk/util-user-agent-node":"3.649.0","@smithy/config-resolver":"^3.0.6","@smithy/core":"^2.4.1","@smithy/fetch-http-handler":"^3.2.5","@smithy/hash-node":"^3.0.4","@smithy/invalid-dependency":"^3.0.4","@smithy/middleware-content-length":"^3.0.6","@smithy/middleware-endpoint":"^3.1.1","@smithy/middleware-retry":"^3.0.16","@smithy/middleware-serde":"^3.0.4","@smithy/middleware-stack":"^3.0.4","@smithy/node-config-provider":"^3.1.5","@smithy/node-http-handler":"^3.2.0","@smithy/protocol-http":"^4.1.1","@smithy/smithy-client":"^3.3.0","@smithy/types":"^3.4.0","@smithy/url-parser":"^3.0.4","@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.16","@smithy/util-defaults-mode-node":"^3.0.16","@smithy/util-endpoints":"^2.1.0","@smithy/util-middleware":"^3.0.4","@smithy/util-retry":"^3.0.4","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},eue={"@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"},tue={node:">=16.0.0"},rue={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},nue=["dist-*/**"],sue={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},iue="Apache-2.0",oue={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},aue="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity-provider",cue={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-cognito-identity-provider"},lue={name:Gle,description:qle,version:Wle,scripts:Kle,main:Qle,types:Yle,module:Jle,sideEffects:Xle,dependencies:Zle,devDependencies:eue,engines:tue,typesVersions:rue,files:nue,author:sue,license:iue,browser:oue,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:aue,repository:cue},uue=t=>new TextEncoder().encode(t);var fue=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:uue;function pp(t){return t instanceof Uint8Array?t:typeof t=="string"?fue(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function L2(t){return typeof t=="string"?t.length===0:t.byteLength===0}var dL={name:"SHA-256"},f8={name:"HMAC",hash:dL},due=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 hue={};function dv(){return typeof window<"u"?window:typeof self<"u"?self:hue}var pue=function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!L2(e)){var r=pp(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 dv().crypto.subtle.sign(f8,r,e.toHash).then(function(n){return new Uint8Array(n)})}):L2(this.toHash)?Promise.resolve(due):Promise.resolve().then(function(){return dv().crypto.subtle.digest(dL,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){dv().crypto.subtle.importKey("raw",pp(e.secret),f8,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},t}();function yue(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?i(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function vue(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(r=0)),r;)try{if(n=1,s&&(i=l[0]&2?s.return:l[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,l[1])).done)return i;switch(s=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,s=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]bue)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[r++],n--,this.bufferLength===is&&(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%is>=is-8){for(var s=this.bufferLength;s>>24&255,i[s*4+1]=this.state[s]>>>16&255,i[s*4+2]=this.state[s]>>>8&255,i[s*4+3]=this.state[s]>>>0&255;return i},t.prototype.hashBuffer=function(){for(var e=this,r=e.buffer,n=e.state,s=n[0],i=n[1],o=n[2],a=n[3],c=n[4],l=n[5],u=n[6],f=n[7],d=0;d>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[d-15];var y=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(y+this.temp[d-16]|0)}var g=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&l^~c&u)|0)+(f+(gue[d]+this.temp[d]|0)|0)|0,m=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&i^s&o^i&o)|0;f=u,u=l,l=c,c=a+g|0,a=o,o=i,i=s,s=g+m|0}n[0]+=s,n[1]+=i,n[2]+=o,n[3]+=a,n[4]+=c,n[5]+=l,n[6]+=u,n[7]+=f},t}(),wue=function(){function t(e){this.secret=e,this.hash=new hv,this.reset()}return t.prototype.update=function(e){if(!(L2(e)||this.error))try{this.hash.update(pp(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 yue(this,void 0,void 0,function(){return vue(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new hv,this.secret){this.outer=new hv;var e=Eue(this.secret),r=new Uint8Array(is);r.set(e);for(var n=0;nis){var r=new hv;r.update(e),e=r.digest()}var n=new Uint8Array(is);return n.set(e),n}var Sue=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Cue(t){if(Aue(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return kue(e)}return!1}function Aue(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function kue(t){return t&&Sue.every(function(e){return typeof t[e]=="function"})}var Tue=function(){function t(e){Cue(dv())?this.hash=new pue(e):this.hash=new wue(e)}return t.prototype.update=function(e,r){this.hash.update(pp(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t}();const Pue={"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"},hL={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"},Vt={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Qr={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"},Bo={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class te{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 s=te.getVersionPrecision(e),i=te.getVersionPrecision(r);let o=Math.max(s,i),a=0;const c=te.map([e,r],l=>{const u=o-te.getVersionPrecision(l),f=l+new Array(u+1).join(".0");return te.map(f.split("."),d=>new Array(20-d.length).join("0")+d).reverse()});for(n&&(a=o-Math.min(s,i)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]{n[c]=o[c]})}return e}static getBrowserAlias(e){return Pue[e]}static getBrowserTypeByAlias(e){return hL[e]||""}}const ct=/version\/(\d+(\.?_?\d+)+)/i,Rue=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=te.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},r=te.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},r=te.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},r=te.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},r=te.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},r=te.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},r=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},r=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(ct,t)||te.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},r=te.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,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=te.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},r=te.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},r=te.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=te.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},r=te.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},r=te.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},r=te.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=te.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},r=te.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},r=te.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=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(ct,t)||te.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=te.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},r=te.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},r=te.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},r=te.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=te.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},r=te.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},r=te.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},r=te.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=te.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=te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=te.getFirstMatch(ct,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=/^(.*)\/(.*) /,r=/^(.*)\/(.*)[ \t]\((.*)/,s=t.search("\\(")!==-1?r:e;return{name:te.getFirstMatch(s,t),version:te.getSecondMatch(s,t)}}}],Iue=[{test:[/Roku\/DVP/],describe(t){const e=te.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:Qr.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=te.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:Qr.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=te.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=te.getWindowsVersionName(e);return{name:Qr.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:Qr.iOS},r=te.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=te.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=te.getMacOSVersionName(e),n={name:Qr.MacOS,version:e};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=te.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:Qr.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=te.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=te.getAndroidVersionName(e),n={name:Qr.Android,version:e};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=te.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:Qr.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=te.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||te.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||te.getFirstMatch(/\bbb(\d+)/i,t);return{name:Qr.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=te.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:Qr.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=te.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:Qr.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:Qr.Linux}}},{test:[/CrOS/],describe(){return{name:Qr.ChromeOS}}},{test:[/PlayStation 4/],describe(t){const e=te.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:Qr.PlayStation4,version:e}}}],Oue=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){const e=te.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:Vt.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Vt.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Vt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Vt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Vt.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Vt.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Vt.tablet}}},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=te.getFirstMatch(/(ipod|iphone)/i,t);return{type:Vt.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Vt.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Vt.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Vt.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Vt.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Vt.mobile,vendor:"Microsoft"}}},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Vt.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Vt.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Vt.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Vt.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Vt.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Vt.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Vt.tv}}}],_ue=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Bo.Blink};const r=te.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Bo.EdgeHTML,version:r}}},{test:[/trident/i],describe(t){const e={name:Bo.Trident},r=te.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){return t.test(/presto/i)},describe(t){const e={name:Bo.Presto},r=te.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:Bo.Gecko},r=te.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Bo.Blink}}},{test:[/(apple)?webkit/i],describe(t){const e={name:Bo.WebKit},r=te.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class d8{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=te.find(Rue,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=te.find(Iue,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=te.find(Oue,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=te.find(_ue,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 te.assign({},this.parsedResult)}satisfies(e){const r={};let n=0;const s={};let i=0;if(Object.keys(e).forEach(a=>{const c=e[a];typeof c=="string"?(s[a]=c,i+=1):typeof c=="object"&&(r[a]=c,n+=1)}),n>0){const a=Object.keys(r),c=te.find(a,u=>this.isOS(u));if(c){const u=this.satisfies(r[c]);if(u!==void 0)return u}const l=te.find(a,u=>this.isPlatform(u));if(l){const u=this.satisfies(r[l]);if(u!==void 0)return u}}if(i>0){const a=Object.keys(s),c=te.find(a,l=>this.isBrowser(l,!0));if(c!==void 0)return this.compareVersion(s[c])}}isBrowser(e,r=!1){const n=this.getBrowserName().toLowerCase();let s=e.toLowerCase();const i=te.getBrowserTypeByAlias(s);return r&&i&&(s=i.toLowerCase()),s===n}compareVersion(e){let r=[0],n=e,s=!1;const i=this.getBrowserVersion();if(typeof i=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(s=!0,n=e.substr(2)):r=[],e[0]===">"?r.push(1):r.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(s=!0,n=e.substr(1)),r.indexOf(te.compareVersions(i,n,s))>-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 pL{static getParser(e,r=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new d8(e,r)}static parse(e){return new d8(e).getResult()}static get BROWSER_MAP(){return hL}static get ENGINE_MAP(){return Bo}static get OS_MAP(){return Qr}static get PLATFORMS_MAP(){return Vt}}const _ue=({serviceId:t,clientVersion:e})=>async()=>{var s,i,o,a,c;const r=typeof window<"u"&&((s=window==null?void 0:window.navigator)!=null&&s.userAgent)?pL.parse(window.navigator.userAgent):void 0,n=[["aws-sdk-js",e],["ua","2.0"],[`os/${((i=r==null?void 0:r.os)==null?void 0:i.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"}_${((c=r==null?void 0:r.browser)==null?void 0:c.version)??"unknown"}`]];return t&&n.push([`api/${t}`,e]),n},Nue=t=>()=>Promise.reject(t),h8=typeof TextEncoder=="function"?new TextEncoder:null,Mue=t=>{if(typeof t=="string"){if(h8)return h8.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}`)},yL="required",fi="fn",di="argv",gd="ref",p8=!0,y8="isSet",yp="booleanEquals",Hl="error",Vd="endpoint",Ri="tree",sA="PartitionResult",v8={[yL]:!1,type:"String"},m8={[yL]:!0,default:!1,type:"Boolean"},g8={[gd]:"Endpoint"},vL={[fi]:yp,[di]:[{[gd]:"UseFIPS"},!0]},mL={[fi]:yp,[di]:[{[gd]:"UseDualStack"},!0]},Ws={},x8={[fi]:"getAttr",[di]:[{[gd]:sA},"supportsFIPS"]},b8={[fi]:yp,[di]:[!0,{[fi]:"getAttr",[di]:[{[gd]:sA},"supportsDualStack"]}]},w8=[vL],E8=[mL],S8=[{[gd]:"Region"}],Due={version:"1.0",parameters:{Region:v8,UseDualStack:m8,UseFIPS:m8,Endpoint:v8},rules:[{conditions:[{[fi]:y8,[di]:[g8]}],rules:[{conditions:w8,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Hl},{conditions:E8,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Hl},{endpoint:{url:g8,properties:Ws,headers:Ws},type:Vd}],type:Ri},{conditions:[{[fi]:y8,[di]:S8}],rules:[{conditions:[{[fi]:"aws.partition",[di]:S8,assign:sA}],rules:[{conditions:[vL,mL],rules:[{conditions:[{[fi]:yp,[di]:[p8,x8]},b8],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:Vd}],type:Ri},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Hl}],type:Ri},{conditions:w8,rules:[{conditions:[{[fi]:yp,[di]:[x8,p8]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:Vd}],type:Ri},{error:"FIPS is enabled but this partition does not support FIPS",type:Hl}],type:Ri},{conditions:E8,rules:[{conditions:[b8],rules:[{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:Vd}],type:Ri},{error:"DualStack is enabled but this partition does not support DualStack",type:Hl}],type:Ri},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:Vd}],type:Ri}],type:Ri},{error:"Invalid Configuration: Missing Region",type:Hl}]},Lue=Due,jue=new Woe({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Bue=(t,e={})=>jue.get(t,()=>dae(Lue,{endpointParams:t,logger:e.logger}));k0.aws=HD;const Fue=t=>({apiVersion:"2016-04-18",base64Decoder:(t==null?void 0:t.base64Decoder)??ZC,base64Encoder:(t==null?void 0:t.base64Encoder)??tL,disableHostPrefix:(t==null?void 0:t.disableHostPrefix)??!1,endpointProvider:(t==null?void 0:t.endpointProvider)??Bue,extensions:(t==null?void 0:t.extensions)??[],httpAuthSchemeProvider:(t==null?void 0:t.httpAuthSchemeProvider)??Vle,httpAuthSchemes:(t==null?void 0:t.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new lle},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Zce}],logger:(t==null?void 0:t.logger)??new ZD,serviceId:(t==null?void 0:t.serviceId)??"Cognito Identity Provider",urlParser:(t==null?void 0:t.urlParser)??T0,utf8Decoder:(t==null?void 0:t.utf8Decoder)??ed,utf8Encoder:(t==null?void 0:t.utf8Encoder)??eL}),Uue=["in-region","cross-region","mobile","standard","legacy"],Vue=({defaultsMode:t}={})=>ule(async()=>{const e=typeof t=="function"?await t():t;switch(e==null?void 0:e.toLowerCase()){case"auto":return Promise.resolve($ue()?"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 ${Uue.join(", ")}, got ${e}`)}}),$ue=()=>{var r,n;const t=typeof window<"u"&&((r=window==null?void 0:window.navigator)!=null&&r.userAgent)?pL.parse(window.navigator.userAgent):void 0,e=(n=t==null?void 0:t.platform)==null?void 0:n.type;return e==="tablet"||e==="mobile"},zue=t=>{const e=Vue(t),r=()=>e().then(Lce),n=Fue(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:(t==null?void 0:t.bodyLengthChecker)??Mue,credentialDefaultProvider:(t==null?void 0:t.credentialDefaultProvider)??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(t==null?void 0:t.defaultUserAgentProvider)??_ue({serviceId:n.serviceId,clientVersion:cue.version}),maxAttempts:(t==null?void 0:t.maxAttempts)??P0,region:(t==null?void 0:t.region)??Nue("Region is missing"),requestHandler:eA.create((t==null?void 0:t.requestHandler)??r),retryMode:(t==null?void 0:t.retryMode)??(async()=>(await r()).retryMode||Yae),sha256:(t==null?void 0:t.sha256)??kue,streamCollector:(t==null?void 0:t.streamCollector)??kce,useDualstackEndpoint:(t==null?void 0:t.useDualstackEndpoint)??(()=>Promise.resolve(Aae)),useFipsEndpoint:(t==null?void 0:t.useFipsEndpoint)??(()=>Promise.resolve(kae))}},Hue=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}}},Gue=t=>({region:t.region()}),que=t=>{const e=t.httpAuthSchemes;let r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(s){const i=e.findIndex(o=>o.schemeId===s.schemeId);i===-1?e.push(s):e.splice(i,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){n=s},credentials(){return n}}},Wue=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),P1=t=>t,Kue=(t,e)=>{const r={...P1(Hue(t)),...P1(Vce(t)),...P1(_oe(t)),...P1(que(t))};return e.forEach(n=>n.configure(r)),{...t,...Gue(r),...$ce(r),...Noe(r),...Wue(r)}};class Que extends xce{constructor(...[e]){const r=zue(e||{}),n=zle(r),s=qoe(n),i=gce(s),o=Tae(i),a=o,c=Hae(a),l=$le(c),u=Kue(l,(e==null?void 0:e.extensions)||[]);super(u),this.config=u,this.middlewareStack.use(Cae(this.config)),this.middlewareStack.use(Kce(this.config)),this.middlewareStack.use(ole(this.config)),this.middlewareStack.use(joe(this.config)),this.middlewareStack.use(Uoe(this.config)),this.middlewareStack.use(Goe(this.config)),this.middlewareStack.use(qae(this.config,{httpAuthSchemeParametersProvider:Fle,identityProviderConfigProvider:async f=>new Xce({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Jce(this.config))}destroy(){super.destroy()}}class Re extends tA{constructor(e){super(e),Object.setPrototypeOf(this,Re.prototype)}}class iA extends Re{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,iA.prototype)}}class oA extends Re{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,oA.prototype)}}class aA extends Re{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,aA.prototype)}}class cA extends Re{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,cA.prototype)}}class lA extends Re{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,lA.prototype)}}class uA extends Re{constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),this.name="UserImportInProgressException",this.$fault="client",Object.setPrototypeOf(this,uA.prototype)}}class fA extends Re{constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),this.name="UserNotFoundException",this.$fault="client",Object.setPrototypeOf(this,fA.prototype)}}class dA extends Re{constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),this.name="InvalidLambdaResponseException",this.$fault="client",Object.setPrototypeOf(this,dA.prototype)}}class hA extends Re{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,hA.prototype)}}class pA extends Re{constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),this.name="TooManyFailedAttemptsException",this.$fault="client",Object.setPrototypeOf(this,pA.prototype)}}class yA extends Re{constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),this.name="UnexpectedLambdaException",this.$fault="client",Object.setPrototypeOf(this,yA.prototype)}}class og extends Re{constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),this.name="UserLambdaValidationException",this.$fault="client",Object.setPrototypeOf(this,og.prototype)}}class vA extends Re{constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),this.name="CodeDeliveryFailureException",this.$fault="client",Object.setPrototypeOf(this,vA.prototype)}}class mA extends Re{constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),this.name="InvalidPasswordException",this.$fault="client",Object.setPrototypeOf(this,mA.prototype)}}class gA extends Re{constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidSmsRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,gA.prototype)}}class xA extends Re{constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),this.name="InvalidSmsRoleTrustRelationshipException",this.$fault="client",Object.setPrototypeOf(this,xA.prototype)}}class bA extends Re{constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),this.name="PreconditionNotMetException",this.$fault="client",Object.setPrototypeOf(this,bA.prototype)}}class wA extends Re{constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),this.name="UnsupportedUserStateException",this.$fault="client",Object.setPrototypeOf(this,wA.prototype)}}class EA extends Re{constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),this.name="UsernameExistsException",this.$fault="client",Object.setPrototypeOf(this,EA.prototype)}}class SA extends Re{constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),this.name="AliasExistsException",this.$fault="client",Object.setPrototypeOf(this,SA.prototype)}}class CA extends Re{constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),this.name="InvalidUserPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,CA.prototype)}}class AA extends Re{constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),this.name="MFAMethodNotFoundException",this.$fault="client",Object.setPrototypeOf(this,AA.prototype)}}class kA extends Re{constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),this.name="PasswordResetRequiredException",this.$fault="client",Object.setPrototypeOf(this,kA.prototype)}}class TA extends Re{constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),this.name="UserNotConfirmedException",this.$fault="client",Object.setPrototypeOf(this,TA.prototype)}}class PA extends Re{constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),this.name="UserPoolAddOnNotEnabledException",this.$fault="client",Object.setPrototypeOf(this,PA.prototype)}}class RA extends Re{constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidEmailRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,RA.prototype)}}class IA extends Re{constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),this.name="CodeMismatchException",this.$fault="client",Object.setPrototypeOf(this,IA.prototype)}}class OA extends Re{constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),this.name="ExpiredCodeException",this.$fault="client",Object.setPrototypeOf(this,OA.prototype)}}class _A extends Re{constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),this.name="PasswordHistoryPolicyViolationException",this.$fault="client",Object.setPrototypeOf(this,_A.prototype)}}class NA extends Re{constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),this.name="SoftwareTokenMFANotFoundException",this.$fault="client",Object.setPrototypeOf(this,NA.prototype)}}class MA extends Re{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,MA.prototype)}}class DA extends Re{constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),this.name="ForbiddenException",this.$fault="client",Object.setPrototypeOf(this,DA.prototype)}}class LA extends Re{constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),this.name="GroupExistsException",this.$fault="client",Object.setPrototypeOf(this,LA.prototype)}}class jA extends Re{constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),this.name="DuplicateProviderException",this.$fault="client",Object.setPrototypeOf(this,jA.prototype)}}class BA extends Re{constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),this.name="UserPoolTaggingException",this.$fault="client",Object.setPrototypeOf(this,BA.prototype)}}class FA extends Re{constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),this.name="InvalidOAuthFlowException",this.$fault="client",Object.setPrototypeOf(this,FA.prototype)}}class UA extends Re{constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),this.name="ScopeDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,UA.prototype)}}class VA extends Re{constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),this.name="UnsupportedIdentityProviderException",this.$fault="client",Object.setPrototypeOf(this,VA.prototype)}}const C8=t=>({...t,...t.Value&&{Value:ur}}),gL=t=>({...t,...t.AccessToken&&{AccessToken:ur},...t.RefreshToken&&{RefreshToken:ur},...t.IdToken&&{IdToken:ur}}),Yue=t=>({...t,...t.AuthParameters&&{AuthParameters:ur},...t.ClientId&&{ClientId:ur},...t.UserContextData&&{UserContextData:ur}}),Jue=t=>({...t,...t.Session&&{Session:ur},...t.AuthenticationResult&&{AuthenticationResult:gL(t.AuthenticationResult)}}),Xue=t=>({...t,...t.ClientId&&{ClientId:ur},...t.Session&&{Session:ur},...t.ChallengeResponses&&{ChallengeResponses:ur},...t.UserContextData&&{UserContextData:ur}}),Zue=t=>({...t,...t.Session&&{Session:ur},...t.AuthenticationResult&&{AuthenticationResult:gL(t.AuthenticationResult)}});class $A extends Re{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,$A.prototype)}}class zA extends Re{constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),this.name="UnsupportedOperationException",this.$fault="client",Object.setPrototypeOf(this,zA.prototype)}}class HA extends Re{constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),this.name="UnsupportedTokenTypeException",this.$fault="client",Object.setPrototypeOf(this,HA.prototype)}}class GA extends Re{constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),this.name="EnableSoftwareTokenMFAException",this.$fault="client",Object.setPrototypeOf(this,GA.prototype)}}const efe=t=>({...t,...t.ClientId&&{ClientId:ur},...t.SecretHash&&{SecretHash:ur},...t.Username&&{Username:ur},...t.Password&&{Password:ur},...t.UserAttributes&&{UserAttributes:t.UserAttributes.map(e=>C8(e))},...t.ValidationData&&{ValidationData:t.ValidationData.map(e=>C8(e))},...t.UserContextData&&{UserContextData:ur}}),tfe=async(t,e)=>{const r=KA("InitiateAuth");let n;return n=JSON.stringify(Ce(t)),WA(e,r,"/",void 0,n)},rfe=async(t,e)=>{const r=KA("RespondToAuthChallenge");let n;return n=JSON.stringify(Ce(t)),WA(e,r,"/",void 0,n)},nfe=async(t,e)=>{const r=KA("SignUp");let n;return n=JSON.stringify(Ce(t)),WA(e,r,"/",void 0,n)},sfe=async(t,e)=>{if(t.statusCode>=300)return qA(t,e);const r=await ig(t.body,e);let n={};return n=Ce(r),{$metadata:Ie(t),...n}},ife=async(t,e)=>{if(t.statusCode>=300)return qA(t,e);const r=await ig(t.body,e);let n={};return n=Ce(r),{$metadata:Ie(t),...n}},ofe=async(t,e)=>{if(t.statusCode>=300)return qA(t,e);const r=await ig(t.body,e);let n={};return n=Ce(r),{$metadata:Ie(t),...n}},qA=async(t,e)=>{const r={...t,body:await jle(t.body,e)},n=Ble(t,r.body);switch(n){case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await vfe(r);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await bfe(r);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Tfe(r);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Ofe(r);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Dfe(r);case"UserImportInProgressException":case"com.amazonaws.cognitoidentityprovider#UserImportInProgressException":throw await $fe(r);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await qfe(r);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await gfe(r);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await Afe(r);case"TooManyFailedAttemptsException":case"com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException":throw await Mfe(r);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await jfe(r);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await zfe(r);case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await cfe(r);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await wfe(r);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await Efe(r);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await Sfe(r);case"PreconditionNotMetException":case"com.amazonaws.cognitoidentityprovider#PreconditionNotMetException":throw await Ife(r);case"UnsupportedUserStateException":case"com.amazonaws.cognitoidentityprovider#UnsupportedUserStateException":throw await Vfe(r);case"UsernameExistsException":case"com.amazonaws.cognitoidentityprovider#UsernameExistsException":throw await Hfe(r);case"AliasExistsException":case"com.amazonaws.cognitoidentityprovider#AliasExistsException":throw await afe(r);case"InvalidUserPoolConfigurationException":case"com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException":throw await Cfe(r);case"MFAMethodNotFoundException":case"com.amazonaws.cognitoidentityprovider#MFAMethodNotFoundException":throw await kfe(r);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await Rfe(r);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await Gfe(r);case"UserPoolAddOnNotEnabledException":case"com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException":throw await Wfe(r);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await mfe(r);case"CodeMismatchException":case"com.amazonaws.cognitoidentityprovider#CodeMismatchException":throw await lfe(r);case"ExpiredCodeException":case"com.amazonaws.cognitoidentityprovider#ExpiredCodeException":throw await hfe(r);case"PasswordHistoryPolicyViolationException":case"com.amazonaws.cognitoidentityprovider#PasswordHistoryPolicyViolationException":throw await Pfe(r);case"SoftwareTokenMFANotFoundException":case"com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException":throw await Nfe(r);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentityprovider#ConcurrentModificationException":throw await ufe(r);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await pfe(r);case"GroupExistsException":case"com.amazonaws.cognitoidentityprovider#GroupExistsException":throw await yfe(r);case"DuplicateProviderException":case"com.amazonaws.cognitoidentityprovider#DuplicateProviderException":throw await ffe(r);case"UserPoolTaggingException":case"com.amazonaws.cognitoidentityprovider#UserPoolTaggingException":throw await Kfe(r);case"InvalidOAuthFlowException":case"com.amazonaws.cognitoidentityprovider#InvalidOAuthFlowException":throw await xfe(r);case"ScopeDoesNotExistException":case"com.amazonaws.cognitoidentityprovider#ScopeDoesNotExistException":throw await _fe(r);case"UnsupportedIdentityProviderException":case"com.amazonaws.cognitoidentityprovider#UnsupportedIdentityProviderException":throw await Bfe(r);case"UnauthorizedException":case"com.amazonaws.cognitoidentityprovider#UnauthorizedException":throw await Lfe(r);case"UnsupportedOperationException":case"com.amazonaws.cognitoidentityprovider#UnsupportedOperationException":throw await Ffe(r);case"UnsupportedTokenTypeException":case"com.amazonaws.cognitoidentityprovider#UnsupportedTokenTypeException":throw await Ufe(r);case"EnableSoftwareTokenMFAException":case"com.amazonaws.cognitoidentityprovider#EnableSoftwareTokenMFAException":throw await dfe(r);default:const s=r.body;return Qfe({output:t,parsedBody:s,errorCode:n})}},afe=async(t,e)=>{const r=t.body,n=Ce(r),s=new SA({$metadata:Ie(t),...n});return Ne(s,r)},cfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new vA({$metadata:Ie(t),...n});return Ne(s,r)},lfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new IA({$metadata:Ie(t),...n});return Ne(s,r)},ufe=async(t,e)=>{const r=t.body,n=Ce(r),s=new MA({$metadata:Ie(t),...n});return Ne(s,r)},ffe=async(t,e)=>{const r=t.body,n=Ce(r),s=new jA({$metadata:Ie(t),...n});return Ne(s,r)},dfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new GA({$metadata:Ie(t),...n});return Ne(s,r)},hfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new OA({$metadata:Ie(t),...n});return Ne(s,r)},pfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new DA({$metadata:Ie(t),...n});return Ne(s,r)},yfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new LA({$metadata:Ie(t),...n});return Ne(s,r)},vfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new iA({$metadata:Ie(t),...n});return Ne(s,r)},mfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new RA({$metadata:Ie(t),...n});return Ne(s,r)},gfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new dA({$metadata:Ie(t),...n});return Ne(s,r)},xfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new FA({$metadata:Ie(t),...n});return Ne(s,r)},bfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new oA({$metadata:Ie(t),...n});return Ne(s,r)},wfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new mA({$metadata:Ie(t),...n});return Ne(s,r)},Efe=async(t,e)=>{const r=t.body,n=Ce(r),s=new gA({$metadata:Ie(t),...n});return Ne(s,r)},Sfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new xA({$metadata:Ie(t),...n});return Ne(s,r)},Cfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new CA({$metadata:Ie(t),...n});return Ne(s,r)},Afe=async(t,e)=>{const r=t.body,n=Ce(r),s=new hA({$metadata:Ie(t),...n});return Ne(s,r)},kfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new AA({$metadata:Ie(t),...n});return Ne(s,r)},Tfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new aA({$metadata:Ie(t),...n});return Ne(s,r)},Pfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new _A({$metadata:Ie(t),...n});return Ne(s,r)},Rfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new kA({$metadata:Ie(t),...n});return Ne(s,r)},Ife=async(t,e)=>{const r=t.body,n=Ce(r),s=new bA({$metadata:Ie(t),...n});return Ne(s,r)},Ofe=async(t,e)=>{const r=t.body,n=Ce(r),s=new cA({$metadata:Ie(t),...n});return Ne(s,r)},_fe=async(t,e)=>{const r=t.body,n=Ce(r),s=new UA({$metadata:Ie(t),...n});return Ne(s,r)},Nfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new NA({$metadata:Ie(t),...n});return Ne(s,r)},Mfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new pA({$metadata:Ie(t),...n});return Ne(s,r)},Dfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new lA({$metadata:Ie(t),...n});return Ne(s,r)},Lfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new $A({$metadata:Ie(t),...n});return Ne(s,r)},jfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new yA({$metadata:Ie(t),...n});return Ne(s,r)},Bfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new VA({$metadata:Ie(t),...n});return Ne(s,r)},Ffe=async(t,e)=>{const r=t.body,n=Ce(r),s=new zA({$metadata:Ie(t),...n});return Ne(s,r)},Ufe=async(t,e)=>{const r=t.body,n=Ce(r),s=new HA({$metadata:Ie(t),...n});return Ne(s,r)},Vfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new wA({$metadata:Ie(t),...n});return Ne(s,r)},$fe=async(t,e)=>{const r=t.body,n=Ce(r),s=new uA({$metadata:Ie(t),...n});return Ne(s,r)},zfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new og({$metadata:Ie(t),...n});return Ne(s,r)},Hfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new EA({$metadata:Ie(t),...n});return Ne(s,r)},Gfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new TA({$metadata:Ie(t),...n});return Ne(s,r)},qfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new fA({$metadata:Ie(t),...n});return Ne(s,r)},Wfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new PA({$metadata:Ie(t),...n});return Ne(s,r)},Kfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new BA({$metadata:Ie(t),...n});return Ne(s,r)},Ie=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"]}),Qfe=Mce(Re),WA=async(t,e,r,n,s)=>{const{hostname:i,protocol:o="https",port:a,path:c}=await t.endpoint(),l={protocol:o,hostname:i,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+r:c+r,headers:e};return n!==void 0&&(l.hostname=n),s!==void 0&&(l.body=s),new Vn(l)};function KA(t){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}}class Yfe extends sg.classBuilder().ep({...nA}).m(function(e,r,n,s){return[JC(n,this.serialize,this.deserialize),XC(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").f(Yue,Jue).ser(tfe).de(sfe).build(){}class Jfe extends sg.classBuilder().ep({...nA}).m(function(e,r,n,s){return[JC(n,this.serialize,this.deserialize),XC(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").f(Xue,Zue).ser(rfe).de(ife).build(){}class Xfe extends sg.classBuilder().ep({...nA}).m(function(e,r,n,s){return[JC(n,this.serialize,this.deserialize),XC(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").f(efe,void 0).ser(nfe).de(ofe).build(){}class ih extends Error{}ih.prototype.name="InvalidTokenError";function Zfe(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 ede(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 Zfe(e)}catch{return atob(e)}}function xL(t,e){if(typeof t!="string")throw new ih("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 ih(`Invalid token specified: missing part #${r+1}`);let s;try{s=ede(n)}catch(i){throw new ih(`Invalid token specified: invalid base64 for part #${r+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new ih(`Invalid token specified: invalid json for part #${r+1} (${i.message})`)}}function tr(){return tr=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const tde=["signatures"],rde=1,nde=`${rde} (Web ${uoe})`;function Rr(t,e,r){const n=Math.floor(Date.now()/1e3),s=n+e;return{version:nde,issuedAt:n,expiresAt:s,name:t,data:r}}async function sde(t,e){const r=ide(e),n=await t.sign(new Uint8Array(r));return tr({},e,{signatures:[{sessionId:await t.sessionId(),signature:n}]})}function ide(t){const{version:e,issuedAt:r,expiresAt:n,name:s,data:i}=t,a=Sr(foe({version:e,issuedAt:r,expiresAt:n,name:s,data:i}));return fe(Ct(a))}function ode(t,e){const r=Pr(t,tde),n=t.expiresAt-t.issuedAt;return r.issuedAt=Math.floor(e.getTime()/1e3),r.expiresAt=r.issuedAt+n,r}let Ir=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}({}),xd=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}({}),eb=function(t){return t.unknown="unknown",t.erc20Token="erc20Token",t.erc1155Token="erc1155Token",t}({}),Ft=function(t){return t.None="None",t.Guest="Guest",t.OIDC="OIDC",t.Email="Email",t.PlayFab="PlayFab",t.Stytch="Stytch",t}({});function ade({wallet:t,chainId:e,message:r,lifespan:n}){return Rr(Ir.signMessage,n,{wallet:t,network:e.toString(),message:r.startsWith("0x")?r:ne(Sr(r))})}const cde=["lifespan"],lde=["lifespan"],ude=["lifespan"],fde=["lifespan"],dde=["lifespan"],hde=["lifespan"],pde=["lifespan"],yde=["lifespan"],vde=["lifespan"];async function $d(t){let{lifespan:e}=t,r=Pr(t,cde);return Rr(Ir.initiateAuth,e,r)}async function A8(t){let{lifespan:e}=t,r=Pr(t,lde);return Rr(Ir.openSession,e,r)}async function mde(t){let{lifespan:e}=t,r=Pr(t,ude);return Rr(Ir.validateSession,e,r)}function gde(t){let{lifespan:e}=t,r=Pr(t,fde);return Rr(Ir.finishValidateSession,e,r)}function k8(t){let{lifespan:e}=t,r=Pr(t,dde);return Rr(Ir.closeSession,e,r)}function xde(t){let{lifespan:e}=t,r=Pr(t,hde);return Rr(Ir.listSessions,e,r)}function bde(t){let{lifespan:e}=t,r=Pr(t,pde);return Rr(Ir.getSession,e,r)}function wde(t){let{lifespan:e}=t,r=Pr(t,yde);return Rr(Ir.sessionAuthProof,e,r)}function Ede(t){let{lifespan:e}=t,r=Pr(t,vde);return Rr(Ir.getIdToken,e,r)}const Sde=["token","to","value"],Cde=["token","to","id","safe","data"],Ade=["token","to","values","data"],kde=["to","value","abi","func","args"];function Tde({lifespan:t,wallet:e,identifier:r,chainId:n,transactions:s}){return Rr(Ir.feeOptions,t,{identifier:r,wallet:e,network:n.toString(),transactions:s.map(i=>{if(!i.to||i.to===vl)throw new Error("Contract creation not supported");return wL(i)?{type:"transaction",to:i.to,value:GC(BigInt(i.value||0)),data:ne(i.data||"0x")}:i})})}function Cy({lifespan:t,wallet:e,identifier:r,chainId:n,transactions:s,transactionsFeeQuote:i,transactionsFeeOption:o}){return Rr(Ir.sendTransaction,t,{identifier:r,wallet:e,network:n.toString(),transactions:Pde(s,o).map(a=>{if(!a.to||a.to===vl)throw new Error("Contract creation not supported");return wL(a)?{type:"transaction",to:a.to,value:GC(BigInt(a.value||0)),data:ne(a.data||"0x")}:a}),transactionsFeeQuote:i})}function Pde(t,e){const r=[...t];if(e)switch(e.token.type){case eb.unknown:r.push({to:e.to,value:e.value});break;case eb.erc20Token:if(!e.token.contractAddress)throw new Error("contract address is required");r.push(QA({tokenAddress:e.token.contractAddress,to:e.to,value:e.value}));break;case eb.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(YA({tokenAddress:e.token.contractAddress,to:e.to,vals:[{id:e.token.tokenID,amount:e.value}]}));break}return r}function Rde({lifespan:t,chainId:e,wallet:r,metaTxHash:n}){return Rr(Ir.getTransactionReceipt,t,{wallet:r,network:e.toString(),metaTxHash:n})}function Ide(t){let{token:e,to:r,value:n}=t,s=Pr(t,Sde);return Cy(tr({transactions:[QA({tokenAddress:e,to:r,value:n.toString()})]},s))}function Ode(t){let{token:e,to:r,id:n,safe:s,data:i}=t,o=Pr(t,Cde);return Cy(tr({transactions:[Mde({tokenAddress:e,to:r,id:n,data:i,safe:s})]},o))}function _de(t){let{token:e,to:r,values:n,data:s}=t,i=Pr(t,Ade);const o=n.map(a=>({id:a.id,amount:BigInt(a.amount).toString()}));return Cy(tr({transactions:[YA({tokenAddress:e,to:r,vals:o,data:s})]},i))}function Nde(t){let{to:e,value:r,abi:n,func:s,args:i}=t,o=Pr(t,kde);return Cy(tr({transactions:[bL({to:e,value:BigInt(r).toString(),data:{abi:n,func:s,args:i}})]},o))}function QA(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 tr({type:"erc20send"},r);throw new Error("Invalid ERC20 transaction")}function Mde(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 tr({type:"erc721send"},r);throw new Error("Invalid ERC721 transaction")}function YA(t){const e=t,r=t;if(e.values!==void 0)return{type:"erc1155send",vals:e.values.map(n=>({id:n.id,amount: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:n.amount})),tokenAddress:r.tokenAddress,to:r.to,data:r.data};throw new Error("Invalid ERC1155 transaction")}function bL(t){const e=t,r=t;if(e.abi!==void 0)return{type:"delayedEncode",to:e.to,value:GC(BigInt(e.value)),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 Dde(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,s=t[0].data.identifier,i=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 Rr(Ir.sendTransaction,n,{network:e,wallet:r,identifier:s,transactions:t.flatMap(o=>o.data.transactions),transactionsFeeQuote:i})}function wL(t){return!["transaction","erc20send","erc721send","erc1155send","delayedEncode"].includes(t.type)}class pv{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 EL{constructor(){this.store=void 0,I0.isAvailable()?this.store=new I0:this.store=new Lde}async get(e){return this.store.get(e)}async set(e,r){return this.store.set(e,r)}}class I0{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(!I0.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 Lde{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 j2="seq-waas-session-p256k1",B2="seq-waas-session";async function SL(t,e){const r=await e.get(j2,B2,t);if(!r)throw new Error("No private key found");const n=new up(r);return{sessionId(){return n.getAddress()},sign(s){return n.signMessage(s)},clear:async()=>{await e.delete(j2,B2,t)}}}async function jde(t,e){const n=await new up(t).getAddress();return await e.set(j2,B2,n,t),SL(n,e)}async function Bde(t){const e=up.createRandom();return jde(e.privateKey,t)}let CL=function(t){return t[t.ECDSAP256K1=0]="ECDSAP256K1",t[t.ECDSAP256R1=1]="ECDSAP256R1",t}({});const F2="seq-waas-session-p256r1",U2="seq-waas-session";async function AL(t,e,r){const n=await r.get(F2,U2,t);if(!n||!n.privateKey)throw new Error("No private key found");const s=new TextEncoder;return{sessionId:async()=>{const i=await e.exportKey("raw",n.publicKey),o=new Uint8Array(i.byteLength+1);return o[0]=CL.ECDSAP256R1,o.set(new Uint8Array(i),1),ne(o)},sign:async i=>{typeof i=="string"&&(i.startsWith("0x")?(i=i.slice(2),i=fe(i)):i=s.encode(i));const o=await e.sign({name:"ECDSA",hash:{name:"SHA-256"}},n.privateKey,i);return ne(new Uint8Array(o))},clear:async()=>{await r.delete(F2,U2,t)}}}async function Fde(t,e,r){const n=await Vde(e,t.publicKey);return await r.set(F2,U2,n,t),AL(n,e,r)}async function Ude(t,e){const r=await t.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"]);return Fde(r,t,e)}async function Vde(t,e){const r=await t.exportKey("raw",e),n=new Uint8Array(r.byteLength+1);return n[0]=CL.ECDSAP256R1,n.set(new Uint8Array(r),1),ne(n)}async function V2(t,e,r){if(!r)throw new Error("No secure store available");return e?AL(t,e,r):SL(t,r)}async function $de(t,e){if(!e)throw new Error("No secure store available");return t?Ude(t,e):Bde(e)}const zde=["lifespan"],Hde=["lifespan"],Gde=["lifespan"];function qde(t){let{lifespan:e}=t,r=Pr(t,zde);return Rr(Ir.listAccounts,e,r)}function Wde(t){let{lifespan:e}=t,r=Pr(t,Hde);return Rr(Ir.federateAccount,e,r)}function Kde(t){let{lifespan:e}=t,r=Pr(t,Gde);return Rr(Ir.removeAccount,e,r)}const $2=Object.entries(S0).reduce((t,[e,r])=>(t[r.name]=r.chainId,t),{}),Qde=Object.entries($2).reduce((t,[e,r])=>(t[r]=e,t),{});function tb(t){const e=typeof t=="number"?t:parseInt(t);if(e in Qde)return e;const r=t.toString().toLowerCase();if(r in $2)return $2[r];throw new Error(`Unknown network: ${t}`)}const kL=()=>TL()?new Yde:null;function TL(){return typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.subtle=="object"}class Yde{constructor(){if(!TL())throw new Error("window.crypto.subtle is not available")}generateKey(e,r,n){return window.crypto.subtle.generateKey(e,r,n)}importKey(e,r,n,s,i){return window.crypto.subtle.importKey(e,r,n,s,i)}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 s=await window.crypto.subtle.sign(e,r,n);return new Uint8Array(s)}verify(e,r,n,s){return window.crypto.subtle.verify(e,r,n,s)}getRandomValues(e){const r=new Uint8Array(e);return window.crypto.getRandomValues(r)}}const PL=()=>RL()?new Jde:null;function RL(){return typeof indexedDB=="object"}class Jde{constructor(){if(this.db=void 0,!RL())throw new Error("IndexedDB is not available");this.db=null}async openDB(e,r,n){return this.db?this.db:(this.db=await Roe(e,1,{upgrade(s){s.createObjectStore(r)}}),this.db)}async get(e,r,n){const s=await this.openDB(e,r,1),i=s.transaction(r,"readonly"),o=await s.get(r,n);return await i.done,o}async set(e,r,n,s){const i=await this.openDB(e,r,1),o=i.transaction(r,"readwrite");return await i.put(r,s,n),await o.done,!0}async delete(e,r,n){const s=await this.openDB(e,r,1),i=s.transaction(r,"readwrite");return await s.delete(r,n),await i.done,!0}}const Xde="@0xsequence.waas.wallet",Zde="@0xsequence.waas.session_id",ehe="@0xsequence.waas.status",Xt=5*60;class the{constructor(e={network:1},r=new EL,n=kL(),s=PL()){this.config=e,this.store=r,this.cryptoBackend=n,this.secureStoreBackend=s,this.status=void 0,this.sessionId=void 0,this.wallet=void 0,this.sessionObservers=[],this.gettingSessionIdPromise=void 0,this.status=new pv(this.store,ehe,"signed-out"),this.sessionId=new pv(this.store,Zde,void 0),this.wallet=new pv(this.store,Xde,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 tr({},e,{identifier:e==null?void 0:e.identifier,wallet:await this.getWalletAddress(),lifespan:(r=e==null?void 0:e.lifespan)!=null?r:Xt,chainId:tb(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 V2(r,this.cryptoBackend,this.secureStoreBackend);return sde(n,e)}async signUsingSessionKey(e){const r=await this.getSessionId();if(!r)throw new Error("session not open");return(await V2(r,this.cryptoBackend,this.secureStoreBackend)).sign(e)}async getSessionId(){var e=this;if(this.gettingSessionIdPromise)return this.gettingSessionIdPromise;const r=async function(){let s=await e.sessionId.get();return s||(s=await(await $de(e.cryptoBackend,e.secureStoreBackend)).sessionId(),await e.sessionId.set(s),e.signalObservers(e.sessionObservers,s)),e.gettingSessionIdPromise=void 0,s};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(),s=await A8({sessionId:n,identityType:Ft.None,idToken:e,lifespan:Xt});return await this.status.set("pending"),this.signIntent(s)}async initiateGuestAuth(){const e=await this.getSessionId(),r=await $d({sessionId:e,identityType:Ft.Guest,verifier:e,lifespan:Xt});return this.signIntent(r)}async initiateEmailAuth(e){const r=await this.getSessionId(),n=await $d({sessionId:r,identityType:Ft.Email,verifier:`${e};${r}`,lifespan:Xt});return this.signIntent(n)}async initiateIdTokenAuth(e,r){const n=await this.getSessionId(),s=Cr(e),i=await $d({sessionId:n,identityType:Ft.OIDC,verifier:`${s};${r}`,lifespan:Xt});return this.signIntent(i)}async initiateStytchAuth(e,r){const n=await this.getSessionId(),s=Cr(e),i=await $d({sessionId:n,identityType:Ft.Stytch,verifier:`${s};${r}`,lifespan:Xt});return this.signIntent(i)}async initiatePlayFabAuth(e,r){const n=await this.getSessionId(),s=Cr(r),i=await $d({sessionId:n,identityType:Ft.PlayFab,verifier:`${e}|${s}`,lifespan:Xt});return this.signIntent(i)}async completeAuth(e,r){const n=await this.getSessionId(),s=await A8(tr({},r,{sessionId:n,lifespan:Xt},e));return await this.status.set("pending"),this.signIntent(s)}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=k8({lifespan:e||Xt,sessionId:r});return this.signIntent(n)}async signOutSession(e){const r=k8({lifespan:Xt,sessionId:e});return this.signIntent(r)}async listSessions(){const e=xde({lifespan:Xt,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=wde({lifespan:(r=e.lifespan)!=null?r:Xt,network:tb(e.network||this.config.network).toString(),wallet:await this.getWalletAddress(),nonce:e.nonce});return this.signIntent(n)}async signMessage(e){var r;const n=ade(tr({chainId:tb(e.network||this.config.network)},e,{lifespan:(r=e.lifespan)!=null?r:Xt,wallet:await this.getWalletAddress()}));return this.signIntent(n)}async sendTransaction(e){const r=Cy(await this.commonArgs(e));return this.signIntent(r)}async getTransactionReceipt(e){const r=Rde(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=Ide(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=Ode(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=_de(await this.commonArgs(e));return this.signIntent(r)}async callContract(e){const r=Nde(await this.commonArgs(e));return this.signIntent(r)}async feeOptions(e){const r=Tde(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 mde({lifespan:Xt,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=bde({sessionId:e,wallet:await this.getWalletAddress(),lifespan:Xt});return this.signIntent(r)}async finishValidateSession(e,r){const n=await this.sessionId.get();if(!n)throw new Error("session not open");const s=await this.getWalletAddress(),i=gde({sessionId:n,wallet:s,lifespan:Xt,salt:e,challenge:r});return this.signIntent(i)}async listAccounts(){const e=qde({wallet:await this.getWalletAddress(),lifespan:Xt});return this.signIntent(e)}async linkAccount(e){const r=await this.sessionId.get();if(!r)throw new Error("session not open");const n=Wde(tr({wallet:await this.getWalletAddress(),lifespan:Xt,sessionId:r},e));return this.signIntent(n)}async removeAccount({accountId:e}){const r=Kde({wallet:await this.getWalletAddress(),lifespan:Xt,accountId:e});return this.signIntent(r)}async getIdToken({nonce:e}){const r=await this.sessionId.get();if(!r)throw new Error("session not open");const n=Ede({wallet:await this.getWalletAddress(),lifespan:Xt,sessionId:r,nonce:e});return this.signIntent(n)}async batch(e){const r=Dde(e);return this.signIntent(r)}signalObservers(e,r){e.forEach(n=>n(r))}async updateIntentTime(e,r){const n=ode(e,r);return this.signIntent(n)}}class rhe{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/WaasAuthenticator/",this.registerSession=(n,s,i)=>this.fetch(this.url("RegisterSession"),rb(n,s,i)).then(o=>nb(o).then(a=>({session:a.session,response:a.response})),o=>{throw yv.new({cause:`fetch(): ${o.message||""}`})}),this.sendIntent=(n,s,i)=>this.fetch(this.url("SendIntent"),rb(n,s,i)).then(o=>nb(o).then(a=>({response:a.response})),o=>{throw yv.new({cause:`fetch(): ${o.message||""}`})}),this.chainList=(n,s)=>this.fetch(this.url("ChainList"),rb({},n,s)).then(i=>nb(i).then(o=>({chains:o.chains})),i=>{throw yv.new({cause:`fetch(): ${i.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const rb=(t={},e={},r=null)=>({method:"POST",headers:tr({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),nb=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),LL.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(hhe[n]||Yt).new(r)}return r});let Yt=class IL extends Error{constructor(e,r,n,s,i){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 s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,IL.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},nhe=class OL extends Yt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,OL.prototype)}},yv=class _L extends Yt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,_L.prototype)}},she=class NL extends Yt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,NL.prototype)}},ihe=class ML extends Yt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ML.prototype)}},ohe=class DL extends Yt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,DL.prototype)}},LL=class jL extends Yt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,jL.prototype)}},ahe=class BL extends Yt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,BL.prototype)}},che=class FL extends Yt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,FL.prototype)}},lhe=class UL extends Yt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,UL.prototype)}},uhe=class VL extends Yt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,VL.prototype)}},fhe=class $L extends Yt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,$L.prototype)}},dhe=class zL extends Yt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,zL.prototype)}};class JA extends Yt{constructor(e="TenantNotFound",r=1001,n="Tenant not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,JA.prototype)}}class vp extends Yt{constructor(e="EmailAlreadyInUse",r=7e3,n="Could not create account as the email is already in use",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vp.prototype)}}class XA extends Yt{constructor(e="AccountAlreadyLinked",r=7001,n="Could not link account as it is linked to another wallet",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,XA.prototype)}}class ZA extends Yt{constructor(e="ProofVerificationFailed",r=7002,n="The authentication proof could not be verified",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ZA.prototype)}}class mp extends Yt{constructor(e="AnswerIncorrect",r=7003,n="The provided answer is incorrect",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mp.prototype)}}class ek extends Yt{constructor(e="ChallengeExpired",r=7004,n="The challenge has expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ek.prototype)}}class tk extends Yt{constructor(e="TooManyAttempts",r=7005,n="Too many attempts",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,tk.prototype)}}const hhe={0:nhe,[-1]:yv,[-2]:she,[-3]:ihe,[-4]:ohe,[-5]:LL,[-6]:ahe,[-7]:che,[-8]:lhe,[-9]:uhe,[-10]:fhe,1e3:dhe,1001:JA,7e3:vp,7001:XA,7002:ZA,7003:mp,7004:ek,7005:tk};function R1(t){return typeof t=="object"&&t.code===xd.authInitiated&&typeof t.data=="object"&&typeof t.data.sessionId=="string"&&typeof t.data.identityType=="string"&&typeof t.data.expiresIn=="number"}function Ay(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 HL(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 phe(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 T8(t){return Ay(t)||phe(t)||HL(t)}function yhe(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 vhe(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 mhe(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="feeOptions"&&typeof t.data=="object"&&Array.isArray(t.data.feeOptions)}function ghe(t){return typeof t=="object"&&t.code===xd.validationRequired&&typeof t.data=="object"&&typeof t.data.sessionId=="string"}function xhe(t){return typeof t=="object"&&t.code===xd.validationFinished&&typeof t.data=="object"}function bhe(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="sessionClosed"}function whe(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 Ehe(t){return typeof t=="object"&&t.code===xd.accountFederated&&typeof t.data=="object"&&typeof t.data.account=="object"}function She(t){return typeof t=="object"&&t.code===xd.accountList&&typeof t.data=="object"}function P8(t){var e,r;return!!(t instanceof Yt&&((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")))}function Che(t){return typeof t=="object"&&t.code===xd.idToken&&typeof t.data=="object"&&typeof t.data.idToken=="string"}class Ahe{constructor(e,r){this.region=e,this.clientId=r,this.cognitoMemo=void 0}cognito(){return this.cognitoMemo||(this.cognitoMemo=new Que({region:this.region})),this.cognitoMemo}signUp(e){return e=e.toLowerCase().trim(),this.cognito().send(new Xfe({ClientId:this.clientId,Username:e,Password:"aB1%"+khe(14),UserAttributes:[{Name:"email",Value:e}]}))}signIn(e){return e=e.toLowerCase().trim(),this.cognito().send(new Yfe({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 og&&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:s}){r=r.toLowerCase().trim();const i=await this.cognito().send(new Jfe({ClientId:this.clientId,Session:e,ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:{USERNAME:r,ANSWER:n},ClientMetadata:{SESSION_HASH:s}}));if(!i.AuthenticationResult||!i.AuthenticationResult.IdToken)throw new Error("AuthenticationResult.IdToken is empty");return{idToken:i.AuthenticationResult.IdToken}}}function khe(t){return Array.from(The(t)).map(e=>e.toString(16).padStart(2,"0")).join("")}function The(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{if(this.signatureVerificationFailed)throw new Error("Signature verification failed");if(this.cryptoBackend&&this.config.disableHttpSignatureCheck!==!0&&a!=null&&a.headers){const l={};l["Accept-Signature"]='sig=();alg="rsa-v1_5-sha256"',a.headers=tr({},a.headers,l)}const c=Nhe(o,a);return this.cryptoBackend&&this.config.disableHttpSignatureCheck!==!0&&c.then(async function(l){try{var u,f;const h=await l.clone().text(),p=l.headers.get("Content-Digest"),y=l.headers.get("Signature-Input"),g=l.headers.get("Signature");if(!p)throw new Error("Content-Digest header not set");if(!y)throw new Error("Signature-Input header not set");if(!g)throw new Error("Signature header not set");const m=(u=p.match(":(.*):"))==null?void 0:u[1];if(!m)throw new Error("Content digest not found");const x=new TextEncoder().encode(h),b=await i.cryptoBackend.digest("SHA-256",x),w=btoa(String.fromCharCode(...b));if(m!==w)throw new Error("Digest mismatch");const A=`"content-digest": ${p} -"@signature-params": ${y.substring(4)}`,O={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},_=l.url.includes("dev-waas")?Mhe:Dhe,C=await i.cryptoBackend.importKey("jwk",_.keys[0],O,!1,["verify"]),j=(f=g.match(":(.*):"))==null?void 0:f[1];if(!j)throw new Error("Signature not found");const V=Uint8Array.from(atob(j),z=>z.charCodeAt(0));if(!await i.cryptoBackend.verify(O,C,V,new TextEncoder().encode(A)))throw new Error("Signature verification failed, consequent requests will fail")}catch(d){throw i.signatureVerificationFailed=!0,d}}),c},this.config=_he(e),this.waas=new the(tr({network:1},e),this.store,this.cryptoBackend,this.secureStoreBackend),this.client=new rhe(this.config.rpcServer,this._fetch),this.deviceName=new pv(this.store,"@0xsequence.waas.auth.deviceName",void 0)}get email(){if(this.emailClient)return this.emailClient;if(!this.config.emailRegion)throw new Error("Missing emailRegion");if(!this.config.emailClientId)throw new Error("Missing emailClientId");return this.emailClient=new Ahe(this.config.emailRegion,this.config.emailClientId),this.emailClient}async onValidationRequired(e){return this.validationRequiredCallback.push(e),()=>{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 s=await this.waas.validateSession({deviceMetadata:(r=await this.deviceName.get())!=null?r:"Unknown device"}),i=await this.sendIntent(s);this.validationRequiredSalt=i.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(P8(n)&&this.lastDate){const s=await this.waas.updateIntentTime(e,this.lastDate);return(await this.client.sendIntent({intent:s},this.headers())).response}throw n}}async isSignedIn(){return this.waas.isSignedIn()}signIn(e,r){var n=this;const s="email"in e;return s&&this.emailAuthCodeRequiredCallback.length==0?Promise.reject("Missing emailAuthCodeRequired callback"):new Promise(async function(i,o){let a;try{a=await n.initAuth(e)}catch(l){return o(l)}const c=async function(u){try{const f=await n.completeAuth(a.withAnswer(u),{sessionName:r});i(f)}catch(f){if(f instanceof mp)throw f;if(f instanceof vp){const d=async function(){try{const y=await n.completeAuth(a.withAnswer(u),{sessionName:r,forceCreateAccount:!0});i(y)}catch(y){o(y)}},h={type:Ft.None,email:"",issuer:""};if(f.cause){const p=f.cause.split("|");p.length>=2&&(h.type=p[0],h.email=p[1]),p.length>=3&&(h.issuer=p[2])}for(const p of n.emailConflictCallback)p(h,d)}else o(f)}};if(s)for(const l of n.emailAuthCodeRequiredCallback)l(c);else c("")})}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(!R1(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return new Phe(e,n.data.challenge)}async initIdTokenAuth(e){var r;const n=xL(e),s=((r=n.iss)==null?void 0:r.startsWith("stytch.com/"))||!1,i=s?await this.waas.initiateStytchAuth(e,n.exp):await this.waas.initiateIdTokenAuth(e,n.exp),o=await this.sendIntent(i);if(!R1(o))throw new Error(`Invalid response: ${JSON.stringify(o)}`);return s?new Rhe(e):new GL(e)}async initEmailAuth(e){const r=await this.waas.getSessionId(),n=await this.waas.initiateEmailAuth(e),s=await this.sendIntent(n);if(!R1(s))throw new Error(`Invalid response: ${JSON.stringify(s)}`);return new rk(e,r,s.data.challenge)}async initPlayFabAuth(e,r){const n=await this.waas.initiatePlayFabAuth(e,r),s=await this.sendIntent(n);if(!R1(s))throw new Error(`Invalid response: ${JSON.stringify(s)}`);return new Ihe(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 s=await this.registerSession(n,r.sessionName);return await this.waas.completeSignIn({code:"sessionOpened",data:{sessionId:s.session.id,wallet:s.response.data.wallet}}),{sessionId:s.session.id,wallet:s.response.data.wallet,email:s.session.identity.email}}catch(s){throw!(s instanceof vp)&&!(s instanceof mp)&&await this.waas.completeSignOut(),s}}async registerSession(e,r){try{return await this.client.registerSession({intent:e,friendlyName:r},this.headers())}catch(n){if(P8(n)&&this.lastDate){const s=await this.waas.updateIntentTime(e,this.lastDate);return await this.client.registerSession({intent:s,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 Cr(e)}async dropSession({sessionId:e,strict:r}={}){const n=await this.waas.getSessionId();if(!n)throw new Error("session not open");const s=e||n;try{const i=await this.waas.signOutSession(s),o=await this.sendIntent(i);if(!bhe(o))throw new Error(`Invalid response: ${JSON.stringify(o)}`)}catch(i){if(r)throw i;console.error(i)}if(s===n){if(!this.secureStoreBackend)throw new Error("No secure store available");(await V2(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(s=>tr({},s,{isThis:s.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(!xhe(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(!whe(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(s,r))}return!1}async sessionAuthProof({nonce:e,network:r,validation:n}){const s=await this.waas.sessionAuthProof({nonce:e,network:r});return await this.trySendIntent({validation:n},s,vhe)}async listAccounts(){const e=await this.waas.listAccounts(),r=await this.sendIntent(e);if(!She(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(!Ehe(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 getIdToken(e){const r=await this.waas.getIdToken({nonce:e==null?void 0:e.nonce}),n=await this.sendIntent(r);if(!Che(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return n.data}async useIdentifier(e){if(e.identifier)return e;const r=`ts-sdk-${Date.now()}-${await this.waas.getSessionId()}`;return tr({},e,{identifier:r})}async trySendIntent(e,r,n){const s=await this.sendIntent(r);if(n(s))return s;if(ghe(s)&&await this.handleValidationRequired(e.validation)){const o=await this.sendIntent(r);if(n(o))return o}throw new Error(JSON.stringify(s))}async signMessage(e){const r=await this.waas.signMessage(await this.useIdentifier(e));return this.trySendIntent(e,r,yhe)}async trySendTransactionIntent(e,r){let n=await this.trySendIntent(r,e,T8);for(;HL(n);){await new Promise(o=>setTimeout(o,1e3));const s={metaTxHash:n.data.metaTxHash,network:e.data.network,identifier:e.data.identifier,validation:r.validation},i=await this.waas.getTransactionReceipt(await this.useIdentifier(s));n=await this.trySendIntent(s,i,T8)}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,mhe)}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 globalThis.fetch(e,r),s=n.headers.get("date");return s&&(this.lastDate=new Date(s)),n}}const jhe=t=>{if(t.type===Ft.PlayFab)return"PlayFab login";if(t.type===Ft.Email)return"Email login";if(t.type===Ft.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"},Bhe=t=>{const{onCancel:e,onConfirm:r}=t;return k.jsxs(q,{style:{maxWidth:"600px"},flexDirection:"column",paddingX:"10",paddingY:"4",alignItems:"center",gap:"4",children:[k.jsx(q,{children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Email already in use"})}),k.jsx(q,{height:"full",children:k.jsxs(ue,{as:"div",variant:"normal",color:"text50",textAlign:"center",children:["Another account with this email address ",k.jsxs(ue,{color:"text80",children:["(",t.info.email,")"]})," already exists with account type ",k.jsxs(ue,{color:"text80",children:["(",jhe(t.info),")"]}),". You can cancel this or force create a new account."]})}),k.jsxs(q,{flexDirection:"row",gap:"3",marginTop:"6",marginBottom:"2",children:[k.jsx(ut,{label:"Cancel",onClick:e}),k.jsx(ut,{variant:"primary",label:"Create new account",onClick:r})]})]})};function O0(){return O0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),dt({},n,s)).then(i=>Et(i).then(o=>({status:o.status})),i=>{throw lt.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),dt({},n,s)).then(i=>Et(i).then(o=>({version:o.version})),i=>{throw lt.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),dt({},n,s)).then(i=>Et(i).then(o=>({status:o.status})),i=>{throw lt.new({cause:`fetch(): ${i.message||""}`})}),this.getChainID=(n,s)=>this.fetch(this.url("GetChainID"),dt({},n,s)).then(i=>Et(i).then(o=>({chainID:o.chainID})),i=>{throw lt.new({cause:`fetch(): ${i.message||""}`})}),this.getEtherBalance=(n,s,i)=>this.fetch(this.url("GetEtherBalance"),dt(n,s,i)).then(o=>Et(o).then(a=>({balance:a.balance})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalances=(n,s,i)=>this.fetch(this.url("GetTokenBalances"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSupplies=(n,s,i)=>this.fetch(this.url("GetTokenSupplies"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,contractType:a.contractType,tokenIDs:a.tokenIDs})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSuppliesMap=(n,s,i)=>this.fetch(this.url("GetTokenSuppliesMap"),dt(n,s,i)).then(o=>Et(o).then(a=>({supplies:a.supplies})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getBalanceUpdates=(n,s,i)=>this.fetch(this.url("GetBalanceUpdates"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTransactionHistory=(n,s,i)=>this.fetch(this.url("GetTransactionHistory"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.syncBalance=(n,s,i)=>this.fetch(this.url("SyncBalance"),dt(n,s,i)).then(o=>Et(o).then(a=>({})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceipt=(n,s,i)=>this.fetch(this.url("FetchTransactionReceipt"),dt(n,s,i)).then(o=>Et(o).then(a=>({receipt:a.receipt})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getOrderbookOrders=(n,s,i)=>this.fetch(this.url("GetOrderbookOrders"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,orders:a.orders})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTopOrders=(n,s,i)=>this.fetch(this.url("GetTopOrders"),dt(n,s,i)).then(o=>Et(o).then(a=>({orders:a.orders})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceiptWithFilter=(n,s,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),dt(n,s,i)).then(o=>Et(o).then(a=>({receipt:a.receipt})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getAllWebhookListeners=(n,s,i)=>this.fetch(this.url("GetAllWebhookListeners"),dt(n,s,i)).then(o=>Et(o).then(a=>({listeners:a.listeners})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getWebhookListener=(n,s,i)=>this.fetch(this.url("GetWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({listener:a.listener})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.addWebhookListener=(n,s,i)=>this.fetch(this.url("AddWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status,listener:a.listener})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.updateWebhookListener=(n,s,i)=>this.fetch(this.url("UpdateWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.removeWebhookListener=(n,s,i)=>this.fetch(this.url("RemoveWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.toggleWebhookListener=(n,s,i)=>this.fetch(this.url("ToggleWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({webhookListener:a.webhookListener})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.pauseAllWebhookListeners=(n,s,i)=>this.fetch(this.url("PauseAllWebhookListeners"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.resumeAllWebhookListeners=(n,s,i)=>this.fetch(this.url("ResumeAllWebhookListeners"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.subscribeReceipts=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeReceipts"),dt(n,s.headers,s.signal)).then(async function(o){await sb(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeEvents=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeEvents"),dt(n,s.headers,s.signal)).then(async function(o){await sb(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeBalanceUpdates=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeBalanceUpdates"),dt(n,s.headers,s.signal)).then(async function(o){await sb(o,s,i)},o=>{s.onError(o,i)});return i()},this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const sb=async(t,e,r)=>{const{onMessage:n,onOpen:s,onClose:i,onError:o}=e;if(!t.ok){try{await Et(t)}catch(h){o(h,r)}return}if(!t.body){o(td.new({status:t.status,cause:"Invalid response, missing body"}),r);return}s&&s();const a=t.body.getReader(),c=new TextDecoder;let l="",u=Date.now();const f=(10+1)*1e3;let d;try{for(d=setInterval(()=>{if(Date.now()-u>f)throw Lu.new({cause:"Stream timed out"})},f);;){let h,p;try{({value:h,done:p}=await a.read()),u=Date.now(),l+=c.decode(h,{stream:!0})}catch(g){let m="";g instanceof Error&&(m=g.message),g instanceof DOMException&&g.name==="AbortError"?o(lt.new({message:"AbortError",cause:`AbortError: ${m}`}),()=>{throw new Error("Abort signal cannot be used to reconnect")}):o(Lu.new({cause:`reader.read(): ${m}`}),r);return}let y=l.split(` -`);for(let g=0;g({method:"POST",headers:O0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Et=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),td.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(qL[n]||nt).new(r)}return r});class nt extends Error{constructor(e,r,n,s,i){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 s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,nt.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}}class nk extends nt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nk.prototype)}}class lt extends nt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lt.prototype)}}class sk extends nt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,sk.prototype)}}class ik extends nt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ik.prototype)}}class ok extends nt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ok.prototype)}}class td extends nt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,td.prototype)}}class ak extends nt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ak.prototype)}}class ck extends nt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ck.prototype)}}class lk extends nt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lk.prototype)}}class Lu extends nt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Lu.prototype)}}class uk extends nt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uk.prototype)}}class fk extends nt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fk.prototype)}}class dk extends nt{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dk.prototype)}}class hk extends nt{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hk.prototype)}}class pk extends nt{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pk.prototype)}}class yk extends nt{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yk.prototype)}}class vk extends nt{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vk.prototype)}}class mk extends nt{constructor(e="Timeout",r=2e3,n="Request timed out",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mk.prototype)}}class gk extends nt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gk.prototype)}}class xk extends nt{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,xk.prototype)}}class bk extends nt{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,bk.prototype)}}class wk extends nt{constructor(e="ResourceExhausted",r=2004,n="Resource exhausted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wk.prototype)}}class Ek extends nt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Ek.prototype)}}class Sk extends nt{constructor(e="ProjectNotFound",r=3002,n="Project not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Sk.prototype)}}class Ck extends nt{constructor(e="MetadataCallFailed",r=3003,n="Metadata service call failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Ck.prototype)}}const qL={0:nk,[-1]:lt,[-2]:sk,[-3]:ik,[-4]:ok,[-5]:td,[-6]:ak,[-7]:ck,[-8]:lk,[-9]:Lu,[-10]:uk,1e3:fk,1001:dk,1002:hk,1003:pk,1004:yk,1005:vk,2e3:mk,2001:gk,2002:xk,2003:bk,2004:wk,3e3:Ek,3002:Sk,3003:Ck},R8=globalThis.fetch;class WL extends Fhe{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,R8),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=O0({},i.headers,o),R8(s,i)},this.fetch=this._fetch}}const I8=[..."🐶🐱🐭🐹🐰🦊🐻🐼🐨🐯🦁🐮🐷🐽🐸🐵🙈🙉🙊🐒🐔🐧🐦🐤🐣🐥🦆🦅🦉🦇🐺🐗🐴🦄🐝🐛🦋🐌🐞🐜🦟🦗🕷🕸🦂🐢🐍🦎🦖🦕🐙🦑🦐🦞🦀🐡🐠🐟🐬🐳🐋🦈🐊🐅🐆🦓🦍🦧🐘🦛🦏🐪🐫🦒🦘🐃🐂🐄🐎🐖🐏🐑🦙🐐🦌🐕🐩🦮🐈🐓🦃🦚🦜🦢🦩🕊🐇🦝🦨🦡🦦🦥🐁🐀🐿🦔🐾🐉🐲🌵🎄🌲🌳🌴🌱🌿🍀🎍🎋🍃👣🍂🍁🍄🐚🌾💐🌷🌹🥀🌺🌸🌼🌻🌞🌝🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈🥭🍍🥥🥝🍅🥑🥦🥬🥒🌶🌽🥕🧄🧅🥔🍠🥐🥯🍞🥖🥨🧀🥚🍳🧈🥞🧇🥓🥩🍗🍖🦴🌭🍔🍟🍕🥪🥙🧆🌮🌯🥗🥘🥫🍝🍜🍲🍛🍣🍱🥟🦪🍤🍙🍚🍘🍥🥠🥮🍢🍡🍧🍨🍦🥧🧁🍰🎂🍮🍭🍬🍫🍿🍩🍪🌰🥜👀👂👃👄👅👆👇👈👉👊👋👌👍👎👏👐👑👒👓🎯🎰🎱🎲🎳👾👯👺👻👽🏂🏃🏄"];function fc(){const e=coe.en,r=I8[Math.floor(Math.random()*I8.length)],n=e.getWord(Math.floor(Math.random()*2048)),s=e.getWord(Math.floor(Math.random()*2048));return`${r} ${n} ${s}`}const vv=t=>t.name==="AccountAlreadyLinked";function KL({onSuccess:t,sessionName:e,linkAccount:r=!1}){const n=M9(),[s,i]=v.useState(),[o,a]=v.useState(!1),[c,l]=v.useState(!1),[u,f]=v.useState(),[d,h]=v.useState();return v.useEffect(()=>Oe.onEmailAuthCodeRequired(async m=>{a(!1),f(()=>m)}),[Oe,a,f]),{inProgress:c,initiateAuth:async m=>{a(!0),l(!0);try{if(r){const x=await Oe.initAuth({email:m});h(x),a(!1)}else{const x=await Oe.signIn({email:m},e);t(x)}}catch(x){i(x.message||"Unknown error")}finally{r||(a(!1),l(!1))}},loading:o,error:s,sendChallengeAnswer:c?async m=>{if(r&&d){try{await Oe.linkAccount(d.withAnswer(m))}catch(x){vv(x)&&n({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}a(!1),l(!1);return}u&&await u(m)}:void 0,cancel:()=>{l(!1),a(!1),h(void 0),f(null)}}}const Uhe=({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(s=>!(s in n))?!1:Object.entries(r).filter(([s])=>!t.includes(s)).every(([s,i])=>e(i,n[s])):r===n;return e},Vhe=Uhe(),$he=(t,e)=>t===e?e:Object.keys(t).reduce((r,n)=>(n in e&&Vhe(t[n],e[n])&&(r[n]=t[n]),r),Object.assign({},e)),zhe=t=>{const e=v.useRef(!0),[r,n]=v.useState(t);v.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]);const s=v.useCallback(i=>{e.current&&n(i)},[]);return[r,s]},QL=(t,e="StytchProvider")=>`${t} can only be used inside <${e}>.`,Hhe="You cannot render a inside another .",Ghe=`The @stytch/react library is not meant for use with serverside environments like NextJS. + */class pL{static getParser(e,r=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new d8(e,r)}static parse(e){return new d8(e).getResult()}static get BROWSER_MAP(){return hL}static get ENGINE_MAP(){return Bo}static get OS_MAP(){return Qr}static get PLATFORMS_MAP(){return Vt}}const Nue=({serviceId:t,clientVersion:e})=>async()=>{var s,i,o,a,c;const r=typeof window<"u"&&((s=window==null?void 0:window.navigator)!=null&&s.userAgent)?pL.parse(window.navigator.userAgent):void 0,n=[["aws-sdk-js",e],["ua","2.0"],[`os/${((i=r==null?void 0:r.os)==null?void 0:i.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"}_${((c=r==null?void 0:r.browser)==null?void 0:c.version)??"unknown"}`]];return t&&n.push([`api/${t}`,e]),n},Mue=t=>()=>Promise.reject(t),h8=typeof TextEncoder=="function"?new TextEncoder:null,Due=t=>{if(typeof t=="string"){if(h8)return h8.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}`)},yL="required",fi="fn",di="argv",gd="ref",p8=!0,y8="isSet",yp="booleanEquals",Hl="error",Vd="endpoint",Ri="tree",sA="PartitionResult",v8={[yL]:!1,type:"String"},m8={[yL]:!0,default:!1,type:"Boolean"},g8={[gd]:"Endpoint"},vL={[fi]:yp,[di]:[{[gd]:"UseFIPS"},!0]},mL={[fi]:yp,[di]:[{[gd]:"UseDualStack"},!0]},Ws={},x8={[fi]:"getAttr",[di]:[{[gd]:sA},"supportsFIPS"]},b8={[fi]:yp,[di]:[!0,{[fi]:"getAttr",[di]:[{[gd]:sA},"supportsDualStack"]}]},w8=[vL],E8=[mL],S8=[{[gd]:"Region"}],Lue={version:"1.0",parameters:{Region:v8,UseDualStack:m8,UseFIPS:m8,Endpoint:v8},rules:[{conditions:[{[fi]:y8,[di]:[g8]}],rules:[{conditions:w8,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Hl},{conditions:E8,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Hl},{endpoint:{url:g8,properties:Ws,headers:Ws},type:Vd}],type:Ri},{conditions:[{[fi]:y8,[di]:S8}],rules:[{conditions:[{[fi]:"aws.partition",[di]:S8,assign:sA}],rules:[{conditions:[vL,mL],rules:[{conditions:[{[fi]:yp,[di]:[p8,x8]},b8],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:Vd}],type:Ri},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Hl}],type:Ri},{conditions:w8,rules:[{conditions:[{[fi]:yp,[di]:[x8,p8]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:Vd}],type:Ri},{error:"FIPS is enabled but this partition does not support FIPS",type:Hl}],type:Ri},{conditions:E8,rules:[{conditions:[b8],rules:[{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:Vd}],type:Ri},{error:"DualStack is enabled but this partition does not support DualStack",type:Hl}],type:Ri},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:Vd}],type:Ri}],type:Ri},{error:"Invalid Configuration: Missing Region",type:Hl}]},jue=Lue,Bue=new Koe({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Fue=(t,e={})=>Bue.get(t,()=>hae(jue,{endpointParams:t,logger:e.logger}));k0.aws=HD;const Uue=t=>({apiVersion:"2016-04-18",base64Decoder:(t==null?void 0:t.base64Decoder)??ZC,base64Encoder:(t==null?void 0:t.base64Encoder)??tL,disableHostPrefix:(t==null?void 0:t.disableHostPrefix)??!1,endpointProvider:(t==null?void 0:t.endpointProvider)??Fue,extensions:(t==null?void 0:t.extensions)??[],httpAuthSchemeProvider:(t==null?void 0:t.httpAuthSchemeProvider)??$le,httpAuthSchemes:(t==null?void 0:t.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ule},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ele}],logger:(t==null?void 0:t.logger)??new ZD,serviceId:(t==null?void 0:t.serviceId)??"Cognito Identity Provider",urlParser:(t==null?void 0:t.urlParser)??T0,utf8Decoder:(t==null?void 0:t.utf8Decoder)??ed,utf8Encoder:(t==null?void 0:t.utf8Encoder)??eL}),Vue=["in-region","cross-region","mobile","standard","legacy"],$ue=({defaultsMode:t}={})=>fle(async()=>{const e=typeof t=="function"?await t():t;switch(e==null?void 0:e.toLowerCase()){case"auto":return Promise.resolve(zue()?"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 ${Vue.join(", ")}, got ${e}`)}}),zue=()=>{var r,n;const t=typeof window<"u"&&((r=window==null?void 0:window.navigator)!=null&&r.userAgent)?pL.parse(window.navigator.userAgent):void 0,e=(n=t==null?void 0:t.platform)==null?void 0:n.type;return e==="tablet"||e==="mobile"},Hue=t=>{const e=$ue(t),r=()=>e().then(jce),n=Uue(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:(t==null?void 0:t.bodyLengthChecker)??Due,credentialDefaultProvider:(t==null?void 0:t.credentialDefaultProvider)??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(t==null?void 0:t.defaultUserAgentProvider)??Nue({serviceId:n.serviceId,clientVersion:lue.version}),maxAttempts:(t==null?void 0:t.maxAttempts)??P0,region:(t==null?void 0:t.region)??Mue("Region is missing"),requestHandler:eA.create((t==null?void 0:t.requestHandler)??r),retryMode:(t==null?void 0:t.retryMode)??(async()=>(await r()).retryMode||Jae),sha256:(t==null?void 0:t.sha256)??Tue,streamCollector:(t==null?void 0:t.streamCollector)??Tce,useDualstackEndpoint:(t==null?void 0:t.useDualstackEndpoint)??(()=>Promise.resolve(kae)),useFipsEndpoint:(t==null?void 0:t.useFipsEndpoint)??(()=>Promise.resolve(Tae))}},Gue=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}}},que=t=>({region:t.region()}),Wue=t=>{const e=t.httpAuthSchemes;let r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(s){const i=e.findIndex(o=>o.schemeId===s.schemeId);i===-1?e.push(s):e.splice(i,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){n=s},credentials(){return n}}},Kue=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),P1=t=>t,Que=(t,e)=>{const r={...P1(Gue(t)),...P1($ce(t)),...P1(Noe(t)),...P1(Wue(t))};return e.forEach(n=>n.configure(r)),{...t,...que(r),...zce(r),...Moe(r),...Kue(r)}};class Yue extends bce{constructor(...[e]){const r=Hue(e||{}),n=Hle(r),s=Woe(n),i=xce(s),o=Pae(i),a=o,c=Gae(a),l=zle(c),u=Que(l,(e==null?void 0:e.extensions)||[]);super(u),this.config=u,this.middlewareStack.use(Aae(this.config)),this.middlewareStack.use(Qce(this.config)),this.middlewareStack.use(ale(this.config)),this.middlewareStack.use(Boe(this.config)),this.middlewareStack.use(Voe(this.config)),this.middlewareStack.use(qoe(this.config)),this.middlewareStack.use(Wae(this.config,{httpAuthSchemeParametersProvider:Ule,identityProviderConfigProvider:async f=>new Zce({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Xce(this.config))}destroy(){super.destroy()}}class Re extends tA{constructor(e){super(e),Object.setPrototypeOf(this,Re.prototype)}}class iA extends Re{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,iA.prototype)}}class oA extends Re{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,oA.prototype)}}class aA extends Re{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,aA.prototype)}}class cA extends Re{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,cA.prototype)}}class lA extends Re{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,lA.prototype)}}class uA extends Re{constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),this.name="UserImportInProgressException",this.$fault="client",Object.setPrototypeOf(this,uA.prototype)}}class fA extends Re{constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),this.name="UserNotFoundException",this.$fault="client",Object.setPrototypeOf(this,fA.prototype)}}class dA extends Re{constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),this.name="InvalidLambdaResponseException",this.$fault="client",Object.setPrototypeOf(this,dA.prototype)}}class hA extends Re{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,hA.prototype)}}class pA extends Re{constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),this.name="TooManyFailedAttemptsException",this.$fault="client",Object.setPrototypeOf(this,pA.prototype)}}class yA extends Re{constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),this.name="UnexpectedLambdaException",this.$fault="client",Object.setPrototypeOf(this,yA.prototype)}}class og extends Re{constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),this.name="UserLambdaValidationException",this.$fault="client",Object.setPrototypeOf(this,og.prototype)}}class vA extends Re{constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),this.name="CodeDeliveryFailureException",this.$fault="client",Object.setPrototypeOf(this,vA.prototype)}}class mA extends Re{constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),this.name="InvalidPasswordException",this.$fault="client",Object.setPrototypeOf(this,mA.prototype)}}class gA extends Re{constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidSmsRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,gA.prototype)}}class xA extends Re{constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),this.name="InvalidSmsRoleTrustRelationshipException",this.$fault="client",Object.setPrototypeOf(this,xA.prototype)}}class bA extends Re{constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),this.name="PreconditionNotMetException",this.$fault="client",Object.setPrototypeOf(this,bA.prototype)}}class wA extends Re{constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),this.name="UnsupportedUserStateException",this.$fault="client",Object.setPrototypeOf(this,wA.prototype)}}class EA extends Re{constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),this.name="UsernameExistsException",this.$fault="client",Object.setPrototypeOf(this,EA.prototype)}}class SA extends Re{constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),this.name="AliasExistsException",this.$fault="client",Object.setPrototypeOf(this,SA.prototype)}}class CA extends Re{constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),this.name="InvalidUserPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,CA.prototype)}}class AA extends Re{constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),this.name="MFAMethodNotFoundException",this.$fault="client",Object.setPrototypeOf(this,AA.prototype)}}class kA extends Re{constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),this.name="PasswordResetRequiredException",this.$fault="client",Object.setPrototypeOf(this,kA.prototype)}}class TA extends Re{constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),this.name="UserNotConfirmedException",this.$fault="client",Object.setPrototypeOf(this,TA.prototype)}}class PA extends Re{constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),this.name="UserPoolAddOnNotEnabledException",this.$fault="client",Object.setPrototypeOf(this,PA.prototype)}}class RA extends Re{constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidEmailRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,RA.prototype)}}class IA extends Re{constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),this.name="CodeMismatchException",this.$fault="client",Object.setPrototypeOf(this,IA.prototype)}}class OA extends Re{constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),this.name="ExpiredCodeException",this.$fault="client",Object.setPrototypeOf(this,OA.prototype)}}class _A extends Re{constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),this.name="PasswordHistoryPolicyViolationException",this.$fault="client",Object.setPrototypeOf(this,_A.prototype)}}class NA extends Re{constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),this.name="SoftwareTokenMFANotFoundException",this.$fault="client",Object.setPrototypeOf(this,NA.prototype)}}class MA extends Re{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,MA.prototype)}}class DA extends Re{constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),this.name="ForbiddenException",this.$fault="client",Object.setPrototypeOf(this,DA.prototype)}}class LA extends Re{constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),this.name="GroupExistsException",this.$fault="client",Object.setPrototypeOf(this,LA.prototype)}}class jA extends Re{constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),this.name="DuplicateProviderException",this.$fault="client",Object.setPrototypeOf(this,jA.prototype)}}class BA extends Re{constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),this.name="UserPoolTaggingException",this.$fault="client",Object.setPrototypeOf(this,BA.prototype)}}class FA extends Re{constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),this.name="InvalidOAuthFlowException",this.$fault="client",Object.setPrototypeOf(this,FA.prototype)}}class UA extends Re{constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),this.name="ScopeDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,UA.prototype)}}class VA extends Re{constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),this.name="UnsupportedIdentityProviderException",this.$fault="client",Object.setPrototypeOf(this,VA.prototype)}}const C8=t=>({...t,...t.Value&&{Value:ur}}),gL=t=>({...t,...t.AccessToken&&{AccessToken:ur},...t.RefreshToken&&{RefreshToken:ur},...t.IdToken&&{IdToken:ur}}),Jue=t=>({...t,...t.AuthParameters&&{AuthParameters:ur},...t.ClientId&&{ClientId:ur},...t.UserContextData&&{UserContextData:ur}}),Xue=t=>({...t,...t.Session&&{Session:ur},...t.AuthenticationResult&&{AuthenticationResult:gL(t.AuthenticationResult)}}),Zue=t=>({...t,...t.ClientId&&{ClientId:ur},...t.Session&&{Session:ur},...t.ChallengeResponses&&{ChallengeResponses:ur},...t.UserContextData&&{UserContextData:ur}}),efe=t=>({...t,...t.Session&&{Session:ur},...t.AuthenticationResult&&{AuthenticationResult:gL(t.AuthenticationResult)}});class $A extends Re{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,$A.prototype)}}class zA extends Re{constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),this.name="UnsupportedOperationException",this.$fault="client",Object.setPrototypeOf(this,zA.prototype)}}class HA extends Re{constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),this.name="UnsupportedTokenTypeException",this.$fault="client",Object.setPrototypeOf(this,HA.prototype)}}class GA extends Re{constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),this.name="EnableSoftwareTokenMFAException",this.$fault="client",Object.setPrototypeOf(this,GA.prototype)}}const tfe=t=>({...t,...t.ClientId&&{ClientId:ur},...t.SecretHash&&{SecretHash:ur},...t.Username&&{Username:ur},...t.Password&&{Password:ur},...t.UserAttributes&&{UserAttributes:t.UserAttributes.map(e=>C8(e))},...t.ValidationData&&{ValidationData:t.ValidationData.map(e=>C8(e))},...t.UserContextData&&{UserContextData:ur}}),rfe=async(t,e)=>{const r=KA("InitiateAuth");let n;return n=JSON.stringify(Ce(t)),WA(e,r,"/",void 0,n)},nfe=async(t,e)=>{const r=KA("RespondToAuthChallenge");let n;return n=JSON.stringify(Ce(t)),WA(e,r,"/",void 0,n)},sfe=async(t,e)=>{const r=KA("SignUp");let n;return n=JSON.stringify(Ce(t)),WA(e,r,"/",void 0,n)},ife=async(t,e)=>{if(t.statusCode>=300)return qA(t,e);const r=await ig(t.body,e);let n={};return n=Ce(r),{$metadata:Ie(t),...n}},ofe=async(t,e)=>{if(t.statusCode>=300)return qA(t,e);const r=await ig(t.body,e);let n={};return n=Ce(r),{$metadata:Ie(t),...n}},afe=async(t,e)=>{if(t.statusCode>=300)return qA(t,e);const r=await ig(t.body,e);let n={};return n=Ce(r),{$metadata:Ie(t),...n}},qA=async(t,e)=>{const r={...t,body:await Ble(t.body,e)},n=Fle(t,r.body);switch(n){case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await mfe(r);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await wfe(r);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Pfe(r);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await _fe(r);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Lfe(r);case"UserImportInProgressException":case"com.amazonaws.cognitoidentityprovider#UserImportInProgressException":throw await zfe(r);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await Wfe(r);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await xfe(r);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await kfe(r);case"TooManyFailedAttemptsException":case"com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException":throw await Dfe(r);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await Bfe(r);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await Hfe(r);case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await lfe(r);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await Efe(r);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await Sfe(r);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await Cfe(r);case"PreconditionNotMetException":case"com.amazonaws.cognitoidentityprovider#PreconditionNotMetException":throw await Ofe(r);case"UnsupportedUserStateException":case"com.amazonaws.cognitoidentityprovider#UnsupportedUserStateException":throw await $fe(r);case"UsernameExistsException":case"com.amazonaws.cognitoidentityprovider#UsernameExistsException":throw await Gfe(r);case"AliasExistsException":case"com.amazonaws.cognitoidentityprovider#AliasExistsException":throw await cfe(r);case"InvalidUserPoolConfigurationException":case"com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException":throw await Afe(r);case"MFAMethodNotFoundException":case"com.amazonaws.cognitoidentityprovider#MFAMethodNotFoundException":throw await Tfe(r);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await Ife(r);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await qfe(r);case"UserPoolAddOnNotEnabledException":case"com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException":throw await Kfe(r);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await gfe(r);case"CodeMismatchException":case"com.amazonaws.cognitoidentityprovider#CodeMismatchException":throw await ufe(r);case"ExpiredCodeException":case"com.amazonaws.cognitoidentityprovider#ExpiredCodeException":throw await pfe(r);case"PasswordHistoryPolicyViolationException":case"com.amazonaws.cognitoidentityprovider#PasswordHistoryPolicyViolationException":throw await Rfe(r);case"SoftwareTokenMFANotFoundException":case"com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException":throw await Mfe(r);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentityprovider#ConcurrentModificationException":throw await ffe(r);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await yfe(r);case"GroupExistsException":case"com.amazonaws.cognitoidentityprovider#GroupExistsException":throw await vfe(r);case"DuplicateProviderException":case"com.amazonaws.cognitoidentityprovider#DuplicateProviderException":throw await dfe(r);case"UserPoolTaggingException":case"com.amazonaws.cognitoidentityprovider#UserPoolTaggingException":throw await Qfe(r);case"InvalidOAuthFlowException":case"com.amazonaws.cognitoidentityprovider#InvalidOAuthFlowException":throw await bfe(r);case"ScopeDoesNotExistException":case"com.amazonaws.cognitoidentityprovider#ScopeDoesNotExistException":throw await Nfe(r);case"UnsupportedIdentityProviderException":case"com.amazonaws.cognitoidentityprovider#UnsupportedIdentityProviderException":throw await Ffe(r);case"UnauthorizedException":case"com.amazonaws.cognitoidentityprovider#UnauthorizedException":throw await jfe(r);case"UnsupportedOperationException":case"com.amazonaws.cognitoidentityprovider#UnsupportedOperationException":throw await Ufe(r);case"UnsupportedTokenTypeException":case"com.amazonaws.cognitoidentityprovider#UnsupportedTokenTypeException":throw await Vfe(r);case"EnableSoftwareTokenMFAException":case"com.amazonaws.cognitoidentityprovider#EnableSoftwareTokenMFAException":throw await hfe(r);default:const s=r.body;return Yfe({output:t,parsedBody:s,errorCode:n})}},cfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new SA({$metadata:Ie(t),...n});return Ne(s,r)},lfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new vA({$metadata:Ie(t),...n});return Ne(s,r)},ufe=async(t,e)=>{const r=t.body,n=Ce(r),s=new IA({$metadata:Ie(t),...n});return Ne(s,r)},ffe=async(t,e)=>{const r=t.body,n=Ce(r),s=new MA({$metadata:Ie(t),...n});return Ne(s,r)},dfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new jA({$metadata:Ie(t),...n});return Ne(s,r)},hfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new GA({$metadata:Ie(t),...n});return Ne(s,r)},pfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new OA({$metadata:Ie(t),...n});return Ne(s,r)},yfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new DA({$metadata:Ie(t),...n});return Ne(s,r)},vfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new LA({$metadata:Ie(t),...n});return Ne(s,r)},mfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new iA({$metadata:Ie(t),...n});return Ne(s,r)},gfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new RA({$metadata:Ie(t),...n});return Ne(s,r)},xfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new dA({$metadata:Ie(t),...n});return Ne(s,r)},bfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new FA({$metadata:Ie(t),...n});return Ne(s,r)},wfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new oA({$metadata:Ie(t),...n});return Ne(s,r)},Efe=async(t,e)=>{const r=t.body,n=Ce(r),s=new mA({$metadata:Ie(t),...n});return Ne(s,r)},Sfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new gA({$metadata:Ie(t),...n});return Ne(s,r)},Cfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new xA({$metadata:Ie(t),...n});return Ne(s,r)},Afe=async(t,e)=>{const r=t.body,n=Ce(r),s=new CA({$metadata:Ie(t),...n});return Ne(s,r)},kfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new hA({$metadata:Ie(t),...n});return Ne(s,r)},Tfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new AA({$metadata:Ie(t),...n});return Ne(s,r)},Pfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new aA({$metadata:Ie(t),...n});return Ne(s,r)},Rfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new _A({$metadata:Ie(t),...n});return Ne(s,r)},Ife=async(t,e)=>{const r=t.body,n=Ce(r),s=new kA({$metadata:Ie(t),...n});return Ne(s,r)},Ofe=async(t,e)=>{const r=t.body,n=Ce(r),s=new bA({$metadata:Ie(t),...n});return Ne(s,r)},_fe=async(t,e)=>{const r=t.body,n=Ce(r),s=new cA({$metadata:Ie(t),...n});return Ne(s,r)},Nfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new UA({$metadata:Ie(t),...n});return Ne(s,r)},Mfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new NA({$metadata:Ie(t),...n});return Ne(s,r)},Dfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new pA({$metadata:Ie(t),...n});return Ne(s,r)},Lfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new lA({$metadata:Ie(t),...n});return Ne(s,r)},jfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new $A({$metadata:Ie(t),...n});return Ne(s,r)},Bfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new yA({$metadata:Ie(t),...n});return Ne(s,r)},Ffe=async(t,e)=>{const r=t.body,n=Ce(r),s=new VA({$metadata:Ie(t),...n});return Ne(s,r)},Ufe=async(t,e)=>{const r=t.body,n=Ce(r),s=new zA({$metadata:Ie(t),...n});return Ne(s,r)},Vfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new HA({$metadata:Ie(t),...n});return Ne(s,r)},$fe=async(t,e)=>{const r=t.body,n=Ce(r),s=new wA({$metadata:Ie(t),...n});return Ne(s,r)},zfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new uA({$metadata:Ie(t),...n});return Ne(s,r)},Hfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new og({$metadata:Ie(t),...n});return Ne(s,r)},Gfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new EA({$metadata:Ie(t),...n});return Ne(s,r)},qfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new TA({$metadata:Ie(t),...n});return Ne(s,r)},Wfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new fA({$metadata:Ie(t),...n});return Ne(s,r)},Kfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new PA({$metadata:Ie(t),...n});return Ne(s,r)},Qfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new BA({$metadata:Ie(t),...n});return Ne(s,r)},Ie=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"]}),Yfe=Dce(Re),WA=async(t,e,r,n,s)=>{const{hostname:i,protocol:o="https",port:a,path:c}=await t.endpoint(),l={protocol:o,hostname:i,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+r:c+r,headers:e};return n!==void 0&&(l.hostname=n),s!==void 0&&(l.body=s),new Vn(l)};function KA(t){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}}class Jfe extends sg.classBuilder().ep({...nA}).m(function(e,r,n,s){return[JC(n,this.serialize,this.deserialize),XC(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").f(Jue,Xue).ser(rfe).de(ife).build(){}class Xfe extends sg.classBuilder().ep({...nA}).m(function(e,r,n,s){return[JC(n,this.serialize,this.deserialize),XC(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").f(Zue,efe).ser(nfe).de(ofe).build(){}class Zfe extends sg.classBuilder().ep({...nA}).m(function(e,r,n,s){return[JC(n,this.serialize,this.deserialize),XC(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").f(tfe,void 0).ser(sfe).de(afe).build(){}class ih extends Error{}ih.prototype.name="InvalidTokenError";function ede(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 tde(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 ede(e)}catch{return atob(e)}}function xL(t,e){if(typeof t!="string")throw new ih("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 ih(`Invalid token specified: missing part #${r+1}`);let s;try{s=tde(n)}catch(i){throw new ih(`Invalid token specified: invalid base64 for part #${r+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new ih(`Invalid token specified: invalid json for part #${r+1} (${i.message})`)}}function tr(){return tr=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const rde=["signatures"],nde=1,sde=`${nde} (Web ${foe})`;function Rr(t,e,r){const n=Math.floor(Date.now()/1e3),s=n+e;return{version:sde,issuedAt:n,expiresAt:s,name:t,data:r}}async function ide(t,e){const r=ode(e),n=await t.sign(new Uint8Array(r));return tr({},e,{signatures:[{sessionId:await t.sessionId(),signature:n}]})}function ode(t){const{version:e,issuedAt:r,expiresAt:n,name:s,data:i}=t,a=Sr(doe({version:e,issuedAt:r,expiresAt:n,name:s,data:i}));return fe(Ct(a))}function ade(t,e){const r=Pr(t,rde),n=t.expiresAt-t.issuedAt;return r.issuedAt=Math.floor(e.getTime()/1e3),r.expiresAt=r.issuedAt+n,r}let Ir=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}({}),xd=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}({}),eb=function(t){return t.unknown="unknown",t.erc20Token="erc20Token",t.erc1155Token="erc1155Token",t}({}),Ft=function(t){return t.None="None",t.Guest="Guest",t.OIDC="OIDC",t.Email="Email",t.PlayFab="PlayFab",t.Stytch="Stytch",t}({});function cde({wallet:t,chainId:e,message:r,lifespan:n}){return Rr(Ir.signMessage,n,{wallet:t,network:e.toString(),message:r.startsWith("0x")?r:ne(Sr(r))})}const lde=["lifespan"],ude=["lifespan"],fde=["lifespan"],dde=["lifespan"],hde=["lifespan"],pde=["lifespan"],yde=["lifespan"],vde=["lifespan"],mde=["lifespan"];async function $d(t){let{lifespan:e}=t,r=Pr(t,lde);return Rr(Ir.initiateAuth,e,r)}async function A8(t){let{lifespan:e}=t,r=Pr(t,ude);return Rr(Ir.openSession,e,r)}async function gde(t){let{lifespan:e}=t,r=Pr(t,fde);return Rr(Ir.validateSession,e,r)}function xde(t){let{lifespan:e}=t,r=Pr(t,dde);return Rr(Ir.finishValidateSession,e,r)}function k8(t){let{lifespan:e}=t,r=Pr(t,hde);return Rr(Ir.closeSession,e,r)}function bde(t){let{lifespan:e}=t,r=Pr(t,pde);return Rr(Ir.listSessions,e,r)}function wde(t){let{lifespan:e}=t,r=Pr(t,yde);return Rr(Ir.getSession,e,r)}function Ede(t){let{lifespan:e}=t,r=Pr(t,vde);return Rr(Ir.sessionAuthProof,e,r)}function Sde(t){let{lifespan:e}=t,r=Pr(t,mde);return Rr(Ir.getIdToken,e,r)}const Cde=["token","to","value"],Ade=["token","to","id","safe","data"],kde=["token","to","values","data"],Tde=["to","value","abi","func","args"];function Pde({lifespan:t,wallet:e,identifier:r,chainId:n,transactions:s}){return Rr(Ir.feeOptions,t,{identifier:r,wallet:e,network:n.toString(),transactions:s.map(i=>{if(!i.to||i.to===vl)throw new Error("Contract creation not supported");return wL(i)?{type:"transaction",to:i.to,value:GC(BigInt(i.value||0)),data:ne(i.data||"0x")}:i})})}function Cy({lifespan:t,wallet:e,identifier:r,chainId:n,transactions:s,transactionsFeeQuote:i,transactionsFeeOption:o}){return Rr(Ir.sendTransaction,t,{identifier:r,wallet:e,network:n.toString(),transactions:Rde(s,o).map(a=>{if(!a.to||a.to===vl)throw new Error("Contract creation not supported");return wL(a)?{type:"transaction",to:a.to,value:GC(BigInt(a.value||0)),data:ne(a.data||"0x")}:a}),transactionsFeeQuote:i})}function Rde(t,e){const r=[...t];if(e)switch(e.token.type){case eb.unknown:r.push({to:e.to,value:e.value});break;case eb.erc20Token:if(!e.token.contractAddress)throw new Error("contract address is required");r.push(QA({tokenAddress:e.token.contractAddress,to:e.to,value:e.value}));break;case eb.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(YA({tokenAddress:e.token.contractAddress,to:e.to,vals:[{id:e.token.tokenID,amount:e.value}]}));break}return r}function Ide({lifespan:t,chainId:e,wallet:r,metaTxHash:n}){return Rr(Ir.getTransactionReceipt,t,{wallet:r,network:e.toString(),metaTxHash:n})}function Ode(t){let{token:e,to:r,value:n}=t,s=Pr(t,Cde);return Cy(tr({transactions:[QA({tokenAddress:e,to:r,value:n.toString()})]},s))}function _de(t){let{token:e,to:r,id:n,safe:s,data:i}=t,o=Pr(t,Ade);return Cy(tr({transactions:[Dde({tokenAddress:e,to:r,id:n,data:i,safe:s})]},o))}function Nde(t){let{token:e,to:r,values:n,data:s}=t,i=Pr(t,kde);const o=n.map(a=>({id:a.id,amount:BigInt(a.amount).toString()}));return Cy(tr({transactions:[YA({tokenAddress:e,to:r,vals:o,data:s})]},i))}function Mde(t){let{to:e,value:r,abi:n,func:s,args:i}=t,o=Pr(t,Tde);return Cy(tr({transactions:[bL({to:e,value:BigInt(r).toString(),data:{abi:n,func:s,args:i}})]},o))}function QA(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 tr({type:"erc20send"},r);throw new Error("Invalid ERC20 transaction")}function Dde(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 tr({type:"erc721send"},r);throw new Error("Invalid ERC721 transaction")}function YA(t){const e=t,r=t;if(e.values!==void 0)return{type:"erc1155send",vals:e.values.map(n=>({id:n.id,amount: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:n.amount})),tokenAddress:r.tokenAddress,to:r.to,data:r.data};throw new Error("Invalid ERC1155 transaction")}function bL(t){const e=t,r=t;if(e.abi!==void 0)return{type:"delayedEncode",to:e.to,value:GC(BigInt(e.value)),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 Lde(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,s=t[0].data.identifier,i=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 Rr(Ir.sendTransaction,n,{network:e,wallet:r,identifier:s,transactions:t.flatMap(o=>o.data.transactions),transactionsFeeQuote:i})}function wL(t){return!["transaction","erc20send","erc721send","erc1155send","delayedEncode"].includes(t.type)}class pv{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 EL{constructor(){this.store=void 0,I0.isAvailable()?this.store=new I0:this.store=new jde}async get(e){return this.store.get(e)}async set(e,r){return this.store.set(e,r)}}class I0{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(!I0.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 jde{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 j2="seq-waas-session-p256k1",B2="seq-waas-session";async function SL(t,e){const r=await e.get(j2,B2,t);if(!r)throw new Error("No private key found");const n=new up(r);return{sessionId(){return n.getAddress()},sign(s){return n.signMessage(s)},clear:async()=>{await e.delete(j2,B2,t)}}}async function Bde(t,e){const n=await new up(t).getAddress();return await e.set(j2,B2,n,t),SL(n,e)}async function Fde(t){const e=up.createRandom();return Bde(e.privateKey,t)}let CL=function(t){return t[t.ECDSAP256K1=0]="ECDSAP256K1",t[t.ECDSAP256R1=1]="ECDSAP256R1",t}({});const F2="seq-waas-session-p256r1",U2="seq-waas-session";async function AL(t,e,r){const n=await r.get(F2,U2,t);if(!n||!n.privateKey)throw new Error("No private key found");const s=new TextEncoder;return{sessionId:async()=>{const i=await e.exportKey("raw",n.publicKey),o=new Uint8Array(i.byteLength+1);return o[0]=CL.ECDSAP256R1,o.set(new Uint8Array(i),1),ne(o)},sign:async i=>{typeof i=="string"&&(i.startsWith("0x")?(i=i.slice(2),i=fe(i)):i=s.encode(i));const o=await e.sign({name:"ECDSA",hash:{name:"SHA-256"}},n.privateKey,i);return ne(new Uint8Array(o))},clear:async()=>{await r.delete(F2,U2,t)}}}async function Ude(t,e,r){const n=await $de(e,t.publicKey);return await r.set(F2,U2,n,t),AL(n,e,r)}async function Vde(t,e){const r=await t.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"]);return Ude(r,t,e)}async function $de(t,e){const r=await t.exportKey("raw",e),n=new Uint8Array(r.byteLength+1);return n[0]=CL.ECDSAP256R1,n.set(new Uint8Array(r),1),ne(n)}async function V2(t,e,r){if(!r)throw new Error("No secure store available");return e?AL(t,e,r):SL(t,r)}async function zde(t,e){if(!e)throw new Error("No secure store available");return t?Vde(t,e):Fde(e)}const Hde=["lifespan"],Gde=["lifespan"],qde=["lifespan"];function Wde(t){let{lifespan:e}=t,r=Pr(t,Hde);return Rr(Ir.listAccounts,e,r)}function Kde(t){let{lifespan:e}=t,r=Pr(t,Gde);return Rr(Ir.federateAccount,e,r)}function Qde(t){let{lifespan:e}=t,r=Pr(t,qde);return Rr(Ir.removeAccount,e,r)}const $2=Object.entries(S0).reduce((t,[e,r])=>(t[r.name]=r.chainId,t),{}),Yde=Object.entries($2).reduce((t,[e,r])=>(t[r]=e,t),{});function tb(t){const e=typeof t=="number"?t:parseInt(t);if(e in Yde)return e;const r=t.toString().toLowerCase();if(r in $2)return $2[r];throw new Error(`Unknown network: ${t}`)}const kL=()=>TL()?new Jde:null;function TL(){return typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.subtle=="object"}class Jde{constructor(){if(!TL())throw new Error("window.crypto.subtle is not available")}generateKey(e,r,n){return window.crypto.subtle.generateKey(e,r,n)}importKey(e,r,n,s,i){return window.crypto.subtle.importKey(e,r,n,s,i)}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 s=await window.crypto.subtle.sign(e,r,n);return new Uint8Array(s)}verify(e,r,n,s){return window.crypto.subtle.verify(e,r,n,s)}getRandomValues(e){const r=new Uint8Array(e);return window.crypto.getRandomValues(r)}}const PL=()=>RL()?new Xde:null;function RL(){return typeof indexedDB=="object"}class Xde{constructor(){if(this.db=void 0,!RL())throw new Error("IndexedDB is not available");this.db=null}async openDB(e,r,n){return this.db?this.db:(this.db=await Ioe(e,1,{upgrade(s){s.createObjectStore(r)}}),this.db)}async get(e,r,n){const s=await this.openDB(e,r,1),i=s.transaction(r,"readonly"),o=await s.get(r,n);return await i.done,o}async set(e,r,n,s){const i=await this.openDB(e,r,1),o=i.transaction(r,"readwrite");return await i.put(r,s,n),await o.done,!0}async delete(e,r,n){const s=await this.openDB(e,r,1),i=s.transaction(r,"readwrite");return await s.delete(r,n),await i.done,!0}}const Zde="@0xsequence.waas.wallet",ehe="@0xsequence.waas.session_id",the="@0xsequence.waas.status",Xt=5*60;class rhe{constructor(e={network:1},r=new EL,n=kL(),s=PL()){this.config=e,this.store=r,this.cryptoBackend=n,this.secureStoreBackend=s,this.status=void 0,this.sessionId=void 0,this.wallet=void 0,this.sessionObservers=[],this.gettingSessionIdPromise=void 0,this.status=new pv(this.store,the,"signed-out"),this.sessionId=new pv(this.store,ehe,void 0),this.wallet=new pv(this.store,Zde,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 tr({},e,{identifier:e==null?void 0:e.identifier,wallet:await this.getWalletAddress(),lifespan:(r=e==null?void 0:e.lifespan)!=null?r:Xt,chainId:tb(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 V2(r,this.cryptoBackend,this.secureStoreBackend);return ide(n,e)}async signUsingSessionKey(e){const r=await this.getSessionId();if(!r)throw new Error("session not open");return(await V2(r,this.cryptoBackend,this.secureStoreBackend)).sign(e)}async getSessionId(){var e=this;if(this.gettingSessionIdPromise)return this.gettingSessionIdPromise;const r=async function(){let s=await e.sessionId.get();return s||(s=await(await zde(e.cryptoBackend,e.secureStoreBackend)).sessionId(),await e.sessionId.set(s),e.signalObservers(e.sessionObservers,s)),e.gettingSessionIdPromise=void 0,s};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(),s=await A8({sessionId:n,identityType:Ft.None,idToken:e,lifespan:Xt});return await this.status.set("pending"),this.signIntent(s)}async initiateGuestAuth(){const e=await this.getSessionId(),r=await $d({sessionId:e,identityType:Ft.Guest,verifier:e,lifespan:Xt});return this.signIntent(r)}async initiateEmailAuth(e){const r=await this.getSessionId(),n=await $d({sessionId:r,identityType:Ft.Email,verifier:`${e};${r}`,lifespan:Xt});return this.signIntent(n)}async initiateIdTokenAuth(e,r){const n=await this.getSessionId(),s=Cr(e),i=await $d({sessionId:n,identityType:Ft.OIDC,verifier:`${s};${r}`,lifespan:Xt});return this.signIntent(i)}async initiateStytchAuth(e,r){const n=await this.getSessionId(),s=Cr(e),i=await $d({sessionId:n,identityType:Ft.Stytch,verifier:`${s};${r}`,lifespan:Xt});return this.signIntent(i)}async initiatePlayFabAuth(e,r){const n=await this.getSessionId(),s=Cr(r),i=await $d({sessionId:n,identityType:Ft.PlayFab,verifier:`${e}|${s}`,lifespan:Xt});return this.signIntent(i)}async completeAuth(e,r){const n=await this.getSessionId(),s=await A8(tr({},r,{sessionId:n,lifespan:Xt},e));return await this.status.set("pending"),this.signIntent(s)}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=k8({lifespan:e||Xt,sessionId:r});return this.signIntent(n)}async signOutSession(e){const r=k8({lifespan:Xt,sessionId:e});return this.signIntent(r)}async listSessions(){const e=bde({lifespan:Xt,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=Ede({lifespan:(r=e.lifespan)!=null?r:Xt,network:tb(e.network||this.config.network).toString(),wallet:await this.getWalletAddress(),nonce:e.nonce});return this.signIntent(n)}async signMessage(e){var r;const n=cde(tr({chainId:tb(e.network||this.config.network)},e,{lifespan:(r=e.lifespan)!=null?r:Xt,wallet:await this.getWalletAddress()}));return this.signIntent(n)}async sendTransaction(e){const r=Cy(await this.commonArgs(e));return this.signIntent(r)}async getTransactionReceipt(e){const r=Ide(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=Ode(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=_de(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=Nde(await this.commonArgs(e));return this.signIntent(r)}async callContract(e){const r=Mde(await this.commonArgs(e));return this.signIntent(r)}async feeOptions(e){const r=Pde(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 gde({lifespan:Xt,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=wde({sessionId:e,wallet:await this.getWalletAddress(),lifespan:Xt});return this.signIntent(r)}async finishValidateSession(e,r){const n=await this.sessionId.get();if(!n)throw new Error("session not open");const s=await this.getWalletAddress(),i=xde({sessionId:n,wallet:s,lifespan:Xt,salt:e,challenge:r});return this.signIntent(i)}async listAccounts(){const e=Wde({wallet:await this.getWalletAddress(),lifespan:Xt});return this.signIntent(e)}async linkAccount(e){const r=await this.sessionId.get();if(!r)throw new Error("session not open");const n=Kde(tr({wallet:await this.getWalletAddress(),lifespan:Xt,sessionId:r},e));return this.signIntent(n)}async removeAccount({accountId:e}){const r=Qde({wallet:await this.getWalletAddress(),lifespan:Xt,accountId:e});return this.signIntent(r)}async getIdToken({nonce:e}){const r=await this.sessionId.get();if(!r)throw new Error("session not open");const n=Sde({wallet:await this.getWalletAddress(),lifespan:Xt,sessionId:r,nonce:e});return this.signIntent(n)}async batch(e){const r=Lde(e);return this.signIntent(r)}signalObservers(e,r){e.forEach(n=>n(r))}async updateIntentTime(e,r){const n=ade(e,r);return this.signIntent(n)}}class nhe{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/WaasAuthenticator/",this.registerSession=(n,s,i)=>this.fetch(this.url("RegisterSession"),rb(n,s,i)).then(o=>nb(o).then(a=>({session:a.session,response:a.response})),o=>{throw yv.new({cause:`fetch(): ${o.message||""}`})}),this.sendIntent=(n,s,i)=>this.fetch(this.url("SendIntent"),rb(n,s,i)).then(o=>nb(o).then(a=>({response:a.response})),o=>{throw yv.new({cause:`fetch(): ${o.message||""}`})}),this.chainList=(n,s)=>this.fetch(this.url("ChainList"),rb({},n,s)).then(i=>nb(i).then(o=>({chains:o.chains})),i=>{throw yv.new({cause:`fetch(): ${i.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const rb=(t={},e={},r=null)=>({method:"POST",headers:tr({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),nb=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),jL.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(hhe[n]||Yt).new(r)}return r});let Yt=class IL extends Error{constructor(e,r,n,s,i){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 s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,IL.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},OL=class _L extends Yt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,_L.prototype)}},yv=class NL extends Yt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,NL.prototype)}},she=class ML extends Yt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ML.prototype)}},ihe=class DL extends Yt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,DL.prototype)}},ohe=class LL extends Yt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,LL.prototype)}},jL=class BL extends Yt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,BL.prototype)}},ahe=class FL extends Yt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,FL.prototype)}},che=class UL extends Yt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,UL.prototype)}},lhe=class VL extends Yt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,VL.prototype)}},uhe=class $L extends Yt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,$L.prototype)}},fhe=class zL extends Yt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,zL.prototype)}},dhe=class HL extends Yt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,HL.prototype)}};class JA extends Yt{constructor(e="TenantNotFound",r=1001,n="Tenant not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,JA.prototype)}}class vp extends Yt{constructor(e="EmailAlreadyInUse",r=7e3,n="Could not create account as the email is already in use",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vp.prototype)}}class XA extends Yt{constructor(e="AccountAlreadyLinked",r=7001,n="Could not link account as it is linked to another wallet",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,XA.prototype)}}class ZA extends Yt{constructor(e="ProofVerificationFailed",r=7002,n="The authentication proof could not be verified",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ZA.prototype)}}class mp extends Yt{constructor(e="AnswerIncorrect",r=7003,n="The provided answer is incorrect",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mp.prototype)}}class ek extends Yt{constructor(e="ChallengeExpired",r=7004,n="The challenge has expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ek.prototype)}}class tk extends Yt{constructor(e="TooManyAttempts",r=7005,n="Too many attempts",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,tk.prototype)}}const hhe={0:OL,[-1]:yv,[-2]:she,[-3]:ihe,[-4]:ohe,[-5]:jL,[-6]:ahe,[-7]:che,[-8]:lhe,[-9]:uhe,[-10]:fhe,1e3:dhe,1001:JA,7e3:vp,7001:XA,7002:ZA,7003:mp,7004:ek,7005:tk};function R1(t){return typeof t=="object"&&t.code===xd.authInitiated&&typeof t.data=="object"&&typeof t.data.sessionId=="string"&&typeof t.data.identityType=="string"&&typeof t.data.expiresIn=="number"}function Ay(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 GL(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 phe(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 T8(t){return Ay(t)||phe(t)||GL(t)}function yhe(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 vhe(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 mhe(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="feeOptions"&&typeof t.data=="object"&&Array.isArray(t.data.feeOptions)}function ghe(t){return typeof t=="object"&&t.code===xd.validationRequired&&typeof t.data=="object"&&typeof t.data.sessionId=="string"}function xhe(t){return typeof t=="object"&&t.code===xd.validationFinished&&typeof t.data=="object"}function bhe(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="sessionClosed"}function whe(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 Ehe(t){return typeof t=="object"&&t.code===xd.accountFederated&&typeof t.data=="object"&&typeof t.data.account=="object"}function She(t){return typeof t=="object"&&t.code===xd.accountList&&typeof t.data=="object"}function P8(t){var e,r;return!!(t instanceof Yt&&((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")))}function Che(t){return typeof t=="object"&&t.code===xd.idToken&&typeof t.data=="object"&&typeof t.data.idToken=="string"}class Ahe{constructor(e,r){this.region=e,this.clientId=r,this.cognitoMemo=void 0}cognito(){return this.cognitoMemo||(this.cognitoMemo=new Yue({region:this.region})),this.cognitoMemo}signUp(e){return e=e.toLowerCase().trim(),this.cognito().send(new Zfe({ClientId:this.clientId,Username:e,Password:"aB1%"+khe(14),UserAttributes:[{Name:"email",Value:e}]}))}signIn(e){return e=e.toLowerCase().trim(),this.cognito().send(new Jfe({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 og&&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:s}){r=r.toLowerCase().trim();const i=await this.cognito().send(new Xfe({ClientId:this.clientId,Session:e,ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:{USERNAME:r,ANSWER:n},ClientMetadata:{SESSION_HASH:s}}));if(!i.AuthenticationResult||!i.AuthenticationResult.IdToken)throw new Error("AuthenticationResult.IdToken is empty");return{idToken:i.AuthenticationResult.IdToken}}}function khe(t){return Array.from(The(t)).map(e=>e.toString(16).padStart(2,"0")).join("")}function The(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{if(this.signatureVerificationFailed)throw new Error("Signature verification failed");if(this.cryptoBackend&&this.config.disableHttpSignatureCheck!==!0&&a!=null&&a.headers){const l={};l["Accept-Signature"]='sig=();alg="rsa-v1_5-sha256"',a.headers=tr({},a.headers,l)}const c=Nhe(o,a);return this.cryptoBackend&&this.config.disableHttpSignatureCheck!==!0&&c.then(async function(l){try{var u,f;const h=await l.clone().text(),p=l.headers.get("Content-Digest"),y=l.headers.get("Signature-Input"),g=l.headers.get("Signature");if(!p)throw new Error("Content-Digest header not set");if(!y)throw new Error("Signature-Input header not set");if(!g)throw new Error("Signature header not set");const m=(u=p.match(":(.*):"))==null?void 0:u[1];if(!m)throw new Error("Content digest not found");const x=new TextEncoder().encode(h),b=await i.cryptoBackend.digest("SHA-256",x),w=btoa(String.fromCharCode(...b));if(m!==w)throw new Error("Digest mismatch");const A=`"content-digest": ${p} +"@signature-params": ${y.substring(4)}`,O={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},_=l.url.includes("dev-waas")?Mhe:Dhe,C=await i.cryptoBackend.importKey("jwk",_.keys[0],O,!1,["verify"]),j=(f=g.match(":(.*):"))==null?void 0:f[1];if(!j)throw new Error("Signature not found");const V=Uint8Array.from(atob(j),$=>$.charCodeAt(0));if(!await i.cryptoBackend.verify(O,C,V,new TextEncoder().encode(A)))throw new Error("Signature verification failed, consequent requests will fail")}catch(d){throw i.signatureVerificationFailed=!0,d}}),c},this.config=_he(e),this.waas=new rhe(tr({network:1},e),this.store,this.cryptoBackend,this.secureStoreBackend),this.client=new nhe(this.config.rpcServer,this._fetch),this.deviceName=new pv(this.store,"@0xsequence.waas.auth.deviceName",void 0)}get email(){if(this.emailClient)return this.emailClient;if(!this.config.emailRegion)throw new Error("Missing emailRegion");if(!this.config.emailClientId)throw new Error("Missing emailClientId");return this.emailClient=new Ahe(this.config.emailRegion,this.config.emailClientId),this.emailClient}async onValidationRequired(e){return this.validationRequiredCallback.push(e),()=>{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 s=await this.waas.validateSession({deviceMetadata:(r=await this.deviceName.get())!=null?r:"Unknown device"}),i=await this.sendIntent(s);this.validationRequiredSalt=i.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(P8(n)&&this.lastDate){const s=await this.waas.updateIntentTime(e,this.lastDate);return(await this.client.sendIntent({intent:s},this.headers())).response}throw n}}async updateSessionStatus(){if(await this.waas.isSignedIn()!==!1)try{await this.listSessions()}catch(e){if(e instanceof OL&&e.cause==="session invalid or not found")await this.dropSession({sessionId:await this.waas.getSessionId(),strict:!1});else throw e}}async isSignedIn(){return await this.updateSessionStatus(),this.waas.isSignedIn()}signIn(e,r){var n=this;const s="email"in e;return s&&this.emailAuthCodeRequiredCallback.length==0?Promise.reject("Missing emailAuthCodeRequired callback"):new Promise(async function(i,o){let a;try{a=await n.initAuth(e)}catch(l){return o(l)}const c=async function(u){try{const f=await n.completeAuth(a.withAnswer(u),{sessionName:r});i(f)}catch(f){if(f instanceof mp)throw f;if(f instanceof vp){const d=async function(){try{const y=await n.completeAuth(a.withAnswer(u),{sessionName:r,forceCreateAccount:!0});i(y)}catch(y){o(y)}},h={type:Ft.None,email:"",issuer:""};if(f.cause){const p=f.cause.split("|");p.length>=2&&(h.type=p[0],h.email=p[1]),p.length>=3&&(h.issuer=p[2])}for(const p of n.emailConflictCallback)p(h,d)}else o(f)}};if(s)for(const l of n.emailAuthCodeRequiredCallback)l(c);else c("")})}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(!R1(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return new Phe(e,n.data.challenge)}async initIdTokenAuth(e){var r;const n=xL(e),s=((r=n.iss)==null?void 0:r.startsWith("stytch.com/"))||!1,i=s?await this.waas.initiateStytchAuth(e,n.exp):await this.waas.initiateIdTokenAuth(e,n.exp),o=await this.sendIntent(i);if(!R1(o))throw new Error(`Invalid response: ${JSON.stringify(o)}`);return s?new Rhe(e):new qL(e)}async initEmailAuth(e){const r=await this.waas.getSessionId(),n=await this.waas.initiateEmailAuth(e),s=await this.sendIntent(n);if(!R1(s))throw new Error(`Invalid response: ${JSON.stringify(s)}`);return new rk(e,r,s.data.challenge)}async initPlayFabAuth(e,r){const n=await this.waas.initiatePlayFabAuth(e,r),s=await this.sendIntent(n);if(!R1(s))throw new Error(`Invalid response: ${JSON.stringify(s)}`);return new Ihe(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 s=await this.registerSession(n,r.sessionName);return await this.waas.completeSignIn({code:"sessionOpened",data:{sessionId:s.session.id,wallet:s.response.data.wallet}}),{sessionId:s.session.id,wallet:s.response.data.wallet,email:s.session.identity.email}}catch(s){throw!(s instanceof vp)&&!(s instanceof mp)&&await this.waas.completeSignOut(),s}}async registerSession(e,r){try{return await this.client.registerSession({intent:e,friendlyName:r},this.headers())}catch(n){if(P8(n)&&this.lastDate){const s=await this.waas.updateIntentTime(e,this.lastDate);return await this.client.registerSession({intent:s,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 Cr(e)}async dropSession({sessionId:e,strict:r}={}){const n=await this.waas.getSessionId();if(!n)throw new Error("session not open");const s=e||n;try{const i=await this.waas.signOutSession(s),o=await this.sendIntent(i);if(!bhe(o))throw new Error(`Invalid response: ${JSON.stringify(o)}`)}catch(i){if(r)throw i;console.error(i)}if(s===n){if(!this.secureStoreBackend)throw new Error("No secure store available");(await V2(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(s=>tr({},s,{isThis:s.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(!xhe(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(!whe(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(s,r))}return!1}async sessionAuthProof({nonce:e,network:r,validation:n}){const s=await this.waas.sessionAuthProof({nonce:e,network:r});return await this.trySendIntent({validation:n},s,vhe)}async listAccounts(){const e=await this.waas.listAccounts(),r=await this.sendIntent(e);if(!She(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(!Ehe(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 getIdToken(e){const r=await this.waas.getIdToken({nonce:e==null?void 0:e.nonce}),n=await this.sendIntent(r);if(!Che(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return n.data}async useIdentifier(e){if(e.identifier)return e;const r=`ts-sdk-${Date.now()}-${await this.waas.getSessionId()}`;return tr({},e,{identifier:r})}async trySendIntent(e,r,n){const s=await this.sendIntent(r);if(n(s))return s;if(ghe(s)&&await this.handleValidationRequired(e.validation)){const o=await this.sendIntent(r);if(n(o))return o}throw new Error(JSON.stringify(s))}async signMessage(e){const r=await this.waas.signMessage(await this.useIdentifier(e));return this.trySendIntent(e,r,yhe)}async trySendTransactionIntent(e,r){let n=await this.trySendIntent(r,e,T8);for(;GL(n);){await new Promise(o=>setTimeout(o,1e3));const s={metaTxHash:n.data.metaTxHash,network:e.data.network,identifier:e.data.identifier,validation:r.validation},i=await this.waas.getTransactionReceipt(await this.useIdentifier(s));n=await this.trySendIntent(s,i,T8)}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,mhe)}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 globalThis.fetch(e,r),s=n.headers.get("date");return s&&(this.lastDate=new Date(s)),n}}const jhe=t=>{if(t.type===Ft.PlayFab)return"PlayFab login";if(t.type===Ft.Email)return"Email login";if(t.type===Ft.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"},Bhe=t=>{const{onCancel:e,onConfirm:r}=t;return k.jsxs(q,{style:{maxWidth:"600px"},flexDirection:"column",paddingX:"10",paddingY:"4",alignItems:"center",gap:"4",children:[k.jsx(q,{children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Email already in use"})}),k.jsx(q,{height:"full",children:k.jsxs(ue,{as:"div",variant:"normal",color:"text50",textAlign:"center",children:["Another account with this email address ",k.jsxs(ue,{color:"text80",children:["(",t.info.email,")"]})," already exists with account type ",k.jsxs(ue,{color:"text80",children:["(",jhe(t.info),")"]}),". You can cancel this or force create a new account."]})}),k.jsxs(q,{flexDirection:"row",gap:"3",marginTop:"6",marginBottom:"2",children:[k.jsx(ut,{label:"Cancel",onClick:e}),k.jsx(ut,{variant:"primary",label:"Create new account",onClick:r})]})]})};function O0(){return O0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),dt({},n,s)).then(i=>Et(i).then(o=>({status:o.status})),i=>{throw lt.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),dt({},n,s)).then(i=>Et(i).then(o=>({version:o.version})),i=>{throw lt.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),dt({},n,s)).then(i=>Et(i).then(o=>({status:o.status})),i=>{throw lt.new({cause:`fetch(): ${i.message||""}`})}),this.getChainID=(n,s)=>this.fetch(this.url("GetChainID"),dt({},n,s)).then(i=>Et(i).then(o=>({chainID:o.chainID})),i=>{throw lt.new({cause:`fetch(): ${i.message||""}`})}),this.getEtherBalance=(n,s,i)=>this.fetch(this.url("GetEtherBalance"),dt(n,s,i)).then(o=>Et(o).then(a=>({balance:a.balance})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalances=(n,s,i)=>this.fetch(this.url("GetTokenBalances"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSupplies=(n,s,i)=>this.fetch(this.url("GetTokenSupplies"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,contractType:a.contractType,tokenIDs:a.tokenIDs})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSuppliesMap=(n,s,i)=>this.fetch(this.url("GetTokenSuppliesMap"),dt(n,s,i)).then(o=>Et(o).then(a=>({supplies:a.supplies})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getBalanceUpdates=(n,s,i)=>this.fetch(this.url("GetBalanceUpdates"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTransactionHistory=(n,s,i)=>this.fetch(this.url("GetTransactionHistory"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.syncBalance=(n,s,i)=>this.fetch(this.url("SyncBalance"),dt(n,s,i)).then(o=>Et(o).then(a=>({})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceipt=(n,s,i)=>this.fetch(this.url("FetchTransactionReceipt"),dt(n,s,i)).then(o=>Et(o).then(a=>({receipt:a.receipt})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getOrderbookOrders=(n,s,i)=>this.fetch(this.url("GetOrderbookOrders"),dt(n,s,i)).then(o=>Et(o).then(a=>({page:a.page,orders:a.orders})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTopOrders=(n,s,i)=>this.fetch(this.url("GetTopOrders"),dt(n,s,i)).then(o=>Et(o).then(a=>({orders:a.orders})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceiptWithFilter=(n,s,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),dt(n,s,i)).then(o=>Et(o).then(a=>({receipt:a.receipt})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getAllWebhookListeners=(n,s,i)=>this.fetch(this.url("GetAllWebhookListeners"),dt(n,s,i)).then(o=>Et(o).then(a=>({listeners:a.listeners})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.getWebhookListener=(n,s,i)=>this.fetch(this.url("GetWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({listener:a.listener})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.addWebhookListener=(n,s,i)=>this.fetch(this.url("AddWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status,listener:a.listener})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.updateWebhookListener=(n,s,i)=>this.fetch(this.url("UpdateWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.removeWebhookListener=(n,s,i)=>this.fetch(this.url("RemoveWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.toggleWebhookListener=(n,s,i)=>this.fetch(this.url("ToggleWebhookListener"),dt(n,s,i)).then(o=>Et(o).then(a=>({webhookListener:a.webhookListener})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.pauseAllWebhookListeners=(n,s,i)=>this.fetch(this.url("PauseAllWebhookListeners"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.resumeAllWebhookListeners=(n,s,i)=>this.fetch(this.url("ResumeAllWebhookListeners"),dt(n,s,i)).then(o=>Et(o).then(a=>({status:a.status})),o=>{throw lt.new({cause:`fetch(): ${o.message||""}`})}),this.subscribeReceipts=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeReceipts"),dt(n,s.headers,s.signal)).then(async function(o){await sb(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeEvents=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeEvents"),dt(n,s.headers,s.signal)).then(async function(o){await sb(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeBalanceUpdates=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeBalanceUpdates"),dt(n,s.headers,s.signal)).then(async function(o){await sb(o,s,i)},o=>{s.onError(o,i)});return i()},this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const sb=async(t,e,r)=>{const{onMessage:n,onOpen:s,onClose:i,onError:o}=e;if(!t.ok){try{await Et(t)}catch(h){o(h,r)}return}if(!t.body){o(td.new({status:t.status,cause:"Invalid response, missing body"}),r);return}s&&s();const a=t.body.getReader(),c=new TextDecoder;let l="",u=Date.now();const f=(10+1)*1e3;let d;try{for(d=setInterval(()=>{if(Date.now()-u>f)throw Lu.new({cause:"Stream timed out"})},f);;){let h,p;try{({value:h,done:p}=await a.read()),u=Date.now(),l+=c.decode(h,{stream:!0})}catch(g){let m="";g instanceof Error&&(m=g.message),g instanceof DOMException&&g.name==="AbortError"?o(lt.new({message:"AbortError",cause:`AbortError: ${m}`}),()=>{throw new Error("Abort signal cannot be used to reconnect")}):o(Lu.new({cause:`reader.read(): ${m}`}),r);return}let y=l.split(` +`);for(let g=0;g({method:"POST",headers:O0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Et=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),td.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(WL[n]||nt).new(r)}return r});class nt extends Error{constructor(e,r,n,s,i){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 s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,nt.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}}class nk extends nt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nk.prototype)}}class lt extends nt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lt.prototype)}}class sk extends nt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,sk.prototype)}}class ik extends nt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ik.prototype)}}class ok extends nt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ok.prototype)}}class td extends nt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,td.prototype)}}class ak extends nt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ak.prototype)}}class ck extends nt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ck.prototype)}}class lk extends nt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lk.prototype)}}class Lu extends nt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Lu.prototype)}}class uk extends nt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uk.prototype)}}class fk extends nt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fk.prototype)}}class dk extends nt{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dk.prototype)}}class hk extends nt{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hk.prototype)}}class pk extends nt{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pk.prototype)}}class yk extends nt{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yk.prototype)}}class vk extends nt{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vk.prototype)}}class mk extends nt{constructor(e="Timeout",r=2e3,n="Request timed out",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mk.prototype)}}class gk extends nt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gk.prototype)}}class xk extends nt{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,xk.prototype)}}class bk extends nt{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,bk.prototype)}}class wk extends nt{constructor(e="ResourceExhausted",r=2004,n="Resource exhausted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wk.prototype)}}class Ek extends nt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Ek.prototype)}}class Sk extends nt{constructor(e="ProjectNotFound",r=3002,n="Project not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Sk.prototype)}}class Ck extends nt{constructor(e="MetadataCallFailed",r=3003,n="Metadata service call failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Ck.prototype)}}const WL={0:nk,[-1]:lt,[-2]:sk,[-3]:ik,[-4]:ok,[-5]:td,[-6]:ak,[-7]:ck,[-8]:lk,[-9]:Lu,[-10]:uk,1e3:fk,1001:dk,1002:hk,1003:pk,1004:yk,1005:vk,2e3:mk,2001:gk,2002:xk,2003:bk,2004:wk,3e3:Ek,3002:Sk,3003:Ck},R8=globalThis.fetch;class KL extends Fhe{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,R8),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=O0({},i.headers,o),R8(s,i)},this.fetch=this._fetch}}const I8=[..."🐶🐱🐭🐹🐰🦊🐻🐼🐨🐯🦁🐮🐷🐽🐸🐵🙈🙉🙊🐒🐔🐧🐦🐤🐣🐥🦆🦅🦉🦇🐺🐗🐴🦄🐝🐛🦋🐌🐞🐜🦟🦗🕷🕸🦂🐢🐍🦎🦖🦕🐙🦑🦐🦞🦀🐡🐠🐟🐬🐳🐋🦈🐊🐅🐆🦓🦍🦧🐘🦛🦏🐪🐫🦒🦘🐃🐂🐄🐎🐖🐏🐑🦙🐐🦌🐕🐩🦮🐈🐓🦃🦚🦜🦢🦩🕊🐇🦝🦨🦡🦦🦥🐁🐀🐿🦔🐾🐉🐲🌵🎄🌲🌳🌴🌱🌿🍀🎍🎋🍃👣🍂🍁🍄🐚🌾💐🌷🌹🥀🌺🌸🌼🌻🌞🌝🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈🥭🍍🥥🥝🍅🥑🥦🥬🥒🌶🌽🥕🧄🧅🥔🍠🥐🥯🍞🥖🥨🧀🥚🍳🧈🥞🧇🥓🥩🍗🍖🦴🌭🍔🍟🍕🥪🥙🧆🌮🌯🥗🥘🥫🍝🍜🍲🍛🍣🍱🥟🦪🍤🍙🍚🍘🍥🥠🥮🍢🍡🍧🍨🍦🥧🧁🍰🎂🍮🍭🍬🍫🍿🍩🍪🌰🥜👀👂👃👄👅👆👇👈👉👊👋👌👍👎👏👐👑👒👓🎯🎰🎱🎲🎳👾👯👺👻👽🏂🏃🏄"];function fc(){const e=loe.en,r=I8[Math.floor(Math.random()*I8.length)],n=e.getWord(Math.floor(Math.random()*2048)),s=e.getWord(Math.floor(Math.random()*2048));return`${r} ${n} ${s}`}const vv=t=>t.name==="AccountAlreadyLinked";function QL({onSuccess:t,sessionName:e,linkAccount:r=!1}){const n=M9(),[s,i]=v.useState(),[o,a]=v.useState(!1),[c,l]=v.useState(!1),[u,f]=v.useState(),[d,h]=v.useState();return v.useEffect(()=>Oe.onEmailAuthCodeRequired(async m=>{a(!1),f(()=>m)}),[Oe,a,f]),{inProgress:c,initiateAuth:async m=>{a(!0),l(!0);try{if(r){const x=await Oe.initAuth({email:m});h(x),a(!1)}else{const x=await Oe.signIn({email:m},e);t(x)}}catch(x){i(x.message||"Unknown error")}finally{r||(a(!1),l(!1))}},loading:o,error:s,sendChallengeAnswer:c?async m=>{if(r&&d){try{await Oe.linkAccount(d.withAnswer(m))}catch(x){vv(x)&&n({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}a(!1),l(!1);return}u&&await u(m)}:void 0,cancel:()=>{l(!1),a(!1),h(void 0),f(null)}}}const Uhe=({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(s=>!(s in n))?!1:Object.entries(r).filter(([s])=>!t.includes(s)).every(([s,i])=>e(i,n[s])):r===n;return e},Vhe=Uhe(),$he=(t,e)=>t===e?e:Object.keys(t).reduce((r,n)=>(n in e&&Vhe(t[n],e[n])&&(r[n]=t[n]),r),Object.assign({},e)),zhe=t=>{const e=v.useRef(!0),[r,n]=v.useState(t);v.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]);const s=v.useCallback(i=>{e.current&&n(i)},[]);return[r,s]},YL=(t,e="StytchProvider")=>`${t} can only be used inside <${e}>.`,Hhe="You cannot render a inside another .",Ghe=`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 _0(t,e){if(!t)throw new Error(e)}const qhe={user:null,fromCache:!1},Whe={session:null,fromCache:!1},Ak=v.createContext({isMounted:!1}),Khe=v.createContext(qhe),YL=v.createContext(Whe),JL=()=>v.useContext(Ak).isMounted,Qhe=()=>(_0(JL(),QL("useStytchSession")),v.useContext(YL)),Yhe=()=>{const t=v.useContext(Ak);return _0(t.isMounted,QL("useStytch")),t.client},Jhe=({stytch:t,children:e})=>{_0(!JL(),Hhe),_0(typeof window<"u",Ghe);const r=v.useMemo(()=>({client:t,isMounted:!0}),[t]),[{user:n,session:s},i]=zhe({session:t.session.getInfo(),user:t.user.getInfo()});return v.useEffect(()=>t.onStateChange(()=>{i(o=>{const a={session:t.session.getInfo(),user:t.user.getInfo()};return $he(o,a)})}),[i,t]),cr.createElement(Ak.Provider,{value:r},cr.createElement(Khe.Provider,{value:n},cr.createElement(YL.Provider,{value:s},e)))};function Xhe(){const t=Yhe(),{session:e}=Qhe(),[r,n]=v.useState(0),[s,i]=v.useState(""),o=v.useRef(null);v.useEffect(()=>{if(localStorage.getItem("stytch_auth")!=="native")return;const c=new URLSearchParams(window.location.search);c.get("stytch_token_type")==="magic_links"&&r===0&&(n(2),(async()=>await t.magicLinks.authenticate(c.get("token")||"",{session_duration_minutes:5}))())},[t,e,r]),v.useEffect(()=>{localStorage.getItem("stytch_auth")==="native"&&e&&r==2&&(n(3),(async()=>{const c=t.session.getTokens(),l=await Oe.signIn({idToken:c.session_jwt},fc());console.log(`Wallet address: ${l}`),await t.session.revoke(),n(0),window.location.search="",oi.navigate("/")})())},[e,t,r]);const a=async c=>{localStorage.setItem("stytch_auth","native"),n(1),await t.magicLinks.email.loginOrCreate(c,{})};return k.jsxs(q,{children:[k.jsx(q,{marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Stytch login"})}),k.jsxs(q,{marginTop:"5",marginBottom:"4",children:[k.jsx(q,{marginTop:"6",children:k.jsx(sr,{name:"stytchEmail",type:"email",onChange:c=>{i(c.target.value)},ref:o,onKeyDown:c=>{s&&c.key==="Enter"&&a(s)},value:s,placeholder:"hello@example.com",disabled:r!==0,required:!0})}),k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(ut,{variant:"primary",label:"Continue",onClick:()=>a(s),"data-id":"continueButton",disabled:r!==0})}),r===1&&k.jsx(q,{children:k.jsx(ue,{variant:"normal",color:"text80",children:"Magic link sent to your email. Please click the link. You can close this page."})})]})]})}function Zhe(){var B;const[t,e]=v.useState(""),r=v.useRef(null),n=(B=r.current)==null?void 0:B.validity.valid,[s,i]=v.useState(!1),[o,a]=v.useState([]),[c,l]=v.useState(),[u,f]=v.useState(!1),d=v.useRef(null);Oe.onEmailConflict(async(z,Y)=>{d.current=Y,l(z),f(!0)});const h=e7({flow:"implicit",onSuccess:z=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:z.access_token,CreateAccount:!0,TitleId:"8F854"},async(Y,H)=>{if(Y)try{const L=await Oe.signIn({playFabTitleId:"8F854",playFabSessionTicket:Y.data.SessionTicket},fc());console.log("Sequence response:",L),oi.navigate("/")}catch{console.error("Error: "+JSON.stringify(H))}else H&&console.error("Error: "+JSON.stringify(H))})}}),{inProgress:p,loading:y,initiateAuth:g,sendChallengeAnswer:m,cancel:x}=KL({sessionName:fc(),onSuccess:async({wallet:z})=>{console.log(`Wallet address: ${z}`),oi.navigate("/")}});v.useEffect(()=>{(async()=>await Oe.isSignedIn()&&oi.navigate("/"))()},[]);const b=async z=>{const Y=await Oe.signIn({idToken:z.credential},fc());console.log(`Wallet address: ${Y.wallet}`),console.log(`Email address: ${Y.email}`),oi.navigate("/")},w="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":""),A=async z=>{const Y=await Oe.signIn({idToken:z.authorization.id_token},fc());console.log(`Wallet address: ${Y.wallet}`),console.log(`Email address: ${Y.email}`),oi.navigate("/")},O=async()=>{const z=await Oe.signIn({guest:!0},fc());console.log(`Wallet address: ${z.wallet}`),oi.navigate("/")},_=new URLSearchParams(window.location.search),C=_.get("env")==="dev",[j,V]=v.useState(C);return k.jsxs(k.Fragment,{children:[k.jsxs(q,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[k.jsxs(q,{marginBottom:"16",flexDirection:"row",children:[k.jsx(s7,{}),k.jsx(q,{marginLeft:"auto",children:k.jsx(kJ,{label:"Use dev env",checked:j,onCheckedChange:()=>{j?(_.delete("env"),window.location.search=_.toString()):(_.set("env","dev"),window.location.search=_.toString()),V(!j)}})})]}),k.jsx(q,{marginTop:"6",marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Guest Login"})}),k.jsx(q,{gap:"4",children:k.jsx(ut,{label:"Login as guest",onClick:O})}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(q,{marginTop:"6",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Email Login"})}),m?k.jsxs(q,{flexDirection:"column",children:[k.jsx(q,{marginTop:"6",children:k.jsx(ue,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),k.jsx(q,{marginTop:"4",children:k.jsx(n7,{value:o,digits:6,onChange:a})}),k.jsx(q,{gap:"2",marginY:"4",children:y?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:o.includes(""),label:"Verify",onClick:()=>m(o.join("")),"data-id":"verifyButton"})})]}):k.jsxs(q,{marginTop:"5",marginBottom:"4",children:[k.jsxs(ue,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",k.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),k.jsxs(q,{marginTop:"6",children:[k.jsx(sr,{name:"email",type:"email",onChange:z=>{e(z.target.value)},ref:r,onKeyDown:z=>{t&&z.key==="Enter"&&g(t)},onBlur:()=>i(!!t&&!n),value:t,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),s&&k.jsx(ue,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:y?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:!n,label:"Continue",onClick:()=>g(t),"data-id":"continueButton"})})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(q,{paddingY:"4",gap:"4",flexDirection:"column",width:"full",children:!p&&k.jsxs(k.Fragment,{children:[k.jsx(q,{marginBottom:"2",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Social Login"})}),k.jsxs(q,{gap:"4",flexDirection:"column",width:"fit",children:[k.jsx(q,{children:k.jsx(Z9,{onSuccess:b,shape:"circle",width:230},"google")}),k.jsx(r7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:w,usePopup:!0},onError:z=>console.error(z),onSuccess:A,uiType:"dark"},"apple")]}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsxs(q,{children:[k.jsx(q,{marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Playfab login"})}),k.jsx(q,{children:k.jsx(ut,{label:"Login with Google (through Playfab)",onClick:h})})]}),k.jsx(Xhe,{}),""]})})]}),u&&c&&k.jsx(PN,{size:"small",onClose:()=>f(!1),children:k.jsx(Bhe,{info:c,onCancel:()=>{f(!1),l(void 0),p&&(a([]),x(),e(""))},onConfirm:async()=>{var z;f(!1),l(void 0),await((z=d.current)==null?void 0:z.call(d))}})})]})}async function cg({transactions:t,network:e}){const r=await Oe.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 lg(t){var i;const{feeOptions:e,onSelected:r}=t,[n,s]=v.useState();return v.useEffect(()=>{e&&e.length>0&&(s(e[0]),r(e[0]))},[e]),v.useEffect(()=>{n&&r(n)},[n]),e?k.jsxs(q,{marginTop:"5",children:[k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options:"}),k.jsx(q,{marginTop:"3"}),k.jsx(Rm,{name:"chainId",labelLocation:"top",onValueChange:o=>{const a=e.find(c=>c.token.name===o);a&&s(a)},value:(i=n==null?void 0:n.token)==null?void 0:i.name,options:[...e.map(o=>{var a,c,l;return{label:k.jsx(q,{alignItems:"center",gap:"2",children:k.jsxs(ue,{children:[(a=o==null?void 0:o.token)==null?void 0:a.name," ",mC(o==null?void 0:o.value,(c=o==null?void 0:o.token)==null?void 0:c.decimals)]})}),value:String((l=o==null?void 0:o.token)==null?void 0:l.name)}})]})]}):k.jsx(q,{})}const epe="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function tpe(t){const[e,r]=v.useState(),[n,s]=v.useState("ETH"),[i,o]=v.useState(""),[a,c]=v.useState(""),[l,u]=v.useState(""),[f,d]=v.useState(),[h,p]=v.useState(!1),[y,g]=v.useState(),[m,x]=v.useState(),[b,w]=v.useState(),[A,O]=v.useState(),[_,C]=v.useState(!1);v.useEffect(()=>{j()},[]),v.useEffect(()=>{var z,Y;if(t.network){const H=fp(t.network.name);if(H){const L=H.name in{polygon:1,mumbai:1}?"MATIC":"ETH";s(L),j(),(z=H.blockExplorer)!=null&&z.rootUrl&&o((Y=H.blockExplorer)==null?void 0:Y.rootUrl)}}},[t.network]);const j=async()=>{if(!t.network)return;const z=fp(t.network.name);if(!z)return;const Y=await Oe.getAddress(),L=await new WL(ND(z.name),epe).getEtherBalance({accountAddress:Y});r(BigInt(L.balance.balanceWei))},V=async(z,Y)=>{const H=await cg({transactions:[{to:z,value:E4(Y)}],network:t.network});if(H.feeQuote&&H.feeOptions){x(H.feeOptions),O(H.feeQuote),console.log("feeOptions",H);return}C(!0),console.log("tx sponsored")},B=async(z,Y)=>{var H;try{g(void 0),p(!0);const L=await Oe.sendTransaction({transactions:[{to:z,value:E4(Y)}],network:(H=t.network)==null?void 0:H.id,transactionsFeeOption:b,transactionsFeeQuote:A});Ay(L)?d(L.data.txHash):g(L.data.error),p(!1)}catch(L){console.error(L),p(!1)}finally{O(void 0),x(void 0),w(void 0),C(!1)}};return k.jsxs(q,{children:[k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Native token balance: ",cte(e||0)," ",n]}),k.jsx(ut,{marginLeft:"2",size:"xs",label:"Fetch",onClick:j}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"sendNativeTokenTo",type:"text",onChange:z=>{c(z.target.value)},value:a,placeholder:"To address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"sendNativeTokenAmount",type:"text",onChange:z=>{u(z.target.value)},value:l,placeholder:"Amount",required:!0,"data-id":"nativeTokenSendAmount"})}),y&&k.jsxs(q,{marginTop:"3",children:["Transaction failed: ",y]}),k.jsx(lg,{feeOptions:m,onSelected:w}),_&&k.jsx(q,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h?k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(q,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:a===""&&l==="",onClick:()=>V(a,l)}),k.jsx(ut,{marginTop:"5",label:"Send native token",disabled:a===""&&l==="",onClick:()=>B(a,l)})]}),f&&k.jsxs(q,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Send native token transaction hash:"}),k.jsx("br",{}),k.jsx("a",{href:`${i}tx/${f}`,target:"_blank",rel:"noopener noreferrer",children:f})]})]})}function rpe(){const[t,e]=v.useState(),[r,n]=v.useState(),[s,i]=v.useState(!0),[o,a]=v.useState(),c=async l=>{i(!0),e(void 0);try{await Oe.dropSession({sessionId:l}),e(await Oe.listSessions())}catch(u){a(u.message),e(await Oe.listSessions())}i(!1)};return v.useEffect(()=>{Promise.all([Oe.listSessions(),Oe.getSessionId()]).then(([l,u])=>{e(l),n(u),i(!1)}).catch(l=>{a(l.message),i(!1)})},[]),k.jsxs(q,{children:[k.jsxs(q,{marginBottom:"5",children:[k.jsx(q,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your open sessions:"})}),t&&k.jsx(k.Fragment,{children:t.map(l=>k.jsx(q,{children:k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"normal",children:[l.friendlyName,!l.isThis&&k.jsx("a",{style:{marginLeft:"7px",textDecoration:"underline",cursor:"pointer"},onClick:()=>c(l.id),children:"x"}),l.isThis&&k.jsx(k.Fragment,{children:" (current)"})]})},l.id))}),s&&k.jsx(Bn,{})]}),o&&k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Error loading sessions: ",o]})]})}function npe(t){const[e,r]=v.useState(""),[n,s]=v.useState(),i=async()=>{var a;const o=await Oe.signMessage({message:e,network:(a=t.network)==null?void 0:a.id});s(o.data.signature)};return k.jsxs(q,{children:[k.jsx(sr,{name:"signMessageText",type:"text",onChange:o=>{r(o.target.value),n!=""&&s("")},value:e,placeholder:"Enter a message to sign",required:!0,"data-id":"signMessageInput"}),k.jsx(ut,{marginTop:"5",label:"Sign message",disabled:e==="",onClick:()=>i()}),n&&n!==""&&k.jsxs(q,{flexDirection:"column",marginTop:"5",children:[k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Signature for ",e,":"]}),k.jsx(q,{children:k.jsx(ue,{as:"p",wordBreak:"break-word",children:n})})]})]})}function spe(t){const[e,r]=v.useState(""),[n,s]=v.useState(""),[i,o]=v.useState(""),[a,c]=v.useState(""),[l,u]=v.useState(),[f,d]=v.useState(!1),[h,p]=v.useState(),[y,g]=v.useState(),[m,x]=v.useState(),[b,w]=v.useState(),[A,O]=v.useState(!1),[_,C]=v.useState("");v.useEffect(()=>{var B,z;if(t.network){const Y=fp(t.network.name);(B=Y==null?void 0:Y.blockExplorer)!=null&&B.rootUrl&&C((z=Y.blockExplorer)==null?void 0:z.rootUrl)}},[t.network]);const j=async()=>{const B=await cg({transactions:[bL({to:e,abi:n,func:i,args:JSON.parse(a),value:"0"})],network:t.network});if(B.feeQuote&&B.feeOptions){g(B.feeOptions),w(B.feeQuote),console.log("feeOptions",B);return}O(!0),console.log("tx sponsored")},V=async()=>{var B;try{p(void 0),d(!0);const z=await Oe.callContract({network:(B=t.network)==null?void 0:B.id,to:e,abi:n,func:i,args:JSON.parse(a),value:0,transactionsFeeOption:m,transactionsFeeQuote:b});Ay(z)?u(z.data.txHash):p(z.data.error),d(!1)}catch(z){console.error(z),d(!1)}};return k.jsxs(q,{children:[k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"callContractAddress",type:"text",onChange:B=>{r(B.target.value)},value:e,placeholder:"Contract address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"callContractAbi",type:"text",onChange:B=>{s(B.target.value)},value:n,placeholder:"Contract ABI or function ABI, e.g. [{...}] or [{...}, {...}] or transfer(address,uint256)",required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"callContractMethod",type:"text",onChange:B=>{o(B.target.value)},value:i,placeholder:"Method name, e.g. transfer",required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"callContractArgs",type:"text",onChange:B=>{c(B.target.value)},value:a,placeholder:'Method args, e.g. [0x..., 1000] or named { "to": "0x...", "amount": "1000" }',required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(lg,{feeOptions:y,onSelected:x}),A&&k.jsx(q,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h&&k.jsxs(q,{marginTop:"3",children:["Transaction failed: ",h]}),f?k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(q,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&n===""&&i===""&&a==="",onClick:()=>j()}),k.jsx(ut,{marginTop:"5",label:"Call contract",disabled:e===""&&n===""&&i===""&&a==="",onClick:()=>V()})]}),l&&k.jsxs(q,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Send native token transaction hash:"}),k.jsx("br",{}),k.jsx("a",{href:`${_}tx/${l}`,target:"_blank",rel:"noopener noreferrer",children:l})]})]})}const O8=[{label:"Custom Token",value:"Custom"},{label:"USDC Old",value:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"},{label:"USDC New",value:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},{label:"DAI",value:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"}];function ipe(t){const[e,r]=v.useState(O8[0].value),[n,s]=v.useState(""),[i,o]=v.useState(!0),[a,c]=v.useState("---"),[l,u]=v.useState(""),[f,d]=v.useState(""),[h,p]=v.useState(""),[y,g]=v.useState(""),[m,x]=v.useState(!1),[b,w]=v.useState(0),[A,O]=v.useState(),[_,C]=v.useState(),[j,V]=v.useState(),[B,z]=v.useState(!1),[Y,H]=v.useState("");v.useEffect(()=>{var I,U;if(t.network){const F=fp(t.network.name);(I=F==null?void 0:F.blockExplorer)!=null&&I.rootUrl&&H((U=F.blockExplorer)==null?void 0:U.rootUrl)}},[t.network]),v.useEffect(()=>{L(n)},[n]);const L=async I=>{var X;if(!ene(I)){c("---");return}c("...");const U=new wD(`https://nodes.sequence.app/${(X=t.network)==null?void 0:X.name}`),F=new Mu(I,["function balanceOf(address) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)"],U);try{const[oe,ae,ke]=await Promise.all([F.balanceOf(Oe.getAddress()),F.decimals(),F.symbol()]);w(ae),c(`${mC(oe,ae)} ${ke}`)}catch{c("---")}},T=async()=>{const I=await cg({transactions:[QA({token:n,to:l,value:Xh(f,b).toString()})],network:t.network});if(I.feeQuote&&I.feeOptions){O(I.feeOptions),V(I.feeQuote),console.log("feeOptions",I);return}z(!0),console.log("tx sponsored")},P=async()=>{var I;try{g(""),x(!0);const U=await Oe.sendERC20({token:n,to:l,value:Xh(f,b),network:(I=t.network)==null?void 0:I.id,transactionsFeeOption:_,transactionsFeeQuote:j});Ay(U)?p(U.data.txHash):g(U.data.error)}catch(U){console.error(U)}finally{x(!1)}},R=I=>{r(I),I==="Custom"?(s(""),o(!0)):(s(I),o(!1))};return k.jsxs(q,{children:[k.jsxs(q,{marginTop:"5",children:[k.jsx(Rm,{name:"token",options:O8,value:e??"",onValueChange:I=>R(I)}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{type:"text",value:n,disabled:!i,onChange:I=>s(I.target.value),placeholder:"Custom ERC20 Contract Address"})})]}),k.jsxs(q,{marginTop:"3",children:[k.jsxs(ue,{variant:"normal",color:"text100",children:["Token Balance: ",a]}),k.jsx(ut,{marginLeft:"2",size:"xs",label:"Fetch",onClick:()=>L(n)})]}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{type:"text",value:l,onChange:I=>u(I.target.value),placeholder:"Destination Address"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{type:"text",value:f,onChange:I=>d(I.target.value),placeholder:"Amount"})}),y&&k.jsx(q,{marginTop:"3",children:k.jsxs(ue,{color:"error",children:["Error: ",y]})}),k.jsx(lg,{feeOptions:A,onSelected:C}),B&&k.jsx(q,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),m?k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(q,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:n===""&&l==="",onClick:()=>T()}),k.jsx(ut,{marginTop:"5",label:"Send Token",onClick:P})]}),h&&k.jsxs(q,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),k.jsx("a",{href:`${Y}tx/${h}`,target:"_blank",rel:"noopener noreferrer",children:h})]})]})}const ope="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function ape(t){var a;const[e,r]=v.useState(""),[n,s]=v.useState("");v.useEffect(()=>{t.onChange(t.index,e,n)},[e,n]);const i={display:"flex",gap:"10px",marginBottom:"10px"},o={flex:1};return k.jsxs(q,{style:i,children:[k.jsx(q,{style:o,children:k.jsx(Rm,{name:`sendERC1155TokenId${t.index}`,value:e,disabled:!t.options,onValueChange:c=>{r(c)},options:((a=t.options)==null?void 0:a.balances.map(c=>{var l;return{label:`${((l=c.tokenMetadata)==null?void 0:l.name)||"Unknown"} - ${c.balance}`,value:c.tokenID}}))||[],placeholder:"Select a token"})}),k.jsx(q,{style:o,children:k.jsx(sr,{type:"text",value:e,onChange:c=>r(c.target.value),placeholder:"Token ID"})}),k.jsx(q,{style:o,children:k.jsx(sr,{type:"text",value:n,onChange:c=>s(c.target.value),placeholder:"Amount"})}),k.jsx(q,{style:o,children:k.jsx(ut,{label:"Remove",onClick:()=>t.removeTokenEntry(t.index)})})]})}function cpe(t){const[e,r]=v.useState(""),[n,s]=v.useState([]),[i,o]=v.useState(""),[a,c]=v.useState(""),[l,u]=v.useState(""),[f,d]=v.useState(!1),[h,p]=v.useState(void 0),[y,g]=v.useState(),[m,x]=v.useState(),[b,w]=v.useState(),[A,O]=v.useState(!1),[_,C]=v.useState("");v.useEffect(()=>{var L,T;if(t.network){const P=fp(t.network.name);(L=P==null?void 0:P.blockExplorer)!=null&&L.rootUrl&&C((T=P.blockExplorer)==null?void 0:T.rootUrl)}},[t.network]);const j=()=>{s([...n,{tokenId:"",amount:""}])},V=async()=>{if(!e||!t.network)return;const L=t.network.name,T=new WL("https://"+L+"-indexer.sequence.app",ope),P=e,R=await Oe.getAddress(),I=!0;p(await T.getTokenBalances({contractAddress:P,accountAddress:R,includeMetadata:I}))};v.useEffect(()=>{V()},[e]);const B=(L,T)=>{const P=[...n];P[L]=T,s(P)},z=L=>{const T=[...n];T.splice(L,1),s(T)},Y=async()=>{const L=await cg({transactions:[YA({to:i,token:e,values:n.map(T=>({id:T.tokenId,amount:Xh(T.amount,0)}))})],network:t.network});if(L.feeQuote&&L.feeOptions){g(L.feeOptions),w(L.feeQuote),console.log("feeOptions",L);return}O(!0),console.log("tx sponsored")},H=async()=>{var L;try{u(""),d(!0);const T=await Oe.sendERC1155({to:i,token:e,values:n.map(P=>({id:P.tokenId,amount:Xh(P.amount,0)})),network:(L=t.network)==null?void 0:L.id,transactionsFeeOption:m,transactionsFeeQuote:b});Ay(T)?c(T.data.txHash):u(T.data.error)}catch(T){console.error(T)}finally{d(!1)}};return k.jsxs(q,{children:[k.jsx(q,{marginBottom:"5",children:k.jsx(sr,{type:"text",value:e,onChange:L=>r(L.target.value),placeholder:"Token Contract Address"})}),k.jsx(q,{marginBottom:"5",children:k.jsx(ut,{label:"Fetch metadata",onClick:()=>V()})}),n.map((L,T)=>k.jsx(q,{marginBottom:"3",children:k.jsx(ape,{index:T,options:h,onChange:(P,R,I)=>B(P,{tokenId:R,amount:I}),removeTokenEntry:z})},T)),k.jsx(ut,{label:"Add Token",onClick:j}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{type:"text",value:i,onChange:L=>o(L.target.value),placeholder:"Destination Address"})}),l&&k.jsx(q,{marginTop:"3",children:k.jsxs(ue,{color:"error",children:["Error: ",l]})}),k.jsx(lg,{feeOptions:y,onSelected:x}),A&&k.jsx(q,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),f?k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(q,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&i===""&&n.length!==0,onClick:()=>Y()}),k.jsx(ut,{marginTop:"5",label:"Send Tokens",onClick:H})]}),a&&k.jsxs(q,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),k.jsx("a",{href:`${_}tx/${a}`,target:"_blank",rel:"noopener noreferrer",children:a})]})]})}const Ue={AMOY:80002,APE_CHAIN_TESTNET:33111,ARBITRUM:42161,ARBITRUM_GOERLI:421613,ARBITRUM_NOVA:42170,ARBITRUM_SEPOLIA:421614,AVALANCHE:43114,AVALANCHE_TESTNET:43113,BASE:8453,BASE_GOERLI:84531,BASE_SEPOLIA:84532,B3_SEPOLIA:1993,BLAST:81457,BLAST_SEPOLIA:168587773,BORNE_TESTNET:94984,BSC:56,BSC_TESTNET:97,FANTOM:250,FANTOM_TESTNET:4002,GNOSIS:100,GOERLI:5,HOMEVERSE:19011,HOMEVERSE_TESTNET:40875,IMMUTABLE_ZKEVM:13371,IMMUTABLE_ZKEVM_TESTNET:13473,KOVAN:42,MAINNET:1,OPTIMISM:10,OPTIMISM_SEPOLIA:11155420,OPTIMISM_TESTNET:69,POLYGON:137,POLYGON_MUMBAI:80001,POLYGON_ZKEVM:1101,RINKEBY:4,ROPSTEN:3,SEPOLIA:11155111,ASTAR_ZKEVM:3776,ASTAR_ZKYOTO:6038361,XAI:660279,XAI_SEPOLIA:37714555429,XR_SEPOLIA:2730},lpe={[Ue.MAINNET]:"https://assets.sequence.info/images/networks/small/1.webp",[Ue.ROPSTEN]:"https://assets.sequence.info/images/networks/small/3.webp",[Ue.GOERLI]:"https://assets.sequence.info/images/networks/small/5.webp",[Ue.KOVAN]:"https://assets.sequence.info/images/networks/small/42.webp",[Ue.OPTIMISM]:"https://assets.sequence.info/images/networks/small/10.webp",[Ue.OPTIMISM_TESTNET]:"https://assets.sequence.info/images/networks/small/69.webp",[Ue.OPTIMISM_SEPOLIA]:"https://assets.sequence.info/images/networks/small/11155420.webp",[Ue.POLYGON]:"https://assets.sequence.info/images/networks/small/137.webp",[Ue.POLYGON_MUMBAI]:"https://assets.sequence.info/images/networks/small/80001.webp",[Ue.POLYGON_ZKEVM]:"https://assets.sequence.info/images/networks/small/1101.webp",[Ue.APE_CHAIN_TESTNET]:"https://assets.sequence.info/images/networks/small/33111.webp",[Ue.ARBITRUM]:"https://assets.sequence.info/images/networks/small/42161.webp",[Ue.ARBITRUM_NOVA]:"https://assets.sequence.info/images/networks/small/42170.webp",[Ue.ARBITRUM_GOERLI]:"https://assets.sequence.info/images/networks/small/421613.webp",[Ue.ARBITRUM_SEPOLIA]:"https://assets.sequence.info/images/networks/small/421614.webp",[Ue.GNOSIS]:"https://assets.sequence.info/images/networks/small/100.webp",[Ue.BSC]:"https://assets.sequence.info/images/networks/small/56.webp",[Ue.BSC_TESTNET]:"https://assets.sequence.info/images/networks/small/97.webp",[Ue.FANTOM]:"https://assets.sequence.info/images/networks/small/250.webp",[Ue.FANTOM_TESTNET]:"https://assets.sequence.info/images/networks/small/4002.webp",[Ue.AVALANCHE]:"https://assets.sequence.info/images/networks/small/43114.webp",[Ue.AVALANCHE_TESTNET]:"https://assets.sequence.info/images/networks/small/43113.webp",[Ue.BASE]:"https://assets.sequence.info/images/networks/small/8453.webp",[Ue.BASE_SEPOLIA]:"https://assets.sequence.info/images/networks/small/84532.webp",[Ue.BORNE_TESTNET]:"https://assets.sequence.info/images/networks/small/94984.webp",[Ue.BLAST]:"https://assets.sequence.info/images/networks/small/81457.webp",[Ue.BLAST_SEPOLIA]:"https://assets.sequence.info/images/networks/small/168587773.webp",[Ue.SEPOLIA]:"https://assets.sequence.info/images/networks/small/11155111.webp",[Ue.AMOY]:"https://assets.sequence.info/images/networks/small/80002.webp",[Ue.HOMEVERSE]:"https://assets.sequence.info/images/networks/small/19011.webp",[Ue.HOMEVERSE_TESTNET]:"https://assets.sequence.info/images/networks/small/40875.webp",[Ue.IMMUTABLE_ZKEVM]:"https://assets.sequence.info/images/networks/small/13371.webp",[Ue.IMMUTABLE_ZKEVM_TESTNET]:"https://assets.sequence.info/images/networks/small/13473.webp",[Ue.XAI]:"https://assets.sequence.info/images/networks/small/660279.webp",[Ue.XAI_SEPOLIA]:"https://assets.sequence.info/images/networks/small/37714555429.webp",[Ue.ASTAR_ZKEVM]:"https://assets.sequence.info/images/networks/small/3776.webp",[Ue.ASTAR_ZKYOTO]:"https://assets.sequence.info/images/networks/small/6038361.webp",[Ue.B3_SEPOLIA]:"https://assets.sequence.info/images/networks/small/1993.webp",[Ue.XR_SEPOLIA]:"https://assets.sequence.info/images/networks/small/2730.webp"};function upe({onNetworkChange:t}){const[e,r]=v.useState(),[n,s]=v.useState([]);return v.useEffect(()=>{Oe.networkList().then(i=>{s(i),r(i[0]),t(i[0])})},[]),n.length===0?k.jsx(q,{marginY:"5",children:k.jsx(Bn,{})}):k.jsxs(q,{marginBottom:"4",children:[k.jsx(q,{marginBottom:"4",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Network to use with requests:"})}),k.jsx(q,{children:k.jsx(Rm,{name:"chainId",labelLocation:"top",onValueChange:i=>{const o=n==null?void 0:n.find(a=>a.name===i);o&&(r(o),t(o))},value:e==null?void 0:e.name,options:[...n.map(i=>({label:k.jsxs(q,{alignItems:"center",gap:"2",children:[k.jsx(mX,{src:lpe[i.id],size:"sm"}),k.jsx(ue,{children:i.name})]}),value:String(i.name)}))]})})]})}function XL(t){var e;if(t.type===Ft.Email)return k.jsxs(ue,{variant:"normal",color:"text100",children:["Email (",t.email,")"]});if(t.type===Ft.Guest)return k.jsx(ue,{variant:"normal",color:"text100",children:"Guest account"});if(t.type===Ft.PlayFab)return k.jsxs(ue,{variant:"normal",color:"text100",children:["PlayFab (",t.email,")"]});if(t.type===Ft.OIDC&&(e=t.issuer)!=null&&e.includes("cognito-idp"))return k.jsxs(ue,{variant:"normal",color:"text100",children:["Email Legacy (",t.email,")"]});if(t.type===Ft.Stytch)return k.jsxs(k.Fragment,{children:["Stytch account (",t.email,")"]});switch(t.issuer){case"https://accounts.google.com":return k.jsxs(q,{gap:"2",marginTop:"2",children:[k.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="}),k.jsxs(ue,{variant:"normal",color:"text100",children:["Google (",t.email,")"]})]});case"https://appleid.apple.com":return k.jsxs(q,{gap:"2",children:[k.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="}),k.jsxs(ue,{variant:"normal",color:"text100",children:["Apple (",t.email,")"]})]});default:return"Unknown"}}function fpe(){var V;const t=M9(),[e,r]=v.useState(),[n,s]=v.useState(),[i,o]=v.useState(!0),[a,c]=v.useState(),[l,u]=v.useState(""),f=v.useRef(null),d=(V=f.current)==null?void 0:V.validity.valid,[h,p]=v.useState(!1),[y,g]=v.useState([]),{inProgress:m,loading:x,initiateAuth:b,sendChallengeAnswer:w}=KL({sessionName:fc(),onSuccess:async({wallet:B})=>{console.log(`Wallet address: ${B}`)},linkAccount:!0}),A=async B=>{o(!0),s(void 0);try{await Oe.removeAccount(B);const z=await Oe.listAccounts();s(z.accounts)}catch(z){c(z.message);const Y=await Oe.listAccounts();s(Y.accounts)}o(!1)},O=async B=>{const z=await Oe.initAuth({idToken:B.credential});try{const Y=await Oe.linkAccount(z);s(H=>[...H||[],Y.account])}catch(Y){vv(Y)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},_="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":"/"),C=async B=>{const z=await Oe.initAuth({idToken:B.authorization.id_token});try{const Y=await Oe.linkAccount(z);s(H=>[...H||[],Y.account])}catch(Y){vv(Y)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},j=e7({flow:"implicit",onSuccess:B=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:B.access_token,CreateAccount:!0,TitleId:"8F854"},async(z,Y)=>{if(z)try{const H=await Oe.initAuth({playFabTitleId:"8F854",playFabSessionTicket:z.data.SessionTicket}),L=await Oe.linkAccount(H);console.log("playfab account",JSON.stringify(L.account,null,2)),s(T=>[...T||[],L.account])}catch(H){console.error(H),vv(H)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}else Y&&console.log("Error: "+JSON.stringify(Y))})}});return v.useEffect(()=>{Oe.listAccounts().then(B=>{s(B.accounts),B.currentAccountId&&r(B.accounts.find(z=>z.id===B.currentAccountId)),o(!1)}).catch(B=>{c(B.message),o(!1)})},[m]),k.jsxs(q,{children:[k.jsx(gr,{background:"buttonGlass"}),k.jsxs(q,{marginBottom:"5",gap:"4",flexDirection:"column",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your connected (linked) accounts"}),n&&k.jsx(k.Fragment,{children:n.map(B=>k.jsxs(q,{flexDirection:"row",alignItems:"center",gap:"2",children:[k.jsx(ue,{variant:"normal",color:"text100",children:XL(B)}),B.id!==(e==null?void 0:e.id)&&k.jsx(ut,{size:"xs",label:"Remove",onClick:()=>A(B.id)}),B.id===(e==null?void 0:e.id)&&k.jsx(q,{children:k.jsx(ue,{variant:"small",color:"text100",children:"(Account you logged in with)"})})]},B.id))}),i&&k.jsx(Bn,{})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsxs(q,{flexDirection:"column",gap:"2",width:"fit",children:[k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",marginBottom:"5",children:"Connect (link) another login method"}),k.jsx(Z9,{onSuccess:O,shape:"circle",width:230}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(r7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:_,usePopup:!0},onError:B=>console.error(B),onSuccess:C,uiType:"dark"}),k.jsxs(k.Fragment,{children:[k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(q,{marginTop:"2",children:k.jsx(q,{children:k.jsx(ut,{label:"Login with Google (through Playfab)",onClick:j})})})]}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(q,{marginTop:"2",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Email"})}),w?k.jsxs(q,{flexDirection:"column",children:[k.jsx(q,{marginTop:"3",children:k.jsx(ue,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),k.jsx(q,{marginTop:"4",children:k.jsx(lY,{value:y,digits:6,onChange:g})}),k.jsx(q,{gap:"2",marginY:"4",children:x?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:y.includes(""),label:"Verify",onClick:()=>w(y.join("")),"data-id":"verifyButton"})})]}):k.jsxs(q,{marginBottom:"4",children:[k.jsxs(ue,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",k.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),k.jsxs(q,{marginTop:"6",children:[k.jsx(sr,{name:"email",type:"email",onChange:B=>{u(B.target.value)},ref:f,onKeyDown:B=>{l&&B.key==="Enter"&&b(l)},onBlur:()=>p(!!l&&!d),value:l,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),h&&k.jsx(ue,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:x?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:!d,label:"Continue",onClick:()=>b(l),"data-id":"continueButton"})})]})]}),a&&k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Error loading accounts: ",a]})]})}function dpe(){const[t,e]=v.useState(),[r,n]=v.useState(),[s,i]=v.useState([]),[o,a]=v.useState(!1),[c,l]=v.useState(!1),[u,f]=v.useState(),[d,h]=v.useState();return v.useEffect(()=>{Oe.getAddress().then(p=>{e(p)}).catch(p=>{n(p.message)}),Oe.listAccounts().then(p=>{p.currentAccountId&&h(p.accounts.find(y=>y.id===p.currentAccountId))})},[]),v.useEffect(()=>{Oe.isSignedIn().then(p=>{p||oi.navigate("/login")})},[]),v.useEffect(()=>{const p=s.join("");p.length===6&&(l(!0),Oe.finishValidateSession(p))},[s]),v.useEffect(()=>{const p=Oe.onValidationRequired(()=>{a(!0),Oe.waitForSessionValid(6e5,4e3).then(y=>{console.log("isValid",y),i([]),a(!1),l(!1)})});return()=>{p.then(y=>y())}},[]),k.jsxs(k.Fragment,{children:[k.jsx(yS,{children:o&&k.jsx(PN,{children:k.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1.2em",height:"50vh"},children:k.jsxs(q,{flexDirection:"column",alignItems:"center",children:[k.jsx(ue,{marginBottom:"7",children:"Please enter the session verification code that was sent to your email"}),k.jsx(n7,{value:s,digits:6,onChange:i}),k.jsx(q,{marginTop:"5",children:c&&k.jsx(Bn,{})})]})})})}),k.jsxs(q,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[k.jsx(q,{marginBottom:"10",children:k.jsx(s7,{})}),k.jsxs(q,{marginBottom:"5",flexDirection:"row",children:[d&&k.jsxs(q,{flexDirection:"column",gap:"2",children:[k.jsxs(ue,{marginTop:"1",variant:"normal",color:"text100",children:[d.type===Ft.Guest?"Guest account":`Logged in with account type ${d.type}`," "]}),d.type!==Ft.Guest&&XL(d)]}),k.jsx(ut,{marginLeft:"auto",label:"Log out",size:"xs",onClick:async()=>{try{await Oe.dropSession({strict:!1})}catch(p){console.warn(`Could not drop session: ${p.message}`)}vee(),oi.navigate("/login")}})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(q,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your wallet address:"})}),k.jsx(q,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"normal",children:t?k.jsx(q,{children:k.jsx(ue,{children:t})}):k.jsx(Bn,{})})}),k.jsx(q,{children:r&&k.jsxs(ue,{children:["Error fetching wallet address: ",r]})}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(rpe,{}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(q,{marginBottom:"5",children:k.jsx(upe,{onNetworkChange:f})}),k.jsx(gr,{background:"buttonGlass"}),k.jsxs(_l,{marginY:"3",label:"Send native token transaction",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(tpe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Send ERC20 transaction",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(ipe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Send ERC1155 transaction",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(cpe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Sign a message",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(npe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Call contracts",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(spe,{network:u})]}),k.jsx(_l,{marginY:"3",label:"External Wallet Linking Demo",children:k.jsxs(ue,{as:"a",variant:"medium",color:"text100",href:"https://demo-waas-wallet-link.pages.dev/",target:"_blank",rel:"noopener noreferrer",children:["Go to demo",k.jsx(xG,{position:"relative",top:"1",marginLeft:"1"})]})}),k.jsx(fpe,{})]})]})}function hpe(t,e,r){return e=rj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z2(t,e){return vpe(t)||ype(t,e)||ZL(t,e)||ppe()}function ppe(){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 ype(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,s,i,o,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(u){l=!0,s=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw s}}return a}}function vpe(t){if(Array.isArray(t))return t}function mpe(t){return bpe(t)||xpe(t)||ZL(t)||gpe()}function gpe(){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 ZL(t,e){if(t){if(typeof t=="string")return H2(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 H2(t,e)}}function xpe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function bpe(t){if(Array.isArray(t))return H2(t)}function H2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--U){var F=this.tryEntries[U],X=F.completion;if(F.tryLoc==="root")return I("end");if(F.tryLoc<=this.prev){var oe=n.call(F,"catchLoc"),ae=n.call(F,"finallyLoc");if(oe&&ae){if(this.prev=0;--I){var U=this.tryEntries[I];if(U.tryLoc<=this.prev&&n.call(U,"finallyLoc")&&this.prev=0;--R){var I=this.tryEntries[R];if(I.finallyLoc===P)return this.complete(I.completion,I.afterLoc),Y(I),g}},catch:function(P){for(var R=this.tryEntries.length-1;R>=0;--R){var I=this.tryEntries[R];if(I.tryLoc===P){var U=I.completion;if(U.type==="throw"){var F=U.arg;Y(I)}return F}}throw new Error("illegal catch attempt")},delegateYield:function(P,R,I){return this.delegate={iterator:L(P),resultName:R,nextLoc:I},this.method==="next"&&(this.arg=t),g}},e}function Ls(t){"@babel/helpers - typeof";return Ls=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},Ls(t)}function wn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _8(t,e){for(var r=0;rv.useContext(Ak).isMounted,Qhe=()=>(_0(XL(),YL("useStytchSession")),v.useContext(JL)),Yhe=()=>{const t=v.useContext(Ak);return _0(t.isMounted,YL("useStytch")),t.client},Jhe=({stytch:t,children:e})=>{_0(!XL(),Hhe),_0(typeof window<"u",Ghe);const r=v.useMemo(()=>({client:t,isMounted:!0}),[t]),[{user:n,session:s},i]=zhe({session:t.session.getInfo(),user:t.user.getInfo()});return v.useEffect(()=>t.onStateChange(()=>{i(o=>{const a={session:t.session.getInfo(),user:t.user.getInfo()};return $he(o,a)})}),[i,t]),cr.createElement(Ak.Provider,{value:r},cr.createElement(Khe.Provider,{value:n},cr.createElement(JL.Provider,{value:s},e)))};function Xhe(){const t=Yhe(),{session:e}=Qhe(),[r,n]=v.useState(0),[s,i]=v.useState(""),o=v.useRef(null);v.useEffect(()=>{if(localStorage.getItem("stytch_auth")!=="native")return;const c=new URLSearchParams(window.location.search);c.get("stytch_token_type")==="magic_links"&&r===0&&(n(2),(async()=>await t.magicLinks.authenticate(c.get("token")||"",{session_duration_minutes:5}))())},[t,e,r]),v.useEffect(()=>{localStorage.getItem("stytch_auth")==="native"&&e&&r==2&&(n(3),(async()=>{const c=t.session.getTokens(),l=await Oe.signIn({idToken:c.session_jwt},fc());console.log(`Wallet address: ${l}`),await t.session.revoke(),n(0),window.location.search="",oi.navigate("/")})())},[e,t,r]);const a=async c=>{localStorage.setItem("stytch_auth","native"),n(1),await t.magicLinks.email.loginOrCreate(c,{})};return k.jsxs(q,{children:[k.jsx(q,{marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Stytch login"})}),k.jsxs(q,{marginTop:"5",marginBottom:"4",children:[k.jsx(q,{marginTop:"6",children:k.jsx(sr,{name:"stytchEmail",type:"email",onChange:c=>{i(c.target.value)},ref:o,onKeyDown:c=>{s&&c.key==="Enter"&&a(s)},value:s,placeholder:"hello@example.com",disabled:r!==0,required:!0})}),k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(ut,{variant:"primary",label:"Continue",onClick:()=>a(s),"data-id":"continueButton",disabled:r!==0})}),r===1&&k.jsx(q,{children:k.jsx(ue,{variant:"normal",color:"text80",children:"Magic link sent to your email. Please click the link. You can close this page."})})]})]})}function Zhe(){var B;const[t,e]=v.useState(""),r=v.useRef(null),n=(B=r.current)==null?void 0:B.validity.valid,[s,i]=v.useState(!1),[o,a]=v.useState([]),[c,l]=v.useState(),[u,f]=v.useState(!1),d=v.useRef(null);Oe.onEmailConflict(async($,Y)=>{d.current=Y,l($),f(!0)});const h=e7({flow:"implicit",onSuccess:$=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:$.access_token,CreateAccount:!0,TitleId:"8F854"},async(Y,H)=>{if(Y)try{const L=await Oe.signIn({playFabTitleId:"8F854",playFabSessionTicket:Y.data.SessionTicket},fc());console.log("Sequence response:",L),oi.navigate("/")}catch{console.error("Error: "+JSON.stringify(H))}else H&&console.error("Error: "+JSON.stringify(H))})}}),{inProgress:p,loading:y,initiateAuth:g,sendChallengeAnswer:m,cancel:x}=QL({sessionName:fc(),onSuccess:async({wallet:$})=>{console.log(`Wallet address: ${$}`),oi.navigate("/")}});v.useEffect(()=>{Oe.isSignedIn().then($=>{$||oi.navigate("/login")})},[]);const b=async $=>{const Y=await Oe.signIn({idToken:$.credential},fc());console.log(`Wallet address: ${Y.wallet}`),console.log(`Email address: ${Y.email}`),oi.navigate("/")},w="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":""),A=async $=>{const Y=await Oe.signIn({idToken:$.authorization.id_token},fc());console.log(`Wallet address: ${Y.wallet}`),console.log(`Email address: ${Y.email}`),oi.navigate("/")},O=async()=>{const $=await Oe.signIn({guest:!0},fc());console.log(`Wallet address: ${$.wallet}`),oi.navigate("/")},_=new URLSearchParams(window.location.search),C=_.get("env")==="dev",[j,V]=v.useState(C);return k.jsxs(k.Fragment,{children:[k.jsxs(q,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[k.jsxs(q,{marginBottom:"16",flexDirection:"row",children:[k.jsx(s7,{}),k.jsx(q,{marginLeft:"auto",children:k.jsx(TJ,{label:"Use dev env",checked:j,onCheckedChange:()=>{j?(_.delete("env"),window.location.search=_.toString()):(_.set("env","dev"),window.location.search=_.toString()),V(!j)}})})]}),k.jsx(q,{marginTop:"6",marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Guest Login"})}),k.jsx(q,{gap:"4",children:k.jsx(ut,{label:"Login as guest",onClick:O})}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(q,{marginTop:"6",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Email Login"})}),m?k.jsxs(q,{flexDirection:"column",children:[k.jsx(q,{marginTop:"6",children:k.jsx(ue,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),k.jsx(q,{marginTop:"4",children:k.jsx(n7,{value:o,digits:6,onChange:a})}),k.jsx(q,{gap:"2",marginY:"4",children:y?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:o.includes(""),label:"Verify",onClick:()=>m(o.join("")),"data-id":"verifyButton"})})]}):k.jsxs(q,{marginTop:"5",marginBottom:"4",children:[k.jsxs(ue,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",k.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),k.jsxs(q,{marginTop:"6",children:[k.jsx(sr,{name:"email",type:"email",onChange:$=>{e($.target.value)},ref:r,onKeyDown:$=>{t&&$.key==="Enter"&&g(t)},onBlur:()=>i(!!t&&!n),value:t,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),s&&k.jsx(ue,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:y?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:!n,label:"Continue",onClick:()=>g(t),"data-id":"continueButton"})})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(q,{paddingY:"4",gap:"4",flexDirection:"column",width:"full",children:!p&&k.jsxs(k.Fragment,{children:[k.jsx(q,{marginBottom:"2",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Social Login"})}),k.jsxs(q,{gap:"4",flexDirection:"column",width:"fit",children:[k.jsx(q,{children:k.jsx(Z9,{onSuccess:b,shape:"circle",width:230},"google")}),k.jsx(r7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:w,usePopup:!0},onError:$=>console.error($),onSuccess:A,uiType:"dark"},"apple")]}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsxs(q,{children:[k.jsx(q,{marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Playfab login"})}),k.jsx(q,{children:k.jsx(ut,{label:"Login with Google (through Playfab)",onClick:h})})]}),k.jsx(Xhe,{}),""]})})]}),u&&c&&k.jsx(PN,{size:"small",onClose:()=>f(!1),children:k.jsx(Bhe,{info:c,onCancel:()=>{f(!1),l(void 0),p&&(a([]),x(),e(""))},onConfirm:async()=>{var $;f(!1),l(void 0),await(($=d.current)==null?void 0:$.call(d))}})})]})}async function cg({transactions:t,network:e}){const r=await Oe.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 lg(t){var i;const{feeOptions:e,onSelected:r}=t,[n,s]=v.useState();return v.useEffect(()=>{e&&e.length>0&&(s(e[0]),r(e[0]))},[e]),v.useEffect(()=>{n&&r(n)},[n]),e?k.jsxs(q,{marginTop:"5",children:[k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options:"}),k.jsx(q,{marginTop:"3"}),k.jsx(Rm,{name:"chainId",labelLocation:"top",onValueChange:o=>{const a=e.find(c=>c.token.name===o);a&&s(a)},value:(i=n==null?void 0:n.token)==null?void 0:i.name,options:[...e.map(o=>{var a,c,l;return{label:k.jsx(q,{alignItems:"center",gap:"2",children:k.jsxs(ue,{children:[(a=o==null?void 0:o.token)==null?void 0:a.name," ",mC(o==null?void 0:o.value,(c=o==null?void 0:o.token)==null?void 0:c.decimals)]})}),value:String((l=o==null?void 0:o.token)==null?void 0:l.name)}})]})]}):k.jsx(q,{})}const epe="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function tpe(t){const[e,r]=v.useState(),[n,s]=v.useState("ETH"),[i,o]=v.useState(""),[a,c]=v.useState(""),[l,u]=v.useState(""),[f,d]=v.useState(),[h,p]=v.useState(!1),[y,g]=v.useState(),[m,x]=v.useState(),[b,w]=v.useState(),[A,O]=v.useState(),[_,C]=v.useState(!1);v.useEffect(()=>{j()},[]),v.useEffect(()=>{var $,Y;if(t.network){const H=fp(t.network.name);if(H){const L=H.name in{polygon:1,mumbai:1}?"MATIC":"ETH";s(L),j(),($=H.blockExplorer)!=null&&$.rootUrl&&o((Y=H.blockExplorer)==null?void 0:Y.rootUrl)}}},[t.network]);const j=async()=>{if(!t.network)return;const $=fp(t.network.name);if(!$)return;const Y=await Oe.getAddress(),L=await new KL(ND($.name),epe).getEtherBalance({accountAddress:Y});r(BigInt(L.balance.balanceWei))},V=async($,Y)=>{const H=await cg({transactions:[{to:$,value:E4(Y)}],network:t.network});if(H.feeQuote&&H.feeOptions){x(H.feeOptions),O(H.feeQuote),console.log("feeOptions",H);return}C(!0),console.log("tx sponsored")},B=async($,Y)=>{var H;try{g(void 0),p(!0);const L=await Oe.sendTransaction({transactions:[{to:$,value:E4(Y)}],network:(H=t.network)==null?void 0:H.id,transactionsFeeOption:b,transactionsFeeQuote:A});Ay(L)?d(L.data.txHash):g(L.data.error),p(!1)}catch(L){console.error(L),p(!1)}finally{O(void 0),x(void 0),w(void 0),C(!1)}};return k.jsxs(q,{children:[k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Native token balance: ",lte(e||0)," ",n]}),k.jsx(ut,{marginLeft:"2",size:"xs",label:"Fetch",onClick:j}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"sendNativeTokenTo",type:"text",onChange:$=>{c($.target.value)},value:a,placeholder:"To address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"sendNativeTokenAmount",type:"text",onChange:$=>{u($.target.value)},value:l,placeholder:"Amount",required:!0,"data-id":"nativeTokenSendAmount"})}),y&&k.jsxs(q,{marginTop:"3",children:["Transaction failed: ",y]}),k.jsx(lg,{feeOptions:m,onSelected:w}),_&&k.jsx(q,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h?k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(q,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:a===""&&l==="",onClick:()=>V(a,l)}),k.jsx(ut,{marginTop:"5",label:"Send native token",disabled:a===""&&l==="",onClick:()=>B(a,l)})]}),f&&k.jsxs(q,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Send native token transaction hash:"}),k.jsx("br",{}),k.jsx("a",{href:`${i}tx/${f}`,target:"_blank",rel:"noopener noreferrer",children:f})]})]})}function rpe(){const[t,e]=v.useState(),[r,n]=v.useState(),[s,i]=v.useState(!0),[o,a]=v.useState(),c=async l=>{i(!0),e(void 0);try{await Oe.dropSession({sessionId:l}),e(await Oe.listSessions())}catch(u){a(u.message),e(await Oe.listSessions())}i(!1)};return v.useEffect(()=>{Promise.all([Oe.listSessions(),Oe.getSessionId()]).then(([l,u])=>{e(l),n(u),i(!1)}).catch(l=>{a(l.message),i(!1)})},[]),k.jsxs(q,{children:[k.jsxs(q,{marginBottom:"5",children:[k.jsx(q,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your open sessions:"})}),t&&k.jsx(k.Fragment,{children:t.map(l=>k.jsx(q,{children:k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"normal",children:[l.friendlyName,!l.isThis&&k.jsx("a",{style:{marginLeft:"7px",textDecoration:"underline",cursor:"pointer"},onClick:()=>c(l.id),children:"x"}),l.isThis&&k.jsx(k.Fragment,{children:" (current)"})]})},l.id))}),s&&k.jsx(Bn,{})]}),o&&k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Error loading sessions: ",o]})]})}function npe(t){const[e,r]=v.useState(""),[n,s]=v.useState(),i=async()=>{var a;const o=await Oe.signMessage({message:e,network:(a=t.network)==null?void 0:a.id});s(o.data.signature)};return k.jsxs(q,{children:[k.jsx(sr,{name:"signMessageText",type:"text",onChange:o=>{r(o.target.value),n!=""&&s("")},value:e,placeholder:"Enter a message to sign",required:!0,"data-id":"signMessageInput"}),k.jsx(ut,{marginTop:"5",label:"Sign message",disabled:e==="",onClick:()=>i()}),n&&n!==""&&k.jsxs(q,{flexDirection:"column",marginTop:"5",children:[k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Signature for ",e,":"]}),k.jsx(q,{children:k.jsx(ue,{as:"p",wordBreak:"break-word",children:n})})]})]})}function spe(t){const[e,r]=v.useState(""),[n,s]=v.useState(""),[i,o]=v.useState(""),[a,c]=v.useState(""),[l,u]=v.useState(),[f,d]=v.useState(!1),[h,p]=v.useState(),[y,g]=v.useState(),[m,x]=v.useState(),[b,w]=v.useState(),[A,O]=v.useState(!1),[_,C]=v.useState("");v.useEffect(()=>{var B,$;if(t.network){const Y=fp(t.network.name);(B=Y==null?void 0:Y.blockExplorer)!=null&&B.rootUrl&&C(($=Y.blockExplorer)==null?void 0:$.rootUrl)}},[t.network]);const j=async()=>{const B=await cg({transactions:[bL({to:e,abi:n,func:i,args:JSON.parse(a),value:"0"})],network:t.network});if(B.feeQuote&&B.feeOptions){g(B.feeOptions),w(B.feeQuote),console.log("feeOptions",B);return}O(!0),console.log("tx sponsored")},V=async()=>{var B;try{p(void 0),d(!0);const $=await Oe.callContract({network:(B=t.network)==null?void 0:B.id,to:e,abi:n,func:i,args:JSON.parse(a),value:0,transactionsFeeOption:m,transactionsFeeQuote:b});Ay($)?u($.data.txHash):p($.data.error),d(!1)}catch($){console.error($),d(!1)}};return k.jsxs(q,{children:[k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"callContractAddress",type:"text",onChange:B=>{r(B.target.value)},value:e,placeholder:"Contract address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"callContractAbi",type:"text",onChange:B=>{s(B.target.value)},value:n,placeholder:"Contract ABI or function ABI, e.g. [{...}] or [{...}, {...}] or transfer(address,uint256)",required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"callContractMethod",type:"text",onChange:B=>{o(B.target.value)},value:i,placeholder:"Method name, e.g. transfer",required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{name:"callContractArgs",type:"text",onChange:B=>{c(B.target.value)},value:a,placeholder:'Method args, e.g. [0x..., 1000] or named { "to": "0x...", "amount": "1000" }',required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(lg,{feeOptions:y,onSelected:x}),A&&k.jsx(q,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h&&k.jsxs(q,{marginTop:"3",children:["Transaction failed: ",h]}),f?k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(q,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&n===""&&i===""&&a==="",onClick:()=>j()}),k.jsx(ut,{marginTop:"5",label:"Call contract",disabled:e===""&&n===""&&i===""&&a==="",onClick:()=>V()})]}),l&&k.jsxs(q,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Send native token transaction hash:"}),k.jsx("br",{}),k.jsx("a",{href:`${_}tx/${l}`,target:"_blank",rel:"noopener noreferrer",children:l})]})]})}const O8=[{label:"Custom Token",value:"Custom"},{label:"USDC Old",value:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"},{label:"USDC New",value:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},{label:"DAI",value:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"}];function ipe(t){const[e,r]=v.useState(O8[0].value),[n,s]=v.useState(""),[i,o]=v.useState(!0),[a,c]=v.useState("---"),[l,u]=v.useState(""),[f,d]=v.useState(""),[h,p]=v.useState(""),[y,g]=v.useState(""),[m,x]=v.useState(!1),[b,w]=v.useState(0),[A,O]=v.useState(),[_,C]=v.useState(),[j,V]=v.useState(),[B,$]=v.useState(!1),[Y,H]=v.useState("");v.useEffect(()=>{var I,U;if(t.network){const F=fp(t.network.name);(I=F==null?void 0:F.blockExplorer)!=null&&I.rootUrl&&H((U=F.blockExplorer)==null?void 0:U.rootUrl)}},[t.network]),v.useEffect(()=>{L(n)},[n]);const L=async I=>{var X;if(!tne(I)){c("---");return}c("...");const U=new wD(`https://nodes.sequence.app/${(X=t.network)==null?void 0:X.name}`),F=new Mu(I,["function balanceOf(address) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)"],U);try{const[oe,ae,ke]=await Promise.all([F.balanceOf(Oe.getAddress()),F.decimals(),F.symbol()]);w(ae),c(`${mC(oe,ae)} ${ke}`)}catch{c("---")}},T=async()=>{const I=await cg({transactions:[QA({token:n,to:l,value:Xh(f,b).toString()})],network:t.network});if(I.feeQuote&&I.feeOptions){O(I.feeOptions),V(I.feeQuote),console.log("feeOptions",I);return}$(!0),console.log("tx sponsored")},P=async()=>{var I;try{g(""),x(!0);const U=await Oe.sendERC20({token:n,to:l,value:Xh(f,b),network:(I=t.network)==null?void 0:I.id,transactionsFeeOption:_,transactionsFeeQuote:j});Ay(U)?p(U.data.txHash):g(U.data.error)}catch(U){console.error(U)}finally{x(!1)}},R=I=>{r(I),I==="Custom"?(s(""),o(!0)):(s(I),o(!1))};return k.jsxs(q,{children:[k.jsxs(q,{marginTop:"5",children:[k.jsx(Rm,{name:"token",options:O8,value:e??"",onValueChange:I=>R(I)}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{type:"text",value:n,disabled:!i,onChange:I=>s(I.target.value),placeholder:"Custom ERC20 Contract Address"})})]}),k.jsxs(q,{marginTop:"3",children:[k.jsxs(ue,{variant:"normal",color:"text100",children:["Token Balance: ",a]}),k.jsx(ut,{marginLeft:"2",size:"xs",label:"Fetch",onClick:()=>L(n)})]}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{type:"text",value:l,onChange:I=>u(I.target.value),placeholder:"Destination Address"})}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{type:"text",value:f,onChange:I=>d(I.target.value),placeholder:"Amount"})}),y&&k.jsx(q,{marginTop:"3",children:k.jsxs(ue,{color:"error",children:["Error: ",y]})}),k.jsx(lg,{feeOptions:A,onSelected:C}),B&&k.jsx(q,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),m?k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(q,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:n===""&&l==="",onClick:()=>T()}),k.jsx(ut,{marginTop:"5",label:"Send Token",onClick:P})]}),h&&k.jsxs(q,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),k.jsx("a",{href:`${Y}tx/${h}`,target:"_blank",rel:"noopener noreferrer",children:h})]})]})}const ope="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function ape(t){var a;const[e,r]=v.useState(""),[n,s]=v.useState("");v.useEffect(()=>{t.onChange(t.index,e,n)},[e,n]);const i={display:"flex",gap:"10px",marginBottom:"10px"},o={flex:1};return k.jsxs(q,{style:i,children:[k.jsx(q,{style:o,children:k.jsx(Rm,{name:`sendERC1155TokenId${t.index}`,value:e,disabled:!t.options,onValueChange:c=>{r(c)},options:((a=t.options)==null?void 0:a.balances.map(c=>{var l;return{label:`${((l=c.tokenMetadata)==null?void 0:l.name)||"Unknown"} - ${c.balance}`,value:c.tokenID}}))||[],placeholder:"Select a token"})}),k.jsx(q,{style:o,children:k.jsx(sr,{type:"text",value:e,onChange:c=>r(c.target.value),placeholder:"Token ID"})}),k.jsx(q,{style:o,children:k.jsx(sr,{type:"text",value:n,onChange:c=>s(c.target.value),placeholder:"Amount"})}),k.jsx(q,{style:o,children:k.jsx(ut,{label:"Remove",onClick:()=>t.removeTokenEntry(t.index)})})]})}function cpe(t){const[e,r]=v.useState(""),[n,s]=v.useState([]),[i,o]=v.useState(""),[a,c]=v.useState(""),[l,u]=v.useState(""),[f,d]=v.useState(!1),[h,p]=v.useState(void 0),[y,g]=v.useState(),[m,x]=v.useState(),[b,w]=v.useState(),[A,O]=v.useState(!1),[_,C]=v.useState("");v.useEffect(()=>{var L,T;if(t.network){const P=fp(t.network.name);(L=P==null?void 0:P.blockExplorer)!=null&&L.rootUrl&&C((T=P.blockExplorer)==null?void 0:T.rootUrl)}},[t.network]);const j=()=>{s([...n,{tokenId:"",amount:""}])},V=async()=>{if(!e||!t.network)return;const L=t.network.name,T=new KL("https://"+L+"-indexer.sequence.app",ope),P=e,R=await Oe.getAddress(),I=!0;p(await T.getTokenBalances({contractAddress:P,accountAddress:R,includeMetadata:I}))};v.useEffect(()=>{V()},[e]);const B=(L,T)=>{const P=[...n];P[L]=T,s(P)},$=L=>{const T=[...n];T.splice(L,1),s(T)},Y=async()=>{const L=await cg({transactions:[YA({to:i,token:e,values:n.map(T=>({id:T.tokenId,amount:Xh(T.amount,0)}))})],network:t.network});if(L.feeQuote&&L.feeOptions){g(L.feeOptions),w(L.feeQuote),console.log("feeOptions",L);return}O(!0),console.log("tx sponsored")},H=async()=>{var L;try{u(""),d(!0);const T=await Oe.sendERC1155({to:i,token:e,values:n.map(P=>({id:P.tokenId,amount:Xh(P.amount,0)})),network:(L=t.network)==null?void 0:L.id,transactionsFeeOption:m,transactionsFeeQuote:b});Ay(T)?c(T.data.txHash):u(T.data.error)}catch(T){console.error(T)}finally{d(!1)}};return k.jsxs(q,{children:[k.jsx(q,{marginBottom:"5",children:k.jsx(sr,{type:"text",value:e,onChange:L=>r(L.target.value),placeholder:"Token Contract Address"})}),k.jsx(q,{marginBottom:"5",children:k.jsx(ut,{label:"Fetch metadata",onClick:()=>V()})}),n.map((L,T)=>k.jsx(q,{marginBottom:"3",children:k.jsx(ape,{index:T,options:h,onChange:(P,R,I)=>B(P,{tokenId:R,amount:I}),removeTokenEntry:$})},T)),k.jsx(ut,{label:"Add Token",onClick:j}),k.jsx(q,{marginTop:"5",children:k.jsx(sr,{type:"text",value:i,onChange:L=>o(L.target.value),placeholder:"Destination Address"})}),l&&k.jsx(q,{marginTop:"3",children:k.jsxs(ue,{color:"error",children:["Error: ",l]})}),k.jsx(lg,{feeOptions:y,onSelected:x}),A&&k.jsx(q,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),f?k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(q,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&i===""&&n.length!==0,onClick:()=>Y()}),k.jsx(ut,{marginTop:"5",label:"Send Tokens",onClick:H})]}),a&&k.jsxs(q,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),k.jsx("a",{href:`${_}tx/${a}`,target:"_blank",rel:"noopener noreferrer",children:a})]})]})}const Ue={AMOY:80002,APE_CHAIN_TESTNET:33111,ARBITRUM:42161,ARBITRUM_GOERLI:421613,ARBITRUM_NOVA:42170,ARBITRUM_SEPOLIA:421614,AVALANCHE:43114,AVALANCHE_TESTNET:43113,BASE:8453,BASE_GOERLI:84531,BASE_SEPOLIA:84532,B3_SEPOLIA:1993,BLAST:81457,BLAST_SEPOLIA:168587773,BORNE_TESTNET:94984,BSC:56,BSC_TESTNET:97,FANTOM:250,FANTOM_TESTNET:4002,GNOSIS:100,GOERLI:5,HOMEVERSE:19011,HOMEVERSE_TESTNET:40875,IMMUTABLE_ZKEVM:13371,IMMUTABLE_ZKEVM_TESTNET:13473,KOVAN:42,MAINNET:1,OPTIMISM:10,OPTIMISM_SEPOLIA:11155420,OPTIMISM_TESTNET:69,POLYGON:137,POLYGON_MUMBAI:80001,POLYGON_ZKEVM:1101,RINKEBY:4,ROPSTEN:3,SEPOLIA:11155111,ASTAR_ZKEVM:3776,ASTAR_ZKYOTO:6038361,XAI:660279,XAI_SEPOLIA:37714555429,XR_SEPOLIA:2730},lpe={[Ue.MAINNET]:"https://assets.sequence.info/images/networks/small/1.webp",[Ue.ROPSTEN]:"https://assets.sequence.info/images/networks/small/3.webp",[Ue.GOERLI]:"https://assets.sequence.info/images/networks/small/5.webp",[Ue.KOVAN]:"https://assets.sequence.info/images/networks/small/42.webp",[Ue.OPTIMISM]:"https://assets.sequence.info/images/networks/small/10.webp",[Ue.OPTIMISM_TESTNET]:"https://assets.sequence.info/images/networks/small/69.webp",[Ue.OPTIMISM_SEPOLIA]:"https://assets.sequence.info/images/networks/small/11155420.webp",[Ue.POLYGON]:"https://assets.sequence.info/images/networks/small/137.webp",[Ue.POLYGON_MUMBAI]:"https://assets.sequence.info/images/networks/small/80001.webp",[Ue.POLYGON_ZKEVM]:"https://assets.sequence.info/images/networks/small/1101.webp",[Ue.APE_CHAIN_TESTNET]:"https://assets.sequence.info/images/networks/small/33111.webp",[Ue.ARBITRUM]:"https://assets.sequence.info/images/networks/small/42161.webp",[Ue.ARBITRUM_NOVA]:"https://assets.sequence.info/images/networks/small/42170.webp",[Ue.ARBITRUM_GOERLI]:"https://assets.sequence.info/images/networks/small/421613.webp",[Ue.ARBITRUM_SEPOLIA]:"https://assets.sequence.info/images/networks/small/421614.webp",[Ue.GNOSIS]:"https://assets.sequence.info/images/networks/small/100.webp",[Ue.BSC]:"https://assets.sequence.info/images/networks/small/56.webp",[Ue.BSC_TESTNET]:"https://assets.sequence.info/images/networks/small/97.webp",[Ue.FANTOM]:"https://assets.sequence.info/images/networks/small/250.webp",[Ue.FANTOM_TESTNET]:"https://assets.sequence.info/images/networks/small/4002.webp",[Ue.AVALANCHE]:"https://assets.sequence.info/images/networks/small/43114.webp",[Ue.AVALANCHE_TESTNET]:"https://assets.sequence.info/images/networks/small/43113.webp",[Ue.BASE]:"https://assets.sequence.info/images/networks/small/8453.webp",[Ue.BASE_SEPOLIA]:"https://assets.sequence.info/images/networks/small/84532.webp",[Ue.BORNE_TESTNET]:"https://assets.sequence.info/images/networks/small/94984.webp",[Ue.BLAST]:"https://assets.sequence.info/images/networks/small/81457.webp",[Ue.BLAST_SEPOLIA]:"https://assets.sequence.info/images/networks/small/168587773.webp",[Ue.SEPOLIA]:"https://assets.sequence.info/images/networks/small/11155111.webp",[Ue.AMOY]:"https://assets.sequence.info/images/networks/small/80002.webp",[Ue.HOMEVERSE]:"https://assets.sequence.info/images/networks/small/19011.webp",[Ue.HOMEVERSE_TESTNET]:"https://assets.sequence.info/images/networks/small/40875.webp",[Ue.IMMUTABLE_ZKEVM]:"https://assets.sequence.info/images/networks/small/13371.webp",[Ue.IMMUTABLE_ZKEVM_TESTNET]:"https://assets.sequence.info/images/networks/small/13473.webp",[Ue.XAI]:"https://assets.sequence.info/images/networks/small/660279.webp",[Ue.XAI_SEPOLIA]:"https://assets.sequence.info/images/networks/small/37714555429.webp",[Ue.ASTAR_ZKEVM]:"https://assets.sequence.info/images/networks/small/3776.webp",[Ue.ASTAR_ZKYOTO]:"https://assets.sequence.info/images/networks/small/6038361.webp",[Ue.B3_SEPOLIA]:"https://assets.sequence.info/images/networks/small/1993.webp",[Ue.XR_SEPOLIA]:"https://assets.sequence.info/images/networks/small/2730.webp"};function upe({onNetworkChange:t}){const[e,r]=v.useState(),[n,s]=v.useState([]);return v.useEffect(()=>{Oe.networkList().then(i=>{s(i),r(i[0]),t(i[0])})},[]),n.length===0?k.jsx(q,{marginY:"5",children:k.jsx(Bn,{})}):k.jsxs(q,{marginBottom:"4",children:[k.jsx(q,{marginBottom:"4",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Network to use with requests:"})}),k.jsx(q,{children:k.jsx(Rm,{name:"chainId",labelLocation:"top",onValueChange:i=>{const o=n==null?void 0:n.find(a=>a.name===i);o&&(r(o),t(o))},value:e==null?void 0:e.name,options:[...n.map(i=>({label:k.jsxs(q,{alignItems:"center",gap:"2",children:[k.jsx(gX,{src:lpe[i.id],size:"sm"}),k.jsx(ue,{children:i.name})]}),value:String(i.name)}))]})})]})}function ZL(t){var e;if(t.type===Ft.Email)return k.jsxs(ue,{variant:"normal",color:"text100",children:["Email (",t.email,")"]});if(t.type===Ft.Guest)return k.jsx(ue,{variant:"normal",color:"text100",children:"Guest account"});if(t.type===Ft.PlayFab)return k.jsxs(ue,{variant:"normal",color:"text100",children:["PlayFab (",t.email,")"]});if(t.type===Ft.OIDC&&(e=t.issuer)!=null&&e.includes("cognito-idp"))return k.jsxs(ue,{variant:"normal",color:"text100",children:["Email Legacy (",t.email,")"]});if(t.type===Ft.Stytch)return k.jsxs(k.Fragment,{children:["Stytch account (",t.email,")"]});switch(t.issuer){case"https://accounts.google.com":return k.jsxs(q,{gap:"2",marginTop:"2",children:[k.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="}),k.jsxs(ue,{variant:"normal",color:"text100",children:["Google (",t.email,")"]})]});case"https://appleid.apple.com":return k.jsxs(q,{gap:"2",children:[k.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="}),k.jsxs(ue,{variant:"normal",color:"text100",children:["Apple (",t.email,")"]})]});default:return"Unknown"}}function fpe(){var V;const t=M9(),[e,r]=v.useState(),[n,s]=v.useState(),[i,o]=v.useState(!0),[a,c]=v.useState(),[l,u]=v.useState(""),f=v.useRef(null),d=(V=f.current)==null?void 0:V.validity.valid,[h,p]=v.useState(!1),[y,g]=v.useState([]),{inProgress:m,loading:x,initiateAuth:b,sendChallengeAnswer:w}=QL({sessionName:fc(),onSuccess:async({wallet:B})=>{console.log(`Wallet address: ${B}`)},linkAccount:!0}),A=async B=>{o(!0),s(void 0);try{await Oe.removeAccount(B);const $=await Oe.listAccounts();s($.accounts)}catch($){c($.message);const Y=await Oe.listAccounts();s(Y.accounts)}o(!1)},O=async B=>{const $=await Oe.initAuth({idToken:B.credential});try{const Y=await Oe.linkAccount($);s(H=>[...H||[],Y.account])}catch(Y){vv(Y)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},_="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":"/"),C=async B=>{const $=await Oe.initAuth({idToken:B.authorization.id_token});try{const Y=await Oe.linkAccount($);s(H=>[...H||[],Y.account])}catch(Y){vv(Y)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},j=e7({flow:"implicit",onSuccess:B=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:B.access_token,CreateAccount:!0,TitleId:"8F854"},async($,Y)=>{if($)try{const H=await Oe.initAuth({playFabTitleId:"8F854",playFabSessionTicket:$.data.SessionTicket}),L=await Oe.linkAccount(H);console.log("playfab account",JSON.stringify(L.account,null,2)),s(T=>[...T||[],L.account])}catch(H){console.error(H),vv(H)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}else Y&&console.log("Error: "+JSON.stringify(Y))})}});return v.useEffect(()=>{Oe.listAccounts().then(B=>{s(B.accounts),B.currentAccountId&&r(B.accounts.find($=>$.id===B.currentAccountId)),o(!1)}).catch(B=>{c(B.message),o(!1)})},[m]),k.jsxs(q,{children:[k.jsx(gr,{background:"buttonGlass"}),k.jsxs(q,{marginBottom:"5",gap:"4",flexDirection:"column",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your connected (linked) accounts"}),n&&k.jsx(k.Fragment,{children:n.map(B=>k.jsxs(q,{flexDirection:"row",alignItems:"center",gap:"2",children:[k.jsx(ue,{variant:"normal",color:"text100",children:ZL(B)}),B.id!==(e==null?void 0:e.id)&&k.jsx(ut,{size:"xs",label:"Remove",onClick:()=>A(B.id)}),B.id===(e==null?void 0:e.id)&&k.jsx(q,{children:k.jsx(ue,{variant:"small",color:"text100",children:"(Account you logged in with)"})})]},B.id))}),i&&k.jsx(Bn,{})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsxs(q,{flexDirection:"column",gap:"2",width:"fit",children:[k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",marginBottom:"5",children:"Connect (link) another login method"}),k.jsx(Z9,{onSuccess:O,shape:"circle",width:230}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(r7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:_,usePopup:!0},onError:B=>console.error(B),onSuccess:C,uiType:"dark"}),k.jsxs(k.Fragment,{children:[k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(q,{marginTop:"2",children:k.jsx(q,{children:k.jsx(ut,{label:"Login with Google (through Playfab)",onClick:j})})})]}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(q,{marginTop:"2",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Email"})}),w?k.jsxs(q,{flexDirection:"column",children:[k.jsx(q,{marginTop:"3",children:k.jsx(ue,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),k.jsx(q,{marginTop:"4",children:k.jsx(uY,{value:y,digits:6,onChange:g})}),k.jsx(q,{gap:"2",marginY:"4",children:x?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:y.includes(""),label:"Verify",onClick:()=>w(y.join("")),"data-id":"verifyButton"})})]}):k.jsxs(q,{marginBottom:"4",children:[k.jsxs(ue,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",k.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),k.jsxs(q,{marginTop:"6",children:[k.jsx(sr,{name:"email",type:"email",onChange:B=>{u(B.target.value)},ref:f,onKeyDown:B=>{l&&B.key==="Enter"&&b(l)},onBlur:()=>p(!!l&&!d),value:l,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),h&&k.jsx(ue,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),k.jsx(q,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:x?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:!d,label:"Continue",onClick:()=>b(l),"data-id":"continueButton"})})]})]}),a&&k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Error loading accounts: ",a]})]})}function dpe(){const[t,e]=v.useState(),[r,n]=v.useState(),[s,i]=v.useState([]),[o,a]=v.useState(!1),[c,l]=v.useState(!1),[u,f]=v.useState(),[d,h]=v.useState();return v.useEffect(()=>{Oe.getAddress().then(p=>{e(p)}).catch(p=>{n(p.message)}),Oe.listAccounts().then(p=>{p.currentAccountId&&h(p.accounts.find(y=>y.id===p.currentAccountId))})},[]),v.useEffect(()=>{Oe.isSignedIn().then(p=>{p||oi.navigate("/login")})},[]),v.useEffect(()=>{const p=s.join("");p.length===6&&(l(!0),Oe.finishValidateSession(p))},[s]),v.useEffect(()=>{const p=Oe.onValidationRequired(()=>{a(!0),Oe.waitForSessionValid(6e5,4e3).then(y=>{console.log("isValid",y),i([]),a(!1),l(!1)})});return()=>{p.then(y=>y())}},[]),k.jsxs(k.Fragment,{children:[k.jsx(yS,{children:o&&k.jsx(PN,{children:k.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1.2em",height:"50vh"},children:k.jsxs(q,{flexDirection:"column",alignItems:"center",children:[k.jsx(ue,{marginBottom:"7",children:"Please enter the session verification code that was sent to your email"}),k.jsx(n7,{value:s,digits:6,onChange:i}),k.jsx(q,{marginTop:"5",children:c&&k.jsx(Bn,{})})]})})})}),k.jsxs(q,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[k.jsx(q,{marginBottom:"10",children:k.jsx(s7,{})}),k.jsxs(q,{marginBottom:"5",flexDirection:"row",children:[d&&k.jsxs(q,{flexDirection:"column",gap:"2",children:[k.jsxs(ue,{marginTop:"1",variant:"normal",color:"text100",children:[d.type===Ft.Guest?"Guest account":`Logged in with account type ${d.type}`," "]}),d.type!==Ft.Guest&&ZL(d)]}),k.jsx(ut,{marginLeft:"auto",label:"Log out",size:"xs",onClick:async()=>{try{await Oe.dropSession({strict:!1})}catch(p){console.warn(`Could not drop session: ${p.message}`)}mee(),oi.navigate("/login")}})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(q,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your wallet address:"})}),k.jsx(q,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"normal",children:t?k.jsx(q,{children:k.jsx(ue,{children:t})}):k.jsx(Bn,{})})}),k.jsx(q,{children:r&&k.jsxs(ue,{children:["Error fetching wallet address: ",r]})}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(rpe,{}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(q,{marginBottom:"5",children:k.jsx(upe,{onNetworkChange:f})}),k.jsx(gr,{background:"buttonGlass"}),k.jsxs(_l,{marginY:"3",label:"Send native token transaction",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(tpe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Send ERC20 transaction",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(ipe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Send ERC1155 transaction",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(cpe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Sign a message",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(npe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Call contracts",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(spe,{network:u})]}),k.jsx(_l,{marginY:"3",label:"External Wallet Linking Demo",children:k.jsxs(ue,{as:"a",variant:"medium",color:"text100",href:"https://demo-waas-wallet-link.pages.dev/",target:"_blank",rel:"noopener noreferrer",children:["Go to demo",k.jsx(bG,{position:"relative",top:"1",marginLeft:"1"})]})}),k.jsx(fpe,{})]})]})}function hpe(t,e,r){return e=nj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z2(t,e){return vpe(t)||ype(t,e)||ej(t,e)||ppe()}function ppe(){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 ype(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,s,i,o,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(u){l=!0,s=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw s}}return a}}function vpe(t){if(Array.isArray(t))return t}function mpe(t){return bpe(t)||xpe(t)||ej(t)||gpe()}function gpe(){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 ej(t,e){if(t){if(typeof t=="string")return H2(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 H2(t,e)}}function xpe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function bpe(t){if(Array.isArray(t))return H2(t)}function H2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--U){var F=this.tryEntries[U],X=F.completion;if(F.tryLoc==="root")return I("end");if(F.tryLoc<=this.prev){var oe=n.call(F,"catchLoc"),ae=n.call(F,"finallyLoc");if(oe&&ae){if(this.prev=0;--I){var U=this.tryEntries[I];if(U.tryLoc<=this.prev&&n.call(U,"finallyLoc")&&this.prev=0;--R){var I=this.tryEntries[R];if(I.finallyLoc===P)return this.complete(I.completion,I.afterLoc),Y(I),g}},catch:function(P){for(var R=this.tryEntries.length-1;R>=0;--R){var I=this.tryEntries[R];if(I.tryLoc===P){var U=I.completion;if(U.type==="throw"){var F=U.arg;Y(I)}return F}}throw new Error("illegal catch attempt")},delegateYield:function(P,R,I){return this.delegate={iterator:L(P),resultName:R,nextLoc:I},this.method==="next"&&(this.arg=t),g}},e}function Ls(t){"@babel/helpers - typeof";return Ls=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},Ls(t)}function wn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _8(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:s}}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 i=!0,o=!1,a;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return i=l.done,l},e:function(l){o=!0,a=l},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function oj(t,e){if(t){if(typeof t=="string")return $8(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 $8(t,e)}}function $8(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--U){var F=this.tryEntries[U],X=F.completion;if(F.tryLoc==="root")return I("end");if(F.tryLoc<=this.prev){var oe=n.call(F,"catchLoc"),ae=n.call(F,"finallyLoc");if(oe&&ae){if(this.prev=0;--I){var U=this.tryEntries[I];if(U.tryLoc<=this.prev&&n.call(U,"finallyLoc")&&this.prev=0;--R){var I=this.tryEntries[R];if(I.finallyLoc===P)return this.complete(I.completion,I.afterLoc),Y(I),g}},catch:function(P){for(var R=this.tryEntries.length-1;R>=0;--R){var I=this.tryEntries[R];if(I.tryLoc===P){var U=I.completion;if(U.type==="throw"){var F=U.arg;Y(I)}return F}}throw new Error("illegal catch attempt")},delegateYield:function(P,R,I){return this.delegate={iterator:L(P),resultName:R,nextLoc:I},this.method==="next"&&(this.arg=t),g}},e}function z8(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:0,r=(yr[t[e+0]]+yr[t[e+1]]+yr[t[e+2]]+yr[t[e+3]]+"-"+yr[t[e+4]]+yr[t[e+5]]+"-"+yr[t[e+6]]+yr[t[e+7]]+"-"+yr[t[e+8]]+yr[t[e+9]]+"-"+yr[t[e+10]]+yr[t[e+11]]+yr[t[e+12]]+yr[t[e+13]]+yr[t[e+14]]+yr[t[e+15]]).toLowerCase();if(!Xpe(r))throw TypeError("Stringified UUID is invalid");return r}function Ik(t,e,r){t=t||{};var n=t.random||(t.rng||Ype)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Zpe(n)}var O1={};function Ok(t,e){return be(this,void 0,void 0,Z().mark(function r(){return Z().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(O1[t]===void 0){s.next=2;break}return s.abrupt("return",O1[t]);case 2:return O1[t]=eye(t,e),s.abrupt("return",O1[t]);case 4:case"end":return s.stop()}},r)}))}function eye(t,e){return new Promise(function(r,n){var s=rye(t);if(s&&s.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 i=nye(t);i.addEventListener("load",function(){i.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)))}}),i.addEventListener("error",function(o){n(new Error("".concat(t," could not be loaded: ").concat(o)))})})}var tye=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]'))};function rye(t){var e=tye(t);if(e[0])return e[0]}function nye(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 ob=["[Stytch]"],sye=!1,xi={debug:function(){return sye},log:function(){for(var e,r=arguments.length,n=new Array(r),s=0;s=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:s}}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 i=!0,o=!1,a;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return i=l.done,l},e:function(l){o=!0,a=l},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function aj(t,e){if(t){if(typeof t=="string")return $8(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 $8(t,e)}}function $8(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--U){var F=this.tryEntries[U],X=F.completion;if(F.tryLoc==="root")return I("end");if(F.tryLoc<=this.prev){var oe=n.call(F,"catchLoc"),ae=n.call(F,"finallyLoc");if(oe&&ae){if(this.prev=0;--I){var U=this.tryEntries[I];if(U.tryLoc<=this.prev&&n.call(U,"finallyLoc")&&this.prev=0;--R){var I=this.tryEntries[R];if(I.finallyLoc===P)return this.complete(I.completion,I.afterLoc),Y(I),g}},catch:function(P){for(var R=this.tryEntries.length-1;R>=0;--R){var I=this.tryEntries[R];if(I.tryLoc===P){var U=I.completion;if(U.type==="throw"){var F=U.arg;Y(I)}return F}}throw new Error("illegal catch attempt")},delegateYield:function(P,R,I){return this.delegate={iterator:L(P),resultName:R,nextLoc:I},this.method==="next"&&(this.arg=t),g}},e}function z8(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:0,r=(yr[t[e+0]]+yr[t[e+1]]+yr[t[e+2]]+yr[t[e+3]]+"-"+yr[t[e+4]]+yr[t[e+5]]+"-"+yr[t[e+6]]+yr[t[e+7]]+"-"+yr[t[e+8]]+yr[t[e+9]]+"-"+yr[t[e+10]]+yr[t[e+11]]+yr[t[e+12]]+yr[t[e+13]]+yr[t[e+14]]+yr[t[e+15]]).toLowerCase();if(!Xpe(r))throw TypeError("Stringified UUID is invalid");return r}function Ik(t,e,r){t=t||{};var n=t.random||(t.rng||Ype)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Zpe(n)}var O1={};function Ok(t,e){return be(this,void 0,void 0,Z().mark(function r(){return Z().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(O1[t]===void 0){s.next=2;break}return s.abrupt("return",O1[t]);case 2:return O1[t]=eye(t,e),s.abrupt("return",O1[t]);case 4:case"end":return s.stop()}},r)}))}function eye(t,e){return new Promise(function(r,n){var s=rye(t);if(s&&s.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 i=nye(t);i.addEventListener("load",function(){i.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)))}}),i.addEventListener("error",function(o){n(new Error("".concat(t," could not be loaded: ").concat(o)))})})}var tye=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]'))};function rye(t){var e=tye(t);if(e[0])return e[0]}function nye(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 ob=["[Stytch]"],sye=!1,xi={debug:function(){return sye},log:function(){for(var e,r=arguments.length,n=new Array(r),s=0;s"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"))},aye=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:Gpe},uj=function(e){return e.includes("public-token-test")},cye=function(){return"event-id-".concat(Ik())},lye=function(){return"app-session-id-".concat(Ik())},uye=function(){return"persistent-id-".concat(Ik())},Tt=function(e){var r={isObject:function(s,i){var o=Ei(i)==="object"&&!Array.isArray(i)&&i!==null;if(!o)throw new Gl(e,s+" must be an object.");return r},isOptionalObject:function(s,i){return typeof i>"u"?r:r.isObject(s,i)},isString:function(s,i){if(typeof i!="string")throw new Gl(e,s+" must be a string.");return r},isOptionalString:function(s,i){return typeof i>"u"?r:r.isString(s,i)},isStringArray:function(s,i){if(!Array.isArray(i))throw new Gl(e,s+" must be an array of strings.");var o=ij(i),a;try{for(o.s();!(a=o.n()).done;){var c=a.value;if(typeof c!="string")throw new Gl(e,s+" must be an array of strings.")}}catch(l){o.e(l)}finally{o.f()}return r},isOptionalStringArray:function(s,i){return typeof i>"u"?r:r.isStringArray(s,i)},isNumber:function(s,i){if(typeof i!="number")throw new Gl(e,s+" must be a number.");return r},isOptionalNumber:function(s,i){return typeof i>"u"?r:r.isNumber(s,i)},isBoolean:function(s,i){if(typeof i!="boolean")throw new Gl(e,s+" must be a boolean.");return r},isOptionalBoolean:function(s,i){return typeof i>"u"?r:r.isBoolean(s,i)}};return r},Ys=function(e){var r=cj(e,["request_id","status_code"]);return r},qt=function(e){var r=cj(e,["__user"]);return r},fye=function(){return Ok("".concat(qpe,"/telemetry.js"),function(){return window.GetTelemetryID})},dye=Or(function t(e,r,n){var s=this,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return Promise.resolve(void 0)};_r(this,t),this.bootstrapPromise=n,this.isEnabled=function(){return be(s,void 0,void 0,Z().mark(function o(){return Z().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.state.then(function(l){return l.enabled}));case 1:case"end":return c.stop()}},o,this)}))},this.getTelemetryID=function(){return be(s,void 0,void 0,Z().mark(function o(){var a,c,l,u;return Z().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.state;case 2:if(a=d.sent,c=a.publicToken,l=a.enabled,u=a.dfpBackendURL,l){d.next=8;break}return d.abrupt("return",void 0);case 8:return d.next=10,window.GetTelemetryID(c,"".concat(u,"/submit"));case 10:return d.abrupt("return",d.sent);case 11:case"end":return d.stop()}},o,this)}))},this.getDFPTelemetryIDAndCaptcha=function(){return be(s,void 0,void 0,Z().mark(function o(){var a,c,l,u,f,d;return Z().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,this.state;case 2:if(a=p.sent,c=a.enabled,l=a.executeRecaptcha,u=a.mode,f=void 0,d=void 0,c){p.next=12;break}return p.next=11,l();case 11:d=p.sent;case 12:if(u!=="DECISIONING"){p.next=18;break}return p.next=15,this.getTelemetryID();case 15:f=p.sent,p.next=25;break;case 18:if(u!=="OBSERVATION"){p.next=25;break}return p.next=21,this.getTelemetryID();case 21:return f=p.sent,p.next=24,l();case 24:d=p.sent;case 25:return p.abrupt("return",{dfp_telemetry_id:f,captcha_token:d});case 26:case"end":return p.stop()}},o,this)}))},this.retryWithCaptchaAndDFP=function(o,a){return be(s,void 0,void 0,Z().mark(function c(){var l,u,f;return Z().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,this.state;case 2:if(l=h.sent,u=l.enabled,f=l.executeRecaptcha,!(o.type===M0.RequiredCatcha&&u)){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,f();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()}},c,this)}))},this.state=n.then(function(o){return be(s,void 0,void 0,Z().mark(function a(){return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(o.runDFPProtectedAuth){l.next=2;break}return l.abrupt("return",{publicToken:e,dfpBackendURL:r,enabled:!1,loaded:!1,executeRecaptcha:i});case 2:return l.next=4,fye();case 4:return l.abrupt("return",{publicToken:e,dfpBackendURL:r,enabled:!0,mode:o.dfpProtectedAuthMode||"OBSERVATION",loaded:!0,executeRecaptcha:i});case 5:case"end":return l.stop()}},a)}))})}),hye=function(){function t(){_r(this,t)}return Or(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 s=new r(n);return Object.assign(s,n),Object.setPrototypeOf(s,r.prototype),s}},{key:"unmarshall",value:function(r){if("name"in r)switch(r.name){case"SDKAPIUnreachableError":return t.inflate(kpe,r);case"StytchSDKSchemaError":return t.inflate(Tpe,r);case"StytchAPIUnreachableError":return t.inflate(Ql,r);case"StytchAPISchemaError":return t.inflate(nj,r);case"StytchSDKAPIError":return t.inflate(Ppe,r);case"StytchAPIError":return t.inflate(sj,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}(),pye=15,yye=800,vye=function(){function t(e){_r(this,t),this.maxBatchSize=e.maxBatchSize,this.logEventURL=e.logEventURL,setInterval(this.flush.bind(this),e.intervalDurationMs),this.batch=[]}return Or(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 be(this,void 0,void 0,Z().mark(function r(){var n;return Z().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(this.batch.length){i.next=2;break}return i.abrupt("return");case 2:return n=this.batch,this.batch=[],i.prev=4,i.next=7,fetch(this.logEventURL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});case 7:i.next=11;break;case 9:i.prev=9,i.t0=i.catch(4);case 11:case"end":return i.stop()}},r,this,[[4,9]])}))}}]),t}(),H8;(function(t){t.LoginOrCreateEML="login_or_create_eml",t.LoginOrCreateOTP="login_or_create_otp",t.ResetPassword="reset_password"})(H8||(H8={}));var mye=Or(function t(e,r){var n=this;_r(this,t),this._networkClient=e,this._subscriptionService=r,this.get=function(){return be(n,void 0,void 0,Z().mark(function s(){var i,o;return Z().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/me",errorMessage:"Failed to retrieve user info.",method:"GET"});case 2:return i=c.sent,o=Ys(i),this._subscriptionService.updateUser(o),c.abrupt("return",o);case 6:case"end":return c.stop()}},s,this)}))},this.getSync=function(){return n._subscriptionService.getUser()},this.getInfo=function(){return{user:n.getSync(),fromCache:n._subscriptionService.getFromCache()}},this.update=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.user.update").isOptionalObject("untrusted_metadata",s.untrusted_metadata),l.next=3,this._networkClient.fetchSDK({url:"/users/me",body:s,errorMessage:"Failed to update user.",method:"PUT"});case 3:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 7:case"end":return l.stop()}},i,this)}))},this.deleteEmail=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/emails/".concat(s),errorMessage:"Failed to delete email.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deletePhoneNumber=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/phone_numbers/".concat(s),errorMessage:"Failed to delete phone number.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deleteTOTP=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/totps/".concat(s),errorMessage:"Failed to delete TOTP.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deleteOAuthRegistration=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/oauth/".concat(s),errorMessage:"Failed to delete OAuth registration.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deleteWebauthnRegistration=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/webauthn_registrations/".concat(s),errorMessage:"Failed to delete WebAuthn registration.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deleteBiometricRegistration=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/biometric_registrations/".concat(s),errorMessage:"Failed to delete Biometric registration.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.onChange=function(s){var i=n._subscriptionService.getUser(),o=function(c){var l;(c==null?void 0:c.user)!==i&&(i=(l=c==null?void 0:c.user)!==null&&l!==void 0?l:null,s(i))};return n._subscriptionService.subscribeToState(o)}}),gye=function(){function t(e,r){var n=this;_r(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(s){var i=n._subscriptionService.getSession(),o=function(c){var l;(c==null?void 0:c.session)!==i&&(i=(l=c==null?void 0:c.session)!==null&&l!==void 0?l:null,s(i))};return n._subscriptionService.subscribeToState(o)},this.revoke=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o;return Z().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,this._networkClient.fetchSDK({url:"/sessions/revoke",errorMessage:"Error revoking session",method:"POST"});case 3:return o=c.sent,this._subscriptionService.destroyState(),c.abrupt("return",o);case 8:throw c.prev=8,c.t0=c.catch(0),s!=null&&s.forceClear?this._subscriptionService.destroyState():W2.includes(c.t0.error_type)&&this._subscriptionService.destroyState(),c.t0;case 12:case"end":return c.stop()}},i,this,[[0,8]])}))},this.authenticate=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o=this,a,c,l,u;return Z().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return a=this._subscriptionService.getSession(),c=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,l={session_duration_minutes:s==null?void 0:s.session_duration_minutes},d.next=6,this._networkClient.fetchSDK({url:"/sessions/authenticate",body:l,errorMessage:"Error authenticating session",method:"POST"});case 6:if(u=d.sent,!c()){d.next=9;break}return d.abrupt("return",this.authenticate(s));case 9:return this._subscriptionService.updateStateAndTokens({state:{session:u.session,user:u.user},session_token:u.session_token,session_jwt:u.session_jwt,intermediate_session_token:null}),d.abrupt("return",qt(u));case 13:if(d.prev=13,d.t0=d.catch(2),!c()){d.next=17;break}return d.abrupt("return",this.authenticate(s));case 17:throw W2.includes(d.t0.error_type)&&this._subscriptionService.destroySession(),d.t0;case 19:case"end":return d.stop()}},i,this,[[2,13]])}))}}return Or(t,[{key:"getTokens",value:function(){return this._subscriptionService.getTokens()}},{key:"updateSession",value:function(r){var n;Tt("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}(),xye=Promise.resolve({pkceRequiredForEmailMagicLinks:!1}),bye=function(){function t(e,r,n,s){var i=this,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:xye,a=arguments.length>5?arguments[5]:void 0;_r(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._passwordResetPKCEManager=s,this._config=o,this.dfpProtectedAuth=a,this.email={loginOrCreate:function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return be(i,void 0,void 0,Z().mark(function f(){var d,h,p,y,g,m,x;return Z().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this._config;case 2:if(d=w.sent,h=d.pkceRequiredForEmailMagicLinks,p=void 0,!h){w.next=9;break}return w.next=8,this.getCodeChallenge();case 8:p=w.sent;case 9:return w.next=11,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 11:return y=w.sent,g=y.dfp_telemetry_id,m=y.captcha_token,x=Object.assign(Object.assign({},u),{email:l,code_challenge:p,captcha_token:m,dfp_telemetry_id:g}),w.abrupt("return",this._networkClient.retriableFetchSDK({url:"/magic_links/email/login_or_create",body:x,errorMessage:"Failed to send magic link",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 16:case"end":return w.stop()}},f,this)}))},send:function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return be(i,void 0,void 0,Z().mark(function f(){var d,h,p,y,g,m,x,b,w;return Z().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,this._config;case 2:if(d=O.sent,h=d.pkceRequiredForEmailMagicLinks,p=void 0,!h){O.next=9;break}return O.next=8,this.getCodeChallenge();case 8:p=O.sent;case 9:return O.next=11,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 11:return y=O.sent,g=y.dfp_telemetry_id,m=y.captcha_token,x=Object.assign(Object.assign({},u),{email:l,code_challenge:p,captcha_token:m,dfp_telemetry_id:g}),b=!!this._subscriptionService.getSession(),w=b?"/magic_links/email/send/secondary":"/magic_links/email/send/primary",O.abrupt("return",this._networkClient.retriableFetchSDK({url:w,body:x,errorMessage:"Failed to send magic link",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 18:case"end":return O.stop()}},f,this)}))}},this.authenticate=function(c,l){return be(i,void 0,void 0,Z().mark(function u(){var f,d;return Z().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return Tt("stytch.magicLinks.authenticate").isString("Token",c).isNumber("session_duration_minutes",l.session_duration_minutes),p.next=3,this._passwordResetPKCEManager.getPKPair();case 3:if(f=p.sent,d=null,!(f!=null&&f.code_verifier)){p.next=19;break}return p.prev=6,p.next=9,this.handlePKCEForAuthenticate(this._passwordResetPKCEManager,Object.assign(Object.assign({},l),{token:c}));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({},l),{token:c}));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",qt(d));case 25:case"end":return p.stop()}},u,this,[[6,12]])}))}}return Or(t,[{key:"getCodeChallenge",value:function(){return be(this,void 0,void 0,Z().mark(function r(){var n;return Z().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this._pkceManager.getPKPair();case 2:if(n=i.sent,!n){i.next=5;break}return i.abrupt("return",n.code_challenge);case 5:return i.next=7,this._pkceManager.startPKCETransaction();case 7:return n=i.sent,i.abrupt("return",n.code_challenge);case 9:case"end":return i.stop()}},r,this)}))}},{key:"handlePKCEForAuthenticate",value:function(r,n){return be(this,void 0,void 0,Z().mark(function s(){var i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,r.getPKPair();case 2:return i=l.sent,o=Object.assign({code_verifier:i==null?void 0:i.code_verifier},n),l.next=6,this._networkClient.fetchSDK({url:"/magic_links/authenticate",body:o,errorMessage:"Failed to authenticate token.",method:"POST"});case 6:return a=l.sent,r.clearPKPair(),l.abrupt("return",a);case 9:case"end":return l.stop()}},s,this)}))}}]),t}(),wye=Or(function t(e,r){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return Promise.resolve(void 0)},i=arguments.length>3?arguments[3]:void 0;_r(this,t),this._networkClient=e,this._subscriptionService=r,this.executeRecaptcha=s,this.dfpProtectedAuth=i,this.sms={loginOrCreate:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h;return Z().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return u=y.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign(Object.assign({},c),{phone_number:a,captcha_token:d,dfp_telemetry_id:f}),y.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 y.stop()}},l,this)}))},send:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h,p,y;return Z().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return u=m.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign(Object.assign({},c),{phone_number:a,captcha_token:d,dfp_telemetry_id:f}),p=!!this._subscriptionService.getSession(),y=p?"/otps/sms/send/secondary":"/otps/sms/send/primary",m.abrupt("return",this._networkClient.retriableFetchSDK({url:y,body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 9:case"end":return m.stop()}},l,this)}))}},this.whatsapp={loginOrCreate:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h;return Z().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return u=y.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign(Object.assign({},c),{phone_number:a,dfp_telemetry_id:f,captcha_token:d}),y.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 y.stop()}},l,this)}))},send:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h,p,y;return Z().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return u=m.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign(Object.assign({},c),{phone_number:a,captcha_token:d,dfp_telemetry_id:f}),p=!!this._subscriptionService.getSession(),y=p?"/otps/whatsapp/send/secondary":"/otps/whatsapp/send/primary",m.abrupt("return",this._networkClient.retriableFetchSDK({url:y,body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 9:case"end":return m.stop()}},l,this)}))}},this.email={loginOrCreate:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f;return Z().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,this.executeRecaptcha();case 2:return u=h.sent,f=Object.assign(Object.assign({},c),{email:a,captcha_token:u}),h.abrupt("return",this._networkClient.fetchSDK({url:"/otps/email/login_or_create",body:f,errorMessage:"Failed to send one time passcode",method:"POST"}));case 5:case"end":return h.stop()}},l,this)}))},send:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h;return Z().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.executeRecaptcha();case 2:return u=y.sent,f=Object.assign(Object.assign({},c),{email:a,captcha_token:u}),d=!!this._subscriptionService.getSession(),h=d?"/otps/email/send/secondary":"/otps/email/send/primary",y.abrupt("return",this._networkClient.fetchSDK({url:h,body:f,errorMessage:"Failed to send one time passcode",method:"POST"}));case 7:case"end":return y.stop()}},l,this)}))}},this.authenticate=function(o,a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h,p;return Z().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return Tt("stytch.otps.authenticate").isString("Code",o).isNumber("session_duration_minutes",c.session_duration_minutes),g.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return u=g.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign({token:o,method_id:a,dfp_telemetry_id:f,captcha_token:d},c),g.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=g.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}),g.abrupt("return",qt(p));case 12:case"end":return g.stop()}},l,this)}))}}),Eye=function(){function t(e,r,n,s,i){_r(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._dynamicConfig=s,this._config=i,this.google={start:this.startOAuthFlow($t.Google)},this.apple={start:this.startOAuthFlow($t.Apple)},this.microsoft={start:this.startOAuthFlow($t.Microsoft)},this.github={start:this.startOAuthFlow($t.Github)},this.gitlab={start:this.startOAuthFlow($t.GitLab)},this.facebook={start:this.startOAuthFlow($t.Facebook)},this.discord={start:this.startOAuthFlow($t.Discord)},this.salesforce={start:this.startOAuthFlow($t.Salesforce)},this.slack={start:this.startOAuthFlow($t.Slack)},this.amazon={start:this.startOAuthFlow($t.Amazon)},this.bitbucket={start:this.startOAuthFlow($t.Bitbucket)},this.linkedin={start:this.startOAuthFlow($t.LinkedIn)},this.coinbase={start:this.startOAuthFlow($t.Coinbase)},this.twitch={start:this.startOAuthFlow($t.Twitch)},this.twitter={start:this.startOAuthFlow($t.Twitter)},this.tiktok={start:this.startOAuthFlow($t.TikTok)},this.snapchat={start:this.startOAuthFlow($t.Snapchat)},this.figma={start:this.startOAuthFlow($t.Figma)},this.yahoo={start:this.startOAuthFlow($t.Yahoo)}}return Or(t,[{key:"authenticate",value:function(r,n){return be(this,void 0,void 0,Z().mark(function s(){var i,o;return Z().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return Tt("stytch.oauth.authenticate").isString("Token",r).isNumber("session_duration_minutes",n.session_duration_minutes),c.next=3,this._pkceManager.getPKPair();case 3:return i=c.sent,i||xi.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"))},aye=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:Gpe},fj=function(e){return e.includes("public-token-test")},cye=function(){return"event-id-".concat(Ik())},lye=function(){return"app-session-id-".concat(Ik())},uye=function(){return"persistent-id-".concat(Ik())},Tt=function(e){var r={isObject:function(s,i){var o=Ei(i)==="object"&&!Array.isArray(i)&&i!==null;if(!o)throw new Gl(e,s+" must be an object.");return r},isOptionalObject:function(s,i){return typeof i>"u"?r:r.isObject(s,i)},isString:function(s,i){if(typeof i!="string")throw new Gl(e,s+" must be a string.");return r},isOptionalString:function(s,i){return typeof i>"u"?r:r.isString(s,i)},isStringArray:function(s,i){if(!Array.isArray(i))throw new Gl(e,s+" must be an array of strings.");var o=oj(i),a;try{for(o.s();!(a=o.n()).done;){var c=a.value;if(typeof c!="string")throw new Gl(e,s+" must be an array of strings.")}}catch(l){o.e(l)}finally{o.f()}return r},isOptionalStringArray:function(s,i){return typeof i>"u"?r:r.isStringArray(s,i)},isNumber:function(s,i){if(typeof i!="number")throw new Gl(e,s+" must be a number.");return r},isOptionalNumber:function(s,i){return typeof i>"u"?r:r.isNumber(s,i)},isBoolean:function(s,i){if(typeof i!="boolean")throw new Gl(e,s+" must be a boolean.");return r},isOptionalBoolean:function(s,i){return typeof i>"u"?r:r.isBoolean(s,i)}};return r},Ys=function(e){var r=lj(e,["request_id","status_code"]);return r},qt=function(e){var r=lj(e,["__user"]);return r},fye=function(){return Ok("".concat(qpe,"/telemetry.js"),function(){return window.GetTelemetryID})},dye=Or(function t(e,r,n){var s=this,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return Promise.resolve(void 0)};_r(this,t),this.bootstrapPromise=n,this.isEnabled=function(){return be(s,void 0,void 0,Z().mark(function o(){return Z().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.state.then(function(l){return l.enabled}));case 1:case"end":return c.stop()}},o,this)}))},this.getTelemetryID=function(){return be(s,void 0,void 0,Z().mark(function o(){var a,c,l,u;return Z().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.state;case 2:if(a=d.sent,c=a.publicToken,l=a.enabled,u=a.dfpBackendURL,l){d.next=8;break}return d.abrupt("return",void 0);case 8:return d.next=10,window.GetTelemetryID(c,"".concat(u,"/submit"));case 10:return d.abrupt("return",d.sent);case 11:case"end":return d.stop()}},o,this)}))},this.getDFPTelemetryIDAndCaptcha=function(){return be(s,void 0,void 0,Z().mark(function o(){var a,c,l,u,f,d;return Z().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,this.state;case 2:if(a=p.sent,c=a.enabled,l=a.executeRecaptcha,u=a.mode,f=void 0,d=void 0,c){p.next=12;break}return p.next=11,l();case 11:d=p.sent;case 12:if(u!=="DECISIONING"){p.next=18;break}return p.next=15,this.getTelemetryID();case 15:f=p.sent,p.next=25;break;case 18:if(u!=="OBSERVATION"){p.next=25;break}return p.next=21,this.getTelemetryID();case 21:return f=p.sent,p.next=24,l();case 24:d=p.sent;case 25:return p.abrupt("return",{dfp_telemetry_id:f,captcha_token:d});case 26:case"end":return p.stop()}},o,this)}))},this.retryWithCaptchaAndDFP=function(o,a){return be(s,void 0,void 0,Z().mark(function c(){var l,u,f;return Z().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,this.state;case 2:if(l=h.sent,u=l.enabled,f=l.executeRecaptcha,!(o.type===M0.RequiredCatcha&&u)){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,f();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()}},c,this)}))},this.state=n.then(function(o){return be(s,void 0,void 0,Z().mark(function a(){return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(o.runDFPProtectedAuth){l.next=2;break}return l.abrupt("return",{publicToken:e,dfpBackendURL:r,enabled:!1,loaded:!1,executeRecaptcha:i});case 2:return l.next=4,fye();case 4:return l.abrupt("return",{publicToken:e,dfpBackendURL:r,enabled:!0,mode:o.dfpProtectedAuthMode||"OBSERVATION",loaded:!0,executeRecaptcha:i});case 5:case"end":return l.stop()}},a)}))})}),hye=function(){function t(){_r(this,t)}return Or(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 s=new r(n);return Object.assign(s,n),Object.setPrototypeOf(s,r.prototype),s}},{key:"unmarshall",value:function(r){if("name"in r)switch(r.name){case"SDKAPIUnreachableError":return t.inflate(kpe,r);case"StytchSDKSchemaError":return t.inflate(Tpe,r);case"StytchAPIUnreachableError":return t.inflate(Ql,r);case"StytchAPISchemaError":return t.inflate(sj,r);case"StytchSDKAPIError":return t.inflate(Ppe,r);case"StytchAPIError":return t.inflate(ij,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}(),pye=15,yye=800,vye=function(){function t(e){_r(this,t),this.maxBatchSize=e.maxBatchSize,this.logEventURL=e.logEventURL,setInterval(this.flush.bind(this),e.intervalDurationMs),this.batch=[]}return Or(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 be(this,void 0,void 0,Z().mark(function r(){var n;return Z().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(this.batch.length){i.next=2;break}return i.abrupt("return");case 2:return n=this.batch,this.batch=[],i.prev=4,i.next=7,fetch(this.logEventURL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});case 7:i.next=11;break;case 9:i.prev=9,i.t0=i.catch(4);case 11:case"end":return i.stop()}},r,this,[[4,9]])}))}}]),t}(),H8;(function(t){t.LoginOrCreateEML="login_or_create_eml",t.LoginOrCreateOTP="login_or_create_otp",t.ResetPassword="reset_password"})(H8||(H8={}));var mye=Or(function t(e,r){var n=this;_r(this,t),this._networkClient=e,this._subscriptionService=r,this.get=function(){return be(n,void 0,void 0,Z().mark(function s(){var i,o;return Z().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/me",errorMessage:"Failed to retrieve user info.",method:"GET"});case 2:return i=c.sent,o=Ys(i),this._subscriptionService.updateUser(o),c.abrupt("return",o);case 6:case"end":return c.stop()}},s,this)}))},this.getSync=function(){return n._subscriptionService.getUser()},this.getInfo=function(){return{user:n.getSync(),fromCache:n._subscriptionService.getFromCache()}},this.update=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.user.update").isOptionalObject("untrusted_metadata",s.untrusted_metadata),l.next=3,this._networkClient.fetchSDK({url:"/users/me",body:s,errorMessage:"Failed to update user.",method:"PUT"});case 3:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 7:case"end":return l.stop()}},i,this)}))},this.deleteEmail=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/emails/".concat(s),errorMessage:"Failed to delete email.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deletePhoneNumber=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/phone_numbers/".concat(s),errorMessage:"Failed to delete phone number.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deleteTOTP=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/totps/".concat(s),errorMessage:"Failed to delete TOTP.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deleteOAuthRegistration=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/oauth/".concat(s),errorMessage:"Failed to delete OAuth registration.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deleteWebauthnRegistration=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/webauthn_registrations/".concat(s),errorMessage:"Failed to delete WebAuthn registration.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.deleteBiometricRegistration=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/biometric_registrations/".concat(s),errorMessage:"Failed to delete Biometric registration.",method:"DELETE"});case 2:return o=l.sent,a=Ys(o.__user),this._subscriptionService.updateUser(a),l.abrupt("return",qt(o));case 6:case"end":return l.stop()}},i,this)}))},this.onChange=function(s){var i=n._subscriptionService.getUser(),o=function(c){var l;(c==null?void 0:c.user)!==i&&(i=(l=c==null?void 0:c.user)!==null&&l!==void 0?l:null,s(i))};return n._subscriptionService.subscribeToState(o)}}),gye=function(){function t(e,r){var n=this;_r(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(s){var i=n._subscriptionService.getSession(),o=function(c){var l;(c==null?void 0:c.session)!==i&&(i=(l=c==null?void 0:c.session)!==null&&l!==void 0?l:null,s(i))};return n._subscriptionService.subscribeToState(o)},this.revoke=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o;return Z().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,this._networkClient.fetchSDK({url:"/sessions/revoke",errorMessage:"Error revoking session",method:"POST"});case 3:return o=c.sent,this._subscriptionService.destroyState(),c.abrupt("return",o);case 8:throw c.prev=8,c.t0=c.catch(0),s!=null&&s.forceClear?this._subscriptionService.destroyState():W2.includes(c.t0.error_type)&&this._subscriptionService.destroyState(),c.t0;case 12:case"end":return c.stop()}},i,this,[[0,8]])}))},this.authenticate=function(s){return be(n,void 0,void 0,Z().mark(function i(){var o=this,a,c,l,u;return Z().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return a=this._subscriptionService.getSession(),c=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,l={session_duration_minutes:s==null?void 0:s.session_duration_minutes},d.next=6,this._networkClient.fetchSDK({url:"/sessions/authenticate",body:l,errorMessage:"Error authenticating session",method:"POST"});case 6:if(u=d.sent,!c()){d.next=9;break}return d.abrupt("return",this.authenticate(s));case 9:return this._subscriptionService.updateStateAndTokens({state:{session:u.session,user:u.user},session_token:u.session_token,session_jwt:u.session_jwt,intermediate_session_token:null}),d.abrupt("return",qt(u));case 13:if(d.prev=13,d.t0=d.catch(2),!c()){d.next=17;break}return d.abrupt("return",this.authenticate(s));case 17:throw W2.includes(d.t0.error_type)&&this._subscriptionService.destroySession(),d.t0;case 19:case"end":return d.stop()}},i,this,[[2,13]])}))}}return Or(t,[{key:"getTokens",value:function(){return this._subscriptionService.getTokens()}},{key:"updateSession",value:function(r){var n;Tt("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}(),xye=Promise.resolve({pkceRequiredForEmailMagicLinks:!1}),bye=function(){function t(e,r,n,s){var i=this,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:xye,a=arguments.length>5?arguments[5]:void 0;_r(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._passwordResetPKCEManager=s,this._config=o,this.dfpProtectedAuth=a,this.email={loginOrCreate:function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return be(i,void 0,void 0,Z().mark(function f(){var d,h,p,y,g,m,x;return Z().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this._config;case 2:if(d=w.sent,h=d.pkceRequiredForEmailMagicLinks,p=void 0,!h){w.next=9;break}return w.next=8,this.getCodeChallenge();case 8:p=w.sent;case 9:return w.next=11,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 11:return y=w.sent,g=y.dfp_telemetry_id,m=y.captcha_token,x=Object.assign(Object.assign({},u),{email:l,code_challenge:p,captcha_token:m,dfp_telemetry_id:g}),w.abrupt("return",this._networkClient.retriableFetchSDK({url:"/magic_links/email/login_or_create",body:x,errorMessage:"Failed to send magic link",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 16:case"end":return w.stop()}},f,this)}))},send:function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return be(i,void 0,void 0,Z().mark(function f(){var d,h,p,y,g,m,x,b,w;return Z().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,this._config;case 2:if(d=O.sent,h=d.pkceRequiredForEmailMagicLinks,p=void 0,!h){O.next=9;break}return O.next=8,this.getCodeChallenge();case 8:p=O.sent;case 9:return O.next=11,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 11:return y=O.sent,g=y.dfp_telemetry_id,m=y.captcha_token,x=Object.assign(Object.assign({},u),{email:l,code_challenge:p,captcha_token:m,dfp_telemetry_id:g}),b=!!this._subscriptionService.getSession(),w=b?"/magic_links/email/send/secondary":"/magic_links/email/send/primary",O.abrupt("return",this._networkClient.retriableFetchSDK({url:w,body:x,errorMessage:"Failed to send magic link",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 18:case"end":return O.stop()}},f,this)}))}},this.authenticate=function(c,l){return be(i,void 0,void 0,Z().mark(function u(){var f,d;return Z().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return Tt("stytch.magicLinks.authenticate").isString("Token",c).isNumber("session_duration_minutes",l.session_duration_minutes),p.next=3,this._passwordResetPKCEManager.getPKPair();case 3:if(f=p.sent,d=null,!(f!=null&&f.code_verifier)){p.next=19;break}return p.prev=6,p.next=9,this.handlePKCEForAuthenticate(this._passwordResetPKCEManager,Object.assign(Object.assign({},l),{token:c}));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({},l),{token:c}));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",qt(d));case 25:case"end":return p.stop()}},u,this,[[6,12]])}))}}return Or(t,[{key:"getCodeChallenge",value:function(){return be(this,void 0,void 0,Z().mark(function r(){var n;return Z().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this._pkceManager.getPKPair();case 2:if(n=i.sent,!n){i.next=5;break}return i.abrupt("return",n.code_challenge);case 5:return i.next=7,this._pkceManager.startPKCETransaction();case 7:return n=i.sent,i.abrupt("return",n.code_challenge);case 9:case"end":return i.stop()}},r,this)}))}},{key:"handlePKCEForAuthenticate",value:function(r,n){return be(this,void 0,void 0,Z().mark(function s(){var i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,r.getPKPair();case 2:return i=l.sent,o=Object.assign({code_verifier:i==null?void 0:i.code_verifier},n),l.next=6,this._networkClient.fetchSDK({url:"/magic_links/authenticate",body:o,errorMessage:"Failed to authenticate token.",method:"POST"});case 6:return a=l.sent,r.clearPKPair(),l.abrupt("return",a);case 9:case"end":return l.stop()}},s,this)}))}}]),t}(),wye=Or(function t(e,r){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return Promise.resolve(void 0)},i=arguments.length>3?arguments[3]:void 0;_r(this,t),this._networkClient=e,this._subscriptionService=r,this.executeRecaptcha=s,this.dfpProtectedAuth=i,this.sms={loginOrCreate:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h;return Z().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return u=y.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign(Object.assign({},c),{phone_number:a,captcha_token:d,dfp_telemetry_id:f}),y.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 y.stop()}},l,this)}))},send:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h,p,y;return Z().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return u=m.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign(Object.assign({},c),{phone_number:a,captcha_token:d,dfp_telemetry_id:f}),p=!!this._subscriptionService.getSession(),y=p?"/otps/sms/send/secondary":"/otps/sms/send/primary",m.abrupt("return",this._networkClient.retriableFetchSDK({url:y,body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 9:case"end":return m.stop()}},l,this)}))}},this.whatsapp={loginOrCreate:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h;return Z().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return u=y.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign(Object.assign({},c),{phone_number:a,dfp_telemetry_id:f,captcha_token:d}),y.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 y.stop()}},l,this)}))},send:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h,p,y;return Z().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return u=m.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign(Object.assign({},c),{phone_number:a,captcha_token:d,dfp_telemetry_id:f}),p=!!this._subscriptionService.getSession(),y=p?"/otps/whatsapp/send/secondary":"/otps/whatsapp/send/primary",m.abrupt("return",this._networkClient.retriableFetchSDK({url:y,body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 9:case"end":return m.stop()}},l,this)}))}},this.email={loginOrCreate:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f;return Z().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,this.executeRecaptcha();case 2:return u=h.sent,f=Object.assign(Object.assign({},c),{email:a,captcha_token:u}),h.abrupt("return",this._networkClient.fetchSDK({url:"/otps/email/login_or_create",body:f,errorMessage:"Failed to send one time passcode",method:"POST"}));case 5:case"end":return h.stop()}},l,this)}))},send:function(a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h;return Z().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.executeRecaptcha();case 2:return u=y.sent,f=Object.assign(Object.assign({},c),{email:a,captcha_token:u}),d=!!this._subscriptionService.getSession(),h=d?"/otps/email/send/secondary":"/otps/email/send/primary",y.abrupt("return",this._networkClient.fetchSDK({url:h,body:f,errorMessage:"Failed to send one time passcode",method:"POST"}));case 7:case"end":return y.stop()}},l,this)}))}},this.authenticate=function(o,a,c){return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h,p;return Z().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return Tt("stytch.otps.authenticate").isString("Code",o).isNumber("session_duration_minutes",c.session_duration_minutes),g.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return u=g.sent,f=u.dfp_telemetry_id,d=u.captcha_token,h=Object.assign({token:o,method_id:a,dfp_telemetry_id:f,captcha_token:d},c),g.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=g.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}),g.abrupt("return",qt(p));case 12:case"end":return g.stop()}},l,this)}))}}),Eye=function(){function t(e,r,n,s,i){_r(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._dynamicConfig=s,this._config=i,this.google={start:this.startOAuthFlow($t.Google)},this.apple={start:this.startOAuthFlow($t.Apple)},this.microsoft={start:this.startOAuthFlow($t.Microsoft)},this.github={start:this.startOAuthFlow($t.Github)},this.gitlab={start:this.startOAuthFlow($t.GitLab)},this.facebook={start:this.startOAuthFlow($t.Facebook)},this.discord={start:this.startOAuthFlow($t.Discord)},this.salesforce={start:this.startOAuthFlow($t.Salesforce)},this.slack={start:this.startOAuthFlow($t.Slack)},this.amazon={start:this.startOAuthFlow($t.Amazon)},this.bitbucket={start:this.startOAuthFlow($t.Bitbucket)},this.linkedin={start:this.startOAuthFlow($t.LinkedIn)},this.coinbase={start:this.startOAuthFlow($t.Coinbase)},this.twitch={start:this.startOAuthFlow($t.Twitch)},this.twitter={start:this.startOAuthFlow($t.Twitter)},this.tiktok={start:this.startOAuthFlow($t.TikTok)},this.snapchat={start:this.startOAuthFlow($t.Snapchat)},this.figma={start:this.startOAuthFlow($t.Figma)},this.yahoo={start:this.startOAuthFlow($t.Yahoo)}}return Or(t,[{key:"authenticate",value:function(r,n){return be(this,void 0,void 0,Z().mark(function s(){var i,o;return Z().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return Tt("stytch.oauth.authenticate").isString("Token",r).isNumber("session_duration_minutes",n.session_duration_minutes),c.next=3,this._pkceManager.getPKPair();case 3:return i=c.sent,i||xi.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.`),c.next=7,this._networkClient.fetchSDK({url:"/oauth/authenticate",method:"POST",body:Object.assign({token:r,code_verifier:i==null?void 0:i.code_verifier},n),errorMessage:"Failed to authenticate token"});case 7:return o=c.sent,this._pkceManager.clearPKPair(),this._subscriptionService.updateStateAndTokens({state:{session:o.session,user:Ys(o.__user)},session_token:o.session_token,session_jwt:o.session_jwt,intermediate_session_token:null}),c.abrupt("return",qt(o));case 11:case"end":return c.stop()}},s,this)}))}},{key:"getBaseApiUrl",value:function(){return be(this,void 0,void 0,Z().mark(function r(){var n,s;return Z().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this._dynamicConfig;case 2:if(n=o.sent,s=n.cnameDomain,!s){o.next=6;break}return o.abrupt("return","https://".concat(s));case 6:if(!uj(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 s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=s.login_redirect_url,o=s.signup_redirect_url,a=s.custom_scopes,c=s.provider_params;return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h,p,y,g;return Z().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,this._dynamicConfig;case 2:return u=x.sent,f=u.cnameDomain,d=u.pkceRequiredForOAuth,x.next=7,this.getBaseApiUrl();case 7:if(h=x.sent,this._networkClient.logEvent({name:"start_oauth_flow",details:{provider_type:r,custom_scopes:a,cname_domain:f,pkce:d,provider_params:c}}),p=new URL("".concat(h,"/v1/public/oauth/").concat(r,"/start")),p.searchParams.set("public_token",this._config.publicToken),!d){x.next=18;break}return x.next=14,this._pkceManager.startPKCETransaction();case 14:y=x.sent,p.searchParams.set("code_challenge",y.code_challenge),x.next=19;break;case 18:this._pkceManager.clearPKPair();case 19:if(a&&(Tt("startOAuthFlow").isStringArray("custom_scopes",a),p.searchParams.set("custom_scopes",a.join(" "))),c){Tt("startOAuthFlow").isOptionalObject("provider_params",c);for(g in c)p.searchParams.set("provider_"+g,c[g])}i&&p.searchParams.set("login_redirect_url",i),o&&p.searchParams.set("signup_redirect_url",o),window.location.href=p.toString();case 24:case"end":return x.stop()}},l,this)}))}}}]),t}(),Sye=Promise.resolve({siweRequiredForCryptoWallets:!1}),Cye=function(){function t(e,r,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return Promise.resolve(void 0)},i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Sye;_r(this,t),this._networkClient=e,this._apiNetworkClient=r,this._subscriptionService=n,this.executeRecaptcha=s,this.dfpProtectedAuth=i,this._config=o}return Or(t,[{key:"authenticateStart",value:function(r){var n;return be(this,void 0,void 0,Z().mark(function s(){var i,o,a,c,l,u,f;return Z().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return Tt("stytch.cryptoWallets.authenticateStart").isString("crypto_wallet_address",r.crypto_wallet_address).isString("crypto_wallet_type",r.crypto_wallet_type),r.siwe_params&&Tt("stytch.cryptoWallets.authenticateStart").isOptionalString("uri",r.siwe_params.uri).isOptionalString("chain_id",r.siwe_params.chain_id).isOptionalString("issued_at",r.siwe_params.issued_at).isOptionalString("statement",r.siwe_params.statement).isOptionalString("not_before",r.siwe_params.not_before).isOptionalString("message_request_id",r.siwe_params.message_request_id).isOptionalStringArray("resources",r.siwe_params.resources),i=!!this._subscriptionService.getSession(),h.next=5,this.executeRecaptcha();case 5:return o=h.sent,h.next=8,this._config;case 8:return a=h.sent,c=a.siweRequiredForCryptoWallets,l={crypto_wallet_address:r.crypto_wallet_address,crypto_wallet_type:r.crypto_wallet_type},c&&r.crypto_wallet_type=="ethereum"&&(l.siwe_params=Object.assign(Object.assign({},r.siwe_params),{uri:((n=r.siwe_params)===null||n===void 0?void 0:n.uri)||window.location.origin})),u=i?"/crypto_wallets/authenticate/start/secondary":"/crypto_wallets/authenticate/start/primary",f=Object.assign(Object.assign({},l),{captcha_token:o}),h.abrupt("return",this._apiNetworkClient.fetchSDK({url:u,method:"POST",errorMessage:"Failed to start wallet authentication.",body:f}));case 15:case"end":return h.stop()}},s,this)}))}},{key:"authenticate",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("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),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.next=8,this._apiNetworkClient.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:Ys(a.__user)},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}}]),t}(),Aye=function(){function t(e,r,n){_r(this,t),this._networkClient=e,this._subscriptionService=r,this.dfpProtectedAuth=n}return Or(t,[{key:"create",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s;return Z().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return Tt("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 s=o.sent,this._subscriptionService.updateUser(s.__user),o.abrupt("return",qt(s));case 6:case"end":return o.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.totps.authenticate").isNumber("session_duration_minutes",r.session_duration_minutes).isString("totp_code",r.totp_code),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}},{key:"recoveryCodes",value:function(){return be(this,void 0,void 0,Z().mark(function r(){return Z().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",this._networkClient.fetchSDK({url:"/totps/recovery_codes",method:"POST",errorMessage:"Failed to retrieve recovery codes"}));case 1:case"end":return s.stop()}},r,this)}))}},{key:"recover",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.totps.recover").isNumber("session_duration_minutes",r.session_duration_minutes).isString("recovery_code",r.recovery_code),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}}]),t}();function fj(t){for(var e="==".slice(0,(4-t.length%4)%4),r=t.replace(/-/g,"+").replace(/_/g,"/")+e,n=atob(r),s=new ArrayBuffer(n.length),i=new Uint8Array(s),o=0;o with `"webauthn"` in its `autocomplete` attribute was detected'),!1):!0}}return Or(t,[{key:"register",value:function(r){var n,s;return be(this,void 0,void 0,Z().mark(function i(){var o,a,c,l,u;return Z().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return Tt("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:(s=r==null?void 0:r.authenticator_type)!==null&&s!==void 0?s: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,c=JSON.parse(a),d.next=8,_ye({publicKey:c});case 8:return l=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(l),session_duration_minutes:r==null?void 0:r.session_duration_minutes}});case 11:return u=d.sent,this._subscriptionService.updateStateAndTokens({state:{session:u.session,user:u.__user},session_token:u.session_token,session_jwt:u.session_jwt,intermediate_session_token:null}),d.abrupt("return",qt(u));case 14:case"end":return d.stop()}},i,this)}))}},{key:"authenticate",value:function(r){var n,s;return be(this,void 0,void 0,Z().mark(function i(){var o,a,c,l,u,f,d,h,p,y,g,m;return Z().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return Tt("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),b.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:if(o=b.sent,a=o.dfp_telemetry_id,c=o.captcha_token,!r.conditional_mediation){b.next=14;break}return b.next=9,this.browserSupportsAutofill();case 9:if(b.sent){b.next=12;break}return console.error("Browser does not support WebAuthn autofill"),b.abrupt("return",null);case 12:if(this.checkEligibleInputs()){b.next=14;break}return b.abrupt("return",null);case 14:return l=!!this._subscriptionService.getSession(),u=l?"/webauthn/authenticate/start/secondary":"/webauthn/authenticate/start/primary",b.next=18,this._networkClient.fetchSDK({url:u,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 f=b.sent,d=f.public_key_credential_request_options,h=new AbortController,p={publicKey:JSON.parse(d),signal:(s=r.signal)!==null&&s!==void 0?s:h.signal},y=Object.assign(Object.assign({},p),{mediation:"conditional"}),b.next=25,Dye(r.conditional_mediation?y:p);case 25:return g=b.sent,b.next=28,this._networkClient.retriableFetchSDK({url:"/webauthn/authenticate",method:"POST",errorMessage:"Failed to authenticate WebAuthn device",body:{public_key_credential:JSON.stringify(g),session_duration_minutes:r.session_duration_minutes,dfp_telemetry_id:a,captcha_token:c},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 28:return m=b.sent,this._subscriptionService.updateStateAndTokens({state:{session:m.session,user:m.__user},session_token:m.session_token,session_jwt:m.session_jwt,intermediate_session_token:null}),b.abrupt("return",qt(m));case 31:case"end":return b.stop()}},i,this)}))}},{key:"update",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s;return Z().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return s="/webauthn/update/"+r.webauthn_registration_id,o.next=3,this._networkClient.fetchSDK({url:s,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 be(this,void 0,void 0,Z().mark(function r(){var n;return Z().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(n=window.PublicKeyCredential,!(n===void 0||n.isConditionalMediationAvailable===void 0)){i.next=3;break}return i.abrupt("return",new Promise(function(o){return o(!1)}));case 3:return i.abrupt("return",n.isConditionalMediationAvailable());case 4:case"end":return i.stop()}},r)}))}}]),t}(),jye=Promise.resolve({pkceRequiredForPasswordResets:!1}),Bye=function(){function t(e,r,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:jye,i=arguments.length>4?arguments[4]:void 0;_r(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._config=s,this.dfpProtectedAuth=i}return Or(t,[{key:"getCodeChallenge",value:function(){return be(this,void 0,void 0,Z().mark(function r(){var n,s,i;return Z().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this._config;case 2:if(n=a.sent,s=n.pkceRequiredForPasswordResets,s){a.next=6;break}return a.abrupt("return",void 0);case 6:return a.next=8,this._pkceManager.getPKPair();case 8:if(i=a.sent,!i){a.next=11;break}return a.abrupt("return",i.code_challenge);case 11:return a.next=13,this._pkceManager.startPKCETransaction();case 13:return i=a.sent,a.abrupt("return",i.code_challenge);case 15:case"end":return a.stop()}},r,this)}))}},{key:"create",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.passwords.create").isString("password",r.password).isString("email",r.email).isNumber("session_duration_minutes",r.session_duration_minutes),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.passwords.authenticate").isString("password",r.password).isString("email",r.email).isNumber("session_duration_minutes",r.session_duration_minutes),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}},{key:"resetByEmailStart",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("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),l.next=3,this.getCodeChallenge();case 3:return s=l.sent,l.next=6,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 6:return i=l.sent,o=i.dfp_telemetry_id,a=i.captcha_token,l.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:s,captcha_token:a,dfp_telemetry_id:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 10:case"end":return l.stop()}},n,this)}))}},{key:"resetByEmail",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a,c,l;return Z().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return Tt("stytch.passwords.resetByEmail").isString("token",r.token).isString("password",r.password).isNumber("session_duration_minutes",r.session_duration_minutes),f.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=f.sent,i=s.dfp_telemetry_id,o=s.captcha_token,f.next=8,this._pkceManager.getPKPair();case 8:return a=f.sent,c=a==null?void 0:a.code_verifier,f.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:c,dfp_telemetry_id:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 12:return l=f.sent,this._pkceManager.clearPKPair(),this._subscriptionService.updateStateAndTokens({state:{session:l.session,user:l.user},session_token:l.session_token,session_jwt:l.session_jwt,intermediate_session_token:null}),f.abrupt("return",qt(l));case 16:case"end":return f.stop()}},n,this)}))}},{key:"resetByExistingPassword",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("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),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i,captcha_token:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}},{key:"resetBySession",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.passwords.resetBySession").isString("password",r.password),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i,captcha_token:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",a);case 11:case"end":return l.stop()}},n,this)}))}},{key:"strengthCheck",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){return Z().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return Tt("stytch.passwords.strengthCheck").isOptionalString("email",r.email).isString("password",r.password),i.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 i.stop()}},n,this)}))}}]),t}();Promise.resolve({pkceRequiredForEmailMagicLinks:!1});Promise.resolve({pkceRequiredForPasswordResets:!1});var Fye=function(){function t(e){_r(this,t),this.iframeURL=e,this.createIframe()}return Or(t,[{key:"createIframe",value:function(){var r=document.querySelector('[src~="'.concat(this.iframeURL,'"]'));if(r?xi.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 be(this,void 0,void 0,Z().mark(function s(){var i=this,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.frame;case 2:return o=l.sent,a=new MessageChannel,l.abrupt("return",new Promise(function(u,f){var d;a.port1.onmessage=function(p){var y=p.data;a.port1.close(),y.success?u(y.payload):f(hye.unmarshall(y.error))};var h={method:r,args:n};(d=o.contentWindow)===null||d===void 0||d.postMessage(h,i.iframeURL,[a.port2])}));case 5:case"end":return l.stop()}},s,this)}))}}]),t}(),Uye=function(){function t(e,r){_r(this,t),this._networkClient=e,this.dfpProtectedAuth=r}return Or(t,[{key:"searchUser",value:function(r){var n=this;return this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha().then(function(s){var i=s.dfp_telemetry_id,o=s.captcha_token;return n._networkClient.fetchSDK({url:"/users/search",method:"POST",body:{email:r,dfp_telemetry_id:i,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}(),Vye=function(e){return!!(e!=null&&e.session)},vj=function(){function t(e,r){var n=this;_r(this,t),this._subscriptionService=e,this._headlessSessionClient=r,this._onDataChange=function(s){Vye(s)?n.scheduleBackgroundRefresh():n.cancelBackgroundRefresh()},this._reauthenticateWithBackoff=function(){return be(n,void 0,void 0,Z().mark(function s(){var i;return Z().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:i=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 i++,a.next=15,new Promise(function(c){return setTimeout(c,t.timeoutForAttempt(i))});case 15:a.next=1;break;case 17:case"end":return a.stop()}},s,this,[[2,8]])}))},this.timeout=null,this._subscriptionService.subscribeToState(this._onDataChange)}return Or(t,[{key:"performBackgroundRefresh",value:function(){var r=this;this._reauthenticateWithBackoff().then(function(){r.scheduleBackgroundRefresh()}).catch(function(n){xi.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,s=2e3*Math.pow(2,r);return n+s}},{key:"isUnrecoverableError",value:function(r){return W2.includes(r.error_type)}}]),t}();vj.REFRESH_INTERVAL_MS=1e3*60*3;var $ye=Or(function t(e,r){var n=this;_r(this,t),this._subscriptionService=e,this.emptyState=r,this.onStateChange=function(s){return n._subscriptionService.subscribeToState(function(i){s(i??n.emptyState)})}}),G8="bootstrap",cb=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,siweRequiredForCryptoWallets:!1}},zye=function(){function t(e,r,n){var s=this;wn(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(i){return s._dataLayer.setItem(G8,JSON.stringify(i)),i}).catch(function(i){return xi.error(i),cb()})}return En(t,[{key:"getSync",value:function(){var r=this._dataLayer.getItem(G8);if(r===null)return cb();try{return JSON.parse(r)}catch{return cb()}}},{key:"getAsync",value:function(){return this._bootstrapDataPromise}}],[{key:"mapBootstrapData",value:function(r){var n,s,i=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:i,runDFPProtectedAuth:(n=r.dfp_protected_auth_enabled)!==null&&n!==void 0?n:!1,dfpProtectedAuthMode:r.dfp_protected_auth_mode,rbacPolicy:(s=r.rbac_policy)!==null&&s!==void 0?s:null,siweRequiredForCryptoWallets:r.siwe_required_for_crypto_wallets}}}]),t}();function js(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?i(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}var Hye=function(e){return Ok("https://www.google.com/recaptcha/enterprise.js?render=".concat(e),function(){return window.grecaptcha.enterprise})},Gye=En(function t(e){var r=this;wn(this,t),this.bootstrapPromise=e,this.executeRecaptcha=function(){return js(r,void 0,void 0,Rt().mark(function n(){var s,i,o,a;return Rt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.state;case 2:if(s=l.sent,i=s.captchaClient,o=s.configured,a=s.siteKey,o){l.next=8;break}return l.abrupt("return",void 0);case 8:return l.next=10,new Promise(function(u){return i.ready(u)});case 10:return l.abrupt("return",i.execute(a,{action:"LOGIN"}));case 11:case"end":return l.stop()}},n,this)}))},this.state=e.then(function(n){return js(r,void 0,void 0,Rt().mark(function s(){return Rt().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,Hye(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()}},s)}))})}),qye=function(){function t(e){var r=this;wn(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 En(t,[{key:"frameClient",get:function(){var r;return this._frameClient=(r=this._frameClient)!==null&&r!==void 0?r:new Fye(this.iframeURL),this._frameClient}},{key:"call",value:function(r,n){return this.frameClient.call(r,[n])}}]),t}(),Wye=function(t){fg(e,t);function e(r,n,s,i,o,a){var c;return wn(this,e),c=ug(this,e,[r,n,s,i,o]),c._oneTap=a,c.startOneTap=function(l){return js(tj(c),void 0,void 0,Rt().mark(function u(){var f,d,h;return Rt().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this._oneTap.createOneTapClient();case 2:if(f=y.sent,f.success){y.next=5;break}throw new Error("One Tap could not load: ".concat(f.reason));case 5:return d=f.client,h=this._oneTap.createOnSuccessHandler({signupRedirectUrl:l.signup_redirect_url,loginRedirectUrl:l.login_redirect_url,onSuccess:this._oneTap.RedirectOnSuccess}),y.abrupt("return",d.render({style:{position:Ac.floating},onOneTapCancelled:l.onOneTapCancelled,callback:h}));case 8:case"end":return y.stop()}},u,this)}))},c.googleOneTap={start:c.startOneTap},c}return En(e)}(Eye),Kye="4.18.2",mj=function(){function t(e,r,n,s){wn(this,t),this._publicToken=e,this._subscriptionDataLayer=r,this.baseURL=n,this.additionalTelemetryDataFn=s,this.updateSessionToken=function(){return null},this.eventLogger=new vye({maxBatchSize:pye,intervalDurationMs:yye,logEventURL:this.buildSDKUrl("/events")})}return En(t,[{key:"logEvent",value:function(r){var n=r.name,s=r.details,i=r.error,o=i===void 0?{}:i;this.eventLogger.logEvent(this.createTelemetryBlob(),{public_token:this._publicToken,event_name:n,details:s,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:cye(),app_session_id:lye(),persistent_id:uye(),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:Kye}})}},{key:"fetchSDK",value:function(r){var n=r.url,s=r.body,i=r.errorMessage,o=r.method;return js(this,void 0,void 0,Rt().mark(function a(){var c,l,u,f;return Rt().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=this._subscriptionDataLayer.readSessionCookie().session_token,l="Basic "+window.btoa(this._publicToken+":"+(c||this._publicToken)),u=window.btoa(JSON.stringify(this.createTelemetryBlob())),f=window.location.origin,h.abrupt("return",Q2({basicAuthHeader:l,body:s,errorMessage:i,finalURL:this.buildSDKUrl(n),method:o,xSDKClientHeader:u,xSDKParentHostHeader:f}));case 5:case"end":return h.stop()}},a,this)}))}},{key:"retriableFetchSDK",value:function(r){var n=r.url,s=r.body,i=r.errorMessage,o=r.method,a=r.retryCallback;return js(this,void 0,void 0,Rt().mark(function c(){var l,u,f,d;return Rt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return l=this._subscriptionDataLayer.readSessionCookie().session_token,u="Basic "+window.btoa(this._publicToken+":"+(l||this._publicToken)),f=window.btoa(JSON.stringify(this.createTelemetryBlob())),d=window.location.origin,p.abrupt("return",Kpe({basicAuthHeader:u,body:s,errorMessage:i,finalURL:this.buildSDKUrl(n),method:o,xSDKClientHeader:f,xSDKParentHostHeader:d,retryCallback:a}));case 5:case"end":return p.stop()}},c,this)}))}},{key:"buildSDKUrl",value:function(r){return"".concat(this.baseURL,"/sdk/v1").concat(r)}}]),t}(),Qye=typeof window<"u"&&"IdentityCredential"in window,gj=function(e){return e===Ac.forceLegacyEmbedded?"force":e===Ac.embeddedOnly||e===Ac.embedded||e===Ac.floatingOrEmbedded},Yye=function(e){var r=gj(e);return r==="force"||r&&!Qye},Jye=function(){function t(e,r){wn(this,t),this._googleClient=e,this._clientId=r}return En(t,[{key:"cancel",value:function(){this._googleClient.cancel()}},{key:"render",value:function(r){var n=r.callback,s=r.onOneTapCancelled,i=r.style;return js(this,void 0,void 0,Rt().mark(function o(){var a=this,c,l,u;return Rt().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=gj(i.position),l=Yye(i.position),u={client_id:this._clientId,callback:n,auto_select:!1,context:"use",itp_support:!0,use_fedcm_for_prompt:c!=="force"},l&&(u.prompt_parent_id="google-parent-prompt",u.cancel_on_tap_outside=!1),this._googleClient.initialize(u),d.abrupt("return",new Promise(function(h){a._googleClient.prompt(function(p){var y,g,m,x,b;if(p.isSkippedMoment()){var w=(g=(y=p.getSkippedReason)===null||y===void 0?void 0:y.call(p))!==null&&g!==void 0?g:"unknown_reason";return w==="user_cancel"&&(s==null||s()),h({success:!1,reason:w})}if(!p.isNotDisplayed&&l||!((m=p.isNotDisplayed)===null||m===void 0)&&m.call(p))return h({success:!1,reason:(b=(x=p.getNotDisplayedReason)===null||x===void 0?void 0:x.call(p))!==null&&b!==void 0?b:"unknown_reason"});if(!p.isDismissedMoment())return a.styleFrame(l),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(aj)&&(n.style.width="100%")})}}]),t}(),Xye=function(){return Ok(Wpe,function(){return window.google.accounts.id})},Zye=function(){function t(e,r){var n=this;wn(this,t),this._publicToken=e,this.clientsideServices=r,this.createOnSuccessHandler=function(s){var i=s.loginRedirectUrl,o=s.signupRedirectUrl,a=s.onSuccess;return function(c){return js(n,void 0,void 0,Rt().mark(function l(){var u,f,d;return Rt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return u=c.credential,p.next=3,this.submitGoogleOneTapToken({credential:u,loginRedirectUrl:i,signupRedirectUrl:o});case 3:f=p.sent,d=f.redirect_url,a(d);case 6:case"end":return p.stop()}},l,this)}))}},this.RedirectOnSuccess=function(s){window.location.href=s}}return En(t,[{key:"createOneTapClient",value:function(){return js(this,void 0,void 0,Rt().mark(function r(){var n,s,i,o;return Rt().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,this.fetchGoogleStart();case 3:s=c.sent,n=s.googleClientId,c.next=11;break;case 7:return c.prev=7,c.t0=c.catch(0),i=c.t0,c.abrupt("return",{success:!1,reason:i.error_type});case 11:if(n!==""){c.next=13;break}return c.abrupt("return",{success:!1,reason:"oauth_config_not_found"});case 13:return c.t1=Jye,c.next=16,Xye();case 16:return c.t2=c.sent,c.t3=n,o=new c.t1(c.t2,c.t3),c.abrupt("return",{success:!0,client:o});case 20:case"end":return c.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,s=r.loginRedirectUrl,i=r.signupRedirectUrl;return js(this,void 0,void 0,Rt().mark(function o(){var a,c;return Rt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.fetchGoogleStart();case 2:return a=u.sent,c=a.oauthCallbackId,u.abrupt("return",this.clientsideServices.oneTapSubmit({publicToken:this._publicToken,idToken:n,loginRedirectURL:s,oauthCallbackID:c,signupRedirectURL:i}));case 5:case"end":return u.stop()}},o,this)}))}}],[{key:"WillGoogleOneTapShowBannerForUA",value:function(r){var n=function(a,c){return a.indexOf(c)!==-1},s=n(r,"iPad")||n(r,"Android")&&!n(r,"Mobile")||n(r,"Silk"),i=n(r,"iPod")||n(r,"iPhone")||n(r,"Android")||n(r,"IEMobile");return!s&&i}},{key:"WillGoogleOneTapShowEmbedded",value:function(){return!t.WillGoogleOneTapShowBannerForUA(navigator.userAgent)}}]),t}(),e1e="PKCE_VERIFIER";function t1e(t){var e=t.toString(16);return e.length===1&&(e="0"+e),e}function r1e(t){var e;return btoa((e=String.fromCharCode).call.apply(e,[null].concat(mpe(new Uint8Array(t))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var lb=function(){function t(e,r){wn(this,t),this._dataLayer=e,this.namespace=r}return En(t,[{key:"key",value:function(){return e1e+":"+this.namespace}},{key:"startPKCETransaction",value:function(){return js(this,void 0,void 0,Rt().mark(function r(){var n;return Rt().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,t.createProofkeyPair();case 2:return n=i.sent,this._dataLayer.setItem(this.key(),JSON.stringify(n)),i.abrupt("return",n);case 5:case"end":return i.stop()}},r,this)}))}},{key:"getPKPair",value:function(){var r=this._dataLayer.getItem(this.key());if(r!==null)try{return JSON.parse(r)}catch{xi.warn("Found malformed Proof Key pair in localstorage.");return}}},{key:"clearPKPair",value:function(){return this._dataLayer.removeItem(this.key())}}],[{key:"createProofkeyPair",value:function(){return js(this,void 0,void 0,Rt().mark(function r(){var n,s,i;return Rt().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n=new Uint32Array(16),window.crypto.getRandomValues(n),s=Array.from(n).map(t1e).join(""),a.next=5,window.crypto.subtle.digest("SHA-256",new TextEncoder().encode(s));case 5:return i=a.sent,a.abrupt("return",{code_challenge:r1e(i),code_verifier:s});case 7:case"end":return a.stop()}},r)}))}}]),t}(),n1e=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.KEYS_TO_EXCLUDE,n=r===void 0?[]:r,s=function i(o,a){return Ls(o)!==Ls(a)?!1:o===null||a===null?o===a:Ls(o)==="object"?Object.keys(o).length!==Object.keys(a).length||Object.keys(o).some(function(c){return!(c in a)})?!1:Object.entries(o).filter(function(c){var l=z2(c,1),u=l[0];return!n.includes(u)}).every(function(c){var l=z2(c,2),u=l[0],f=l[1];return i(f,a[u])}):o===a};return s},s1e=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}$/))},i1e=function(e){var r,n,s,i,o,a,c,l;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:Hpe,testAPIURL:(i=(s=e==null?void 0:e.endpoints)===null||s===void 0?void 0:s.testAPIURL)!==null&&i!==void 0?i:Vpe,liveAPIURL:(a=(o=e==null?void 0:e.endpoints)===null||o===void 0?void 0:o.liveAPIURL)!==null&&a!==void 0?a:$pe,dfpBackendURL:aye(e),clientsideServicesIframeURL:(l=(c=e==null?void 0:e.endpoints)===null||c===void 0?void 0:c.clientsideServicesIframeURL)!==null&&l!==void 0?l:zpe}}},_1=function(e){var r=document.cookie?document.cookie.split("; "):[],n=r.filter(function(s){var i=s.split("="),o=z2(i,1),a=o[0];return e===a});return n.length>1},o1e="stytch_sdk_state_",_i=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"".concat(o1e).concat(e).concat(r?"::".concat(r):"")};/*! js-cookie v3.0.1 | MIT */function N1(t){for(var e=1;e"u")){o=N1({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in o)o[c]&&(a+="; "+c,o[c]!==!0&&(a+="="+o[c].split(";")[0]));return document.cookie=s+"="+t.write(i,s)+a}}function n(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var i=document.cookie?document.cookie.split("; "):[],o={},a=0;a1&&arguments[1]!==void 0?arguments[1]:!1,s=this._datalayer.state,i=r===null?null:Object.assign(Object.assign({},this._datalayer.state),r);this._datalayer.state=i;var o=this.getFromCache();this.setCacheRefreshed();var a=!W8(s,i);(o||a)&&(q8(this._datalayer.subscriptions,i),a&&!n&&this._datalayer.syncToLocalStorage())}},{key:"updateTokens",value:function(r){var n=r.session_token,s=r.session_jwt,i=this._datalayer.readSessionCookie(),o=Object.assign(Object.assign({},i),{session_token:n,session_jwt:s});n||s?(this._datalayer.writeSessionCookie(o),this._datalayer.removeISTCookie()):this._datalayer.removeSessionCookie()}},{key:"subscribeToState",value:function(r){return y1e(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}(),m1e=function(t){fg(e,t);function e(){var r;return wn(this,e),r=ug(this,e,arguments),r.updateUser=function(n){return r.updateState({user:n})},r.getUser=function(){var n,s;return(s=(n=r.getState())===null||n===void 0?void 0:n.user)!==null&&s!==void 0?s:null},r.getSession=function(){var n,s;return(s=(n=r.getState())===null||n===void 0?void 0:n.session)!==null&&s!==void 0?s:null},r}return En(e)}(v1e),g1e=Symbol.for("stytch__internal_b2c"),x1e=function(e,r){Object.assign(e,hpe({},g1e,r))},b1e=function(t){fg(e,t);function e(r,n,s,i,o){wn(this,e);var a=s;return uj(r)&&(a=i),ug(this,e,[r,n,a,o])}return En(e)}(mj),w1e=En(function t(e,r){var n=this;wn(this,t),oye("StytchHeadlessClient"),iye(e);var s=r,i=i1e(s);this._dataLayer=p1e(e,s),this._subscriptionService=new m1e(e,this._dataLayer),this._stateChangeClient=new $ye(this._subscriptionService,{}),this.onStateChange=function(){var p;return(p=n._stateChangeClient).onStateChange.apply(p,arguments)};var o=function(){var y,g,m,x;return{stytch_user_id:(g=(y=n._dataLayer.state)===null||y===void 0?void 0:y.user)===null||g===void 0?void 0:g.user_id,stytch_session_id:(x=(m=n._dataLayer.state)===null||m===void 0?void 0:m.session)===null||x===void 0?void 0:x.session_id}},a=new lb(this._dataLayer,"passwords");this._networkClient=new mj(e,this._dataLayer,i.endpoints.sdkBackendURL,o),this._apiNetworkClient=new b1e(e,this._dataLayer,i.endpoints.liveAPIURL,i.endpoints.testAPIURL,o);var c=new zye(e,this._networkClient,this._dataLayer),l=new Gye(c.getAsync()),u=new dye(e,i.endpoints.dfpBackendURL,c.getAsync(),l.executeRecaptcha),f=new qye(i.endpoints.clientsideServicesIframeURL),d=new Zye(e,f),h=new Uye(this._networkClient,u);this.user=new mye(this._networkClient,this._subscriptionService),this.session=new gye(this._networkClient,this._subscriptionService),this.magicLinks=new bye(this._networkClient,this._subscriptionService,new lb(this._dataLayer,"magic_links"),a,c.getAsync(),u),this.otps=new wye(this._networkClient,this._subscriptionService,l.executeRecaptcha,u),this.oauth=new Wye(this._networkClient,this._subscriptionService,new lb(this._dataLayer,"oauth"),c.getAsync(),{publicToken:e,testAPIURL:i.endpoints.testAPIURL,liveAPIURL:i.endpoints.liveAPIURL},d),this.cryptoWallets=new Cye(this._networkClient,this._apiNetworkClient,this._subscriptionService,l.executeRecaptcha,u,c.getAsync()),this.totps=new Aye(this._networkClient,this._subscriptionService,u),this.webauthn=new Lye(this._networkClient,this._subscriptionService,u),this.passwords=new Bye(this._networkClient,this._subscriptionService,a,c.getAsync(),u),this._sessionManager=new vj(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}}),x1e(this,{bootstrap:c,clientsideServices:f,captcha:l,oneTap:d,searchManager:h,publicToken:e,dataLayer:this._dataLayer,networkClient:this._networkClient})});const E1e="public-token-test-b10ed486-70f4-44d3-8696-662052833e88";function S1e({children:t}){return k.jsx(Jhe,{stytch:new w1e(E1e),children:t})}const C1e="970987756660-35a6tc48hvi8cev9cnknp0iugv9poa23.apps.googleusercontent.com",K8="970987756660-6ibakd38eibf3cg9rq42hri7o0jn5va8.apps.googleusercontent.com",A1e="AQAAAAAAAEGv4rUgioUNUbcdNZlvOZE72JI",k1e="eyJwcm9qZWN0SWQiOjE2ODE1LCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI2N2V2NXVvc3ZxMzVmcGI2OXI3NnJoYnVoIiwicnBjU2VydmVyIjoiaHR0cHM6Ly93YWFzLnNlcXVlbmNlLmFwcCJ9",Q8="AQAAAAAAAAK2JvvZhWqZ51riasWBftkrVXE",Y8="eyJwcm9qZWN0SWQiOjY5NCwiZW1haWxSZWdpb24iOiJjYS1jZW50cmFsLTEiLCJlbWFpbENsaWVudElkIjoiNTRhdG41dXBpNjNxYzU5YTFlbTN2Ymhyc24iLCJycGNTZXJ2ZXIiOiJodHRwczovL2Rldi13YWFzLnNlcXVlbmNlLmFwcCJ9";new wD("https://nodes.sequence.app/polygon");const dg=new URLSearchParams(window.location.search),T1e=dg.get("env")??"prod";let wj=dg.get("projectAccessKey")??A1e,Ej=dg.get("waasConfigKey")??k1e,Sj=dg.get("googleClientId")??C1e;T1e==="dev"&&(console.log("Using dev environment"),console.log(`Project Access Key: ${Q8}`),console.log(`Waas Config Key: ${Y8}`),console.log(`Google Client ID: ${K8}`),wj=Q8,Ej=Y8,Sj=K8);const Oe=new Lhe({network:"polygon",projectAccessKey:wj,waasConfigKey:Ej}),oi=eee([{path:"/login",element:k.jsx(Zhe,{})},{path:"/",element:k.jsx(dpe,{})}]);db.createRoot(document.getElementById("root")).render(k.jsx(cr.StrictMode,{children:k.jsx(JQ,{children:k.jsx(oX,{children:k.jsx(hee,{clientId:Sj,children:k.jsx(S1e,{children:k.jsx(lee,{router:oi})})})})})})); +See https://stytch.com/docs/oauth#guides_pkce for more information.`),c.next=7,this._networkClient.fetchSDK({url:"/oauth/authenticate",method:"POST",body:Object.assign({token:r,code_verifier:i==null?void 0:i.code_verifier},n),errorMessage:"Failed to authenticate token"});case 7:return o=c.sent,this._pkceManager.clearPKPair(),this._subscriptionService.updateStateAndTokens({state:{session:o.session,user:Ys(o.__user)},session_token:o.session_token,session_jwt:o.session_jwt,intermediate_session_token:null}),c.abrupt("return",qt(o));case 11:case"end":return c.stop()}},s,this)}))}},{key:"getBaseApiUrl",value:function(){return be(this,void 0,void 0,Z().mark(function r(){var n,s;return Z().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this._dynamicConfig;case 2:if(n=o.sent,s=n.cnameDomain,!s){o.next=6;break}return o.abrupt("return","https://".concat(s));case 6:if(!fj(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 s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=s.login_redirect_url,o=s.signup_redirect_url,a=s.custom_scopes,c=s.provider_params;return be(n,void 0,void 0,Z().mark(function l(){var u,f,d,h,p,y,g;return Z().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,this._dynamicConfig;case 2:return u=x.sent,f=u.cnameDomain,d=u.pkceRequiredForOAuth,x.next=7,this.getBaseApiUrl();case 7:if(h=x.sent,this._networkClient.logEvent({name:"start_oauth_flow",details:{provider_type:r,custom_scopes:a,cname_domain:f,pkce:d,provider_params:c}}),p=new URL("".concat(h,"/v1/public/oauth/").concat(r,"/start")),p.searchParams.set("public_token",this._config.publicToken),!d){x.next=18;break}return x.next=14,this._pkceManager.startPKCETransaction();case 14:y=x.sent,p.searchParams.set("code_challenge",y.code_challenge),x.next=19;break;case 18:this._pkceManager.clearPKPair();case 19:if(a&&(Tt("startOAuthFlow").isStringArray("custom_scopes",a),p.searchParams.set("custom_scopes",a.join(" "))),c){Tt("startOAuthFlow").isOptionalObject("provider_params",c);for(g in c)p.searchParams.set("provider_"+g,c[g])}i&&p.searchParams.set("login_redirect_url",i),o&&p.searchParams.set("signup_redirect_url",o),window.location.href=p.toString();case 24:case"end":return x.stop()}},l,this)}))}}}]),t}(),Sye=Promise.resolve({siweRequiredForCryptoWallets:!1}),Cye=function(){function t(e,r,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return Promise.resolve(void 0)},i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Sye;_r(this,t),this._networkClient=e,this._apiNetworkClient=r,this._subscriptionService=n,this.executeRecaptcha=s,this.dfpProtectedAuth=i,this._config=o}return Or(t,[{key:"authenticateStart",value:function(r){var n;return be(this,void 0,void 0,Z().mark(function s(){var i,o,a,c,l,u,f;return Z().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return Tt("stytch.cryptoWallets.authenticateStart").isString("crypto_wallet_address",r.crypto_wallet_address).isString("crypto_wallet_type",r.crypto_wallet_type),r.siwe_params&&Tt("stytch.cryptoWallets.authenticateStart").isOptionalString("uri",r.siwe_params.uri).isOptionalString("chain_id",r.siwe_params.chain_id).isOptionalString("issued_at",r.siwe_params.issued_at).isOptionalString("statement",r.siwe_params.statement).isOptionalString("not_before",r.siwe_params.not_before).isOptionalString("message_request_id",r.siwe_params.message_request_id).isOptionalStringArray("resources",r.siwe_params.resources),i=!!this._subscriptionService.getSession(),h.next=5,this.executeRecaptcha();case 5:return o=h.sent,h.next=8,this._config;case 8:return a=h.sent,c=a.siweRequiredForCryptoWallets,l={crypto_wallet_address:r.crypto_wallet_address,crypto_wallet_type:r.crypto_wallet_type},c&&r.crypto_wallet_type=="ethereum"&&(l.siwe_params=Object.assign(Object.assign({},r.siwe_params),{uri:((n=r.siwe_params)===null||n===void 0?void 0:n.uri)||window.location.origin})),u=i?"/crypto_wallets/authenticate/start/secondary":"/crypto_wallets/authenticate/start/primary",f=Object.assign(Object.assign({},l),{captcha_token:o}),h.abrupt("return",this._apiNetworkClient.fetchSDK({url:u,method:"POST",errorMessage:"Failed to start wallet authentication.",body:f}));case 15:case"end":return h.stop()}},s,this)}))}},{key:"authenticate",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("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),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.next=8,this._apiNetworkClient.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:Ys(a.__user)},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}}]),t}(),Aye=function(){function t(e,r,n){_r(this,t),this._networkClient=e,this._subscriptionService=r,this.dfpProtectedAuth=n}return Or(t,[{key:"create",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s;return Z().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return Tt("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 s=o.sent,this._subscriptionService.updateUser(s.__user),o.abrupt("return",qt(s));case 6:case"end":return o.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.totps.authenticate").isNumber("session_duration_minutes",r.session_duration_minutes).isString("totp_code",r.totp_code),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}},{key:"recoveryCodes",value:function(){return be(this,void 0,void 0,Z().mark(function r(){return Z().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",this._networkClient.fetchSDK({url:"/totps/recovery_codes",method:"POST",errorMessage:"Failed to retrieve recovery codes"}));case 1:case"end":return s.stop()}},r,this)}))}},{key:"recover",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.totps.recover").isNumber("session_duration_minutes",r.session_duration_minutes).isString("recovery_code",r.recovery_code),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}}]),t}();function dj(t){for(var e="==".slice(0,(4-t.length%4)%4),r=t.replace(/-/g,"+").replace(/_/g,"/")+e,n=atob(r),s=new ArrayBuffer(n.length),i=new Uint8Array(s),o=0;o with `"webauthn"` in its `autocomplete` attribute was detected'),!1):!0}}return Or(t,[{key:"register",value:function(r){var n,s;return be(this,void 0,void 0,Z().mark(function i(){var o,a,c,l,u;return Z().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return Tt("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:(s=r==null?void 0:r.authenticator_type)!==null&&s!==void 0?s: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,c=JSON.parse(a),d.next=8,_ye({publicKey:c});case 8:return l=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(l),session_duration_minutes:r==null?void 0:r.session_duration_minutes}});case 11:return u=d.sent,this._subscriptionService.updateStateAndTokens({state:{session:u.session,user:u.__user},session_token:u.session_token,session_jwt:u.session_jwt,intermediate_session_token:null}),d.abrupt("return",qt(u));case 14:case"end":return d.stop()}},i,this)}))}},{key:"authenticate",value:function(r){var n,s;return be(this,void 0,void 0,Z().mark(function i(){var o,a,c,l,u,f,d,h,p,y,g,m;return Z().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return Tt("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),b.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:if(o=b.sent,a=o.dfp_telemetry_id,c=o.captcha_token,!r.conditional_mediation){b.next=14;break}return b.next=9,this.browserSupportsAutofill();case 9:if(b.sent){b.next=12;break}return console.error("Browser does not support WebAuthn autofill"),b.abrupt("return",null);case 12:if(this.checkEligibleInputs()){b.next=14;break}return b.abrupt("return",null);case 14:return l=!!this._subscriptionService.getSession(),u=l?"/webauthn/authenticate/start/secondary":"/webauthn/authenticate/start/primary",b.next=18,this._networkClient.fetchSDK({url:u,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 f=b.sent,d=f.public_key_credential_request_options,h=new AbortController,p={publicKey:JSON.parse(d),signal:(s=r.signal)!==null&&s!==void 0?s:h.signal},y=Object.assign(Object.assign({},p),{mediation:"conditional"}),b.next=25,Dye(r.conditional_mediation?y:p);case 25:return g=b.sent,b.next=28,this._networkClient.retriableFetchSDK({url:"/webauthn/authenticate",method:"POST",errorMessage:"Failed to authenticate WebAuthn device",body:{public_key_credential:JSON.stringify(g),session_duration_minutes:r.session_duration_minutes,dfp_telemetry_id:a,captcha_token:c},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 28:return m=b.sent,this._subscriptionService.updateStateAndTokens({state:{session:m.session,user:m.__user},session_token:m.session_token,session_jwt:m.session_jwt,intermediate_session_token:null}),b.abrupt("return",qt(m));case 31:case"end":return b.stop()}},i,this)}))}},{key:"update",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s;return Z().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return s="/webauthn/update/"+r.webauthn_registration_id,o.next=3,this._networkClient.fetchSDK({url:s,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 be(this,void 0,void 0,Z().mark(function r(){var n;return Z().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(n=window.PublicKeyCredential,!(n===void 0||n.isConditionalMediationAvailable===void 0)){i.next=3;break}return i.abrupt("return",new Promise(function(o){return o(!1)}));case 3:return i.abrupt("return",n.isConditionalMediationAvailable());case 4:case"end":return i.stop()}},r)}))}}]),t}(),jye=Promise.resolve({pkceRequiredForPasswordResets:!1}),Bye=function(){function t(e,r,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:jye,i=arguments.length>4?arguments[4]:void 0;_r(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._config=s,this.dfpProtectedAuth=i}return Or(t,[{key:"getCodeChallenge",value:function(){return be(this,void 0,void 0,Z().mark(function r(){var n,s,i;return Z().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this._config;case 2:if(n=a.sent,s=n.pkceRequiredForPasswordResets,s){a.next=6;break}return a.abrupt("return",void 0);case 6:return a.next=8,this._pkceManager.getPKPair();case 8:if(i=a.sent,!i){a.next=11;break}return a.abrupt("return",i.code_challenge);case 11:return a.next=13,this._pkceManager.startPKCETransaction();case 13:return i=a.sent,a.abrupt("return",i.code_challenge);case 15:case"end":return a.stop()}},r,this)}))}},{key:"create",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.passwords.create").isString("password",r.password).isString("email",r.email).isNumber("session_duration_minutes",r.session_duration_minutes),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.passwords.authenticate").isString("password",r.password).isString("email",r.email).isNumber("session_duration_minutes",r.session_duration_minutes),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}},{key:"resetByEmailStart",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("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),l.next=3,this.getCodeChallenge();case 3:return s=l.sent,l.next=6,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 6:return i=l.sent,o=i.dfp_telemetry_id,a=i.captcha_token,l.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:s,captcha_token:a,dfp_telemetry_id:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 10:case"end":return l.stop()}},n,this)}))}},{key:"resetByEmail",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a,c,l;return Z().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return Tt("stytch.passwords.resetByEmail").isString("token",r.token).isString("password",r.password).isNumber("session_duration_minutes",r.session_duration_minutes),f.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=f.sent,i=s.dfp_telemetry_id,o=s.captcha_token,f.next=8,this._pkceManager.getPKPair();case 8:return a=f.sent,c=a==null?void 0:a.code_verifier,f.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:c,dfp_telemetry_id:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 12:return l=f.sent,this._pkceManager.clearPKPair(),this._subscriptionService.updateStateAndTokens({state:{session:l.session,user:l.user},session_token:l.session_token,session_jwt:l.session_jwt,intermediate_session_token:null}),f.abrupt("return",qt(l));case 16:case"end":return f.stop()}},n,this)}))}},{key:"resetByExistingPassword",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("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),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i,captcha_token:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",qt(a));case 11:case"end":return l.stop()}},n,this)}))}},{key:"resetBySession",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){var s,i,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return Tt("stytch.passwords.resetBySession").isString("password",r.password),l.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return s=l.sent,i=s.dfp_telemetry_id,o=s.captcha_token,l.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:i,captcha_token:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=l.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}),l.abrupt("return",a);case 11:case"end":return l.stop()}},n,this)}))}},{key:"strengthCheck",value:function(r){return be(this,void 0,void 0,Z().mark(function n(){return Z().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return Tt("stytch.passwords.strengthCheck").isOptionalString("email",r.email).isString("password",r.password),i.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 i.stop()}},n,this)}))}}]),t}();Promise.resolve({pkceRequiredForEmailMagicLinks:!1});Promise.resolve({pkceRequiredForPasswordResets:!1});var Fye=function(){function t(e){_r(this,t),this.iframeURL=e,this.createIframe()}return Or(t,[{key:"createIframe",value:function(){var r=document.querySelector('[src~="'.concat(this.iframeURL,'"]'));if(r?xi.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 be(this,void 0,void 0,Z().mark(function s(){var i=this,o,a;return Z().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.frame;case 2:return o=l.sent,a=new MessageChannel,l.abrupt("return",new Promise(function(u,f){var d;a.port1.onmessage=function(p){var y=p.data;a.port1.close(),y.success?u(y.payload):f(hye.unmarshall(y.error))};var h={method:r,args:n};(d=o.contentWindow)===null||d===void 0||d.postMessage(h,i.iframeURL,[a.port2])}));case 5:case"end":return l.stop()}},s,this)}))}}]),t}(),Uye=function(){function t(e,r){_r(this,t),this._networkClient=e,this.dfpProtectedAuth=r}return Or(t,[{key:"searchUser",value:function(r){var n=this;return this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha().then(function(s){var i=s.dfp_telemetry_id,o=s.captcha_token;return n._networkClient.fetchSDK({url:"/users/search",method:"POST",body:{email:r,dfp_telemetry_id:i,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}(),Vye=function(e){return!!(e!=null&&e.session)},mj=function(){function t(e,r){var n=this;_r(this,t),this._subscriptionService=e,this._headlessSessionClient=r,this._onDataChange=function(s){Vye(s)?n.scheduleBackgroundRefresh():n.cancelBackgroundRefresh()},this._reauthenticateWithBackoff=function(){return be(n,void 0,void 0,Z().mark(function s(){var i;return Z().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:i=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 i++,a.next=15,new Promise(function(c){return setTimeout(c,t.timeoutForAttempt(i))});case 15:a.next=1;break;case 17:case"end":return a.stop()}},s,this,[[2,8]])}))},this.timeout=null,this._subscriptionService.subscribeToState(this._onDataChange)}return Or(t,[{key:"performBackgroundRefresh",value:function(){var r=this;this._reauthenticateWithBackoff().then(function(){r.scheduleBackgroundRefresh()}).catch(function(n){xi.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,s=2e3*Math.pow(2,r);return n+s}},{key:"isUnrecoverableError",value:function(r){return W2.includes(r.error_type)}}]),t}();mj.REFRESH_INTERVAL_MS=1e3*60*3;var $ye=Or(function t(e,r){var n=this;_r(this,t),this._subscriptionService=e,this.emptyState=r,this.onStateChange=function(s){return n._subscriptionService.subscribeToState(function(i){s(i??n.emptyState)})}}),G8="bootstrap",cb=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,siweRequiredForCryptoWallets:!1}},zye=function(){function t(e,r,n){var s=this;wn(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(i){return s._dataLayer.setItem(G8,JSON.stringify(i)),i}).catch(function(i){return xi.error(i),cb()})}return En(t,[{key:"getSync",value:function(){var r=this._dataLayer.getItem(G8);if(r===null)return cb();try{return JSON.parse(r)}catch{return cb()}}},{key:"getAsync",value:function(){return this._bootstrapDataPromise}}],[{key:"mapBootstrapData",value:function(r){var n,s,i=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:i,runDFPProtectedAuth:(n=r.dfp_protected_auth_enabled)!==null&&n!==void 0?n:!1,dfpProtectedAuthMode:r.dfp_protected_auth_mode,rbacPolicy:(s=r.rbac_policy)!==null&&s!==void 0?s:null,siweRequiredForCryptoWallets:r.siwe_required_for_crypto_wallets}}}]),t}();function js(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?i(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}var Hye=function(e){return Ok("https://www.google.com/recaptcha/enterprise.js?render=".concat(e),function(){return window.grecaptcha.enterprise})},Gye=En(function t(e){var r=this;wn(this,t),this.bootstrapPromise=e,this.executeRecaptcha=function(){return js(r,void 0,void 0,Rt().mark(function n(){var s,i,o,a;return Rt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.state;case 2:if(s=l.sent,i=s.captchaClient,o=s.configured,a=s.siteKey,o){l.next=8;break}return l.abrupt("return",void 0);case 8:return l.next=10,new Promise(function(u){return i.ready(u)});case 10:return l.abrupt("return",i.execute(a,{action:"LOGIN"}));case 11:case"end":return l.stop()}},n,this)}))},this.state=e.then(function(n){return js(r,void 0,void 0,Rt().mark(function s(){return Rt().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,Hye(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()}},s)}))})}),qye=function(){function t(e){var r=this;wn(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 En(t,[{key:"frameClient",get:function(){var r;return this._frameClient=(r=this._frameClient)!==null&&r!==void 0?r:new Fye(this.iframeURL),this._frameClient}},{key:"call",value:function(r,n){return this.frameClient.call(r,[n])}}]),t}(),Wye=function(t){fg(e,t);function e(r,n,s,i,o,a){var c;return wn(this,e),c=ug(this,e,[r,n,s,i,o]),c._oneTap=a,c.startOneTap=function(l){return js(rj(c),void 0,void 0,Rt().mark(function u(){var f,d,h;return Rt().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this._oneTap.createOneTapClient();case 2:if(f=y.sent,f.success){y.next=5;break}throw new Error("One Tap could not load: ".concat(f.reason));case 5:return d=f.client,h=this._oneTap.createOnSuccessHandler({signupRedirectUrl:l.signup_redirect_url,loginRedirectUrl:l.login_redirect_url,onSuccess:this._oneTap.RedirectOnSuccess}),y.abrupt("return",d.render({style:{position:Ac.floating},onOneTapCancelled:l.onOneTapCancelled,callback:h}));case 8:case"end":return y.stop()}},u,this)}))},c.googleOneTap={start:c.startOneTap},c}return En(e)}(Eye),Kye="4.18.2",gj=function(){function t(e,r,n,s){wn(this,t),this._publicToken=e,this._subscriptionDataLayer=r,this.baseURL=n,this.additionalTelemetryDataFn=s,this.updateSessionToken=function(){return null},this.eventLogger=new vye({maxBatchSize:pye,intervalDurationMs:yye,logEventURL:this.buildSDKUrl("/events")})}return En(t,[{key:"logEvent",value:function(r){var n=r.name,s=r.details,i=r.error,o=i===void 0?{}:i;this.eventLogger.logEvent(this.createTelemetryBlob(),{public_token:this._publicToken,event_name:n,details:s,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:cye(),app_session_id:lye(),persistent_id:uye(),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:Kye}})}},{key:"fetchSDK",value:function(r){var n=r.url,s=r.body,i=r.errorMessage,o=r.method;return js(this,void 0,void 0,Rt().mark(function a(){var c,l,u,f;return Rt().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=this._subscriptionDataLayer.readSessionCookie().session_token,l="Basic "+window.btoa(this._publicToken+":"+(c||this._publicToken)),u=window.btoa(JSON.stringify(this.createTelemetryBlob())),f=window.location.origin,h.abrupt("return",Q2({basicAuthHeader:l,body:s,errorMessage:i,finalURL:this.buildSDKUrl(n),method:o,xSDKClientHeader:u,xSDKParentHostHeader:f}));case 5:case"end":return h.stop()}},a,this)}))}},{key:"retriableFetchSDK",value:function(r){var n=r.url,s=r.body,i=r.errorMessage,o=r.method,a=r.retryCallback;return js(this,void 0,void 0,Rt().mark(function c(){var l,u,f,d;return Rt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return l=this._subscriptionDataLayer.readSessionCookie().session_token,u="Basic "+window.btoa(this._publicToken+":"+(l||this._publicToken)),f=window.btoa(JSON.stringify(this.createTelemetryBlob())),d=window.location.origin,p.abrupt("return",Kpe({basicAuthHeader:u,body:s,errorMessage:i,finalURL:this.buildSDKUrl(n),method:o,xSDKClientHeader:f,xSDKParentHostHeader:d,retryCallback:a}));case 5:case"end":return p.stop()}},c,this)}))}},{key:"buildSDKUrl",value:function(r){return"".concat(this.baseURL,"/sdk/v1").concat(r)}}]),t}(),Qye=typeof window<"u"&&"IdentityCredential"in window,xj=function(e){return e===Ac.forceLegacyEmbedded?"force":e===Ac.embeddedOnly||e===Ac.embedded||e===Ac.floatingOrEmbedded},Yye=function(e){var r=xj(e);return r==="force"||r&&!Qye},Jye=function(){function t(e,r){wn(this,t),this._googleClient=e,this._clientId=r}return En(t,[{key:"cancel",value:function(){this._googleClient.cancel()}},{key:"render",value:function(r){var n=r.callback,s=r.onOneTapCancelled,i=r.style;return js(this,void 0,void 0,Rt().mark(function o(){var a=this,c,l,u;return Rt().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=xj(i.position),l=Yye(i.position),u={client_id:this._clientId,callback:n,auto_select:!1,context:"use",itp_support:!0,use_fedcm_for_prompt:c!=="force"},l&&(u.prompt_parent_id="google-parent-prompt",u.cancel_on_tap_outside=!1),this._googleClient.initialize(u),d.abrupt("return",new Promise(function(h){a._googleClient.prompt(function(p){var y,g,m,x,b;if(p.isSkippedMoment()){var w=(g=(y=p.getSkippedReason)===null||y===void 0?void 0:y.call(p))!==null&&g!==void 0?g:"unknown_reason";return w==="user_cancel"&&(s==null||s()),h({success:!1,reason:w})}if(!p.isNotDisplayed&&l||!((m=p.isNotDisplayed)===null||m===void 0)&&m.call(p))return h({success:!1,reason:(b=(x=p.getNotDisplayedReason)===null||x===void 0?void 0:x.call(p))!==null&&b!==void 0?b:"unknown_reason"});if(!p.isDismissedMoment())return a.styleFrame(l),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(cj)&&(n.style.width="100%")})}}]),t}(),Xye=function(){return Ok(Wpe,function(){return window.google.accounts.id})},Zye=function(){function t(e,r){var n=this;wn(this,t),this._publicToken=e,this.clientsideServices=r,this.createOnSuccessHandler=function(s){var i=s.loginRedirectUrl,o=s.signupRedirectUrl,a=s.onSuccess;return function(c){return js(n,void 0,void 0,Rt().mark(function l(){var u,f,d;return Rt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return u=c.credential,p.next=3,this.submitGoogleOneTapToken({credential:u,loginRedirectUrl:i,signupRedirectUrl:o});case 3:f=p.sent,d=f.redirect_url,a(d);case 6:case"end":return p.stop()}},l,this)}))}},this.RedirectOnSuccess=function(s){window.location.href=s}}return En(t,[{key:"createOneTapClient",value:function(){return js(this,void 0,void 0,Rt().mark(function r(){var n,s,i,o;return Rt().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,this.fetchGoogleStart();case 3:s=c.sent,n=s.googleClientId,c.next=11;break;case 7:return c.prev=7,c.t0=c.catch(0),i=c.t0,c.abrupt("return",{success:!1,reason:i.error_type});case 11:if(n!==""){c.next=13;break}return c.abrupt("return",{success:!1,reason:"oauth_config_not_found"});case 13:return c.t1=Jye,c.next=16,Xye();case 16:return c.t2=c.sent,c.t3=n,o=new c.t1(c.t2,c.t3),c.abrupt("return",{success:!0,client:o});case 20:case"end":return c.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,s=r.loginRedirectUrl,i=r.signupRedirectUrl;return js(this,void 0,void 0,Rt().mark(function o(){var a,c;return Rt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.fetchGoogleStart();case 2:return a=u.sent,c=a.oauthCallbackId,u.abrupt("return",this.clientsideServices.oneTapSubmit({publicToken:this._publicToken,idToken:n,loginRedirectURL:s,oauthCallbackID:c,signupRedirectURL:i}));case 5:case"end":return u.stop()}},o,this)}))}}],[{key:"WillGoogleOneTapShowBannerForUA",value:function(r){var n=function(a,c){return a.indexOf(c)!==-1},s=n(r,"iPad")||n(r,"Android")&&!n(r,"Mobile")||n(r,"Silk"),i=n(r,"iPod")||n(r,"iPhone")||n(r,"Android")||n(r,"IEMobile");return!s&&i}},{key:"WillGoogleOneTapShowEmbedded",value:function(){return!t.WillGoogleOneTapShowBannerForUA(navigator.userAgent)}}]),t}(),e1e="PKCE_VERIFIER";function t1e(t){var e=t.toString(16);return e.length===1&&(e="0"+e),e}function r1e(t){var e;return btoa((e=String.fromCharCode).call.apply(e,[null].concat(mpe(new Uint8Array(t))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var lb=function(){function t(e,r){wn(this,t),this._dataLayer=e,this.namespace=r}return En(t,[{key:"key",value:function(){return e1e+":"+this.namespace}},{key:"startPKCETransaction",value:function(){return js(this,void 0,void 0,Rt().mark(function r(){var n;return Rt().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,t.createProofkeyPair();case 2:return n=i.sent,this._dataLayer.setItem(this.key(),JSON.stringify(n)),i.abrupt("return",n);case 5:case"end":return i.stop()}},r,this)}))}},{key:"getPKPair",value:function(){var r=this._dataLayer.getItem(this.key());if(r!==null)try{return JSON.parse(r)}catch{xi.warn("Found malformed Proof Key pair in localstorage.");return}}},{key:"clearPKPair",value:function(){return this._dataLayer.removeItem(this.key())}}],[{key:"createProofkeyPair",value:function(){return js(this,void 0,void 0,Rt().mark(function r(){var n,s,i;return Rt().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n=new Uint32Array(16),window.crypto.getRandomValues(n),s=Array.from(n).map(t1e).join(""),a.next=5,window.crypto.subtle.digest("SHA-256",new TextEncoder().encode(s));case 5:return i=a.sent,a.abrupt("return",{code_challenge:r1e(i),code_verifier:s});case 7:case"end":return a.stop()}},r)}))}}]),t}(),n1e=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.KEYS_TO_EXCLUDE,n=r===void 0?[]:r,s=function i(o,a){return Ls(o)!==Ls(a)?!1:o===null||a===null?o===a:Ls(o)==="object"?Object.keys(o).length!==Object.keys(a).length||Object.keys(o).some(function(c){return!(c in a)})?!1:Object.entries(o).filter(function(c){var l=z2(c,1),u=l[0];return!n.includes(u)}).every(function(c){var l=z2(c,2),u=l[0],f=l[1];return i(f,a[u])}):o===a};return s},s1e=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}$/))},i1e=function(e){var r,n,s,i,o,a,c,l;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:Hpe,testAPIURL:(i=(s=e==null?void 0:e.endpoints)===null||s===void 0?void 0:s.testAPIURL)!==null&&i!==void 0?i:Vpe,liveAPIURL:(a=(o=e==null?void 0:e.endpoints)===null||o===void 0?void 0:o.liveAPIURL)!==null&&a!==void 0?a:$pe,dfpBackendURL:aye(e),clientsideServicesIframeURL:(l=(c=e==null?void 0:e.endpoints)===null||c===void 0?void 0:c.clientsideServicesIframeURL)!==null&&l!==void 0?l:zpe}}},_1=function(e){var r=document.cookie?document.cookie.split("; "):[],n=r.filter(function(s){var i=s.split("="),o=z2(i,1),a=o[0];return e===a});return n.length>1},o1e="stytch_sdk_state_",_i=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"".concat(o1e).concat(e).concat(r?"::".concat(r):"")};/*! js-cookie v3.0.1 | MIT */function N1(t){for(var e=1;e"u")){o=N1({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in o)o[c]&&(a+="; "+c,o[c]!==!0&&(a+="="+o[c].split(";")[0]));return document.cookie=s+"="+t.write(i,s)+a}}function n(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var i=document.cookie?document.cookie.split("; "):[],o={},a=0;a1&&arguments[1]!==void 0?arguments[1]:!1,s=this._datalayer.state,i=r===null?null:Object.assign(Object.assign({},this._datalayer.state),r);this._datalayer.state=i;var o=this.getFromCache();this.setCacheRefreshed();var a=!W8(s,i);(o||a)&&(q8(this._datalayer.subscriptions,i),a&&!n&&this._datalayer.syncToLocalStorage())}},{key:"updateTokens",value:function(r){var n=r.session_token,s=r.session_jwt,i=this._datalayer.readSessionCookie(),o=Object.assign(Object.assign({},i),{session_token:n,session_jwt:s});n||s?(this._datalayer.writeSessionCookie(o),this._datalayer.removeISTCookie()):this._datalayer.removeSessionCookie()}},{key:"subscribeToState",value:function(r){return y1e(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}(),m1e=function(t){fg(e,t);function e(){var r;return wn(this,e),r=ug(this,e,arguments),r.updateUser=function(n){return r.updateState({user:n})},r.getUser=function(){var n,s;return(s=(n=r.getState())===null||n===void 0?void 0:n.user)!==null&&s!==void 0?s:null},r.getSession=function(){var n,s;return(s=(n=r.getState())===null||n===void 0?void 0:n.session)!==null&&s!==void 0?s:null},r}return En(e)}(v1e),g1e=Symbol.for("stytch__internal_b2c"),x1e=function(e,r){Object.assign(e,hpe({},g1e,r))},b1e=function(t){fg(e,t);function e(r,n,s,i,o){wn(this,e);var a=s;return fj(r)&&(a=i),ug(this,e,[r,n,a,o])}return En(e)}(gj),w1e=En(function t(e,r){var n=this;wn(this,t),oye("StytchHeadlessClient"),iye(e);var s=r,i=i1e(s);this._dataLayer=p1e(e,s),this._subscriptionService=new m1e(e,this._dataLayer),this._stateChangeClient=new $ye(this._subscriptionService,{}),this.onStateChange=function(){var p;return(p=n._stateChangeClient).onStateChange.apply(p,arguments)};var o=function(){var y,g,m,x;return{stytch_user_id:(g=(y=n._dataLayer.state)===null||y===void 0?void 0:y.user)===null||g===void 0?void 0:g.user_id,stytch_session_id:(x=(m=n._dataLayer.state)===null||m===void 0?void 0:m.session)===null||x===void 0?void 0:x.session_id}},a=new lb(this._dataLayer,"passwords");this._networkClient=new gj(e,this._dataLayer,i.endpoints.sdkBackendURL,o),this._apiNetworkClient=new b1e(e,this._dataLayer,i.endpoints.liveAPIURL,i.endpoints.testAPIURL,o);var c=new zye(e,this._networkClient,this._dataLayer),l=new Gye(c.getAsync()),u=new dye(e,i.endpoints.dfpBackendURL,c.getAsync(),l.executeRecaptcha),f=new qye(i.endpoints.clientsideServicesIframeURL),d=new Zye(e,f),h=new Uye(this._networkClient,u);this.user=new mye(this._networkClient,this._subscriptionService),this.session=new gye(this._networkClient,this._subscriptionService),this.magicLinks=new bye(this._networkClient,this._subscriptionService,new lb(this._dataLayer,"magic_links"),a,c.getAsync(),u),this.otps=new wye(this._networkClient,this._subscriptionService,l.executeRecaptcha,u),this.oauth=new Wye(this._networkClient,this._subscriptionService,new lb(this._dataLayer,"oauth"),c.getAsync(),{publicToken:e,testAPIURL:i.endpoints.testAPIURL,liveAPIURL:i.endpoints.liveAPIURL},d),this.cryptoWallets=new Cye(this._networkClient,this._apiNetworkClient,this._subscriptionService,l.executeRecaptcha,u,c.getAsync()),this.totps=new Aye(this._networkClient,this._subscriptionService,u),this.webauthn=new Lye(this._networkClient,this._subscriptionService,u),this.passwords=new Bye(this._networkClient,this._subscriptionService,a,c.getAsync(),u),this._sessionManager=new mj(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}}),x1e(this,{bootstrap:c,clientsideServices:f,captcha:l,oneTap:d,searchManager:h,publicToken:e,dataLayer:this._dataLayer,networkClient:this._networkClient})});const E1e="public-token-test-b10ed486-70f4-44d3-8696-662052833e88";function S1e({children:t}){return k.jsx(Jhe,{stytch:new w1e(E1e),children:t})}const C1e="970987756660-35a6tc48hvi8cev9cnknp0iugv9poa23.apps.googleusercontent.com",K8="970987756660-6ibakd38eibf3cg9rq42hri7o0jn5va8.apps.googleusercontent.com",A1e="AQAAAAAAAEGv4rUgioUNUbcdNZlvOZE72JI",k1e="eyJwcm9qZWN0SWQiOjE2ODE1LCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI2N2V2NXVvc3ZxMzVmcGI2OXI3NnJoYnVoIiwicnBjU2VydmVyIjoiaHR0cHM6Ly93YWFzLnNlcXVlbmNlLmFwcCJ9",Q8="AQAAAAAAAAK2JvvZhWqZ51riasWBftkrVXE",Y8="eyJwcm9qZWN0SWQiOjY5NCwiZW1haWxSZWdpb24iOiJjYS1jZW50cmFsLTEiLCJlbWFpbENsaWVudElkIjoiNTRhdG41dXBpNjNxYzU5YTFlbTN2Ymhyc24iLCJycGNTZXJ2ZXIiOiJodHRwczovL2Rldi13YWFzLnNlcXVlbmNlLmFwcCJ9";new wD("https://nodes.sequence.app/polygon");const dg=new URLSearchParams(window.location.search),T1e=dg.get("env")??"prod";let Ej=dg.get("projectAccessKey")??A1e,Sj=dg.get("waasConfigKey")??k1e,Cj=dg.get("googleClientId")??C1e;T1e==="dev"&&(console.log("Using dev environment"),console.log(`Project Access Key: ${Q8}`),console.log(`Waas Config Key: ${Y8}`),console.log(`Google Client ID: ${K8}`),Ej=Q8,Sj=Y8,Cj=K8);const Oe=new Lhe({network:"polygon",projectAccessKey:Ej,waasConfigKey:Sj}),oi=tee([{path:"/login",element:k.jsx(Zhe,{})},{path:"/",element:k.jsx(dpe,{})}]);db.createRoot(document.getElementById("root")).render(k.jsx(cr.StrictMode,{children:k.jsx(XQ,{children:k.jsx(aX,{children:k.jsx(pee,{clientId:Cj,children:k.jsx(S1e,{children:k.jsx(uee,{router:oi})})})})})})); diff --git a/index.html b/index.html index c5354c8..665148e 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Demo Waas App - +