From f9a33ea40e62c5df9e4b67208fd64114920e68ef Mon Sep 17 00:00:00 2001 From: taylanpince Date: Tue, 10 Sep 2024 12:06:22 +0000 Subject: [PATCH] Build: (6b51f5d) Update README.md (#46) --- .../{index-a10cb6e1.js => index-683cafba.js} | 116 +++++++++--------- index.html | 2 +- 2 files changed, 59 insertions(+), 59 deletions(-) rename assets/{index-a10cb6e1.js => index-683cafba.js} (60%) diff --git a/assets/index-a10cb6e1.js b/assets/index-683cafba.js similarity index 60% rename from assets/index-a10cb6e1.js rename to assets/index-683cafba.js index e5c06b5..c139bf0 100644 --- a/assets/index-a10cb6e1.js +++ b/assets/index-683cafba.js @@ -1,4 +1,4 @@ -var Bj=Object.defineProperty;var Fj=(t,e,r)=>e in t?Bj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var z=(t,e,r)=>(Fj(t,typeof e!="symbol"?e+"":e,r),r),yg=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var S=(t,e,r)=>(yg(t,e,"read from private field"),r?r.call(t):e.get(t)),q=(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)=>(yg(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Sd=(t,e,r,n)=>({set _(s){N(t,e,s,r)},get _(){return S(t,e,n)}}),ee=(t,e,r)=>(yg(t,e,"access private method"),r);function Z8(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 J2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e5={exports:{}},$0={},t5={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 z=(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)),q=(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 Bj=Object.defineProperty;var Fj=(t,e,r)=>e in t?Bj(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 Qp=Symbol.for("react.element"),Uj=Symbol.for("react.portal"),Vj=Symbol.for("react.fragment"),$j=Symbol.for("react.strict_mode"),zj=Symbol.for("react.profiler"),Hj=Symbol.for("react.provider"),Gj=Symbol.for("react.context"),qj=Symbol.for("react.forward_ref"),Wj=Symbol.for("react.suspense"),Kj=Symbol.for("react.memo"),Qj=Symbol.for("react.lazy"),Wk=Symbol.iterator;function Yj(t){return t===null||typeof t!="object"?null:(t=Wk&&t[Wk]||t["@@iterator"],typeof t=="function"?t:null)}var r5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},n5=Object.assign,s5={};function nd(t,e,r){this.props=t,this.context=e,this.refs=s5,this.updater=r||r5}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 i5(){}i5.prototype=nd.prototype;function X2(t,e,r){this.props=t,this.context=e,this.refs=s5,this.updater=r||r5}var Z2=X2.prototype=new i5;Z2.constructor=X2;n5(Z2,nd.prototype);Z2.isPureReactComponent=!0;var Kk=Array.isArray,o5=Object.prototype.hasOwnProperty,eE={current:null},a5={key:!0,ref:!0,__self:!0,__source:!0};function c5(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)o5.call(e,n)&&!a5.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1e in t?Bj(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 tB=v,rB=Symbol.for("react.element"),nB=Symbol.for("react.fragment"),sB=Object.prototype.hasOwnProperty,iB=tB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oB={key:!0,ref:!0,__self:!0,__source:!0};function f5(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)sB.call(e,n)&&!oB.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:rB,type:t,key:i,ref:o,props:s,_owner:iB.current}}$0.Fragment=nB;$0.jsx=f5;$0.jsxs=f5;e5.exports=$0;var k=e5.exports,fb={},d5={exports:{}},zn={},h5={exports:{}},p5={};/** + */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 Bj=Object.defineProperty;var Fj=(t,e,r)=>e in t?Bj(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 F=R.length;R.push(I);e:for(;0>>1,J=R[B];if(0>>1;Bs(we,F))ves(oe,we)?(R[B]=oe,R[ve]=F,B=ve):(R[B]=we,R[ae]=F,B=ae);else if(ves(oe,F))R[B]=oe,R[ve]=F,B=ve;else break e}}return I}function s(R,I){var F=R.sortIndex-I.sortIndex;return F!==0?F: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(C);else{var I=r(l);I!==null&&P(w,I.startTime-R)}}function C(R,I){p=!1,y&&(y=!1,m(A),A=-1),h=!0;var F=d;try{for(b(I),f=r(c);f!==null&&(!(f.expirationTime>I)||R&&!H());){var B=f.callback;if(typeof B=="function"){f.callback=null,d=f.priorityLevel;var J=B(f.expirationTime<=I);I=t.unstable_now(),typeof J=="function"?f.callback=J:f===r(c)&&n(c),b(I)}else n(c);f=r(c)}if(f!==null)var se=!0;else{var ae=r(l);ae!==null&&P(w,ae.startTime-I),se=!1}return se}finally{f=null,d=F,h=!1}}var O=!1,_=null,A=-1,j=5,U=-1;function H(){return!(t.unstable_now()-UR||125B?(R.sortIndex=F,e(l,R),r(c)===null&&R===r(l)&&(y?(m(A),A=-1):y=!0,P(w,F-B))):(R.sortIndex=J,e(c,R),p||h||(p=!0,T(C))),R},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(R){var I=d;return function(){var F=d;d=I;try{return R.apply(this,arguments)}finally{d=F}}}})(p5);h5.exports=p5;var aB=h5.exports;/** + */(function(t){function e(R,I){var F=R.length;R.push(I);e:for(;0>>1,J=R[B];if(0>>1;Bs(Se,F))ves(oe,Se)?(R[B]=oe,R[ve]=F,B=ve):(R[B]=Se,R[ae]=F,B=ae);else if(ves(oe,F))R[B]=oe,R[ve]=F,B=ve;else break e}}return I}function s(R,I){var F=R.sortIndex-I.sortIndex;return F!==0?F: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(C);else{var I=r(l);I!==null&&P(w,I.startTime-R)}}function C(R,I){p=!1,y&&(y=!1,m(A),A=-1),h=!0;var F=d;try{for(b(I),f=r(c);f!==null&&(!(f.expirationTime>I)||R&&!H());){var B=f.callback;if(typeof B=="function"){f.callback=null,d=f.priorityLevel;var J=B(f.expirationTime<=I);I=t.unstable_now(),typeof J=="function"?f.callback=J:f===r(c)&&n(c),b(I)}else n(c);f=r(c)}if(f!==null)var se=!0;else{var ae=r(l);ae!==null&&P(w,ae.startTime-I),se=!1}return se}finally{f=null,d=F,h=!1}}var O=!1,_=null,A=-1,j=5,U=-1;function H(){return!(t.unstable_now()-UR||125B?(R.sortIndex=F,e(l,R),r(c)===null&&R===r(l)&&(y?(m(A),A=-1):y=!0,P(w,F-B))):(R.sortIndex=J,e(c,R),p||h||(p=!0,T(C))),R},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(R){var I=d;return function(){var F=d;d=I;try{return R.apply(this,arguments)}finally{d=F}}}})(h5);d5.exports=h5;var oB=d5.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var Bj=Object.defineProperty;var Fj=(t,e,r)=>e in t?Bj(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 cB=v,Fn=aB;function ie(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"),db=Object.prototype.hasOwnProperty,lB=/^[: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]*$/,Yk={},Jk={};function uB(t){return db.call(Jk,t)?!0:db.call(Yk,t)?!1:lB.test(t)?Jk[t]=!0:(Yk[t]=!0,!1)}function fB(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 dB(t,e,r,n){if(e===null||typeof e>"u"||fB(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 rE=/[\-:]([a-z])/g;function nE(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(rE,nE);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(rE,nE);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(rE,nE);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 sE(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{gg=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Hd(t):""}function hB(t){switch(t.tag){case 5:return Hd(t.type);case 16:return Hd("Lazy");case 13:return Hd("Suspense");case 19:return Hd("SuspenseList");case 0:case 2:case 15:return t=xg(t.type,!1),t;case 11:return t=xg(t.type.render,!1),t;case 1:return t=xg(t.type,!0),t;default:return""}}function vb(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 hb:return"Profiler";case iE:return"StrictMode";case pb:return"Suspense";case yb:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case m5:return(t.displayName||"Context")+".Consumer";case v5:return(t._context.displayName||"Context")+".Provider";case oE:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case aE:return e=t.displayName||null,e!==null?e:vb(t.type)||"Memo";case Bo:e=t._payload,t=t._init;try{return vb(t(e))}catch{}}return null}function pB(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 vb(e);case 8:return e===iE?"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 Ca(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function x5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function yB(t){var e=x5(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=yB(t))}function b5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=x5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function vv(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 mb(t,e){var r=e.checked;return Nt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Zk(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Ca(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 w5(t,e){e=e.checked,e!=null&&sE(t,"checked",e,!1)}function gb(t,e){w5(t,e);var r=Ca(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")?xb(t,e.type,r):e.hasOwnProperty("defaultValue")&&xb(t,e.type,Ca(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function eT(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 xb(t,e,r){(e!=="number"||vv(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Gd=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 Th(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var ah={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},vB=["Webkit","ms","Moz","O"];Object.keys(ah).forEach(function(t){vB.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ah[e]=ah[t]})});function C5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||ah.hasOwnProperty(t)&&ah[t]?(""+e).trim():e+"px"}function k5(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 mB=Nt({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 Eb(t,e){if(e){if(mB[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ie(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ie(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ie(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ie(62))}}function Sb(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 cE(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Cb=null,wu=null,Eu=null;function nT(t){if(t=Xp(t)){if(typeof Cb!="function")throw Error(ie(280));var e=t.stateNode;e&&(e=W0(e),Cb(t.stateNode,t.type,e))}}function T5(t){wu?Eu?Eu.push(t):Eu=[t]:wu=t}function P5(){if(wu){var t=wu,e=Eu;if(Eu=wu=null,nT(t),e)for(t=0;t>>=0,t===0?32:31-(PB(t)/RB|0)|0}var Fy=64,Uy=4194304;function qd(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 bv(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=qd(a):(i&=o,i!==0&&(n=qd(i)))}else o=r&~s,o!==0?n=qd(o):i!==0&&(n=qd(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 Yp(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ds(e),t[e]=r}function NB(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=lh),dT=String.fromCharCode(32),hT=!1;function K5(t,e){switch(t){case"keyup":return aF.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q5(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xl=!1;function lF(t,e){switch(t){case"compositionend":return Q5(e);case"keypress":return e.which!==32?null:(hT=!0,dT);case"textInput":return t=e.data,t===dT&&hT?null:t;default:return null}}function uF(t,e){if(Xl)return t==="compositionend"||!vE&&K5(t,e)?(t=q5(),L1=hE=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=mT(r)}}function Z5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Z5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function eI(){for(var t=window,e=vv();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=vv(t.document)}return e}function mE(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 xF(t){var e=eI(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Z5(r.ownerDocument.documentElement,r)){if(n!==null&&mE(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=gT(r,i);var o=gT(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,Ob=null,fh=null,_b=!1;function xT(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;_b||Zl==null||Zl!==vv(n)||(n=Zl,"selectionStart"in n&&mE(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}),fh&&Nh(fh,n)||(fh=n,n=Sv(Ob,"onSelect"),0ru||(t.current=Bb[ru],Bb[ru]=null,ru--)}function yt(t,e){ru++,Bb[ru]=t.current,t.current=e}var ka={},Hr=La(ka),vn=La(!1),rl=ka;function If(t,e){var r=t.type.contextTypes;if(!r)return ka;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 Cv(){wt(vn),wt(Hr)}function kT(t,e,r){if(Hr.current!==ka)throw Error(ie(168));yt(Hr,e),yt(vn,r)}function lI(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(ie(108,pB(t)||"Unknown",s));return Nt({},r,n)}function kv(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ka,rl=Hr.current,yt(Hr,t),yt(vn,vn.current),!0}function TT(t,e,r){var n=t.stateNode;if(!n)throw Error(ie(169));r?(t=lI(t,e,rl),n.__reactInternalMemoizedMergedChildContext=t,wt(vn),wt(Hr),yt(Hr,t)):wt(vn),yt(vn,r)}var ji=null,K0=!1,Ng=!1;function uI(t){ji===null?ji=[t]:ji.push(t)}function OF(t){K0=!0,uI(t)}function ja(){if(!Ng&&ji!==null){Ng=!0;var t=0,e=tt;try{var r=ji;for(tt=1;t>=o,s-=o,eo=1<<32-Ds(e)+s|r<A?(j=_,_=null):j=_.sibling;var U=d(m,_,b[A],w);if(U===null){_===null&&(_=j);break}t&&_&&U.alternate===null&&e(m,_),x=i(U,x,A),O===null?C=U:O.sibling=U,O=U,_=j}if(A===b.length)return r(m,_),At&&Xa(m,A),C;if(_===null){for(;AA?(j=_,_=null):j=_.sibling;var H=d(m,_,U.value,w);if(H===null){_===null&&(_=j);break}t&&_&&H.alternate===null&&e(m,_),x=i(H,x,A),O===null?C=H:O.sibling=H,O=H,_=j}if(U.done)return r(m,_),At&&Xa(m,A),C;if(_===null){for(;!U.done;A++,U=b.next())U=f(m,U.value,w),U!==null&&(x=i(U,x,A),O===null?C=U:O.sibling=U,O=U);return At&&Xa(m,A),C}for(_=n(m,_);!U.done;A++,U=b.next())U=h(_,m,A,U.value,w),U!==null&&(t&&U.alternate!==null&&_.delete(U.key===null?A:U.key),x=i(U,x,A),O===null?C=U:O.sibling=U,O=U);return t&&_.forEach(function(K){return e(m,K)}),At&&Xa(m,A),C}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 C=b.key,O=x;O!==null;){if(O.key===C){if(C=b.type,C===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===C||typeof C=="object"&&C!==null&&C.$$typeof===Bo&&IT(C)===O.type){r(m,O.sibling),x=s(O,b.props),x.ref=Rd(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=Qc(b.props.children,m.mode,w,b.key),x.return=m,m=x):(w=H1(b.type,b.key,b.props,null,m.mode,w),w.ref=Rd(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=Vg(b,m.mode,w),x.return=m,m=x}return o(m);case Bo:return O=b._init,g(m,x,O(b._payload),w)}if(Gd(b))return p(m,x,b,w);if(Ad(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=Ug(b,m.mode,w),x.return=m,m=x),o(m)):r(m,x)}return g}var _f=pI(!0),yI=pI(!1),Rv=La(null),Iv=null,iu=null,wE=null;function EE(){wE=iu=Iv=null}function SE(t){var e=Rv.current;wt(Rv),t._currentValue=e}function Vb(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 Au(t,e){Iv=t,wE=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(wE!==t)if(t={context:t,memoizedValue:e,next:null},iu===null){if(Iv===null)throw Error(ie(308));iu=t,Iv.dependencies={lanes:0,firstContext:t}}else iu=iu.next=t;return e}var hc=null;function AE(t){hc===null?hc=[t]:hc.push(t)}function vI(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,fo(t,n)}function fo(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 Fo=!1;function CE(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mI(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 so(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ya(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,Ke&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,fo(t,r)}return s=n.interleaved,s===null?(e.next=e,AE(n)):(e.next=s.next,s.next=e),n.interleaved=e,fo(t,r)}function B1(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,uE(t,r)}}function OT(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 Ov(t,e,r,n){var s=t.updateQueue;Fo=!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=Nt({},f,d);break e;case 2:Fo=!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);il|=o,t.lanes=o,t.memoizedState=f}}function _T(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=Dg.transition;Dg.transition={};try{t(!1),e()}finally{tt=r,Dg.transition=n}}function MI(){return hs().memoizedState}function DF(t,e,r){var n=ma(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},DI(t))LI(e,r);else if(r=vI(t,e,r,n),r!==null){var s=sn();Ls(r,t,n,s),jI(r,e,n)}}function LF(t,e,r){var n=ma(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(DI(t))LI(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,Fs(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=vI(t,e,s,n),r!==null&&(s=sn(),Ls(r,t,n,s),jI(r,e,n))}}function DI(t){var e=t.alternate;return t===_t||e!==null&&e===_t}function LI(t,e){dh=Nv=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function jI(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,uE(t,r)}}var Mv={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},jF={readContext:ds,useCallback:function(t,e){return Js().memoizedState=[t,e===void 0?null:e],t},useContext:ds,useEffect:MT,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,U1(4194308,4,RI.bind(null,e,t),r)},useLayoutEffect:function(t,e){return U1(4194308,4,t,e)},useInsertionEffect:function(t,e){return U1(4,2,t,e)},useMemo:function(t,e){var r=Js();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Js();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=DF.bind(null,_t,t),[n.memoizedState,t]},useRef:function(t){var e=Js();return t={current:t},e.memoizedState=t},useState:NT,useDebugValue:NE,useDeferredValue:function(t){return Js().memoizedState=t},useTransition:function(){var t=NT(!1),e=t[0];return t=MF.bind(null,t[1]),Js().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=_t,s=Js();if(At){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=e(),fr===null)throw Error(ie(349));sl&30||wI(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,MT(SI.bind(null,n,i,t),[t]),n.flags|=2048,Vh(9,EI.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=Js(),e=fr.identifierPrefix;if(At){var r=to,n=eo;r=(n&~(1<<32-Ds(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Fh++,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 Ta(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=Ta(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=Ta(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,Ta(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 A5(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 C5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=A5(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(ie(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ie(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ie(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ie(62))}}function Ab(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 Cb=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(ie(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-Ds(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=la=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=Av(_b,"onSelect"),0ru||(t.current=Fb[ru],Fb[ru]=null,ru--)}function pt(t,e){ru++,Fb[ru]=t.current,t.current=e}var Pa={},Hr=Ba(Pa),vn=Ba(!1),sl=Pa;function If(t,e){var r=t.type.contextTypes;if(!r)return Pa;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!==Pa)throw Error(ie(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(ie(108,hB(t)||"Unknown",s));return _t({},r,n)}function Tv(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Pa,sl=Hr.current,pt(Hr,t),pt(vn,vn.current),!0}function RT(t,e,r){var n=t.stateNode;if(!n)throw Error(ie(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 Fa(){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-Ds(e)+s|r<A?(j=_,_=null):j=_.sibling;var U=d(m,_,b[A],w);if(U===null){_===null&&(_=j);break}t&&_&&U.alternate===null&&e(m,_),x=i(U,x,A),O===null?C=U:O.sibling=U,O=U,_=j}if(A===b.length)return r(m,_),St&&tc(m,A),C;if(_===null){for(;AA?(j=_,_=null):j=_.sibling;var H=d(m,_,U.value,w);if(H===null){_===null&&(_=j);break}t&&_&&H.alternate===null&&e(m,_),x=i(H,x,A),O===null?C=H:O.sibling=H,O=H,_=j}if(U.done)return r(m,_),St&&tc(m,A),C;if(_===null){for(;!U.done;A++,U=b.next())U=f(m,U.value,w),U!==null&&(x=i(U,x,A),O===null?C=U:O.sibling=U,O=U);return St&&tc(m,A),C}for(_=n(m,_);!U.done;A++,U=b.next())U=h(_,m,A,U.value,w),U!==null&&(t&&U.alternate!==null&&_.delete(U.key===null?A:U.key),x=i(U,x,A),O===null?C=U:O.sibling=U,O=U);return t&&_.forEach(function(K){return e(m,K)}),St&&tc(m,A),C}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 C=b.key,O=x;O!==null;){if(O.key===C){if(C=b.type,C===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===C||typeof C=="object"&&C!==null&&C.$$typeof===Fo&&_T(C)===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=Ba(null),Ov=null,iu=null,EE=null;function SE(){EE=iu=Ov=null}function AE(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 Au(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(ie(308));iu=t,Ov.dependencies={lanes:0,firstContext:t}}else iu=iu.next=t;return e}var vc=null;function CE(t){vc===null?vc=[t]:vc.push(t)}function yI(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,CE(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 ma(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,CE(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=xa(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();Ls(r,t,n,s),LI(r,e,n)}}function DF(t,e,r){var n=xa(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,Fs(a,o)){var c=e.interleaved;c===null?(s.next=s,CE(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}r=yI(t,e,s,n),r!==null&&(s=sn(),Ls(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 Ys().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=Ys();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Ys();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=Ys();return t={current:t},e.memoizedState=t},useState:DT,useDebugValue:ME,useDeferredValue:function(t){return Ys().memoizedState=t},useTransition:function(){var t=DT(!1),e=t[0];return t=NF.bind(null,t[1]),Ys().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ot,s=Ys();if(St){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=e(),dr===null)throw Error(ie(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=Ys(),e=dr.identifierPrefix;if(St){var r=ro,n=to;r=(n&~(1<<32-Ds(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[ci]=e,t[Lh]=n,WI(t,e,!1,!1),e.stateNode=t;e:{switch(o=Sb(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,Id(i,!1),e.lanes=4194304)}else{if(!n)if(t=_v(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Id(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!At)return Mr(e),null}else 2*Wt()-i.renderingStartTime>Df&&r!==1073741824&&(e.flags|=128,n=!0,Id(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=Tt.current,yt(Tt,n?r&1|2:r&1),e):(Mr(e),null);case 22:case 23:return FE(),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(ie(156,e.tag))}function GF(t,e){switch(xE(e),e.tag){case 1:return mn(e.type)&&Cv(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Nf(),wt(vn),wt(Hr),PE(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return TE(e),null;case 13:if(wt(Tt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ie(340));Of()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return wt(Tt),null;case 4:return Nf(),null;case 10:return SE(e.type._context),null;case 22:case 23:return FE(),null;case 24:return null;default:return null}}var Qy=!1,Ur=!1,qF=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 Yb(t,e,r){try{r()}catch(n){jt(t,e,n)}}var GT=!1;function WF(t,e){if(Nb=wv,t=eI(),mE(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(Mb={focusedElem:t,selectionRange:r},wv=!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(ie(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=GT,GT=!1,p}function hh(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&&Yb(e,r,i)}s=s.next}while(s!==n)}}function J0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Jb(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 YI(t){var e=t.alternate;e!==null&&(t.alternate=null,YI(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ci],delete e[Lh],delete e[jb],delete e[RF],delete e[IF])),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 JI(t){return t.tag===5||t.tag===3||t.tag===4}function qT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||JI(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 Xb(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(Xb(t,e,r),t=t.sibling;t!==null;)Xb(t,e,r),t=t.sibling}function Zb(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(Zb(t,e,r),t=t.sibling;t!==null;)Zb(t,e,r),t=t.sibling}var mr=null,Is=!1;function To(t,e,r){for(r=r.child;r!==null;)XI(t,e,r),r=r.sibling}function XI(t,e,r){if(vi&&typeof vi.onCommitFiberUnmount=="function")try{vi.onCommitFiberUnmount(z0,r)}catch{}switch(r.tag){case 5:Ur||ou(r,e);case 6:var n=mr,s=Is;mr=null,To(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?_g(t.parentNode,r):t.nodeType===1&&_g(t,r),Oh(t)):_g(mr,r.stateNode));break;case 4:n=mr,s=Is,mr=r.stateNode.containerInfo,Is=!0,To(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)&&Yb(r,e,o),s=s.next}while(s!==n)}To(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)}To(t,e,r);break;case 21:To(t,e,r);break;case 22:r.mode&1?(Ur=(n=Ur)||r.memoizedState!==null,To(t,e,r),Ur=n):To(t,e,r);break;default:To(t,e,r)}}function WT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new qF),e.forEach(function(n){var s=rU.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*QF(n/1960))-n,10t?16:t,la===null)var n=!1;else{if(t=la,la=null,jv=0,Ke&6)throw Error(ie(331));var s=Ke;for(Ke|=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()-jE?Kc(t,0):LE|=r),gn(t,e)}function oO(t,e){e===0&&(t.mode&1?(e=Uy,Uy<<=1,!(Uy&130023424)&&(Uy=4194304)):e=1);var r=sn();t=fo(t,e),t!==null&&(Yp(t,e,r),gn(t,r))}function tU(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),oO(t,r)}function rU(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(ie(314))}n!==null&&n.delete(e),oO(t,r)}var aO;aO=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,zF(t,e,r);yn=!!(t.flags&131072)}else yn=!1,At&&e.flags&1048576&&fI(e,Pv,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;V1(t,e),t=e.pendingProps;var s=If(e,Hr.current);Au(e,r),s=IE(null,e,n,t,s,r);var i=OE();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,kv(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,CE(e),s.updater=Y0,e.stateNode=s,s._reactInternals=e,zb(e,n,t,r),e=qb(null,e,n,!0,i,r)):(e.tag=0,At&&i&&gE(e),tn(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(V1(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=sU(n),t=Es(n,t),s){case 0:e=Gb(null,e,n,t,r);break e;case 1:e=$T(null,e,n,t,r);break e;case 11:e=UT(null,e,n,t,r);break e;case 14:e=VT(null,e,n,Es(n.type,t),r);break e}throw Error(ie(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),Gb(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),$T(t,e,n,s,r);case 3:e:{if(HI(e),t===null)throw Error(ie(387));n=e.pendingProps,i=e.memoizedState,s=i.element,mI(t,e),Ov(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(ie(423)),e),e=zT(t,e,n,r,s);break e}else if(n!==s){s=Mf(Error(ie(424)),e),e=zT(t,e,n,r,s);break e}else for(Dn=pa(e.stateNode.containerInfo.firstChild),Ln=e,At=!0,Ns=null,r=yI(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Of(),n===s){e=ho(t,e,r);break e}tn(t,e,n,r)}e=e.child}return e;case 5:return gI(e),t===null&&Ub(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Db(n,s)?o=null:i!==null&&Db(n,i)&&(e.flags|=32),zI(t,e),tn(t,e,o,r),e.child;case 6:return t===null&&Ub(e),null;case 13:return GI(t,e,r);case 4:return kE(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),UT(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,yt(Rv,n._currentValue),n._currentValue=o,i!==null)if(Fs(i.value,o)){if(i.children===s.children&&!vn.current){e=ho(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=so(-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),Vb(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(ie(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Vb(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,Au(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),VT(t,e,n,s,r);case 15:return VI(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Es(n,s),V1(t,e),e.tag=1,mn(n)?(t=!0,kv(e)):t=!1,Au(e,r),BI(e,n,s),zb(e,n,s,r),qb(null,e,n,!0,t,r);case 19:return qI(t,e,r);case 22:return $I(t,e,r)}throw Error(ie(156,e.tag))};function cO(t,e){return D5(t,e)}function nU(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 nU(t,e,r,n)}function VE(t){return t=t.prototype,!(!t||!t.isReactComponent)}function sU(t){if(typeof t=="function")return VE(t)?1:0;if(t!=null){if(t=t.$$typeof,t===oE)return 11;if(t===aE)return 14}return 2}function ga(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 H1(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")VE(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Jl:return Qc(r.children,s,i,e);case iE:o=8,s|=8;break;case hb:return t=cs(12,r,e,s|2),t.elementType=hb,t.lanes=i,t;case pb:return t=cs(13,r,e,s),t.elementType=pb,t.lanes=i,t;case yb:return t=cs(19,r,e,s),t.elementType=yb,t.lanes=i,t;case g5:return Z0(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case v5:o=10;break e;case m5:o=9;break e;case oE:o=11;break e;case aE:o=14;break e;case Bo:o=16,n=null;break e}throw Error(ie(130,t==null?t:typeof t,""))}return e=cs(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function Qc(t,e,r,n){return t=cs(7,t,n,e),t.lanes=r,t}function Z0(t,e,r,n){return t=cs(22,t,n,e),t.elementType=g5,t.lanes=r,t.stateNode={isHidden:!1},t}function Ug(t,e,r){return t=cs(6,t,null,e),t.lanes=r,t}function Vg(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 iU(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=wg(0),this.expirationTimes=wg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wg(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function $E(t,e,r,n,s,i,o,a,c){return t=new iU(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},CE(i),t}function oU(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dO)}catch(t){console.error(t)}}dO(),d5.exports=zn;var wo=d5.exports;const hO=J2(wo),fU=Z8({__proto__:null,default:hO},[wo]);var tP=wo;fb.createRoot=tP.createRoot,fb.hydrateRoot=tP.hydrateRoot;const pO=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),sm=v.createContext({}),im=v.createContext(null),om=typeof document<"u",qE=om?v.useLayoutEffect:v.useEffect,yO=v.createContext({strict:!1}),WE=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),dU="framerAppearId",vO="data-"+WE(dU);function hU(t,e,r,n){const{visualElement:s}=v.useContext(sm),i=v.useContext(yO),o=v.useContext(im),a=v.useContext(pO).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[vO]&&!window.HandoffComplete));return qE(()=>{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 pU(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 zh(t){return typeof t=="string"||Array.isArray(t)}function am(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const KE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],QE=["initial",...KE];function cm(t){return am(t.animate)||QE.some(e=>zh(t[e]))}function mO(t){return!!(cm(t)||t.variants)}function yU(t,e){if(cm(t)){const{initial:r,animate:n}=t;return{initial:r===!1||zh(r)?r:void 0,animate:zh(n)?n:void 0}}return t.inherit!==!1?e:{}}function vU(t){const{initial:e,animate:r}=yU(t,v.useContext(sm));return v.useMemo(()=>({initial:e,animate:r}),[rP(e),rP(r)])}function rP(t){return Array.isArray(t)?t.join(" "):t}const nP={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"]},Hh={};for(const t in nP)Hh[t]={isEnabled:e=>nP[t].some(r=>!!e[r])};function mU(t){for(const e in t)Hh[e]={...Hh[e],...t[e]}}const YE=v.createContext({}),gO=v.createContext({}),gU=Symbol.for("motionComponentSymbol");function xU({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:n,Component:s}){t&&mU(t);function i(a,c){let l;const u={...v.useContext(pO),...a,layoutId:bU(a)},{isStatic:f}=u,d=vU(a),h=n(a,f);if(!f&&om){d.visualElement=hU(s,h,u,e);const p=v.useContext(gO),y=v.useContext(yO).strict;d.visualElement&&(l=d.visualElement.loadFeatures(u,y,t,p))}return v.createElement(sm.Provider,{value:d},l&&d.visualElement?v.createElement(l,{visualElement:d.visualElement,...u}):null,r(s,a,pU(h,d.visualElement,c),h,f,d.visualElement))}const o=v.forwardRef(i);return o[gU]=s,o}function bU({layoutId:t}){const e=v.useContext(YE).id;return e&&t!==void 0?e+"-"+t:t}function wU(t){function e(n,s={}){return xU(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 EU=["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 JE(t){return typeof t!="string"||t.includes("-")?!1:!!(EU.indexOf(t)>-1||/[A-Z]/.test(t))}const Uv={};function SU(t){Object.assign(Uv,t)}const ey=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wl=new Set(ey);function xO(t,{layout:e,layoutId:r}){return wl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Uv[t]||t==="opacity")}const xn=t=>!!(t&&t.getVelocity),AU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},CU=ey.length;function kU(t,{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},n,s){let i="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(t),wO=bO("--"),sw=bO("var(--"),TU=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,PU=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ta=(t,e,r)=>Math.min(Math.max(r,t),e),El={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},vh={...El,transform:t=>Ta(0,1,t)},Xy={...El,default:1},mh=t=>Math.round(t*1e5)/1e5,lm=/(-)?([\d]*\.?[\d])+/g,EO=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,RU=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ty(t){return typeof t=="string"}const ry=t=>({test:e=>ty(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),No=ry("deg"),gi=ry("%"),Ae=ry("px"),IU=ry("vh"),OU=ry("vw"),sP={...gi,parse:t=>gi.parse(t)/100,transform:t=>gi.transform(t*100)},iP={...El,transform:Math.round},SO={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:No,rotateX:No,rotateY:No,rotateZ:No,scale:Xy,scaleX:Xy,scaleY:Xy,scaleZ:Xy,skew:No,skewX:No,skewY:No,distance:Ae,translateX:Ae,translateY:Ae,translateZ:Ae,x:Ae,y:Ae,z:Ae,perspective:Ae,transformPerspective:Ae,opacity:vh,originX:sP,originY:sP,originZ:Ae,zIndex:iP,fillOpacity:vh,strokeOpacity:vh,numOctaves:iP};function XE(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(wO(f)){i[f]=d;continue}const h=SO[f],p=PU(d,h);if(wl.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=kU(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 ZE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function AO(t,e,r){for(const n in e)!xn(e[n])&&!xO(n,r)&&(t[n]=e[n])}function _U({transformTemplate:t},e,r){return v.useMemo(()=>{const n=ZE();return XE(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function NU(t,e,r){const n=t.style||{},s={};return AO(s,n,t),Object.assign(s,_U(t,e,r)),t.transformValues?t.transformValues(s):s}function MU(t,e,r){const n={},s=NU(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 DU=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 Vv(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||DU.has(t)}let CO=t=>!Vv(t);function LU(t){t&&(CO=e=>e.startsWith("on")?!Vv(e):t(e))}try{LU(require("@emotion/is-prop-valid").default)}catch{}function jU(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(CO(s)||r===!0&&Vv(s)||!e&&!Vv(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function oP(t,e,r){return typeof t=="string"?t:Ae.transform(e+r*t)}function BU(t,e,r){const n=oP(e,t.x,t.width),s=oP(r,t.y,t.height);return`${n} ${s}`}const FU={offset:"stroke-dashoffset",array:"stroke-dasharray"},UU={offset:"strokeDashoffset",array:"strokeDasharray"};function VU(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?FU:UU;t[i.offset]=Ae.transform(-n);const o=Ae.transform(e),a=Ae.transform(r);t[i.array]=`${o} ${a}`}function eS(t,{attrX:e,attrY:r,attrScale:n,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:c=0,...l},u,f,d){if(XE(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=BU(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&&VU(h,o,a,c,!1)}const kO=()=>({...ZE(),attrs:{}}),tS=t=>typeof t=="string"&&t.toLowerCase()==="svg";function $U(t,e,r,n){const s=v.useMemo(()=>{const i=kO();return eS(i,e,{enableHardwareAcceleration:!1},tS(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};AO(i,t.style,t),s.style={...i,...s.style}}return s}function zU(t=!1){return(r,n,s,{latestValues:i},o)=>{const c=(JE(r)?$U:MU)(n,i,o,r),u={...jU(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 TO(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 PO=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 RO(t,e,r,n){TO(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(PO.has(s)?s:WE(s),e.attrs[s])}function rS(t,e){const{style:r}=t,n={};for(const s in r)(xn(r[s])||e.style&&xn(e.style[s])||xO(s,t))&&(n[s]=r[s]);return n}function IO(t,e){const r=rS(t,e);for(const n in t)if(xn(t[n])||xn(e[n])){const s=ey.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[s]=t[n]}return r}function nS(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 OO(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const $v=t=>Array.isArray(t),HU=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),GU=t=>$v(t)?t[t.length-1]||0:t;function G1(t){const e=xn(t)?t.get():t;return HU(e)?e.toValue():e}function qU({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:WU(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const _O=t=>(e,r)=>{const n=v.useContext(sm),s=v.useContext(im),i=()=>qU(t,e,n,s);return r?i():OO(i)};function WU(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=G1(i[d]);let{initial:o,animate:a}=t;const c=cm(t),l=mO(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"&&!am(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=nS(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 aP{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 KU(t){let e=new aP,r=new aP,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]=KU(()=>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,QU),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:vt,cancel:po,state:Br,steps:$g}=YU(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0),JU={useVisualState:_O({scrapeMotionValuesFromProps:IO,createRenderState:kO,onMount:(t,e,{renderState:r,latestValues:n})=>{vt.read(()=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),vt.render(()=>{eS(r,n,{enableHardwareAcceleration:!1},tS(e.tagName),t.transformTemplate),RO(e,r)})}})},XU={useVisualState:_O({scrapeMotionValuesFromProps:rS,createRenderState:ZE})};function ZU(t,{forwardMotionProps:e=!1},r,n){return{...JE(t)?JU:XU,preloadedFeatures:r,useRender:zU(e),createVisualElement:n,Component:t}}function ro(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}const NO=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function um(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const eV=t=>e=>NO(e)&&t(e,um(e));function io(t,e,r,n){return ro(t,e,eV(r),n)}const tV=(t,e)=>r=>e(t(r)),xa=(...t)=>t.reduce(tV);function MO(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const cP=MO("dragHorizontal"),lP=MO("dragVertical");function DO(t){let e=!1;if(t==="y")e=lP();else if(t==="x")e=cP();else{const r=cP(),n=lP();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function LO(){const t=DO(!0);return t?(t(),!1):!0}class Ba{constructor(e){this.isMounted=!1,this.node=e}update(){}}function uP(t,e){const r="pointer"+(e?"enter":"leave"),n="onHover"+(e?"Start":"End"),s=(i,o)=>{if(i.pointerType==="touch"||LO())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[n]&&vt.update(()=>a[n](i,o))};return io(t.current,r,s,{passive:!t.getProps()[n]})}class rV extends Ba{mount(){this.unmount=xa(uP(this.node,!0),uP(this.node,!1))}unmount(){}}class nV extends Ba{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=xa(ro(this.node.current,"focus",()=>this.onFocus()),ro(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const jO=(t,e)=>e?t===e?!0:jO(t,e.parentElement):!1;function zg(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,um(r))}class sV extends Ba{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=io(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u,globalTapTarget:f}=this.node.getProps();vt.update(()=>{!f&&!jO(this.node.current,a.target)?u&&u(a,c):l&&l(a,c)})},{passive:!(n.onTap||n.onPointerUp)}),o=io(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=xa(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()||zg("up",(c,l)=>{const{onTap:u}=this.node.getProps();u&&vt.update(()=>u(c,l))})};this.removeEndListeners(),this.removeEndListeners=ro(this.node.current,"keyup",o),zg("down",(a,c)=>{this.startPress(a,c)})},r=ro(this.node.current,"keydown",e),n=()=>{this.isPressing&&zg("cancel",(i,o)=>this.cancelPress(i,o))},s=ro(this.node.current,"blur",n);this.removeAccessibleListeners=xa(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&&vt.update(()=>n(e,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!LO()}cancelPress(e,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&vt.update(()=>n(e,r))}mount(){const e=this.node.getProps(),r=io(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=ro(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xa(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const iw=new WeakMap,Hg=new WeakMap,iV=t=>{const e=iw.get(t.target);e&&e(t)},oV=t=>{t.forEach(iV)};function aV({root:t,...e}){const r=t||document;Hg.has(r)||Hg.set(r,{});const n=Hg.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(oV,{root:t,...e})),n[s]}function cV(t,e,r){const n=aV(e);return iw.set(t,r),n.observe(t),()=>{iw.delete(t),n.unobserve(t)}}const lV={some:0,all:1};class uV extends Ba{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:lV[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 cV(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(fV(e,r))&&this.startObserver()}unmount(){}}function fV({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const dV={inView:{Feature:uV},tap:{Feature:sV},focus:{Feature:nV},hover:{Feature:rV}};function BO(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 pV(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function fm(t,e,r){const n=t.getProps();return nS(n,e,r!==void 0?r:n.custom,hV(t),pV(t))}let yV=Ut,sS=Ut;const ba=t=>t*1e3,oo=t=>t/1e3,vV={current:!1},FO=t=>Array.isArray(t)&&typeof t[0]=="number";function UO(t){return!!(!t||typeof t=="string"&&VO[t]||FO(t)||Array.isArray(t)&&t.every(UO))}const Kd=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,VO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kd([0,.65,.55,1]),circOut:Kd([.55,0,1,.45]),backIn:Kd([.31,.01,.66,-.59]),backOut:Kd([.33,1.53,.69,.99])};function $O(t){if(t)return FO(t)?Kd(t):Array.isArray(t)?t.map($O):VO[t]}function mV(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=$O(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 gV(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const zO=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,xV=1e-7,bV=12;function wV(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=zO(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>xV&&++awV(i,0,1,t,r);return i=>i===0||i===1?i:zO(s(i),e,n)}const EV=ny(.42,0,1,1),SV=ny(0,0,.58,1),HO=ny(.42,0,.58,1),AV=t=>Array.isArray(t)&&typeof t[0]!="number",GO=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,qO=t=>e=>1-t(1-e),iS=t=>1-Math.sin(Math.acos(t)),WO=qO(iS),CV=GO(iS),KO=ny(.33,1.53,.69,.99),oS=qO(KO),kV=GO(oS),TV=t=>(t*=2)<1?.5*oS(t):.5*(2-Math.pow(2,-10*(t-1))),PV={linear:Ut,easeIn:EV,easeInOut:HO,easeOut:SV,circIn:iS,circInOut:CV,circOut:WO,backIn:oS,backInOut:kV,backOut:KO,anticipate:TV},fP=t=>{if(Array.isArray(t)){sS(t.length===4);const[e,r,n,s]=t;return ny(e,r,n,s)}else if(typeof t=="string")return PV[t];return t},aS=(t,e)=>r=>!!(ty(r)&&RU.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),QO=(t,e,r)=>n=>{if(!ty(n))return n;const[s,i,o,a]=n.match(lm);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},RV=t=>Ta(0,255,t),Gg={...El,transform:t=>Math.round(RV(t))},yc={test:aS("rgb","red"),parse:QO("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Gg.transform(t)+", "+Gg.transform(e)+", "+Gg.transform(r)+", "+mh(vh.transform(n))+")"};function IV(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 ow={test:aS("#"),parse:IV,transform:yc.transform},lu={test:aS("hsl","hue"),parse:QO("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+gi.transform(mh(e))+", "+gi.transform(mh(r))+", "+mh(vh.transform(n))+")"},en={test:t=>yc.test(t)||ow.test(t)||lu.test(t),parse:t=>yc.test(t)?yc.parse(t):lu.test(t)?lu.parse(t):ow.parse(t),transform:t=>ty(t)?t:t.hasOwnProperty("red")?yc.transform(t):lu.transform(t)},Ot=(t,e,r)=>-r*t+r*e+t;function qg(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 OV({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=qg(c,a,t+1/3),i=qg(c,a,t),o=qg(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const Wg=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},_V=[ow,yc,lu],NV=t=>_V.find(e=>e.test(t));function dP(t){const e=NV(t);let r=e.parse(t);return e===lu&&(r=OV(r)),r}const YO=(t,e)=>{const r=dP(t),n=dP(e),s={...r};return i=>(s.red=Wg(r.red,n.red,i),s.green=Wg(r.green,n.green,i),s.blue=Wg(r.blue,n.blue,i),s.alpha=Ot(r.alpha,n.alpha,i),yc.transform(s))};function MV(t){var e,r;return isNaN(t)&&ty(t)&&(((e=t.match(lm))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(EO))===null||r===void 0?void 0:r.length)||0)>0}const JO={regex:TU,countKey:"Vars",token:"${v}",parse:Ut},XO={regex:EO,countKey:"Colors",token:"${c}",parse:en.parse},ZO={regex:lm,countKey:"Numbers",token:"${n}",parse:El.parse};function Kg(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 zv(t){const e=t.toString(),r={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&Kg(r,JO),Kg(r,XO),Kg(r,ZO),r}function e6(t){return zv(t).values}function t6(t){const{values:e,numColors:r,numVars:n,tokenised:s}=zv(t),i=e.length;return o=>{let a=s;for(let c=0;ctypeof t=="number"?0:t;function LV(t){const e=e6(t);return t6(t)(e.map(DV))}const Pa={test:MV,parse:e6,createTransformer:t6,getAnimatableNone:LV},r6=(t,e)=>r=>`${r>0?e:t}`;function n6(t,e){return typeof t=="number"?r=>Ot(t,e,r):en.test(t)?YO(t,e):t.startsWith("var(")?r6(t,e):i6(t,e)}const s6=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>n6(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]=n6(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},i6=(t,e)=>{const r=Pa.createTransformer(e),n=zv(t),s=zv(e);return n.numVars===s.numVars&&n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?xa(s6(n.values,s.values),r):r6(t,e)},Gh=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},hP=(t,e)=>r=>Ot(t,e,r);function BV(t){return typeof t=="number"?hP:typeof t=="string"?en.test(t)?YO:i6:Array.isArray(t)?s6:typeof t=="object"?jV:hP}function FV(t,e,r){const n=[],s=r||BV(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=FV(e,n,s),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(Ta(t[0],t[i-1],l)):c}function UV(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const s=Gh(0,e,n);t.push(Ot(r,1,s))}}function VV(t){const e=[0];return UV(e,t.length-1),e}function $V(t,e){return t.map(r=>r*e)}function zV(t,e){return t.map(()=>e||HO).splice(0,t.length-1)}function Hv({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){const s=AV(n)?n.map(fP):fP(n),i={done:!1,value:e[0]},o=$V(r&&r.length===e.length?r:VV(e),t),a=o6(o,e,{ease:Array.isArray(s)?s:zV(e,s)});return{calculatedDuration:t,next:c=>(i.value=a(c),i.done=c>=t,i)}}function a6(t,e){return e?t*(1e3/e):0}const HV=5;function c6(t,e,r){const n=Math.max(e-HV,0);return a6(r-t(n),e-n)}const Qg=.001,GV=.01,pP=10,qV=.05,WV=1;function KV({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;yV(t<=ba(pP));let o=1-e;o=Ta(qV,WV,o),t=Ta(GV,pP,oo(t)),o<1?(s=l=>{const u=l*o,f=u*t,d=u-r,h=aw(l,o),p=Math.exp(-f);return Qg-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=aw(Math.pow(l,2),o);return(-s(l)+Qg>0?-1:1)*((d-h)*p)/y}):(s=l=>{const u=Math.exp(-l*t),f=(l-r)*t+1;return-Qg+u*f},i=l=>{const u=Math.exp(-l*t),f=(r-l)*(t*t);return u*f});const a=5/t,c=YV(s,i,a);if(t=ba(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 QV=12;function YV(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function ZV(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!yP(t,XV)&&yP(t,JV)){const r=KV(t);e={...e,...r,mass:1},e.isResolvedFromDuration=!0}return e}function l6({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}=ZV({...n,velocity:-oo(n.velocity||0)}),h=f||0,p=c/(2*Math.sqrt(a*l)),y=i-s,g=oo(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=aw(g,p);x=w=>{const C=Math.exp(-p*g*w);return i-C*((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 C=Math.exp(-p*g*w),O=Math.min(b*w,300);return i-C*((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 C=h;b!==0&&(p<1?C=c6(x,b,w):C=0);const O=Math.abs(C)<=r,_=Math.abs(i-w)<=e;o.done=O&&_}return o.value=o.done?i:w,o}}}function vP({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=A=>a!==void 0&&Ac,p=A=>a===void 0?c:c===void 0||Math.abs(a-A)-y*Math.exp(-A/n),b=A=>m+x(A),w=A=>{const j=x(A),U=b(A);d.done=Math.abs(j)<=l,d.value=d.done?m:U};let C,O;const _=A=>{h(d.value)&&(C=A,O=l6({keyframes:[d.value,p(d.value)],velocity:c6(b,A,d.value),damping:s,stiffness:i,restDelta:l,restSpeed:u}))};return _(0),{calculatedDuration:null,next:A=>{let j=!1;return!O&&C===void 0&&(j=!0,w(A),_(A)),C!==void 0&&A>C?O.next(A-C):(!j&&w(A),d)}}}const e$=t=>{const e=({timestamp:r})=>t(r);return{start:()=>vt.update(e,!0),stop:()=>po(e),now:()=>Br.isProcessing?Br.timestamp:performance.now()}},mP=2e4;function gP(t){let e=0;const r=50;let n=t.next(e);for(;!n.done&&e=mP?1/0:e}const t$={decay:vP,inertia:vP,tween:Hv,keyframes:Hv,spring:l6};function Gv({autoplay:t=!0,delay:e=0,driver:r=e$,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(B=>{y=B})};m();let x;const b=t$[s]||Hv;let w;b!==Hv&&typeof n[0]!="number"&&(w=o6([0,100],n,{clamp:!1}),n=[0,100]);const C=b({...d,keyframes:n});let O;a==="mirror"&&(O=b({...d,keyframes:[...n].reverse(),velocity:-(d.velocity||0)}));let _="idle",A=null,j=null,U=null;C.calculatedDuration===null&&i&&(C.calculatedDuration=gP(C));const{calculatedDuration:H}=C;let K=1/0,Q=1/0;H!==null&&(K=H+o,Q=K*(i+1)-o);let $=0;const D=B=>{if(j===null)return;h>0&&(j=Math.min(j,B)),h<0&&(j=Math.min(B-Q/h,j)),A!==null?$=A:$=Math.round(B-j)*h;const J=$-e*(h>=0?1:-1),se=h>=0?J<0:J>Q;$=Math.max(J,0),_==="finished"&&A===null&&($=Q);let ae=$,we=C;if(i){const Be=Math.min($,Q)/K;let Re=Math.floor(Be),De=Be%1;!De&&Be>=1&&(De=1),De===1&&Re--,Re=Math.min(Re,i+1),!!(Re%2)&&(a==="reverse"?(De=1-De,o&&(De-=o/K)):a==="mirror"&&(we=O)),ae=Ta(0,1,De)*K}const ve=se?{done:!1,value:n[0]}:we.next(ae);w&&(ve.value=w(ve.value));let{done:oe}=ve;!se&&H!==null&&(oe=h>=0?$>=Q:$<=0);const Ne=A===null&&(_==="finished"||_==="running"&&oe);return f&&f(ve.value),Ne&&R(),ve},T=()=>{x&&x.stop(),x=void 0},P=()=>{_="idle",T(),y(),m(),j=U=null},R=()=>{_="finished",u&&u(),T(),y()},I=()=>{if(p)return;x||(x=r(D));const B=x.now();c&&c(),A!==null?j=B-A:(!j||_==="finished")&&(j=B),_==="finished"&&m(),U=j,A=null,_="running",x.start()};t&&I();const F={then(B,J){return g.then(B,J)},get time(){return oo($)},set time(B){B=ba(B),$=B,A!==null||!x||h===0?A=B:j=x.now()-B/h},get duration(){const B=C.calculatedDuration===null?gP(C):C.calculatedDuration;return oo(B)},get speed(){return h},set speed(B){B===h||!x||(h=B,F.time=oo($))},get state(){return _},play:I,pause:()=>{_="paused",A=$},stop:()=>{p=!0,_!=="idle"&&(_="idle",l&&l(),P())},cancel:()=>{U!==null&&D(U),P()},complete:()=>{_="finished"},sample:B=>(j=0,D(B))};return F}function r$(t){let e;return()=>(e===void 0&&(e=t()),e)}const n$=r$(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),s$=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),e1=10,i$=2e4,o$=(t,e)=>e.type==="spring"||t==="backgroundColor"||!UO(e.ease);function a$(t,e,{onUpdate:r,onComplete:n,...s}){if(!(n$()&&s$.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(o$(e,s)){const b=Gv({...s,repeat:0,delay:0});let w={done:!1,value:f[0]};const C=[];let O=0;for(;!w.done&&O{l=!1,y.cancel()},m=()=>{l=!0,vt.update(g),a(),u()};return y.onfinish=()=>{l||(t.set(gV(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 oo(y.currentTime||0)},set time(b){y.currentTime=ba(b)},get speed(){return y.playbackRate},set speed(b){y.playbackRate=b},get duration(){return oo(d)},play:()=>{o||(y.play(),po(g))},pause:()=>y.pause(),stop:()=>{if(o=!0,y.playState==="idle")return;const{currentTime:b}=y;if(b){const w=Gv({...s,autoplay:!1});t.setWithVelocity(w.sample(b-e1).value,w.sample(b).value,e1)}m()},complete:()=>{l||y.finish()},cancel:m}}function c$({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?Gv({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}const l$={type:"spring",stiffness:500,damping:25,restSpeed:10},u$=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),f$={type:"keyframes",duration:.8},d$={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},h$=(t,{keyframes:e})=>e.length>2?f$:wl.has(t)?t.startsWith("scale")?u$(e[1]):l$:d$,cw=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Pa.test(e)||e==="0")&&!e.startsWith("url(")),p$=new Set(["brightness","contrast","saturate","opacity"]);function y$(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(lm)||[];if(!n)return t;const s=r.replace(n,"");let i=p$.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const v$=/([a-z-]*)\(.*?\)/g,lw={...Pa,getAnimatableNone:t=>{const e=t.match(v$);return e?e.map(y$).join(" "):t}},m$={...SO,color:en,backgroundColor:en,outlineColor:en,fill:en,stroke:en,borderColor:en,borderTopColor:en,borderRightColor:en,borderBottomColor:en,borderLeftColor:en,filter:lw,WebkitFilter:lw},cS=t=>m$[t];function u6(t,e){let r=cS(t);return r!==lw&&(r=Pa),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const f6=t=>/^0[^.\s]+$/.test(t);function g$(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||f6(t)}function x$(t,e,r,n){const s=cw(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=lS(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-ba(o);const c=x$(e,t,r,i),l=c[0],u=c[c.length-1],f=cw(t,l),d=cw(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(b$(i)||(h={...h,...h$(t,h)}),h.duration&&(h.duration=ba(h.duration)),h.repeatDelay&&(h.repeatDelay=ba(h.repeatDelay)),!f||!d||vV.current||i.type===!1||w$.skipAnimations)return c$(h);if(!n.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=a$(e,t,h);if(p)return p}return Gv(h)};function qv(t){return!!(xn(t)&&t.add)}const d6=t=>/^\-?\d*\.?\d+$/.test(t);function fS(t,e){t.indexOf(e)===-1&&t.push(e)}function dS(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class hS{constructor(){this.subscriptions=[]}add(e){return fS(this.subscriptions,e),()=>dS(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 S${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,vt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>vt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=E$(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new hS);const n=this.events[e].add(r);return e==="change"?()=>{n(),vt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?a6(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 S$(t,e)}const h6=t=>e=>e.test(t),A$={test:t=>t==="auto",parse:t=>t},p6=[El,Ae,gi,No,OU,IU,A$],_d=t=>p6.find(h6(t)),C$=[...p6,en,Pa],k$=t=>C$.find(h6(t));function T$(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Lf(r))}function P$(t,e){const r=fm(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=GU(i[o]);T$(t,o,a)}}function R$(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&&P$(t,o)}),l}function uw(t,e,r={}){const n=fm(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const i=n?()=>Promise.all(y6(t,n,r)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=s;return M$(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 M$(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(D$).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(uw(l,e,{...i,delay:r+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function D$(t,e){return t.sortNodePosition(e)}function L$(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>uw(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=uw(t,e,r);else{const s=typeof e=="function"?fm(t,e,r.custom):e;n=Promise.all(y6(t,s,r))}return n.then(()=>t.notify("AnimationComplete",e))}const j$=[...KE].reverse(),B$=KE.length;function F$(t){return e=>Promise.all(e.map(({animation:r,options:n})=>L$(t,r,n)))}function U$(t){let e=F$(t);const r=$$();let n=!0;const s=(c,l)=>{const u=fm(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&&C,U=!1;const H=Array.isArray(w)?w:[w];let K=H.reduce(s,{});O===!1&&(K={});const{prevResolvedValues:Q={}}=b,$={...Q,...K},D=T=>{j=!0,h.has(T)&&(U=!0,h.delete(T)),b.needsAnimating[T]=!0};for(const T in $){const P=K[T],R=Q[T];if(p.hasOwnProperty(T))continue;let I=!1;$v(P)&&$v(R)?I=!BO(P,R):I=P!==R,I?P!==void 0?D(T):h.add(T):P!==void 0&&h.has(T)?D(T):b.protectedKeys[T]=!0}b.prevProp=w,b.prevResolvedValues=K,b.isActive&&(p={...p,...K}),n&&t.blockInitialAnimation&&(j=!1),j&&(!_||U)&&d.push(...H.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 V$(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!BO(e,t):!1}function Qa(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $$(){return{animate:Qa(!0),whileInView:Qa(),whileHover:Qa(),whileTap:Qa(),whileDrag:Qa(),whileFocus:Qa(),exit:Qa()}}class z$ extends Ba{constructor(e){super(e),e.animationState||(e.animationState=U$(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),am(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 H$=0;class G$ extends Ba{constructor(){super(...arguments),this.id=H$++}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 q$={animation:{Feature:z$},exit:{Feature:G$}},xP=(t,e)=>Math.abs(t-e);function W$(t,e){const r=xP(t.x,e.x),n=xP(t.y,e.y);return Math.sqrt(r**2+n**2)}class v6{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=Jg(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=W$(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=Yg(d,this.transformPagePoint),vt.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=Jg(f.type==="pointercancel"?this.lastMoveEventInfo:Yg(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,g),p&&p(f,g)},!NO(e))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.contextWindow=s||window;const o=um(e),a=Yg(o,this.transformPagePoint),{point:c}=a,{timestamp:l}=Br;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=r;u&&u(e,Jg(a,this.history)),this.removeListeners=xa(io(this.contextWindow,"pointermove",this.handlePointerMove),io(this.contextWindow,"pointerup",this.handlePointerUp),io(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),po(this.updatePoint)}}function Yg(t,e){return e?{point:e(t.point)}:t}function bP(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Jg({point:t},e){return{point:t,delta:bP(t,m6(e)),offset:bP(t,K$(e)),velocity:Q$(e,.1)}}function K$(t){return t[0]}function m6(t){return t[t.length-1]}function Q$(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=m6(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>ba(e)));)r--;if(!n)return{x:0,y:0};const i=oo(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 fw(t,e=0,r=.01){return Math.abs(t-e)<=r}function wP(t,e,r,n=.5){t.origin=n,t.originPoint=Ot(e.min,e.max,t.origin),t.scale=Un(r)/Un(e),(fw(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ot(r.min,r.max,t.origin)-t.originPoint,(fw(t.translate)||isNaN(t.translate))&&(t.translate=0)}function gh(t,e,r,n){wP(t.x,e.x,r.x,n?n.originX:void 0),wP(t.y,e.y,r.y,n?n.originY:void 0)}function EP(t,e,r){t.min=r.min+e.min,t.max=t.min+Un(e)}function Y$(t,e,r){EP(t.x,e.x,r.x),EP(t.y,e.y,r.y)}function SP(t,e,r){t.min=e.min-r.min,t.max=t.min+Un(e)}function xh(t,e,r){SP(t.x,e.x,r.x),SP(t.y,e.y,r.y)}function J$(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Ot(r,t,n.max):Math.min(t,r)),t}function AP(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 X$(t,{top:e,left:r,bottom:n,right:s}){return{x:AP(t.x,r,s),y:AP(t.y,e,n)}}function CP(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Gh(e.min,e.max-n,t.min):n>s&&(r=Gh(t.min,t.max-s,e.min)),Ta(0,1,r)}function tz(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 dw=.35;function rz(t=dw){return t===!1?t=0:t===!0&&(t=dw),{x:kP(t,"left","right"),y:kP(t,"top","bottom")}}function kP(t,e,r){return{min:TP(t,e),max:TP(t,r)}}function TP(t,e){return typeof t=="number"?t:t[e]||0}const PP=()=>({translate:0,scale:1,origin:0,originPoint:0}),uu=()=>({x:PP(),y:PP()}),RP=()=>({min:0,max:0}),Zt=()=>({x:RP(),y:RP()});function Jn(t){return[t("x"),t("y")]}function g6({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function nz({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function sz(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 Xg(t){return t===void 0||t===1}function hw({scale:t,scaleX:e,scaleY:r}){return!Xg(t)||!Xg(e)||!Xg(r)}function ec(t){return hw(t)||x6(t)||t.z||t.rotate||t.rotateX||t.rotateY}function x6(t){return IP(t.x)||IP(t.y)}function IP(t){return t&&t!=="0%"}function Wv(t,e,r){const n=t-r,s=e*n;return r+s}function OP(t,e,r,n,s){return s!==void 0&&(t=Wv(t,s,n)),Wv(t,r,n)+e}function pw(t,e=0,r=1,n,s){t.min=OP(t.min,e,r,n,s),t.max=OP(t.max,e,r,n,s)}function b6(t,{x:e,y:r}){pw(t.x,e.translate,e.scale,e.originPoint),pw(t.y,r.translate,r.scale,r.originPoint)}function iz(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 Uo(t,e){t.min=t.min+e,t.max=t.max+e}function NP(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=Ot(t.min,t.max,i);pw(t,e[r],e[n],o,e.scale)}const oz=["x","scaleX","originX"],az=["y","scaleY","originY"];function fu(t,e){NP(t.x,e,oz),NP(t.y,e,az)}function w6(t,e){return g6(sz(t.getBoundingClientRect(),e))}function cz(t,e,r){const n=w6(t,r),{scroll:s}=e;return s&&(Uo(n.x,s.offset.x),Uo(n.y,s.offset.y)),n}const E6=({current:t})=>t?t.ownerDocument.defaultView:null,lz=new WeakMap;class uz{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(um(u,"page").point)},i=(u,f)=>{const{drag:d,dragPropagation:h,onDragStart:p}=this.getProps();if(d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=DO(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(gi.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&&vt.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=fz(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 v6(e,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:E6(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&&vt.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=J$(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=X$(s.layoutBox,r):this.constraints=!1,this.elastic=rz(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Jn(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=tz(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=cz(n,s.root,this.visualElement.getTransformPagePoint());let o=Z$(s.layout.layoutBox,i);if(r){const a=r(nz(o));this.hasMutatedConstraints=!!a,a&&(o=g6(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(uS(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]-Ot(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]=ez({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(Ot(c,l,s[o]))})}addListeners(){if(!this.visualElement.current)return;lz.set(this.visualElement,this);const e=this.visualElement.current,r=io(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=ro(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=dw,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 fz(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class dz extends Ba{constructor(e){super(e),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new uz(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 MP=t=>(e,r)=>{t&&vt.update(()=>t(e,r))};class hz extends Ba{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(e){this.session=new v6(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:E6(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:MP(e),onStart:MP(r),onMove:n,onEnd:(i,o)=>{delete this.session,s&&vt.update(()=>s(i,o))}}}mount(){this.removePointerDownListener=io(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 pz(){const t=v.useContext(im);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 q1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function DP(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Nd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ae.test(t))t=parseFloat(t);else return t;const r=DP(t,e.target.x),n=DP(t,e.target.y);return`${r}% ${n}%`}},yz={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=Pa.parse(t);if(s.length>5)return n;const i=Pa.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=Ot(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 vz extends ar.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;SU(mz),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()})),q1.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()||vt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection: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 S6(t){const[e,r]=pz(),n=v.useContext(YE);return ar.createElement(vz,{...t,layoutGroup:n,switchLayoutGroup:v.useContext(gO),isPresent:e,safeToRemove:r})}const mz={borderRadius:{...Nd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nd,borderTopRightRadius:Nd,borderBottomLeftRadius:Nd,borderBottomRightRadius:Nd,boxShadow:yz},A6=["TopLeft","TopRight","BottomLeft","BottomRight"],gz=A6.length,LP=t=>typeof t=="string"?parseFloat(t):t,jP=t=>typeof t=="number"||Ae.test(t);function xz(t,e,r,n,s,i){s?(t.opacity=Ot(0,r.opacity!==void 0?r.opacity:1,bz(n)),t.opacityExit=Ot(e.opacity!==void 0?e.opacity:1,0,wz(n))):i&&(t.opacity=Ot(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Gh(t,e,n))}function FP(t,e){t.min=e.min,t.max=e.max}function Gn(t,e){FP(t.x,e.x),FP(t.y,e.y)}function UP(t,e,r,n,s){return t-=e,t=Wv(t,1/r,n),s!==void 0&&(t=Wv(t,1/s,n)),t}function Ez(t,e=0,r=1,n=.5,s,i=t,o=t){if(gi.test(e)&&(e=parseFloat(e),e=Ot(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Ot(i.min,i.max,n);t===i&&(a-=e),t.min=UP(t.min,e,r,a,s),t.max=UP(t.max,e,r,a,s)}function VP(t,e,[r,n,s],i,o){Ez(t,e[r],e[n],e[s],e.scale,i,o)}const Sz=["x","scaleX","originX"],Az=["y","scaleY","originY"];function $P(t,e,r,n){VP(t.x,e,Sz,r?r.x:void 0,n?n.x:void 0),VP(t.y,e,Az,r?r.y:void 0,n?n.y:void 0)}function zP(t){return t.translate===0&&t.scale===1}function k6(t){return zP(t.x)&&zP(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 T6(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 HP(t){return Un(t.x)/Un(t.y)}class kz{constructor(){this.members=[]}add(e){fS(this.members,e),e.scheduleRender()}remove(e){if(dS(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 GP(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 Tz=(t,e)=>t.depth-e.depth;class Pz{constructor(){this.children=[],this.isDirty=!1}add(e){fS(this.children,e),this.isDirty=!0}remove(e){dS(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Tz),this.isDirty=!1,this.children.forEach(e)}}function Rz(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(po(n),t(i-e))};return vt.read(n,!0),()=>po(n)}function Iz(t){window.MotionDebug&&window.MotionDebug.record(t)}function Oz(t){return t instanceof SVGElement&&t.tagName!=="svg"}function _z(t,e,r){const n=xn(t)?t:Lf(t);return n.start(uS("",n,e,r)),n.animation}const qP=["","X","Y","Z"],Nz={visibility:"hidden"},WP=1e3;let Mz=0;const tc={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function P6({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Mz++,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,tc.totalNodes=tc.resolvedTargetDeltas=tc.recalculatedProjection=0,this.nodes.forEach(jz),this.nodes.forEach($z),this.nodes.forEach(zz),this.nodes.forEach(Bz),Iz(tc)},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=Rz(d,250),q1.hasAnimatedSinceResize&&(q1.hasAnimatedSinceResize=!1,this.nodes.forEach(QP))})}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()||Kz,{onLayoutAnimationStart:g,onLayoutAnimationComplete:m}=u.getProps(),x=!this.targetLayout||!T6(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={...lS(y,"layout"),onPlay:g,onComplete:m};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||QP(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,po(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(Hz),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(Fz),this.sharedNodes.forEach(Gz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,vt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){vt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const C=w/1e3;YP(f.x,o.x,C),YP(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xh(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),qz(this.relativeTarget,this.relativeTargetOrigin,d,C),b&&Cz(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Zt()),Gn(b,this.relativeTarget)),y&&(this.animationValues=u,xz(u,l,this.latestValues,C,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},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&&(po(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=vt.update(()=>{q1.hasAnimatedSinceResize=!0,this.currentAnimation=_z(0,WP,{...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(WP),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&&R6(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),gh(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new kz),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(KP),this.root.sharedNodes.clear()}}}function Dz(t){t.updateLayout()}function Lz(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}):R6(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();gh(a,n,r.layoutBox);const c=uu();o?gh(c,t.applyTransform(s,!0),r.measuredBox):gh(c,n,r.layoutBox);const l=!k6(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();xh(p,r.layoutBox,d.layoutBox);const y=Zt();xh(y,n,h.layoutBox),T6(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 jz(t){tc.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 Bz(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Fz(t){t.clearSnapshot()}function KP(t){t.clearMeasurements()}function Uz(t){t.isLayoutDirty=!1}function Vz(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function QP(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function $z(t){t.resolveTargetDelta()}function zz(t){t.calcProjection()}function Hz(t){t.resetRotation()}function Gz(t){t.removeLeadSnapshot()}function YP(t,e,r){t.translate=Ot(e.translate,0,r),t.scale=Ot(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function JP(t,e,r,n){t.min=Ot(e.min,r.min,n),t.max=Ot(e.max,r.max,n)}function qz(t,e,r,n){JP(t.x,e.x,r.x,n),JP(t.y,e.y,r.y,n)}function Wz(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Kz={duration:.45,ease:[.4,0,.1,1]},XP=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),ZP=XP("applewebkit/")&&!XP("chrome/")?Math.round:Ut;function eR(t){t.min=ZP(t.min),t.max=ZP(t.max)}function Qz(t){eR(t.x),eR(t.y)}function R6(t,e,r){return t==="position"||t==="preserve-aspect"&&!fw(HP(e),HP(r),.2)}const Yz=P6({attachResizeListener:(t,e)=>ro(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zg={current:void 0},I6=P6({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Zg.current){const t=new Yz({});t.mount(window),t.setOptions({layoutScroll:!0}),Zg.current=t}return Zg.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Jz={pan:{Feature:hz},drag:{Feature:dz,ProjectionNode:I6,MeasureLayout:S6}},Xz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Zz(t){const e=Xz.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function yw(t,e,r=1){const[n,s]=Zz(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);if(i){const o=i.trim();return d6(o)?parseFloat(o):o}else return sw(s)?yw(s,e,r+1):s}function eH(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(!sw(i))return;const o=yw(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!sw(i))continue;const o=yw(i,n);o&&(e[s]=o,r||(r={}),r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const tH=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),O6=t=>tH.has(t),rH=t=>Object.keys(t).some(O6),tR=t=>t===El||t===Ae,rR=(t,e)=>parseFloat(t.split(", ")[e]),nR=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return rR(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?rR(i[1],t):0}},nH=new Set(["x","y","z"]),sH=ey.filter(t=>!nH.has(t));function iH(t){const e=[];return sH.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:nR(4,13),y:nR(5,14)};jf.translateX=jf.x;jf.translateY=jf.y;const oH=(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},aH=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(O6);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=_d(u);const d=e[c];let h;if($v(d)){const p=d.length,y=d[0]===null?1:0;u=d[y],f=_d(u);for(let g=y;g=0?window.pageYOffset:null,l=oH(e,t,a);return i.length&&i.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),om&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function cH(t,e,r,n){return rH(e)?aH(t,e,r,n):{target:e,transitionEnd:n}}const lH=(t,e,r,n)=>{const s=eH(t,e,n);return e=s.target,n=s.transitionEnd,cH(t,e,r,n)},vw={current:null},_6={current:!1};function uH(){if(_6.current=!0,!!om)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>vw.current=t.matches;t.addListener(e),e()}else vw.current=!1}function fH(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),qv(n)&&n.add(s);else if(xn(o))t.addValue(s,Lf(i,{owner:t})),qv(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 sR=new WeakMap,N6=Object.keys(Hh),dH=N6.length,iR=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],hH=QE.length;class pH{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=()=>vt.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=cm(r),this.isVariantNode=mO(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),qv(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){this.current=e,sR.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)),_6.current||uH(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:vw.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){sR.delete(this.current),this.projection&&this.projection.unmount(),po(this.notifyUpdate),po(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=wl.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&vt.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=nS(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 hS),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class M6 extends pH{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=O$(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){R$(this,n,o);const a=lH(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function yH(t){return window.getComputedStyle(t)}class vH extends M6{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,r){if(wl.has(r)){const n=cS(r);return n&&n.default||0}else{const n=yH(e),s=(wO(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return w6(e,r)}build(e,r,n,s){XE(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return rS(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){TO(e,r,n,s)}}class mH extends M6{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(wl.has(r)){const n=cS(r);return n&&n.default||0}return r=PO.has(r)?r:WE(r),e.getAttribute(r)}measureInstanceViewportBox(){return Zt()}scrapeMotionValuesFromProps(e,r){return IO(e,r)}build(e,r,n,s){eS(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){RO(e,r,n,s)}mount(e){this.isSVGTag=tS(e.tagName),super.mount(e)}}const gH=(t,e)=>JE(t)?new mH(e,{enableHardwareAcceleration:!1}):new vH(e,{enableHardwareAcceleration:!0}),xH={layout:{ProjectionNode:I6,MeasureLayout:S6}},bH={...q$,...dV,...Jz,...xH},Yc=wU((t,e)=>ZU(t,e,bH,gH));function D6(){const t=v.useRef(!1);return qE(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function wH(){const t=D6(),[e,r]=v.useState(0),n=v.useCallback(()=>{t.current&&r(e+1)},[e]);return[v.useCallback(()=>vt.postRender(n),[n]),e]}class EH 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 SH({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"&&(ga===null?ga=new Set([this]):ga.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,ma(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 Au(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=ba(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),Au(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(Au(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=ba(s,c),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=ba(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=ba(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(ie(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(ie(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),Ls(n,t,s,-1))}return VE(),n=Fg(Error(ie(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=va(s.nextSibling),Ln=e,St=!0,Ns=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(ie(153));if(e.child!==null){for(t=e.child,r=ba(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=ba(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=Cv)}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"&&(Ch.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"&&(Ch.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,Ns!==null&&(sw(Ns),Ns=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(ie(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=Ab(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(ie(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(ie(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 AE(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(ie(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=Cv));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,ua===null)var n=!1;else{if(t=ua,ua=null,Bv=0,Qe&6)throw Error(ie(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(ie(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);Au(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(ie(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(ie(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(ie(423)),e),e=GT(t,e,n,r,s);break e}else if(n!==s){s=Mf(Error(ie(424)),e),e=GT(t,e,n,r,s);break e}else for(Dn=va(e.stateNode.containerInfo.firstChild),Ln=e,St=!0,Ns=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(Fs(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(ie(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,Au(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,Au(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(ie(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 ba(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(ie(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"},AU=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(--"),kU=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,TU=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ra=(t,e,r)=>Math.min(Math.max(r,t),e),Al={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},yh={...Al,transform:t=>Ra(0,1,t)},Xy={...Al,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("%"),ke=ty("px"),RU=ty("vh"),IU=ty("vw"),oP={...mi,parse:t=>mi.parse(t)/100,transform:t=>mi.transform(t*100)},aP={...Al,transform:Math.round},EO={borderWidth:ke,borderTopWidth:ke,borderRightWidth:ke,borderBottomWidth:ke,borderLeftWidth:ke,borderRadius:ke,radius:ke,borderTopLeftRadius:ke,borderTopRightRadius:ke,borderBottomRightRadius:ke,borderBottomLeftRadius:ke,width:ke,maxWidth:ke,height:ke,maxHeight:ke,size:ke,top:ke,right:ke,bottom:ke,left:ke,padding:ke,paddingTop:ke,paddingRight:ke,paddingBottom:ke,paddingLeft:ke,margin:ke,marginTop:ke,marginRight:ke,marginBottom:ke,marginLeft:ke,rotate:Mo,rotateX:Mo,rotateY:Mo,rotateZ:Mo,scale:Xy,scaleX:Xy,scaleY:Xy,scaleZ:Xy,skew:Mo,skewX:Mo,skewY:Mo,distance:ke,translateX:ke,translateY:ke,translateZ:ke,x:ke,y:ke,z:ke,perspective:ke,transformPerspective:ke,opacity:yh,originX:oP,originY:oP,originZ:ke,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=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 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 AO=t=>!$v(t);function DU(t){t&&(AO=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"||(AO(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:ke.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]=ke.transform(-n);const o=ke.transform(e),a=ke.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 CO=()=>({...eS(),attrs:{}}),rS=t=>typeof t=="string"&&t.toLowerCase()==="svg";function VU(t,e,r,n){const s=v.useMemo(()=>{const i=CO();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:CO,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)),wa=(...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 Ua{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 Ua{mount(){this.unmount=wa(dP(this.node,!0),dP(this.node,!1))}unmount(){}}class rV extends Ua{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=wa(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 Ua{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=wa(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=wa(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=wa(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 Ua{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 Ea=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),AV=HO(oS),WO=ry(.33,1.53,.69,.99),aS=GO(WO),CV=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:AV,circOut:qO,backIn:aS,backInOut:CV,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=>Ra(0,255,t),qg={...Al,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:Al.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 Ia={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=Ia.createTransformer(e),n=Hv(t),s=Hv(e);return n.numVars===s.numVars&&n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?wa(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(Ra(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<=Ea(vP));let o=1-e;o=Ra(GV,qV,o),t=Ra(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=Ea(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 C=Math.exp(-p*g*w);return i-C*((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 C=Math.exp(-p*g*w),O=Math.min(b*w,300);return i-C*((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 C=h;b!==0&&(p<1?C=a6(x,b,w):C=0);const O=Math.abs(C)<=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=A=>a!==void 0&&Ac,p=A=>a===void 0?c:c===void 0||Math.abs(a-A)-y*Math.exp(-A/n),b=A=>m+x(A),w=A=>{const j=x(A),U=b(A);d.done=Math.abs(j)<=l,d.value=d.done?m:U};let C,O;const _=A=>{h(d.value)&&(C=A,O=c6({keyframes:[d.value,p(d.value)],velocity:a6(b,A,d.value),damping:s,stiffness:i,restDelta:l,restSpeed:u}))};return _(0),{calculatedDuration:null,next:A=>{let j=!1;return!O&&C===void 0&&(j=!0,w(A),_(A)),C!==void 0&&A>C?O.next(A-C):(!j&&w(A),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(B=>{y=B})};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 C=b({...d,keyframes:n});let O;a==="mirror"&&(O=b({...d,keyframes:[...n].reverse(),velocity:-(d.velocity||0)}));let _="idle",A=null,j=null,U=null;C.calculatedDuration===null&&i&&(C.calculatedDuration=bP(C));const{calculatedDuration:H}=C;let K=1/0,Q=1/0;H!==null&&(K=H+o,Q=K*(i+1)-o);let $=0;const D=B=>{if(j===null)return;h>0&&(j=Math.min(j,B)),h<0&&(j=Math.min(B-Q/h,j)),A!==null?$=A:$=Math.round(B-j)*h;const J=$-e*(h>=0?1:-1),se=h>=0?J<0:J>Q;$=Math.max(J,0),_==="finished"&&A===null&&($=Q);let ae=$,Se=C;if(i){const Be=Math.min($,Q)/K;let Pe=Math.floor(Be),De=Be%1;!De&&Be>=1&&(De=1),De===1&&Pe--,Pe=Math.min(Pe,i+1),!!(Pe%2)&&(a==="reverse"?(De=1-De,o&&(De-=o/K)):a==="mirror"&&(Se=O)),ae=Ra(0,1,De)*K}const ve=se?{done:!1,value:n[0]}:Se.next(ae);w&&(ve.value=w(ve.value));let{done:oe}=ve;!se&&H!==null&&(oe=h>=0?$>=Q:$<=0);const Me=A===null&&(_==="finished"||_==="running"&&oe);return f&&f(ve.value),Me&&R(),ve},T=()=>{x&&x.stop(),x=void 0},P=()=>{_="idle",T(),y(),m(),j=U=null},R=()=>{_="finished",u&&u(),T(),y()},I=()=>{if(p)return;x||(x=r(D));const B=x.now();c&&c(),A!==null?j=B-A:(!j||_==="finished")&&(j=B),_==="finished"&&m(),U=j,A=null,_="running",x.start()};t&&I();const F={then(B,J){return g.then(B,J)},get time(){return ao($)},set time(B){B=Ea(B),$=B,A!==null||!x||h===0?A=B:j=x.now()-B/h},get duration(){const B=C.calculatedDuration===null?bP(C):C.calculatedDuration;return ao(B)},get speed(){return h},set speed(B){B===h||!x||(h=B,F.time=ao($))},get state(){return _},play:I,pause:()=>{_="paused",A=$},stop:()=>{p=!0,_!=="idle"&&(_="idle",l&&l(),P())},cancel:()=>{U!==null&&D(U),P()},complete:()=>{_="finished"},sample:B=>(j=0,D(B))};return F}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 C=[];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=Ea(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"&&(Ia.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={...Ia,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=Ia),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-Ea(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=Ea(h.duration)),h.repeatDelay&&(h.repeatDelay=Ea(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=[Al,ke,mi,Mo,IU,RU,S$],Od=t=>h6.find(d6(t)),A$=[...h6,en,Ia],C$=t=>A$.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&&C,U=!1;const H=Array.isArray(w)?w:[w];let K=H.reduce(s,{});O===!1&&(K={});const{prevResolvedValues:Q={}}=b,$={...Q,...K},D=T=>{j=!0,h.has(T)&&(U=!0,h.delete(T)),b.needsAnimating[T]=!0};for(const T in $){const P=K[T],R=Q[T];if(p.hasOwnProperty(T))continue;let I=!1;zv(P)&&zv(R)?I=!jO(P,R):I=P!==R,I?P!==void 0?D(T):h.add(T):P!==void 0&&h.has(T)?D(T):b.protectedKeys[T]=!0}b.prevProp=w,b.prevResolvedValues=K,b.isActive&&(p={...p,...K}),n&&t.blockInitialAnimation&&(j=!1),j&&(!_||U)&&d.push(...H.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 Xa(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function V$(){return{animate:Xa(!0),whileInView:Xa(),whileHover:Xa(),whileTap:Xa(),whileDrag:Xa(),whileFocus:Xa(),exit:Xa()}}class $$ extends Ua{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 Ua{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=wa(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>Ea(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 AP(t,e,r){t.min=r.min+e.min,t.max=t.min+Un(e)}function Q$(t,e,r){AP(t.x,e.x,r.x),AP(t.y,e.y,r.y)}function CP(t,e,r){t.min=e.min-r.min,t.max=t.min+Un(e)}function gh(t,e,r){CP(t.x,e.x,r.x),CP(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)),Ra(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 nc(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 Ua{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 Ua{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(ke.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=Ia.parse(t);if(s.length>5)return n;const i=Ia.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"||ke.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 C6(t){return GP(t.x)&&GP(t.y)}function Az(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 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 sc={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,sc.totalNodes=sc.resolvedTargetDeltas=sc.recalculatedProjection=0,this.nodes.forEach(Lz),this.nodes.forEach(Vz),this.nodes.forEach($z),this.nodes.forEach(jz),Rz(sc)},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 C=w/1e3;XP(f.x,o.x,C),XP(f.y,o.y,C),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,C),b&&Az(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Zt()),Gn(b,this.relativeTarget)),y&&(this.animationValues=u,gz(u,l,this.latestValues,C,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},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 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 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=!C6(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){sc.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===Al||t===ke,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(EH,{isPresent:e,childRef:n,sizeRef:s},v.cloneElement(t,{ref:n}))}const ex=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=OO(AH),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(SH,{isPresent:r},t)),v.createElement(im.Provider,{value:l},t)};function AH(){return new Map}function CH(t){return v.useEffect(()=>()=>t(),[])}const rc=t=>t.key||"";function kH(t,e){t.forEach(r=>{const n=rc(r);e.set(n,r)})}function TH(t){const e=[];return v.Children.forEach(t,r=>{v.isValidElement(r)&&e.push(r)}),e}const pS=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{const a=v.useContext(YE).forceRender||wH()[0],c=D6(),l=TH(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(qE(()=>{p.current=!1,kH(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(ex,{key:rc(x),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},x)));u=[...u];const y=d.current.map(rc),g=l.map(rc),m=y.length;for(let x=0;x{if(g.indexOf(b)!==-1)return;const w=h.get(b);if(!w)return;const C=y.indexOf(b);let O=x;if(!O){const _=()=>{f.delete(b);const A=Array.from(h.keys()).filter(j=>!g.includes(j));if(A.forEach(j=>h.delete(j)),d.current=l.filter(j=>{const U=rc(j);return U===b||A.includes(U)}),!f.size){if(c.current===!1)return;a(),n&&n()}};O=v.createElement(ex,{key:rc(w),isPresent:!1,onExitComplete:_,custom:e,presenceAffectsLayout:i,mode:o},w),f.set(b,O)}u.splice(C,0,O)}),u=u.map(x=>{const b=x.key;return f.has(b)?x:v.createElement(ex,{key:rc(x),isPresent:!0,presenceAffectsLayout:i,mode:o},x)}),v.createElement(v.Fragment,null,f.size?u:u.map(x=>v.cloneElement(x)))},L6={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 AH(t){return v.useEffect(()=>()=>t(),[])}const ic=t=>t.key||"";function CH(t,e){t.forEach(r=>{const n=ic(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,CH(l,h),d.current=u}),AH(()=>{p.current=!0,h.clear(),f.clear()}),p.current)return v.createElement(v.Fragment,null,u.map(x=>v.createElement(tx,{key:ic(x),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},x)));u=[...u];const y=d.current.map(ic),g=l.map(ic),m=y.length;for(let x=0;x{if(g.indexOf(b)!==-1)return;const w=h.get(b);if(!w)return;const C=y.indexOf(b);let O=x;if(!O){const _=()=>{f.delete(b);const A=Array.from(h.keys()).filter(j=>!g.includes(j));if(A.forEach(j=>h.delete(j)),d.current=l.filter(j=>{const U=ic(j);return U===b||A.includes(U)}),!f.size){if(c.current===!1)return;a(),n&&n()}};O=v.createElement(tx,{key:ic(w),isPresent:!1,onExitComplete:_,custom:e,presenceAffectsLayout:i,mode:o},w),f.set(b,O)}u.splice(C,0,O)}),u=u.map(x=>{const b=x.key;return f.has(b)?x:v.createElement(tx,{key:ic(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"},PH={...L6,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)"},RH={...L6,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)"},IH={dark:PH,light:RH},OH={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 oR={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 _H(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 NH(t){var e=_H(t,"string");return typeof e=="symbol"?e:String(e)}function MH(t,e,r){return e=NH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aR(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 tx(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=tx({},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?tx(tx({},u),f):c,x=function(){var C=m[b],O=s[b];try{if(O.mappings)return 1;if(typeof C=="string"||typeof C=="number")l.push(O.values[C].defaultClass);else if(Array.isArray(C))for(var _=0;_t,jH=function(){return DH(LH)(...arguments)},j6=jH({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 BH=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],mw=t=>(t.display||(t.display=Object.keys(t).some(e=>BH.includes(e))?"flex":void 0),j6(t));mw.properties=j6.properties;const FH="https://assets.sequence.info/",UH=5,VH={xs:"small",sm:"small",md:"medium",lg:"large",xl:"large"},B6=t=>t?VH[t]||t:"medium",$H=(t,e)=>t.replace(/\/(small|medium|large)\//,`/${B6(e)}/`),zH=(t,e)=>FH+`images/networks/${B6(e)}/${t}.webp?v${UH}`;function F6(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)mw.properties.has(l)?o[l]=i[l]:a[l]=i[l];const c=mw({...o,...n});return v.createElement(r,{className:qr(c,s),...a,ref:e})});var U6={exports:{}},Md={};/** + )`,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 C=m[b],O=s[b];try{if(O.mappings)return 1;if(typeof C=="string"||typeof C=="number")l.push(O.values[C].defaultClass);else if(Array.isArray(C))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 cR;function HH(){if(cR)return Md;cR=1;var t=ar,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 Md.Fragment=r,Md.jsx=o,Md.jsxs=o,Md}U6.exports=HH();var E=U6.exports;function GH(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 qH(t){var e=GH(t,"string");return typeof e=="symbol"?e:String(e)}function WH(t,e,r){return e=qH(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 uR(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},Mt=t=>{var e=r=>{var n=t.defaultClassName,s=uR(uR({},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)KH(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 fR(t.variantClassNames,r=>fR(r,n=>n.split(" ")[0]))}},e};Mt({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(G,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var QH=Mt({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=OH[n];return E.jsx(G,{as:r,className:qr(s,QH({hidden:i,ellipsis:l,italic:o,underline:a,uppercase:u,capitalize:f})),ref:e,...h,...d,children:c})});var YH=Mt({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 ft=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,C=d==="xs"?"xs":"sm";return E.jsx(G,{as:r,className:qr(s,YH({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:C}):E.jsxs(G,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[E.jsxs(G,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[u&&E.jsx(u,{size:C}),E.jsx(ue,{children:l})]}),f&&E.jsx(f,{size:C})]})})});var JH=Mt({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 XH=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(G,{className:qr(r,JH({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 ZH(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function dm(...t){return e=>t.forEach(r=>ZH(r,e))}function ze(...t){return v.useCallback(dm(...t),t)}function eG(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,tG(s,...e)]}function tG(...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]=rG({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 rG({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 hm(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 pm(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 nG(t,e){return v.useReducer((r,n)=>e[r][n]??r,t)}var cn=t=>{const{present:e,children:r}=t,n=sG(e),s=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),i=ze(n.ref,iG(s));return typeof r=="function"||n.isPresent?v.cloneElement(s,{ref:i}):null};cn.displayName="Presence";function sG(t){const[e,r]=v.useState(),n=v.useRef({}),s=v.useRef(t),i=v.useRef("none"),o=t?"mounted":"unmounted",[a,c]=nG(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&&wo.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 iG(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 al=v.forwardRef((t,e)=>{const{children:r,...n}=t,s=v.Children.toArray(r),i=s.find(oG);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(gw,{...n,ref:e,children:v.isValidElement(o)?v.cloneElement(o,void 0,a):null})}return E.jsx(gw,{...n,ref:e,children:r})});al.displayName="Slot";var gw=v.forwardRef((t,e)=>{const{children:r,...n}=t;if(v.isValidElement(r)){const s=cG(r);return v.cloneElement(r,{...aG(n,r.props),ref:e?dm(e,s):s})}return v.Children.count(r)>1?v.Children.only(null):null});gw.displayName="SlotClone";var V6=({children:t})=>E.jsx(E.Fragment,{children:t});function oG(t){return v.isValidElement(t)&&t.type===V6}function aG(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 cG(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 lG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],be=lG.reduce((t,e)=>{const r=v.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?al: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 yS(t,e){t&&wo.flushSync(()=>t.dispatchEvent(e))}var vS="Checkbox",[uG,I1e]=Wr(vS),[fG,dG]=uG(vS),$6=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=ze(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(fG,{scope:r,state:g,disabled:a,children:[E.jsx(be.button,{type:"button",role:"checkbox","aria-checked":Jc(g)?"mixed":g,"aria-required":o,"data-state":G6(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=>Jc(w)?!0:!w),y&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})}),y&&E.jsx(hG,{control:f,bubbles:!p.current,name:n,value:c,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});$6.displayName=vS;var z6="CheckboxIndicator",H6=v.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=dG(z6,r);return E.jsx(cn,{present:n||Jc(i.state)||i.state===!0,children:E.jsx(be.span,{"data-state":G6(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});H6.displayName=z6;var hG=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=v.useRef(null),o=hm(r),a=pm(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=Jc(r),f.call(c,Jc(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),E.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:Jc(r)?!1:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Jc(t){return t==="indeterminate"}function G6(t){return Jc(t)?"indeterminate":t?"checked":"unchecked"}var pG=$6,yG=H6,vG=Mt({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 Sl=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?E.jsxs(G,{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(G,{as:"label",className:vG({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var sy=Mt({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const mG=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"})}),mS=({size:t="sm",...e})=>E.jsx(G,{as:mG,className:sy({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:"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"})}),q6=({size:t="sm",...e})=>E.jsx(G,{as:gG,className:sy({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:"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"})}),qh=({size:t="sm",...e})=>E.jsx(G,{as:xG,className:sy({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:"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"})}),wG=({size:t="sm",...e})=>E.jsx(G,{as:bG,className:sy({size:t}),...e}),EG=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"})}),SG=({size:t="sm",...e})=>E.jsx(G,{as:EG,className:sy({size:t}),...e});var AG=Mt({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 kG=({size:t="sm"})=>E.jsx(yG,{className:CG,children:E.jsx(mS,{size:t==="lg"?"sm":"xs"})}),W6=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(Sl,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:E.jsx(pG,{className:AG({size:a}),disabled:r,id:n??s,name:s,ref:e,...c,children:E.jsx(kG,{size:a})})})});ar.createContext(null);var TG=u5["useId".toString()]||(()=>{}),PG=0;function us(t){const[e,r]=v.useState(TG());return Tr(()=>{t||r(n=>n??String(PG++))},[t]),t||(e?`radix-${e}`:"")}var gS="Collapsible",[RG,O1e]=Wr(gS),[IG,xS]=RG(gS),K6=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(IG,{scope:r,disabled:i,contentId:us(),open:c,onOpenToggle:v.useCallback(()=>l(u=>!u),[l]),children:E.jsx(be.div,{"data-state":wS(c),"data-disabled":i?"":void 0,...a,ref:e})})});K6.displayName=gS;var Q6="CollapsibleTrigger",Y6=v.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,s=xS(Q6,r);return E.jsx(be.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":wS(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:ce(t.onClick,s.onOpenToggle)})});Y6.displayName=Q6;var bS="CollapsibleContent",J6=v.forwardRef((t,e)=>{const{forceMount:r,...n}=t,s=xS(bS,t.__scopeCollapsible);return E.jsx(cn,{present:r||s.open,children:({present:i})=>E.jsx(OG,{...n,ref:e,present:i})})});J6.displayName=bS;var OG=v.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:s,...i}=t,o=xS(bS,r),[a,c]=v.useState(n),l=v.useRef(null),u=ze(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(be.div,{"data-state":wS(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 wS(t){return t?"open":"closed"}var _G=K6,NG=Y6,MG=J6,dR="64px",DG="_4j62fl0",LG="_4j62fl2 _4j62fl1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11od fyvr128 fyvr12v7 fyvr11n4 _4efw240",jG="_4j62fl4 _4j62fl3 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",BG="_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(_G,{open:u,defaultOpen:n,onOpenChange:d,asChild:!0,children:E.jsxs(G,{as:Yc.div,className:qr(e,DG),initial:{height:u?"auto":dR},animate:{height:u?"auto":dR},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[E.jsxs(NG,{className:LG,children:[E.jsx(ue,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),E.jsx(G,{as:Yc.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(q6,{className:BG,color:"text50"})})]}),E.jsx(pS,{children:u&&E.jsx(MG,{className:jG,asChild:!0,forceMount:!0,children:E.jsx(Yc.div,{initial:{opacity:u?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function ym(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=ar.useRef(null),m=ar.useRef(new Map).current;return E.jsx(s,{scope:p,itemMap:m,collectionRef:g,children:y})};o.displayName=e;const a=t+"CollectionSlot",c=ar.forwardRef((h,p)=>{const{scope:y,children:g}=h,m=i(a,y),x=ze(p,m.collectionRef);return E.jsx(al,{ref:x,children:g})});c.displayName=a;const l=t+"CollectionItemSlot",u="data-radix-collection-item",f=ar.forwardRef((h,p)=>{const{scope:y,children:g,...m}=h,x=ar.useRef(null),b=ze(p,x),w=i(l,y);return ar.useEffect(()=>(w.itemMap.set(x,{ref:x,...m}),()=>void w.itemMap.delete(x))),E.jsx(al,{[u]:"",ref:b,children:g})});f.displayName=l;function d(h){const p=i(t+"CollectionConsumer",h);return ar.useCallback(()=>{const g=p.collectionRef.current;if(!g)return[];const m=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((w,C)=>m.indexOf(w.ref.current)-m.indexOf(C.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},d,n]}var FG=v.createContext(void 0);function iy(t){const e=v.useContext(FG);return t||e||"ltr"}function UG(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 VG="DismissableLayer",xw="dismissableLayer.update",$G="dismissableLayer.pointerDownOutside",zG="dismissableLayer.focusOutside",hR,X6=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(X6),[u,f]=v.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),p=ze(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,C=GG(_=>{const A=_.target,j=[...l.branches].some(U=>U.contains(A));!w||j||(s==null||s(_),o==null||o(_),_.defaultPrevented||a==null||a())},d),O=qG(_=>{const A=_.target;[...l.branches].some(U=>U.contains(A))||(i==null||i(_),o==null||o(_),_.defaultPrevented||a==null||a())},d);return UG(_=>{x===l.layers.size-1&&(n==null||n(_),!_.defaultPrevented&&a&&(_.preventDefault(),a()))},d),v.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(hR=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),pR(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=hR)}},[u,d,r,l]),v.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),pR())},[u,l]),v.useEffect(()=>{const _=()=>h({});return document.addEventListener(xw,_),()=>document.removeEventListener(xw,_)},[]),E.jsx(be.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,C.onPointerDownCapture)})});od.displayName=VG;var HG="DismissableLayerBranch",Z6=v.forwardRef((t,e)=>{const r=v.useContext(X6),n=v.useRef(null),s=ze(e,n);return v.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),E.jsx(be.div,{...t,ref:s})});Z6.displayName=HG;function GG(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(){e_($G,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 qG(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&&e_(zG,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 pR(){const t=new CustomEvent(xw);document.dispatchEvent(t)}function e_(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?yS(s,i):s.dispatchEvent(i)}var WG=od,KG=Z6,rx=0;function ES(){v.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??yR()),document.body.insertAdjacentElement("beforeend",t[1]??yR()),rx++,()=>{rx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),rx--}},[])}function yR(){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 nx="focusScope.autoFocusOnMount",sx="focusScope.autoFocusOnUnmount",vR={bubbles:!1,cancelable:!0},QG="FocusScope",vm=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=ze(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:Mo(f.current,{select:!0})},g=function(b){if(h.paused||!a)return;const w=b.relatedTarget;w!==null&&(a.contains(w)||Mo(f.current,{select:!0}))},m=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&Mo(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){gR.add(h);const y=document.activeElement;if(!a.contains(y)){const m=new CustomEvent(nx,vR);a.addEventListener(nx,l),a.dispatchEvent(m),m.defaultPrevented||(YG(tq(t_(a)),{select:!0}),document.activeElement===y&&Mo(a))}return()=>{a.removeEventListener(nx,l),setTimeout(()=>{const m=new CustomEvent(sx,vR);a.addEventListener(sx,u),a.dispatchEvent(m),m.defaultPrevented||Mo(y??document.body,{select:!0}),a.removeEventListener(sx,u),gR.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]=JG(x);b&&w?!y.shiftKey&&m===w?(y.preventDefault(),r&&Mo(b,{select:!0})):y.shiftKey&&m===b&&(y.preventDefault(),r&&Mo(w,{select:!0})):m===x&&y.preventDefault()}},[r,n,h.paused]);return E.jsx(be.div,{tabIndex:-1,...o,ref:d,onKeyDown:p})});vm.displayName=QG;function YG(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Mo(n,{select:e}),document.activeElement!==r)return}function JG(t){const e=t_(t),r=mR(e,t),n=mR(e.reverse(),t);return[r,n]}function t_(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 mR(t,e){for(const r of t)if(!XG(r,{upTo:e}))return r}function XG(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 ZG(t){return t instanceof HTMLInputElement&&"select"in t}function Mo(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&ZG(t)&&e&&t.select()}}var gR=eq();function eq(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=xR(t,e),t.unshift(e)},remove(e){var r;t=xR(t,e),(r=t[0])==null||r.resume()}}}function xR(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function tq(t){return t.filter(e=>e.tagName!=="A")}const rq=["top","right","bottom","left"],pi=Math.min,_n=Math.max,Kv=Math.round,n1=Math.floor,Ra=t=>({x:t,y:t}),nq={left:"right",right:"left",bottom:"top",top:"bottom"},sq={start:"end",end:"start"};function bw(t,e,r){return _n(t,pi(e,r))}function yo(t,e){return typeof t=="function"?t(e):t}function vo(t){return t.split("-")[0]}function ad(t){return t.split("-")[1]}function SS(t){return t==="x"?"y":"x"}function AS(t){return t==="y"?"height":"width"}function Ia(t){return["top","bottom"].includes(vo(t))?"y":"x"}function CS(t){return SS(Ia(t))}function iq(t,e,r){r===void 0&&(r=!1);const n=ad(t),s=CS(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=Qv(o)),[o,Qv(o)]}function oq(t){const e=Qv(t);return[ww(t),e,ww(e)]}function ww(t){return t.replace(/start|end/g,e=>sq[e])}function aq(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 cq(t,e,r,n){const s=ad(t);let i=aq(vo(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(ww)))),i}function Qv(t){return t.replace(/left|right|bottom|top/g,e=>nq[e])}function lq(t){return{top:0,right:0,bottom:0,left:0,...t}}function r_(t){return typeof t!="number"?lq(t):{top:t,right:t,bottom:t,left:t}}function Yv(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 bR(t,e,r){let{reference:n,floating:s}=t;const i=Ia(e),o=CS(e),a=AS(o),c=vo(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 uq=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}=bR(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}=yo(t,e)||{};if(l==null)return{};const f=r_(u),d={x:r,y:n},h=CS(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],C=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 A=w/2-C/2,j=_/2-y[p]/2-1,U=pi(f[m],j),H=pi(f[x],j),K=U,Q=_-y[p]-H,$=_/2-y[p]/2+A,D=bw(K,$,Q),T=!c.arrow&&ad(s)!=null&&$!==D&&i.reference[p]/2-($$<=0)){var H,K;const $=(((H=i.flip)==null?void 0:H.index)||0)+1,D=_[$];if(D)return{data:{index:$,overflows:U},reset:{placement:D}};let T=(K=U.filter(P=>P.overflows[0]<=0).sort((P,R)=>P.overflows[1]-R.overflows[1])[0])==null?void 0:K.placement;if(!T)switch(h){case"bestFit":{var Q;const P=(Q=U.filter(R=>{if(O){const I=Ia(R.placement);return I===x||I==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(I=>I>0).reduce((I,F)=>I+F,0)]).sort((R,I)=>R[1]-I[1])[0])==null?void 0:Q[0];P&&(T=P);break}case"initialPlacement":T=a;break}if(s!==T)return{reset:{placement:T}}}return{}}}};function wR(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ER(t){return rq.some(e=>t[e]>=0)}const hq=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=yo(t,e);switch(n){case"referenceHidden":{const i=await Wh(e,{...s,elementContext:"reference"}),o=wR(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:ER(o)}}}case"escaped":{const i=await Wh(e,{...s,altBoundary:!0}),o=wR(i,r.floating);return{data:{escapedOffsets:o,escaped:ER(o)}}}default:return{}}}}};async function pq(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=vo(r),a=ad(r),c=Ia(r)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,f=yo(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 yq=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 pq(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}}}}},vq=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}=yo(t,e),l={x:r,y:n},u=await Wh(e,c),f=Ia(vo(s)),d=SS(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=bw(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=bw(x,p,b)}const y=a.fn({...e,[d]:h,[f]:p});return{...y,data:{x:y.x-r,y:y.y-n}}}}},mq=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}=yo(t,e),u={x:r,y:n},f=Ia(s),d=SS(f);let h=u[d],p=u[f];const y=yo(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,C=i.reference[d]+i.reference[b]-g.mainAxis;hC&&(h=C)}if(l){var m,x;const b=d==="y"?"width":"height",w=["top","left"].includes(vo(s)),C=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}}}},gq=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}=yo(t,e),c=await Wh(e,a),l=vo(r),u=ad(r),f=Ia(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=pi(h-c[p],g),b=pi(d-c[y],m),w=!e.middlewareData.shift;let C=x,O=b;if(f?O=u||w?pi(b,m):m:C=u||w?pi(x,g):g,w&&!u){const A=_n(c.left,0),j=_n(c.right,0),U=_n(c.top,0),H=_n(c.bottom,0);f?O=d-2*(A!==0||j!==0?A+j:_n(c.left,c.right)):C=h-2*(U!==0||H!==0?U+H:_n(c.top,c.bottom))}await o({...e,availableWidth:O,availableHeight:C});const _=await s.getDimensions(i.floating);return d!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function cd(t){return n_(t)?(t.nodeName||"").toLowerCase():"#document"}function jn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Eo(t){var e;return(e=(n_(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function n_(t){return t instanceof Node||t instanceof jn(t).Node}function wi(t){return t instanceof Element||t instanceof jn(t).Element}function Ei(t){return t instanceof HTMLElement||t instanceof jn(t).HTMLElement}function SR(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof jn(t).ShadowRoot}function oy(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Us(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function xq(t){return["table","td","th"].includes(cd(t))}function mm(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function kS(t){const e=TS(),r=Us(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 bq(t){let e=Oa(t);for(;Ei(e)&&!Bf(e);){if(mm(e))return null;if(kS(e))return e;e=Oa(e)}return null}function TS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bf(t){return["html","body","#document"].includes(cd(t))}function Us(t){return jn(t).getComputedStyle(t)}function gm(t){return wi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Oa(t){if(cd(t)==="html")return t;const e=t.assignedSlot||t.parentNode||SR(t)&&t.host||Eo(t);return SR(e)?e.host:e}function s_(t){const e=Oa(t);return Bf(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ei(e)&&oy(e)?e:s_(e)}function Kh(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=s_(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=jn(s);return i?e.concat(o,o.visualViewport||[],oy(s)?s:[],o.frameElement&&r?Kh(o.frameElement):[]):e.concat(s,Kh(s,[],r))}function i_(t){const e=Us(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Ei(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Kv(r)!==i||Kv(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function PS(t){return wi(t)?t:t.contextElement}function ku(t){const e=PS(t);if(!Ei(e))return Ra(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=i_(e);let o=(i?Kv(r.width):r.width)/n,a=(i?Kv(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const wq=Ra(0);function o_(t){const e=jn(t);return!TS()||!e.visualViewport?wq:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Eq(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==jn(t)?!1:e}function cl(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=PS(t);let o=Ra(1);e&&(n?wi(n)&&(o=ku(n)):o=ku(t));const a=Eq(i,r,n)?o_(i):Ra(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&&wi(n)?jn(n):n;let p=d,y=p.frameElement;for(;y&&n&&h!==p;){const g=ku(y),m=y.getBoundingClientRect(),x=Us(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 Yv({width:u,height:f,x:c,y:l})}function Sq(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=Eo(n),a=e?mm(e.floating):!1;if(n===o||a&&i)return r;let c={scrollLeft:0,scrollTop:0},l=Ra(1);const u=Ra(0),f=Ei(n);if((f||!f&&!i)&&((cd(n)!=="body"||oy(o))&&(c=gm(n)),Ei(n))){const d=cl(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 Aq(t){return Array.from(t.getClientRects())}function a_(t){return cl(Eo(t)).left+gm(t).scrollLeft}function Cq(t){const e=Eo(t),r=gm(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+a_(t);const a=-r.scrollTop;return Us(n).direction==="rtl"&&(o+=_n(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function kq(t,e){const r=jn(t),n=Eo(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=TS();(!l||l&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function Tq(t,e){const r=cl(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=Ei(t)?ku(t):Ra(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 AR(t,e,r){let n;if(e==="viewport")n=kq(t,r);else if(e==="document")n=Cq(Eo(t));else if(wi(e))n=Tq(e,r);else{const s=o_(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Yv(n)}function c_(t,e){const r=Oa(t);return r===e||!wi(r)||Bf(r)?!1:Us(r).position==="fixed"||c_(r,e)}function Pq(t,e){const r=e.get(t);if(r)return r;let n=Kh(t,[],!1).filter(a=>wi(a)&&cd(a)!=="body"),s=null;const i=Us(t).position==="fixed";let o=i?Oa(t):t;for(;wi(o)&&!Bf(o);){const a=Us(o),c=kS(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||oy(o)&&!c&&c_(t,o))?n=n.filter(u=>u!==o):s=a,o=Oa(o)}return e.set(t,n),n}function Rq(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?mm(e)?[]:Pq(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=AR(e,u,s);return l.top=_n(f.top,l.top),l.right=pi(f.right,l.right),l.bottom=pi(f.bottom,l.bottom),l.left=_n(f.left,l.left),l},AR(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Iq(t){const{width:e,height:r}=i_(t);return{width:e,height:r}}function Oq(t,e,r){const n=Ei(e),s=Eo(e),i=r==="fixed",o=cl(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=Ra(0);if(n||!n&&!i)if((cd(e)!=="body"||oy(s))&&(a=gm(e)),n){const f=cl(e,!0,i,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else s&&(c.x=a_(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 ix(t){return Us(t).position==="static"}function CR(t,e){return!Ei(t)||Us(t).position==="fixed"?null:e?e(t):t.offsetParent}function l_(t,e){const r=jn(t);if(mm(t))return r;if(!Ei(t)){let s=Oa(t);for(;s&&!Bf(s);){if(wi(s)&&!ix(s))return s;s=Oa(s)}return r}let n=CR(t,e);for(;n&&xq(n)&&ix(n);)n=CR(n,e);return n&&Bf(n)&&ix(n)&&!kS(n)?r:n||bq(t)||r}const _q=async function(t){const e=this.getOffsetParent||l_,r=this.getDimensions,n=await r(t.floating);return{reference:Oq(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nq(t){return Us(t).direction==="rtl"}const Mq={convertOffsetParentRelativeRectToViewportRelativeRect:Sq,getDocumentElement:Eo,getClippingRect:Rq,getOffsetParent:l_,getElementRects:_q,getClientRects:Aq,getDimensions:Iq,getScale:ku,isElement:wi,isRTL:Nq};function Dq(t,e){let r=null,n;const s=Eo(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,pi(1,c))||1};let b=!0;function w(C){const O=C[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 Lq(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=PS(t),u=s||i?[...l?Kh(l):[],...Kh(e)]:[];u.forEach(m=>{s&&m.addEventListener("scroll",r,{passive:!0}),i&&m.addEventListener("resize",r)});const f=l&&a?Dq(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?cl(t):null;c&&g();function g(){const m=cl(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 jq=yq,Bq=vq,Fq=dq,Uq=gq,Vq=hq,kR=fq,$q=mq,zq=(t,e,r)=>{const n=new Map,s={platform:Mq,...r},i={...s.platform,_c:n};return uq(t,e,{...s,platform:i})};var W1=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Jv(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(!Jv(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)&&!Jv(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function u_(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function TR(t,e){const r=u_(t);return Math.round(e*r)/r}function PR(t){const e=v.useRef(t);return W1(()=>{e.current=t}),e}function Hq(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);Jv(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,C=o||g,O=v.useRef(null),_=v.useRef(null),A=v.useRef(u),j=c!=null,U=PR(c),H=PR(s),K=v.useCallback(()=>{if(!O.current||!_.current)return;const P={placement:e,strategy:r,middleware:d};H.current&&(P.platform=H.current),zq(O.current,_.current,P).then(R=>{const I={...R,isPositioned:!0};Q.current&&!Jv(A.current,I)&&(A.current=I,wo.flushSync(()=>{f(I)}))})},[d,e,r,H]);W1(()=>{l===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[l]);const Q=v.useRef(!1);W1(()=>(Q.current=!0,()=>{Q.current=!1}),[]),W1(()=>{if(w&&(O.current=w),C&&(_.current=C),w&&C){if(U.current)return U.current(w,C,K);K()}},[w,C,K,U,j]);const $=v.useMemo(()=>({reference:O,floating:_,setReference:x,setFloating:b}),[x,b]),D=v.useMemo(()=>({reference:w,floating:C}),[w,C]),T=v.useMemo(()=>{const P={position:r,left:0,top:0};if(!D.floating)return P;const R=TR(D.floating,u.x),I=TR(D.floating,u.y);return a?{...P,transform:"translate("+R+"px, "+I+"px)",...u_(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:I}},[r,a,D.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:K,refs:$,elements:D,floatingStyles:T}),[u,K,$,D,T])}const Gq=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?kR({element:n.current,padding:s}).fn(r):{}:n?kR({element:n,padding:s}).fn(r):{}}}},qq=(t,e)=>({...jq(t),options:[t,e]}),Wq=(t,e)=>({...Bq(t),options:[t,e]}),Kq=(t,e)=>({...$q(t),options:[t,e]}),Qq=(t,e)=>({...Fq(t),options:[t,e]}),Yq=(t,e)=>({...Uq(t),options:[t,e]}),Jq=(t,e)=>({...Vq(t),options:[t,e]}),Xq=(t,e)=>({...Gq(t),options:[t,e]});var Zq="Arrow",f_=v.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return E.jsx(be.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"})})});f_.displayName=Zq;var eW=f_,RS="Popper",[d_,ld]=Wr(RS),[tW,h_]=d_(RS),p_=t=>{const{__scopePopper:e,children:r}=t,[n,s]=v.useState(null);return E.jsx(tW,{scope:e,anchor:n,onAnchorChange:s,children:r})};p_.displayName=RS;var y_="PopperAnchor",v_=v.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=h_(y_,r),o=v.useRef(null),a=ze(e,o);return v.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:E.jsx(be.div,{...s,ref:a})});v_.displayName=y_;var IS="PopperContent",[rW,nW]=d_(IS),m_=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,...C}=t,O=h_(IS,c),[_,A]=v.useState(null),j=ze(e,at=>A(at)),[U,H]=v.useState(null),K=pm(U),Q=(K==null?void 0:K.width)??0,$=(K==null?void 0:K.height)??0,D=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(iW),altBoundary:R},{refs:F,floatingStyles:B,placement:J,isPositioned:se,middlewareData:ae}=Hq({strategy:"fixed",placement:D,whileElementsMounted:(...at)=>Lq(...at,{animationFrame:b==="always"}),elements:{reference:O.anchor},middleware:[qq({mainAxis:u+$,alignmentAxis:d}),p&&Wq({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Kq():void 0,...I}),p&&Qq({...I}),Yq({...I,apply:({elements:at,rects:qe,availableWidth:Kr,availableHeight:vs})=>{const{width:Ka,height:Ci}=qe.reference,Tl=at.floating.style;Tl.setProperty("--radix-popper-available-width",`${Kr}px`),Tl.setProperty("--radix-popper-available-height",`${vs}px`),Tl.setProperty("--radix-popper-anchor-width",`${Ka}px`),Tl.setProperty("--radix-popper-anchor-height",`${Ci}px`)}}),U&&Xq({element:U,padding:h}),oW({arrowWidth:Q,arrowHeight:$}),x&&Jq({strategy:"referenceHidden",...I})]}),[we,ve]=b_(J),oe=Gr(w);Tr(()=>{se&&(oe==null||oe())},[se,oe]);const Ne=(r=ae.arrow)==null?void 0:r.x,Be=(n=ae.arrow)==null?void 0:n.y,Re=((s=ae.arrow)==null?void 0:s.centerOffset)!==0,[De,He]=v.useState();return Tr(()=>{_&&He(window.getComputedStyle(_).zIndex)},[_]),E.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:se?B.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(rW,{scope:c,placedSide:we,onArrowChange:H,arrowX:Ne,arrowY:Be,shouldHideArrow:Re,children:E.jsx(be.div,{"data-side":we,"data-align":ve,...C,ref:j,style:{...C.style,animation:se?void 0:"none"}})})})});m_.displayName=IS;var g_="PopperArrow",sW={top:"bottom",right:"left",bottom:"top",left:"right"},x_=v.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=nW(g_,n),o=sW[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(eW,{...s,ref:r,style:{...s.style,display:"block"}})})});x_.displayName=g_;function iW(t){return t!==null}var oW=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]=b_(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 b_(t){const[e,r="center"]=t.split("-");return[e,r]}var OS=p_,_S=v_,NS=m_,MS=x_,aW="Portal",ay=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?hO.createPortal(E.jsx(be.div,{...s,ref:e}),a):null});ay.displayName=aW;var ox="rovingFocusGroup.onEntryFocus",cW={bubbles:!1,cancelable:!0},xm="RovingFocusGroup",[Ew,w_,lW]=ym(xm),[uW,ud]=Wr(xm,[lW]),[fW,dW]=uW(xm),E_=v.forwardRef((t,e)=>E.jsx(Ew.Provider,{scope:t.__scopeRovingFocusGroup,children:E.jsx(Ew.Slot,{scope:t.__scopeRovingFocusGroup,children:E.jsx(hW,{...t,ref:e})})}));E_.displayName=xm;var hW=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=ze(e,d),p=iy(i),[y=null,g]=ps({prop:o,defaultProp:a,onChange:c}),[m,x]=v.useState(!1),b=Gr(l),w=w_(r),C=v.useRef(!1),[O,_]=v.useState(0);return v.useEffect(()=>{const A=d.current;if(A)return A.addEventListener(ox,b),()=>A.removeEventListener(ox,b)},[b]),E.jsx(fW,{scope:r,orientation:n,dir:p,loop:s,currentTabStopId:y,onItemFocus:v.useCallback(A=>g(A),[g]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>_(A=>A+1),[]),onFocusableItemRemove:v.useCallback(()=>_(A=>A-1),[]),children:E.jsx(be.div,{tabIndex:m||O===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:ce(t.onMouseDown,()=>{C.current=!0}),onFocus:ce(t.onFocus,A=>{const j=!C.current;if(A.target===A.currentTarget&&j&&!m){const U=new CustomEvent(ox,cW);if(A.currentTarget.dispatchEvent(U),!U.defaultPrevented){const H=w().filter(T=>T.focusable),K=H.find(T=>T.active),Q=H.find(T=>T.id===y),D=[K,Q,...H].filter(Boolean).map(T=>T.ref.current);C_(D,u)}}C.current=!1}),onBlur:ce(t.onBlur,()=>x(!1))})})}),S_="RovingFocusGroupItem",A_=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=us(),c=i||a,l=dW(S_,r),u=l.currentTabStopId===c,f=w_(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return v.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),E.jsx(Ew.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:E.jsx(be.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=vW(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?mW(m,x+1):m.slice(x+1)}setTimeout(()=>C_(m))}})})})});A_.displayName=S_;var pW={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yW(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function vW(t,e,r){const n=yW(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return pW[n]}function C_(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function mW(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var DS=E_,LS=A_,gW=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={},ax=0,k_=function(t){return t&&(t.host||k_(t.parentNode))},xW=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=k_(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})},bW=function(t,e,r,n){var s=xW(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(),ax++,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)}),ax--,ax||(Nl=new WeakMap,Nl=new WeakMap,s1=new WeakMap,i1={})}},jS=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=gW(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),bW(n,s,r,"aria-hidden")):function(){return null}},li=function(){return li=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return jW;var e=BW(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])}},UW=I_(),Tu="data-scroll-locked",VW=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(EW,` { + */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(G,{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(G,{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,C=d==="xs"?"xs":"sm";return E.jsx(G,{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:C}):E.jsxs(G,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[E.jsxs(G,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[u&&E.jsx(u,{size:C}),E.jsx(ue,{children:l})]}),f&&E.jsx(f,{size:C})]})})});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(G,{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 Cl=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?E.jsxs(G,{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(G,{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(G,{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(G,{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(G,{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(G,{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(G,{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:[]}),AG="_1c9x66f4 fyvr12s1 fyvr11h0 fyvr11ko fyvr11jg fyvr128 fyvr15o";const CG=({size:t="sm"})=>E.jsx(pG,{className:AG,children:E.jsx(gS,{size:t==="lg"?"sm":"xs"})}),q6=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(Cl,{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(CG,{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),W6=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})})});W6.displayName=xS;var K6="CollapsibleTrigger",Q6=v.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,s=bS(K6,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)})});Q6.displayName=K6;var wS="CollapsibleContent",Y6=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})})});Y6.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=W6,_G=Q6,NG=Y6,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(G,{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(G,{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,C)=>m.indexOf(w.ref.current)-m.indexOf(C.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,J6=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(J6),[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,C=HG(_=>{const A=_.target,j=[...l.branches].some(U=>U.contains(A));!w||j||(s==null||s(_),o==null||o(_),_.defaultPrevented||a==null||a())},d),O=GG(_=>{const A=_.target;[...l.branches].some(U=>U.contains(A))||(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,C.onPointerDownCapture)})});od.displayName=UG;var zG="DismissableLayerBranch",X6=v.forwardRef((t,e)=>{const r=v.useContext(J6),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})});X6.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(){Z6(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&&Z6($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 Z6(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=X6,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 C of b)C.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(e_(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=e_(t),r=xR(e,t),n=xR(e.reverse(),t);return[r,n]}function e_(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,Oa=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 AS(t){return t==="x"?"y":"x"}function CS(t){return t==="y"?"height":"width"}function _a(t){return["top","bottom"].includes(mo(t))?"y":"x"}function kS(t){return AS(_a(t))}function sq(t,e,r){r===void 0&&(r=!1);const n=ad(t),s=kS(t),i=CS(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 t_(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=_a(e),o=kS(e),a=CS(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=t_(u),d={x:r,y:n},h=kS(s),p=CS(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],C=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 A=w/2-C/2,j=_/2-y[p]/2-1,U=hi(f[m],j),H=hi(f[x],j),K=U,Q=_-y[p]-H,$=_/2-y[p]/2+A,D=ww(K,$,Q),T=!c.arrow&&ad(s)!=null&&$!==D&&i.reference[p]/2-($$<=0)){var H,K;const $=(((H=i.flip)==null?void 0:H.index)||0)+1,D=_[$];if(D)return{data:{index:$,overflows:U},reset:{placement:D}};let T=(K=U.filter(P=>P.overflows[0]<=0).sort((P,R)=>P.overflows[1]-R.overflows[1])[0])==null?void 0:K.placement;if(!T)switch(h){case"bestFit":{var Q;const P=(Q=U.filter(R=>{if(O){const I=_a(R.placement);return I===x||I==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(I=>I>0).reduce((I,F)=>I+F,0)]).sort((R,I)=>R[1]-I[1])[0])==null?void 0:Q[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 AR(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:AR(o)}}}case"escaped":{const i=await qh(e,{...s,altBoundary:!0}),o=SR(i,r.floating);return{data:{escapedOffsets:o,escaped:AR(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=_a(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=_a(mo(s)),d=AS(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=_a(s),d=AS(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,C=i.reference[d]+i.reference[b]-g.mainAxis;hC&&(h=C)}if(l){var m,x;const b=d==="y"?"width":"height",w=["top","left"].includes(mo(s)),C=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=_a(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 C=x,O=b;if(f?O=u||w?hi(b,m):m:C=u||w?hi(x,g):g,w&&!u){const A=_n(c.left,0),j=_n(c.right,0),U=_n(c.top,0),H=_n(c.bottom,0);f?O=d-2*(A!==0||j!==0?A+j:_n(c.left,c.right)):C=h-2*(U!==0||H!==0?U+H:_n(c.top,c.bottom))}await o({...e,availableWidth:O,availableHeight:C});const _=await s.getDimensions(i.floating);return d!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function cd(t){return r_(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=(r_(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function r_(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 CR(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}=Us(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=Us(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=Na(t);for(;wi(e)&&!Bf(e);){if(gm(e))return null;if(TS(e))return e;e=Na(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 Us(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 Na(t){if(cd(t)==="html")return t;const e=t.assignedSlot||t.parentNode||CR(t)&&t.host||So(t);return CR(e)?e.host:e}function n_(t){const e=Na(t);return Bf(e)?t.ownerDocument?t.ownerDocument.body:t.body:wi(e)&&iy(e)?e:n_(e)}function Wh(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=n_(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 s_(t){const e=Us(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 Oa(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=s_(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=Oa(0);function i_(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=Oa(1);e&&(n?bi(n)&&(o=ku(n)):o=ku(t));const a=wq(i,r,n)?i_(i):Oa(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=Us(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=Oa(1);const u=Oa(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 o_(t){return ul(So(t)).left+xm(t).scrollLeft}function Aq(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+o_(t);const a=-r.scrollTop;return Us(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 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):Oa(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=Aq(So(t));else if(bi(e))n=kq(e,r);else{const s=i_(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Jv(n)}function a_(t,e){const r=Na(t);return r===e||!bi(r)||Bf(r)?!1:Us(r).position==="fixed"||a_(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=Us(t).position==="fixed";let o=i?Na(t):t;for(;bi(o)&&!Bf(o);){const a=Us(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&&a_(t,o))?n=n.filter(u=>u!==o):s=a,o=Na(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}=s_(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=Oa(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=o_(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 Us(t).position==="static"}function TR(t,e){return!wi(t)||Us(t).position==="fixed"?null:e?e(t):t.offsetParent}function c_(t,e){const r=jn(t);if(gm(t))return r;if(!wi(t)){let s=Na(t);for(;s&&!Bf(s);){if(bi(s)&&!ox(s))return s;s=Na(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||c_,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 Us(t).direction==="rtl"}const Nq={convertOffsetParentRelativeRectToViewportRelativeRect:Eq,getDocumentElement:So,getClippingRect:Pq,getOffsetParent:c_,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(C){const O=C[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 l_(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function RR(t,e){const r=l_(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,C=o||g,O=v.useRef(null),_=v.useRef(null),A=v.useRef(u),j=c!=null,U=IR(c),H=IR(s),K=v.useCallback(()=>{if(!O.current||!_.current)return;const P={placement:e,strategy:r,middleware:d};H.current&&(P.platform=H.current),$q(O.current,_.current,P).then(R=>{const I={...R,isPositioned:!0};Q.current&&!Xv(A.current,I)&&(A.current=I,Eo.flushSync(()=>{f(I)}))})},[d,e,r,H]);K1(()=>{l===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[l]);const Q=v.useRef(!1);K1(()=>(Q.current=!0,()=>{Q.current=!1}),[]),K1(()=>{if(w&&(O.current=w),C&&(_.current=C),w&&C){if(U.current)return U.current(w,C,K);K()}},[w,C,K,U,j]);const $=v.useMemo(()=>({reference:O,floating:_,setReference:x,setFloating:b}),[x,b]),D=v.useMemo(()=>({reference:w,floating:C}),[w,C]),T=v.useMemo(()=>{const P={position:r,left:0,top:0};if(!D.floating)return P;const R=RR(D.floating,u.x),I=RR(D.floating,u.y);return a?{...P,transform:"translate("+R+"px, "+I+"px)",...l_(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:I}},[r,a,D.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:K,refs:$,elements:D,floatingStyles:T}),[u,K,$,D,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",u_=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"})})});u_.displayName=Xq;var Zq=u_,IS="Popper",[f_,ld]=Wr(IS),[eW,d_]=f_(IS),h_=t=>{const{__scopePopper:e,children:r}=t,[n,s]=v.useState(null);return E.jsx(eW,{scope:e,anchor:n,onAnchorChange:s,children:r})};h_.displayName=IS;var p_="PopperAnchor",y_=v.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=d_(p_,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})});y_.displayName=p_;var OS="PopperContent",[tW,rW]=f_(OS),v_=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,...C}=t,O=d_(OS,c),[_,A]=v.useState(null),j=$e(e,at=>A(at)),[U,H]=v.useState(null),K=ym(U),Q=(K==null?void 0:K.width)??0,$=(K==null?void 0:K.height)??0,D=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:F,floatingStyles:B,placement:J,isPositioned:se,middlewareData:ae}=zq({strategy:"fixed",placement:D,whileElementsMounted:(...at)=>Dq(...at,{animationFrame:b==="always"}),elements:{reference:O.anchor},middleware:[Gq({mainAxis:u+$,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:Ya,height:Ai}=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",`${Ya}px`),Rl.setProperty("--radix-popper-anchor-height",`${Ai}px`)}}),U&&Jq({element:U,padding:h}),iW({arrowWidth:Q,arrowHeight:$}),x&&Yq({strategy:"referenceHidden",...I})]}),[Se,ve]=x_(J),oe=Gr(w);Tr(()=>{se&&(oe==null||oe())},[se,oe]);const Me=(r=ae.arrow)==null?void 0:r.x,Be=(n=ae.arrow)==null?void 0:n.y,Pe=((s=ae.arrow)==null?void 0:s.centerOffset)!==0,[De,ze]=v.useState();return Tr(()=>{_&&ze(window.getComputedStyle(_).zIndex)},[_]),E.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:se?B.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:Se,onArrowChange:H,arrowX:Me,arrowY:Be,shouldHideArrow:Pe,children:E.jsx(we.div,{"data-side":Se,"data-align":ve,...C,ref:j,style:{...C.style,animation:se?void 0:"none"}})})})});v_.displayName=OS;var m_="PopperArrow",nW={top:"bottom",right:"left",bottom:"top",left:"right"},g_=v.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=rW(m_,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"}})})});g_.displayName=m_;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]=x_(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 x_(t){const[e,r="center"]=t.split("-");return[e,r]}var _S=h_,NS=y_,MS=v_,DS=g_,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,b_,cW]=vm(bm),[lW,ud]=Wr(bm,[cW]),[uW,fW]=lW(bm),w_=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})})}));w_.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=b_(r),C=v.useRef(!1),[O,_]=v.useState(0);return v.useEffect(()=>{const A=d.current;if(A)return A.addEventListener(ax,b),()=>A.removeEventListener(ax,b)},[b]),E.jsx(uW,{scope:r,orientation:n,dir:p,loop:s,currentTabStopId:y,onItemFocus:v.useCallback(A=>g(A),[g]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>_(A=>A+1),[]),onFocusableItemRemove:v.useCallback(()=>_(A=>A-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,()=>{C.current=!0}),onFocus:ce(t.onFocus,A=>{const j=!C.current;if(A.target===A.currentTarget&&j&&!m){const U=new CustomEvent(ax,aW);if(A.currentTarget.dispatchEvent(U),!U.defaultPrevented){const H=w().filter(T=>T.focusable),K=H.find(T=>T.active),Q=H.find(T=>T.id===y),D=[K,Q,...H].filter(Boolean).map(T=>T.ref.current);A_(D,u)}}C.current=!1}),onBlur:ce(t.onBlur,()=>x(!1))})})}),E_="RovingFocusGroupItem",S_=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=us(),c=i||a,l=fW(E_,r),u=l.currentTabStopId===c,f=b_(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(()=>A_(m))}})})})});S_.displayName=E_;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 A_(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=w_,jS=S_,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=R_(),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,`; } @@ -76,39 +76,39 @@ Error generating stack: `+i.message+` `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` } - .`).concat(K1,` { + .`).concat(Q1,` { right: `).concat(a,"px ").concat(n,`; } - .`).concat(Q1,` { + .`).concat(Y1,` { margin-right: `).concat(a,"px ").concat(n,`; } - .`).concat(K1," .").concat(K1,` { + .`).concat(Q1," .").concat(Q1,` { right: 0 `).concat(n,`; } - .`).concat(Q1," .").concat(Q1,` { + .`).concat(Y1," .").concat(Y1,` { margin-right: 0 `).concat(n,`; } body[`).concat(Tu,`] { - `).concat(SW,": ").concat(a,`px; + `).concat(EW,": ").concat(a,`px; } -`)},IR=function(){var t=parseInt(document.body.getAttribute(Tu)||"0",10);return isFinite(t)?t:0},$W=function(){v.useEffect(function(){return document.body.setAttribute(Tu,(IR()+1).toString()),function(){var t=IR()-1;t<=0?document.body.removeAttribute(Tu):document.body.setAttribute(Tu,t.toString())}},[])},zW=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;$W();var i=v.useMemo(function(){return FW(s)},[s]);return v.createElement(UW,{styles:VW(i,!e,s,r?"":"!important")})},Sw=!1;if(typeof window<"u")try{var o1=Object.defineProperty({},"passive",{get:function(){return Sw=!0,!0}});window.addEventListener("test",o1,o1),window.removeEventListener("test",o1,o1)}catch{Sw=!1}var Ml=Sw?{passive:!1}:!1,HW=function(t){return t.tagName==="TEXTAREA"},O_=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!HW(t)&&r[e]==="visible")},GW=function(t){return O_(t,"overflowY")},qW=function(t){return O_(t,"overflowX")},OR=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=__(t,n);if(s){var i=N_(t,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},WW=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},KW=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},__=function(t,e){return t==="v"?GW(e):qW(e)},N_=function(t,e){return t==="v"?WW(e):KW(e)},QW=function(t,e){return t==="h"&&e==="rtl"?-1:1},YW=function(t,e,r,n,s){var i=QW(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=N_(t,a),p=h[0],y=h[1],g=h[2],m=y-g-i*p;(p||m)&&__(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]},_R=function(t){return[t.deltaX,t.deltaY]},NR=function(t){return t&&"current"in t?t.current:t},JW=function(t,e){return t[0]===e[0]&&t[1]===e[1]},XW=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")})},Aw=!1;if(typeof window<"u")try{var o1=Object.defineProperty({},"passive",{get:function(){return Aw=!0,!0}});window.addEventListener("test",o1,o1),window.removeEventListener("test",o1,o1)}catch{Aw=!1}var Ml=Aw?{passive:!1}:!1,zW=function(t){return t.tagName==="TEXTAREA"},I_=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 I_(t,"overflowY")},GW=function(t){return I_(t,"overflowX")},NR=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=O_(t,n);if(s){var i=__(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]},O_=function(t,e){return t==="v"?HW(e):GW(e)},__=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=__(t,a),p=h[0],y=h[1],g=h[2],m=y-g-i*p;(p||m)&&O_(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;} -`)},ZW=0,Dl=[];function eK(t){var e=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),s=v.useState(ZW++)[0],i=v.useState(I_)[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=wW([t.lockRef.current],(t.shards||[]).map(NR),!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],C,O=y.target,_=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in y&&_==="h"&&O.type==="range")return!1;var A=OR(_,O);if(!A)return!0;if(A?C=_:(C=_==="v"?"h":"v",A=OR(_,O)),!A)return!1;if(!n.current&&"changedTouches"in y&&(b||w)&&(n.current=C),!C)return!0;var j=n.current||C;return YW(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?_R(g):a1(g),x=e.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&JW(C.delta,m)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(NR).filter(Boolean).filter(function(C){return C.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:tK(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,_R(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:XW(s)}):null,h?v.createElement(zW,{gapMode:t.gapMode}):null)}function tK(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const rK=IW(R_,eK);var wm=v.forwardRef(function(t,e){return v.createElement(bm,li({},t,{ref:e,sideCar:rK}))});wm.classNames=bm.classNames;var Aw=["Enter"," "],nK=["ArrowDown","PageUp","Home"],M_=["ArrowUp","PageDown","End"],sK=[...nK,...M_],iK={ltr:[...Aw,"ArrowRight"],rtl:[...Aw,"ArrowLeft"]},oK={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cy="Menu",[Qh,aK,cK]=ym(cy),[Al,D_]=Wr(cy,[cK,ld,ud]),Em=ld(),L_=ud(),[lK,Cl]=Al(cy),[uK,ly]=Al(cy),j_=t=>{const{__scopeMenu:e,open:r=!1,children:n,dir:s,onOpenChange:i,modal:o=!0}=t,a=Em(e),[c,l]=v.useState(null),u=v.useRef(!1),f=Gr(i),d=iy(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(OS,{...a,children:E.jsx(lK,{scope:e,open:r,onOpenChange:f,content:c,onContentChange:l,children:E.jsx(uK,{scope:e,onClose:v.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:d,modal:o,children:n})})})};j_.displayName=cy;var fK="MenuAnchor",BS=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Em(r);return E.jsx(_S,{...s,...n,ref:e})});BS.displayName=fK;var FS="MenuPortal",[dK,B_]=Al(FS,{forceMount:void 0}),F_=t=>{const{__scopeMenu:e,forceMount:r,children:n,container:s}=t,i=Cl(FS,e);return E.jsx(dK,{scope:e,forceMount:r,children:E.jsx(cn,{present:r||i.open,children:E.jsx(ay,{asChild:!0,container:s,children:n})})})};F_.displayName=FS;var fs="MenuContent",[hK,US]=Al(fs),U_=v.forwardRef((t,e)=>{const r=B_(fs,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Cl(fs,t.__scopeMenu),o=ly(fs,t.__scopeMenu);return E.jsx(Qh.Provider,{scope:t.__scopeMenu,children:E.jsx(cn,{present:n||i.open,children:E.jsx(Qh.Slot,{scope:t.__scopeMenu,children:o.modal?E.jsx(pK,{...s,ref:e}):E.jsx(yK,{...s,ref:e})})})})}),pK=v.forwardRef((t,e)=>{const r=Cl(fs,t.__scopeMenu),n=v.useRef(null),s=ze(e,n);return v.useEffect(()=>{const i=n.current;if(i)return jS(i)},[]),E.jsx(VS,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ce(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),yK=v.forwardRef((t,e)=>{const r=Cl(fs,t.__scopeMenu);return E.jsx(VS,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),VS=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=Cl(fs,r),m=ly(fs,r),x=Em(r),b=L_(r),w=aK(r),[C,O]=v.useState(null),_=v.useRef(null),A=ze(e,_,g.onContentChange),j=v.useRef(0),U=v.useRef(""),H=v.useRef(0),K=v.useRef(null),Q=v.useRef("right"),$=v.useRef(0),D=p?wm:v.Fragment,T=p?{as:al,allowPinchZoom:!0}:void 0,P=I=>{var F,B;const J=U.current+I,se=w().filter(Be=>!Be.disabled),ae=document.activeElement,we=(F=se.find(Be=>Be.ref.current===ae))==null?void 0:F.textValue,ve=se.map(Be=>Be.textValue),oe=TK(ve,J,we),Ne=(B=se.find(Be=>Be.textValue===oe))==null?void 0:B.ref.current;(function Be(Re){U.current=Re,window.clearTimeout(j.current),Re!==""&&(j.current=window.setTimeout(()=>Be(""),1e3))})(J),Ne&&setTimeout(()=>Ne.focus())};v.useEffect(()=>()=>window.clearTimeout(j.current),[]),ES();const R=v.useCallback(I=>{var F,B;return Q.current===((F=K.current)==null?void 0:F.side)&&RK(I,(B=K.current)==null?void 0:B.area)},[]);return E.jsx(hK,{scope:r,searchRef:U,onItemEnter:v.useCallback(I=>{R(I)&&I.preventDefault()},[R]),onItemLeave:v.useCallback(I=>{var F;R(I)||((F=_.current)==null||F.focus(),O(null))},[R]),onTriggerLeave:v.useCallback(I=>{R(I)&&I.preventDefault()},[R]),pointerGraceTimerRef:H,onPointerGraceIntentChange:v.useCallback(I=>{K.current=I},[]),children:E.jsx(D,{...T,children:E.jsx(vm,{asChild:!0,trapped:s,onMountAutoFocus:ce(i,I=>{var F;I.preventDefault(),(F=_.current)==null||F.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(DS,{asChild:!0,...b,dir:m.dir,orientation:"vertical",loop:n,currentTabStopId:C,onCurrentTabStopIdChange:O,onEntryFocus:ce(c,I=>{m.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(NS,{role:"menu","aria-orientation":"vertical","data-state":rN(g.open),"data-radix-menu-content":"",dir:m.dir,...x,...y,ref:A,style:{outline:"none",...y.style},onKeyDown:ce(y.onKeyDown,I=>{const B=I.target.closest("[data-radix-menu-content]")===I.currentTarget,J=I.ctrlKey||I.altKey||I.metaKey,se=I.key.length===1;B&&(I.key==="Tab"&&I.preventDefault(),!J&&se&&P(I.key));const ae=_.current;if(I.target!==ae||!sK.includes(I.key))return;I.preventDefault();const ve=w().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);M_.includes(I.key)&&ve.reverse(),CK(ve)}),onBlur:ce(t.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(j.current),U.current="")}),onPointerMove:ce(t.onPointerMove,Yh(I=>{const F=I.target,B=$.current!==I.clientX;if(I.currentTarget.contains(F)&&B){const J=I.clientX>$.current?"right":"left";Q.current=J,$.current=I.clientX}}))})})})})})})});U_.displayName=fs;var vK="MenuGroup",$S=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(be.div,{role:"group",...n,ref:e})});$S.displayName=vK;var mK="MenuLabel",V_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(be.div,{...n,ref:e})});V_.displayName=mK;var Xv="MenuItem",MR="menu.itemSelect",Sm=v.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=v.useRef(null),o=ly(Xv,t.__scopeMenu),a=US(Xv,t.__scopeMenu),c=ze(e,i),l=v.useRef(!1),u=()=>{const f=i.current;if(!r&&f){const d=new CustomEvent(MR,{bubbles:!0,cancelable:!0});f.addEventListener(MR,h=>n==null?void 0:n(h),{once:!0}),yS(f,d),d.defaultPrevented?l.current=!1:o.onClose()}};return E.jsx($_,{...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())})})});Sm.displayName=Xv;var $_=v.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=US(Xv,r),a=L_(r),c=v.useRef(null),l=ze(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(Qh.ItemSlot,{scope:r,disabled:n,textValue:s??d,children:E.jsx(LS,{asChild:!0,...a,focusable:!n,children:E.jsx(be.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,Yh(p=>{n?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(t.onPointerLeave,Yh(p=>o.onItemLeave(p))),onFocus:ce(t.onFocus,()=>f(!0)),onBlur:ce(t.onBlur,()=>f(!1))})})})}),gK="MenuCheckboxItem",z_=v.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return E.jsx(K_,{scope:t.__scopeMenu,checked:r,children:E.jsx(Sm,{role:"menuitemcheckbox","aria-checked":Zv(r)?"mixed":r,...s,ref:e,"data-state":HS(r),onSelect:ce(s.onSelect,()=>n==null?void 0:n(Zv(r)?!0:!r),{checkForDefaultPrevented:!1})})})});z_.displayName=gK;var H_="MenuRadioGroup",[xK,bK]=Al(H_,{value:void 0,onValueChange:()=>{}}),G_=v.forwardRef((t,e)=>{const{value:r,onValueChange:n,...s}=t,i=Gr(n);return E.jsx(xK,{scope:t.__scopeMenu,value:r,onValueChange:i,children:E.jsx($S,{...s,ref:e})})});G_.displayName=H_;var q_="MenuRadioItem",W_=v.forwardRef((t,e)=>{const{value:r,...n}=t,s=bK(q_,t.__scopeMenu),i=r===s.value;return E.jsx(K_,{scope:t.__scopeMenu,checked:i,children:E.jsx(Sm,{role:"menuitemradio","aria-checked":i,...n,ref:e,"data-state":HS(i),onSelect:ce(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});W_.displayName=q_;var zS="MenuItemIndicator",[K_,wK]=Al(zS,{checked:!1}),Q_=v.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=wK(zS,r);return E.jsx(cn,{present:n||Zv(i.checked)||i.checked===!0,children:E.jsx(be.span,{...s,ref:e,"data-state":HS(i.checked)})})});Q_.displayName=zS;var EK="MenuSeparator",Y_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(be.div,{role:"separator","aria-orientation":"horizontal",...n,ref:e})});Y_.displayName=EK;var SK="MenuArrow",J_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Em(r);return E.jsx(MS,{...s,...n,ref:e})});J_.displayName=SK;var AK="MenuSub",[_1e,X_]=Al(AK),Qd="MenuSubTrigger",Z_=v.forwardRef((t,e)=>{const r=Cl(Qd,t.__scopeMenu),n=ly(Qd,t.__scopeMenu),s=X_(Qd,t.__scopeMenu),i=US(Qd,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(BS,{asChild:!0,...l,children:E.jsx($_,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":rN(r.open),...t,ref:dm(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,Yh(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,Yh(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===" "||iK[n.dir].includes(f.key)&&(r.onOpenChange(!0),(d=r.content)==null||d.focus(),f.preventDefault())})})})});Z_.displayName=Qd;var eN="MenuSubContent",tN=v.forwardRef((t,e)=>{const r=B_(fs,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Cl(fs,t.__scopeMenu),o=ly(fs,t.__scopeMenu),a=X_(eN,t.__scopeMenu),c=v.useRef(null),l=ze(e,c);return E.jsx(Qh.Provider,{scope:t.__scopeMenu,children:E.jsx(cn,{present:n||i.open,children:E.jsx(Qh.Slot,{scope:t.__scopeMenu,children:E.jsx(VS,{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=oK[o.dir].includes(u.key);d&&h&&(i.onOpenChange(!1),(f=a.trigger)==null||f.focus(),u.preventDefault())})})})})})});tN.displayName=eN;function rN(t){return t?"open":"closed"}function Zv(t){return t==="indeterminate"}function HS(t){return Zv(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 kK(t,e){return t.map((r,n)=>t[(e+n)%t.length])}function TK(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=kK(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 PK(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 RK(t,e){if(!e)return!1;const r={x:t.clientX,y:t.clientY};return PK(r,e)}function Yh(t){return e=>e.pointerType==="mouse"?t(e):void 0}var IK=j_,OK=BS,_K=F_,NK=U_,MK=$S,DK=V_,LK=Sm,jK=z_,BK=G_,FK=W_,UK=Q_,VK=Y_,$K=J_,zK=Z_,HK=tN,GS="DropdownMenu",[GK,N1e]=Wr(GS,[D_]),ln=D_(),[qK,nN]=GK(GS),WK=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(qK,{scope:e,triggerId:us(),triggerRef:l,contentId:us(),open:u,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(d=>!d),[f]),modal:a,children:E.jsx(IK,{...c,open:u,onOpenChange:f,dir:n,modal:a,children:r})})};WK.displayName=GS;var sN="DropdownMenuTrigger",KK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=t,i=nN(sN,r),o=ln(r);return E.jsx(OK,{asChild:!0,...o,children:E.jsx(be.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:dm(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())})})})});KK.displayName=sN;var QK="DropdownMenuPortal",YK=t=>{const{__scopeDropdownMenu:e,...r}=t,n=ln(e);return E.jsx(_K,{...n,...r})};YK.displayName=QK;var iN="DropdownMenuContent",JK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=nN(iN,r),i=ln(r),o=v.useRef(!1);return E.jsx(NK,{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)"}})});JK.displayName=iN;var XK="DropdownMenuGroup",ZK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(MK,{...s,...n,ref:e})});ZK.displayName=XK;var eQ="DropdownMenuLabel",tQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(DK,{...s,...n,ref:e})});tQ.displayName=eQ;var rQ="DropdownMenuItem",nQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(LK,{...s,...n,ref:e})});nQ.displayName=rQ;var sQ="DropdownMenuCheckboxItem",oN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(jK,{...s,...n,ref:e})});oN.displayName=sQ;var iQ="DropdownMenuRadioGroup",oQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(BK,{...s,...n,ref:e})});oQ.displayName=iQ;var aQ="DropdownMenuRadioItem",aN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(FK,{...s,...n,ref:e})});aN.displayName=aQ;var cQ="DropdownMenuItemIndicator",cN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(UK,{...s,...n,ref:e})});cN.displayName=cQ;var lQ="DropdownMenuSeparator",uQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(VK,{...s,...n,ref:e})});uQ.displayName=lQ;var fQ="DropdownMenuArrow",dQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx($K,{...s,...n,ref:e})});dQ.displayName=fQ;var hQ="DropdownMenuSubTrigger",pQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(zK,{...s,...n,ref:e})});pQ.displayName=hQ;var yQ="DropdownMenuSubContent",vQ=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(HK,{...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)"}})});vQ.displayName=yQ;var mQ=oN,gQ=aN,lN=cN,uN="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12ws fyvr12wm fyvr11h0 fyvr11ko fyvr11jw fyvr12v7 fyvr11n4 fyvr11hw fyvr12s7",fN="_1k2mbvi5";const xQ=({children:t})=>E.jsx(lN,{className:fN,children:t});v.forwardRef(({className:t,children:e,...r},n)=>E.jsxs(mQ,{className:qr(uN,t),...r,ref:n,children:[E.jsx(xQ,{children:E.jsx(mS,{size:"xs"})}),E.jsx(ue,{variant:"small",children:e})]}));v.forwardRef(({className:t,children:e,...r},n)=>E.jsxs(gQ,{className:qr(uN,t),...r,ref:n,children:[E.jsx(lN,{className:fN,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(ft,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),bQ=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var wQ="_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",EQ=Mt({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:[]}),SQ="_1hq71vka _1hq71vk9 fyvr12wp fyvr12wj fyvr11ho fyvr12vj fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const AQ={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=bQ(h,e),[y,g]=v.useState(null),m=b=>{const w=b.currentTarget.files;if(!w||!w[0])return;const C=w[0],O=C.name,_=C.size/1e3;g({name:O,size:_,extension:O.split(".").pop()??""}),l==null||l(C)},x=f.map(b=>AQ[b]).join(",");return E.jsx(Sl,{description:n,disabled:s,display:"grid",id:i??c,label:o,labelLocation:a,children:E.jsxs(G,{width:"full",minWidth:"0",justifyContent:y?"space-between":"flex-start",gap:"2",color:y?"text100":"text50",className:qr(wQ,EQ({borderRadius:r})),children:[y?E.jsxs(G,{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(G,{accept:x,as:"input",className:SQ,cursor:"pointer",disabled:s,id:i??c,name:c,onChange:m,ref:p,type:"file",...d}),y&&E.jsx(Am,{cursor:"pointer",icon:qh,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=Mt({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const Cw=1e3,Pu=64,fx=Pu/2,dx=(t,e=Cw)=>t%e/(Cw/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)},kQ=(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%)`}},TQ=(t,e)=>{const r=[];for(let n=0;n{const i=Pu/10+dx(n.r,Cw*1.5/(s+1));return{...kQ(n.a,n.b,n.c),x:dx(n.x),y:dx(n.y),r:i}})};v.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=TQ(r,s);return E.jsxs(G,{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:fx,cy:fx,r:fx})}),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 dN=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(G,{as:Yc.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 qS="Dialog",[hN,M1e]=Wr(qS),[PQ,zs]=hN(qS),pN=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(PQ,{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})};pN.displayName=qS;var yN="DialogTrigger",RQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=zs(yN,r),i=ze(e,s.triggerRef);return E.jsx(be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":QS(s.open),...n,ref:i,onClick:ce(t.onClick,s.onOpenToggle)})});RQ.displayName=yN;var WS="DialogPortal",[IQ,vN]=hN(WS,{forceMount:void 0}),mN=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=zs(WS,e);return E.jsx(IQ,{scope:e,forceMount:r,children:v.Children.map(n,o=>E.jsx(cn,{present:r||i.open,children:E.jsx(ay,{asChild:!0,container:s,children:o})}))})};mN.displayName=WS;var e0="DialogOverlay",gN=v.forwardRef((t,e)=>{const r=vN(e0,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=zs(e0,t.__scopeDialog);return i.modal?E.jsx(cn,{present:n||i.open,children:E.jsx(OQ,{...s,ref:e})}):null});gN.displayName=e0;var OQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=zs(e0,r);return E.jsx(wm,{as:al,allowPinchZoom:!0,shards:[s.contentRef],children:E.jsx(be.div,{"data-state":QS(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),ll="DialogContent",xN=v.forwardRef((t,e)=>{const r=vN(ll,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=zs(ll,t.__scopeDialog);return E.jsx(cn,{present:n||i.open,children:i.modal?E.jsx(_Q,{...s,ref:e}):E.jsx(NQ,{...s,ref:e})})});xN.displayName=ll;var _Q=v.forwardRef((t,e)=>{const r=zs(ll,t.__scopeDialog),n=v.useRef(null),s=ze(e,r.contentRef,n);return v.useEffect(()=>{const i=n.current;if(i)return jS(i)},[]),E.jsx(bN,{...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())})}),NQ=v.forwardRef((t,e)=>{const r=zs(ll,t.__scopeDialog),n=v.useRef(!1),s=v.useRef(!1);return E.jsx(bN,{...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()}})}),bN=v.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=zs(ll,r),c=v.useRef(null),l=ze(e,c);return ES(),E.jsxs(E.Fragment,{children:[E.jsx(vm,{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":QS(a.open),...o,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(LQ,{titleId:a.titleId}),E.jsx(BQ,{contentRef:c,descriptionId:a.descriptionId})]})]})}),KS="DialogTitle",MQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=zs(KS,r);return E.jsx(be.h2,{id:s.titleId,...n,ref:e})});MQ.displayName=KS;var wN="DialogDescription",DQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=zs(wN,r);return E.jsx(be.p,{id:s.descriptionId,...n,ref:e})});DQ.displayName=wN;var EN="DialogClose",SN=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=zs(EN,r);return E.jsx(be.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,()=>s.onOpenChange(!1))})});SN.displayName=EN;function QS(t){return t?"open":"closed"}var AN="DialogTitleWarning",[D1e,CN]=eG(AN,{contentName:ll,titleName:KS,docsSlug:"dialog"}),LQ=({titleId:t})=>{const e=CN(AN),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(R_)[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],C,O=y.target,_=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in y&&_==="h"&&O.type==="range")return!1;var A=NR(_,O);if(!A)return!0;if(A?C=_:(C=_==="v"?"h":"v",A=NR(_,O)),!A)return!1;if(!n.current&&"changedTouches"in y&&(b||w)&&(n.current=C),!C)return!0;var j=n.current||C;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(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&YW(C.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(C){return C.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(P_,ZW);var Em=v.forwardRef(function(t,e){return v.createElement(wm,ci({},t,{ref:e,sideCar:tK}))});Em.classNames=wm.classNames;var Cw=["Enter"," "],rK=["ArrowDown","PageUp","Home"],N_=["ArrowUp","PageDown","End"],nK=[...rK,...N_],sK={ltr:[...Cw,"ArrowRight"],rtl:[...Cw,"ArrowLeft"]},iK={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ay="Menu",[Kh,oK,aK]=vm(ay),[kl,M_]=Wr(ay,[aK,ld,ud]),Sm=ld(),D_=ud(),[cK,Tl]=kl(ay),[lK,cy]=kl(ay),L_=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})})})};L_.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,j_]=kl(US,{forceMount:void 0}),B_=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})})})};B_.displayName=US;var fs="MenuContent",[dK,VS]=kl(fs),F_=v.forwardRef((t,e)=>{const r=j_(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=D_(r),w=oK(r),[C,O]=v.useState(null),_=v.useRef(null),A=$e(e,_,g.onContentChange),j=v.useRef(0),U=v.useRef(""),H=v.useRef(0),K=v.useRef(null),Q=v.useRef("right"),$=v.useRef(0),D=p?Em:v.Fragment,T=p?{as:ll,allowPinchZoom:!0}:void 0,P=I=>{var F,B;const J=U.current+I,se=w().filter(Be=>!Be.disabled),ae=document.activeElement,Se=(F=se.find(Be=>Be.ref.current===ae))==null?void 0:F.textValue,ve=se.map(Be=>Be.textValue),oe=kK(ve,J,Se),Me=(B=se.find(Be=>Be.textValue===oe))==null?void 0:B.ref.current;(function Be(Pe){U.current=Pe,window.clearTimeout(j.current),Pe!==""&&(j.current=window.setTimeout(()=>Be(""),1e3))})(J),Me&&setTimeout(()=>Me.focus())};v.useEffect(()=>()=>window.clearTimeout(j.current),[]),SS();const R=v.useCallback(I=>{var F,B;return Q.current===((F=K.current)==null?void 0:F.side)&&PK(I,(B=K.current)==null?void 0:B.area)},[]);return E.jsx(dK,{scope:r,searchRef:U,onItemEnter:v.useCallback(I=>{R(I)&&I.preventDefault()},[R]),onItemLeave:v.useCallback(I=>{var F;R(I)||((F=_.current)==null||F.focus(),O(null))},[R]),onTriggerLeave:v.useCallback(I=>{R(I)&&I.preventDefault()},[R]),pointerGraceTimerRef:H,onPointerGraceIntentChange:v.useCallback(I=>{K.current=I},[]),children:E.jsx(D,{...T,children:E.jsx(mm,{asChild:!0,trapped:s,onMountAutoFocus:ce(i,I=>{var F;I.preventDefault(),(F=_.current)==null||F.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:C,onCurrentTabStopIdChange:O,onEntryFocus:ce(c,I=>{m.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(MS,{role:"menu","aria-orientation":"vertical","data-state":tN(g.open),"data-radix-menu-content":"",dir:m.dir,...x,...y,ref:A,style:{outline:"none",...y.style},onKeyDown:ce(y.onKeyDown,I=>{const B=I.target.closest("[data-radix-menu-content]")===I.currentTarget,J=I.ctrlKey||I.altKey||I.metaKey,se=I.key.length===1;B&&(I.key==="Tab"&&I.preventDefault(),!J&&se&&P(I.key));const ae=_.current;if(I.target!==ae||!nK.includes(I.key))return;I.preventDefault();const ve=w().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);N_.includes(I.key)&&ve.reverse(),AK(ve)}),onBlur:ce(t.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(j.current),U.current="")}),onPointerMove:ce(t.onPointerMove,Qh(I=>{const F=I.target,B=$.current!==I.clientX;if(I.currentTarget.contains(F)&&B){const J=I.clientX>$.current?"right":"left";Q.current=J,$.current=I.clientX}}))})})})})})})});F_.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",U_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(we.div,{...n,ref:e})});U_.displayName=vK;var Zv="MenuItem",LR="menu.itemSelect",Am=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(V_,{...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===" "||Cw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Am.displayName=Zv;var V_=v.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=VS(Zv,r),a=D_(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.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return E.jsx(W_,{scope:t.__scopeMenu,checked:r,children:E.jsx(Am,{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})})})});$_.displayName=mK;var z_="MenuRadioGroup",[gK,xK]=kl(z_,{value:void 0,onValueChange:()=>{}}),H_=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})})});H_.displayName=z_;var G_="MenuRadioItem",q_=v.forwardRef((t,e)=>{const{value:r,...n}=t,s=xK(G_,t.__scopeMenu),i=r===s.value;return E.jsx(W_,{scope:t.__scopeMenu,checked:i,children:E.jsx(Am,{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})})})});q_.displayName=G_;var HS="MenuItemIndicator",[W_,bK]=kl(HS,{checked:!1}),K_=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)})})});K_.displayName=HS;var wK="MenuSeparator",Q_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return E.jsx(we.div,{role:"separator","aria-orientation":"horizontal",...n,ref:e})});Q_.displayName=wK;var EK="MenuArrow",Y_=v.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Sm(r);return E.jsx(DS,{...s,...n,ref:e})});Y_.displayName=EK;var SK="MenuSub",[N1e,J_]=kl(SK),Kd="MenuSubTrigger",X_=v.forwardRef((t,e)=>{const r=Tl(Kd,t.__scopeMenu),n=cy(Kd,t.__scopeMenu),s=J_(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(V_,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":tN(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())})})})});X_.displayName=Kd;var Z_="MenuSubContent",eN=v.forwardRef((t,e)=>{const r=j_(fs,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Tl(fs,t.__scopeMenu),o=cy(fs,t.__scopeMenu),a=J_(Z_,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())})})})})})});eN.displayName=Z_;function tN(t){return t?"open":"closed"}function e0(t){return t==="indeterminate"}function GS(t){return e0(t)?"indeterminate":t?"checked":"unchecked"}function AK(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 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=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 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=L_,IK=FS,OK=B_,_K=F_,NK=zS,MK=U_,DK=Am,LK=$_,jK=H_,BK=q_,FK=K_,UK=Q_,VK=Y_,$K=X_,zK=eN,qS="DropdownMenu",[HK,M1e]=Wr(qS,[M_]),ln=M_(),[GK,rN]=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 nN="DropdownMenuTrigger",WK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=t,i=rN(nN,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=nN;var KK="DropdownMenuPortal",QK=t=>{const{__scopeDropdownMenu:e,...r}=t,n=ln(e);return E.jsx(OK,{...n,...r})};QK.displayName=KK;var sN="DropdownMenuContent",YK=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=rN(sN,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=sN;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",iN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(LK,{...s,...n,ref:e})});iN.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",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="DropdownMenuItemIndicator",aN=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=ln(r);return E.jsx(FK,{...s,...n,ref:e})});aN.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=iN,mQ=oN,cN=aN,lN="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12ws fyvr12wm fyvr11h0 fyvr11ko fyvr11jw fyvr12v7 fyvr11n4 fyvr11hw fyvr12s7",uN="_1k2mbvi5";const gQ=({children:t})=>E.jsx(cN,{className:uN,children:t});v.forwardRef(({className:t,children:e,...r},n)=>E.jsxs(vQ,{className:qr(lN,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(lN,t),...r,ref:n,children:[E.jsx(cN,{className:uN,children:E.jsx(ue,{children:"•"})}),E.jsx(ue,{variant:"small",children:e})]}));const Cm=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 C=w[0],O=C.name,_=C.size/1e3;g({name:O,size:_,extension:O.split(".").pop()??""}),l==null||l(C)},x=f.map(b=>SQ[b]).join(",");return E.jsx(Cl,{description:n,disabled:s,display:"grid",id:i??c,label:o,labelLocation:a,children:E.jsxs(G,{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(G,{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(G,{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(Cm,{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 AQ=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%)`}},kQ=(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=kQ(r,s);return E.jsxs(G,{as:"svg",className:qr(e,AQ({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 fN=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(G,{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",[dN,D1e]=Wr(WS),[TQ,zs]=dN(WS),hN=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})};hN.displayName=WS;var pN="DialogTrigger",PQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=zs(pN,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=pN;var KS="DialogPortal",[RQ,yN]=dN(KS,{forceMount:void 0}),vN=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=zs(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})}))})};vN.displayName=KS;var t0="DialogOverlay",mN=v.forwardRef((t,e)=>{const r=yN(t0,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=zs(t0,t.__scopeDialog);return i.modal?E.jsx(cn,{present:n||i.open,children:E.jsx(IQ,{...s,ref:e})}):null});mN.displayName=t0;var IQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=zs(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",gN=v.forwardRef((t,e)=>{const r=yN(fl,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=zs(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})})});gN.displayName=fl;var OQ=v.forwardRef((t,e)=>{const r=zs(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(xN,{...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=zs(fl,t.__scopeDialog),n=v.useRef(!1),s=v.useRef(!1);return E.jsx(xN,{...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()}})}),xN=v.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=zs(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=zs(QS,r);return E.jsx(we.h2,{id:s.titleId,...n,ref:e})});NQ.displayName=QS;var bN="DialogDescription",MQ=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=zs(bN,r);return E.jsx(we.p,{id:s.descriptionId,...n,ref:e})});MQ.displayName=bN;var wN="DialogClose",EN=v.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=zs(wN,r);return E.jsx(we.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,()=>s.onOpenChange(!1))})});EN.displayName=wN;function YS(t){return t?"open":"closed"}var SN="DialogTitleWarning",[L1e,AN]=ZH(SN,{contentName:fl,titleName:QS,docsSlug:"dialog"}),DQ=({titleId:t})=>{const e=AN(SN),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},jQ="DialogDescriptionWarning",BQ=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${CN(jQ).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},FQ=pN,UQ=mN,VQ=gN,$Q=xN,zQ=SN,HQ=Mt({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),GQ=Mt({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const qQ=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return E.jsx(G,{className:GQ({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:E.jsx(G,{className:HQ({direction:n}),background:"backgroundPrimary",...s,children:e})})};function WQ(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function KQ(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 kN(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]=kN(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 DR(t,e,r){t.style.setProperty(WQ(e),r)}function LR(t,e,r){if(typeof r=="object"){var n=e;kN(r,(a,c)=>{a!=null&&DR(t,KQ(n,c),String(a))})}else{var s=e;for(var i in s){var o=s[i];o!=null&&DR(t,i,s[i])}}}const YS=["dark","light"],TN="dark",QQ="data-theme",jR="@sequence.theme",YQ=t=>YS.includes(t),JQ=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),PN=t=>t?`${jR}.${t}`:jR,XQ=t=>{const e=localStorage.getItem(PN(t));return e&&YS.includes(e)?e:TN},RN=v.createContext(null),ZQ=t=>{const[e,r]=v.useState(t.theme||TN);v.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),v.useEffect(()=>{t.theme||r(XQ(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&&(YQ(e)?(s.setAttribute(QQ,e),LR(s,oR,{colors:IH[e]})):JQ(e)&&LR(s,oR,{colors:e}),t.root&&s.classList.add("seq-root"))},[e,t.root]);const n=v.useMemo(()=>({theme:e,root:t.root,setTheme:s=>{YS.includes(s)&&(localStorage.setItem(PN(t.scope),s),r(s))}}),[e,t.root,t.scope]);return E.jsx(RN.Provider,{value:n,children:t.children})},eY=()=>{const t=v.useContext(RN);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var tY="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11nk fyvr1ko fyvr1oo fyvr1qo fyvr1mo",rY="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",nY=Mt({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"]]}),sY="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11nk";const IN=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}=eY(),[h,p]=v.useState(null);return v.useEffect(()=>{p(document.querySelector(d||"body"))},[d]),h?E.jsx(FQ,{modal:!0,defaultOpen:!0,onOpenChange:o,children:E.jsx(UQ,{forceMount:!0,container:h,children:E.jsxs(G,{...f,className:qr("seq-root",tY,f==null?void 0:f.className),children:[E.jsx(G,{as:VQ,asChild:!0,background:r,className:rY,forceMount:!0,children:E.jsx(Yc.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($Q,{asChild:!0,className:nY({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:y=>{i?o==null||o():y.preventDefault()},onInteractOutside:y=>{i||y.preventDefault()},children:E.jsxs(Yc.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(qQ,{children:n}):n,i&&E.jsx(zQ,{asChild:!0,children:E.jsx(Am,{icon:qh,backdropFilter:"blur",size:"xs",className:sY,"aria-label":"Close"})})]},"modal-content")})]})})}):null};var iY="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11od fyvr12s1 fyvr1g0 fyvr118g",oY=Mt({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:[]}),aY=Mt({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(Sl,{description:i,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:E.jsx(G,{width:"full",children:E.jsxs(G,{className:qr(iY,oY({borderRadius:s})),children:[u&&E.jsx(u,{size:"sm"}),E.jsx(G,{as:r,autoComplete:n,spellCheck:"false",className:aY({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:p,...g}),f&&E.jsx(f,{size:"sm"}),h]})})})}),cY=RegExp("^\\d*(?:\\\\[.])?\\d*$");function lY(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===""||cY.test(lY(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 uY="y5zf971 _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8 _4efw240";const fY=t=>{const{value:e,digits:r=6,group:n,onChange:s,onConfirm:i,disabled:o=!1}=t,a=v.useMemo(()=>BR(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(G,{gap:"2",children:BR(0,r).map(d=>E.jsxs(v.Fragment,{children:[!!n&&d>0&&d%n===0&&E.jsx("span",{}),E.jsx(G,{as:"input",className:uY,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))})},BR=(t,e)=>Array.from({length:e-t},(r,n)=>n+t);Mt({defaultClassName:"_1jujggt1",variantClassNames:{size:{sm:"_1jujggt2",normal:"_1jujggt3",md:"_1jujggt4",lg:"_1jujggt5",xl:"_1jujggt6"}},defaultVariants:{},compoundVariants:[]});var JS="Progress",XS=100,[dY,L1e]=Wr(JS),[hY,pY]=dY(JS),yY=v.forwardRef((t,e)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:i=mY,...o}=t;(s||s===0)&&!FR(s)&&console.error(gY(`${s}`,"Progress"));const a=FR(s)?s:XS;n!==null&&!UR(n,a)&&console.error(xY(`${n}`,"Progress"));const c=UR(n,a)?n:null,l=t0(c)?i(c,a):void 0;return E.jsx(hY,{scope:r,value:c,max:a,children:E.jsx(be.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":t0(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":_N(c,a),"data-value":c??void 0,"data-max":a,...o,ref:e})})});yY.displayName=JS;var ON="ProgressIndicator",vY=v.forwardRef((t,e)=>{const{__scopeProgress:r,...n}=t,s=pY(ON,r);return E.jsx(be.div,{"data-state":_N(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:e})});vY.displayName=ON;function mY(t,e){return`${Math.round(t/e*100)}%`}function _N(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function t0(t){return typeof t=="number"}function FR(t){return t0(t)&&!isNaN(t)&&t>0}function UR(t,e){return t0(t)&&!isNaN(t)&&t<=e&&t>=0}function gY(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${XS}\`.`}function xY(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 {${AN(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=hN,FQ=vN,UQ=mN,VQ=gN,$Q=EN,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(G,{className:HQ({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:E.jsx(G,{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"],kN="dark",KQ="data-theme",FR="@sequence.theme",QQ=t=>JS.includes(t),YQ=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),TN=t=>t?`${FR}.${t}`:FR,JQ=t=>{const e=localStorage.getItem(TN(t));return e&&JS.includes(e)?e:kN},PN=v.createContext(null),XQ=t=>{const[e,r]=v.useState(t.theme||kN);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(TN(t.scope),s),r(s))}}),[e,t.root,t.scope]);return E.jsx(PN.Provider,{value:n,children:t.children})},ZQ=()=>{const t=v.useContext(PN);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 RN=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(G,{...f,className:qr("seq-root",eY,f==null?void 0:f.className),children:[E.jsx(G,{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(Cm,{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(Cl,{description:i,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:E.jsx(G,{width:"full",children:E.jsxs(G,{className:qr(sY,iY({borderRadius:s})),children:[u&&E.jsx(u,{size:"sm"}),E.jsx(G,{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(G,{gap:"2",children:UR(0,r).map(d=>E.jsxs(v.Fragment,{children:[!!n&&d>0&&d%n===0&&E.jsx("span",{}),E.jsx(G,{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":ON(c,a),"data-value":c??void 0,"data-max":a,...o,ref:e})})});pY.displayName=XS;var IN="ProgressIndicator",yY=v.forwardRef((t,e)=>{const{__scopeProgress:r,...n}=t,s=hY(IN,r);return E.jsx(we.div,{"data-state":ON(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:e})});yY.displayName=IN;function vY(t,e){return`${Math.round(t/e*100)}%`}function ON(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 ${XS} if no \`max\` prop is set) + - 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 ZS="Radio",[bY,NN]=Wr(ZS),[wY,EY]=bY(ZS),MN=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=ze(e,y=>f(y)),h=v.useRef(!1),p=u?!!u.closest("form"):!0;return E.jsxs(wY,{scope:r,checked:s,disabled:o,children:[E.jsx(be.button,{type:"button",role:"radio","aria-checked":s,"data-state":jN(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(SY,{control:u,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});MN.displayName=ZS;var DN="RadioIndicator",LN=v.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=EY(DN,r);return E.jsx(cn,{present:n||i.checked,children:E.jsx(be.span,{"data-state":jN(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});LN.displayName=DN;var SY=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=v.useRef(null),o=hm(r),a=pm(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 jN(t){return t?"checked":"unchecked"}var AY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],eA="RadioGroup",[CY,j1e]=Wr(eA,[ud,NN]),BN=ud(),FN=NN(),[kY,TY]=CY(eA),UN=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=BN(r),p=iy(l),[y,g]=ps({prop:i,defaultProp:s,onChange:f});return E.jsx(kY,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:g,children:E.jsx(DS,{asChild:!0,...h,orientation:c,dir:p,loop:u,children:E.jsx(be.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:p,...d,ref:e})})})});UN.displayName=eA;var VN="RadioGroupItem",$N=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=TY(VN,r),o=i.disabled||n,a=BN(r),c=FN(r),l=v.useRef(null),u=ze(e,l),f=i.value===s.value,d=v.useRef(!1);return v.useEffect(()=>{const h=y=>{AY.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(LS,{asChild:!0,...a,focusable:!o,active:f,children:E.jsx(MN,{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())})})})});$N.displayName=VN;var PY="RadioGroupIndicator",zN=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=FN(r);return E.jsx(LN,{...s,...n,ref:e})});zN.displayName=PY;var RY=UN,IY=$N,OY=zN,_Y=Mt({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:[]}),NY=Mt({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12s1",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const MY=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return E.jsx(G,{alignItems:"center",children:E.jsx(Sl,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:E.jsx(IY,{className:_Y({size:n}),value:s,id:e,disabled:i,children:E.jsx(OY,{className:NY({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(RY,{disabled:n,name:i,ref:e,...c,children:E.jsx(G,{flexDirection:r,gap:s,children:o.map(({label:l,value:u,disabled:f})=>E.jsx(MY,{id:`${i}-${u}`,label:l,size:a,value:u,disabled:f},u))})})});function VR(t,[e,r]){return Math.min(r,Math.max(e,t))}var DY="VisuallyHidden",uy=v.forwardRef((t,e)=>E.jsx(be.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}}));uy.displayName=DY;var LY=uy,jY=[" ","Enter","ArrowUp","ArrowDown"],BY=[" ","Enter"],fy="Select",[Cm,km,FY]=ym(fy),[fd,B1e]=Wr(fy,[FY,ld]),Tm=ld(),[UY,Fa]=fd(fy),[VY,$Y]=fd(fy),HN=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=Tm(e),[y,g]=v.useState(null),[m,x]=v.useState(null),[b,w]=v.useState(!1),C=iy(l),[O=!1,_]=ps({prop:n,defaultProp:s,onChange:i}),[A,j]=ps({prop:o,defaultProp:a,onChange:c}),U=v.useRef(null),H=y?!!y.closest("form"):!0,[K,Q]=v.useState(new Set),$=Array.from(K).map(D=>D.props.value).join(";");return E.jsx(OS,{...p,children:E.jsxs(UY,{required:h,scope:e,trigger:y,onTriggerChange:g,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:us(),value:A,onValueChange:j,open:O,onOpenChange:_,dir:C,triggerPointerDownPosRef:U,disabled:d,children:[E.jsx(Cm.Provider,{scope:e,children:E.jsx(VY,{scope:t.__scopeSelect,onNativeOptionAdd:v.useCallback(D=>{Q(T=>new Set(T).add(D))},[]),onNativeOptionRemove:v.useCallback(D=>{Q(T=>{const P=new Set(T);return P.delete(D),P})},[]),children:r})}),H?E.jsxs(u7,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:A,onChange:D=>j(D.target.value),disabled:d,children:[A===void 0?E.jsx("option",{value:""}):null,Array.from(K)]},$):null]})})};HN.displayName=fy;var GN="SelectTrigger",qN=v.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=Tm(r),o=Fa(GN,r),a=o.disabled||n,c=ze(e,o.onTriggerChange),l=km(r),[u,f,d]=f7(p=>{const y=l().filter(x=>!x.disabled),g=y.find(x=>x.value===o.value),m=d7(y,p,g);m!==void 0&&o.onValueChange(m.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return E.jsx(_S,{asChild:!0,...i,children:E.jsx(be.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":l7(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===" ")&&jY.includes(p.key)&&(h(),p.preventDefault())})})})});qN.displayName=GN;var WN="SelectValue",KN=v.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,c=Fa(WN,r),{onValueNodeHasChildrenChange:l}=c,u=i!==void 0,f=ze(e,c.onValueNodeChange);return Tr(()=>{l(u)},[l,u]),E.jsx(be.span,{...a,ref:f,style:{pointerEvents:"none"},children:l7(c.value)?E.jsx(E.Fragment,{children:o}):i})});KN.displayName=WN;var zY="SelectIcon",QN=v.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return E.jsx(be.span,{"aria-hidden":!0,...s,ref:e,children:n||"▼"})});QN.displayName=zY;var ul="SelectContent",YN=v.forwardRef((t,e)=>{const r=Fa(ul,t.__scopeSelect),[n,s]=v.useState();if(Tr(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?wo.createPortal(E.jsx(JN,{scope:t.__scopeSelect,children:E.jsx(Cm.Slot,{scope:t.__scopeSelect,children:E.jsx("div",{children:t.children})})}),i):null}return E.jsx(XN,{...t,ref:e})});YN.displayName=ul;var Ni=10,[JN,Ua]=fd(ul),HY="SelectContentImpl",XN=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=Fa(ul,r),[b,w]=v.useState(null),[C,O]=v.useState(null),_=ze(e,oe=>w(oe)),[A,j]=v.useState(null),[U,H]=v.useState(null),K=km(r),[Q,$]=v.useState(!1),D=v.useRef(!1);v.useEffect(()=>{if(b)return jS(b)},[b]),ES();const T=v.useCallback(oe=>{const[Ne,...Be]=K().map(He=>He.ref.current),[Re]=Be.slice(-1),De=document.activeElement;for(const He of oe)if(He===De||(He==null||He.scrollIntoView({block:"nearest"}),He===Ne&&C&&(C.scrollTop=0),He===Re&&C&&(C.scrollTop=C.scrollHeight),He==null||He.focus(),document.activeElement!==De))return},[K,C]),P=v.useCallback(()=>T([A,b]),[T,A,b]);v.useEffect(()=>{Q&&P()},[Q,P]);const{onOpenChange:R,triggerPointerDownPosRef:I}=x;v.useEffect(()=>{if(b){let oe={x:0,y:0};const Ne=Re=>{var De,He;oe={x:Math.abs(Math.round(Re.pageX)-(((De=I.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Re.pageY)-(((He=I.current)==null?void 0:He.y)??0))}},Be=Re=>{oe.x<=10&&oe.y<=10?Re.preventDefault():b.contains(Re.target)||R(!1),document.removeEventListener("pointermove",Ne),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",Ne),document.addEventListener("pointerup",Be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ne),document.removeEventListener("pointerup",Be,{capture:!0})}}},[b,R,I]),v.useEffect(()=>{const oe=()=>R(!1);return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[R]);const[F,B]=f7(oe=>{const Ne=K().filter(De=>!De.disabled),Be=Ne.find(De=>De.ref.current===document.activeElement),Re=d7(Ne,oe,Be);Re&&setTimeout(()=>Re.ref.current.focus())}),J=v.useCallback((oe,Ne,Be)=>{const Re=!D.current&&!Be;(x.value!==void 0&&x.value===Ne||Re)&&(j(oe),Re&&(D.current=!0))},[x.value]),se=v.useCallback(()=>b==null?void 0:b.focus(),[b]),ae=v.useCallback((oe,Ne,Be)=>{const Re=!D.current&&!Be;(x.value!==void 0&&x.value===Ne||Re)&&H(oe)},[x.value]),we=n==="popper"?kw:ZN,ve=we===kw?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:y,avoidCollisions:g}:{};return E.jsx(JN,{scope:r,content:b,viewport:C,onViewportChange:O,itemRefCallback:J,selectedItem:A,onItemLeave:se,itemTextRefCallback:ae,focusSelectedItem:P,selectedItemText:U,position:n,isPositioned:Q,searchRef:F,children:E.jsx(wm,{as:al,allowPinchZoom:!0,children:E.jsx(vm,{asChild:!0,trapped:x.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:ce(s,oe=>{var Ne;(Ne=x.trigger)==null||Ne.focus({preventScroll:!0}),oe.preventDefault()}),children:E.jsx(od,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:E.jsx(we,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:oe=>oe.preventDefault(),...m,...ve,onPlaced:()=>$(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:ce(m.onKeyDown,oe=>{const Ne=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!Ne&&oe.key.length===1&&B(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let Re=K().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const De=oe.target,He=Re.indexOf(De);Re=Re.slice(He+1)}setTimeout(()=>T(Re)),oe.preventDefault()}})})})})})})});XN.displayName=HY;var GY="SelectItemAlignedPosition",ZN=v.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Fa(ul,r),o=Ua(ul,r),[a,c]=v.useState(null),[l,u]=v.useState(null),f=ze(e,_=>u(_)),d=km(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(),A=l.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),U=m.getBoundingClientRect();if(i.dir!=="rtl"){const De=U.left-A.left,He=j.left-De,at=_.left-He,qe=_.width+at,Kr=Math.max(qe,A.width),vs=window.innerWidth-Ni,Ka=VR(He,[Ni,vs-Kr]);a.style.minWidth=qe+"px",a.style.left=Ka+"px"}else{const De=A.right-U.right,He=window.innerWidth-j.right-De,at=window.innerWidth-_.right-He,qe=_.width+at,Kr=Math.max(qe,A.width),vs=window.innerWidth-Ni,Ka=VR(He,[Ni,vs-Kr]);a.style.minWidth=qe+"px",a.style.right=Ka+"px"}const H=d(),K=window.innerHeight-Ni*2,Q=y.scrollHeight,$=window.getComputedStyle(l),D=parseInt($.borderTopWidth,10),T=parseInt($.paddingTop,10),P=parseInt($.borderBottomWidth,10),R=parseInt($.paddingBottom,10),I=D+T+Q+R+P,F=Math.min(g.offsetHeight*5,I),B=window.getComputedStyle(y),J=parseInt(B.paddingTop,10),se=parseInt(B.paddingBottom,10),ae=_.top+_.height/2-Ni,we=K-ae,ve=g.offsetHeight/2,oe=g.offsetTop+ve,Ne=D+T+oe,Be=I-Ne;if(Ne<=ae){const De=g===H[H.length-1].ref.current;a.style.bottom="0px";const He=l.clientHeight-y.offsetTop-y.offsetHeight,at=Math.max(we,ve+(De?se:0)+He+P),qe=Ne+at;a.style.height=qe+"px"}else{const De=g===H[0].ref.current;a.style.top="0px";const at=Math.max(ae,D+y.offsetTop+(De?J:0)+ve)+Be;a.style.height=at+"px",y.scrollTop=Ne-ae+y.offsetTop}a.style.margin=`${Ni}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=K+"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,C]=v.useState();Tr(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);const O=v.useCallback(_=>{_&&p.current===!0&&(b(),x==null||x(),p.current=!1)},[b,x]);return E.jsx(WY,{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(be.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});ZN.displayName=GY;var qY="SelectPopperPosition",kw=v.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Ni,...i}=t,o=Tm(r);return E.jsx(NS,{...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)"}})});kw.displayName=qY;var[WY,tA]=fd(ul,{}),Tw="SelectViewport",e7=v.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...s}=t,i=Ua(Tw,r),o=tA(Tw,r),a=ze(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(Cm.Slot,{scope:r,children:E.jsx(be.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-Ni*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})})})]})});e7.displayName=Tw;var t7="SelectGroup",[KY,QY]=fd(t7),r7=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=us();return E.jsx(KY,{scope:r,id:s,children:E.jsx(be.div,{role:"group","aria-labelledby":s,...n,ref:e})})});r7.displayName=t7;var n7="SelectLabel",YY=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=QY(n7,r);return E.jsx(be.div,{id:s.id,...n,ref:e})});YY.displayName=n7;var r0="SelectItem",[JY,s7]=fd(r0),i7=v.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Fa(r0,r),c=Ua(r0,r),l=a.value===n,[u,f]=v.useState(i??""),[d,h]=v.useState(!1),p=ze(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(JY,{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(Cm.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:E.jsx(be.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===" "||(BY.includes(m.key)&&g(),m.key===" "&&m.preventDefault())})})})})});i7.displayName=r0;var Yd="SelectItemText",o7=v.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Fa(Yd,r),a=Ua(Yd,r),c=s7(Yd,r),l=$Y(Yd,r),[u,f]=v.useState(null),d=ze(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(be.span,{id:c.textId,...i,ref:d}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?wo.createPortal(i.children,o.valueNode):null]})});o7.displayName=Yd;var a7="SelectItemIndicator",XY=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return s7(a7,r).isSelected?E.jsx(be.span,{"aria-hidden":!0,...n,ref:e}):null});XY.displayName=a7;var Pw="SelectScrollUpButton",ZY=v.forwardRef((t,e)=>{const r=Ua(Pw,t.__scopeSelect),n=tA(Pw,t.__scopeSelect),[s,i]=v.useState(!1),o=ze(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(c7,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});ZY.displayName=Pw;var Rw="SelectScrollDownButton",eJ=v.forwardRef((t,e)=>{const r=Ua(Rw,t.__scopeSelect),n=tA(Rw,t.__scopeSelect),[s,i]=v.useState(!1),o=ze(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(c7,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});eJ.displayName=Rw;var c7=v.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=t,i=Ua("SelectScrollButton",r),o=v.useRef(null),a=km(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(be.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()})})}),tJ="SelectSeparator",rJ=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return E.jsx(be.div,{"aria-hidden":!0,...n,ref:e})});rJ.displayName=tJ;var Iw="SelectArrow",nJ=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Tm(r),i=Fa(Iw,r),o=Ua(Iw,r);return i.open&&o.position==="popper"?E.jsx(MS,{...s,...n,ref:e}):null});nJ.displayName=Iw;function l7(t){return t===""||t===void 0}var u7=v.forwardRef((t,e)=>{const{value:r,...n}=t,s=v.useRef(null),i=ze(e,s),o=hm(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(uy,{asChild:!0,children:E.jsx("select",{...n,ref:i,defaultValue:r})})});u7.displayName="BubbleSelect";function f7(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 d7(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=sJ(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 sJ(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var iJ=HN,oJ=qN,aJ=KN,cJ=QN,lJ=YN,uJ=e7,fJ=r7,dJ=i7,hJ=o7,pJ="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr11hc fyvr11f4 fyvr12s1 fyvr118c fyvr11jw fyvr11n4 fyvr12v7 fyvr12o1",yJ=Mt({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:[]}),vJ="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tv fyvr12s1 fyvr11nl",mJ="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 gJ=v.forwardRef(({children:t,className:e,...r},n)=>E.jsx(dJ,{className:qr(mJ,e),...r,ref:n,children:E.jsx(hJ,{children:t})})),Pm=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(Sl,{disabled:n,display:"grid",id:s??c,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:E.jsxs(iJ,{disabled:n,name:c,...f,children:[E.jsxs(oJ,{id:s??c,className:qr(pJ,yJ({borderRadius:r})),ref:e,children:[E.jsx(aJ,{placeholder:u}),E.jsx(G,{as:cJ,display:"inline-flex",children:E.jsx(q6,{})})]}),E.jsx(lJ,{className:vJ,children:E.jsx(uJ,{children:E.jsx(fJ,{children:l.map(({value:d,label:h,...p})=>E.jsx(gJ,{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:qh,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return E.jsx(sr,{ref:e,name:i,leftIcon:SG,controls:r||c,placeholder:s,value:o,onChange:l=>n==null?void 0:n(l),...a})});var xJ=Mt({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(G,{className:xJ({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(G,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));var rA="Switch",[bJ,F1e]=Wr(rA),[wJ,EJ]=bJ(rA),h7=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=ze(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(wJ,{scope:r,checked:g,disabled:a,children:[E.jsx(be.button,{type:"button",role:"switch","aria-checked":g,"aria-required":o,"data-state":v7(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(SJ,{control:f,bubbles:!p.current,name:n,value:c,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});h7.displayName=rA;var p7="SwitchThumb",y7=v.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=EJ(p7,r);return E.jsx(be.span,{"data-state":v7(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:e})});y7.displayName=p7;var SJ=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=v.useRef(null),o=hm(r),a=pm(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 v7(t){return t?"checked":"unchecked"}var AJ=h7,CJ=y7,kJ="_1lp2u8e1 _1lp2u8e0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11t1 fyvr11hw fyvr12v7 fyvr12o1 _4efw240",TJ="_1lp2u8e3 _1lp2u8e2 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11o1";const PJ=t=>{const{disabled:e,label:r,labelLocation:n="left",description:s,id:i,name:o,...a}=t;return E.jsx(Sl,{disabled:e,display:"flex",id:i??o,label:r,labelLocation:n,description:s,whiteSpace:"nowrap",children:E.jsx(AJ,{className:kJ,disabled:e,...a,children:E.jsx(G,{position:"relative",width:"full",height:"full",children:E.jsx(CJ,{className:TJ})})})})};Mt({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 nA="Tabs",[RJ,U1e]=Wr(nA,[ud]),m7=ud(),[IJ,sA]=RJ(nA),OJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...l}=t,u=iy(a),[f,d]=ps({prop:n,onChange:s,defaultProp:i});return E.jsx(IJ,{scope:r,baseId:us(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:c,children:E.jsx(be.div,{dir:u,"data-orientation":o,...l,ref:e})})});OJ.displayName=nA;var g7="TabsList",_J=v.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=sA(g7,r),o=m7(r);return E.jsx(DS,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:E.jsx(be.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});_J.displayName=g7;var x7="TabsTrigger",NJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=sA(x7,r),a=m7(r),c=w7(o.baseId,n),l=E7(o.baseId,n),u=n===o.value;return E.jsx(LS,{asChild:!0,...a,focusable:!s,active:u,children:E.jsx(be.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)})})})});NJ.displayName=x7;var b7="TabsContent",MJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=sA(b7,r),c=w7(a.baseId,n),l=E7(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(be.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})})});MJ.displayName=b7;function w7(t,e){return`${t}-trigger-${e}`}function E7(t,e){return`${t}-content-${e}`}var DJ="_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(G,{className:DJ,ref:e,background:"buttonGlass",color:"text80",...s,children:[r&&E.jsx(r,{size:"xs"}),E.jsx(ue,{children:n})]})});var iA="ToastProvider",[oA,LJ,jJ]=ym("Toast"),[S7,V1e]=Wr("Toast",[jJ]),[BJ,Rm]=S7(iA),A7=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 \`${iA}\`. Expected non-empty \`string\`.`),E.jsx(oA.Provider,{scope:e,children:E.jsx(BJ,{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})})};A7.displayName=iA;var C7="ToastViewport",FJ=["F8"],Ow="toast.viewportPause",_w="toast.viewportResume",k7=v.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=FJ,label:s="Notifications ({hotkey})",...i}=t,o=Rm(C7,r),a=LJ(r),c=v.useRef(null),l=v.useRef(null),u=v.useRef(null),f=v.useRef(null),d=ze(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(Ow);m.dispatchEvent(O),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const O=new CustomEvent(_w);m.dispatchEvent(O),o.isClosePausedRef.current=!1}},w=O=>{!g.contains(O.relatedTarget)&&b()},C=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",x),g.addEventListener("focusout",w),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",C),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",w),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",C),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,C=[w,...ZJ(w)];return g==="forwards"?C:C.reverse()});return(g==="forwards"?x.reverse():x).flat()},[a]);return v.useEffect(()=>{const g=f.current;if(g){const m=x=>{var b,w,C;const O=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!O){const A=document.activeElement,j=x.shiftKey;if(x.target===g&&j){(b=l.current)==null||b.focus();return}const K=y({tabbingDirection:j?"backwards":"forwards"}),Q=K.findIndex($=>$===A);hx(K.slice(Q+1))?x.preventDefault():j?(w=l.current)==null||w.focus():(C=u.current)==null||C.focus()}};return g.addEventListener("keydown",m),()=>g.removeEventListener("keydown",m)}},[a,y]),E.jsxs(KG,{ref:c,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&E.jsx(Nw,{ref:l,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"forwards"});hx(g)}}),E.jsx(oA.Slot,{scope:r,children:E.jsx(be.ol,{tabIndex:-1,...i,ref:d})}),p&&E.jsx(Nw,{ref:u,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"backwards"});hx(g)}})]})});k7.displayName=C7;var T7="ToastFocusProxy",Nw=v.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Rm(T7,r);return E.jsx(uy,{"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()}})});Nw.displayName=T7;var Im="Toast",UJ="toast.swipeStart",VJ="toast.swipeMove",$J="toast.swipeCancel",zJ="toast.swipeEnd",P7=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(qJ,{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)})})})});P7.displayName=Im;var[HJ,GJ]=S7(Im,{onClose(){}}),qJ=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=Rm(Im,r),[g,m]=v.useState(null),x=ze(e,$=>m($)),b=v.useRef(null),w=v.useRef(null),C=s||y.duration,O=v.useRef(0),_=v.useRef(C),A=v.useRef(0),{onToastAdd:j,onToastRemove:U}=y,H=Gr(()=>{var $;(g==null?void 0:g.contains(document.activeElement))&&(($=y.viewport)==null||$.focus()),o()}),K=v.useCallback($=>{!$||$===1/0||(window.clearTimeout(A.current),O.current=new Date().getTime(),A.current=window.setTimeout(H,$))},[H]);v.useEffect(()=>{const $=y.viewport;if($){const D=()=>{K(_.current),l==null||l()},T=()=>{const P=new Date().getTime()-O.current;_.current=_.current-P,window.clearTimeout(A.current),c==null||c()};return $.addEventListener(Ow,T),$.addEventListener(_w,D),()=>{$.removeEventListener(Ow,T),$.removeEventListener(_w,D)}}},[y.viewport,C,c,l,K]),v.useEffect(()=>{i&&!y.isClosePausedRef.current&&K(C)},[i,C,y.isClosePausedRef,K]),v.useEffect(()=>(j(),()=>U()),[j,U]);const Q=v.useMemo(()=>g?M7(g):null,[g]);return y.viewport?E.jsxs(E.Fragment,{children:[Q&&E.jsx(WJ,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:Q}),E.jsx(HJ,{scope:r,onClose:H,children:wo.createPortal(E.jsx(oA.ItemSlot,{scope:r,children:E.jsx(WG,{asChild:!0,onEscapeKeyDown:ce(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||H(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:E.jsx(be.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,$=>{$.key==="Escape"&&(a==null||a($.nativeEvent),$.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:ce(t.onPointerDown,$=>{$.button===0&&(b.current={x:$.clientX,y:$.clientY})}),onPointerMove:ce(t.onPointerMove,$=>{if(!b.current)return;const D=$.clientX-b.current.x,T=$.clientY-b.current.y,P=!!w.current,R=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=R?I(0,D):0,B=R?0:I(0,T),J=$.pointerType==="touch"?10:2,se={x:F,y:B},ae={originalEvent:$,delta:se};P?(w.current=se,c1(VJ,f,ae,{discrete:!1})):$R(se,y.swipeDirection,J)?(w.current=se,c1(UJ,u,ae,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(D)>J||Math.abs(T)>J)&&(b.current=null)}),onPointerUp:ce(t.onPointerUp,$=>{const D=w.current,T=$.target;if(T.hasPointerCapture($.pointerId)&&T.releasePointerCapture($.pointerId),w.current=null,b.current=null,D){const P=$.currentTarget,R={originalEvent:$,delta:D};$R(D,y.swipeDirection,y.swipeThreshold)?c1(zJ,h,R,{discrete:!0}):c1($J,d,R,{discrete:!0}),P.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),WJ=t=>{const{__scopeToast:e,children:r,...n}=t,s=Rm(Im,e),[i,o]=v.useState(!1),[a,c]=v.useState(!1);return JJ(()=>o(!0)),v.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:E.jsx(ay,{asChild:!0,children:E.jsx(uy,{...n,children:i&&E.jsxs(E.Fragment,{children:[s.label," ",r]})})})},KJ="ToastTitle",R7=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return E.jsx(be.div,{...n,ref:e})});R7.displayName=KJ;var QJ="ToastDescription",I7=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return E.jsx(be.div,{...n,ref:e})});I7.displayName=QJ;var O7="ToastAction",YJ=v.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?E.jsx(N7,{altText:r,asChild:!0,children:E.jsx(aA,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${O7}\`. Expected non-empty \`string\`.`),null)});YJ.displayName=O7;var _7="ToastClose",aA=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=GJ(_7,r);return E.jsx(N7,{asChild:!0,children:E.jsx(be.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,s.onClose)})})});aA.displayName=_7;var N7=v.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return E.jsx(be.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function M7(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),XJ(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(...M7(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?yS(s,i):s.dispatchEvent(i)}var $R=(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 JJ(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 XJ(t){return t.nodeType===t.ELEMENT_NODE}function ZJ(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 hx(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var eX=A7,tX=k7,rX=P7,nX=R7,sX=I7,iX=aA,oX="_6wut8v1 _6wut8v0 fyvr12wp fyvr12wj fyvr11hs fyvr1qo fyvr1mo fyvr128 fyvr118g fyvr11i4 fyvr11h0",aX=Mt({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});const D7=v.createContext(null),cX=t=>{const{children:e,...r}=t,[n,s]=v.useState(new Set);return E.jsxs(eX,{...r,children:[E.jsxs(D7.Provider,{value:s,children:[e,E.jsx(pS,{children:Array.from(n).map(i=>E.jsx(uX,{...i},i.id))})]}),E.jsx(lX,{})]})},lX=()=>E.jsx(tX,{className:oX}),uX=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(G,{background:"positive",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:E.jsx(mS,{})});case"error":return E.jsx(G,{background:"negative",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:E.jsx(qh,{})});default:return null}};return E.jsx(rX,{className:aX({variant:r}),open:!0,forceMount:!0,asChild:!0,...a,children:E.jsxs(XH,{as:Yc.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(G,{gap:"3",alignItems:"center",children:[c(),E.jsxs(G,{flexDirection:"column",gap:"1",children:[n&&E.jsx(nX,{children:E.jsx(ue,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:n})}),E.jsx(sX,{children:E.jsx(ue,{as:"div",variant:"normal",fontWeight:"medium",color:"text50",children:s})})]})]}),o&&E.jsx(iX,{"aria-label":"Close",asChild:!0,children:E.jsx(Am,{icon:qh,size:"xs"})})]})})},L7=()=>{const t=v.useContext(D7);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 fX="_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",dX="_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(Sl,{description:i,disabled:o,display:"grid",id:a??u,label:c,labelLocation:l,children:E.jsx(G,{as:r,autoComplete:n,spellCheck:"false",className:qr(fX,d&&dX),disabled:o,id:a??u,name:u,ref:e,rows:f,borderRadius:s,...h})})});var hX=Mt({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:[]}),pX="_18h918kf";const yX=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||$H(zH(e),a);return E.jsx(G,{className:qr(n,hX({borderRadius:r,size:a})),style:i,flexShrink:"0",...c,children:E.jsx(dN,{className:pX,disableAnimation:s,src:l})})});var vX=Mt({defaultClassName:"bnrreb1 bnrreb0 fyvr11jg fyvr11ko fyvr11hw fyvr11h0",variantClassNames:{size:{xs:"bnrreb2",sm:"bnrreb3",md:"bnrreb4",lg:"bnrreb5",xl:"bnrreb6"}},defaultVariants:{},compoundVariants:[]}),mX="bnrreb7",gX="bnrreb9 bnrreb8 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sj fyvr128 fyvr15o fyvr11h0";const xX=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(G,{className:qr(r,vX({size:a})),style:s,flexShrink:"0",...l,children:[i?E.jsx(dN,{className:mX,disableAnimation:n,borderRadius:e,overflow:"hidden",src:i}):E.jsx(ue,{className:gX,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(G,{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(yX,{chainId:c,style:{width:16,height:16}})})]})});var[Om,$1e]=Wr("Tooltip",[ld]),_m=ld(),j7="TooltipProvider",bX=700,Mw="tooltip.open",[wX,cA]=Om(j7),EX=t=>{const{__scopeTooltip:e,delayDuration:r=bX,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(wX,{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})};EX.displayName=j7;var Nm="Tooltip",[SX,dy]=Om(Nm),AX=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=t,c=cA(Nm,t.__scopeTooltip),l=_m(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(Mw))):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]),C=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(OS,{...l,children:E.jsx(SX,{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?C():window.clearTimeout(h.current)},[C,p]),onOpen:w,onClose:C,disableHoverableContent:p,children:r})})};AX.displayName=Nm;var Dw="TooltipTrigger",CX=v.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=dy(Dw,r),i=cA(Dw,r),o=_m(r),a=v.useRef(null),c=ze(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(_S,{asChild:!0,...o,children:E.jsx(be.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=Dw;var lA="TooltipPortal",[kX,TX]=Om(lA,{forceMount:void 0}),PX=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:s}=t,i=dy(lA,e);return E.jsx(kX,{scope:e,forceMount:r,children:E.jsx(cn,{present:r||i.open,children:E.jsx(ay,{asChild:!0,container:s,children:n})})})};PX.displayName=lA;var Ff="TooltipContent",RX=v.forwardRef((t,e)=>{const r=TX(Ff,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=dy(Ff,t.__scopeTooltip);return E.jsx(cn,{present:n||o.open,children:o.disableHoverableContent?E.jsx(B7,{side:s,...i,ref:e}):E.jsx(IX,{side:s,...i,ref:e})})}),IX=v.forwardRef((t,e)=>{const r=dy(Ff,t.__scopeTooltip),n=cA(Ff,t.__scopeTooltip),s=v.useRef(null),i=ze(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=MX(m,g.getBoundingClientRect()),b=DX(m,x),w=LX(y.getBoundingClientRect()),C=BX([...b,...w]);a(C),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=!jX(m,o);x?d():b&&(d(),l())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,u,o,l,d]),E.jsx(B7,{...t,ref:i})}),[OX,_X]=Om(Nm,{isInside:!1}),B7=v.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,c=dy(Ff,r),l=_m(r),{onClose:u}=c;return v.useEffect(()=>(document.addEventListener(Mw,u),()=>document.removeEventListener(Mw,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(NS,{"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(V6,{children:n}),E.jsx(OX,{scope:r,isInside:!0,children:E.jsx(LY,{id:c.contentId,role:"tooltip",children:s||n})})]})})});RX.displayName=Ff;var F7="TooltipArrow",NX=v.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=_m(r);return _X(F7,r).isInside?null:E.jsx(MS,{...s,...n,ref:e})});NX.displayName=F7;function MX(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 DX(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 LX(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 jX(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 BX(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),FX(e)}function FX(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.1 +Defaulting to \`null\`.`}var eA="Radio",[xY,_N]=Wr(eA),[bY,wY]=xY(eA),NN=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":LN(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%)"}})]})});NN.displayName=eA;var MN="RadioIndicator",DN=v.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=wY(MN,r);return E.jsx(cn,{present:n||i.checked,children:E.jsx(we.span,{"data-state":LN(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});DN.displayName=MN;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 LN(t){return t?"checked":"unchecked"}var SY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tA="RadioGroup",[AY,B1e]=Wr(tA,[ud,_N]),jN=ud(),BN=_N(),[CY,kY]=AY(tA),FN=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=jN(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})})})});FN.displayName=tA;var UN="RadioGroupItem",VN=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=kY(UN,r),o=i.disabled||n,a=jN(r),c=BN(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(NN,{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())})})})});VN.displayName=UN;var TY="RadioGroupIndicator",$N=v.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=BN(r);return E.jsx(DN,{...s,...n,ref:e})});$N.displayName=TY;var PY=FN,RY=VN,IY=$N,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(G,{alignItems:"center",children:E.jsx(Cl,{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(G,{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,Va]=fd(uy),[UY,VY]=fd(uy),zN=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),C=sy(l),[O=!1,_]=ps({prop:n,defaultProp:s,onChange:i}),[A,j]=ps({prop:o,defaultProp:a,onChange:c}),U=v.useRef(null),H=y?!!y.closest("form"):!0,[K,Q]=v.useState(new Set),$=Array.from(K).map(D=>D.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:A,onValueChange:j,open:O,onOpenChange:_,dir:C,triggerPointerDownPosRef:U,disabled:d,children:[E.jsx(km.Provider,{scope:e,children:E.jsx(UY,{scope:t.__scopeSelect,onNativeOptionAdd:v.useCallback(D=>{Q(T=>new Set(T).add(D))},[]),onNativeOptionRemove:v.useCallback(D=>{Q(T=>{const P=new Set(T);return P.delete(D),P})},[]),children:r})}),H?E.jsxs(l9,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:A,onChange:D=>j(D.target.value),disabled:d,children:[A===void 0?E.jsx("option",{value:""}):null,Array.from(K)]},$):null]})})};zN.displayName=uy;var HN="SelectTrigger",GN=v.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=Pm(r),o=Va(HN,r),a=o.disabled||n,c=$e(e,o.onTriggerChange),l=Tm(r),[u,f,d]=u9(p=>{const y=l().filter(x=>!x.disabled),g=y.find(x=>x.value===o.value),m=f9(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":c9(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())})})})});GN.displayName=HN;var qN="SelectValue",WN=v.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,c=Va(qN,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:c9(c.value)?E.jsx(E.Fragment,{children:o}):i})});WN.displayName=qN;var $Y="SelectIcon",KN=v.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return E.jsx(we.span,{"aria-hidden":!0,...s,ref:e,children:n||"▼"})});KN.displayName=$Y;var dl="SelectContent",QN=v.forwardRef((t,e)=>{const r=Va(dl,t.__scopeSelect),[n,s]=v.useState();if(Tr(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Eo.createPortal(E.jsx(YN,{scope:t.__scopeSelect,children:E.jsx(km.Slot,{scope:t.__scopeSelect,children:E.jsx("div",{children:t.children})})}),i):null}return E.jsx(JN,{...t,ref:e})});QN.displayName=dl;var Mi=10,[YN,$a]=fd(dl),zY="SelectContentImpl",JN=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=Va(dl,r),[b,w]=v.useState(null),[C,O]=v.useState(null),_=$e(e,oe=>w(oe)),[A,j]=v.useState(null),[U,H]=v.useState(null),K=Tm(r),[Q,$]=v.useState(!1),D=v.useRef(!1);v.useEffect(()=>{if(b)return BS(b)},[b]),SS();const T=v.useCallback(oe=>{const[Me,...Be]=K().map(ze=>ze.ref.current),[Pe]=Be.slice(-1),De=document.activeElement;for(const ze of oe)if(ze===De||(ze==null||ze.scrollIntoView({block:"nearest"}),ze===Me&&C&&(C.scrollTop=0),ze===Pe&&C&&(C.scrollTop=C.scrollHeight),ze==null||ze.focus(),document.activeElement!==De))return},[K,C]),P=v.useCallback(()=>T([A,b]),[T,A,b]);v.useEffect(()=>{Q&&P()},[Q,P]);const{onOpenChange:R,triggerPointerDownPosRef:I}=x;v.useEffect(()=>{if(b){let oe={x:0,y:0};const Me=Pe=>{var De,ze;oe={x:Math.abs(Math.round(Pe.pageX)-(((De=I.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Pe.pageY)-(((ze=I.current)==null?void 0:ze.y)??0))}},Be=Pe=>{oe.x<=10&&oe.y<=10?Pe.preventDefault():b.contains(Pe.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 oe=()=>R(!1);return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[R]);const[F,B]=u9(oe=>{const Me=K().filter(De=>!De.disabled),Be=Me.find(De=>De.ref.current===document.activeElement),Pe=f9(Me,oe,Be);Pe&&setTimeout(()=>Pe.ref.current.focus())}),J=v.useCallback((oe,Me,Be)=>{const Pe=!D.current&&!Be;(x.value!==void 0&&x.value===Me||Pe)&&(j(oe),Pe&&(D.current=!0))},[x.value]),se=v.useCallback(()=>b==null?void 0:b.focus(),[b]),ae=v.useCallback((oe,Me,Be)=>{const Pe=!D.current&&!Be;(x.value!==void 0&&x.value===Me||Pe)&&H(oe)},[x.value]),Se=n==="popper"?Tw:XN,ve=Se===Tw?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:y,avoidCollisions:g}:{};return E.jsx(YN,{scope:r,content:b,viewport:C,onViewportChange:O,itemRefCallback:J,selectedItem:A,onItemLeave:se,itemTextRefCallback:ae,focusSelectedItem:P,selectedItemText:U,position:n,isPositioned:Q,searchRef:F,children:E.jsx(Em,{as:ll,allowPinchZoom:!0,children:E.jsx(mm,{asChild:!0,trapped:x.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:ce(s,oe=>{var Me;(Me=x.trigger)==null||Me.focus({preventScroll:!0}),oe.preventDefault()}),children:E.jsx(od,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:E.jsx(Se,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:oe=>oe.preventDefault(),...m,...ve,onPlaced:()=>$(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:ce(m.onKeyDown,oe=>{const Me=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!Me&&oe.key.length===1&&B(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let Pe=K().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(Pe=Pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const De=oe.target,ze=Pe.indexOf(De);Pe=Pe.slice(ze+1)}setTimeout(()=>T(Pe)),oe.preventDefault()}})})})})})})});JN.displayName=zY;var HY="SelectItemAlignedPosition",XN=v.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Va(dl,r),o=$a(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(),A=l.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),U=m.getBoundingClientRect();if(i.dir!=="rtl"){const De=U.left-A.left,ze=j.left-De,at=_.left-ze,qe=_.width+at,Kr=Math.max(qe,A.width),vs=window.innerWidth-Mi,Ya=zR(ze,[Mi,vs-Kr]);a.style.minWidth=qe+"px",a.style.left=Ya+"px"}else{const De=A.right-U.right,ze=window.innerWidth-j.right-De,at=window.innerWidth-_.right-ze,qe=_.width+at,Kr=Math.max(qe,A.width),vs=window.innerWidth-Mi,Ya=zR(ze,[Mi,vs-Kr]);a.style.minWidth=qe+"px",a.style.right=Ya+"px"}const H=d(),K=window.innerHeight-Mi*2,Q=y.scrollHeight,$=window.getComputedStyle(l),D=parseInt($.borderTopWidth,10),T=parseInt($.paddingTop,10),P=parseInt($.borderBottomWidth,10),R=parseInt($.paddingBottom,10),I=D+T+Q+R+P,F=Math.min(g.offsetHeight*5,I),B=window.getComputedStyle(y),J=parseInt(B.paddingTop,10),se=parseInt(B.paddingBottom,10),ae=_.top+_.height/2-Mi,Se=K-ae,ve=g.offsetHeight/2,oe=g.offsetTop+ve,Me=D+T+oe,Be=I-Me;if(Me<=ae){const De=g===H[H.length-1].ref.current;a.style.bottom="0px";const ze=l.clientHeight-y.offsetTop-y.offsetHeight,at=Math.max(Se,ve+(De?se:0)+ze+P),qe=Me+at;a.style.height=qe+"px"}else{const De=g===H[0].ref.current;a.style.top="0px";const at=Math.max(ae,D+y.offsetTop+(De?J:0)+ve)+Be;a.style.height=at+"px",y.scrollTop=Me-ae+y.offsetTop}a.style.margin=`${Mi}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=K+"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,C]=v.useState();Tr(()=>{l&&C(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}})})})});XN.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,rA]=fd(dl,{}),Pw="SelectViewport",ZN=v.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...s}=t,i=$a(Pw,r),o=rA(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})})})]})});ZN.displayName=Pw;var e9="SelectGroup",[WY,KY]=fd(e9),t9=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})})});t9.displayName=e9;var r9="SelectLabel",QY=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=KY(r9,r);return E.jsx(we.div,{id:s.id,...n,ref:e})});QY.displayName=r9;var n0="SelectItem",[YY,n9]=fd(n0),s9=v.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Va(n0,r),c=$a(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())})})})})});s9.displayName=n0;var Qd="SelectItemText",i9=v.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Va(Qd,r),a=$a(Qd,r),c=n9(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]})});i9.displayName=Qd;var o9="SelectItemIndicator",JY=v.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return n9(o9,r).isSelected?E.jsx(we.span,{"aria-hidden":!0,...n,ref:e}):null});JY.displayName=o9;var Rw="SelectScrollUpButton",XY=v.forwardRef((t,e)=>{const r=$a(Rw,t.__scopeSelect),n=rA(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(a9,{...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=$a(Iw,t.__scopeSelect),n=rA(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(a9,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});ZY.displayName=Iw;var a9=v.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=t,i=$a("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=Va(Ow,r),o=$a(Ow,r);return i.open&&o.position==="popper"?E.jsx(DS,{...s,...n,ref:e}):null});rJ.displayName=Ow;function c9(t){return t===""||t===void 0}var l9=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})})});l9.displayName="BubbleSelect";function u9(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 f9(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=zN,iJ=GN,oJ=WN,aJ=KN,cJ=QN,lJ=ZN,uJ=t9,fJ=s9,dJ=i9,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(Cl,{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(G,{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(Cm,{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(G,{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(G,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));var nA="Switch",[xJ,U1e]=Wr(nA),[bJ,wJ]=xJ(nA),d9=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":y9(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%)"}})]})});d9.displayName=nA;var h9="SwitchThumb",p9=v.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=wJ(h9,r);return E.jsx(we.span,{"data-state":y9(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:e})});p9.displayName=h9;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 y9(t){return t?"checked":"unchecked"}var SJ=d9,AJ=p9,CJ="_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(Cl,{disabled:e,display:"flex",id:i??o,label:r,labelLocation:n,description:s,whiteSpace:"nowrap",children:E.jsx(SJ,{className:CJ,disabled:e,...a,children:E.jsx(G,{position:"relative",width:"full",height:"full",children:E.jsx(AJ,{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 sA="Tabs",[PJ,V1e]=Wr(sA,[ud]),v9=ud(),[RJ,iA]=PJ(sA),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=sA;var m9="TabsList",OJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=iA(m9,r),o=v9(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=m9;var g9="TabsTrigger",_J=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=iA(g9,r),a=v9(r),c=b9(o.baseId,n),l=w9(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=g9;var x9="TabsContent",NJ=v.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=iA(x9,r),c=b9(a.baseId,n),l=w9(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=x9;function b9(t,e){return`${t}-trigger-${e}`}function w9(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(G,{className:MJ,ref:e,background:"buttonGlass",color:"text80",...s,children:[r&&E.jsx(r,{size:"xs"}),E.jsx(ue,{children:n})]})});var oA="ToastProvider",[aA,DJ,LJ]=vm("Toast"),[E9,$1e]=Wr("Toast",[LJ]),[jJ,Im]=E9(oA),S9=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 \`${oA}\`. Expected non-empty \`string\`.`),E.jsx(aA.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})})};S9.displayName=oA;var A9="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(A9,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()},C=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",x),g.addEventListener("focusout",w),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",C),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",w),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",C),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,C=[w,...XJ(w)];return g==="forwards"?C:C.reverse()});return(g==="forwards"?x.reverse():x).flat()},[a]);return v.useEffect(()=>{const g=f.current;if(g){const m=x=>{var b,w,C;const O=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!O){const A=document.activeElement,j=x.shiftKey;if(x.target===g&&j){(b=l.current)==null||b.focus();return}const K=y({tabbingDirection:j?"backwards":"forwards"}),Q=K.findIndex($=>$===A);px(K.slice(Q+1))?x.preventDefault():j?(w=l.current)==null||w.focus():(C=u.current)==null||C.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(aA.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=A9;var k9="ToastFocusProxy",Mw=v.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Im(k9,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=k9;var Om="Toast",FJ="toast.swipeStart",UJ="toast.swipeMove",VJ="toast.swipeCancel",$J="toast.swipeEnd",T9=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)})})})});T9.displayName=Om;var[zJ,HJ]=E9(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,$=>m($)),b=v.useRef(null),w=v.useRef(null),C=s||y.duration,O=v.useRef(0),_=v.useRef(C),A=v.useRef(0),{onToastAdd:j,onToastRemove:U}=y,H=Gr(()=>{var $;(g==null?void 0:g.contains(document.activeElement))&&(($=y.viewport)==null||$.focus()),o()}),K=v.useCallback($=>{!$||$===1/0||(window.clearTimeout(A.current),O.current=new Date().getTime(),A.current=window.setTimeout(H,$))},[H]);v.useEffect(()=>{const $=y.viewport;if($){const D=()=>{K(_.current),l==null||l()},T=()=>{const P=new Date().getTime()-O.current;_.current=_.current-P,window.clearTimeout(A.current),c==null||c()};return $.addEventListener(_w,T),$.addEventListener(Nw,D),()=>{$.removeEventListener(_w,T),$.removeEventListener(Nw,D)}}},[y.viewport,C,c,l,K]),v.useEffect(()=>{i&&!y.isClosePausedRef.current&&K(C)},[i,C,y.isClosePausedRef,K]),v.useEffect(()=>(j(),()=>U()),[j,U]);const Q=v.useMemo(()=>g?N9(g):null,[g]);return y.viewport?E.jsxs(E.Fragment,{children:[Q&&E.jsx(qJ,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:Q}),E.jsx(zJ,{scope:r,onClose:H,children:Eo.createPortal(E.jsx(aA.ItemSlot,{scope:r,children:E.jsx(qG,{asChild:!0,onEscapeKeyDown:ce(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||H(),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,$=>{$.key==="Escape"&&(a==null||a($.nativeEvent),$.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:ce(t.onPointerDown,$=>{$.button===0&&(b.current={x:$.clientX,y:$.clientY})}),onPointerMove:ce(t.onPointerMove,$=>{if(!b.current)return;const D=$.clientX-b.current.x,T=$.clientY-b.current.y,P=!!w.current,R=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=R?I(0,D):0,B=R?0:I(0,T),J=$.pointerType==="touch"?10:2,se={x:F,y:B},ae={originalEvent:$,delta:se};P?(w.current=se,c1(UJ,f,ae,{discrete:!1})):HR(se,y.swipeDirection,J)?(w.current=se,c1(FJ,u,ae,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(D)>J||Math.abs(T)>J)&&(b.current=null)}),onPointerUp:ce(t.onPointerUp,$=>{const D=w.current,T=$.target;if(T.hasPointerCapture($.pointerId)&&T.releasePointerCapture($.pointerId),w.current=null,b.current=null,D){const P=$.currentTarget,R={originalEvent:$,delta:D};HR(D,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",P9=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return E.jsx(we.div,{...n,ref:e})});P9.displayName=WJ;var KJ="ToastDescription",R9=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return E.jsx(we.div,{...n,ref:e})});R9.displayName=KJ;var I9="ToastAction",QJ=v.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?E.jsx(_9,{altText:r,asChild:!0,children:E.jsx(cA,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${I9}\`. Expected non-empty \`string\`.`),null)});QJ.displayName=I9;var O9="ToastClose",cA=v.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=HJ(O9,r);return E.jsx(_9,{asChild:!0,children:E.jsx(we.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,s.onClose)})})});cA.displayName=O9;var _9=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 N9(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(...N9(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=S9,eX=C9,tX=T9,rX=P9,nX=R9,sX=cA,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 M9=v.createContext(null),aX=t=>{const{children:e,...r}=t,[n,s]=v.useState(new Set);return E.jsxs(ZJ,{...r,children:[E.jsxs(M9.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(G,{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(G,{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(G,{gap:"3",alignItems:"center",children:[c(),E.jsxs(G,{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(Cm,{icon:Gh,size:"xs"})})]})})},D9=()=>{const t=v.useContext(M9);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(Cl,{description:i,disabled:o,display:"grid",id:a??u,label:c,labelLocation:l,children:E.jsx(G,{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(G,{className:qr(n,dX({borderRadius:r,size:a})),style:i,flexShrink:"0",...c,children:E.jsx(fN,{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(G,{className:qr(r,yX({size:a})),style:s,flexShrink:"0",...l,children:[i?E.jsx(fN,{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(G,{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(),L9="TooltipProvider",xX=700,Dw="tooltip.open",[bX,lA]=_m(L9),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=L9;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=lA(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]),C=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?C():window.clearTimeout(h.current)},[C,p]),onOpen:w,onClose:C,disableHoverableContent:p,children:r})})};SX.displayName=Mm;var Lw="TooltipTrigger",AX=v.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=fy(Lw,r),i=lA(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)})})});AX.displayName=Lw;var uA="TooltipPortal",[CX,kX]=_m(uA,{forceMount:void 0}),TX=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:s}=t,i=fy(uA,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})})})};TX.displayName=uA;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(j9,{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=lA(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()),C=jX([...b,...w]);a(C),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(j9,{...t,ref:i})}),[IX,OX]=_m(Mm,{isInside:!1}),j9=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 B9="TooltipArrow",_X=v.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Nm(r);return OX(B9,r).isInside?null:E.jsx(DS,{...s,...n,ref:e})});_X.displayName=B9;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,10 +116,10 @@ Defaulting to \`null\`.`}var ZS="Radio",[bY,NN]=Wr(ZS),[wY,EY]=bY(ZS),MN=v.forwa * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function kt(){return kt=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function fl(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function VX(){return Math.random().toString(36).substr(2,8)}function HR(t,e){return{usr:t.state,key:t.key,idx:e}}function Jh(t,e,r,n){return r===void 0&&(r=null),kt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ai(e):e,{state:r,key:e&&e.key||n||VX()})}function hy(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 Ai(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 $X(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(kt({},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=Jh(y.location,g,m);r&&r(x,g),l=u()+1;let b=HR(x,l),w=y.createHref(x);try{o.pushState(b,"",w)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(w)}i&&c&&c({action:a,location:y.location,delta:1})}function h(g,m){a=zt.Replace;let x=Jh(y.location,g,m);r&&r(x,g),l=u();let b=HR(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:hy(g);return x=x.replace(/ $/,"%20"),$e(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(zR,f),c=g,()=>{s.removeEventListener(zR,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 zX=new Set(["lazy","caseSensitive","path","id","index","children"]);function HX(t){return t.index===!0}function Xh(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($e(s.index!==!0||!s.children,"Cannot specify children on an index route"),$e(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),HX(s)){let c=kt({},s,e(s),{id:a});return n[a]=c,c}else{let c=kt({},s,e(s),{id:a,children:void 0});return n[a]=c,s.children&&(c.children=Xh(s.children,e,o,n)),c}})}function oc(t,e,r){return r===void 0&&(r="/"),Y1(t,e,r,!1)}function Y1(t,e,r,n){let s=typeof e=="string"?Ai(e):e,i=py(s.pathname||"/",r);if(i==null)return null;let o=U7(t);qX(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("/")&&($e(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=Xc([n,c.relativePath]),u=r.concat(c);i.children&&i.children.length>0&&($e(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),U7(i.children,e,u,l)),!(i.path==null&&!i.index)&&e.push({path:l,score:ZX(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 V7(i.path))s(i,o,c)}),e}function V7(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=V7(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 qX(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:eZ(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const WX=/^:[\w-]+$/,KX=3,QX=2,YX=1,JX=10,XX=-2,GR=t=>t==="*";function ZX(t,e){let r=t.split("/"),n=r.length;return r.some(GR)&&(n+=XX),e&&(n+=QX),r.filter(s=>!GR(s)).reduce((s,i)=>s+(WX.test(i)?KX:i===""?YX:JX),n)}function eZ(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 tZ(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 rZ(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),fl(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 nZ(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return fl(!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 py(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 sZ(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Ai(t):t;return{pathname:r?r.startsWith("/")?r:iZ(r,e):e,search:lZ(n),hash:uZ(s)}}function iZ(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 px(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 $7(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function oZ(t,e){let r=$7(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function aZ(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=Ai(t):(s=kt({},t),$e(!s.pathname||!s.pathname.includes("?"),px("?","pathname","search",s)),$e(!s.pathname||!s.pathname.includes("#"),px("#","pathname","hash",s)),$e(!s.search||!s.search.includes("#"),px("#","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=sZ(s,a),l=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(l||u)&&(c.pathname+="/"),c}const Xc=t=>t.join("/").replace(/\/\/+/g,"/"),cZ=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),lZ=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,uZ=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class n0{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 Mm(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const z7=["post","put","patch","delete"],fZ=new Set(z7),dZ=["get",...z7],hZ=new Set(dZ),pZ=new Set([301,302,303,307,308]),yZ=new Set([307,308]),yx={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vZ={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Dd={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},uA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mZ=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),H7="remix-router-transitions";function gZ(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;$e(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 L=t.detectErrorBoundary;s=V=>({hasErrorBoundary:L(V)})}else s=mZ;let i={},o=Xh(t.routes,s,void 0,i),a,c=t.basename||"/",l=t.unstable_dataStrategy||SZ,u=t.unstable_patchRoutesOnNavigation,f=kt({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=oc(o,t.history.location,c),C=null;if(w==null&&!u){let L=Zr(404,{pathname:t.history.location.pathname}),{matches:V,route:Y}=r4(o);w=V,C={[Y.id]:L}}w&&!t.hydrationData&&Iy(w,o,t.history.location.pathname).active&&(w=null);let O;if(w)if(w.some(L=>L.route.lazy))O=!1;else if(!w.some(L=>L.route.loader))O=!0;else if(f.v7_partialHydration){let L=t.hydrationData?t.hydrationData.loaderData:null,V=t.hydrationData?t.hydrationData.errors:null,Y=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:L&&L[re.route.id]!==void 0||V&&V[re.route.id]!==void 0:!0;if(V){let re=w.findIndex(de=>V[de.route.id]!==void 0);O=w.slice(0,re+1).every(Y)}else O=w.every(Y)}else O=t.hydrationData!=null;else if(O=!1,w=[],f.v7_partialHydration){let L=Iy(null,o,t.history.location.pathname);L.active&&L.matches&&(w=L.matches)}let _,A={historyAction:t.history.action,location:t.history.location,matches:w,initialized:O,navigation:yx,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||C,fetchers:new Map,blockers:new Map},j=zt.Pop,U=!1,H,K=!1,Q=new Map,$=null,D=!1,T=!1,P=[],R=new Set,I=new Map,F=0,B=-1,J=new Map,se=new Set,ae=new Map,we=new Map,ve=new Set,oe=new Map,Ne=new Map,Be=new Map,Re=!1;function De(){if(d=t.history.listen(L=>{let{action:V,location:Y,delta:re}=L;if(Re){Re=!1;return}fl(Ne.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=$k({currentLocation:A.location,nextLocation:Y,historyAction:V});if(de&&re!=null){Re=!0,t.history.go(re*-1),Py(de,{state:"blocked",location:Y,proceed(){Py(de,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),t.history.go(re)},reset(){let ge=new Map(A.blockers);ge.set(de,Dd),qe({blockers:ge})}});return}return Ci(V,Y)}),r){LZ(e,Q);let L=()=>jZ(e,Q);e.addEventListener("pagehide",L),$=()=>e.removeEventListener("pagehide",L)}return A.initialized||Ci(zt.Pop,A.location,{initialHydration:!0}),_}function He(){d&&d(),$&&$(),h.clear(),H&&H.abort(),A.fetchers.forEach((L,V)=>Ty(V)),A.blockers.forEach((L,V)=>Vk(V))}function at(L){return h.add(L),()=>h.delete(L)}function qe(L,V){V===void 0&&(V={}),A=kt({},A,L);let Y=[],re=[];f.v7_fetcherPersist&&A.fetchers.forEach((de,ge)=>{de.state==="idle"&&(ve.has(ge)?re.push(ge):Y.push(ge))}),[...h].forEach(de=>de(A,{deletedFetchers:re,unstable_viewTransitionOpts:V.viewTransitionOpts,unstable_flushSync:V.flushSync===!0})),f.v7_fetcherPersist&&(Y.forEach(de=>A.fetchers.delete(de)),re.forEach(de=>Ty(de)))}function Kr(L,V,Y){var re,de;let{flushSync:ge}=Y===void 0?{}:Y,ke=A.actionData!=null&&A.navigation.formMethod!=null&&Os(A.navigation.formMethod)&&A.navigation.state==="loading"&&((re=L.state)==null?void 0:re._isRedirect)!==!0,le;V.actionData?Object.keys(V.actionData).length>0?le=V.actionData:le=null:ke?le=A.actionData:le=null;let _e=V.loaderData?e4(A.loaderData,V.loaderData,V.matches||[],V.errors):A.loaderData,Ee=A.blockers;Ee.size>0&&(Ee=new Map(Ee),Ee.forEach((Ze,ct)=>Ee.set(ct,Dd)));let Me=U===!0||A.navigation.formMethod!=null&&Os(A.navigation.formMethod)&&((de=L.state)==null?void 0:de._isRedirect)!==!0;a&&(o=a,a=void 0),D||j===zt.Pop||(j===zt.Push?t.history.push(L,L.state):j===zt.Replace&&t.history.replace(L,L.state));let nt;if(j===zt.Pop){let Ze=Q.get(A.location.pathname);Ze&&Ze.has(L.pathname)?nt={currentLocation:A.location,nextLocation:L}:Q.has(L.pathname)&&(nt={currentLocation:L,nextLocation:A.location})}else if(K){let Ze=Q.get(A.location.pathname);Ze?Ze.add(L.pathname):(Ze=new Set([L.pathname]),Q.set(A.location.pathname,Ze)),nt={currentLocation:A.location,nextLocation:L}}qe(kt({},V,{actionData:le,loaderData:_e,historyAction:j,location:L,initialized:!0,navigation:yx,revalidation:"idle",restoreScrollPosition:Hk(L,V.matches||A.matches),preventScrollReset:Me,blockers:Ee}),{viewTransitionOpts:nt,flushSync:ge===!0}),j=zt.Pop,U=!1,K=!1,D=!1,T=!1,P=[]}async function vs(L,V){if(typeof L=="number"){t.history.go(L);return}let Y=Lw(A.location,A.matches,c,f.v7_prependBasename,L,f.v7_relativeSplatPath,V==null?void 0:V.fromRouteId,V==null?void 0:V.relative),{path:re,submission:de,error:ge}=WR(f.v7_normalizeFormMethod,!1,Y,V),ke=A.location,le=Jh(A.location,re,V&&V.state);le=kt({},le,t.history.encodeLocation(le));let _e=V&&V.replace!=null?V.replace:void 0,Ee=zt.Push;_e===!0?Ee=zt.Replace:_e===!1||de!=null&&Os(de.formMethod)&&de.formAction===A.location.pathname+A.location.search&&(Ee=zt.Replace);let Me=V&&"preventScrollReset"in V?V.preventScrollReset===!0:void 0,nt=(V&&V.unstable_flushSync)===!0,Ze=$k({currentLocation:ke,nextLocation:le,historyAction:Ee});if(Ze){Py(Ze,{state:"blocked",location:le,proceed(){Py(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:le}),vs(L,V)},reset(){let ct=new Map(A.blockers);ct.set(Ze,Dd),qe({blockers:ct})}});return}return await Ci(Ee,le,{submission:de,pendingError:ge,preventScrollReset:Me,replace:V&&V.replace,enableViewTransition:V&&V.unstable_viewTransition,flushSync:nt})}function Ka(){if(dg(),qe({revalidation:"loading"}),A.navigation.state!=="submitting"){if(A.navigation.state==="idle"){Ci(A.historyAction,A.location,{startUninterruptedRevalidation:!0});return}Ci(j||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation})}}async function Ci(L,V,Y){H&&H.abort(),H=null,j=L,D=(Y&&Y.startUninterruptedRevalidation)===!0,Mj(A.location,A.matches),U=(Y&&Y.preventScrollReset)===!0,K=(Y&&Y.enableViewTransition)===!0;let re=a||o,de=Y&&Y.overrideNavigation,ge=oc(re,V,c),ke=(Y&&Y.flushSync)===!0,le=Iy(ge,re,V.pathname);if(le.active&&le.matches&&(ge=le.matches),!ge){let{error:Xe,notFoundMatches:dr,route:Jt}=hg(V.pathname);Kr(V,{matches:dr,loaderData:{},errors:{[Jt.id]:Xe}},{flushSync:ke});return}if(A.initialized&&!T&&RZ(A.location,V)&&!(Y&&Y.submission&&Os(Y.submission.formMethod))){Kr(V,{matches:ge},{flushSync:ke});return}H=new AbortController;let _e=jl(t.history,V,H.signal,Y&&Y.submission),Ee;if(Y&&Y.pendingError)Ee=[du(ge).route.id,{type:it.error,error:Y.pendingError}];else if(Y&&Y.submission&&Os(Y.submission.formMethod)){let Xe=await Tl(_e,V,Y.submission,ge,le.active,{replace:Y.replace,flushSync:ke});if(Xe.shortCircuited)return;if(Xe.pendingActionResult){let[dr,Jt]=Xe.pendingActionResult;if(On(Jt)&&Mm(Jt.error)&&Jt.error.status===404){H=null,Kr(V,{matches:Xe.matches,loaderData:{},errors:{[dr]:Jt.error}});return}}ge=Xe.matches||ge,Ee=Xe.pendingActionResult,de=vx(V,Y.submission),ke=!1,le.active=!1,_e=jl(t.history,_e.url,_e.signal)}let{shortCircuited:Me,matches:nt,loaderData:Ze,errors:ct}=await kj(_e,V,ge,le.active,de,Y&&Y.submission,Y&&Y.fetcherSubmission,Y&&Y.replace,Y&&Y.initialHydration===!0,ke,Ee);Me||(H=null,Kr(V,kt({matches:nt||ge},t4(Ee),{loaderData:Ze,errors:ct})))}async function Tl(L,V,Y,re,de,ge){ge===void 0&&(ge={}),dg();let ke=MZ(V,Y);if(qe({navigation:ke},{flushSync:ge.flushSync===!0}),de){let Ee=await Oy(re,V.pathname,L.signal);if(Ee.type==="aborted")return{shortCircuited:!0};if(Ee.type==="error"){let{boundaryId:Me,error:nt}=Ry(V.pathname,Ee);return{matches:Ee.partialMatches,pendingActionResult:[Me,{type:it.error,error:nt}]}}else if(Ee.matches)re=Ee.matches;else{let{notFoundMatches:Me,error:nt,route:Ze}=hg(V.pathname);return{matches:Me,pendingActionResult:[Ze.id,{type:it.error,error:nt}]}}}let le,_e=Jd(re,V);if(!_e.route.action&&!_e.route.lazy)le={type:it.error,error:Zr(405,{method:L.method,pathname:V.pathname,routeId:_e.route.id})};else if(le=(await wd("action",L,[_e],re))[0],L.signal.aborted)return{shortCircuited:!0};if(mc(le)){let Ee;return ge&&ge.replace!=null?Ee=ge.replace:Ee=JR(le.response.headers.get("Location"),new URL(L.url),c)===A.location.pathname+A.location.search,await bd(L,le,{submission:Y,replace:Ee}),{shortCircuited:!0}}if(vc(le))throw Zr(400,{type:"defer-action"});if(On(le)){let Ee=du(re,_e.route.id);return(ge&&ge.replace)!==!0&&(j=zt.Push),{matches:re,pendingActionResult:[Ee.route.id,le]}}return{matches:re,pendingActionResult:[_e.route.id,le]}}async function kj(L,V,Y,re,de,ge,ke,le,_e,Ee,Me){let nt=de||vx(V,ge),Ze=ge||ke||o4(nt),ct=!D&&(!f.v7_partialHydration||!_e);if(re){if(ct){let Dt=Dk(Me);qe(kt({navigation:nt},Dt!==void 0?{actionData:Dt}:{}),{flushSync:Ee})}let Le=await Oy(Y,V.pathname,L.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let{boundaryId:Dt,error:Sn}=Ry(V.pathname,Le);return{matches:Le.partialMatches,loaderData:{},errors:{[Dt]:Sn}}}else if(Le.matches)Y=Le.matches;else{let{error:Dt,notFoundMatches:Sn,route:Et}=hg(V.pathname);return{matches:Sn,loaderData:{},errors:{[Et.id]:Dt}}}}let Xe=a||o,[dr,Jt]=KR(t.history,A,Y,Ze,V,f.v7_partialHydration&&_e===!0,f.v7_skipActionErrorRevalidation,T,P,R,ve,ae,se,Xe,c,Me);if(pg(Le=>!(Y&&Y.some(Dt=>Dt.route.id===Le))||dr&&dr.some(Dt=>Dt.route.id===Le)),B=++F,dr.length===0&&Jt.length===0){let Le=Fk();return Kr(V,kt({matches:Y,loaderData:{},errors:Me&&On(Me[1])?{[Me[0]]:Me[1].error}:null},t4(Me),Le?{fetchers:new Map(A.fetchers)}:{}),{flushSync:Ee}),{shortCircuited:!0}}if(ct){let Le={};if(!re){Le.navigation=nt;let Dt=Dk(Me);Dt!==void 0&&(Le.actionData=Dt)}Jt.length>0&&(Le.fetchers=Tj(Jt)),qe(Le,{flushSync:Ee})}Jt.forEach(Le=>{I.has(Le.key)&&Co(Le.key),Le.controller&&I.set(Le.key,Le.controller)});let Ed=()=>Jt.forEach(Le=>Co(Le.key));H&&H.signal.addEventListener("abort",Ed);let{loaderResults:ko,fetcherResults:Pl}=await Lk(A.matches,Y,dr,Jt,L);if(L.signal.aborted)return{shortCircuited:!0};H&&H.signal.removeEventListener("abort",Ed),Jt.forEach(Le=>I.delete(Le.key));let Rl=n4([...ko,...Pl]);if(Rl){if(Rl.idx>=dr.length){let Le=Jt[Rl.idx-dr.length].key;se.add(Le)}return await bd(L,Rl.result,{replace:le}),{shortCircuited:!0}}let{loaderData:Il,errors:Gs}=ZR(A,Y,dr,ko,Me,Jt,Pl,oe);oe.forEach((Le,Dt)=>{Le.subscribe(Sn=>{(Sn||Le.done)&&oe.delete(Dt)})}),f.v7_partialHydration&&_e&&A.errors&&Object.entries(A.errors).filter(Le=>{let[Dt]=Le;return!dr.some(Sn=>Sn.route.id===Dt)}).forEach(Le=>{let[Dt,Sn]=Le;Gs=Object.assign(Gs||{},{[Dt]:Sn})});let _y=Fk(),Ny=Uk(B),My=_y||Ny||Jt.length>0;return kt({matches:Y,loaderData:Il,errors:Gs},My?{fetchers:new Map(A.fetchers)}:{})}function Dk(L){if(L&&!On(L[1]))return{[L[0]]:L[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Tj(L){return L.forEach(V=>{let Y=A.fetchers.get(V.key),re=Ld(void 0,Y?Y.data:void 0);A.fetchers.set(V.key,re)}),new Map(A.fetchers)}function Pj(L,V,Y,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(L)&&Co(L);let de=(re&&re.unstable_flushSync)===!0,ge=a||o,ke=Lw(A.location,A.matches,c,f.v7_prependBasename,Y,f.v7_relativeSplatPath,V,re==null?void 0:re.relative),le=oc(ge,ke,c),_e=Iy(le,ge,ke);if(_e.active&&_e.matches&&(le=_e.matches),!le){ki(L,V,Zr(404,{pathname:ke}),{flushSync:de});return}let{path:Ee,submission:Me,error:nt}=WR(f.v7_normalizeFormMethod,!0,ke,re);if(nt){ki(L,V,nt,{flushSync:de});return}let Ze=Jd(le,Ee);if(U=(re&&re.preventScrollReset)===!0,Me&&Os(Me.formMethod)){Rj(L,V,Ee,Ze,le,_e.active,de,Me);return}ae.set(L,{routeId:V,path:Ee}),Ij(L,V,Ee,Ze,le,_e.active,de,Me)}async function Rj(L,V,Y,re,de,ge,ke,le){dg(),ae.delete(L);function _e(Et){if(!Et.route.action&&!Et.route.lazy){let Ti=Zr(405,{method:le.formMethod,pathname:Y,routeId:V});return ki(L,V,Ti,{flushSync:ke}),!0}return!1}if(!ge&&_e(re))return;let Ee=A.fetchers.get(L);Ao(L,DZ(le,Ee),{flushSync:ke});let Me=new AbortController,nt=jl(t.history,Y,Me.signal,le);if(ge){let Et=await Oy(de,Y,nt.signal);if(Et.type==="aborted")return;if(Et.type==="error"){let{error:Ti}=Ry(Y,Et);ki(L,V,Ti,{flushSync:ke});return}else if(Et.matches){if(de=Et.matches,re=Jd(de,Y),_e(re))return}else{ki(L,V,Zr(404,{pathname:Y}),{flushSync:ke});return}}I.set(L,Me);let Ze=F,Xe=(await wd("action",nt,[re],de))[0];if(nt.signal.aborted){I.get(L)===Me&&I.delete(L);return}if(f.v7_fetcherPersist&&ve.has(L)){if(mc(Xe)||On(Xe)){Ao(L,Do(void 0));return}}else{if(mc(Xe))if(I.delete(L),B>Ze){Ao(L,Do(void 0));return}else return se.add(L),Ao(L,Ld(le)),bd(nt,Xe,{fetcherSubmission:le});if(On(Xe)){ki(L,V,Xe.error);return}}if(vc(Xe))throw Zr(400,{type:"defer-action"});let dr=A.navigation.location||A.location,Jt=jl(t.history,dr,Me.signal),Ed=a||o,ko=A.navigation.state!=="idle"?oc(Ed,A.navigation.location,c):A.matches;$e(ko,"Didn't find any matches after fetcher action");let Pl=++F;J.set(L,Pl);let Rl=Ld(le,Xe.data);A.fetchers.set(L,Rl);let[Il,Gs]=KR(t.history,A,ko,le,dr,!1,f.v7_skipActionErrorRevalidation,T,P,R,ve,ae,se,Ed,c,[re.route.id,Xe]);Gs.filter(Et=>Et.key!==L).forEach(Et=>{let Ti=Et.key,qk=A.fetchers.get(Ti),jj=Ld(void 0,qk?qk.data:void 0);A.fetchers.set(Ti,jj),I.has(Ti)&&Co(Ti),Et.controller&&I.set(Ti,Et.controller)}),qe({fetchers:new Map(A.fetchers)});let _y=()=>Gs.forEach(Et=>Co(Et.key));Me.signal.addEventListener("abort",_y);let{loaderResults:Ny,fetcherResults:My}=await Lk(A.matches,ko,Il,Gs,Jt);if(Me.signal.aborted)return;Me.signal.removeEventListener("abort",_y),J.delete(L),I.delete(L),Gs.forEach(Et=>I.delete(Et.key));let Le=n4([...Ny,...My]);if(Le){if(Le.idx>=Il.length){let Et=Gs[Le.idx-Il.length].key;se.add(Et)}return bd(Jt,Le.result)}let{loaderData:Dt,errors:Sn}=ZR(A,A.matches,Il,Ny,void 0,Gs,My,oe);if(A.fetchers.has(L)){let Et=Do(Xe.data);A.fetchers.set(L,Et)}Uk(Pl),A.navigation.state==="loading"&&Pl>B?($e(j,"Expected pending action"),H&&H.abort(),Kr(A.navigation.location,{matches:ko,loaderData:Dt,errors:Sn,fetchers:new Map(A.fetchers)})):(qe({errors:Sn,loaderData:e4(A.loaderData,Dt,ko,Sn),fetchers:new Map(A.fetchers)}),T=!1)}async function Ij(L,V,Y,re,de,ge,ke,le){let _e=A.fetchers.get(L);Ao(L,Ld(le,_e?_e.data:void 0),{flushSync:ke});let Ee=new AbortController,Me=jl(t.history,Y,Ee.signal);if(ge){let Xe=await Oy(de,Y,Me.signal);if(Xe.type==="aborted")return;if(Xe.type==="error"){let{error:dr}=Ry(Y,Xe);ki(L,V,dr,{flushSync:ke});return}else if(Xe.matches)de=Xe.matches,re=Jd(de,Y);else{ki(L,V,Zr(404,{pathname:Y}),{flushSync:ke});return}}I.set(L,Ee);let nt=F,ct=(await wd("loader",Me,[re],de))[0];if(vc(ct)&&(ct=await Q7(ct,Me.signal,!0)||ct),I.get(L)===Ee&&I.delete(L),!Me.signal.aborted){if(ve.has(L)){Ao(L,Do(void 0));return}if(mc(ct))if(B>nt){Ao(L,Do(void 0));return}else{se.add(L),await bd(Me,ct);return}if(On(ct)){ki(L,V,ct.error);return}$e(!vc(ct),"Unhandled fetcher deferred data"),Ao(L,Do(ct.data))}}async function bd(L,V,Y){let{submission:re,fetcherSubmission:de,replace:ge}=Y===void 0?{}:Y;V.response.headers.has("X-Remix-Revalidate")&&(T=!0);let ke=V.response.headers.get("Location");$e(ke,"Expected a Location header on the redirect Response"),ke=JR(ke,new URL(L.url),c);let le=Jh(A.location,ke,{_isRedirect:!0});if(r){let ct=!1;if(V.response.headers.has("X-Remix-Reload-Document"))ct=!0;else if(uA.test(ke)){const Xe=t.history.createURL(ke);ct=Xe.origin!==e.location.origin||py(Xe.pathname,c)==null}if(ct){ge?e.location.replace(ke):e.location.assign(ke);return}}H=null;let _e=ge===!0||V.response.headers.has("X-Remix-Replace")?zt.Replace:zt.Push,{formMethod:Ee,formAction:Me,formEncType:nt}=A.navigation;!re&&!de&&Ee&&Me&&nt&&(re=o4(A.navigation));let Ze=re||de;if(yZ.has(V.response.status)&&Ze&&Os(Ze.formMethod))await Ci(_e,le,{submission:kt({},Ze,{formAction:ke}),preventScrollReset:U});else{let ct=vx(le,re);await Ci(_e,le,{overrideNavigation:ct,fetcherSubmission:de,preventScrollReset:U})}}async function wd(L,V,Y,re){try{let de=await AZ(l,L,V,Y,re,i,s);return await Promise.all(de.map((ge,ke)=>{if(OZ(ge)){let le=ge.result;return{type:it.redirect,response:TZ(le,V,Y[ke].route.id,re,c,f.v7_relativeSplatPath)}}return kZ(ge)}))}catch(de){return Y.map(()=>({type:it.error,error:de}))}}async function Lk(L,V,Y,re,de){let[ge,...ke]=await Promise.all([Y.length?wd("loader",de,Y,V):[],...re.map(le=>{if(le.matches&&le.match&&le.controller){let _e=jl(t.history,le.path,le.controller.signal);return wd("loader",_e,[le.match],le.matches).then(Ee=>Ee[0])}else return Promise.resolve({type:it.error,error:Zr(404,{pathname:le.path})})})]);return await Promise.all([i4(L,Y,ge,ge.map(()=>de.signal),!1,A.loaderData),i4(L,re.map(le=>le.match),ke,re.map(le=>le.controller?le.controller.signal:null),!0)]),{loaderResults:ge,fetcherResults:ke}}function dg(){T=!0,P.push(...pg()),ae.forEach((L,V)=>{I.has(V)&&(R.add(V),Co(V))})}function Ao(L,V,Y){Y===void 0&&(Y={}),A.fetchers.set(L,V),qe({fetchers:new Map(A.fetchers)},{flushSync:(Y&&Y.flushSync)===!0})}function ki(L,V,Y,re){re===void 0&&(re={});let de=du(A.matches,V);Ty(L),qe({errors:{[de.route.id]:Y},fetchers:new Map(A.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function jk(L){return f.v7_fetcherPersist&&(we.set(L,(we.get(L)||0)+1),ve.has(L)&&ve.delete(L)),A.fetchers.get(L)||vZ}function Ty(L){let V=A.fetchers.get(L);I.has(L)&&!(V&&V.state==="loading"&&J.has(L))&&Co(L),ae.delete(L),J.delete(L),se.delete(L),ve.delete(L),R.delete(L),A.fetchers.delete(L)}function Oj(L){if(f.v7_fetcherPersist){let V=(we.get(L)||0)-1;V<=0?(we.delete(L),ve.add(L)):we.set(L,V)}else Ty(L);qe({fetchers:new Map(A.fetchers)})}function Co(L){let V=I.get(L);$e(V,"Expected fetch controller: "+L),V.abort(),I.delete(L)}function Bk(L){for(let V of L){let Y=jk(V),re=Do(Y.data);A.fetchers.set(V,re)}}function Fk(){let L=[],V=!1;for(let Y of se){let re=A.fetchers.get(Y);$e(re,"Expected fetcher: "+Y),re.state==="loading"&&(se.delete(Y),L.push(Y),V=!0)}return Bk(L),V}function Uk(L){let V=[];for(let[Y,re]of J)if(re0}function _j(L,V){let Y=A.blockers.get(L)||Dd;return Ne.get(L)!==V&&Ne.set(L,V),Y}function Vk(L){A.blockers.delete(L),Ne.delete(L)}function Py(L,V){let Y=A.blockers.get(L)||Dd;$e(Y.state==="unblocked"&&V.state==="blocked"||Y.state==="blocked"&&V.state==="blocked"||Y.state==="blocked"&&V.state==="proceeding"||Y.state==="blocked"&&V.state==="unblocked"||Y.state==="proceeding"&&V.state==="unblocked","Invalid blocker state transition: "+Y.state+" -> "+V.state);let re=new Map(A.blockers);re.set(L,V),qe({blockers:re})}function $k(L){let{currentLocation:V,nextLocation:Y,historyAction:re}=L;if(Ne.size===0)return;Ne.size>1&&fl(!1,"A router only supports one blocker at a time");let de=Array.from(Ne.entries()),[ge,ke]=de[de.length-1],le=A.blockers.get(ge);if(!(le&&le.state==="proceeding")&&ke({currentLocation:V,nextLocation:Y,historyAction:re}))return ge}function hg(L){let V=Zr(404,{pathname:L}),Y=a||o,{matches:re,route:de}=r4(Y);return pg(),{notFoundMatches:re,route:de,error:V}}function Ry(L,V){return{boundaryId:du(V.partialMatches).route.id,error:Zr(400,{type:"route-discovery",pathname:L,message:V.error!=null&&"message"in V.error?V.error:String(V.error)})}}function pg(L){let V=[];return oe.forEach((Y,re)=>{(!L||L(re))&&(Y.cancel(),V.push(re),oe.delete(re))}),V}function Nj(L,V,Y){if(g=L,x=V,m=Y||null,!b&&A.navigation===yx){b=!0;let re=Hk(A.location,A.matches);re!=null&&qe({restoreScrollPosition:re})}return()=>{g=null,x=null,m=null}}function zk(L,V){return m&&m(L,V.map(re=>GX(re,A.loaderData)))||L.key}function Mj(L,V){if(g&&x){let Y=zk(L,V);g[Y]=x()}}function Hk(L,V){if(g){let Y=zk(L,V),re=g[Y];if(typeof re=="number")return re}return null}function Iy(L,V,Y){if(u){if(y.has(Y))return{active:!1,matches:L};if(L){if(Object.keys(L[0].params).length>0)return{active:!0,matches:Y1(V,Y,c,!0)}}else return{active:!0,matches:Y1(V,Y,c,!0)||[]}}return{active:!1,matches:null}}async function Oy(L,V,Y){let re=L;for(;;){let de=a==null,ge=a||o;try{await EZ(u,V,re,ge,i,s,Be,Y)}catch(_e){return{type:"error",error:_e,partialMatches:re}}finally{de&&(o=[...o])}if(Y.aborted)return{type:"aborted"};let ke=oc(ge,V,c);if(ke)return Gk(V,y),{type:"success",matches:ke};let le=Y1(ge,V,c,!0);if(!le||re.length===le.length&&re.every((_e,Ee)=>_e.route.id===le[Ee].route.id))return Gk(V,y),{type:"success",matches:null};re=le}}function Gk(L,V){if(V.size>=p){let Y=V.values().next().value;V.delete(Y)}V.add(L)}function Dj(L){i={},a=Xh(L,s,void 0,i)}function Lj(L,V){let Y=a==null;q7(L,V,a||o,i,s),Y&&(o=[...o],qe({}))}return _={get basename(){return c},get future(){return f},get state(){return A},get routes(){return o},get window(){return e},initialize:De,subscribe:at,enableScrollRestoration:Nj,navigate:vs,fetch:Pj,revalidate:Ka,createHref:L=>t.history.createHref(L),encodeLocation:L=>t.history.encodeLocation(L),getFetcher:jk,deleteFetcher:Oj,dispose:He,getBlocker:_j,deleteBlocker:Vk,patchRoutes:Lj,_internalFetchControllers:I,_internalActiveDeferreds:oe,_internalSetRoutes:Dj},_}function xZ(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Lw(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=aZ(s||".",oZ(c,i),py(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&&!fA(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:Xc([r,u.pathname])),hy(u)}function WR(t,e,r,n){if(!n||!xZ(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=W7(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()}}}$e(typeof FormData=="function","FormData is not available in this environment");let c,l;if(n.formData)c=jw(n.formData),l=n.formData;else if(n.body instanceof FormData)c=jw(n.body),l=n.body;else if(n.body instanceof URLSearchParams)c=n.body,l=XR(c);else if(n.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(n.body),l=XR(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=Ai(r);return e&&f.search&&fA(f.search)&&c.append("index",""),f.search="?"+c,{path:hy(f),submission:u}}function bZ(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 KR(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?bZ(r,b):r,C=y?y[1].statusCode:void 0,O=o&&C&&C>=400,_=w.filter((j,U)=>{let{route:H}=j;if(H.lazy)return!0;if(H.loader==null)return!1;if(i)return typeof H.loader!="function"||H.loader.hydrate?!0:e.loaderData[H.id]===void 0&&(!e.errors||e.errors[H.id]===void 0);if(wZ(e.loaderData,e.matches[U],j)||c.some($=>$===j.route.id))return!0;let K=e.matches[U],Q=j;return QR(j,kt({currentUrl:m,currentParams:K.params,nextUrl:x,nextParams:Q.params},n,{actionResult:g,actionStatus:C,defaultShouldRevalidate:O?!1:a||m.pathname+m.search===x.pathname+x.search||m.search!==x.search||G7(K,Q)}))}),A=[];return f.forEach((j,U)=>{if(i||!r.some(D=>D.route.id===j.routeId)||u.has(U))return;let H=oc(h,j.path,p);if(!H){A.push({key:U,routeId:j.routeId,path:j.path,matches:null,match:null,controller:null});return}let K=e.fetchers.get(U),Q=Jd(H,j.path),$=!1;d.has(U)?$=!1:l.has(U)?(l.delete(U),$=!0):K&&K.state!=="idle"&&K.data===void 0?$=a:$=QR(Q,kt({currentUrl:m,currentParams:e.matches[e.matches.length-1].params,nextUrl:x,nextParams:r[r.length-1].params},n,{actionResult:g,actionStatus:C,defaultShouldRevalidate:O?!1:a})),$&&A.push({key:U,routeId:j.routeId,path:j.path,matches:H,match:Q,controller:new AbortController})}),[_,A]}function wZ(t,e,r){let n=!e||r.route.id!==e.route.id,s=t[r.route.id]===void 0;return n||s}function G7(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function QR(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function EZ(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||q7(u,f,n,s,i)}}),o.set(c,l)),l&&IZ(l)&&await l}finally{o.delete(c)}}function q7(t,e,r,n,s){if(t){var i;let o=n[t];$e(o,"No route found to patch children into: routeId = "+t);let a=Xh(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=Xh(e,s,["patch",String(r.length||"0")],n);r.push(...o)}}async function YR(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let s=r[t.id];$e(s,"No route found in manifest");let i={};for(let o in n){let c=s[o]!==void 0&&o!=="hasErrorBoundary";fl(!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&&!zX.has(o)&&(i[o]=n[o])}Object.assign(s,i),Object.assign(s,kt({},e(s),{lazy:void 0}))}function SZ(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function AZ(t,e,r,n,s,i,o,a){let c=n.reduce((f,d)=>f.add(d.route.id),new Set),l=new Set,u=await t({matches:s.map(f=>{let d=c.has(f.route.id);return kt({},f,{shouldLoad:d,resolve:p=>(l.add(f.route.id),d?CZ(e,r,f,i,o,p,a):Promise.resolve({type:it.data,result:void 0}))})}),request:r,params:s[0].params,context:a});return s.forEach(f=>$e(l.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),u.filter((f,d)=>c.has(s[d].route.id))}async function CZ(t,e,r,n,s,i,o){let a,c,l=u=>{let f,d=new Promise((y,g)=>f=g);c=()=>f(),e.signal.addEventListener("abort",c);let h=y=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+r.route.id+"]"))):u({request:e,params:r.params,context:o},...y!==void 0?[y]:[]),p;return i?p=i(y=>h(y)):p=(async()=>{try{return{type:"data",result:await h()}}catch(y){return{type:"error",result:y}}})(),Promise.race([p,d])};try{let u=r.route[t];if(r.route.lazy)if(u){let f,[d]=await Promise.all([l(u).catch(h=>{f=h}),YR(r.route,s,n)]);if(f!==void 0)throw f;a=d}else if(await YR(r.route,s,n),u=r.route[t],u)a=await l(u);else if(t==="action"){let f=new URL(e.url),d=f.pathname+f.search;throw Zr(405,{method:e.method,pathname:d,routeId:r.route.id})}else return{type:it.data,result:void 0};else if(u)a=await l(u);else{let f=new URL(e.url),d=f.pathname+f.search;throw Zr(404,{pathname:d})}$e(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:it.error,result:u}}finally{c&&e.signal.removeEventListener("abort",c)}return a}async function kZ(t){let{result:e,type:r}=t;if(K7(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 n0(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 n0(((n=e.init)==null?void 0:n.status)||500,void 0,e.data)}return{type:it.error,error:e,statusCode:Mm(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($e(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!uA.test(o)){let a=n.slice(0,n.findIndex(c=>c.route.id===r)+1);o=Lw(new URL(e.url),a,s,!0,o,i),t.headers.set("Location",o)}return t}function JR(t,e,r){if(uA.test(t)){let n=t,s=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=py(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(W7(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=jw(n.formData):i.body=n.formData}return new Request(s,i)}function jw(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function XR(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,i){let o={},a=null,c,l=!1,u={},f=n&&On(n[1])?n[1].error:void 0;return r.forEach((d,h)=>{let p=e[h].route.id;if($e(!mc(d),"Cannot handle redirect results in processLoaderData"),On(d)){let y=d.error;if(f!==void 0&&(y=f,f=void 0),a=a||{},i)a[p]=y;else{let g=du(t,p);a[g.route.id]==null&&(a[g.route.id]=y)}o[p]=void 0,l||(l=!0,c=Mm(d.error)?d.error.status:500),d.headers&&(u[p]=d.headers)}else vc(d)?(s.set(p,d.deferredData),o[p]=d.deferredData.data,d.statusCode!=null&&d.statusCode!==200&&!l&&(c=d.statusCode),d.headers&&(u[p]=d.headers)):(o[p]=d.data,d.statusCode&&d.statusCode!==200&&!l&&(c=d.statusCode),d.headers&&(u[p]=d.headers))}),f!==void 0&&n&&(a={[n[0]]:f},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:c||200,loaderHeaders:u}}function ZR(t,e,r,n,s,i,o,a){let{loaderData:c,errors:l}=PZ(e,r,n,s,a,!1);for(let u=0;un.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function r4(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 n0(t||500,a,new Error(c),!0)}function n4(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(mc(r))return{result:r,idx:e}}}function W7(t){let e=typeof t=="string"?Ai(t):t;return hy(kt({},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 K7(t.result)&&pZ.has(t.result.status)}function vc(t){return t.type===it.deferred}function On(t){return t.type===it.error}function mc(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 K7(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function NZ(t){return hZ.has(t.toLowerCase())}function Os(t){return fZ.has(t.toLowerCase())}async function i4(t,e,r,n,s,i){for(let o=0;of.route.id===c.route.id),u=l!=null&&!G7(l,c)&&(i&&i[c.route.id])!==void 0;if(vc(a)&&(s||u)){let f=n[o];$e(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await Q7(a,f,s).then(d=>{d&&(r[o]=d||r[o])})}}}async function Q7(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 fA(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Jd(t,e){let r=typeof e=="string"?Ai(e).search:e.search;if(t[t.length-1].route.index&&fA(r||""))return t[t.length-1];let n=$7(t);return n[n.length-1]}function o4(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 vx(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 MZ(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 Ld(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 DZ(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 Do(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 LZ(t,e){try{let r=t.sessionStorage.getItem(H7);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 jZ(t,e){if(e.size>0){let r={};for(let[n,s]of e)r[n]=[...s];try{t.sessionStorage.setItem(H7,JSON.stringify(r))}catch(n){fl(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** - * React Router v6.26.1 + */function Ct(){return Ct=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),Ct({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(Ct({},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(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;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=Ct({},s,e(s),{id:a});return n[a]=c,c}else{let c=Ct({},s,e(s),{id:a,children:void 0});return n[a]=c,s.children&&(c.children=Jh(s.children,e,o,n)),c}})}function lc(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=F9(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+'".')),F9(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 U9(i.path))s(i,o,c)}),e}function U9(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=U9(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 V9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function iZ(t,e){let r=V9(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=Ct({},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 $9=["post","put","patch","delete"],uZ=new Set($9),fZ=["get",...$9],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},fA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vZ=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),z9="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 L=t.detectErrorBoundary;s=V=>({hasErrorBoundary:L(V)})}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=Ct({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=lc(o,t.history.location,c),C=null;if(w==null&&!u){let L=Zr(404,{pathname:t.history.location.pathname}),{matches:V,route:Y}=n4(o);w=V,C={[Y.id]:L}}w&&!t.hydrationData&&Ry(w,o,t.history.location.pathname).active&&(w=null);let O;if(w)if(w.some(L=>L.route.lazy))O=!1;else if(!w.some(L=>L.route.loader))O=!0;else if(f.v7_partialHydration){let L=t.hydrationData?t.hydrationData.loaderData:null,V=t.hydrationData?t.hydrationData.errors:null,Y=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:L&&L[re.route.id]!==void 0||V&&V[re.route.id]!==void 0:!0;if(V){let re=w.findIndex(de=>V[de.route.id]!==void 0);O=w.slice(0,re+1).every(Y)}else O=w.every(Y)}else O=t.hydrationData!=null;else if(O=!1,w=[],f.v7_partialHydration){let L=Ry(null,o,t.history.location.pathname);L.active&&L.matches&&(w=L.matches)}let _,A={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||C,fetchers:new Map,blockers:new Map},j=zt.Pop,U=!1,H,K=!1,Q=new Map,$=null,D=!1,T=!1,P=[],R=new Set,I=new Map,F=0,B=-1,J=new Map,se=new Set,ae=new Map,Se=new Map,ve=new Set,oe=new Map,Me=new Map,Be=new Map,Pe;function De(){if(d=t.history.listen(L=>{let{action:V,location:Y,delta:re}=L;if(Pe){Pe(),Pe=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:A.location,nextLocation:Y,historyAction:V});if(de&&re!=null){let Ee=new Promise(Re=>{Pe=Re});t.history.go(re*-1),Ty(de,{state:"blocked",location:Y,proceed(){Ty(de,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),Ee.then(()=>t.history.go(re))},reset(){let Re=new Map(A.blockers);Re.set(de,Md),qe({blockers:Re})}});return}return Ai(V,Y)}),r){BZ(e,Q);let L=()=>FZ(e,Q);e.addEventListener("pagehide",L),$=()=>e.removeEventListener("pagehide",L)}return A.initialized||Ai(zt.Pop,A.location,{initialHydration:!0}),_}function ze(){d&&d(),$&&$(),h.clear(),H&&H.abort(),A.fetchers.forEach((L,V)=>ky(V)),A.blockers.forEach((L,V)=>zk(V))}function at(L){return h.add(L),()=>h.delete(L)}function qe(L,V){V===void 0&&(V={}),A=Ct({},A,L);let Y=[],re=[];f.v7_fetcherPersist&&A.fetchers.forEach((de,Ee)=>{de.state==="idle"&&(ve.has(Ee)?re.push(Ee):Y.push(Ee))}),[...h].forEach(de=>de(A,{deletedFetchers:re,unstable_viewTransitionOpts:V.viewTransitionOpts,unstable_flushSync:V.flushSync===!0})),f.v7_fetcherPersist&&(Y.forEach(de=>A.fetchers.delete(de)),re.forEach(de=>ky(de)))}function Kr(L,V,Y){var re,de;let{flushSync:Ee}=Y===void 0?{}:Y,Re=A.actionData!=null&&A.navigation.formMethod!=null&&Os(A.navigation.formMethod)&&A.navigation.state==="loading"&&((re=L.state)==null?void 0:re._isRedirect)!==!0,le;V.actionData?Object.keys(V.actionData).length>0?le=V.actionData:le=null:Re?le=A.actionData:le=null;let Ae=V.loaderData?t4(A.loaderData,V.loaderData,V.matches||[],V.errors):A.loaderData,ge=A.blockers;ge.size>0&&(ge=new Map(ge),ge.forEach((et,mt)=>ge.set(mt,Md)));let xe=U===!0||A.navigation.formMethod!=null&&Os(A.navigation.formMethod)&&((de=L.state)==null?void 0:de._isRedirect)!==!0;a&&(o=a,a=void 0),D||j===zt.Pop||(j===zt.Push?t.history.push(L,L.state):j===zt.Replace&&t.history.replace(L,L.state));let Ze;if(j===zt.Pop){let et=Q.get(A.location.pathname);et&&et.has(L.pathname)?Ze={currentLocation:A.location,nextLocation:L}:Q.has(L.pathname)&&(Ze={currentLocation:L,nextLocation:A.location})}else if(K){let et=Q.get(A.location.pathname);et?et.add(L.pathname):(et=new Set([L.pathname]),Q.set(A.location.pathname,et)),Ze={currentLocation:A.location,nextLocation:L}}qe(Ct({},V,{actionData:le,loaderData:Ae,historyAction:j,location:L,initialized:!0,navigation:vx,revalidation:"idle",restoreScrollPosition:qk(L,V.matches||A.matches),preventScrollReset:xe,blockers:ge}),{viewTransitionOpts:Ze,flushSync:Ee===!0}),j=zt.Pop,U=!1,K=!1,D=!1,T=!1,P=[]}async function vs(L,V){if(typeof L=="number"){t.history.go(L);return}let Y=jw(A.location,A.matches,c,f.v7_prependBasename,L,f.v7_relativeSplatPath,V==null?void 0:V.fromRouteId,V==null?void 0:V.relative),{path:re,submission:de,error:Ee}=QR(f.v7_normalizeFormMethod,!1,Y,V),Re=A.location,le=Yh(A.location,re,V&&V.state);le=Ct({},le,t.history.encodeLocation(le));let Ae=V&&V.replace!=null?V.replace:void 0,ge=zt.Push;Ae===!0?ge=zt.Replace:Ae===!1||de!=null&&Os(de.formMethod)&&de.formAction===A.location.pathname+A.location.search&&(ge=zt.Replace);let xe=V&&"preventScrollReset"in V?V.preventScrollReset===!0:void 0,Ze=(V&&V.unstable_flushSync)===!0,et=Hk({currentLocation:Re,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(L,V)},reset(){let mt=new Map(A.blockers);mt.set(et,Md),qe({blockers:mt})}});return}return await Ai(ge,le,{submission:de,pendingError:Ee,preventScrollReset:xe,replace:V&&V.replace,enableViewTransition:V&&V.unstable_viewTransition,flushSync:Ze})}function Ya(){if(hg(),qe({revalidation:"loading"}),A.navigation.state!=="submitting"){if(A.navigation.state==="idle"){Ai(A.historyAction,A.location,{startUninterruptedRevalidation:!0});return}Ai(j||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:K===!0})}}async function Ai(L,V,Y){H&&H.abort(),H=null,j=L,D=(Y&&Y.startUninterruptedRevalidation)===!0,Nj(A.location,A.matches),U=(Y&&Y.preventScrollReset)===!0,K=(Y&&Y.enableViewTransition)===!0;let re=a||o,de=Y&&Y.overrideNavigation,Ee=lc(re,V,c),Re=(Y&&Y.flushSync)===!0,le=Ry(Ee,re,V.pathname);if(le.active&&le.matches&&(Ee=le.matches),!Ee){let{error:We,notFoundMatches:ir,route:Jt}=pg(V.pathname);Kr(V,{matches:ir,loaderData:{},errors:{[Jt.id]:We}},{flushSync:Re});return}if(A.initialized&&!T&&RZ(A.location,V)&&!(Y&&Y.submission&&Os(Y.submission.formMethod))){Kr(V,{matches:Ee},{flushSync:Re});return}H=new AbortController;let Ae=jl(t.history,V,H.signal,Y&&Y.submission),ge;if(Y&&Y.pendingError)ge=[du(Ee).route.id,{type:it.error,error:Y.pendingError}];else if(Y&&Y.submission&&Os(Y.submission.formMethod)){let We=await Rl(Ae,V,Y.submission,Ee,le.active,{replace:Y.replace,flushSync:Re});if(We.shortCircuited)return;if(We.pendingActionResult){let[ir,Jt]=We.pendingActionResult;if(On(Jt)&&Dm(Jt.error)&&Jt.error.status===404){H=null,Kr(V,{matches:We.matches,loaderData:{},errors:{[ir]:Jt.error}});return}}Ee=We.matches||Ee,ge=We.pendingActionResult,de=mx(V,Y.submission),Re=!1,le.active=!1,Ae=jl(t.history,Ae.url,Ae.signal)}let{shortCircuited:xe,matches:Ze,loaderData:et,errors:mt}=await Cj(Ae,V,Ee,le.active,de,Y&&Y.submission,Y&&Y.fetcherSubmission,Y&&Y.replace,Y&&Y.initialHydration===!0,Re,ge);xe||(H=null,Kr(V,Ct({matches:Ze||Ee},r4(ge),{loaderData:et,errors:mt})))}async function Rl(L,V,Y,re,de,Ee){Ee===void 0&&(Ee={}),hg();let Re=LZ(V,Y);if(qe({navigation:Re},{flushSync:Ee.flushSync===!0}),de){let ge=await Iy(re,V.pathname,L.signal);if(ge.type==="aborted")return{shortCircuited:!0};if(ge.type==="error"){let{boundaryId:xe,error:Ze}=Py(V.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(V.pathname);return{matches:xe,pendingActionResult:[et.id,{type:it.error,error:Ze}]}}}let le,Ae=Yd(re,V);if(!Ae.route.action&&!Ae.route.lazy)le={type:it.error,error:Zr(405,{method:L.method,pathname:V.pathname,routeId:Ae.route.id})};else if(le=(await bd("action",A,L,[Ae],re,null))[Ae.route.id],L.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(L.url),c)===A.location.pathname+A.location.search,await Ja(L,le,!0,{submission:Y,replace:ge}),{shortCircuited:!0}}if(fa(le))throw Zr(400,{type:"defer-action"});if(On(le)){let ge=du(re,Ae.route.id);return(Ee&&Ee.replace)!==!0&&(j=zt.Push),{matches:re,pendingActionResult:[ge.route.id,le]}}return{matches:re,pendingActionResult:[Ae.route.id,le]}}async function Cj(L,V,Y,re,de,Ee,Re,le,Ae,ge,xe){let Ze=de||mx(V,Ee),et=Ee||Re||i4(Ze),mt=!D&&(!f.v7_partialHydration||!Ae);if(re){if(mt){let Mt=jk(xe);qe(Ct({navigation:Ze},Mt!==void 0?{actionData:Mt}:{}),{flushSync:ge})}let Le=await Iy(Y,V.pathname,L.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let{boundaryId:Mt,error:Sn}=Py(V.pathname,Le);return{matches:Le.partialMatches,loaderData:{},errors:{[Mt]:Sn}}}else if(Le.matches)Y=Le.matches;else{let{error:Mt,notFoundMatches:Sn,route:Dt}=pg(V.pathname);return{matches:Sn,loaderData:{},errors:{[Dt.id]:Mt}}}}let We=a||o,[ir,Jt]=YR(t.history,A,Y,et,V,f.v7_partialHydration&&Ae===!0,f.v7_skipActionErrorRevalidation,T,P,R,ve,ae,se,We,c,xe);if(yg(Le=>!(Y&&Y.some(Mt=>Mt.route.id===Le))||ir&&ir.some(Mt=>Mt.route.id===Le)),B=++F,ir.length===0&&Jt.length===0){let Le=Vk();return Kr(V,Ct({matches:Y,loaderData:{},errors:xe&&On(xe[1])?{[xe[0]]:xe[1].error}:null},r4(xe),Le?{fetchers:new Map(A.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));H&&H.signal.addEventListener("abort",wd);let{loaderResults:ki,fetcherResults:Il}=await Bk(A,Y,ir,Jt,L);if(L.signal.aborted)return{shortCircuited:!0};H&&H.signal.removeEventListener("abort",wd),Jt.forEach(Le=>I.delete(Le.key));let To=l1(ki);if(To)return await Ja(L,To.result,!0,{replace:le}),{shortCircuited:!0};if(To=l1(Il),To)return se.add(To.key),await Ja(L,To.result,!0,{replace:le}),{shortCircuited:!0};let{loaderData:Oy,errors:Ti}=e4(A,Y,ir,ki,xe,Jt,Il,oe);oe.forEach((Le,Mt)=>{Le.subscribe(Sn=>{(Sn||Le.done)&&oe.delete(Mt)})}),f.v7_partialHydration&&Ae&&A.errors&&Object.entries(A.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(B),My=_y||Ny||Jt.length>0;return Ct({matches:Y,loaderData:Oy,errors:Ti},My?{fetchers:new Map(A.fetchers)}:{})}function jk(L){if(L&&!On(L[1]))return{[L[0]]:L[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function kj(L){return L.forEach(V=>{let Y=A.fetchers.get(V.key),re=Dd(void 0,Y?Y.data:void 0);A.fetchers.set(V.key,re)}),new Map(A.fetchers)}function Tj(L,V,Y,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(L)&&ko(L);let de=(re&&re.unstable_flushSync)===!0,Ee=a||o,Re=jw(A.location,A.matches,c,f.v7_prependBasename,Y,f.v7_relativeSplatPath,V,re==null?void 0:re.relative),le=lc(Ee,Re,c),Ae=Ry(le,Ee,Re);if(Ae.active&&Ae.matches&&(le=Ae.matches),!le){Ci(L,V,Zr(404,{pathname:Re}),{flushSync:de});return}let{path:ge,submission:xe,error:Ze}=QR(f.v7_normalizeFormMethod,!0,Re,re);if(Ze){Ci(L,V,Ze,{flushSync:de});return}let et=Yd(le,ge);if(U=(re&&re.preventScrollReset)===!0,xe&&Os(xe.formMethod)){Pj(L,V,ge,et,le,Ae.active,de,xe);return}ae.set(L,{routeId:V,path:ge}),Rj(L,V,ge,et,le,Ae.active,de,xe)}async function Pj(L,V,Y,re,de,Ee,Re,le){hg(),ae.delete(L);function Ae(Dt){if(!Dt.route.action&&!Dt.route.lazy){let Pi=Zr(405,{method:le.formMethod,pathname:Y,routeId:V});return Ci(L,V,Pi,{flushSync:Re}),!0}return!1}if(!Ee&&Ae(re))return;let ge=A.fetchers.get(L);Co(L,jZ(le,ge),{flushSync:Re});let xe=new AbortController,Ze=jl(t.history,Y,xe.signal,le);if(Ee){let Dt=await Iy(de,Y,Ze.signal);if(Dt.type==="aborted")return;if(Dt.type==="error"){let{error:Pi}=Py(Y,Dt);Ci(L,V,Pi,{flushSync:Re});return}else if(Dt.matches){if(de=Dt.matches,re=Yd(de,Y),Ae(re))return}else{Ci(L,V,Zr(404,{pathname:Y}),{flushSync:Re});return}}I.set(L,xe);let et=F,We=(await bd("action",A,Ze,[re],de,L))[re.route.id];if(Ze.signal.aborted){I.get(L)===xe&&I.delete(L);return}if(f.v7_fetcherPersist&&ve.has(L)){if(xc(We)||On(We)){Co(L,Lo(void 0));return}}else{if(xc(We))if(I.delete(L),B>et){Co(L,Lo(void 0));return}else return se.add(L),Co(L,Dd(le)),Ja(Ze,We,!1,{fetcherSubmission:le});if(On(We)){Ci(L,V,We.error);return}}if(fa(We))throw Zr(400,{type:"defer-action"});let ir=A.navigation.location||A.location,Jt=jl(t.history,ir,xe.signal),wd=a||o,ki=A.navigation.state!=="idle"?lc(wd,A.navigation.location,c):A.matches;He(ki,"Didn't find any matches after fetcher action");let Il=++F;J.set(L,Il);let To=Dd(le,We.data);A.fetchers.set(L,To);let[Oy,Ti]=YR(t.history,A,ki,le,ir,!1,f.v7_skipActionErrorRevalidation,T,P,R,ve,ae,se,wd,c,[re.route.id,We]);Ti.filter(Dt=>Dt.key!==L).forEach(Dt=>{let Pi=Dt.key,Kk=A.fetchers.get(Pi),Lj=Dd(void 0,Kk?Kk.data:void 0);A.fetchers.set(Pi,Lj),I.has(Pi)&&ko(Pi),Dt.controller&&I.set(Pi,Dt.controller)}),qe({fetchers:new Map(A.fetchers)});let _y=()=>Ti.forEach(Dt=>ko(Dt.key));xe.signal.addEventListener("abort",_y);let{loaderResults:Ny,fetcherResults:My}=await Bk(A,ki,Oy,Ti,Jt);if(xe.signal.aborted)return;xe.signal.removeEventListener("abort",_y),J.delete(L),I.delete(L),Ti.forEach(Dt=>I.delete(Dt.key));let Le=l1(Ny);if(Le)return Ja(Jt,Le.result,!1);if(Le=l1(My),Le)return se.add(Le.key),Ja(Jt,Le.result,!1);let{loaderData:Mt,errors:Sn}=e4(A,ki,Oy,Ny,void 0,Ti,My,oe);if(A.fetchers.has(L)){let Dt=Lo(We.data);A.fetchers.set(L,Dt)}$k(Il),A.navigation.state==="loading"&&Il>B?(He(j,"Expected pending action"),H&&H.abort(),Kr(A.navigation.location,{matches:ki,loaderData:Mt,errors:Sn,fetchers:new Map(A.fetchers)})):(qe({errors:Sn,loaderData:t4(A.loaderData,Mt,ki,Sn),fetchers:new Map(A.fetchers)}),T=!1)}async function Rj(L,V,Y,re,de,Ee,Re,le){let Ae=A.fetchers.get(L);Co(L,Dd(le,Ae?Ae.data:void 0),{flushSync:Re});let ge=new AbortController,xe=jl(t.history,Y,ge.signal);if(Ee){let We=await Iy(de,Y,xe.signal);if(We.type==="aborted")return;if(We.type==="error"){let{error:ir}=Py(Y,We);Ci(L,V,ir,{flushSync:Re});return}else if(We.matches)de=We.matches,re=Yd(de,Y);else{Ci(L,V,Zr(404,{pathname:Y}),{flushSync:Re});return}}I.set(L,ge);let Ze=F,mt=(await bd("loader",A,xe,[re],de,L))[re.route.id];if(fa(mt)&&(mt=await dA(mt,xe.signal,!0)||mt),I.get(L)===ge&&I.delete(L),!xe.signal.aborted){if(ve.has(L)){Co(L,Lo(void 0));return}if(xc(mt))if(B>Ze){Co(L,Lo(void 0));return}else{se.add(L),await Ja(xe,mt,!1);return}if(On(mt)){Ci(L,V,mt.error);return}He(!fa(mt),"Unhandled fetcher deferred data"),Co(L,Lo(mt.data))}}async function Ja(L,V,Y,re){let{submission:de,fetcherSubmission:Ee,replace:Re}=re===void 0?{}:re;V.response.headers.has("X-Remix-Revalidate")&&(T=!0);let le=V.response.headers.get("Location");He(le,"Expected a Location header on the redirect Response"),le=XR(le,new URL(L.url),c);let Ae=Yh(A.location,le,{_isRedirect:!0});if(r){let We=!1;if(V.response.headers.has("X-Remix-Reload-Document"))We=!0;else if(fA.test(le)){const ir=t.history.createURL(le);We=ir.origin!==e.location.origin||hy(ir.pathname,c)==null}if(We){Re?e.location.replace(le):e.location.assign(le);return}}H=null;let ge=Re===!0||V.response.headers.has("X-Remix-Replace")?zt.Replace:zt.Push,{formMethod:xe,formAction:Ze,formEncType:et}=A.navigation;!de&&!Ee&&xe&&Ze&&et&&(de=i4(A.navigation));let mt=de||Ee;if(pZ.has(V.response.status)&&mt&&Os(mt.formMethod))await Ai(ge,Ae,{submission:Ct({},mt,{formAction:le}),preventScrollReset:U,enableViewTransition:Y?K:void 0});else{let We=mx(Ae,de);await Ai(ge,Ae,{overrideNavigation:We,fetcherSubmission:Ee,preventScrollReset:U,enableViewTransition:Y?K:void 0})}}async function bd(L,V,Y,re,de,Ee){let Re,le={};try{Re=await AZ(l,L,V,Y,re,de,Ee,i,s)}catch(Ae){return re.forEach(ge=>{le[ge.route.id]={type:it.error,error:Ae}}),le}for(let[Ae,ge]of Object.entries(Re))if(OZ(ge)){let xe=ge.result;le[Ae]={type:it.redirect,response:TZ(xe,Y,Ae,de,c,f.v7_relativeSplatPath)}}else le[Ae]=await kZ(ge);return le}async function Bk(L,V,Y,re,de){let Ee=L.matches,Re=bd("loader",L,de,Y,V,null),le=Promise.all(re.map(async xe=>{if(xe.matches&&xe.match&&xe.controller){let et=(await bd("loader",L,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})}})})),Ae=await Re,ge=(await le).reduce((xe,Ze)=>Object.assign(xe,Ze),{});return await Promise.all([MZ(V,Ae,de.signal,Ee,L.loaderData),DZ(V,ge,re)]),{loaderResults:Ae,fetcherResults:ge}}function hg(){T=!0,P.push(...yg()),ae.forEach((L,V)=>{I.has(V)&&(R.add(V),ko(V))})}function Co(L,V,Y){Y===void 0&&(Y={}),A.fetchers.set(L,V),qe({fetchers:new Map(A.fetchers)},{flushSync:(Y&&Y.flushSync)===!0})}function Ci(L,V,Y,re){re===void 0&&(re={});let de=du(A.matches,V);ky(L),qe({errors:{[de.route.id]:Y},fetchers:new Map(A.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Fk(L){return f.v7_fetcherPersist&&(Se.set(L,(Se.get(L)||0)+1),ve.has(L)&&ve.delete(L)),A.fetchers.get(L)||yZ}function ky(L){let V=A.fetchers.get(L);I.has(L)&&!(V&&V.state==="loading"&&J.has(L))&&ko(L),ae.delete(L),J.delete(L),se.delete(L),ve.delete(L),R.delete(L),A.fetchers.delete(L)}function Ij(L){if(f.v7_fetcherPersist){let V=(Se.get(L)||0)-1;V<=0?(Se.delete(L),ve.add(L)):Se.set(L,V)}else ky(L);qe({fetchers:new Map(A.fetchers)})}function ko(L){let V=I.get(L);He(V,"Expected fetch controller: "+L),V.abort(),I.delete(L)}function Uk(L){for(let V of L){let Y=Fk(V),re=Lo(Y.data);A.fetchers.set(V,re)}}function Vk(){let L=[],V=!1;for(let Y of se){let re=A.fetchers.get(Y);He(re,"Expected fetcher: "+Y),re.state==="loading"&&(se.delete(Y),L.push(Y),V=!0)}return Uk(L),V}function $k(L){let V=[];for(let[Y,re]of J)if(re0}function Oj(L,V){let Y=A.blockers.get(L)||Md;return Me.get(L)!==V&&Me.set(L,V),Y}function zk(L){A.blockers.delete(L),Me.delete(L)}function Ty(L,V){let Y=A.blockers.get(L)||Md;He(Y.state==="unblocked"&&V.state==="blocked"||Y.state==="blocked"&&V.state==="blocked"||Y.state==="blocked"&&V.state==="proceeding"||Y.state==="blocked"&&V.state==="unblocked"||Y.state==="proceeding"&&V.state==="unblocked","Invalid blocker state transition: "+Y.state+" -> "+V.state);let re=new Map(A.blockers);re.set(L,V),qe({blockers:re})}function Hk(L){let{currentLocation:V,nextLocation:Y,historyAction:re}=L;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,Re]=de[de.length-1],le=A.blockers.get(Ee);if(!(le&&le.state==="proceeding")&&Re({currentLocation:V,nextLocation:Y,historyAction:re}))return Ee}function pg(L){let V=Zr(404,{pathname:L}),Y=a||o,{matches:re,route:de}=n4(Y);return yg(),{notFoundMatches:re,route:de,error:V}}function Py(L,V){return{boundaryId:du(V.partialMatches).route.id,error:Zr(400,{type:"route-discovery",pathname:L,message:V.error!=null&&"message"in V.error?V.error:String(V.error)})}}function yg(L){let V=[];return oe.forEach((Y,re)=>{(!L||L(re))&&(Y.cancel(),V.push(re),oe.delete(re))}),V}function _j(L,V,Y){if(g=L,x=V,m=Y||null,!b&&A.navigation===vx){b=!0;let re=qk(A.location,A.matches);re!=null&&qe({restoreScrollPosition:re})}return()=>{g=null,x=null,m=null}}function Gk(L,V){return m&&m(L,V.map(re=>HX(re,A.loaderData)))||L.key}function Nj(L,V){if(g&&x){let Y=Gk(L,V);g[Y]=x()}}function qk(L,V){if(g){let Y=Gk(L,V),re=g[Y];if(typeof re=="number")return re}return null}function Ry(L,V,Y){if(u){if(y.has(Y))return{active:!1,matches:L};if(L){if(Object.keys(L[0].params).length>0)return{active:!0,matches:J1(V,Y,c,!0)}}else return{active:!0,matches:J1(V,Y,c,!0)||[]}}return{active:!1,matches:null}}async function Iy(L,V,Y){let re=L;for(;;){let de=a==null,Ee=a||o;try{await wZ(u,V,re,Ee,i,s,Be,Y)}catch(Ae){return{type:"error",error:Ae,partialMatches:re}}finally{de&&(o=[...o])}if(Y.aborted)return{type:"aborted"};let Re=lc(Ee,V,c);if(Re)return Wk(V,y),{type:"success",matches:Re};let le=J1(Ee,V,c,!0);if(!le||re.length===le.length&&re.every((Ae,ge)=>Ae.route.id===le[ge].route.id))return Wk(V,y),{type:"success",matches:null};re=le}}function Wk(L,V){if(V.size>=p){let Y=V.values().next().value;V.delete(Y)}V.add(L)}function Mj(L){i={},a=Jh(L,s,void 0,i)}function Dj(L,V){let Y=a==null;G9(L,V,a||o,i,s),Y&&(o=[...o],qe({}))}return _={get basename(){return c},get future(){return f},get state(){return A},get routes(){return o},get window(){return e},initialize:De,subscribe:at,enableScrollRestoration:_j,navigate:vs,fetch:Tj,revalidate:Ya,createHref:L=>t.history.createHref(L),encodeLocation:L=>t.history.encodeLocation(L),getFetcher:Fk,deleteFetcher:Ij,dispose:ze,getBlocker:Oj,deleteBlocker:zk,patchRoutes:Dj,_internalFetchControllers:I,_internalActiveDeferreds:oe,_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&&!hA(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=q9(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&&hA(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,C=y?y[1].statusCode:void 0,O=o&&C&&C>=400,_=w.filter((j,U)=>{let{route:H}=j;if(H.lazy)return!0;if(H.loader==null)return!1;if(i)return typeof H.loader!="function"||H.loader.hydrate?!0:e.loaderData[H.id]===void 0&&(!e.errors||e.errors[H.id]===void 0);if(bZ(e.loaderData,e.matches[U],j)||c.some($=>$===j.route.id))return!0;let K=e.matches[U],Q=j;return JR(j,Ct({currentUrl:m,currentParams:K.params,nextUrl:x,nextParams:Q.params},n,{actionResult:g,actionStatus:C,defaultShouldRevalidate:O?!1:a||m.pathname+m.search===x.pathname+x.search||m.search!==x.search||H9(K,Q)}))}),A=[];return f.forEach((j,U)=>{if(i||!r.some(D=>D.route.id===j.routeId)||u.has(U))return;let H=lc(h,j.path,p);if(!H){A.push({key:U,routeId:j.routeId,path:j.path,matches:null,match:null,controller:null});return}let K=e.fetchers.get(U),Q=Yd(H,j.path),$=!1;d.has(U)?$=!1:l.has(U)?(l.delete(U),$=!0):K&&K.state!=="idle"&&K.data===void 0?$=a:$=JR(Q,Ct({currentUrl:m,currentParams:e.matches[e.matches.length-1].params,nextUrl:x,nextParams:r[r.length-1].params},n,{actionResult:g,actionStatus:C,defaultShouldRevalidate:O?!1:a})),$&&A.push({key:U,routeId:j.routeId,path:j.path,matches:H,match:Q,controller:new AbortController})}),[_,A]}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 H9(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||G9(u,f,n,s,i)}}),o.set(c,l)),l&&IZ(l)&&await l}finally{o.delete(c)}}function G9(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,Ct({},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 AZ(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 Ct({},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 kZ(t){let{result:e,type:r}=t;if(W9(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"),!fA.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(fA.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(q9(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 fa(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=Ct({},l,{[y.route.id]:p.error})),t.fetchers.delete(f)}else if(xc(p))He(!1,"Unhandled fetcher revalidation redirect");else if(fa(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=Ct({},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 q9(t){let e=typeof t=="string"?Si(t):t;return dy(Ct({},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 W9(t.result)&&hZ.has(t.result.status)}function fa(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 W9(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&&!H9(u,l)&&(s&&s[l.route.id])!==void 0;fa(c)&&f&&await dA(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)&&fa(a)&&(He(o,"Expected an AbortController for revalidating fetcher deferred result"),await dA(a,o.signal,!0).then(l=>{l&&(e[s]=l)}))}}async function dA(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 hA(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&&hA(r||""))return t[t.length-1];let n=V9(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(z9);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(z9,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,8 +127,8 @@ Defaulting to \`null\`.`}var ZS="Radio",[bY,NN]=Wr(ZS),[wY,EY]=bY(ZS),MN=v.forwa * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function s0(){return s0=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},g,{params:Object.assign({},a,g.params),pathname:Xc([c,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?c:Xc([c,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,r,n);return e&&y?v.createElement(Dm.Provider,{value:{location:s0({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:zt.Pop}},y):y}function UZ(){let t=KZ(),e=Mm(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 VZ=v.createElement(UZ,null);class $Z 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(Lm.Provider,{value:this.props.routeContext},v.createElement(Z7.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zZ(t){let{routeContext:e,match:r,children:n}=t,s=v.useContext(Y7);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(Lm.Provider,{value:e},n)}function HZ(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||$e(!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||VZ,c&&(l<0&&d===0?(QZ("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(zZ,{match:f,routeContext:{outlet:u,matches:m,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?v.createElement($Z,{location:r.location,revalidation:r.revalidation,component:y,error:h,children:x(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):x()},null)}var Bw=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}(Bw||{});function GZ(t){let e=v.useContext(J7);return e||$e(!1),e}function qZ(t){let e=v.useContext(Lm);return e||$e(!1),e}function WZ(t){let e=qZ(),r=e.matches[e.matches.length-1];return r.route.id||$e(!1),r.route.id}function KZ(){var t;let e=v.useContext(Z7),r=GZ(Bw.UseRouteError),n=WZ(Bw.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}const a4={};function QZ(t,e,r){!e&&!a4[t]&&(a4[t]=!0)}function YZ(t){let{basename:e="/",children:r=null,location:n,navigationType:s=zt.Pop,navigator:i,static:o=!1,future:a}=t;dA()&&$e(!1);let c=e.replace(/^\/*/,"/"),l=v.useMemo(()=>({basename:c,navigator:i,static:o,future:s0({v7_relativeSplatPath:!1},a)}),[c,a,i,o]);typeof n=="string"&&(n=Ai(n));let{pathname:u="/",search:f="",hash:d="",state:h=null,key:p="default"}=n,y=v.useMemo(()=>{let g=py(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(X7.Provider,{value:l},v.createElement(Dm.Provider,{children:r,value:y}))}new Promise(()=>{});function JZ(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.1 + */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(J9.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(K9);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(Q9);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(J9),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;pA()&&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(Y9.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 ZS="Radio",[bY,NN]=Wr(ZS),[wY,EY]=bY(ZS),MN=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;e{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function cee(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(A=>{m?oee(A):A()},[m]),b=v.useCallback((A,j)=>{let{deletedFetchers:U,unstable_flushSync:H,unstable_viewTransitionOpts:K}=j;U.forEach($=>g.current.delete($)),A.fetchers.forEach(($,D)=>{$.data!==void 0&&g.current.set(D,$.data)});let Q=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!K||Q){H?jd(()=>i(A)):x(()=>i(A));return}if(H){jd(()=>{d&&(u&&u.resolve(),d.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:K.currentLocation,nextLocation:K.nextLocation})});let $=r.window.document.startViewTransition(()=>{jd(()=>i(A))});$.finished.finally(()=>{jd(()=>{f(void 0),h(void 0),a(void 0),l({isTransitioning:!1})})}),jd(()=>h($));return}d?(u&&u.resolve(),d.skipTransition(),y({state:A,currentLocation:K.currentLocation,nextLocation:K.nextLocation})):(a(A),l({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.nextLocation}))},[r.window,d,u,g,x]);v.useLayoutEffect(()=>r.subscribe(b),[r,b]),v.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new aee)},[c]),v.useEffect(()=>{if(u&&o&&r.window){let A=o,j=u.promise,U=r.window.document.startViewTransition(async()=>{x(()=>i(A)),await j});U.finished.finally(()=>{f(void 0),h(void 0),a(void 0),l({isTransitioning:!1})}),h(U)}},[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:A=>r.navigate(A),push:(A,j,U)=>r.navigate(A,{state:j,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(A,j,U)=>r.navigate(A,{replace:!0,state:j,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[r]),C=r.basename||"/",O=v.useMemo(()=>({router:r,navigator:w,static:!1,basename:C}),[r,w,C]),_=v.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return v.createElement(v.Fragment,null,v.createElement(Y7.Provider,{value:O},v.createElement(J7.Provider,{value:s},v.createElement(nee.Provider,{value:g.current},v.createElement(ree.Provider,{value:c},v.createElement(YZ,{basename:C,location:s.location,navigationType:s.historyAction,navigator:w,future:_},s.initialized||r.future.v7_partialHydration?v.createElement(lee,{routes:r.routes,future:r.future,state:s}):e))))),null)}const lee=v.memo(uee);function uee(t){let{routes:e,future:r,state:n}=t;return FZ(e,void 0,n,r)}var u4;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(u4||(u4={}));var f4;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(f4||(f4={}));function fee(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 e9=v.createContext(null);function dee({clientId:t,nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n,children:s}){const i=fee({nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}),o=v.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:i}),[t,i]);return ar.createElement(e9.Provider,{value:o},s)}function t9(){const t=v.useContext(e9);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}function hee(t){var e;return(e=t==null?void 0:t.clientId)!==null&&e!==void 0?e:t==null?void 0:t.client_id}const pee={large:40,medium:32,small:20};function r9({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}=t9(),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 C,O,_,A,j,U,H,K,Q;if(m)return(_=(O=(C=window==null?void 0:window.google)===null||C===void 0?void 0:C.accounts)===null||O===void 0?void 0:O.id)===null||_===void 0||_.initialize({client_id:g,callback:$=>{var D;if(!($!=null&&$.credential))return(D=b.current)===null||D===void 0?void 0:D.call(b);const{credential:T,select_by:P}=$;x.current({credential:T,clientId:hee($),select_by:P})},...p}),(U=(j=(A=window==null?void 0:window.google)===null||A===void 0?void 0:A.accounts)===null||j===void 0?void 0:j.id)===null||U===void 0||U.renderButton(y.current,{type:s,theme:i,size:o,text:a,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d}),r&&((Q=(K=(H=window==null?void 0:window.google)===null||H===void 0?void 0:H.accounts)===null||K===void 0?void 0:K.id)===null||Q===void 0||Q.prompt(w.current)),()=>{var $,D,T;r&&((T=(D=($=window==null?void 0:window.google)===null||$===void 0?void 0:$.accounts)===null||D===void 0?void 0:D.id)===null||T===void 0||T.cancel())}},[g,m,r,s,i,o,a,c,l,u,f]),ar.createElement("div",{...h,ref:y,style:{height:pee[o],...h==null?void 0:h.style}})}function yee(){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 n9({flow:t="implicit",scope:e="",onSuccess:r,onError:n,onNonOAuthError:s,overrideScope:i,state:o,...a}){const{clientId:c,scriptLoadedSuccessfully:l}=t9(),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,C;if(b.error)return(w=d.current)===null||w===void 0?void 0:w.call(d,b);(C=f.current)===null||C===void 0||C.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 s9={},jm={},yy={};Object.defineProperty(yy,"__esModule",{value:!0});yy.default=void 0;var vee=v;function mee(t){(0,vee.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 gee=mee;yy.default=gee;var vy={},Bm={};Object.defineProperty(Bm,"__esModule",{value:!0});Bm.default=void 0;var xee=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})})},bee=xee;Bm.default=bee;Object.defineProperty(vy,"__esModule",{value:!0});vy.default=void 0;var wee=Eee(Bm);function Eee(t){return t&&t.__esModule?t:{default:t}}var See="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,wee.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})},Cee={APPLE_SCRIPT_SRC:See,signIn:Aee};vy.default=Cee;Object.defineProperty(jm,"__esModule",{value:!0});jm.default=void 0;var Ws=hA(v),kee=hA(yy),d4=hA(vy),Tee=["onSuccess","onError","skipScript","authOptions","iconProps","render","uiType","className","noDefaultStyle","buttonExtraChildren"];function hA(t){return t&&t.__esModule?t:{default:t}}function o0(){return o0=Object.assign||function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Oee(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 _ee=` + */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(A=>{m?cee(A):A()},[m]),b=v.useCallback((A,j)=>{let{deletedFetchers:U,unstable_flushSync:H,unstable_viewTransitionOpts:K}=j;U.forEach($=>g.current.delete($)),A.fetchers.forEach(($,D)=>{$.data!==void 0&&g.current.set(D,$.data)});let Q=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!K||Q){H?Ld(()=>i(A)):x(()=>i(A));return}if(H){Ld(()=>{d&&(u&&u.resolve(),d.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:K.currentLocation,nextLocation:K.nextLocation})});let $=r.window.document.startViewTransition(()=>{Ld(()=>i(A))});$.finished.finally(()=>{Ld(()=>{f(void 0),h(void 0),a(void 0),l({isTransitioning:!1})})}),Ld(()=>h($));return}d?(u&&u.resolve(),d.skipTransition(),y({state:A,currentLocation:K.currentLocation,nextLocation:K.nextLocation})):(a(A),l({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.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 A=o,j=u.promise,U=r.window.document.startViewTransition(async()=>{x(()=>i(A)),await j});U.finished.finally(()=>{f(void 0),h(void 0),a(void 0),l({isTransitioning:!1})}),h(U)}},[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:A=>r.navigate(A),push:(A,j,U)=>r.navigate(A,{state:j,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(A,j,U)=>r.navigate(A,{replace:!0,state:j,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[r]),C=r.basename||"/",O=v.useMemo(()=>({router:r,navigator:w,static:!1,basename:C}),[r,w,C]),_=v.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return v.createElement(v.Fragment,null,v.createElement(K9.Provider,{value:O},v.createElement(Q9.Provider,{value:s},v.createElement(iee.Provider,{value:g.current},v.createElement(see.Provider,{value:c},v.createElement(XZ,{basename:C,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 X9=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(X9.Provider,{value:o},s)}function Z9(){const t=v.useContext(X9);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 e7({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}=Z9(),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 C,O,_,A,j,U,H,K,Q;if(m)return(_=(O=(C=window==null?void 0:window.google)===null||C===void 0?void 0:C.accounts)===null||O===void 0?void 0:O.id)===null||_===void 0||_.initialize({client_id:g,callback:$=>{var D;if(!($!=null&&$.credential))return(D=b.current)===null||D===void 0?void 0:D.call(b);const{credential:T,select_by:P}=$;x.current({credential:T,clientId:yee($),select_by:P})},...p}),(U=(j=(A=window==null?void 0:window.google)===null||A===void 0?void 0:A.accounts)===null||j===void 0?void 0:j.id)===null||U===void 0||U.renderButton(y.current,{type:s,theme:i,size:o,text:a,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d}),r&&((Q=(K=(H=window==null?void 0:window.google)===null||H===void 0?void 0:H.accounts)===null||K===void 0?void 0:K.id)===null||Q===void 0||Q.prompt(w.current)),()=>{var $,D,T;r&&((T=(D=($=window==null?void 0:window.google)===null||$===void 0?void 0:$.accounts)===null||D===void 0?void 0:D.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 t7({flow:t="implicit",scope:e="",onSuccess:r,onError:n,onNonOAuthError:s,overrideScope:i,state:o,...a}){const{clientId:c,scriptLoadedSuccessfully:l}=Z9(),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,C;if(b.error)return(w=d.current)===null||w===void 0?void 0:w.call(d,b);(C=f.current)===null||C===void 0||C.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 r7={},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=Aee(Fm);function Aee(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",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:Cee,signIn:kee};yy.default=Tee;Object.defineProperty(Bm,"__esModule",{value:!0});Bm.default=void 0;var qs=yA(v),Pee=yA(py),f4=yA(yy),Ree=["onSuccess","onError","skipScript","authOptions","iconProps","render","uiType","className","noDefaultStyle","buttonExtraChildren"];function yA(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,56 +162,56 @@ Defaulting to \`null\`.`}var ZS="Radio",[bY,NN]=Wr(ZS),[wY,EY]=bY(ZS),MN=v.forwa background-color: #000; color: #FFF; border-color: #FFF; -}`.replace(/ {2}|\n/g,""),Nee=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=Iee(e,Tee);(0,kee.default)(i?null:d4.default.APPLE_SCRIPT_SRC);var m=function(w){w&&(w.preventDefault(),w.stopPropagation()),d4.default.signIn({authOptions:o,onSuccess:r,onError:n})},x=Pee({children:Ws.default.createElement(Ws.default.Fragment,null,Ws.default.createElement("svg",o0({width:"24px",height:"44px",viewBox:"0 0 24 44"},a),Ws.default.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},Ws.default.createElement("rect",{fill:u==="light"?"#FFF":"#000",x:"0",y:"0",width:"24",height:"44"}),Ws.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):Ws.default.createElement(Ws.default.Fragment,null,Ws.default.createElement("button",o0({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:Ws.default.createElement("style",null,_ee))},Mee=Nee;jm.default=Mee;(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(jm),r=s(vy),n=s(yy);function s(o){return o&&o.__esModule?o:{default:o}}var i=e.default;t.default=i})(s9);const i9=J2(s9);var Dee="_1csw4y80 _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8";const o9=t=>{const{value:e,digits:r=6,onChange:n,disabled:s=!1}=t,i=v.useMemo(()=>p4(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(G,{gap:"2",children:p4(0,r).map(l=>k.jsxs(v.Fragment,{children:[l===r/2&&k.jsx("span",{}),k.jsx(G,{as:"input",className:Dee,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))})},p4=(t,e)=>Array.from({length:e-t},(r,n)=>n+t),a9=()=>k.jsxs(G,{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"})]}),c9="6.13.2";function Lee(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&&Lee(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 pA(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=${c9}`),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 X(t,e,r,n){if(!t)throw Lt(e,r,n)}function M(t,e,r,n){X(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function l9(t,e,r){r==null&&(r=""),r&&(r=": "+r),X(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),X(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const jee=["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 u9(t){X(jee.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function Va(t,e,r){if(r==null&&(r=""),t!==e){let n=r,s="new";r&&(n+=".",s+=" "+r),X(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function f9(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]+y4[s&15]}return r}function ot(t){return"0x"+t.map(e=>ne(e).substring(2)).join("")}function Ru(t){return mt(t,!0)?(t.length-2)/2:fe(t).length}function xt(t,e,r){const n=fe(t);return r!=null&&r>n.length&&X(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),ne(n.slice(e??0,r??n.length))}function d9(t,e,r){const n=fe(t);X(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 dl(t,e){return d9(t,e,!0)}function Bee(t,e){return d9(t,e,!1)}const Um=BigInt(0),Ms=BigInt(1),pu=9007199254740991;function a0(t,e){const r=Vm(t,"value"),n=BigInt(Ie(e,"width"));if(X(r>>n===Um,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ms){const s=(Ms<=-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 Vm(t,e){const r=ye(t,e);return X(r>=Um,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const v4="0123456789abcdef";function my(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=v4[r>>4],e+=v4[r&15];return BigInt(e)}return ye(t)}function Ie(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 Ie(BigInt(t),e)}catch(r){M(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}M(!1,"invalid numeric value",e||"value",t)}function Fee(t){return Ie(my(t))}function mo(t,e){let n=Vm(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const s=Ie(e,"width");for(X(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 qee(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),v9(t,e,r))}const Wee=Object.freeze({error:Gee,ignore:v9,replace:qee});function Kee(t,e){e==null&&(e=Wee.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&&(u9(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 Qee(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function l0(t,e){return Qee(Kee(t,e))}function m9(t){async function e(r,n){X(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const s=r.url.split(":")[0].toLowerCase();X(s==="http"||s==="https",`unsupported protocol ${s}`,"UNSUPPORTED_OPERATION",{info:{protocol:s},operation:"request"}),X(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 Yee=12,Jee=250;let m4=m9();const Xee=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Zee=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let mx=!1;async function g9(t,e){try{const r=t.match(Xee);if(!r)throw new Error("invalid data");return new wa(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?zee(r[3]):tte(r[3]))}catch{return new wa(599,"BAD REQUEST (invalid data: URI)",{},null,new go(t))}}function x9(t){async function e(r,n){try{const s=r.match(Zee);if(!s)throw new Error("invalid link");return new go(`${t}${s[2]}`)}catch{return new wa(599,"BAD REQUEST (invalid IPFS URI)",{},null,new go(r))}}return e}const u1={data:g9,ipfs:x9("https://gateway.ipfs.io/ipfs/")},b9=new WeakMap;var Ac,Go;class ete{constructor(e){q(this,Ac,void 0);q(this,Go,void 0);N(this,Ac,[]),N(this,Go,!1),b9.set(e,()=>{if(!S(this,Go)){N(this,Go,!0);for(const r of S(this,Ac))setTimeout(()=>{r()},0);N(this,Ac,[])}})}addListener(e){X(!S(this,Go),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),S(this,Ac).push(e)}get cancelled(){return S(this,Go)}checkSignal(){X(!this.cancelled,"cancelled","CANCELLED",{})}}Ac=new WeakMap,Go=new WeakMap;function f1(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var Bu,Fu,As,Ui,Uu,Vu,ir,kn,Vi,Cc,kc,Tc,ei,Cs,qo,Pc,Xd;const M0=class M0{constructor(e){q(this,Pc);q(this,Bu,void 0);q(this,Fu,void 0);q(this,As,void 0);q(this,Ui,void 0);q(this,Uu,void 0);q(this,Vu,void 0);q(this,ir,void 0);q(this,kn,void 0);q(this,Vi,void 0);q(this,Cc,void 0);q(this,kc,void 0);q(this,Tc,void 0);q(this,ei,void 0);q(this,Cs,void 0);q(this,qo,void 0);N(this,Vu,String(e)),N(this,Bu,!1),N(this,Fu,!0),N(this,As,{}),N(this,Ui,""),N(this,Uu,3e5),N(this,Cs,{slotInterval:Jee,maxAttempts:Yee}),N(this,qo,null)}get url(){return S(this,Vu)}set url(e){N(this,Vu,String(e))}get body(){return S(this,ir)==null?null:new Uint8Array(S(this,ir))}set body(e){if(e==null)N(this,ir,void 0),N(this,kn,void 0);else if(typeof e=="string")N(this,ir,Sr(e)),N(this,kn,"text/plain");else if(e instanceof Uint8Array)N(this,ir,e),N(this,kn,"application/octet-stream");else if(typeof e=="object")N(this,ir,Sr(JSON.stringify(e))),N(this,kn,"application/json");else throw new Error("invalid body")}hasBody(){return S(this,ir)!=null}get method(){return S(this,Ui)?S(this,Ui):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),N(this,Ui,String(e).toUpperCase())}get headers(){const e=Object.assign({},S(this,As));return S(this,Vi)&&(e.authorization=`Basic ${Hee(Sr(S(this,Vi)))}`),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,As)[String(e).toLowerCase()]=String(r)}clearHeaders(){N(this,As,{})}[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,Cc)||null}set preflightFunc(e){N(this,Cc,e)}get processFunc(){return S(this,kc)||null}set processFunc(e){N(this,kc,e)}get retryFunc(){return S(this,Tc)||null}set retryFunc(e){N(this,Tc,e)}get getUrlFunc(){return S(this,qo)||m4}set getUrlFunc(e){N(this,qo,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(S(this,Cs).slotInterval=e.slotInterval),e.maxAttempts!=null&&(S(this,Cs).maxAttempts=e.maxAttempts)}send(){return X(S(this,ei)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),N(this,ei,new ete(this)),ee(this,Pc,Xd).call(this,0,g4()+this.timeout,0,this,new wa(0,"",{},null,this))}cancel(){X(S(this,ei)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=b9.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();X(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 M0(e);return s.method="GET",s.allowGzip=this.allowGzip,s.timeout=this.timeout,N(s,As,Object.assign({},S(this,As))),S(this,ir)&&N(s,ir,new Uint8Array(S(this,ir))),N(s,kn,S(this,kn)),s}clone(){const e=new M0(this.url);return N(e,Ui,S(this,Ui)),S(this,ir)&&N(e,ir,S(this,ir)),N(e,kn,S(this,kn)),N(e,As,Object.assign({},S(this,As))),N(e,Vi,S(this,Vi)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),N(e,Cc,S(this,Cc)),N(e,kc,S(this,kc)),N(e,Tc,S(this,Tc)),N(e,Cs,Object.assign({},S(this,Cs))),N(e,qo,S(this,qo)),e}static lockConfig(){mx=!0}static getGateway(e){return u1[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(mx)throw new Error("gateways locked");u1[e]=r}static registerGetUrl(e){if(mx)throw new Error("gateways locked");m4=e}static createGetUrlFunc(e){return m9()}static createDataGateway(){return g9}static createIpfsGatewayFunc(e){return x9(e)}};Bu=new WeakMap,Fu=new WeakMap,As=new WeakMap,Ui=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,ir=new WeakMap,kn=new WeakMap,Vi=new WeakMap,Cc=new WeakMap,kc=new WeakMap,Tc=new WeakMap,ei=new WeakMap,Cs=new WeakMap,qo=new WeakMap,Pc=new WeakSet,Xd=async function(e,r,n,s,i){var u,f,d;if(e>=S(this,Cs).maxAttempts)return i.makeServerError("exceeded maximum retry limit");X(g4()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:s}),n>0&&await rte(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in u1){const h=await u1[a](o.url,f1(S(s,ei)));if(h instanceof wa){let p=h;if(this.processFunc){f1(S(s,ei));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,f1(S(s,ei)));let l=new wa(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),Pc,Xd).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,Cs).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(),Pc,Xd).call(f,e+1,r,p,s,l)}if(this.processFunc){f1(S(s,ei));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,Cs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return h.stall>=0&&(p=h.stall),ee(d=o.clone(),Pc,Xd).call(d,e+1,r,p,s,l)}}return l};let go=M0;var Sp,Ap,Cp,Tn,$u,Rc;const Ik=class Ik{constructor(e,r,n,s,i){q(this,Sp,void 0);q(this,Ap,void 0);q(this,Cp,void 0);q(this,Tn,void 0);q(this,$u,void 0);q(this,Rc,void 0);N(this,Sp,e),N(this,Ap,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,Rc,{message:""})}toString(){return``}get statusCode(){return S(this,Sp)}get statusMessage(){return S(this,Ap)}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?"":l0(S(this,Tn))}catch{X(!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{X(!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,Rc).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=S(this,Rc);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=l0(S(this,Tn)))}catch{}X(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r,info:{requestUrl:n,responseBody:s,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};Sp=new WeakMap,Ap=new WeakMap,Cp=new WeakMap,Tn=new WeakMap,$u=new WeakMap,Rc=new WeakMap;let wa=Ik;function g4(){return new Date().getTime()}function tte(t){return Sr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function rte(t){return new Promise(e=>setTimeout(e,t))}const nte=BigInt(-1),xs=BigInt(0),vu=BigInt(1),ste=BigInt(5),Bl={};let Iu="0000";for(;Iu.length<80;)Iu+=Iu;function Ya(t){let e=Iu;for(;e.length=-s&&txs?t=a0(gc(t,n),n):t=-a0(gc(-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 ite(t,e){let r="";t0?n*=Ya(s):s<0&&(r*=Ya(-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,Ri).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=ste*Ya(r-1);let s=this.value+n;const i=Ya(r);return s=s/i*i,Bd(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=Ya(a);X(o%c===xs,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=Ya(-a));return Bd(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=gx(r);let i=n[2]||"0",o=n[3]||"";for(;o.length{X(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=x4(t,e+1,n);return r(e+1+n+s),b4(t,e,e+1+n,n+s)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),b4(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const s=x4(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:ote(t[e])}}function $m(t){const e=fe(t,"data"),r=w9(e,0);return M(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function w4(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function E9(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(i){n=n.concat(E9(i))}),n.length<=55)return n.unshift(192+n.length),n;const s=w4(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=w4(e.length);return r.unshift(183+r.length),r.concat(e)}const E4="0123456789abcdef";function hl(t){let e="0x";for(const r of E9(t))e+=E4[r>>4],e+=E4[r&15];return e}const S9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function yA(t,e){let r=18;if(typeof e=="string"){const n=S9.indexOf(e);M(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Ie(e,"unit"));return u0.fromValue(t,r,{decimals:r,width:512}).toString()}function Zh(t,e){M(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=S9.indexOf(e);M(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Ie(e,"unit"));return u0.fromString(t,{decimals:r,width:512}).value}function ate(t){return yA(t,18)}function S4(t){return Zh(t,18)}function cte(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,Hw=new Uint8Array(rn),lte=["then"],d1={},A9=new WeakMap;function ac(t){return A9.get(t)}function A4(t,e){A9.set(t,e)}function Fd(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}function Gw(t,e,r){return t.indexOf(null)>=0?e.map((n,s)=>n instanceof Uf?Gw(ac(n),n,r):n):t.reduce((n,s,i)=>{let o=e.getValue(s);return s in n||(r&&o instanceof Uf&&(o=Gw(ac(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!==d1&&(s=r,i=[],o=!1);super(s.length);q(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(A4(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=Ie(u,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const p=l[h];return p instanceof Error&&Fd(`index ${h}`,p),p}if(lte.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 A4(c,ac(this)),c}toArray(r){const n=[];return this.forEach((s,i)=>{s instanceof Error&&Fd(`index ${i}`,s),r&&s instanceof mu&&(s=s.toArray(r)),n.push(s)}),n}toObject(r){const n=ac(this);return n.reduce((s,i,o)=>(X(i!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),Gw(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=ac(this),i=[],o=[];for(let a=r;a{S(this,zi)[e]=C4(r)}}}zi=new WeakMap,Ic=new WeakMap,Hu=new WeakSet,J1=function(e){return S(this,zi).push(e),N(this,Ic,S(this,Ic)+e.length),e.length};var un,Pn,Oc,_c,Wo,Ip,Kw,D0,C9;const Ok=class Ok{constructor(e,r,n){q(this,Ip);q(this,D0);z(this,"allowLoose");q(this,un,void 0);q(this,Pn,void 0);q(this,Oc,void 0);q(this,_c,void 0);q(this,Wo,void 0);me(this,{allowLoose:!!r}),N(this,un,br(e)),N(this,Oc,0),N(this,_c,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 Ok(S(this,un).slice(S(this,Pn)+e),this.allowLoose,S(this,Wo));return N(r,_c,this),r}readBytes(e,r){let n=ee(this,D0,C9).call(this,0,e,!!r);return ee(this,Ip,Kw).call(this,e),N(this,Pn,S(this,Pn)+n.length),n.slice(0,e)}readValue(){return my(this.readBytes(rn))}readIndex(){return Fee(this.readBytes(rn))}};un=new WeakMap,Pn=new WeakMap,Oc=new WeakMap,_c=new WeakMap,Wo=new WeakMap,Ip=new WeakSet,Kw=function(e){var r;if(S(this,_c))return ee(r=S(this,_c),Ip,Kw).call(r,e);N(this,Oc,S(this,Oc)+e),X(S(this,Wo)<1||S(this,Oc)<=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,Oc),dataLength:this.dataLength}})},D0=new WeakSet,C9=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:X(!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 Ww=Ok;function Nn(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function vA(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 k9(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 T9(t,e){vA(t);const r=e.outputLen;if(t.lengtht instanceof Uint8Array,X1=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),Z1=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Ks=(t,e)=>t<<32-e|t>>>e,ute=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!ute)throw new Error("Non little-endian hardware is not supported");const fte=async()=>{};async function k4(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(!P9(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class mA{clone(){return this._cloneInto()}}const pte={}.toString;function R9(t,e){if(e!==void 0&&pte.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function zm(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 yte(t=32){if(xx&&typeof xx.getRandomValues=="function")return xx.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class I9 extends mA{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,k9(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 I9(t,e).update(r).digest();Hm.create=(t,e)=>new I9(t,e);function vte(t,e,r,n){k9(t);const s=R9({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=Hm.create(t,c),d=f._cloneInto().update(l);return{c:i,dkLen:o,asyncTick:a,DK:u,PRF:f,PRFSalt:d}}function mte(t,e,r,n,s){return t.destroy(),e.destroy(),n&&n.destroy(),s.fill(0),r}function gA(t,e,r,n){const{c:s,dkLen:i,DK:o,PRF:a,PRFSalt:c}=vte(t,e,r,n);let l;const u=new Uint8Array(4),f=Z1(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 xA extends mA{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=Z1(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,bte=(t,e,r)=>t&e^t&r^e&r,wte=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]),Po=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ro=new Uint32Array(64);class Ete extends xA{constructor(){super(64,32,8,!1),this.A=Po[0]|0,this.B=Po[1]|0,this.C=Po[2]|0,this.D=Po[3]|0,this.E=Po[4]|0,this.F=Po[5]|0,this.G=Po[6]|0,this.H=Po[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)Ro[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){const d=Ro[f-15],h=Ro[f-2],p=Ks(d,7)^Ks(d,18)^d>>>3,y=Ks(h,17)^Ks(h,19)^h>>>10;Ro[f]=y+Ro[f-7]+p+Ro[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=Ks(a,6)^Ks(a,11)^Ks(a,25),h=u+d+xte(a,c,l)+wte[f]+Ro[f]|0,y=(Ks(n,2)^Ks(n,13)^Ks(n,22))+bte(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(){Ro.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const dd=zm(()=>new Ete),h1=BigInt(2**32-1),Qw=BigInt(32);function O9(t,e=!1){return e?{h:Number(t&h1),l:Number(t>>Qw&h1)}:{h:Number(t>>Qw&h1)|0,l:Number(t&h1)|0}}function _9(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,Cte=(t,e,r)=>t<<32-r|e>>>r,kte=(t,e,r)=>t>>>r|e<<32-r,Tte=(t,e,r)=>t<<32-r|e>>>r,Pte=(t,e,r)=>t<<64-r|e>>>r-32,Rte=(t,e,r)=>t>>>r-32|e<<64-r,Ite=(t,e)=>e,Ote=(t,e)=>t,N9=(t,e,r)=>t<>>32-r,M9=(t,e,r)=>e<>>32-r,D9=(t,e,r)=>e<>>64-r,L9=(t,e,r)=>t<>>64-r;function _te(t,e,r,n){const s=(e>>>0)+(n>>>0);return{h:t+r+(s/2**32|0)|0,l:s|0}}const Nte=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Mte=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Dte=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Lte=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,jte=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),Bte=(t,e,r,n,s,i)=>e+r+n+s+i+(t/2**32|0)|0,Fte={fromBig:O9,split:_9,toBig:Ste,shrSH:Ate,shrSL:Cte,rotrSH:kte,rotrSL:Tte,rotrBH:Pte,rotrBL:Rte,rotr32H:Ite,rotr32L:Ote,rotlSH:N9,rotlSL:M9,rotlBH:D9,rotlBL:L9,add:_te,add3L:Nte,add3H:Mte,add4L:Dte,add4H:Lte,add5H:Bte,add5L:jte},je=Fte,[Ute,Vte]=(()=>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))))(),Io=new Uint32Array(80),Oo=new Uint32Array(80);class $te extends xA{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)Io[b]=e.getUint32(r),Oo[b]=e.getUint32(r+=4);for(let b=16;b<80;b++){const w=Io[b-15]|0,C=Oo[b-15]|0,O=je.rotrSH(w,C,1)^je.rotrSH(w,C,8)^je.shrSH(w,C,7),_=je.rotrSL(w,C,1)^je.rotrSL(w,C,8)^je.shrSL(w,C,7),A=Io[b-2]|0,j=Oo[b-2]|0,U=je.rotrSH(A,j,19)^je.rotrBH(A,j,61)^je.shrSH(A,j,6),H=je.rotrSL(A,j,19)^je.rotrBL(A,j,61)^je.shrSL(A,j,6),K=je.add4L(_,H,Oo[b-7],Oo[b-16]),Q=je.add4H(K,O,U,Io[b-7],Io[b-16]);Io[b]=Q|0,Oo[b]=K|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),C=je.rotrSL(f,d,14)^je.rotrSL(f,d,18)^je.rotrBL(f,d,41),O=f&h^~f&y,_=d&p^~d&g,A=je.add5L(x,C,_,Vte[b],Oo[b]),j=je.add5H(A,m,w,O,Ute[b],Io[b]),U=A|0,H=je.rotrSH(n,s,28)^je.rotrBH(n,s,34)^je.rotrBH(n,s,39),K=je.rotrSL(n,s,28)^je.rotrBL(n,s,34)^je.rotrBL(n,s,39),Q=n&i^n&a^i&a,$=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,U|0),l=a|0,u=c|0,a=i|0,c=o|0,i=n|0,o=s|0;const D=je.add3L(U,K,$);n=je.add3H(D,j,H,Q),s=D|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(){Io.fill(0),Oo.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 bA=zm(()=>new $te);function zte(){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 T4=zte(),P4=T4.crypto||T4.msCrypto;function Hte(t){switch(t){case"sha256":return dd.create();case"sha512":return bA.create()}M(!1,"invalid hashing algorithm name","algorithm",t)}function Gte(t,e){const r={sha256:dd,sha512:bA}[t];return M(r!=null,"invalid hmac algorithm","algorithm",t),Hm.create(r,e)}function qte(t,e,r,n,s){const i={sha256:dd,sha512:bA}[s];return M(i!=null,"invalid pbkdf2 algorithm","algorithm",s),gA(i,t,e,{c:r,dkLen:n})}function Wte(t){X(P4!=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 P4.getRandomValues(e),e}let j9=!1;const B9=function(t,e,r){return Gte(t,e).update(r).digest()};let F9=B9;function hd(t,e,r){const n=fe(e,"key"),s=fe(r,"data");return ne(F9(t,n,s))}hd._=B9;hd.lock=function(){j9=!0};hd.register=function(t){if(j9)throw new Error("computeHmac is locked");F9=t};Object.freeze(hd);const[U9,V9,$9]=[[],[],[]],Kte=BigInt(0),Ud=BigInt(1),Qte=BigInt(2),Yte=BigInt(7),Jte=BigInt(256),Xte=BigInt(113);for(let t=0,e=Ud,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],U9.push(2*(5*n+r)),V9.push((t+1)*(t+2)/2%64);let s=Kte;for(let i=0;i<7;i++)e=(e<>Yte)*Xte)%Jte,e&Qte&&(s^=Ud<<(Ud<r>32?D9(t,e,r):N9(t,e,r),I4=(t,e,r)=>r>32?L9(t,e,r):M9(t,e,r);function tre(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=R4(l,u,1)^r[a],d=I4(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=V9[o],c=R4(s,i,a),l=I4(s,i,a),u=U9[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]^=Zte[n],t[1]^=ere[n]}r.fill(0)}class wA extends mA{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=X1(this.state)}keccak(){tre(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(T9(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 wA(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 rre=(t,e,r)=>zm(()=>new wA(e,t,r)),nre=rre(1,136,256/8);let z9=!1;const H9=function(t){return nre(t)};let G9=H9;function Ct(t){const e=fe(t,"data");return ne(G9(e))}Ct._=H9;Ct.lock=function(){z9=!0};Ct.register=function(t){if(z9)throw new TypeError("keccak256 is locked");G9=t};Object.freeze(Ct);const sre=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),q9=Uint8Array.from({length:16},(t,e)=>e),ire=q9.map(t=>(9*t+5)%16);let EA=[q9],SA=[ire];for(let t=0;t<4;t++)for(let e of[EA,SA])e.push(e[t].map(r=>sre[r]));const W9=[[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)),ore=EA.map((t,e)=>t.map(r=>W9[e][r])),are=SA.map((t,e)=>t.map(r=>W9[e][r])),cre=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),lre=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),p1=(t,e)=>t<>>32-e;function O4(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 y1=new Uint32Array(16);class ure extends xA{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)y1[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=cre[h],g=lre[h],m=EA[h],x=SA[h],b=ore[h],w=are[h];for(let C=0;C<16;C++){const O=p1(n+O4(h,i,a,l)+y1[m[C]]+y,b[C])+f|0;n=f,f=l,l=p1(a,10)|0,a=i,i=O}for(let C=0;C<16;C++){const O=p1(s+O4(p,o,c,u)+y1[x[C]]+g,w[C])+d|0;s=d,d=u,u=p1(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(){y1.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const fre=zm(()=>new ure);let K9=!1;const Q9=function(t){return fre(t)};let Y9=Q9;function pd(t){const e=fe(t,"data");return ne(Y9(e))}pd._=Q9;pd.lock=function(){K9=!0};pd.register=function(t){if(K9)throw new TypeError("ripemd160 is locked");Y9=t};Object.freeze(pd);let J9=!1;const X9=function(t,e,r,n,s){return qte(t,e,r,n,s)};let Z9=X9;function $a(t,e,r,n,s){const i=fe(t,"password"),o=fe(e,"salt");return ne(Z9(i,o,r,n,s))}$a._=X9;$a.lock=function(){J9=!0};$a.register=function(t){if(J9)throw new Error("pbkdf2 is locked");Z9=t};Object.freeze($a);let eM=!1;const tM=function(t){return new Uint8Array(Wte(t))};let rM=tM;function ao(t){return rM(t)}ao._=tM;ao.lock=function(){eM=!0};ao.register=function(t){if(eM)throw new Error("randomBytes is locked");rM=t};Object.freeze(ao);const Qe=(t,e)=>t<>>32-e;function _4(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++],C=t[e++]^r[n++],O=o,_=a,A=c,j=l,U=u,H=f,K=d,Q=h,$=p,D=y,T=g,P=m,R=x,I=b,F=w,B=C;for(let J=0;J<8;J+=2)U^=Qe(O+R|0,7),$^=Qe(U+O|0,9),R^=Qe($+U|0,13),O^=Qe(R+$|0,18),D^=Qe(H+_|0,7),I^=Qe(D+H|0,9),_^=Qe(I+D|0,13),H^=Qe(_+I|0,18),F^=Qe(T+K|0,7),A^=Qe(F+T|0,9),K^=Qe(A+F|0,13),T^=Qe(K+A|0,18),j^=Qe(B+P|0,7),Q^=Qe(j+B|0,9),P^=Qe(Q+j|0,13),B^=Qe(P+Q|0,18),_^=Qe(O+j|0,7),A^=Qe(_+O|0,9),j^=Qe(A+_|0,13),O^=Qe(j+A|0,18),K^=Qe(H+U|0,7),Q^=Qe(K+H|0,9),U^=Qe(Q+K|0,13),H^=Qe(U+Q|0,18),P^=Qe(T+D|0,7),$^=Qe(P+T|0,9),D^=Qe($+P|0,13),T^=Qe(D+$|0,18),R^=Qe(B+F|0,7),I^=Qe(R+B|0,9),F^=Qe(I+R|0,13),B^=Qe(F+I|0,18);s[i++]=o+O|0,s[i++]=a+_|0,s[i++]=c+A|0,s[i++]=l+j|0,s[i++]=u+U|0,s[i++]=f+H|0,s[i++]=d+K|0,s[i++]=h+Q|0,s[i++]=p+$|0,s[i++]=y+D|0,s[i++]=g+T|0,s[i++]=m+P|0,s[i++]=x+R|0,s[i++]=b+I|0,s[i++]=w+F|0,s[i++]=C+B|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),_4(r,i,t,e+=16,r,o)}function nM(t,e,r){const n=R9({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=gA(dd,t,e,{c:1,dkLen:f*o}),y=X1(p),g=X1(new Uint8Array(f*s)),m=X1(new Uint8Array(f));let x=()=>{};if(u){const b=2*s*o,w=Math.max(Math.floor(b/1e4),1);let C=0;x=()=>{C++,u&&(!(C%w)||C===b)&&u(C/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 sM(t,e,r,n,s){const i=gA(dd,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),s.fill(0),i}function dre(t,e,r){const{N:n,r:s,p:i,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:f,blockMixCb:d}=nM(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 k4(n,h,()=>{const m=l[y+a-16]%n;for(let x=0;xt instanceof Uint8Array,yre=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function zf(t){if(!qm(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rn+s.length,0));let r=0;return t.forEach(n=>{if(!qm(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function mre(t,e){if(t.length!==e.length)return!1;for(let r=0;rpM;t>>=Gm,e+=1);return e}function bre(t,e){return t>>BigInt(e)&Gm}const wre=(t,e,r)=>t|(r?Gm:pM)<(pre<new Uint8Array(t),N4=t=>Uint8Array.from(t);function vM(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=bx(t),s=bx(t),i=0;const o=()=>{n.fill(1),s.fill(0),i=0},a=(...f)=>r(s,n,...f),c=(f=bx())=>{s=a(N4([0]),f),n=a(),f.length!==0&&(s=a(N4([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 Ere={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 gy(t,e,r={}){const n=(s,i,o)=>{const a=Ere[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 Sre=Object.freeze(Object.defineProperty({__proto__:null,bitGet:bre,bitLen:xre,bitMask:TA,bitSet:wre,bytesToHex:zf,bytesToNumberBE:Zc,bytesToNumberLE:CA,concatBytes:ep,createHmacDrbg:vM,ensureBytes:Ss,equalBytes:mre,hexToBytes:Hf,hexToNumber:AA,numberToBytesBE:Gf,numberToBytesLE:kA,numberToHexUnpadded:yM,numberToVarBytesBE:vre,utf8ToBytes:gre,validateObject:gy},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ur=BigInt(0),Kt=BigInt(1),cc=BigInt(2),Are=BigInt(3),Yw=BigInt(4),M4=BigInt(5),D4=BigInt(8);BigInt(9);BigInt(16);function dn(t,e){const r=t%e;return r>=ur?r:e+r}function Cre(t,e,r){if(r<=ur||e 0");if(r===Kt)return ur;let n=Kt;for(;e>ur;)e&Kt&&(n=n*t%r),t=t*t%r,e>>=Kt;return n}function qn(t,e,r){let n=t;for(;e-- >ur;)n*=n,n%=r;return n}function Jw(t,e){if(t===ur||e<=ur)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=dn(t,e),n=e,s=ur,i=Kt;for(;r!==ur;){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 kre(t){const e=(t-Kt)/cc;let r,n,s;for(r=t-Kt,n=0;r%cc===ur;r/=cc,n++);for(s=cc;s(n[s]="function",n),e);return gy(t,r)}function Ire(t,e,r){if(r 0");if(r===ur)return t.ONE;if(r===Kt)return e;let n=t.ONE,s=e;for(;r>ur;)r&Kt&&(n=t.mul(n,s)),s=t.sqr(s),r>>=Kt;return n}function Ore(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 mM(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function _re(t,e,r=!1,n={}){if(t<=ur)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:s,nByteLength:i}=mM(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=Tre(t),a=Object.freeze({ORDER:t,BITS:s,BYTES:i,MASK:TA(s),ZERO:ur,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 ur<=c&&cc===ur,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)=>Ire(a,c,l),div:(c,l)=>dn(c*Jw(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Jw(c,t),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>Ore(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?kA(c,i):Gf(c,i),fromBytes:c=>{if(c.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${c.length}`);return r?CA(c):Zc(c)}});return Object.freeze(a)}function gM(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 xM(t){const e=gM(t);return e+Math.ceil(e/2)}function Nre(t,e,r=!1){const n=t.length,s=gM(e),i=xM(e);if(n<16||n1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const o=r?Zc(t):CA(t),a=dn(o,e-Kt)+Kt;return r?kA(a,s):Gf(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Mre=BigInt(0),wx=BigInt(1);function Dre(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>Mre;)i&wx&&(o=o.add(a)),a=a.double(),i>>=wx;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+=wx);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 bM(t){return Rre(t.Fp),gy(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...mM(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Lre(t){const e=bM(t);gy(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:jre,hexToBytes:Bre}=Sre,xc={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=xc;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:jre(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=xc,r=typeof t=="string"?Bre(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}=xc._parseInt(r.subarray(2)),{d:o,l:a}=xc._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}`}},Zi=BigInt(0),ss=BigInt(1);BigInt(2);const L4=BigInt(3);BigInt(4);function Fre(t){const e=Lre(t),{Fp:r}=e,n=e.toBytes||((p,y,g)=>{const m=y.toAffine();return ep(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"&&Zir.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:C}=y,O=r.eql(r.mul(g,C),r.mul(b,x)),_=r.eql(r.mul(m,C),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,L4),{px:x,py:b,pz:w}=this;let C=r.ZERO,O=r.ZERO,_=r.ZERO,A=r.mul(x,x),j=r.mul(b,b),U=r.mul(w,w),H=r.mul(x,b);return H=r.add(H,H),_=r.mul(x,w),_=r.add(_,_),C=r.mul(y,_),O=r.mul(m,U),O=r.add(C,O),C=r.sub(j,O),O=r.add(j,O),O=r.mul(C,O),C=r.mul(H,C),_=r.mul(m,_),U=r.mul(y,U),H=r.sub(A,U),H=r.mul(y,H),H=r.add(H,_),_=r.add(A,A),A=r.add(_,A),A=r.add(A,U),A=r.mul(A,H),O=r.add(O,A),U=r.mul(b,w),U=r.add(U,U),A=r.mul(U,H),C=r.sub(C,A),_=r.mul(U,j),_=r.add(_,_),_=r.add(_,_),new f(C,O,_)}add(y){u(y);const{px:g,py:m,pz:x}=this,{px:b,py:w,pz:C}=y;let O=r.ZERO,_=r.ZERO,A=r.ZERO;const j=e.a,U=r.mul(e.b,L4);let H=r.mul(g,b),K=r.mul(m,w),Q=r.mul(x,C),$=r.add(g,m),D=r.add(b,w);$=r.mul($,D),D=r.add(H,K),$=r.sub($,D),D=r.add(g,x);let T=r.add(b,C);return D=r.mul(D,T),T=r.add(H,Q),D=r.sub(D,T),T=r.add(m,x),O=r.add(w,C),T=r.mul(T,O),O=r.add(K,Q),T=r.sub(T,O),A=r.mul(j,D),O=r.mul(U,Q),A=r.add(O,A),O=r.sub(K,A),A=r.add(K,A),_=r.mul(O,A),K=r.add(H,H),K=r.add(K,H),Q=r.mul(j,Q),D=r.mul(U,D),K=r.add(K,Q),Q=r.sub(H,Q),Q=r.mul(j,Q),D=r.add(D,Q),H=r.mul(K,D),_=r.add(_,H),H=r.mul(T,D),O=r.mul($,O),O=r.sub(O,H),H=r.mul($,K),A=r.mul(T,A),A=r.add(A,H),new f(O,_,A)}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===Zi)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:C}=m.splitScalar(y),O=g,_=g,A=this;for(;b>Zi||C>Zi;)b&ss&&(O=O.add(A)),C&ss&&(_=_.add(A)),A=A.double(),b>>=ss,C>>=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:C,k2neg:O,k2:_}=b.splitScalar(g);let{p:A,f:j}=this.wNAF(C),{p:U,f:H}=this.wNAF(_);A=h.constTimeNegate(w,A),U=h.constTimeNegate(O,U),U=new f(r.mul(U.px,b.beta),U.py,U.pz),m=A.add(U),x=j.add(H)}else{const{p:w,f:C}=this.wNAF(g);m=w,x=C}return f.normalizeZ([m,x])[0]}multiplyAndAddUnsafe(y,g,m){const x=f.BASE,b=(C,O)=>O===Zi||O===ss||!C.equals(x)?C.multiplyUnsafe(O):C.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),C=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:C}}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=Dre(f,e.endo?Math.ceil(d/2):d);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:o}}function Ure(t){const e=bM(t);return gy(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function Vre(t){const e=Ure(t),{Fp:r,n}=e,s=r.BYTES+1,i=2*r.BYTES+1;function o(D){return Zizf(Gf(D,e.nByteLength));function p(D){const T=n>>ss;return D>T}function y(D){return p(D)?a(-D):D}const g=(D,T,P)=>Zc(D.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}=xc.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,F=_(Ss("msgHash",T));if(I==null||![0,1,2,3].includes(I))throw new Error("recovery id invalid");const B=I===2||I===3?P+e.n:P;if(B>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const J=I&1?"03":"02",se=l.fromHex(J+h(B)),ae=c(B),we=a(-F*ae),ve=a(R*ae),oe=l.BASE.multiplyAndAddUnsafe(se,we,ve);if(!oe)throw new Error("point at infinify");return oe.assertValidity(),oe}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 xc.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Hf(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const x={isValidPrivateKey(D){try{return u(D),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const D=xM(e.n);return Nre(e.randomBytes(D),e.n)},precompute(D=8,T=l.BASE){return T._setWindowSize(D),T.multiply(BigInt(3)),T}};function b(D,T=!0){return l.fromPrivateKey(D).toRawBytes(T)}function w(D){const T=D instanceof Uint8Array,P=typeof D=="string",R=(T||P)&&D.length;return T?R===s||R===i:P?R===2*s||R===2*i:D instanceof l}function C(D,T,P=!0){if(w(D))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(D)).toRawBytes(P)}const O=e.bits2int||function(D){const T=Zc(D),P=D.length*8-e.nBitLength;return P>0?T>>BigInt(P):T},_=e.bits2int_modN||function(D){return a(O(D))},A=TA(e.nBitLength);function j(D){if(typeof D!="bigint")throw new Error("bigint expected");if(!(Zi<=D&&DBe in P))throw new Error("sign() legacy options not supported");const{hash:R,randomBytes:I}=e;let{lowS:F,prehash:B,extraEntropy:J}=P;F==null&&(F=!0),D=Ss("msgHash",D),B&&(D=Ss("prehashed msgHash",R(D)));const se=_(D),ae=u(T),we=[j(ae),j(se)];if(J!=null){const Be=J===!0?I(r.BYTES):J;we.push(Ss("extraEntropy",Be))}const ve=ep(...we),oe=se;function Ne(Be){const Re=O(Be);if(!d(Re))return;const De=c(Re),He=l.BASE.multiply(Re).toAffine(),at=a(He.x);if(at===Zi)return;const qe=a(De*a(oe+at*ae));if(qe===Zi)return;let Kr=(He.x===at?0:2)|Number(He.y&ss),vs=qe;return F&&p(qe)&&(vs=y(qe),Kr^=1),new m(at,vs,Kr)}return{seed:ve,k2sig:Ne}}const H={lowS:e.lowS,prehash:!1},K={lowS:e.lowS,prehash:!1};function Q(D,T,P=H){const{seed:R,k2sig:I}=U(D,T,P),F=e;return vM(F.hash.outputLen,F.nByteLength,F.hmac)(R,I)}l.BASE._setWindowSize(8);function $(D,T,P,R=K){var He;const I=D;if(T=Ss("msgHash",T),P=Ss("publicKey",P),"strict"in R)throw new Error("options.strict was renamed to lowS");const{lowS:F,prehash:B}=R;let J,se;try{if(typeof I=="string"||I instanceof Uint8Array)try{J=m.fromDER(I)}catch(at){if(!(at instanceof xc.Err))throw at;J=m.fromCompact(I)}else if(typeof I=="object"&&typeof I.r=="bigint"&&typeof I.s=="bigint"){const{r:at,s:qe}=I;J=new m(at,qe)}else throw new Error("PARSE");se=l.fromHex(P)}catch(at){if(at.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(F&&J.hasHighS())return!1;B&&(T=e.hash(T));const{r:ae,s:we}=J,ve=_(T),oe=c(we),Ne=a(ve*oe),Be=a(ae*oe),Re=(He=l.BASE.multiplyAndAddUnsafe(se,Ne,Be))==null?void 0:He.toAffine();return Re?a(Re.x)===ae:!1}return{CURVE:e,getPublicKey:b,getSharedSecret:C,sign:Q,verify:$,ProjectivePoint:l,Signature:m,utils:x}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function $re(t){return{hash:t,hmac:(e,...r)=>Hm(t,e,hte(...r)),randomBytes:yte}}function zre(t,e){const r=n=>Vre({...t,...$re(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wM=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),j4=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Hre=BigInt(1),Xw=BigInt(2),B4=(t,e)=>(t+e/Xw)/e;function Gre(t){const e=wM,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,Xw,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,C=qn(w,n,e)*l%e,O=qn(C,Xw,e);if(!Zw.eql(Zw.sqr(O),t))throw new Error("Cannot find square root");return O}const Zw=_re(wM,void 0,void 0,{sqrt:Gre}),Lo=zre({a:BigInt(0),b:BigInt(7),Fp:Zw,n:j4,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=j4,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Hre*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,o=BigInt("0x100000000000000000000000000000000"),a=B4(i*t,e),c=B4(-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);Lo.ProjectivePoint;const pl="0x0000000000000000000000000000000000000000",F4="0x0000000000000000000000000000000000000000000000000000000000000000",qre=`Ethereum Signed Message: -`,U4=BigInt(0),V4=BigInt(1),$4=BigInt(2),z4=BigInt(27),H4=BigInt(28),v1=BigInt(35),Fl={};function G4(t){return dl($r(t),32)}var Gu,qu,Wu,Nc;const bs=class bs{constructor(e,r,n,s){q(this,Gu,void 0);q(this,qu,void 0);q(this,Wu,void 0);q(this,Nc,void 0);Va(e,Fl,"Signature"),N(this,Gu,r),N(this,qu,n),N(this,Wu,s),N(this,Nc,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=Ie(e,"value");M(r===27||r===28,"invalid v","v",e),N(this,Wu,r)}get networkV(){return S(this,Nc)}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,Nc,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==z4||r==H4?U4:(M(r>=v1,"invalid EIP-155 v","v",e),(r-v1)/$4)}static getChainIdV(e,r){return ye(e)*$4+BigInt(35+r-27)}static getNormalizedV(e){const r=ye(e);return r===U4||r===z4?27:r===V4||r===H4?28:(M(r>=v1,"invalid v","v",e),r&V4?27:28)}static from(e){function r(l,u){M(l,u,"signature",e)}if(e==null)return new bs(Fl,F4,F4,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=G4(n),i=function(l,u){if(l!=null)return G4(l);if(u!=null){r(mt(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>=v1?d:void 0,v:bs.getNormalizedV(d)}}if(u!=null)return r(mt(u,32),"invalid yParityAndS"),{v:fe(u)[0]&128?28:27};if(f!=null){switch(Ie(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,Nc,o),r(e.yParity==null||Ie(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,Nc=new WeakMap;let Vs=bs;var Hi;const lc=class lc{constructor(e){q(this,Hi,void 0);M(Ru(e)===32,"invalid private key","privateKey","[REDACTED]"),N(this,Hi,ne(e))}get privateKey(){return S(this,Hi)}get publicKey(){return lc.computePublicKey(S(this,Hi))}get compressedPublicKey(){return lc.computePublicKey(S(this,Hi),!0)}sign(e){M(Ru(e)===32,"invalid digest length","digest",e);const r=Lo.sign(br(e),br(S(this,Hi)),{lowS:!0});return Vs.from({r:mo(r.r,32),s:mo(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=lc.computePublicKey(e);return ne(Lo.getSharedSecret(br(S(this,Hi)),fe(r),!1))}static computePublicKey(e,r){let n=fe(e,"key");if(n.length===32){const i=Lo.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=Lo.ProjectivePoint.fromHex(n);return ne(s.toRawBytes(r))}static recoverPublicKey(e,r){M(Ru(e)===32,"invalid digest length","digest",e);const n=Vs.from(r);let s=Lo.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=Lo.ProjectivePoint.fromHex(lc.computePublicKey(e).substring(2)),i=Lo.ProjectivePoint.fromHex(lc.computePublicKey(r).substring(2));return"0x"+s.add(i).toHex(!!n)}};Hi=new WeakMap;let xi=lc;const Wre=BigInt(0),Kre=BigInt(36);function q4(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 PA={};for(let t=0;t<10;t++)PA[String(t)]=String(t);for(let t=0;t<26;t++)PA[String.fromCharCode(65+t)]=String(10+t);const W4=15;function Qre(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>PA[n]).join("");for(;e.length>=W4;){let n=e.substring(0,W4);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 Yre=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function Jre(t){t=t.toLowerCase();let e=Wre;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,Mc)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return S(this,Mc)===!0?-1:S(this,Mc)===!1?this.value.length:null}static from(e,r){return new Di(Mi,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 Ye(e,1)}static bytes2(e){return Ye(e,2)}static bytes3(e){return Ye(e,3)}static bytes4(e){return Ye(e,4)}static bytes5(e){return Ye(e,5)}static bytes6(e){return Ye(e,6)}static bytes7(e){return Ye(e,7)}static bytes8(e){return Ye(e,8)}static bytes9(e){return Ye(e,9)}static bytes10(e){return Ye(e,10)}static bytes11(e){return Ye(e,11)}static bytes12(e){return Ye(e,12)}static bytes13(e){return Ye(e,13)}static bytes14(e){return Ye(e,14)}static bytes15(e){return Ye(e,15)}static bytes16(e){return Ye(e,16)}static bytes17(e){return Ye(e,17)}static bytes18(e){return Ye(e,18)}static bytes19(e){return Ye(e,19)}static bytes20(e){return Ye(e,20)}static bytes21(e){return Ye(e,21)}static bytes22(e){return Ye(e,22)}static bytes23(e){return Ye(e,23)}static bytes24(e){return Ye(e,24)}static bytes25(e){return Ye(e,25)}static bytes26(e){return Ye(e,26)}static bytes27(e){return Ye(e,27)}static bytes28(e){return Ye(e,28)}static bytes29(e){return Ye(e,29)}static bytes30(e){return Ye(e,30)}static bytes31(e){return Ye(e,31)}static bytes32(e){return Ye(e,32)}static address(e){return new Di(Mi,"address",e)}static bool(e){return new Di(Mi,"bool",!!e)}static bytes(e){return new Di(Mi,"bytes",e)}static string(e){return new Di(Mi,"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 Di(Mi,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===K4}static dereference(e,r){if(Di.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Mc=new WeakMap;let zr=Di;class ene extends So{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=zr.dereference(r,"string");try{n=Je(n)}catch(s){return this._throwError(s.message,r)}return e.writeValue(n)}decode(e){return Je(mo(e.readValue(),20))}}class tne extends So{constructor(r){super(r.name,r.type,"_",r.dynamic);z(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 SM(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 X(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),X(!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 qw,i=new qw,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 AM(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 rne extends So{constructor(r,n,s){const i=r.type+"["+(n>=0?n:"")+"]",o=n===-1||r.dynamic;super("array",i,s,o);z(this,"coder");z(this,"length");me(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let s=0;so||s<-(o+lne))&&this._throwError("value out-of-bounds",n),s=h9(s,8*rn)}else(sgc(i,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(s)}decode(r){let n=gc(r.readValue(),this.size*8);return this.signed&&(n=a0(n,this.size*8)),n}}class dne extends CM{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Sr(zr.dereference(r,"string")))}decode(e){return l0(super.decode(e))}}class m1 extends So{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);z(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 SM(r,this.coders,s)}decode(r){return AM(r,this.coders)}}function Ar(t){return Ct(Sr(t))}var hne="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 Q4=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),Y4=4;function pne(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),s=1,i=[0,1];for(let C=1;C>--c&1}const f=31,d=2**f,h=d>>>1,p=h>>1,y=d-1;let g=0;for(let C=0;C1;){let U=O+_>>>1;C>>1|u(),A=A<<1^h,j=(j^h)<<1|h|1;x=A,b=1+j-A}let w=n-4;return m.map(C=>{switch(C-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 C-1}})}function yne(t){let e=0;return()=>t[e++]}function kM(t){return yne(pne(vne(t)))}function vne(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 mne(t){return t&1?~t>>1:t>>1}function gne(t,e){let r=Array(t);for(let n=0,s=0;n{let e=tp(t);if(e.length)return e})}function PM(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(xne(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(bne(r,t))}return e.flat()}function rp(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function RM(t,e,r){let n=Array(t).fill().map(()=>[]);for(let s=0;sn[o].push(i));return n}function xne(t,e){let r=1+e(),n=e(),s=rp(e);return RM(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 bne(t,e){let r=1+e();return RM(r,1+t,e).map(s=>[s[0],s.slice(1)])}function wne(t){let e=[],r=tp(t);return s(n([]),[]),e;function n(i){let o=t(),a=rp(()=>{let c=tp(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 Ene(t){return t.toString(16).toUpperCase().padStart(2,"0")}function IM(t){return`{${Ene(t)}}`}function Sne(t){let e=[];for(let r=0,n=t.length;r>24&255}function NM(t){return t&16777215}let e2,J4,t2,ev;function One(){let t=kM(Cne);e2=new Map(TM(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),J4=new Set(tp(t)),t2=new Map,ev=new Map;for(let[e,r]of PM(t)){if(!J4.has(e)&&r.length==2){let[n,s]=r,i=ev.get(n);i||(i=new Map,ev.set(n,i)),i.set(s,e)}t2.set(e,r.reverse())}}function MM(t){return t>=np&&t=f0&&t=d0&&eh0&&e0&&s(h0+l)}else{let o=t2.get(i);o?r.push(...o):s(i)}if(!r.length)break;i=r.pop()}if(n&&e.length>1){let i=Zd(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=_ne(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 LM(t){return DM(t).map(NM)}function Mne(t){return Nne(DM(t))}const X4=45,jM=".",BM=65039,FM=1,y0=t=>Array.from(t);function sp(t,e){return t.P.has(e)||t.Q.has(e)}class Dne extends Array{get is_emoji(){return!0}}let r2,UM,bc,n2,VM,_u,Sx,ql,sc,Z4,s2;function RA(){if(r2)return;let t=kM(hne);const e=()=>tp(t),r=()=>new Set(e()),n=(u,f)=>f.forEach(d=>u.add(d));r2=new Map(PM(t)),UM=r(),bc=e(),n2=new Set(e().map(u=>bc[u])),bc=new Set(bc),VM=r(),r();let s=TM(t),i=t();const o=()=>{let u=new Set;return e().forEach(f=>n(u,s[f])),n(u,e()),u};_u=rp(u=>{let f=rp(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}}}),Sx=r(),ql=new Map;let a=e().concat(y0(Sx)).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),Sx.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=>sp(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=>y0(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)}}sc=new Set;let c=new Set;const l=u=>sc.has(u)?c.add(u):sc.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 sc)!ql.has(u)&&!c.has(u)&&ql.set(u,FM);n(sc,LM(sc)),Z4=wne(t).map(u=>Dne.from(u)).sort(Ane),s2=new Map;for(let u of Z4){let f=[s2];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===BM?f.push(...h):f=h}for(let d of f)d.V=u}}function IA(t){return($M(t)?"":`${OA(Wm([t]))} `)+IM(t)}function OA(t){return`"${t}"‎`}function Lne(t){if(t.length>=4&&t[2]==X4&&t[3]==X4)throw new Error(`invalid label extension: "${qf(t.slice(0,4))}"`)}function jne(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function Bne(t){let e=t[0],r=Q4.get(e);if(r)throw bh(`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=Sne(s),o={input:i,offset:n};n+=i.length+1;try{let a=o.tokens=qne(i,e,r),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(jne(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))Lne(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(bc.has(u[0]))throw bh("leading combining mark");for(let y=1;yo.has(a)):y0(o),!r.length)return}else n.push(s)}if(r){for(let s of r)if(n.every(i=>sp(s,i)))throw new Error(`whole-script confusable: ${t.N}/${s.N}`)}}function zne(t){let e=_u;for(let r of t){let n=e.filter(s=>sp(s,r));if(!n.length)throw _u.some(s=>sp(s,r))?HM(e[0],r):zM(r);if(e=n,n.length==1)break}return e}function Hne(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 ${OA(Wm(e,63))}: ${s}`)}return qf(n)}).join(jM)}function zM(t){return new Error(`disallowed character: ${IA(t)}`)}function HM(t,e){let r=IA(e),n=_u.find(s=>s.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function bh(t){return new Error(`illegal placement: ${t}`)}function Gne(t,e){for(let r of e)if(!sp(t,r))throw HM(t,r);if(t.M){let r=LM(e);for(let n=1,s=r.length;nY4)throw new Error(`excessive non-spacing marks: ${OA(Wm(r.slice(n-1,i)))} (${i-n}/${Y4})`);n=i}}}function qne(t,e,r){let n=[],s=[];for(t=t.slice().reverse();t.length;){let i=Kne(t);if(i)s.length&&(n.push(e(s)),s=[]),n.push(r(i));else{let o=t.pop();if(sc.has(o))s.push(o);else{let a=r2.get(o);if(a)s.push(...a);else if(!UM.has(o))throw zM(o)}}}return s.length&&n.push(e(s)),n}function Wne(t){return t.filter(e=>e!=BM)}function Kne(t,e){let r=s2,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 GM=new Uint8Array(32);GM.fill(0);function e3(t){return M(t.length!==0,"invalid ENS name; empty component","comp",t),t}function qM(t){const e=Sr(Qne(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:Je(t),storageKeys:e.map((r,n)=>(M(mt(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function kl(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 xy(t){let e;return typeof t=="string"?e=xi.computePublicKey(t,!1):e=t.publicKey,Je(Ct("0x"+e.substring(4)).substring(26))}function Jne(t,e){return xy(xi.recoverPublicKey(t,e))}const cr=BigInt(0),Xne=BigInt(2),Zne=BigInt(27),ese=BigInt(28),tse=BigInt(35),rse=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Cx=4096*32;function t3(t,e){let r=t.toString(16);for(;r.length<2;)r="0"+r;return r+=ys(e).substring(4),"0x"+r}function Km(t){return t==="0x"?null:Je(t)}function _A(t,e){try{return kl(t)}catch(r){M(!1,r.message,e,t)}}function by(t,e){return t==="0x"?0:Ie(t,e)}function Qt(t,e){if(t==="0x")return cr;const r=ye(t,e);return M(r<=rse,"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 NA(t){return kl(t).map(e=>[e.address,e.storageKeys])}function nse(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",hl(n)])}var ti,Ku,Qu,Yu,Ju,Xu,Zu,ef,tf,rf,nf,sf,Dc,Ko,Gi,Qo,of,tv;const Li=class Li{constructor(){q(this,of);q(this,ti,void 0);q(this,Ku,void 0);q(this,Qu,void 0);q(this,Yu,void 0);q(this,Ju,void 0);q(this,Xu,void 0);q(this,Zu,void 0);q(this,ef,void 0);q(this,tf,void 0);q(this,rf,void 0);q(this,nf,void 0);q(this,sf,void 0);q(this,Dc,void 0);q(this,Ko,void 0);q(this,Gi,void 0);q(this,Qo,void 0);N(this,ti,null),N(this,Ku,null),N(this,Yu,0),N(this,Ju,cr),N(this,Xu,null),N(this,Zu,null),N(this,ef,null),N(this,Qu,"0x"),N(this,tf,cr),N(this,rf,cr),N(this,nf,null),N(this,sf,null),N(this,Dc,null),N(this,Ko,null),N(this,Qo,null),N(this,Gi,null)}get type(){return S(this,ti)}set type(e){switch(e){case null:N(this,ti,null);break;case 0:case"legacy":N(this,ti,0);break;case 1:case"berlin":case"eip-2930":N(this,ti,1);break;case 2:case"london":case"eip-1559":N(this,ti,2);break;case 3:case"cancun":case"eip-4844":N(this,ti,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?pl:e}set to(e){N(this,Ku,e==null?null:Je(e))}get nonce(){return S(this,Yu)}set nonce(e){N(this,Yu,Ie(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)?cr: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?cr: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?cr: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:Vs.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:kl(e))}get maxFeePerBlobGas(){const e=S(this,Dc);return e==null&&this.type===3?cr:e}set maxFeePerBlobGas(e){N(this,Dc,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,Dc)!=null||S(this,Ko);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&X(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),X(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),X(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 Li.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 Li;if(typeof e=="string"){const n=fe(e);if(n[0]>=127)return Li.from(sse(n));switch(n[0]){case 1:return Li.from(cse(n));case 2:return Li.from(ose(n));case 3:return Li.from(use(n))}X(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Li;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=Vs.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}};ti=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,Dc=new WeakMap,Ko=new WeakMap,Gi=new WeakMap,Qo=new WeakMap,of=new WeakSet,tv=function(e,r){X(!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 ise(this,n);case 1:return lse(this,n);case 2:return ase(this,n);case 3:return fse(this,n,r?this.blobs:null)}X(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let ip=Li;function dse(t){return typeof t=="string"&&(t=Sr(t)),Ct(ot([Sr(qre),Sr(String(t.length)),t]))}const WM=new Uint8Array(32);WM.fill(0);const hse=BigInt(-1),KM=BigInt(0),QM=BigInt(1),pse=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function yse(t){const e=fe(t),r=e.length%32;return r?ot([e,WM.slice(r)]):ne(e)}const vse=mo(QM,32),mse=mo(KM,32),r3={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},kx=["name","version","chainId","verifyingContract","salt"];function n3(t){return function(e){return M(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const gse={name:n3("name"),version:n3("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 Je(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 Tx(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=gc(pse,r?n-1:n),i=r?(s+QM)*hse:KM;return function(o){const a=ye(o,"value");return M(a>=i&&a<=s,`value out-of-bounds for ${t}`,"value",a),mo(r?h9(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),yse(n)}}}switch(t){case"address":return function(e){return dl(Je(e),32)};case"bool":return function(e){return e?vse:mse};case"bytes":return function(e){return Ct(e)};case"string":return function(e){return Ar(e)}}return null}function s3(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}function g1(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 Op,qi,af,L0,YM;const Xn=class Xn{constructor(e){q(this,L0);z(this,"primaryType");q(this,Op,void 0);q(this,qi,void 0);q(this,af,void 0);N(this,qi,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}=g1(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,Op,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=g1(u.type).base;M(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),!Tx(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,qi).set(c,s3(c,i[c])+u.map(f=>s3(f,i[f])).join(""))}}get types(){return JSON.parse(S(this,Op))}getEncoder(e){let r=S(this,af).get(e);return r||(r=ee(this,L0,YM).call(this,e),S(this,af).set(e,r)),r}encodeType(e){const r=S(this,qi).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(Tx(e))return n(e,r);const s=g1(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=r3[n];M(s,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>kx.indexOf(n.name)-kx.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&&!mt(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Xn.from(r);o.visit(n,(a,c)=>(a==="address"&&!mt(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=[];kx.forEach(c=>{const l=e[c];l!=null&&(s[c]=gse[c](l),i.push({name:c,type:r3[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)})}}};Op=new WeakMap,qi=new WeakMap,af=new WeakMap,L0=new WeakSet,YM=function(e){{const s=Tx(e);if(s)return s}const r=g1(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,qi).has(s)&&(a=a.map(Ct)),Ct(ot(a))}}const n=this.types[e];if(n){const s=Ar(S(this,qi).get(e));return i=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(i[a]);return S(this,qi).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 xse="external public payable override",bse=nn(xse.split(" ")),JM="constant external internal payable private public pure view override",wse=nn(JM.split(" ")),XM="constructor error event fallback function receive struct",ZM=nn(XM.split(" ")),eD="calldata memory storage payable indexed",Ese=nn(eD.split(" ")),Sse="tuple returns",Ase=[XM,eD,Sse,JM].join(" "),Cse=nn(Ase.split(" ")),kse={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},Tse=new RegExp("^(\\s*)"),Pse=new RegExp("^([0-9]+)"),Rse=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),tD=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),rD=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var vr,Ps,_p,o2;const j0=class j0{constructor(e){q(this,_p);q(this,vr,void 0);q(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 j0(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,_p,o2).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 Sd(this,vr)._++,e}toString(){const e=[];for(let r=S(this,vr);r`}};vr=new WeakMap,Ps=new WeakMap,_p=new WeakSet,o2=function(e=0,r=0){return new j0(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 $s=j0;function za(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=Ie(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(Rse),a){if(c.text=a[1],i+=c.text.length,Cse.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(rD)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(Pse),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 $s(e.map(o=>Object.freeze(o)))}function i3(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 Qm(t,e){if(e.peekKeyword(ZM)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function xo(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 nD(t){let e=xo(t,wse);return i3(e,nn("constant payable nonpayable".split(" "))),i3(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 co(t,e){return t.popParams().map(r=>Cr.from(r,e))}function sD(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return ye(t.pop().text);throw new Error("invalid gas")}return null}function yl(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const Ise=new RegExp(/^(.*)\[([0-9]*)\]$/);function o3(t){const e=t.match(rD);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 Rt={},bn=Symbol.for("_ethers_internal"),a3="_ParamTypeInternal",c3="_ErrorInternal",l3="_EventInternal",u3="_ConstructorInternal",f3="_FallbackInternal",d3="_FunctionInternal",h3="_StructInternal";var cf,rv;const Zn=class Zn{constructor(e,r,n,s,i,o,a,c){q(this,cf);z(this,"name");z(this,"type");z(this,"baseType");z(this,"indexed");z(this,"components");z(this,"arrayLength");z(this,"arrayChildren");if(Va(e,Rt,"ParamType"),Object.defineProperty(this,bn,{value:a3}),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,rv).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(za(e),r)}catch{M(!1,"invalid param type","obj",e)}else if(e instanceof $s){let a="",c="",l=null;xo(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=o3(e.popType("TYPE")),c=a);let u=null,f=null;for(;e.length&&e.peekType("BRACKET");){const y=e.pop();u=new Zn(Rt,"",a,c,null,l,f,u),f=y.value,a+=y.text,c="array",l=null}let d=null;if(xo(e,Ese).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(Rt,p,a,c,d,l,f,u)}const n=e.name;M(!n||typeof n=="string"&&n.match(tD),"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(Ise);if(o){const a=parseInt(o[2]||"-1"),c=Zn.from({type:o[1],components:e.components});return new Zn(Rt,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(Rt,n||"",i,"tuple",s,a,null,null)}return i=o3(e.type),new Zn(Rt,n||"",i,i,s,null,null,null)}static isParamType(e){return e&&e[bn]===a3}};cf=new WeakSet,rv=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,rv).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,rv).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 Cr=Zn;class vl{constructor(e,r,n){z(this,"type");z(this,"inputs");Va(e,Rt,"Fragment"),n=Object.freeze(n.slice()),me(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{vl.from(JSON.parse(e))}catch{}return vl.from(za(e))}if(e instanceof $s)switch(e.peekKeyword(ZM)){case"constructor":return no.from(e);case"error":return pn.from(e);case"event":return ui.from(e);case"fallback":case"receive":return Bi.from(e);case"function":return fi.from(e);case"struct":return el.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return no.from(e);case"error":return pn.from(e);case"event":return ui.from(e);case"fallback":case"receive":return Bi.from(e);case"function":return fi.from(e);case"struct":return el.from(e)}X(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}M(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return no.isFragment(e)}static isError(e){return pn.isFragment(e)}static isEvent(e){return ui.isFragment(e)}static isFunction(e){return fi.isFragment(e)}static isStruct(e){return el.isFragment(e)}}class Ym extends vl{constructor(r,n,s,i){super(r,n,i);z(this,"name");M(typeof s=="string"&&s.match(tD),"invalid identifier","name",s),i=Object.freeze(i.slice()),me(this,{name:s})}}function op(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class pn extends Ym{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,bn,{value:c3})}get selector(){return Ar(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+op(e,this.inputs)),r.join(" ")}static from(e){if(pn.isFragment(e))return e;if(typeof e=="string")return pn.from(za(e));if(e instanceof $s){const r=Qm("error",e),n=co(e);return yl(e),new pn(Rt,r,n)}return new pn(Rt,e.name,e.inputs?e.inputs.map(Cr.from):[])}static isFragment(e){return e&&e[bn]===c3}}class ui extends Ym{constructor(r,n,s,i){super(r,"event",n,s);z(this,"anonymous");Object.defineProperty(this,bn,{value:l3}),me(this,{anonymous:i})}get topicHash(){return Ar(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+op(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(i=>Cr.from(i)),new ui(Rt,r,n,!1).topicHash}static from(r){if(ui.isFragment(r))return r;if(typeof r=="string")try{return ui.from(za(r))}catch{M(!1,"invalid event fragment","obj",r)}else if(r instanceof $s){const n=Qm("event",r),s=co(r,!0),i=!!xo(r,nn(["anonymous"])).has("anonymous");return yl(r),new ui(Rt,n,s,i)}return new ui(Rt,r.name,r.inputs?r.inputs.map(n=>Cr.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[bn]===l3}}class no extends vl{constructor(r,n,s,i,o){super(r,n,s);z(this,"payable");z(this,"gas");Object.defineProperty(this,bn,{value:u3}),me(this,{payable:i,gas:o})}format(r){if(X(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${op(r,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(no.isFragment(r))return r;if(typeof r=="string")try{return no.from(za(r))}catch{M(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof $s){xo(r,nn(["constructor"]));const n=co(r),s=!!xo(r,bse).has("payable"),i=sD(r);return yl(r),new no(Rt,"constructor",n,s,i)}return new no(Rt,"constructor",r.inputs?r.inputs.map(Cr.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[bn]===u3}}class Bi extends vl{constructor(r,n,s){super(r,"fallback",n);z(this,"payable");Object.defineProperty(this,bn,{value:f3}),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(Bi.isFragment(r))return r;if(typeof r=="string")try{return Bi.from(za(r))}catch{M(!1,"invalid fallback fragment","obj",r)}else if(r instanceof $s){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=co(r);return M(c.length===0,"receive cannot have arguments","obj.inputs",c),xo(r,nn(["payable"])),yl(r),new Bi(Rt,[],!0)}let o=co(r);o.length?M(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(c=>c.format("minimal")).join(", ")):o=[Cr.from("bytes")];const a=nD(r);if(M(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),xo(r,nn(["returns"])).has("returns")){const c=co(r);M(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(l=>l.format("minimal")).join(", "))}return yl(r),new Bi(Rt,o,a==="payable")}if(r.type==="receive")return new Bi(Rt,[],!0);if(r.type==="fallback"){const n=[Cr.from("bytes")],s=r.stateMutability==="payable";return new Bi(Rt,n,s)}M(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[bn]===f3}}class fi extends Ym{constructor(r,n,s,i,o,a){super(r,"function",n,i);z(this,"constant");z(this,"outputs");z(this,"stateMutability");z(this,"payable");z(this,"gas");Object.defineProperty(this,bn,{value:d3}),o=Object.freeze(o.slice()),me(this,{constant:s==="view"||s==="pure",gas:a,outputs:o,payable:s==="payable",stateMutability:s})}get selector(){return Ar(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+op(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(op(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(i=>Cr.from(i)),new fi(Rt,r,"view",n,[],null).selector}static from(r){if(fi.isFragment(r))return r;if(typeof r=="string")try{return fi.from(za(r))}catch{M(!1,"invalid function fragment","obj",r)}else if(r instanceof $s){const s=Qm("function",r),i=co(r),o=nD(r);let a=[];xo(r,nn(["returns"])).has("returns")&&(a=co(r));const c=sD(r);return yl(r),new fi(Rt,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 fi(Rt,r.name,n,r.inputs?r.inputs.map(Cr.from):[],r.outputs?r.outputs.map(Cr.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[bn]===d3}}class el extends Ym{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,bn,{value:h3})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return el.from(za(e))}catch{M(!1,"invalid struct fragment","obj",e)}else if(e instanceof $s){const r=Qm("struct",e),n=co(e);return yl(e),new el(Rt,r,n)}return new el(Rt,e.name,e.inputs?e.inputs.map(Cr.from):[])}static isFragment(e){return e&&e[bn]===h3}}const Hs=new Map;Hs.set(0,"GENERIC_PANIC");Hs.set(1,"ASSERT_FALSE");Hs.set(17,"OVERFLOW");Hs.set(18,"DIVIDE_BY_ZERO");Hs.set(33,"ENUM_RANGE_ERROR");Hs.set(34,"BAD_STORAGE_DATA");Hs.set(49,"STACK_UNDERFLOW");Hs.set(50,"ARRAY_RANGE_ERROR");Hs.set(65,"OUT_OF_MEMORY");Hs.set(81,"UNINITIALIZED_FUNCTION_CALL");const Ose=new RegExp(/^bytes([0-9]*)$/),_se=new RegExp(/^(u?int)([0-9]*)$/);let Px=null,p3=1024;function Nse(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 ${Hs.get(u)||"UNKNOWN"}(${u})`,s+=`: ${i}`}catch{s+=" (could not decode panic code)"}else s+=" (unknown custom error)"}const c={to:e.to?Je(e.to):null,data:e.data||"0x"};return e.from&&(c.from=Je(e.from)),Lt(s,"CALL_EXCEPTION",{action:t,data:r,reason:i,transaction:c,invocation:o,revert:a})}var Yo,Wl;const B0=class B0{constructor(){q(this,Yo)}getDefaultValue(e){const r=e.map(s=>ee(this,Yo,Wl).call(this,Cr.from(s)));return new m1(r,"_").defaultValue()}encode(e,r){l9(r.length,e.length,"types/values length mismatch");const n=e.map(o=>ee(this,Yo,Wl).call(this,Cr.from(o))),s=new m1(n,"_"),i=new qw;return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>ee(this,Yo,Wl).call(this,Cr.from(o)));return new m1(s,"_").decode(new Ww(r,n,p3))}static _setDefaultMaxInflation(e){M(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),p3=e}static defaultAbiCoder(){return Px==null&&(Px=new B0),Px}static getBuiltinCallException(e,r,n){return Nse(e,r,n,B0.defaultAbiCoder())}};Yo=new WeakSet,Wl=function(e){if(e.isArray())return new rne(ee(this,Yo,Wl).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new m1(e.components.map(n=>ee(this,Yo,Wl).call(this,n)),e.name);switch(e.baseType){case"address":return new ene(e.name);case"bool":return new nne(e.name);case"string":return new dne(e.name);case"bytes":return new sne(e.name);case"":return new ane(e.name)}let r=e.type.match(_se);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 fne(n/8,r[1]==="int",e.name)}if(r=e.type.match(Ose),r){let n=parseInt(r[1]);return M(n!==0&&n<=32,"invalid bytes length","param",e),new ine(n,e.name)}M(!1,"invalid type","type",e.type)};let ap=B0;class Mse{constructor(e,r,n){z(this,"fragment");z(this,"name");z(this,"signature");z(this,"topic");z(this,"args");const s=e.name,i=e.format();me(this,{fragment:e,name:s,signature:i,topic:r,args:n})}}class Dse{constructor(e,r,n,s){z(this,"fragment");z(this,"name");z(this,"args");z(this,"signature");z(this,"selector");z(this,"value");const i=e.name,o=e.format();me(this,{fragment:e,name:i,args:n,signature:o,selector:r,value:s})}}class Lse{constructor(e,r,n){z(this,"fragment");z(this,"name");z(this,"args");z(this,"signature");z(this,"selector");const s=e.name,i=e.format();me(this,{fragment:e,name:s,args:n,signature:i,selector:r})}}class y3{constructor(e){z(this,"hash");z(this,"_isIndexed");me(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const v3={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"},m3={"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&&v3[t.toString()]&&(e=v3[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var ri,ni,si,Dr,lf,nv,uf,sv;const uc=class uc{constructor(e){q(this,lf);q(this,uf);z(this,"fragments");z(this,"deploy");z(this,"fallback");z(this,"receive");q(this,ri,void 0);q(this,ni,void 0);q(this,si,void 0);q(this,Dr,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,N(this,si,new Map),N(this,ri,new Map),N(this,ni,new Map);const n=[];for(const o of r)try{n.push(vl.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,si);break;case"event":c=S(this,ni);break;case"error":c=S(this,ri);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||me(this,{deploy:no.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 ap.defaultAbiCoder()}getFunctionName(e){const r=ee(this,lf,nv).call(this,e,null,!1);return M(r,"no matching function","key",e),r.name}hasFunction(e){return!!ee(this,lf,nv).call(this,e,null,!1)}getFunction(e,r){return ee(this,lf,nv).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(S(this,si).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,ri).get(e);return n||null}forEachError(e){const r=Array.from(S(this,ri).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;ni.type==="string"?Ar(o):i.type==="bytes"?Ct(ne(o)):(i.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":i.type.match(/^u?int/)?o=mo(o):i.type.match(/^bytes/)?o=Bee(o,32):i.type==="address"&&S(this,Dr).encode(["address"],[o]),dl(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(Ar(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(mt(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(Cr.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 y3(null);else if(o[p])y=new y3(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 Dse(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 Mse(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 Lse(n,n.selector,s)}static from(e){return e instanceof uc?e:typeof e=="string"?new uc(JSON.parse(e)):typeof e.formatJson=="function"?new uc(e.formatJson()):typeof e.format=="function"?new uc(e.format("json")):new uc(e)}};ri=new WeakMap,ni=new WeakMap,si=new WeakMap,Dr=new WeakMap,lf=new WeakSet,nv=function(e,r,n){if(mt(e)){const i=e.toLowerCase();for(const o of S(this,si).values())if(i===o.selector)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of S(this,si))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,si).get(fi.from(e).format());return s||null},uf=new WeakSet,sv=function(e,r,n){if(mt(e)){const i=e.toLowerCase();for(const o of S(this,ni).values())if(i===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of S(this,ni))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,ni).get(ui.from(e).format());return s||null};let a2=uc;const iD=BigInt(0);function Nu(t){return t??null}function Gt(t){return t==null?null:t.toString()}class g3{constructor(e,r,n){z(this,"gasPrice");z(this,"maxFeePerGas");z(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 cp(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]=Ie(t[s],`request.${s}`));return t.accessList&&(e.accessList=kl(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=>Fm(s)?ne(s):Object.assign({},s))),e}var Wi;class jse{constructor(e,r){z(this,"provider");z(this,"number");z(this,"hash");z(this,"timestamp");z(this,"parentHash");z(this,"parentBeaconBlockRoot");z(this,"nonce");z(this,"difficulty");z(this,"gasLimit");z(this,"gasUsed");z(this,"stateRoot");z(this,"receiptsRoot");z(this,"blobGasUsed");z(this,"excessBlobGas");z(this,"miner");z(this,"prevRandao");z(this,"extraData");z(this,"baseFeePerGas");q(this,Wi,void 0);N(this,Wi,e.transactions.map(n=>typeof n!="string"?new lp(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,Wi).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=S(this,Wi).slice();return e.length===0?[]:(X(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 wy(s,r))));let n=iD;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,Np)}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;X(!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 X(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),cD(this)}reorderedEvent(e){return X(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),X(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),aD(this,e)}replaceableTransaction(e){M(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new _k(this,this.provider);return N(r,Jo,e),r}};Jo=new WeakMap;let lp=_k;function Bse(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function aD(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function cD(t){return{orphan:"drop-transaction",tx:t}}function Fse(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 DA extends wy{constructor(r,n,s){super(r,r.provider);z(this,"interface");z(this,"fragment");z(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 lD extends wy{constructor(r,n){super(r,r.provider);z(this,"error");me(this,{error:n})}}var ff;class Use extends oD{constructor(r,n,s){super(s,n);q(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 DA(r,S(this,ff),n)}catch(s){return new lD(r,s)}return r})}}ff=new WeakMap;var Mp;class LA extends lp{constructor(r,n,s){super(s,n);q(this,Mp,void 0);N(this,Mp,r)}async wait(r,n){const s=await super.wait(r,n);return s==null?null:new Use(S(this,Mp),this.provider,s)}}Mp=new WeakMap;class uD extends y9{constructor(r,n,s,i){super(r,n,s);z(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 Vse extends uD{constructor(e,r,n,s,i){super(e,r,n,new DA(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 x3=BigInt(0);function fD(t){return t&&typeof t.call=="function"}function dD(t){return t&&typeof t.estimateGas=="function"}function Jm(t){return t&&typeof t.resolveName=="function"}function hD(t){return t&&typeof t.sendTransaction=="function"}function pD(t){if(t!=null){if(Jm(t))return t;if(t.provider)return t.provider}}var Dp;class $se{constructor(e,r,n){q(this,Dp,void 0);z(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,Dp)}}Dp=new WeakMap;function ml(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function wc(t){return t==null?null:t.provider||null}async function yD(t,e){const r=zr.dereference(t,"overrides");M(typeof r=="object","invalid overrides parameter","overrides",t);const n=cp(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 zse(t,e,r){const n=ml(t,"resolveName"),s=Jm(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 Hse(t){const e=async function(o){const a=await yD(o,["data"]);a.to=await t.getAddress(),a.from&&(a.from=await wr(a.from,pD(t.runner)));const c=t.interface,l=ye(a.value||x3,"overrides.value")===x3,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=ml(t.runner,"call");X(fD(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 pA(l)&&l.data?t.interface.makeError(l.data,c):l}},n=async function(o){const a=t.runner;X(hD(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=wc(t.runner);return new LA(t.interface,l,c)},s=async function(o){const a=ml(t.runner,"estimateGas");return X(dD(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 Gse(t,e){const r=function(...l){const u=t.interface.getFunction(e,l);return X(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 yD(l.pop()),f.from&&(f.from=await wr(f.from,pD(t.runner)))),u.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const d=await zse(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;X(hD(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await u.sendTransaction(await n(...l)),d=wc(t.runner);return new LA(t.interface,d,f)},o=async function(...l){const u=ml(t.runner,"estimateGas");return X(dD(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await n(...l))},a=async function(...l){const u=ml(t.runner,"call");X(fD(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 pA(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 X(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function qse(t,e){const r=function(...s){const i=t.interface.getEvent(e,s);return X(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:s}}),i},n=function(...s){return new $se(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 X(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),s}}),n}const v0=Symbol.for("_ethersInternal_contract"),vD=new WeakMap;function Wse(t,e){vD.set(t[v0],e)}function Cn(t){return vD.get(t[v0])}function Kse(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function jA(t,e){let r,n=null;if(Array.isArray(e)){const i=function(o){if(mt(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"?mt(e,32)?r=[e]:(n=t.interface.getEvent(e),M(n,"unknown fragment","event",e),r=[n.topicHash]):Kse(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 eh(t,e){const{subs:r}=Cn(t);return r.get((await jA(t,e)).tag)||null}async function b3(t,e,r){const n=wc(t.runner);X(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:s,tag:i,topics:o}=await jA(t,r),{addr:a,subs:c}=Cn(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):[];l2(t,r,b,w=>new Vse(t,w,r,x,g))}else l2(t,r,[],x=>new uD(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 c2=Promise.resolve();async function Qse(t,e,r,n){await c2;const s=await eh(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(),Cn(t).subs.delete(s.tag)),i>0}async function l2(t,e,r,n){try{await c2}catch{}const s=Qse(t,e,r,n);return c2=s,await s}const x1=["then"];var T1e;const Ch=class Ch{constructor(e,r,n,s){z(this,"target");z(this,"interface");z(this,"runner");z(this,"filters");z(this,T1e);z(this,"fallback");M(typeof e=="string"||EM(e),"invalid value for Contract target","target",e),n==null&&(n=null);const i=a2.from(r);me(this,{target:e,runner:n,interface:i}),Object.defineProperty(this,v0,{value:{}});let o,a=null,c=null;if(s){const f=wc(n);c=new LA(this.interface,f,s)}let l=new Map;if(typeof e=="string")if(mt(e))a=e,o=Promise.resolve(e);else{const f=ml(n,"resolveName");if(!Jm(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 Cn(this).addr=d,d})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return Cn(this).addr=f,f});Wse(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const u=new Proxy({},{get:(f,d,h)=>{if(typeof d=="symbol"||x1.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)=>x1.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?Hse(this):null}),new Proxy(this,{get:(f,d,h)=>{if(typeof d=="symbol"||d in f||x1.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||x1.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 Cn(this).addrPromise}async getDeployedCode(){const e=wc(this.runner);X(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=wc(this.runner);return X(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 Cn(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),Gse(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),qse(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}=Cn(this),o=s||await i,{fragment:a,topics:c}=await jA(this,e),l={address:o,topics:c,fromBlock:r,toBlock:n},u=wc(this.runner);return X(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 DA(f,this.interface,d)}catch(h){return new lD(f,h)}return new wy(f,u)})}async on(e,r){const n=await b3(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await b3(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await l2(this,e,r,null)}async listenerCount(e){if(e){const s=await eh(this,e);return s?s.listeners.length:0}const{subs:r}=Cn(this);let n=0;for(const{listeners:s}of r.values())n+=s.length;return n}async listeners(e){if(e){const s=await eh(this,e);return s?s.listeners.map(({listener:i})=>i):[]}const{subs:r}=Cn(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 eh(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(),Cn(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await eh(this,e);if(!r)return this;r.stop(),Cn(this).subs.delete(r.tag)}else{const{subs:r}=Cn(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)}};T1e=v0;let u2=Ch;function Yse(){return u2}class Mu extends Yse(){}function Rx(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 Jse{constructor(e){z(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 mD=new RegExp("^(ipfs)://(.*)$","i"),w3=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),mD,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Xo,Lc,Zo,Kl,F0,gD;const gu=class gu{constructor(e,r,n){q(this,Zo);z(this,"provider");z(this,"address");z(this,"name");q(this,Xo,void 0);q(this,Lc,void 0);me(this,{provider:e,address:r,name:n}),N(this,Xo,null),N(this,Lc,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,Lc).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===pl?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(mt(o,20))return Je(o)}let r=null;for(const i of this.provider.plugins)if(i instanceof Jse&&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;X(!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}://${p9("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;X(!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 Ey(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";X(!1,`invalid value for value.${s} (${a})`,"BAD_DATA",{value:r})}}return n}}function Xse(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(mt(t,!0),"invalid data","value",t),t}function xr(t){return M(mt(t,32),"invalid hash","value",t),t}const Zse=Ey({address:Je,blockHash:xr,blockNumber:Ie,data:Qf,index:Ie,removed:Ge(Xse,!1),topics:Xm(xr),transactionHash:xr,transactionIndex:Ie},{index:["logIndex"]});function eie(t){return Zse(t)}const tie=Ey({hash:Ge(xr),parentHash:xr,parentBeaconBlockRoot:Ge(xr,null),number:Ie,timestamp:Ie,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(Je),prevRandao:Ge(xr,null),extraData:Qf,baseFeePerGas:Ge(ye)},{prevRandao:["mixHash"]});function rie(t){const e=tie(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:xD(r)),e}const nie=Ey({transactionIndex:Ie,blockNumber:Ie,transactionHash:xr,address:Je,topics:Xm(xr),data:Qf,index:Ie,blockHash:xr},{index:["logIndex"]});function sie(t){return nie(t)}const iie=Ey({to:Ge(Je,null),from:Ge(Je,null),contractAddress:Ge(Je,null),index:Ie,root:Ge(ne),gasUsed:ye,blobGasUsed:Ge(ye,null),logsBloom:Ge(Qf),blockHash:xr,hash:xr,logs:Xm(sie),blockNumber:Ie,cumulativeGasUsed:ye,effectiveGasPrice:Ge(ye),blobGasPrice:Ge(ye,null),status:Ge(Ie),type:Ge(Ie,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function oie(t){return iie(t)}function xD(t){t.to&&ye(t.to)===E3&&(t.to="0x0000000000000000000000000000000000000000");const e=Ey({hash:xr,index:Ge(Ie,void 0),type:r=>r==="0x"||r==null?0:Ie(r),accessList:Ge(kl,null),blobVersionedHashes:Ge(Xm(xr,!0),null),blockHash:Ge(xr,null),blockNumber:Ge(Ie,null),transactionIndex:Ge(Ie,null),from:Je,gasPrice:Ge(ye),maxPriorityFeePerGas:Ge(ye),maxFeePerGas:Ge(ye),maxFeePerBlobGas:Ge(ye,null),gasLimit:ye,to:Ge(Je,null),value:ye,nonce:Ie,data:Qf,creates:Ge(Je,null),chainId:Ge(ye,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=Xre(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Vs.from(t.signature):e.signature=Vs.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&ye(e.blockHash)===E3&&(e.blockHash=null),e}const aie="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Sy{constructor(e){z(this,"name");me(this,{name:e})}clone(){return new Sy(this.name)}}class Zm extends Sy{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);z(this,"effectiveBlock");z(this,"txBase");z(this,"txCreate");z(this,"txDataZero");z(this,"txDataNonzero");z(this,"txAccessListStorageKey");z(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 Zm(this.effectiveBlock,this)}}class eg extends Sy{constructor(r,n){super("org.ethers.plugins.network.Ens");z(this,"address");z(this,"targetNetwork");me(this,{address:r||aie,targetNetwork:n??1})}clone(){return new eg(this.address,this.targetNetwork)}}var Lp,jp;class cie extends Sy{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");q(this,Lp,void 0);q(this,jp,void 0);N(this,Lp,r),N(this,jp,n)}get url(){return S(this,Lp)}get processFunc(){return S(this,jp)}clone(){return this}}Lp=new WeakMap,jp=new WeakMap;const Ix=new Map;var df,hf,ea;const xu=class xu{constructor(e,r){q(this,df,void 0);q(this,hf,void 0);q(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 Zm;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 A3(t){return new cie(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:S3(a.maxFee,9),maxPriorityFeePerGas:S3(a.maxPriorityFee,9)}}catch(i){X(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:s,error:i})}})}let C3=!1;function lie(){if(C3)return;C3=!0;function t(e,r,n){const s=function(){const i=new yi(e,r);return n.ensNetwork!=null&&i.attachPlugin(new eg(null,n.ensNetwork)),i.attachPlugin(new Zm),(n.plugins||[]).forEach(o=>{i.attachPlugin(o)}),i};yi.register(e,s),yi.register(r,s),n.altNames&&n.altNames.forEach(i=>{yi.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:[A3("https://gasstation.polygon.technology/v2")]}),t("matic-amoy",80002,{}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[A3("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 f2(t){return JSON.parse(JSON.stringify(t))}var Ki,es,ta,ii,pf,iv;class uie{constructor(e){q(this,pf);q(this,Ki,void 0);q(this,es,void 0);q(this,ta,void 0);q(this,ii,void 0);N(this,Ki,e),N(this,es,null),N(this,ta,4e3),N(this,ii,-2)}get pollingInterval(){return S(this,ta)}set pollingInterval(e){N(this,ta,e)}start(){S(this,es)||(N(this,es,S(this,Ki)._setTimeout(ee(this,pf,iv).bind(this),S(this,ta))),ee(this,pf,iv).call(this))}stop(){S(this,es)&&(S(this,Ki)._clearTimeout(S(this,es)),N(this,es,null))}pause(e){this.stop(),e&&N(this,ii,-2)}resume(){this.start()}}Ki=new WeakMap,es=new WeakMap,ta=new WeakMap,ii=new WeakMap,pf=new WeakSet,iv=async function(){try{const e=await S(this,Ki).getBlockNumber();if(S(this,ii)===-2){N(this,ii,e);return}if(e!==S(this,ii)){for(let r=S(this,ii)+1;r<=e;r++){if(S(this,es)==null)return;await S(this,Ki).emit("block",r)}N(this,ii,e)}}catch{}S(this,es)!=null&&N(this,es,S(this,Ki)._setTimeout(ee(this,pf,iv).bind(this),S(this,ta)))};var jc,Bc,ra;class BA{constructor(e){q(this,jc,void 0);q(this,Bc,void 0);q(this,ra,void 0);N(this,jc,e),N(this,ra,!1),N(this,Bc,r=>{this._poll(r,S(this,jc))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){S(this,ra)||(N(this,ra,!0),S(this,Bc).call(this,-2),S(this,jc).on("block",S(this,Bc)))}stop(){S(this,ra)&&(N(this,ra,!1),S(this,jc).off("block",S(this,Bc)))}pause(e){this.stop()}resume(){this.start()}}jc=new WeakMap,Bc=new WeakMap,ra=new WeakMap;var yf,Qi;class fie extends BA{constructor(r,n){super(r);q(this,yf,void 0);q(this,Qi,void 0);N(this,yf,n),N(this,Qi,-2)}pause(r){r&&N(this,Qi,-2),super.pause(r)}async _poll(r,n){const s=await n.getBlock(S(this,yf));s!=null&&(S(this,Qi)===-2?N(this,Qi,s.number):s.number>S(this,Qi)&&(n.emit(S(this,yf),s.number),N(this,Qi,s.number)))}}yf=new WeakMap,Qi=new WeakMap;var U0;class die extends BA{constructor(r,n){super(r);q(this,U0,void 0);N(this,U0,f2(n))}async _poll(r,n){throw new Error("@TODO")}}U0=new WeakMap;var vf;class hie extends BA{constructor(r,n){super(r);q(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 Yi,mf,gf,na,ts,V0,bD;class FA{constructor(e,r){q(this,V0);q(this,Yi,void 0);q(this,mf,void 0);q(this,gf,void 0);q(this,na,void 0);q(this,ts,void 0);N(this,Yi,e),N(this,mf,f2(r)),N(this,gf,ee(this,V0,bD).bind(this)),N(this,na,!1),N(this,ts,-2)}start(){S(this,na)||(N(this,na,!0),S(this,ts)===-2&&S(this,Yi).getBlockNumber().then(e=>{N(this,ts,e)}),S(this,Yi).on("block",S(this,gf)))}stop(){S(this,na)&&(N(this,na,!1),S(this,Yi).off("block",S(this,gf)))}pause(e){this.stop(),e&&N(this,ts,-2)}resume(){this.start()}}Yi=new WeakMap,mf=new WeakMap,gf=new WeakMap,na=new WeakMap,ts=new WeakMap,V0=new WeakSet,bD=async function(e){if(S(this,ts)===-2)return;const r=f2(S(this,mf));r.fromBlock=S(this,ts)+1,r.toBlock=e;const n=await S(this,Yi).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 wD{constructor(e){z(this,"name");me(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function vie(t){return JSON.parse(JSON.stringify(t))}function d2(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function Ox(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(mt(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:ov("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:ov("orphan",r),filter:vie(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(s=>s==null?null:Array.isArray(s)?d2(s.map(i=>i.toLowerCase())):s.toLowerCase())};if(r.address){const s=[],i=[],o=a=>{mt(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=d2(s.map(a=>a.toLowerCase()))}return{filter:n,tag:ov("event",n),type:"event"}}M(!1,"unknown ProviderEvent","event",t)}function _x(){return new Date().getTime()}const mie={cacheTimeout:250,pollingInterval:4e3};var Lr,sa,jr,xf,Rn,Fc,ia,Ji,Bp,rs,bf,wf,Jr,An,Fp,h2,Up,p2,Uc,th,Vp,y2,Vc,rh,Ef,av;class gie{constructor(e,r){q(this,Jr);q(this,Fp);q(this,Up);q(this,Uc);q(this,Vp);q(this,Vc);q(this,Ef);q(this,Lr,void 0);q(this,sa,void 0);q(this,jr,void 0);q(this,xf,void 0);q(this,Rn,void 0);q(this,Fc,void 0);q(this,ia,void 0);q(this,Ji,void 0);q(this,Bp,void 0);q(this,rs,void 0);q(this,bf,void 0);q(this,wf,void 0);if(N(this,wf,Object.assign({},mie,r||{})),e==="any")N(this,Fc,!0),N(this,Rn,null);else if(e){const n=yi.from(e);N(this,Fc,!1),N(this,Rn,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else N(this,Fc,!1),N(this,Rn,null);N(this,Ji,-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,Bp,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)}X(!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 jse(rie(e),this)}_wrapLog(e,r){return new wy(eie(e),this)}_wrapTransactionReceipt(e,r){return new oD(oie(e),this)}_wrapTransactionResponse(e,r){return new lp(xD(e),this)}_detectNetwork(){X(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){X(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Ie(await ee(this,Jr,An).call(this,{method:"getBlockNumber"}),"%response");return S(this,Ji)>=0&&N(this,Ji,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(mt(e))return mt(e,32)?e:yu(e);if(typeof e=="bigint"&&(e=Ie(e,"blockTag")),typeof e=="number")return e>=0?yu(e):S(this,Ji)>=0?yu(S(this,Ji)+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)?d2(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=cp(e),n=[];if(["to","from"].forEach(s=>{if(r[s]==null)return;const i=wr(r[s],this);b1(i)?n.push(async function(){r[s]=await i}()):r[s]=i}),r.blockTag!=null){const s=this._getBlockTag(r.blockTag);b1(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,Fc)?(this.emit("network",n,r),S(this,Rn)===e&&N(this,Rn,Promise.resolve(n))):X(!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,Vp,y2).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ee(this,Jr,An).call(this,{method:"getGasPrice"});return ye(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ee(this,Jr,An).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*pie+c),new g3(i,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const s=new go(n.url),i=await n.processFunc(r,this,s);return new g3(i.gasPrice,i.maxFeePerGas,i.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return b1(r)&&(r=await r),ye(await ee(this,Jr,An).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,Up,p2).call(this,ee(this,Fp,h2).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return ye(await ee(this,Uc,th).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return Ie(await ee(this,Uc,th).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return ne(await ee(this,Uc,th).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const s=ye(r,"position");return ne(await ee(this,Uc,th).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=ip.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,Vp,y2).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,An).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,An).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const s=await ee(this,Jr,An).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,An).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:ne(r)}async getLogs(e){let r=this._getFilter(e);b1(r)&&(r=await r);const{network:n,params:s}=await Fr({network:this.getNetwork(),params:ee(this,Jr,An).call(this,{method:"getLogs",filter:r})});return s.map(i=>this._wrapLog(i,n))}_getProvider(e){X(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await m0.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=Je(e);const r=i2(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await m0.getEnsAddress(this),i=await new Mu(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(i==null||i===pl)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){X(!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=Sd(this,Bp)._++,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:_x()})}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 wD(e.type);case"block":{const r=new uie(this);return r.pollingInterval=this.pollingInterval,r}case"safe":case"finalized":return new fie(this,e.type);case"event":return new FA(this,e.filter);case"transaction":return new hie(this,e.hash);case"orphan":return new die(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,av).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,av).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,Vc,rh).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 y9(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,Vc,rh).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,Vc,rh).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,Vc,rh).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,av).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,Ji,-1),S(this,jr)!=null){if(S(this,jr)==!!e)return;X(!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=_x()-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=_x(),setTimeout(e.func,r)}}}}Lr=new WeakMap,sa=new WeakMap,jr=new WeakMap,xf=new WeakMap,Rn=new WeakMap,Fc=new WeakMap,ia=new WeakMap,Ji=new WeakMap,Bp=new WeakMap,rs=new WeakMap,bf=new WeakMap,wf=new WeakMap,Jr=new WeakSet,An=async function(e){const r=S(this,wf).cacheTimeout;if(r<0)return await this._perform(e);const n=ov(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},Fp=new WeakSet,h2=async function(e,r,n){X(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=Sie(xt(i.data,4))}catch(f){X(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:s,info:{data:o}})}X(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);X(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,Eie([l,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{const f=await ee(this,Fp,h2).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}},Up=new WeakSet,p2=async function(e){const{value:r}=await Fr({network:this.getNetwork(),value:e});return r},Uc=new WeakSet,th=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,Up,p2).call(this,ee(this,Jr,An).call(this,Object.assign(e,{address:s,blockTag:i})))},Vp=new WeakSet,y2=async function(e,r){if(mt(e,32))return await ee(this,Jr,An).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await ee(this,Jr,An).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},Vc=new WeakSet,rh=async function(e,r){let n=await Ox(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await Ox({orphan:"drop-log",log:r[0]},this)),S(this,Lr).get(n.tag)||null},Ef=new WeakSet,av=async function(e){const r=await Ox(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 xie(t,e){try{const r=v2(t,e);if(r)return l0(r)}catch{}return null}function v2(t,e){if(t==="0x")return null;try{const r=Ie(xt(t,e,e+32)),n=Ie(xt(t,r,r+32));return xt(t,r+32,r+32+n)}catch{}return null}function k3(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 bie(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const wie=new Uint8Array([]);function Eie(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);X(xt(r,0,12)===xt(T3,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=xt(r,12);try{const n=[],s=Ie(xt(t,32,64)),i=Ie(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;X(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function P3(t,e){let r=cp(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 UA{constructor(e){z(this,"provider");me(this,{provider:e||null})}async getNonce(e){return Ul(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await P3(this,e)}async populateTransaction(e){const r=Ul(this,"populateTransaction"),n=await P3(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();X(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?(X(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):X(!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=ip.from(n);return await r.broadcastTransaction(await this.signTransaction(s))}}var Sf,cv;const Nk=class Nk extends UA{constructor(r,n){super(n);q(this,Sf);z(this,"address");me(this,{address:r})}async getAddress(){return this.address}connect(r){return new Nk(this.address,r)}async signTransaction(r){ee(this,Sf,cv).call(this,"transactions","signTransaction")}async signMessage(r){ee(this,Sf,cv).call(this,"messages","signMessage")}async signTypedData(r,n,s){ee(this,Sf,cv).call(this,"typed-data","signTypedData")}};Sf=new WeakSet,cv=function(r,n){X(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let m2=Nk;function Aie(t){return JSON.parse(JSON.stringify(t))}var Xr,oi,$c,oa,zc,Af,$p,g2,zp,x2;class ED{constructor(e){q(this,$p);q(this,zp);q(this,Xr,void 0);q(this,oi,void 0);q(this,$c,void 0);q(this,oa,void 0);q(this,zc,void 0);q(this,Af,void 0);N(this,Xr,e),N(this,oi,null),N(this,$c,ee(this,$p,g2).bind(this)),N(this,oa,!1),N(this,zc,null),N(this,Af,!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,$p,g2).call(this,-2))}stop(){S(this,oa)&&(N(this,oa,!1),N(this,Af,!0),ee(this,zp,x2).call(this),S(this,Xr).off("block",S(this,$c)))}pause(e){e&&ee(this,zp,x2).call(this),S(this,Xr).off("block",S(this,$c))}resume(){this.start()}}Xr=new WeakMap,oi=new WeakMap,$c=new WeakMap,oa=new WeakMap,zc=new WeakMap,Af=new WeakMap,$p=new WeakSet,g2=async function(e){try{S(this,oi)==null&&N(this,oi,this._subscribe(S(this,Xr)));let r=null;try{r=await S(this,oi)}catch(i){if(!Vr(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(r==null){N(this,oi,null),S(this,Xr)._recoverSubscriber(this,this._recover(S(this,Xr)));return}const n=await S(this,Xr).getNetwork();if(S(this,zc)||N(this,zc,n),S(this,zc).chainId!==n.chainId)throw new Error("chaid changed");if(S(this,Af))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,$c))},zp=new WeakSet,x2=function(){const e=S(this,oi);e&&(N(this,oi,null),e.then(r=>{S(this,Xr).destroyed||S(this,Xr).send("eth_uninstallFilter",[r])}))};var Hc;class Cie extends ED{constructor(r,n){super(r);q(this,Hc,void 0);N(this,Hc,Aie(n))}_recover(r){return new FA(r,S(this,Hc))}async _subscribe(r){return await r.send("eth_newFilter",[S(this,Hc)])}async _emitResults(r,n){for(const s of n)r.emit(S(this,Hc),r._wrapLog(s,r._network))}}Hc=new WeakMap;class kie extends ED{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const Tie="bigint,boolean,function,number,string,symbol".split(/,/g);function lv(t){if(t==null||Tie.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(lv);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 Pie(t){return new Promise(e=>{setTimeout(e,t)})}function Vl(t){return t&&t.toLowerCase()}function R3(t){return t&&typeof t.pollingInterval=="number"}const SD={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class Nx extends UA{constructor(r,n){super(r);z(this,"address");n=Je(n),me(this,{address:n})}connect(r){X(!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=lv(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=lv(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=lv(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 Gc,Cf,Xi,ai,Rs,ns,fn,Hp,b2;class Rie extends gie{constructor(r,n){super(r,n);q(this,Hp);q(this,Gc,void 0);q(this,Cf,void 0);q(this,Xi,void 0);q(this,ai,void 0);q(this,Rs,void 0);q(this,ns,void 0);q(this,fn,void 0);N(this,Cf,1),N(this,Gc,Object.assign({},SD,n||{})),N(this,Xi,[]),N(this,ai,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,yi.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,Gc)[r]}get _network(){return X(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=yi.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:Sd(this,Cf)._++,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 yi.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 Pie(1e3)}ee(this,Hp,b2).call(this)})())}async _waitUntilReady(){if(S(this,Rs)!=null)return await S(this,Rs).promise}_getSubscriber(r){return r.type==="pending"?new kie(this):r.type==="event"?this._getOption("polling")?new FA(this,r.filter):new Cie(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new wD("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=kl(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=w2(i),l=ap.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(Oie(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=Sd(this,Cf)._++,i=new Promise((o,a)=>{S(this,Xi).push({resolve:o,reject:a,payload:{method:r,params:n,id:s,jsonrpc:"2.0"}})});return ee(this,Hp,b2).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 Nx(this,i[r])}const{accounts:s}=await Fr({network:this.getNetwork(),accounts:n});r=Je(r);for(const i of s)if(Je(i)===r)return new Nx(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new Nx(this,n))}destroy(){S(this,ai)&&(clearTimeout(S(this,ai)),N(this,ai,null));for(const{payload:r,reject:n}of S(this,Xi))n(Lt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));N(this,Xi,[]),super.destroy()}}Gc=new WeakMap,Cf=new WeakMap,Xi=new WeakMap,ai=new WeakMap,Rs=new WeakMap,ns=new WeakMap,fn=new WeakMap,Hp=new WeakSet,b2=function(){if(S(this,ai))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");N(this,ai,setTimeout(()=>{N(this,ai,null);const n=S(this,Xi);for(N(this,Xi,[]);n.length;){const s=[n.shift()];for(;n.length&&s.length!==S(this,Gc).batchMaxCount;)if(s.push(n.shift()),JSON.stringify(s.map(o=>o.payload)).length>S(this,Gc).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 Iie extends Rie{constructor(r,n){super(r,n);q(this,aa,void 0);let s=this._getOption("pollingInterval");s==null&&(s=SD.pollingInterval),N(this,aa,s)}_getSubscriber(r){const n=super._getSubscriber(r);return R3(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=>{R3(n)&&(n.pollingInterval=S(this,aa))})}}aa=new WeakMap;var kf,X8;let AD=(X8=class extends Iie{constructor(r,n,s){r==null&&(r="http://localhost:8545");super(n,s);q(this,kf,void 0);typeof r=="string"?N(this,kf,new go(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,X8);function w2(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&mt(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=w2(t[e]);if(r)return r}return null}if(typeof t=="string")try{return w2(JSON.parse(t))}catch{}return null}function E2(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)E2(t[r],e);if(typeof t=="string")try{return E2(JSON.parse(t),e)}catch{}}}function Oie(t){const e=[];return E2(t,e),e}var Tf;const Mk=class Mk extends UA{constructor(r,n){super(n);z(this,"address");q(this,Tf,void 0);M(r&&typeof r.sign=="function","invalid private key","privateKey","[ REDACTED ]"),N(this,Tf,r);const s=xy(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 Mk(S(this,Tf),r)}async signTransaction(r){r=cp(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(Je(r.from)===this.address,"transaction from address mismatch","tx.from",r.from),delete r.from);const i=ip.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(dse(r)).serialized}async signTypedData(r,n,s){const i=await Kf.resolveNames(r,n,s,async o=>{X(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 X(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 g0=Mk;const x0=" !#$%&'()*+,-./<=>?@[]^_`{|}~",_ie=/^[a-z]*$/i;function I3(t,e){let r=97;return t.reduce((n,s)=>(s===e?r++:s.match(_ie)?n.push(String.fromCharCode(r)+s):(r=97,n.push(s)),n),[])}function Nie(t,e){for(let s=x0.length-1;s>=0;s--)t=t.split(x0[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 I3(I3(r,";"),":")}function Mie(t){return M(t[0]==="0","unsupported auwl data","data",t),Nie(t.substring(1+2*x0.length),t.substring(1,1+2*x0.length))}class Die{constructor(e){z(this,"locale");me(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var Pf,Gp,qc,qp,S2;class Lie extends Die{constructor(r,n,s){super(r);q(this,qp);q(this,Pf,void 0);q(this,Gp,void 0);q(this,qc,void 0);N(this,Pf,n),N(this,Gp,s),N(this,qc,null)}get _data(){return S(this,Pf)}_decodeWords(){return Mie(S(this,Pf))}getWord(r){const n=ee(this,qp,S2).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(G,{gap:"2",children:h4(0,r).map(l=>k.jsxs(v.Fragment,{children:[l===r/2&&k.jsx("span",{}),k.jsx(G,{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),i7=()=>k.jsxs(G,{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"})]}),o7="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 vA(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=${o7}`),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 X(t,e,r,n){if(!t)throw Lt(e,r,n)}function M(t,e,r,n){X(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function a7(t,e,r){r==null&&(r=""),r&&(r=": "+r),X(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),X(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 c7(t){X(Fee.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function za(t,e,r){if(r==null&&(r=""),t!==e){let n=r,s="new";r&&(n+=".",s+=" "+r),X(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function l7(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&&X(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),ne(n.slice(e??0,r??n.length))}function u7(t,e,r){const n=fe(t);X(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 u7(t,e,!0)}function Uee(t,e){return u7(t,e,!1)}const Vm=BigInt(0),Ms=BigInt(1),pu=9007199254740991;function c0(t,e){const r=$m(t,"value"),n=BigInt(_e(e,"width"));if(X(r>>n===Vm,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ms){const s=(Ms<=-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 X(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(X(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),p7(t,e,r))}const Qee=Object.freeze({error:Wee,ignore:p7,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&&(c7(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 y7(t){async function e(r,n){X(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const s=r.url.split(":")[0].toLowerCase();X(s==="http"||s==="https",`unsupported protocol ${s}`,"UNSUPPORTED_OPERATION",{info:{protocol:s},operation:"request"}),X(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=y7();const ete=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),tte=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let gx=!1;async function v7(t,e){try{const r=t.match(ete);if(!r)throw new Error("invalid data");return new Sa(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?Gee(r[3]):nte(r[3]))}catch{return new Sa(599,"BAD REQUEST (invalid data: URI)",{},null,new xo(t))}}function m7(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 Sa(599,"BAD REQUEST (invalid IPFS URI)",{},null,new xo(r))}}return e}const f1={data:v7,ipfs:m7("https://gateway.ipfs.io/ipfs/")},g7=new WeakMap;var kc,qo;class rte{constructor(e){q(this,kc,void 0);q(this,qo,void 0);N(this,kc,[]),N(this,qo,!1),g7.set(e,()=>{if(!S(this,qo)){N(this,qo,!0);for(const r of S(this,kc))setTimeout(()=>{r()},0);N(this,kc,[])}})}addListener(e){X(!S(this,qo),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),S(this,kc).push(e)}get cancelled(){return S(this,qo)}checkSignal(){X(!this.cancelled,"cancelled","CANCELLED",{})}}kc=new WeakMap,qo=new WeakMap;function d1(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var Bu,Fu,As,Vi,Uu,Vu,or,kn,$i,Tc,Pc,Rc,Zs,Cs,Wo,Ic,Jd;const D0=class D0{constructor(e){q(this,Ic);q(this,Bu,void 0);q(this,Fu,void 0);q(this,As,void 0);q(this,Vi,void 0);q(this,Uu,void 0);q(this,Vu,void 0);q(this,or,void 0);q(this,kn,void 0);q(this,$i,void 0);q(this,Tc,void 0);q(this,Pc,void 0);q(this,Rc,void 0);q(this,Zs,void 0);q(this,Cs,void 0);q(this,Wo,void 0);N(this,Vu,String(e)),N(this,Bu,!1),N(this,Fu,!0),N(this,As,{}),N(this,Vi,""),N(this,Uu,3e5),N(this,Cs,{slotInterval:Zee,maxAttempts:Xee}),N(this,Wo,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,As));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,As)[String(e).toLowerCase()]=String(r)}clearHeaders(){N(this,As,{})}[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,Wo)||v4}set getUrlFunc(e){N(this,Wo,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(S(this,Cs).slotInterval=e.slotInterval),e.maxAttempts!=null&&(S(this,Cs).maxAttempts=e.maxAttempts)}send(){return X(S(this,Zs)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),N(this,Zs,new rte(this)),ee(this,Ic,Jd).call(this,0,m4()+this.timeout,0,this,new Sa(0,"",{},null,this))}cancel(){X(S(this,Zs)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=g7.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();X(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,As,Object.assign({},S(this,As))),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,As,Object.assign({},S(this,As))),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,Cs,Object.assign({},S(this,Cs))),N(e,Wo,S(this,Wo)),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 y7()}static createDataGateway(){return v7}static createIpfsGatewayFunc(e){return m7(e)}};Bu=new WeakMap,Fu=new WeakMap,As=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,Zs=new WeakMap,Cs=new WeakMap,Wo=new WeakMap,Ic=new WeakSet,Jd=async function(e,r,n,s,i){var u,f,d;if(e>=S(this,Cs).maxAttempts)return i.makeServerError("exceeded maximum retry limit");X(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,Zs)));if(h instanceof Sa){let p=h;if(this.processFunc){d1(S(s,Zs));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,Zs)));let l=new Sa(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,Cs).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,Zs));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,Cs).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,Ap,Tn,$u,Oc;const _k=class _k{constructor(e,r,n,s,i){q(this,Ep,void 0);q(this,Sp,void 0);q(this,Ap,void 0);q(this,Tn,void 0);q(this,$u,void 0);q(this,Oc,void 0);N(this,Ep,e),N(this,Sp,r),N(this,Ap,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,Ap))}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{X(!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{X(!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{}X(!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,Ap=new WeakMap,Tn=new WeakMap,$u=new WeakMap,Oc=new WeakMap;let Sa=_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 Za(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*=Za(s):s<0&&(r*=Za(-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*Za(r-1);let s=this.value+n;const i=Za(r);return s=s/i*i,jd(s,S(this,ks),"round"),new zo(Bl,s,S(this,ks))}isZero(){return S(this,st)===xs}isNegative(){return S(this,st)0){const c=Za(a);X(o%c===xs,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=Za(-a));return jd(o,i,"fromValue"),new zo(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{X(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=x7(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 b7(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(i){n=n.concat(b7(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 b7(t))e+=w4[r>>4],e+=w4[r&15];return e}const w7=["wei","kwei","mwei","gwei","szabo","finney","ether"];function mA(t,e){let r=18;if(typeof e=="string"){const n=w7.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=w7.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 mA(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={},E7=new WeakMap;function uc(t){return E7.get(t)}function S4(t,e){E7.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(uc(n),n,r):n):t.reduce((n,s,i)=>{let o=e.getValue(s);return s in n||(r&&o instanceof Uf&&(o=qw(uc(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);q(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,uc(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=uc(this);return n.reduce((s,i,o)=>(X(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=uc(this),i=[],o=[];for(let a=r;a{S(this,Hi)[e]=A4(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,Ko,Rp,Qw,L0,S7;const Nk=class Nk{constructor(e,r,n){q(this,Rp);q(this,L0);z(this,"allowLoose");q(this,un,void 0);q(this,Pn,void 0);q(this,Nc,void 0);q(this,Mc,void 0);q(this,Ko,void 0);me(this,{allowLoose:!!r}),N(this,un,br(e)),N(this,Nc,0),N(this,Mc,null),N(this,Ko,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,Ko));return N(r,Mc,this),r}readBytes(e,r){let n=ee(this,L0,S7).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,Ko=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),X(S(this,Ko)<1||S(this,Nc)<=S(this,Ko)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${S(this,Ko)} ( 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,S7=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:X(!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 gA(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 A7(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){gA(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),Ws=(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 C4(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(!k7(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class xA{clone(){return this._cloneInto()}}const vte={}.toString;function T7(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 P7 extends xA{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,A7(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 P7(t,e).update(r).digest();Gm.create=(t,e)=>new P7(t,e);function gte(t,e,r,n){A7(t);const s=T7({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 bA(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 wA extends xA{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 Ate extends wA{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=Ws(d,7)^Ws(d,18)^d>>>3,y=Ws(h,17)^Ws(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=Ws(a,6)^Ws(a,11)^Ws(a,25),h=u+d+wte(a,c,l)+Ste[f]+Io[f]|0,y=(Ws(n,2)^Ws(n,13)^Ws(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 Ate),p1=BigInt(2**32-1),Yw=BigInt(32);function R7(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 I7(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,O7=(t,e,r)=>t<>>32-r,_7=(t,e,r)=>e<>>32-r,N7=(t,e,r)=>e<>>64-r,M7=(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:R7,split:I7,toBig:Cte,shrSH:kte,shrSL:Tte,rotrSH:Pte,rotrSL:Rte,rotrBH:Ite,rotrBL:Ote,rotr32H:_te,rotr32L:Nte,rotlSH:O7,rotlSL:_7,rotlBH:N7,rotlBL:M7,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 wA{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,C=_o[b-15]|0,O=je.rotrSH(w,C,1)^je.rotrSH(w,C,8)^je.shrSH(w,C,7),_=je.rotrSL(w,C,1)^je.rotrSL(w,C,8)^je.shrSL(w,C,7),A=Oo[b-2]|0,j=_o[b-2]|0,U=je.rotrSH(A,j,19)^je.rotrBH(A,j,61)^je.shrSH(A,j,6),H=je.rotrSL(A,j,19)^je.rotrBL(A,j,61)^je.shrSL(A,j,6),K=je.add4L(_,H,_o[b-7],_o[b-16]),Q=je.add4H(K,O,U,Oo[b-7],Oo[b-16]);Oo[b]=Q|0,_o[b]=K|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),C=je.rotrSL(f,d,14)^je.rotrSL(f,d,18)^je.rotrBL(f,d,41),O=f&h^~f&y,_=d&p^~d&g,A=je.add5L(x,C,_,zte[b],_o[b]),j=je.add5H(A,m,w,O,$te[b],Oo[b]),U=A|0,H=je.rotrSH(n,s,28)^je.rotrBH(n,s,34)^je.rotrBH(n,s,39),K=je.rotrSL(n,s,28)^je.rotrBL(n,s,34)^je.rotrBL(n,s,39),Q=n&i^n&a^i&a,$=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,U|0),l=a|0,u=c|0,a=i|0,c=o|0,i=n|0,o=s|0;const D=je.add3L(U,K,$);n=je.add3H(D,j,H,Q),s=D|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 EA=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 EA.create()}M(!1,"invalid hashing algorithm name","algorithm",t)}function Wte(t,e){const r={sha256:dd,sha512:EA}[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:EA}[s];return M(i!=null,"invalid pbkdf2 algorithm","algorithm",s),bA(i,t,e,{c:r,dkLen:n})}function Qte(t){X(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 D7=!1;const L7=function(t,e,r){return Wte(t,e).update(r).digest()};let j7=L7;function hd(t,e,r){const n=fe(e,"key"),s=fe(r,"data");return ne(j7(t,n,s))}hd._=L7;hd.lock=function(){D7=!0};hd.register=function(t){if(D7)throw new Error("computeHmac is locked");j7=t};Object.freeze(hd);const[B7,F7,U7]=[[],[],[]],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],B7.push(2*(5*n+r)),F7.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?N7(t,e,r):O7(t,e,r),R4=(t,e,r)=>r>32?M7(t,e,r):_7(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=F7[o],c=P4(s,i,a),l=R4(s,i,a),u=B7[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 SA extends xA{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 SA(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 SA(e,t,r)),ire=sre(1,136,256/8);let V7=!1;const $7=function(t){return ire(t)};let z7=$7;function At(t){const e=fe(t,"data");return ne(z7(e))}At._=$7;At.lock=function(){V7=!0};At.register=function(t){if(V7)throw new TypeError("keccak256 is locked");z7=t};Object.freeze(At);const ore=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),H7=Uint8Array.from({length:16},(t,e)=>e),are=H7.map(t=>(9*t+5)%16);let AA=[H7],CA=[are];for(let t=0;t<4;t++)for(let e of[AA,CA])e.push(e[t].map(r=>ore[r]));const G7=[[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=AA.map((t,e)=>t.map(r=>G7[e][r])),lre=CA.map((t,e)=>t.map(r=>G7[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 wA{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=AA[h],x=CA[h],b=cre[h],w=lre[h];for(let C=0;C<16;C++){const O=y1(n+I4(h,i,a,l)+v1[m[C]]+y,b[C])+f|0;n=f,f=l,l=y1(a,10)|0,a=i,i=O}for(let C=0;C<16;C++){const O=y1(s+I4(p,o,c,u)+v1[x[C]]+g,w[C])+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 q7=!1;const W7=function(t){return hre(t)};let K7=W7;function pd(t){const e=fe(t,"data");return ne(K7(e))}pd._=W7;pd.lock=function(){q7=!0};pd.register=function(t){if(q7)throw new TypeError("ripemd160 is locked");K7=t};Object.freeze(pd);let Q7=!1;const Y7=function(t,e,r,n,s){return Kte(t,e,r,n,s)};let J7=Y7;function Ha(t,e,r,n,s){const i=fe(t,"password"),o=fe(e,"salt");return ne(J7(i,o,r,n,s))}Ha._=Y7;Ha.lock=function(){Q7=!0};Ha.register=function(t){if(Q7)throw new Error("pbkdf2 is locked");J7=t};Object.freeze(Ha);let X7=!1;const Z7=function(t){return new Uint8Array(Qte(t))};let eM=Z7;function co(t){return eM(t)}co._=Z7;co.lock=function(){X7=!0};co.register=function(t){if(X7)throw new Error("randomBytes is locked");eM=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++],C=t[e++]^r[n++],O=o,_=a,A=c,j=l,U=u,H=f,K=d,Q=h,$=p,D=y,T=g,P=m,R=x,I=b,F=w,B=C;for(let J=0;J<8;J+=2)U^=Ye(O+R|0,7),$^=Ye(U+O|0,9),R^=Ye($+U|0,13),O^=Ye(R+$|0,18),D^=Ye(H+_|0,7),I^=Ye(D+H|0,9),_^=Ye(I+D|0,13),H^=Ye(_+I|0,18),F^=Ye(T+K|0,7),A^=Ye(F+T|0,9),K^=Ye(A+F|0,13),T^=Ye(K+A|0,18),j^=Ye(B+P|0,7),Q^=Ye(j+B|0,9),P^=Ye(Q+j|0,13),B^=Ye(P+Q|0,18),_^=Ye(O+j|0,7),A^=Ye(_+O|0,9),j^=Ye(A+_|0,13),O^=Ye(j+A|0,18),K^=Ye(H+U|0,7),Q^=Ye(K+H|0,9),U^=Ye(Q+K|0,13),H^=Ye(U+Q|0,18),P^=Ye(T+D|0,7),$^=Ye(P+T|0,9),D^=Ye($+P|0,13),T^=Ye(D+$|0,18),R^=Ye(B+F|0,7),I^=Ye(R+B|0,9),F^=Ye(I+R|0,13),B^=Ye(F+I|0,18);s[i++]=o+O|0,s[i++]=a+_|0,s[i++]=c+A|0,s[i++]=l+j|0,s[i++]=u+U|0,s[i++]=f+H|0,s[i++]=d+K|0,s[i++]=h+Q|0,s[i++]=p+$|0,s[i++]=y+D|0,s[i++]=g+T|0,s[i++]=m+P|0,s[i++]=x+R|0,s[i++]=b+I|0,s[i++]=w+F|0,s[i++]=C+B|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 tM(t,e,r){const n=T7({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=bA(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 C=0;x=()=>{C++,u&&(!(C%w)||C===b)&&u(C/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 rM(t,e,r,n,s){const i=bA(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}=tM(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 C4(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;rdM;t>>=qm,e+=1);return e}function Ere(t,e){return t>>BigInt(e)&qm}const Sre=(t,e,r)=>t|(r?qm:dM)<(vre<new Uint8Array(t),_4=t=>Uint8Array.from(t);function pM(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 Are={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=Are[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:Ere,bitLen:wre,bitMask:RA,bitSet:Sre,bytesToHex:zf,bytesToNumberBE:tl,bytesToNumberLE:TA,concatBytes:Zh,createHmacDrbg:pM,ensureBytes:Ss,equalBytes:xre,hexToBytes:Hf,hexToNumber:kA,numberToBytesBE:Gf,numberToBytesLE:PA,numberToHexUnpadded:hM,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),fc=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)/fc;let r,n,s;for(r=t-Kt,n=0;r%fc===fr;r/=fc,n++);for(s=fc;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 yM(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}=yM(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:RA(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?PA(c,i):Gf(c,i),fromBytes:c=>{if(c.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${c.length}`);return r?TA(c):tl(c)}});return Object.freeze(a)}function vM(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 mM(t){const e=vM(t);return e+Math.ceil(e/2)}function Dre(t,e,r=!1){const n=t.length,s=vM(e),i=mM(e);if(n<16||n1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const o=r?tl(t):TA(t),a=dn(o,e-Kt)+Kt;return r?PA(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 gM(t){return Ore(t.Fp),my(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...yM(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Bre(t){const e=gM(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}=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: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:C}=y,O=r.eql(r.mul(g,C),r.mul(b,x)),_=r.eql(r.mul(m,C),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 C=r.ZERO,O=r.ZERO,_=r.ZERO,A=r.mul(x,x),j=r.mul(b,b),U=r.mul(w,w),H=r.mul(x,b);return H=r.add(H,H),_=r.mul(x,w),_=r.add(_,_),C=r.mul(y,_),O=r.mul(m,U),O=r.add(C,O),C=r.sub(j,O),O=r.add(j,O),O=r.mul(C,O),C=r.mul(H,C),_=r.mul(m,_),U=r.mul(y,U),H=r.sub(A,U),H=r.mul(y,H),H=r.add(H,_),_=r.add(A,A),A=r.add(_,A),A=r.add(A,U),A=r.mul(A,H),O=r.add(O,A),U=r.mul(b,w),U=r.add(U,U),A=r.mul(U,H),C=r.sub(C,A),_=r.mul(U,j),_=r.add(_,_),_=r.add(_,_),new f(C,O,_)}add(y){u(y);const{px:g,py:m,pz:x}=this,{px:b,py:w,pz:C}=y;let O=r.ZERO,_=r.ZERO,A=r.ZERO;const j=e.a,U=r.mul(e.b,D4);let H=r.mul(g,b),K=r.mul(m,w),Q=r.mul(x,C),$=r.add(g,m),D=r.add(b,w);$=r.mul($,D),D=r.add(H,K),$=r.sub($,D),D=r.add(g,x);let T=r.add(b,C);return D=r.mul(D,T),T=r.add(H,Q),D=r.sub(D,T),T=r.add(m,x),O=r.add(w,C),T=r.mul(T,O),O=r.add(K,Q),T=r.sub(T,O),A=r.mul(j,D),O=r.mul(U,Q),A=r.add(O,A),O=r.sub(K,A),A=r.add(K,A),_=r.mul(O,A),K=r.add(H,H),K=r.add(K,H),Q=r.mul(j,Q),D=r.mul(U,D),K=r.add(K,Q),Q=r.sub(H,Q),Q=r.mul(j,Q),D=r.add(D,Q),H=r.mul(K,D),_=r.add(_,H),H=r.mul(T,D),O=r.mul($,O),O=r.sub(O,H),H=r.mul($,K),A=r.mul(T,A),A=r.add(A,H),new f(O,_,A)}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:C}=m.splitScalar(y),O=g,_=g,A=this;for(;b>eo||C>eo;)b&ss&&(O=O.add(A)),C&ss&&(_=_.add(A)),A=A.double(),b>>=ss,C>>=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:C,k2neg:O,k2:_}=b.splitScalar(g);let{p:A,f:j}=this.wNAF(C),{p:U,f:H}=this.wNAF(_);A=h.constTimeNegate(w,A),U=h.constTimeNegate(O,U),U=new f(r.mul(U.px,b.beta),U.py,U.pz),m=A.add(U),x=j.add(H)}else{const{p:w,f:C}=this.wNAF(g);m=w,x=C}return f.normalizeZ([m,x])[0]}multiplyAndAddUnsafe(y,g,m){const x=f.BASE,b=(C,O)=>O===eo||O===ss||!C.equals(x)?C.multiplyUnsafe(O):C.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),C=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:C}}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=gM(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(D){return eozf(Gf(D,e.nByteLength));function p(D){const T=n>>ss;return D>T}function y(D){return p(D)?a(-D):D}const g=(D,T,P)=>tl(D.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,F=_(Ss("msgHash",T));if(I==null||![0,1,2,3].includes(I))throw new Error("recovery id invalid");const B=I===2||I===3?P+e.n:P;if(B>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const J=I&1?"03":"02",se=l.fromHex(J+h(B)),ae=c(B),Se=a(-F*ae),ve=a(R*ae),oe=l.BASE.multiplyAndAddUnsafe(se,Se,ve);if(!oe)throw new Error("point at infinify");return oe.assertValidity(),oe}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(D){try{return u(D),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const D=mM(e.n);return Dre(e.randomBytes(D),e.n)},precompute(D=8,T=l.BASE){return T._setWindowSize(D),T.multiply(BigInt(3)),T}};function b(D,T=!0){return l.fromPrivateKey(D).toRawBytes(T)}function w(D){const T=D instanceof Uint8Array,P=typeof D=="string",R=(T||P)&&D.length;return T?R===s||R===i:P?R===2*s||R===2*i:D instanceof l}function C(D,T,P=!0){if(w(D))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(D)).toRawBytes(P)}const O=e.bits2int||function(D){const T=tl(D),P=D.length*8-e.nBitLength;return P>0?T>>BigInt(P):T},_=e.bits2int_modN||function(D){return a(O(D))},A=RA(e.nBitLength);function j(D){if(typeof D!="bigint")throw new Error("bigint expected");if(!(eo<=D&&DBe in P))throw new Error("sign() legacy options not supported");const{hash:R,randomBytes:I}=e;let{lowS:F,prehash:B,extraEntropy:J}=P;F==null&&(F=!0),D=Ss("msgHash",D),B&&(D=Ss("prehashed msgHash",R(D)));const se=_(D),ae=u(T),Se=[j(ae),j(se)];if(J!=null){const Be=J===!0?I(r.BYTES):J;Se.push(Ss("extraEntropy",Be))}const ve=Zh(...Se),oe=se;function Me(Be){const Pe=O(Be);if(!d(Pe))return;const De=c(Pe),ze=l.BASE.multiply(Pe).toAffine(),at=a(ze.x);if(at===eo)return;const qe=a(De*a(oe+at*ae));if(qe===eo)return;let Kr=(ze.x===at?0:2)|Number(ze.y&ss),vs=qe;return F&&p(qe)&&(vs=y(qe),Kr^=1),new m(at,vs,Kr)}return{seed:ve,k2sig:Me}}const H={lowS:e.lowS,prehash:!1},K={lowS:e.lowS,prehash:!1};function Q(D,T,P=H){const{seed:R,k2sig:I}=U(D,T,P),F=e;return pM(F.hash.outputLen,F.nByteLength,F.hmac)(R,I)}l.BASE._setWindowSize(8);function $(D,T,P,R=K){var ze;const I=D;if(T=Ss("msgHash",T),P=Ss("publicKey",P),"strict"in R)throw new Error("options.strict was renamed to lowS");const{lowS:F,prehash:B}=R;let J,se;try{if(typeof I=="string"||I instanceof Uint8Array)try{J=m.fromDER(I)}catch(at){if(!(at instanceof wc.Err))throw at;J=m.fromCompact(I)}else if(typeof I=="object"&&typeof I.r=="bigint"&&typeof I.s=="bigint"){const{r:at,s:qe}=I;J=new m(at,qe)}else throw new Error("PARSE");se=l.fromHex(P)}catch(at){if(at.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(F&&J.hasHighS())return!1;B&&(T=e.hash(T));const{r:ae,s:Se}=J,ve=_(T),oe=c(Se),Me=a(ve*oe),Be=a(ae*oe),Pe=(ze=l.BASE.multiplyAndAddUnsafe(se,Me,Be))==null?void 0:ze.toAffine();return Pe?a(Pe.x)===ae:!1}return{CURVE:e,getPublicKey:b,getSharedSecret:C,sign:Q,verify:$,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 xM=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),L4=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),qre=BigInt(1),Zw=BigInt(2),j4=(t,e)=>(t+e/Zw)/e;function Wre(t){const e=xM,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,C=qn(w,n,e)*l%e,O=qn(C,Zw,e);if(!e2.eql(e2.sqr(O),t))throw new Error("Cannot find square root");return O}const e2=Mre(xM,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){q(this,Gu,void 0);q(this,qu,void 0);q(this,Wu,void 0);q(this,Dc,void 0);za(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 Vs=bs;var Gi;const dc=class dc{constructor(e){q(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 Vs.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=Vs.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(At(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 IA={};for(let t=0;t<10;t++)IA[String(t)]=String(t);for(let t=0;t<26;t++)IA[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=>IA[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 Ao{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 Ao{constructor(r){super(r.name,r.type,"_",r.dynamic);z(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 wM(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 X(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),X(!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 EM(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 Ao{constructor(r,n,s){const i=r.type+"["+(n>=0?n:"")+"]",o=n===-1||r.dynamic;super("array",i,s,o);z(this,"coder");z(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=f7(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 SM{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 Ao{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);z(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 wM(r,this.coders,s)}decode(r){return EM(r,this.coders)}}function Ar(t){return At(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 C=1;C>--c&1}const f=31,d=2**f,h=d>>>1,p=h>>1,y=d-1;let g=0;for(let C=0;C1;){let U=O+_>>>1;C>>1|u(),A=A<<1^h,j=(j^h)<<1|h|1;x=A,b=1+j-A}let w=n-4;return m.map(C=>{switch(C-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 C-1}})}function mne(t){let e=0;return()=>t[e++]}function AM(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 kM(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 TM(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 TM(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 TM(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 Ane(t){return t.toString(16).toUpperCase().padStart(2,"0")}function PM(t){return`{${Ane(t)}}`}function Cne(t){let e=[];for(let r=0,n=t.length;r>24&255}function OM(t){return t&16777215}let t2,Y4,r2,tv;function Nne(){let t=AM(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 kM(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 _M(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 NM(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(_M(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 MM(t){return NM(t).map(OM)}function Lne(t){return Dne(NM(t))}const J4=45,DM=".",LM=65039,jM=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,BM,Ec,s2,FM,_u,Ax,ql,ac,X4,i2;function OA(){if(n2)return;let t=AM(yne);const e=()=>ep(t),r=()=>new Set(e()),n=(u,f)=>f.forEach(d=>u.add(d));n2=new Map(kM(t)),BM=r(),Ec=e(),s2=new Set(e().map(u=>Ec[u])),Ec=new Set(Ec),FM=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}}}),Ax=r(),ql=new Map;let a=e().concat(v0(Ax)).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),Ax.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)}}ac=new Set;let c=new Set;const l=u=>ac.has(u)?c.add(u):ac.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 ac)!ql.has(u)&&!c.has(u)&&ql.set(u,jM);n(ac,MM(ac)),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===LM?f.push(...h):f=h}for(let d of f)d.V=u}}function _A(t){return(UM(t)?"":`${NA(Km([t]))} `)+PM(t)}function NA(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=Cne(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))?$M(e[0],r):VM(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 ${NA(Km(e,63))}: ${s}`)}return qf(n)}).join(DM)}function VM(t){return new Error(`disallowed character: ${_A(t)}`)}function $M(t,e){let r=_A(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 $M(t,r);if(t.M){let r=MM(e);for(let n=1,s=r.length;nQ4)throw new Error(`excessive non-spacing marks: ${NA(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(ac.has(o))s.push(o);else{let a=n2.get(o);if(a)s.push(...a);else if(!BM.has(o))throw VM(o)}}}return s.length&&n.push(e(s)),n}function Qne(t){return t.filter(e=>e!=LM)}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 zM=new Uint8Array(32);zM.fill(0);function Z4(t){return M(t.length!==0,"invalid ENS name; empty component","comp",t),t}function HM(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 Cx(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),Cx(r[0],r[1])):(M(r!=null&&typeof r=="object","invalid address-slot set","value",t),Cx(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 Cx(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(At("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 MA(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 DA(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 ei,Ku,Qu,Yu,Ju,Xu,Zu,ef,tf,rf,nf,sf,jc,Qo,qi,Yo,of,rv;const ji=class ji{constructor(){q(this,of);q(this,ei,void 0);q(this,Ku,void 0);q(this,Qu,void 0);q(this,Yu,void 0);q(this,Ju,void 0);q(this,Xu,void 0);q(this,Zu,void 0);q(this,ef,void 0);q(this,tf,void 0);q(this,rf,void 0);q(this,nf,void 0);q(this,sf,void 0);q(this,jc,void 0);q(this,Qo,void 0);q(this,qi,void 0);q(this,Yo,void 0);N(this,ei,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,Qo,null),N(this,Yo,null),N(this,qi,null)}get type(){return S(this,ei)}set type(e){switch(e){case null:N(this,ei,null);break;case 0:case"legacy":N(this,ei,0);break;case 1:case"berlin":case"eip-2930":N(this,ei,1);break;case 2:case"london":case"eip-1559":N(this,ei,2);break;case 3:case"cancun":case"eip-4844":N(this,ei,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:Vs.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,Qo);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,Yo,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,Qo);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&X(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),X(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),X(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))}X(!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=Vs.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}};ei=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,Qo=new WeakMap,qi=new WeakMap,Yo=new WeakMap,of=new WeakSet,rv=function(e,r){X(!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)}X(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let sp=ji;function pse(t){return typeof t=="string"&&(t=Sr(t)),At(ot([Sr(Kre),Sr(String(t.length)),t]))}const GM=new Uint8Array(32);GM.fill(0);const yse=BigInt(-1),qM=BigInt(0),WM=BigInt(1),vse=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function mse(t){const e=fe(t),r=e.length%32;return r?ot([e,GM.slice(r)]):ne(e)}const gse=go(WM,32),xse=go(qM,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+WM)*yse:qM;return function(o){const a=ye(o,"value");return M(a>=i&&a<=s,`value out-of-bounds for ${t}`,"value",a),go(r?f7(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 At(e)};case"string":return function(e){return Ar(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,KM;const Xn=class Xn{constructor(e){q(this,j0);z(this,"primaryType");q(this,Ip,void 0);q(this,Wi,void 0);q(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,KM).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 At(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 At(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,KM=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(At)),At(ot(a))}}const n=this.types[e];if(n){const s=Ar(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)?At(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(" ")),QM="constant external internal payable private public pure view override",Sse=nn(QM.split(" ")),YM="constructor error event fallback function receive struct",JM=nn(YM.split(" ")),XM="calldata memory storage payable indexed",Ase=nn(XM.split(" ")),Cse="tuple returns",kse=[YM,XM,Cse,QM].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$_]*)"),ZM=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),eD=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var vr,Ps,Op,a2;const B0=class B0{constructor(e){q(this,Op);q(this,vr,void 0);q(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 $s=B0;function Ga(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(eD)){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 $s(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(JM)){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 tD(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=>Cr.from(r,e))}function rD(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(eD);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){q(this,cf);z(this,"name");z(this,"type");z(this,"baseType");z(this,"indexed");z(this,"components");z(this,"arrayLength");z(this,"arrayChildren");if(za(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(Ga(e),r)}catch{M(!1,"invalid param type","obj",e)}else if(e instanceof $s){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,Ase).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(ZM),"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 Cr=Zn;class gl{constructor(e,r,n){z(this,"type");z(this,"inputs");za(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(Ga(e))}if(e instanceof $s)switch(e.peekKeyword(JM)){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)}X(!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);z(this,"name");M(typeof s=="string"&&s.match(ZM),"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 Ar(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(Ga(e));if(e instanceof $s){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(Cr.from):[])}static isFragment(e){return e&&e[bn]===a3}}class li extends Jm{constructor(r,n,s,i){super(r,"event",n,s);z(this,"anonymous");Object.defineProperty(this,bn,{value:c3}),me(this,{anonymous:i})}get topicHash(){return Ar(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=>Cr.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(Ga(r))}catch{M(!1,"invalid event fragment","obj",r)}else if(r instanceof $s){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=>Cr.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);z(this,"payable");z(this,"gas");Object.defineProperty(this,bn,{value:l3}),me(this,{payable:i,gas:o})}format(r){if(X(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(Ga(r))}catch{M(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof $s){bo(r,nn(["constructor"]));const n=lo(r),s=!!bo(r,Ese).has("payable"),i=rD(r);return ml(r),new so(Pt,"constructor",n,s,i)}return new so(Pt,"constructor",r.inputs?r.inputs.map(Cr.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);z(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(Ga(r))}catch{M(!1,"invalid fallback fragment","obj",r)}else if(r instanceof $s){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=[Cr.from("bytes")];const a=tD(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=[Cr.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);z(this,"constant");z(this,"outputs");z(this,"stateMutability");z(this,"payable");z(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 Ar(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=>Cr.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(Ga(r))}catch{M(!1,"invalid function fragment","obj",r)}else if(r instanceof $s){const s=Ym("function",r),i=lo(r),o=tD(r);let a=[];bo(r,nn(["returns"])).has("returns")&&(a=lo(r));const c=rD(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(Cr.from):[],r.outputs?r.outputs.map(Cr.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(Ga(e))}catch{M(!1,"invalid struct fragment","obj",e)}else if(e instanceof $s){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(Cr.from):[])}static isFragment(e){return e&&e[bn]===d3}}const Hs=new Map;Hs.set(0,"GENERIC_PANIC");Hs.set(1,"ASSERT_FALSE");Hs.set(17,"OVERFLOW");Hs.set(18,"DIVIDE_BY_ZERO");Hs.set(33,"ENUM_RANGE_ERROR");Hs.set(34,"BAD_STORAGE_DATA");Hs.set(49,"STACK_UNDERFLOW");Hs.set(50,"ARRAY_RANGE_ERROR");Hs.set(65,"OUT_OF_MEMORY");Hs.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 ${Hs.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 Jo,Wl;const F0=class F0{constructor(){q(this,Jo)}getDefaultValue(e){const r=e.map(s=>ee(this,Jo,Wl).call(this,Cr.from(s)));return new g1(r,"_").defaultValue()}encode(e,r){a7(r.length,e.length,"types/values length mismatch");const n=e.map(o=>ee(this,Jo,Wl).call(this,Cr.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,Jo,Wl).call(this,Cr.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())}};Jo=new WeakSet,Wl=function(e){if(e.isArray())return new sne(ee(this,Jo,Wl).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new g1(e.components.map(n=>ee(this,Jo,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){z(this,"fragment");z(this,"name");z(this,"signature");z(this,"topic");z(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){z(this,"fragment");z(this,"name");z(this,"args");z(this,"signature");z(this,"selector");z(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){z(this,"fragment");z(this,"name");z(this,"args");z(this,"signature");z(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){z(this,"hash");z(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 ti,ri,ni,Dr,lf,sv,uf,iv;const hc=class hc{constructor(e){q(this,lf);q(this,uf);z(this,"fragments");z(this,"deploy");z(this,"fallback");z(this,"receive");q(this,ti,void 0);q(this,ri,void 0);q(this,ni,void 0);q(this,Dr,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,N(this,ni,new Map),N(this,ti,new Map),N(this,ri,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,ni);break;case"event":c=S(this,ri);break;case"error":c=S(this,ti);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,ni).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,ti).get(e);return n||null}forEachError(e){const r=Array.from(S(this,ti).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;ni.type==="string"?Ar(o):i.type==="bytes"?At(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(Ar(c));else if(o.type==="bytes")n.push(At(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(Cr.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)}};ti=new WeakMap,ri=new WeakMap,ni=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,ni).values())if(i===o.selector)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of S(this,ni))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,ni).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,ri).values())if(i===o.topicHash)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){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,ri).get(li.from(e).format());return s||null};let c2=hc;const nD=BigInt(0);function Nu(t){return t??null}function Gt(t){return t==null?null:t.toString()}class m3{constructor(e,r,n){z(this,"gasPrice");z(this,"maxFeePerGas");z(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){z(this,"provider");z(this,"number");z(this,"hash");z(this,"timestamp");z(this,"parentHash");z(this,"parentBeaconBlockRoot");z(this,"nonce");z(this,"difficulty");z(this,"gasLimit");z(this,"gasUsed");z(this,"stateRoot");z(this,"receiptsRoot");z(this,"blobGasUsed");z(this,"excessBlobGas");z(this,"miner");z(this,"prevRandao");z(this,"extraData");z(this,"baseFeePerGas");q(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?[]:(X(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=nD;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;X(!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 X(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),oD(this)}reorderedEvent(e){return X(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),X(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),iD(this,e)}replaceableTransaction(e){M(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new Mk(this,this.provider);return N(r,Xo,e),r}};Xo=new WeakMap;let cp=Mk;function Use(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function iD(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function oD(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 jA extends by{constructor(r,n,s){super(r,r.provider);z(this,"interface");z(this,"fragment");z(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 aD extends by{constructor(r,n){super(r,r.provider);z(this,"error");me(this,{error:n})}}var ff;class $se extends sD{constructor(r,n,s){super(s,n);q(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 jA(r,S(this,ff),n)}catch(s){return new aD(r,s)}return r})}}ff=new WeakMap;var Np;class BA extends cp{constructor(r,n,s){super(s,n);q(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 cD extends h7{constructor(r,n,s,i){super(r,n,s);z(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 cD{constructor(e,r,n,s,i){super(e,r,n,new jA(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 lD(t){return t&&typeof t.call=="function"}function uD(t){return t&&typeof t.estimateGas=="function"}function Xm(t){return t&&typeof t.resolveName=="function"}function fD(t){return t&&typeof t.sendTransaction=="function"}function dD(t){if(t!=null){if(Xm(t))return t;if(t.provider)return t.provider}}var Mp;class Hse{constructor(e,r,n){q(this,Mp,void 0);z(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 hD(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 hD(o,["data"]);a.to=await t.getAddress(),a.from&&(a.from=await wr(a.from,dD(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");X(lD(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 vA(l)&&l.data?t.interface.makeError(l.data,c):l}},n=async function(o){const a=t.runner;X(fD(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 BA(t.interface,l,c)},s=async function(o){const a=xl(t.runner,"estimateGas");return X(uD(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 X(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 hD(l.pop()),f.from&&(f.from=await wr(f.from,dD(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;X(fD(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 BA(t.interface,d,f)},o=async function(...l){const u=xl(t.runner,"estimateGas");return X(uD(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");X(lD(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 vA(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 X(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 X(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 X(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),s}}),n}const m0=Symbol.for("_ethersInternal_contract"),pD=new WeakMap;function Qse(t,e){pD.set(t[m0],e)}function Cn(t){return pD.get(t[m0])}function Yse(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function FA(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}=Cn(t);return r.get((await FA(t,e)).tag)||null}async function x3(t,e,r){const n=Sc(t.runner);X(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:s,tag:i,topics:o}=await FA(t,r),{addr:a,subs:c}=Cn(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 cD(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(),Cn(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 Ah=class Ah{constructor(e,r,n,s){z(this,"target");z(this,"interface");z(this,"runner");z(this,"filters");z(this,P1e);z(this,"fallback");M(typeof e=="string"||bM(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 BA(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 Cn(this).addr=d,d})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return Cn(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 Ah(this.target,this.interface,e)}attach(e){return new Ah(e,this.interface,this.runner)}async getAddress(){return await Cn(this).addrPromise}async getDeployedCode(){const e=Sc(this.runner);X(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 X(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 Cn(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}=Cn(this),o=s||await i,{fragment:a,topics:c}=await FA(this,e),l={address:o,topics:c,fromBlock:r,toBlock:n},u=Sc(this.runner);return X(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 jA(f,this.interface,d)}catch(h){return new aD(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}=Cn(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}=Cn(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(),Cn(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await Zd(this,e);if(!r)return this;r.stop(),Cn(this).subs.delete(r.tag)}else{const{subs:r}=Cn(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 Ah{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=Ah;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){z(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 yD=new RegExp("^(ipfs)://(.*)$","i"),b3=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),yD,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Zo,Bc,ea,Kl,U0,vD;const gu=class gu{constructor(e,r,n){q(this,ea);z(this,"provider");z(this,"address");z(this,"name");q(this,Zo,void 0);q(this,Bc,void 0);me(this,{provider:e,address:r,name:n}),N(this,Zo,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,Zo)==null&&N(this,Zo,(async()=>{try{return await S(this,Bc).supportsInterface("0x9061b923")}catch(e){if(Vr(e,"CALL_EXCEPTION"))return!1;throw N(this,Zo,null),e}})()),await S(this,Zo)}async getAddress(e){if(e==null&&(e=60),e===60)try{const i=await ee(this,ea,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,ea,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,ea,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;X(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await ee(this,ea,Kl).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await ee(this,ea,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}://${d7("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;X(!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";X(!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:mD(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 mD(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=Vs.from(t.signature):e.signature=Vs.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){z(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}`);z(this,"effectiveBlock");z(this,"txBase");z(this,"txCreate");z(this,"txDataZero");z(this,"txDataNonzero");z(this,"txAccessListStorageKey");z(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");z(this,"address");z(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");q(this,Dp,void 0);q(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,ta;const xu=class xu{constructor(e,r){q(this,df,void 0);q(this,hf,void 0);q(this,ta,void 0);N(this,df,e),N(this,hf,ye(r)),N(this,ta,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,ta).values())}attachPlugin(e){if(S(this,ta).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return S(this,ta).set(e.name,e.clone()),this}getPlugin(e){return S(this,ta).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){X(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:s,error:i})}})}let A3=!1;function fie(){if(A3)return;A3=!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,ra,si,pf,ov;class die{constructor(e){q(this,pf);q(this,Qi,void 0);q(this,es,void 0);q(this,ra,void 0);q(this,si,void 0);N(this,Qi,e),N(this,es,null),N(this,ra,4e3),N(this,si,-2)}get pollingInterval(){return S(this,ra)}set pollingInterval(e){N(this,ra,e)}start(){S(this,es)||(N(this,es,S(this,Qi)._setTimeout(ee(this,pf,ov).bind(this),S(this,ra))),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,si,-2)}resume(){this.start()}}Qi=new WeakMap,es=new WeakMap,ra=new WeakMap,si=new WeakMap,pf=new WeakSet,ov=async function(){try{const e=await S(this,Qi).getBlockNumber();if(S(this,si)===-2){N(this,si,e);return}if(e!==S(this,si)){for(let r=S(this,si)+1;r<=e;r++){if(S(this,es)==null)return;await S(this,Qi).emit("block",r)}N(this,si,e)}}catch{}S(this,es)!=null&&N(this,es,S(this,Qi)._setTimeout(ee(this,pf,ov).bind(this),S(this,ra)))};var Fc,Uc,na;class UA{constructor(e){q(this,Fc,void 0);q(this,Uc,void 0);q(this,na,void 0);N(this,Fc,e),N(this,na,!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,na)||(N(this,na,!0),S(this,Uc).call(this,-2),S(this,Fc).on("block",S(this,Uc)))}stop(){S(this,na)&&(N(this,na,!1),S(this,Fc).off("block",S(this,Uc)))}pause(e){this.stop()}resume(){this.start()}}Fc=new WeakMap,Uc=new WeakMap,na=new WeakMap;var yf,Yi;class hie extends UA{constructor(r,n){super(r);q(this,yf,void 0);q(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 UA{constructor(r,n){super(r);q(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 UA{constructor(r,n){super(r);q(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,sa,ts,$0,gD;class VA{constructor(e,r){q(this,$0);q(this,Ji,void 0);q(this,mf,void 0);q(this,gf,void 0);q(this,sa,void 0);q(this,ts,void 0);N(this,Ji,e),N(this,mf,d2(r)),N(this,gf,ee(this,$0,gD).bind(this)),N(this,sa,!1),N(this,ts,-2)}start(){S(this,sa)||(N(this,sa,!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,sa)&&(N(this,sa,!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,sa=new WeakMap,ts=new WeakMap,$0=new WeakSet,gD=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 xD{constructor(e){z(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,ia,jr,xf,Rn,Vc,oa,Xi,jp,rs,bf,wf,Jr,An,Bp,p2,Fp,y2,$c,eh,Up,v2,zc,th,Ef,cv;class bie{constructor(e,r){q(this,Jr);q(this,Bp);q(this,Fp);q(this,$c);q(this,Up);q(this,zc);q(this,Ef);q(this,Lr,void 0);q(this,ia,void 0);q(this,jr,void 0);q(this,xf,void 0);q(this,Rn,void 0);q(this,Vc,void 0);q(this,oa,void 0);q(this,Xi,void 0);q(this,jp,void 0);q(this,rs,void 0);q(this,bf,void 0);q(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,oa,new Map),N(this,Lr,new Map),N(this,ia,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,ia).values())}attachPlugin(e){if(S(this,ia).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return S(this,ia).set(e.name,e.connect(this)),this}getPlugin(e){return S(this,ia).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)}X(!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 sD(cie(e),this)}_wrapTransactionResponse(e,r){return new cp(mD(e),this)}_detectNetwork(){X(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){X(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=_e(await ee(this,Jr,An).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))):X(!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,An).call(this,{method:"getGasPrice"});return ye(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ee(this,Jr,An).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,An).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,An).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,An).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const s=await ee(this,Jr,An).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,An).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,An).call(this,{method:"getLogs",filter:r})});return s.map(i=>this._wrapLog(i,n))}_getProvider(e){X(!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){X(!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 xD(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 VA(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 h7(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;X(!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,ia=new WeakMap,jr=new WeakMap,xf=new WeakMap,Rn=new WeakMap,Vc=new WeakMap,oa=new WeakMap,Xi=new WeakMap,jp=new WeakMap,rs=new WeakMap,bf=new WeakMap,wf=new WeakMap,Jr=new WeakSet,An=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,oa).get(n);return s||(s=this._perform(e),S(this,oa).set(n,s),setTimeout(()=>{S(this,oa).get(n)===s&&S(this,oa).delete(n)},r)),await s},Bp=new WeakSet,p2=async function(e,r,n){X(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){X(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:s,info:{data:o}})}X(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);X(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,Aie([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,An).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,An).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await ee(this,Jr,An).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 C3(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 Aie(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);X(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;X(!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 $A{constructor(e){z(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();X(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?(X(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):X(!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 $A{constructor(r,n){super(n);q(this,Sf);z(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){X(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let g2=Dk;function kie(t){return JSON.parse(JSON.stringify(t))}var Xr,ii,Hc,aa,Gc,Af,Vp,x2,$p,b2;class bD{constructor(e){q(this,Vp);q(this,$p);q(this,Xr,void 0);q(this,ii,void 0);q(this,Hc,void 0);q(this,aa,void 0);q(this,Gc,void 0);q(this,Af,void 0);N(this,Xr,e),N(this,ii,null),N(this,Hc,ee(this,Vp,x2).bind(this)),N(this,aa,!1),N(this,Gc,null),N(this,Af,!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,aa)||(N(this,aa,!0),ee(this,Vp,x2).call(this,-2))}stop(){S(this,aa)&&(N(this,aa,!1),N(this,Af,!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,ii=new WeakMap,Hc=new WeakMap,aa=new WeakMap,Gc=new WeakMap,Af=new WeakMap,Vp=new WeakSet,x2=async function(e){try{S(this,ii)==null&&N(this,ii,this._subscribe(S(this,Xr)));let r=null;try{r=await S(this,ii)}catch(i){if(!Vr(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(r==null){N(this,ii,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,Af))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,ii);e&&(N(this,ii,null),e.then(r=>{S(this,Xr).destroyed||S(this,Xr).send("eth_uninstallFilter",[r])}))};var qc;class Tie extends bD{constructor(r,n){super(r);q(this,qc,void 0);N(this,qc,kie(n))}_recover(r){return new VA(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 bD{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 wD={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class Mx extends $A{constructor(r,n){super(r);z(this,"address");n=Xe(n),me(this,{address:n})}connect(r){X(!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,Cf,Zi,oi,Rs,ns,fn,zp,w2;class Oie extends bie{constructor(r,n){super(r,n);q(this,zp);q(this,Wc,void 0);q(this,Cf,void 0);q(this,Zi,void 0);q(this,oi,void 0);q(this,Rs,void 0);q(this,ns,void 0);q(this,fn,void 0);N(this,Cf,1),N(this,Wc,Object.assign({},wD,n||{})),N(this,Zi,[]),N(this,oi,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 X(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,Cf)._++,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 VA(this,r.filter):new Tie(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new xD("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,Cf)._++,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,oi)&&(clearTimeout(S(this,oi)),N(this,oi,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,Cf=new WeakMap,Zi=new WeakMap,oi=new WeakMap,Rs=new WeakMap,ns=new WeakMap,fn=new WeakMap,zp=new WeakSet,w2=function(){if(S(this,oi))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");N(this,oi,setTimeout(()=>{N(this,oi,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 ca;class _ie extends Oie{constructor(r,n){super(r,n);q(this,ca,void 0);let s=this._getOption("pollingInterval");s==null&&(s=wD.pollingInterval),N(this,ca,s)}_getSubscriber(r){const n=super._getSubscriber(r);return P3(n)&&(n.pollingInterval=S(this,ca)),n}get pollingInterval(){return S(this,ca)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");N(this,ca,r),this._forEachSubscriber(n=>{P3(n)&&(n.pollingInterval=S(this,ca))})}}ca=new WeakMap;var kf,J8;let ED=(J8=class extends _ie{constructor(r,n,s){r==null&&(r="http://localhost:8545");super(n,s);q(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 $A{constructor(r,n){super(n);z(this,"address");q(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=>{X(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 X(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){z(this,"locale");me(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var Pf,Hp,Kc,Gp,A2;class Bie extends jie{constructor(r,n,s){super(r);q(this,Gp);q(this,Pf,void 0);q(this,Hp,void 0);q(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,A2).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=CD(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 Lx(t,e){M(t.length%4===0&&t.length>=16&&t.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=_a.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]&Fie(8-n)),n+=3);const s=t.length/4,i=parseInt(ys(t).substring(2,4),16)&CD(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}const jx={};class Yf{constructor(e,r,n,s,i){z(this,"phrase");z(this,"password");z(this,"wordlist");z(this,"entropy");s==null&&(s=""),i==null&&(i=_a.wordlist()),Va(e,jx,"Mnemonic"),me(this,{phrase:n,password:s,wordlist:i,entropy:r})}computeSeed(){const e=Sr("mnemonic"+this.password,"NFKD");return $a(Sr(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,r,n){const s=Dx(e,n);return e=Lx(fe(s),n),new Yf(jx,s,e,r,n)}static fromEntropy(e,r,n){const s=fe(e,"entropy"),i=Lx(s,n);return new Yf(jx,ne(s),i,r,n)}static entropyToPhrase(e,r){const n=fe(e,"entropy");return Lx(n,r)}static phraseToEntropy(e,r){return Dx(e,r)}static isValidMnemonic(e,r){try{return Dx(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)},Bx=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},uv,Qn,Ys;const Uie={16:10,24:12,32:14},Vie=[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],w1=[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],$ie=[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],zie=[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],Hie=[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],Gie=[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],qie=[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],Wie=[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],Kie=[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],Qie=[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],Yie=[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],Jie=[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],Xie=[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],Zie=[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 Fx(t){const e=[];for(let r=0;r>2,hr(this,Ys,"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]^Vie[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,Ys,"f")[f][d]=i[u],hr(this,Qn,"f")[r-f][d]=i[u++],c++}for(let u=1;u>24&255]^Jie[l>>16&255]^Xie[l>>8&255]^Zie[l&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const r=hr(this,Ys,"f").length-1,n=[0,0,0,0];let s=Fx(e);for(let a=0;a<4;a++)s[a]^=hr(this,Ys,"f")[0][a];for(let a=1;a>24&255]^zie[s[(c+1)%4]>>16&255]^Hie[s[(c+2)%4]>>8&255]^Gie[s[(c+3)%4]&255]^hr(this,Ys,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=hr(this,Ys,"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=Fx(e);for(let a=0;a<4;a++)s[a]^=hr(this,Qn,"f")[0][a];for(let a=1;a>24&255]^Wie[s[(c+3)%4]>>16&255]^Kie[s[(c+2)%4]>>8&255]^Qie[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]=(w1[s[a]>>24&255]^o>>24)&255,i[4*a+1]=(w1[s[(a+3)%4]>>16&255]^o>>16)&255,i[4*a+2]=(w1[s[(a+2)%4]>>8&255]^o>>8)&255,i[4*a+3]=(w1[s[(a+1)%4]&255]^o)&255;return i}}uv=new WeakMap,Qn=new WeakMap,Ys=new WeakMap;class kD{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 VA(r)},name:{enumerable:!0,value:e}})}}var E1=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)},nh,Ii;class $A extends kD{constructor(e,r){if(super("ECC",e,$A),nh.set(this,void 0),Ii.set(this,void 0),r){if(r.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");E1(this,nh,new Uint8Array(r),"f")}else E1(this,nh,new Uint8Array(16),"f");E1(this,Ii,this.iv,"f")}get iv(){return new Uint8Array($l(this,nh,"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 roe(t,e){const r=JSON.parse(t),n=Ay(e),s=RD(r);if(s.name==="pbkdf2"){const{salt:f,count:d,dkLen:h,algorithm:p}=s,y=$a(n,f,d,h,p);return b0(r,y)}X(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 b0(r,u)}function _3(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}async function noe(t,e,r){const n=JSON.parse(t),s=Ay(e),i=RD(n);if(i.name==="pbkdf2"){r&&(r(0),await _3(0));const{salt:d,count:h,dkLen:p,algorithm:y}=i,g=$a(s,d,h,p,y);return r&&(r(1),await _3(0)),b0(n,g)}X(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 b0(n,f)}function ID(t){const e=t.salt!=null?fe(t.salt,"options.salt"):ao(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 OD(t,e,r,n){const s=fe(r.privateKey,"privateKey"),i=n.iv!=null?fe(n.iv,"options.iv"):ao(16);M(i.length===16,"invalid options.iv length","options.iv",n.iv);const o=n.uuid!=null?fe(n.uuid,"options.uuid"):ao(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:cte(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/${c9}`,p=r.mnemonic.path||PD,y=r.mnemonic.locale||"en",g=t.slice(32,64),m=fe(r.mnemonic.entropy,"account.mnemonic.entropy"),x=ao(16),b=new Jf(g,x),w=fe(b.encrypt(m)),C=new Date,_="UTC--"+(C.getUTCFullYear()+"-"+Vd(C.getUTCMonth()+1,2)+"-"+Vd(C.getUTCDate(),2)+"T"+Vd(C.getUTCHours(),2)+"-"+Vd(C.getUTCMinutes(),2)+"-"+Vd(C.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 _D(t,e,r){r==null&&(r={});const n=Ay(e),s=ID(r),i=vd(n,s.salt,s.N,s.r,s.p,64);return OD(fe(i),s,t,r)}async function ND(t,e,r){r==null&&(r={});const n=Ay(e),s=ID(r),i=await yd(n,s.salt,s.N,s.r,s.p,64,r.progressCallback);return OD(fe(i),s,t,r)}const Ux="m/44'/60'/0'/0/0",soe=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),Ea=2147483648,ioe=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ooe="0123456789abcdef";function w0(t,e){let r="";for(;t;)r=ooe[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 DD(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",soe,s)),o=new xi(ne(i.slice(0,32)));return new ws(Zs,o,"0x00000000",ne(i.slice(32)),"m",0,0,n,null)},q(ws,Wc);let wh=ws;class up extends m2{constructor(r,n,s,i,o,a,c,l,u){super(n,u);z(this,"publicKey");z(this,"fingerprint");z(this,"parentFingerprint");z(this,"chainCode");z(this,"path");z(this,"index");z(this,"depth");Va(r,Zs,"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 up(Zs,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,r)}get extendedKey(){return X(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),A2(ot(["0x0488B21E",w0(this.depth,1),this.parentFingerprint,w0(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(r){const n=Ie(r,"index");M(n<=4294967295,"invalid index","index",n);let s=this.path;s&&(s+="/"+(n&~Ea),n&Ea&&(s+="'"));const{IR:i,IL:o}=MD(n,this.chainCode,this.publicKey,null),a=xi.addPoints(o,this.publicKey,!0),c=xy(a);return new up(Zs,c,a,this.fingerprint,ne(i),s,n,this.depth+1,this.provider)}derivePath(r){return DD(this,r)}}function N3(t){try{if(JSON.parse(t).encseed)return!0}catch{}return!1}function M3(t,e){const r=JSON.parse(t),n=Ay(e),s=Je(Ht(r,"ethaddr:string!")),i=TD(Ht(r,"encseed:string!"));M(i&&i.length%16===0,"invalid encseed","json",t);const o=fe($a(n,n,2e3,32,"sha256")).slice(0,16),a=i.slice(0,16),c=i.slice(16),l=new $A(o,a),u=eoe(fe(l.decrypt(c)));let f="";for(let d=0;d{setTimeout(()=>{e()},t)})}var Kp,k2;const fc=class fc extends g0{constructor(e,r){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new xi(e):e;super(n,r)}connect(e){return new fc(this.signingKey,e)}async encrypt(e,r){const n={address:this.address,privateKey:this.privateKey};return await ND(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return _D(r,e)}static async fromEncryptedJson(e,r,n){var i;let s=null;return O3(e)?s=await noe(e,r,n):N3(e)&&(n&&(n(0),await D3(0)),s=M3(e,r),n&&(n(1),await D3(0))),ee(i=fc,Kp,k2).call(i,s)}static fromEncryptedJsonSync(e,r){var s;let n=null;return O3(e)?n=roe(e,r):N3(e)?n=M3(e,r):M(!1,"invalid JSON wallet","json","[ REDACTED ]"),ee(s=fc,Kp,k2).call(s,n)}static createRandom(e){const r=wh.createRandom();return e?r.connect(e):r}static fromPhrase(e,r){const n=wh.fromPhrase(e);return r?n.connect(r):n}};Kp=new WeakSet,k2=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=wh.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 fc(e.privateKey);return M(r.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),r},q(fc,Kp);let fp=fc;const aoe={en:_a.wordlist()};BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const zA=t=>{const e=t.toString(16);return`${e.length%2===0?"0x":"0x0"}${e}`};function T2(){return T2=Object.assign?Object.assign.bind():function(t){for(var e=1;e0&&(e+=","),e+=JSON.stringify(i),e+=":",r(s[i])}}let W=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 E0={[W.MAINNET]:{chainId:W.MAINNET,type:Fe.MAINNET,name:"mainnet",title:"Ethereum",logoURI:`https://assets.sequence.info/images/networks/medium/${W.MAINNET}.webp`,blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[W.ROPSTEN]:{chainId:W.ROPSTEN,type:Fe.TESTNET,name:"ropsten",title:"Ropsten",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.RINKEBY]:{chainId:W.RINKEBY,type:Fe.TESTNET,name:"rinkeby",title:"Rinkeby",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.GOERLI]:{chainId:W.GOERLI,type:Fe.TESTNET,name:"goerli",title:"Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.KOVAN]:{chainId:W.KOVAN,type:Fe.TESTNET,name:"kovan",title:"Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${W.KOVAN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"},nativeToken:{symbol:"kETH",name:"Kovan Ether",decimals:18},deprecated:!0},[W.SEPOLIA]:{chainId:W.SEPOLIA,type:Fe.TESTNET,name:"sepolia",title:"Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Sepolia)",rootUrl:"https://sepolia.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[W.POLYGON]:{chainId:W.POLYGON,type:Fe.MAINNET,name:"polygon",title:"Polygon",logoURI:`https://assets.sequence.info/images/networks/medium/${W.POLYGON}.webp`,blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},nativeToken:{symbol:"MATIC",name:"Polygon",decimals:18}},[W.POLYGON_MUMBAI]:{chainId:W.POLYGON_MUMBAI,type:Fe.TESTNET,name:"mumbai",title:"Polygon Mumbai",logoURI:`https://assets.sequence.info/images/networks/medium/${W.POLYGON_MUMBAI}.webp`,testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"},nativeToken:{symbol:"mMATIC",name:"Mumbai Polygon",decimals:18},deprecated:!0},[W.POLYGON_AMOY]:{chainId:W.POLYGON_AMOY,type:Fe.TESTNET,name:"amoy",title:"Polygon Amoy",logoURI:`https://assets.sequence.info/images/networks/medium/${W.POLYGON_AMOY}.webp`,testnet:!0,blockExplorer:{name:"OKLink (Amoy)",rootUrl:"https://www.oklink.com/amoy/"},nativeToken:{symbol:"aMATIC",name:"Amoy Polygon",decimals:18}},[W.POLYGON_ZKEVM]:{chainId:W.POLYGON_ZKEVM,type:Fe.MAINNET,name:"polygon-zkevm",title:"Polygon zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${W.POLYGON_ZKEVM}.webp`,blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.BSC]:{chainId:W.BSC,type:Fe.MAINNET,name:"bsc",title:"BNB Smart Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BSC}.webp`,blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"},nativeToken:{symbol:"BNB",name:"BNB",decimals:18}},[W.BSC_TESTNET]:{chainId:W.BSC_TESTNET,type:Fe.TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BSC_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"},nativeToken:{symbol:"tBNB",name:"Testnet BNB",decimals:18}},[W.OPTIMISM]:{chainId:W.OPTIMISM,type:Fe.MAINNET,name:"optimism",title:"Optimism",logoURI:`https://assets.sequence.info/images/networks/medium/${W.OPTIMISM}.webp`,blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.OPTIMISM_KOVAN]:{chainId:W.OPTIMISM_KOVAN,type:Fe.TESTNET,name:"optimism-kovan",title:"Optimism Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.OPTIMISM_GOERLI]:{chainId:W.OPTIMISM_GOERLI,type:Fe.TESTNET,name:"optimism-goerli",title:"Optimism Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.OPTIMISM_SEPOLIA]:{chainId:W.OPTIMISM_SEPOLIA,type:Fe.TESTNET,name:"optimism-sepolia",title:"Optimism Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.OPTIMISM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Sepolia)",rootUrl:"https://sepolia-optimistic.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[W.ARBITRUM]:{chainId:W.ARBITRUM,type:Fe.MAINNET,name:"arbitrum",title:"Arbitrum One",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ARBITRUM}.webp`,blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.ARBITRUM_GOERLI]:{chainId:W.ARBITRUM_GOERLI,type:Fe.TESTNET,name:"arbitrum-goerli",title:"Arbitrum Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.ARBITRUM_SEPOLIA]:{chainId:W.ARBITRUM_SEPOLIA,type:Fe.TESTNET,name:"arbitrum-sepolia",title:"Arbitrum Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ARBITRUM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Arbiscan (Sepolia Testnet)",rootUrl:"https://sepolia.arbiscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[W.ARBITRUM_NOVA]:{chainId:W.ARBITRUM_NOVA,type:Fe.MAINNET,name:"arbitrum-nova",title:"Arbitrum Nova",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ARBITRUM_NOVA}.webp`,blockExplorer:{name:"Arbiscan Nova",rootUrl:"https://nova.arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.AVALANCHE]:{chainId:W.AVALANCHE,type:Fe.MAINNET,name:"avalanche",title:"Avalanche",logoURI:`https://assets.sequence.info/images/networks/medium/${W.AVALANCHE}.webp`,blockExplorer:{name:"Snowtrace",rootUrl:"https://subnets.avax.network/c-chain/"},nativeToken:{symbol:"AVAX",name:"AVAX",decimals:18}},[W.AVALANCHE_TESTNET]:{chainId:W.AVALANCHE_TESTNET,type:Fe.TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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}},[W.GNOSIS]:{chainId:W.GNOSIS,type:Fe.MAINNET,name:"gnosis",title:"Gnosis Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${W.GNOSIS}.webp`,blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"},nativeToken:{symbol:"XDAI",name:"XDAI",decimals:18}},[W.BASE]:{chainId:W.BASE,type:Fe.MAINNET,name:"base",title:"Base (Coinbase)",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BASE}.webp`,blockExplorer:{name:"Base Explorer",rootUrl:"https://basescan.org/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.BASE_GOERLI]:{chainId:W.BASE_GOERLI,type:Fe.TESTNET,name:"base-goerli",title:"Base Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.BASE_SEPOLIA]:{chainId:W.BASE_SEPOLIA,type:Fe.TESTNET,name:"base-sepolia",title:"Base Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BASE_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Base Sepolia Explorer",rootUrl:"https://base-sepolia.blockscout.com/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[W.HOMEVERSE]:{chainId:W.HOMEVERSE,type:Fe.MAINNET,name:"homeverse",title:"Oasys Homeverse",logoURI:`https://assets.sequence.info/images/networks/medium/${W.HOMEVERSE}.webp`,blockExplorer:{name:"Oasys Homeverse Explorer",rootUrl:"https://explorer.oasys.homeverse.games/"},nativeToken:{symbol:"OAS",name:"OAS",decimals:18}},[W.HOMEVERSE_TESTNET]:{chainId:W.HOMEVERSE_TESTNET,type:Fe.TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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}},[W.XAI]:{chainId:W.XAI,type:Fe.MAINNET,name:"xai",title:"Xai",logoURI:`https://assets.sequence.info/images/networks/medium/${W.XAI}.webp`,blockExplorer:{name:"Xai Explorer",rootUrl:"https://explorer.xai-chain.net/"},nativeToken:{symbol:"XAI",name:"XAI",decimals:18}},[W.XAI_SEPOLIA]:{chainId:W.XAI_SEPOLIA,type:Fe.TESTNET,name:"xai-sepolia",title:"Xai Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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}},[W.ASTAR_ZKEVM]:{chainId:W.ASTAR_ZKEVM,type:Fe.MAINNET,name:"astar-zkevm",title:"Astar zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ASTAR_ZKEVM}.webp`,blockExplorer:{name:"Astar zkEVM Explorer",rootUrl:"https://astar-zkevm.explorer.startale.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.ASTAR_ZKYOTO]:{chainId:W.ASTAR_ZKYOTO,type:Fe.TESTNET,name:"astar-zkyoto",title:"Astar zKyoto Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ASTAR_ZKYOTO}.webp`,testnet:!0,blockExplorer:{name:"Astar zKyoto Explorer",rootUrl:"https://astar-zkyoto.blockscout.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.XR_SEPOLIA]:{chainId:W.XR_SEPOLIA,type:Fe.TESTNET,name:"xr-sepolia",title:"XR Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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}},[W.B3_SEPOLIA]:{chainId:W.B3_SEPOLIA,type:Fe.TESTNET,name:"b3-sepolia",title:"B3 Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.B3_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"B3 Sepolia Explorer",rootUrl:"https://sepolia.explorer.b3.fun/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.APECHAIN_TESTNET]:{chainId:W.APECHAIN_TESTNET,type:Fe.TESTNET,name:"apechain-testnet",title:"APE Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.APECHAIN_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"APE Chain Explorer",rootUrl:"https://curtis.explorer.caldera.xyz/"},nativeToken:{symbol:"APE",name:"ApeCoin",decimals:18}},[W.BLAST]:{chainId:W.BLAST,type:Fe.MAINNET,name:"blast",title:"Blast",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BLAST}.webp`,blockExplorer:{name:"Blast Explorer",rootUrl:"https://blastscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.BLAST_SEPOLIA]:{chainId:W.BLAST_SEPOLIA,type:Fe.TESTNET,name:"blast-sepolia",title:"Blast Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BLAST_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Blast Sepolia Explorer",rootUrl:"https://sepolia.blastexplorer.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.TELOS]:{chainId:W.TELOS,type:Fe.MAINNET,name:"telos",title:"Telos",logoURI:`https://assets.sequence.info/images/networks/medium/${W.TELOS}.webp`,blockExplorer:{name:"Telos Explorer",rootUrl:"https://explorer.telos.net/network/"},nativeToken:{symbol:"TLOS",name:"TLOS",decimals:18}},[W.BORNE_TESTNET]:{chainId:W.BORNE_TESTNET,type:Fe.TESTNET,name:"borne-testnet",title:"Borne Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BORNE_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"Borne Testnet Explorer",rootUrl:"https://subnets-test.avax.network/bornegfdn"},nativeToken:{symbol:"BORNE",name:"BORNE",decimals:18}},[W.HARDHAT]:{chainId:W.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.HARDHAT_2]:{chainId:W.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(foe(t,!0,e),t),hoe=t=>doe(yoe(t)),poe=(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}},yoe=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},HA=(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})):"",LD=t=>HA("https://${network}-indexer.sequence.app",{network:t}),voe=t=>HA("https://${network}-relayer.sequence.app",{network:t}),moe=t=>HA("https://nodes.sequence.app/${network}",{network:t});function dp(t){return poe(xoe,t)}const We=(t,e)=>{const r=E0[t];if(!r)throw new Error(`Network with chainId ${t} not found`);const n=moe(r.name);return Xf({},r,{rpcUrl:n,indexerUrl:LD(r.name),relayer:{url:voe(r.name),provider:{url:n}}},e)},goe=[Xf({},E0[W.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Xf({},E0[W.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})],xoe=hoe([Xf({},We(W.POLYGON),{isDefaultChain:!0,isAuthChain:!0}),We(W.MAINNET),We(W.BSC),We(W.AVALANCHE),We(W.ARBITRUM),We(W.ARBITRUM_NOVA),We(W.OPTIMISM),We(W.OPTIMISM_SEPOLIA),We(W.POLYGON_ZKEVM),We(W.GNOSIS),We(W.RINKEBY,{disabled:!0}),We(W.GOERLI,{disabled:!0}),We(W.SEPOLIA),We(W.POLYGON_MUMBAI,{disabled:!0}),We(W.POLYGON_AMOY),We(W.BSC_TESTNET),We(W.ARBITRUM_SEPOLIA),We(W.BASE),We(W.BASE_SEPOLIA),We(W.HOMEVERSE),We(W.HOMEVERSE_TESTNET),We(W.XAI),We(W.XAI_SEPOLIA),We(W.AVALANCHE_TESTNET),We(W.ASTAR_ZKEVM),We(W.ASTAR_ZKYOTO),We(W.XR_SEPOLIA),We(W.B3_SEPOLIA),We(W.APECHAIN_TESTNET),We(W.BLAST),We(W.BLAST_SEPOLIA),We(W.TELOS),We(W.BORNE_TESTNET),...goe]),boe=(t,e)=>e.some(r=>t instanceof r);let L3,j3;function woe(){return L3||(L3=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Eoe(){return j3||(j3=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const jD=new WeakMap,P2=new WeakMap,BD=new WeakMap,Vx=new WeakMap,GA=new WeakMap;function Soe(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Sa(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&jD.set(r,t)}).catch(()=>{}),GA.set(e,t),e}function Aoe(t){if(P2.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)});P2.set(t,e)}let R2={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return P2.get(t);if(e==="objectStoreNames")return t.objectStoreNames||BD.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Sa(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 Coe(t){R2=t(R2)}function koe(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call($x(this),e,...r);return BD.set(n,e.sort?e.sort():[e]),Sa(n)}:Eoe().includes(t)?function(...e){return t.apply($x(this),e),Sa(jD.get(this))}:function(...e){return Sa(t.apply($x(this),e))}}function Toe(t){return typeof t=="function"?koe(t):(t instanceof IDBTransaction&&Aoe(t),boe(t,woe())?new Proxy(t,R2):t)}function Sa(t){if(t instanceof IDBRequest)return Soe(t);if(Vx.has(t))return Vx.get(t);const e=Toe(t);return e!==t&&(Vx.set(t,e),GA.set(e,t)),e}const $x=t=>GA.get(t);function Poe(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Sa(o);return n&&o.addEventListener("upgradeneeded",c=>{n(Sa(o.result),c.oldVersion,c.newVersion,Sa(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 Roe=["get","getKey","getAll","getAllKeys","count"],Ioe=["put","add","delete","clear"],zx=new Map;function B3(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(zx.get(e))return zx.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=Ioe.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||Roe.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 zx.set(e,i),i}Coe(t=>({...t,get:(e,r,n)=>B3(e,r)||t.get(e,r,n),has:(e,r)=>!!B3(e,r)||t.has(e,r)}));const Ooe=t=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},_oe=t=>({httpHandler:t.httpHandler()});var F3;(function(t){t.HEADER="header",t.QUERY="query"})(F3||(F3={}));var U3;(function(t){t.HEADER="header",t.QUERY="query"})(U3||(U3={}));var hp;(function(t){t.HTTP="http",t.HTTPS="https"})(hp||(hp={}));var S0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(S0||(S0={}));var V3;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(V3||(V3={}));const I2="__smithy_context";var $3;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})($3||($3={}));var z3;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(z3||(z3={}));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=Noe(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 Noe(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 Moe=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)},Doe={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Loe=t=>({applyToStack:e=>{e.add(Moe(t),Doe)}}),joe=()=>(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}},Boe={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Foe=t=>({applyToStack:e=>{e.add(joe(),Boe)}}),H3="X-Amzn-Trace-Id",Uoe="AWS_LAMBDA_FUNCTION_NAME",Voe="_X_AMZN_TRACE_ID",$oe=t=>e=>async r=>{const{request:n}=r;if(!Vn.isInstance(n)||t.runtime!=="node"||n.headers.hasOwnProperty(H3))return e(r);const s=process.env[Uoe],i=process.env[Voe],o=a=>typeof a=="string"&&a.length>0;return o(s)&&o(i)&&(n.headers[H3]=i),e({...r,request:n})},zoe={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Hoe=t=>({applyToStack:e=>{e.add($oe(t),zoe)}});function Goe(t){return{...t,customUserAgent:typeof t.customUserAgent=="string"?[[t.customUserAgent]]:t.customUserAgent}}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}$"),FD=t=>qoe.test(t)||t.startsWith("[")&&t.endsWith("]"),Woe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),qA=(t,e=!1)=>{if(!e)return Woe.test(t);const r=t.split(".");for(const n of r)if(!qA(n))return!1;return!0},C0={},pp="endpoints";function Na(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Na(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Na).join(", ")})`:JSON.stringify(t,null,2)}class $n extends Error{constructor(e){super(e),this.name="EndpointError"}}const Koe=(t,e)=>t===e,Qoe=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},UD=(t,e)=>Qoe(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),Yoe=t=>t!=null,Joe=t=>!t,Hx={[hp.HTTP]:80,[hp.HTTPS]:443},Xoe=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(hp).includes(c))return null;const l=FD(s),u=r.includes(`${n}:${Hx[c]}`)||typeof t=="string"&&t.includes(`${n}:${Hx[c]}`),f=`${n}${u?`:${Hx[c]}`:""}`;return{scheme:c,authority:f,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:l}},Zoe=(t,e)=>t===e,eae=(t,e,r,n)=>e>=r||t.lengthencodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),rae={booleanEquals:Koe,getAttr:UD,isSet:Yoe,isValidHostLabel:qA,not:Joe,parseURL:Xoe,stringEquals:Zoe,substring:eae,uriEncode:tae},VD=(t,e)=>{const r=[],n={...e.endpointParams,...e.referenceRecord};let s=0;for(;s({...e.endpointParams,...e.referenceRecord})[t],tg=(t,e,r)=>{if(typeof t=="string")return VD(t,r);if(t.fn)return $D(t,r);if(t.ref)return nae(t,r);throw new $n(`'${e}': ${String(t)} is not a string, function or reference.`)},$D=({fn:t,argv:e},r)=>{const n=e.map(i=>["boolean","number"].includes(typeof i)?i:tg(i,"arg",r)),s=t.split(".");return s[0]in C0&&s[1]!=null?C0[s[0]][s[1]](...n):rae[t](...n)},sae=({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=$D(e,r);return(i=(s=r.logger)==null?void 0:s.debug)==null||i.call(s,`${pp} evaluateCondition: ${Na(e)} = ${Na(n)}`),{result:n===""?!0:!!n,...t!=null&&{toAssign:{name:t,value:n}}}},WA=(t=[],e)=>{var n,s;const r={};for(const i of t){const{result:o,toAssign:a}=sae(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,`${pp} assign: ${a.name} := ${Na(a.value)}`))}return{result:!0,referenceRecord:r}},iae=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:s.map(i=>{const o=tg(i,"Header value entry",e);if(typeof o!="string")throw new $n(`Header '${n}' value '${o}' is not a string`);return o})}),{}),zD=(t,e)=>{if(Array.isArray(t))return t.map(r=>zD(r,e));switch(typeof t){case"string":return VD(t,e);case"object":if(t===null)throw new $n(`Unexpected endpoint property: ${t}`);return HD(t,e);case"boolean":return t;default:throw new $n(`Unexpected endpoint property type: ${typeof t}`)}},HD=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:zD(s,e)}),{}),oae=(t,e)=>{const r=tg(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}`)},aae=(t,e)=>{var u,f;const{conditions:r,endpoint:n}=t,{result:s,referenceRecord:i}=WA(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,`${pp} Resolving endpoint from template: ${Na(n)}`),{...l!=null&&{headers:iae(l,o)},...c!=null&&{properties:HD(c,o)},url:oae(a,o)}},cae=(t,e)=>{const{conditions:r,error:n}=t,{result:s,referenceRecord:i}=WA(r,e);if(s)throw new $n(tg(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},lae=(t,e)=>{const{conditions:r,rules:n}=t,{result:s,referenceRecord:i}=WA(r,e);if(s)return GD(n,{...e,referenceRecord:{...e.referenceRecord,...i}})},GD=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const n=aae(r,e);if(n)return n}else if(r.type==="error")cae(r,e);else if(r.type==="tree"){const n=lae(r,e);if(n)return n}else throw new $n(`Unknown endpoint rule: ${r}`);throw new $n("Rules evaluation failed")},uae=(t,e)=>{var l,u,f,d,h;const{endpointParams:r,logger:n}=e,{parameters:s,rules:i}=t;(u=(l=e.logger)==null?void 0:l.debug)==null||u.call(l,`${pp} Initial EndpointParams: ${Na(r)}`);const o=Object.entries(s).filter(([,p])=>p.default!=null).map(([p,y])=>[p,y.default]);if(o.length>0)for(const[p,y]of o)r[p]=r[p]??y;const a=Object.entries(s).filter(([,p])=>p.required).map(([p])=>p);for(const p of a)if(r[p]==null)throw new $n(`Missing required parameter: '${p}'`);const c=GD(i,{endpointParams:r,logger:n,referenceRecord:{}});if((f=e.endpointParams)!=null&&f.Endpoint)try{const p=new URL(e.endpointParams.Endpoint),{protocol:y,port:g}=p;c.url.protocol=y,c.url.port=g}catch{}return(h=(d=e.logger)==null?void 0:d.debug)==null||h.call(d,`${pp} Resolved endpoint: ${Na(c)}`),c},qD=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!qD(r))return!1;return!0}return!(!qA(t)||t.length<3||t.length>63||t!==t.toLowerCase()||FD(t))},G3=":",fae="/",dae=t=>{const e=t.split(G3);if(e.length<6)return null;const[r,n,s,i,o,...a]=e;if(r!=="arn"||n===""||s===""||a.join(G3)==="")return null;const c=a.map(l=>l.split(fae)).flat();return{partition:n,service:s,region:i,accountId:o,resourceId:c}},hae=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"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:{}}],pae="1.1",yae={partitions:hae,version:pae};let vae=yae;const mae=t=>{const{partitions:e}=vae;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}},WD={isVirtualHostableS3Bucket:qD,parseArn:dae,partition:mae};C0.aws=WD;const q3="user-agent",Gx="x-amz-user-agent",W3=" ",qx="/",gae=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,xae=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,K3="-",bae=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(Wx))||[],a=(await t.defaultUserAgentProvider()).map(Wx),c=((d=t==null?void 0:t.customUserAgent)==null?void 0:d.map(Wx))||[],l=[].concat([...a,...o,...c]).join(W3),u=[...a.filter(h=>h.startsWith("aws-sdk-")),...c].join(W3);return t.runtime!=="browser"?(u&&(i[Gx]=i[Gx]?`${i[q3]} ${u}`:u),i[q3]=l):i[Gx]=l,e({...n,request:s})},Wx=t=>{var o;const e=t[0].split(qx).map(a=>a.replace(gae,K3)).join(qx),r=(o=t[1])==null?void 0:o.replace(xae,K3),n=e.indexOf(qx),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}`}},"")},wae={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Eae=t=>({applyToStack:e=>{e.add(bae(t),wae)}});var Q3;(function(t){t.ENV="env",t.CONFIG="shared config entry"})(Q3||(Q3={}));const Sae=!1,Aae=!1,rg=t=>t[I2]||(t[I2]={}),Aa=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},KD=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),Y3=t=>KD(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,Cae=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return{...t,region:async()=>{if(typeof e=="string")return Y3(e);const n=await e();return Y3(n)},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return KD(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}}};function kae(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const Tae=(t,e)=>(r,n)=>async s=>{var l;const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,n,s.input)),o=kae(t.httpAuthSchemes),a=rg(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)},Pae=async t=>{const e=(t==null?void 0:t.Bucket)||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Nae(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!_ae(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},Rae=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Iae=/(\d+\.){3}\d+/,Oae=/\.\./,_ae=t=>Rae.test(t)&&!Iae.test(t)&&!Oae.test(t),Nae=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},Mae=(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},Dae=async t=>{};function Lae(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 k0=t=>{if(typeof t=="string")return k0(new URL(t));const{hostname:e,pathname:r,port:n,protocol:s,search:i}=t;let o;return i&&(o=Lae(i)),{hostname:e,port:n?parseInt(n):void 0,protocol:s,path:r,query:o}},QD=t=>typeof t=="object"?"url"in t?k0(t.url):t:k0(t),jae=async(t,e,r,n)=>{if(!r.endpoint){const o=await Dae(r.serviceId||"");o&&(r.endpoint=()=>Promise.resolve(QD(o)))}const s=await Bae(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,n)},Bae=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 Mae(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 Pae(n),n},Fae=({config:t,instructions:e})=>(r,n)=>async s=>{var a,c,l;const i=await jae(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=rg(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})},Uae=(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}},Vae=(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})},$ae={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},KA={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function QA(t,e,r){return{applyToStack:n=>{n.add(Uae(t,r),$ae),n.add(Vae(t,e),KA)}}}const YD={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:KA.name},YA=(t,e)=>({applyToStack:r=>{r.addRelativeTo(Fae({config:t,instructions:e}),YD)}}),zae=t=>{const e=t.tls??!0,{endpoint:r}=t,n=r!=null?async()=>QD(await Aa(r)()):void 0;return{...t,endpoint:n,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:Aa(t.useDualstackEndpoint??!1),useFipsEndpoint:Aa(t.useFipsEndpoint??!1)}},Hae={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:YD.name},Gae=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Tae(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Hae)}});KA.name;const qae=t=>e=>{throw e},Wae=(t,e)=>{},Kae=t=>(e,r)=>async n=>{if(!Vn.isInstance(n.request))return e(n);const i=rg(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||qae)(o));return(c.successHandler||Wae)(l.response,o),l};var Zf;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(Zf||(Zf={}));const T0=3,Qae=Zf.STANDARD,Yae=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Jae=["TimeoutError","RequestTimeout","RequestTimeoutException"],Xae=[500,502,503,504],Zae=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],ece=t=>{var e;return(e=t.$metadata)==null?void 0:e.clockSkewCorrected},JD=t=>{var e,r;return((e=t.$metadata)==null?void 0:e.httpStatusCode)===429||Yae.includes(t.name)||((r=t.$retryable)==null?void 0:r.throttling)==!0},XD=t=>{var e;return ece(t)||Jae.includes(t.name)||Zae.includes((t==null?void 0:t.code)||"")||Xae.includes(((e=t.$metadata)==null?void 0:e.httpStatusCode)||0)},tce=t=>{var e;if(((e=t.$metadata)==null?void 0:e.httpStatusCode)!==void 0){const r=t.$metadata.httpStatusCode;return 500<=r&&r<=599&&!XD(t)}return!1};class rce{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(),JD(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 O2=100,ZD=20*1e3,nce=500,J3=500,sce=5,ice=10,oce=1,ace="amz-sdk-invocation-id",cce="amz-sdk-request",lce=()=>{let t=O2;return{computeNextBackoffDelay:n=>Math.floor(Math.min(ZD,Math.random()*2**n*t)),setDelayBase:n=>{t=n}}},X3=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(ZD,t),getRetryCost:()=>r});class eL{constructor(e){this.maxAttempts=e,this.mode=Zf.STANDARD,this.capacity=J3,this.retryBackoffStrategy=lce(),this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return X3({retryDelay:O2,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"?nce:O2);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,X3({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(J3,this.capacity+(e.getRetryCost()??oce))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${T0}`),T0}}shouldRetry(e,r,n){return e.getRetryCount()+1=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?ice:sce}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class uce{constructor(e,r){this.maxAttemptsProvider=e,this.mode=Zf.ADAPTIVE;const{rateLimiter:n}=r??{};this.rateLimiter=n??new rce,this.standardRetryStrategy=new eL(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 S1;const fce=new Uint8Array(16);function dce(){if(!S1&&(S1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!S1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return S1(fce)}const pr=[];for(let t=0;t<256;++t)pr.push((t+256).toString(16).slice(1));function hce(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 pce=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Z3={randomUUID:pce};function yce(t,e,r){if(Z3.randomUUID&&!e&&!t)return Z3.randomUUID();t=t||{};const n=t.random||(t.rng||dce)();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 hce(n)}const vce=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}`),mce=t=>{const{retryStrategy:e}=t,r=Aa(t.maxAttempts??T0);return{...t,maxAttempts:r,retryStrategy:async()=>e||(await Aa(t.retryMode)()===Zf.ADAPTIVE?new uce(r):new eL(r))}};class tL{trace(){}debug(){}info(){}warn(){}error(){}}const Ja=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const n of e)r.push(n);return r},_o=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,P0=()=>{let t=[],e=[],r=!1;const n=new Set,s=f=>f.sort((d,h)=>e8[h.step]-e8[d.step]||t8[h.priority||"normal"]-t8[d.priority||"normal"]),i=f=>{let d=!1;const h=p=>{const y=Ja(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 Ja(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 Ja(m.name,m.aliases))p[x]=m;d.push(m)}),e.forEach(g=>{const m={...g,before:[],after:[]};for(const x of Ja(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 ${_o(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=Ja(h,y);if(m.length>0){if(m.some(x=>n.has(x))){if(!p)throw new Error(`Duplicate middleware name '${_o(h,y)}'`);for(const x of m){const b=t.findIndex(C=>{var O;return C.name===x||((O=C.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(`"${_o(w.name,w.aliases)}" middleware with ${w.priority} priority in ${w.step} step cannot be overridden by "${_o(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=Ja(h,y);if(m.length>0){if(m.some(x=>n.has(x))){if(!p)throw new Error(`Duplicate middleware name '${_o(h,y)}'`);for(const x of m){const b=e.findIndex(C=>{var O;return C.name===x||((O=C.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(`"${_o(w.name,w.aliases)}" middleware ${w.relation} "${w.toMiddleware}" middleware cannot be overridden by "${_o(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(P0()),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=Ja(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(P0());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 _o(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},e8={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},t8={high:3,normal:2,low:1};class gce{constructor(e){this.middlewareStack=P0(),this.config=e}send(e,r,n){const s=typeof r!="function"?r:void 0,i=typeof r=="function"?r:n,o=e.resolveMiddleware(this.middlewareStack,this.config,s);if(i)o(e).then(a=>i(null,a.output),a=>i(a)).catch(()=>{});else return o(e).then(a=>a.output)}destroy(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()}}const Ma={},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);Ma[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;Ma[n]=s,md[s]=n}for(let t=0;t<10;t++){Ma[t.toString(10)]=t+52;const e=t.toString(10),r=t+52;Ma[e]=r,md[r]=e}Ma["+"]=62;md[62]="+";Ma["/"]=63;md[63]="/";const Du=6,Eh=8,xce=63,JA=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%Eh;const c=Math.floor(o/Eh);for(let l=0;l>u)}}return new Uint8Array(r)},ed=t=>new TextEncoder().encode(t),Sh=t=>typeof t=="string"?ed(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),rL=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 nL(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 bce(t,e="utf-8"){return e==="base64"?nL(t):rL(t)}function wce(t,e){return e==="base64"?tl.mutate(JA(t)):tl.mutate(ed(t))}class tl extends Uint8Array{static fromString(e,r="utf-8"){switch(typeof e){case"string":return wce(e,r);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,tl.prototype),e}transformToString(e="utf-8"){return bce(this,e)}}const ua=t=>encodeURIComponent(t).replace(/[!'()*]/g,Ece),Ece=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function Sce(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=ua(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 Kx={supported:void 0};class XA{static create(e){return typeof(e==null?void 0:e.handle)=="function"?e:new XA(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(r=>r||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Kx.supported===void 0&&(Kx.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=Sce(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),Kx.supported&&(h.keepalive=s);let p=()=>{};const y=new Request(f,h),g=[fetch(y).then(m=>{const x=m.headers,b={};for(const C of x.entries())b[C[0]]=C[1];return m.body!=null?{response:new A0({headers:b,reason:m.statusText,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new A0({headers:b,reason:m.statusText,statusCode:m.status,body:C})}))}),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 Cce=t=>typeof Blob=="function"&&t instanceof Blob?kce(t):Tce(t);async function kce(t){const e=await Pce(t),r=JA(e);return new Uint8Array(r)}async function Tce(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 Pce(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 sL={},_2={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),sL[t]=e,_2[e]=t}function Rce(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 tl.mutate(t);if(!t)return tl.mutate(new Uint8Array);const r=e.streamCollector(t);return tl.mutate(await r)};class ng{constructor(){this.middlewareStack=P0()}static classBuilder(){return new Oce}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,[I2]:{commandInstance:this,...l},...u},{requestHandler:y}=r;return d.resolve(g=>y.handle(g.request,n||{}),p)}}class Oce{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 ng{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 lr="***SensitiveInformation***";class ZA extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,ZA.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const Oe=(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},_ce=({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{const s=Mce(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 Oe(o,e)},Nce=t=>({output:e,parsedBody:r,errorCode:n})=>{_ce({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})},Mce=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"]}),Dce=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{}}},Lce=t=>{const e=[];for(const r in S0){const n=S0[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}}},jce=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},Bce=t=>{let e=t.retryStrategy;return{setRetryStrategy(r){e=r},retryStrategy(){return e}}},Fce=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},Uce=t=>({...Lce(t),...Bce(t)}),Vce=t=>({...jce(t),...Fce(t)}),N2=function(){const t=Object.getPrototypeOf(this).constructor,e=Function.bind.apply(String,[null,...arguments]),r=new e;return Object.setPrototypeOf(r,t.prototype),r};N2.prototype=Object.create(String.prototype,{constructor:{value:N2,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(N2,String);const Se=t=>{if(t==null)return{};if(Array.isArray(t))return t.filter(e=>e!=null).map(Se);if(typeof t=="object"){const e={};for(const r of Object.keys(t))t[r]!=null&&(e[r]=Se(t[r]));return e}return t},$ce=t=>(t==null?void 0:t.body)instanceof ReadableStream,zce=t=>(e,r)=>async n=>{var o;let s=await t.retryStrategy();const i=await t.maxAttempts();if(Hce(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[ace]=yce());;)try{d&&(f.headers[cce]=`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=Gce(h);if(c=vce(h),d&&$ce(f))throw(o=r.logger instanceof tL?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)},Hce=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",Gce=t=>{const e={error:t,errorType:qce(t)},r=Kce(t.$response);return r&&(e.retryAfterHint=r),e},qce=t=>JD(t)?"THROTTLING":XD(t)?"TRANSIENT":tce(t)?"SERVER_ERROR":"CLIENT_ERROR",iL={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Wce=t=>({applyToStack:e=>{e.add(zce(t),iL)}}),Kce=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)},Qce={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:iL.name},Yce=t=>({applyToStack:e=>{e.addRelativeTo(Kae(),Qce)}});class Jce{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 Xce{async sign(e,r,n){return e}}const Zce=t=>e=>oL(e)&&e.expiration.getTime()-Date.now()t.expiration!==void 0,rle=(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},r8="content-length";function nle(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(r8)===-1)try{const o=t(s);n.headers={...n.headers,[r8]:String(o)}}catch{}}return e({...r,request:n})}}const sle={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ile=t=>({applyToStack:e=>{e.add(nle(t.bodyLengthChecker),sle)}}),n8=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},aL=t=>new Date(Date.now()+t),ole=(t,e)=>Math.abs(aL(e).getTime()-t)>=3e5,s8=(t,e)=>{const r=Date.parse(t);return ole(r,e)?r-Date.now():e},Ah=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},ale=async t=>{var l,u,f;const e=Ah("context",t.context),r=Ah("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 Ah("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 cle{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 ale(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:aL(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return r=>{const n=r.ServerTime??n8(r.$response);if(n){const s=Ah("config",e.config),i=s.systemClockOffset;s.systemClockOffset=s8(n,s.systemClockOffset),s.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const n=n8(e);if(n){const s=Ah("config",r.config);s.systemClockOffset=s8(n,s.systemClockOffset)}}}const lle=(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))},ule="X-Amz-Algorithm",fle="X-Amz-Credential",cL="X-Amz-Date",dle="X-Amz-SignedHeaders",hle="X-Amz-Expires",lL="X-Amz-Signature",uL="X-Amz-Security-Token",fL="authorization",dL=cL.toLowerCase(),ple="date",yle=[fL,dL,ple],vle=lL.toLowerCase(),M2="x-amz-content-sha256",mle=uL.toLowerCase(),gle={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},xle=/^proxy-/,ble=/^sec-/,Qx="AWS4-HMAC-SHA256",wle="AWS4-HMAC-SHA256-PAYLOAD",Ele="UNSIGNED-PAYLOAD",Sle=50,hL="aws4_request",Ale=60*60*24*7,C1={},Yx=[],Jx=(t,e,r)=>`${t}/${e}/${r}/${hL}`,Cle=async(t,e,r,n,s)=>{const i=await i8(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${n}:${s}:${Ec(i)}:${e.sessionToken}`;if(o in C1)return C1[o];for(Yx.push(o);Yx.length>Sle;)delete C1[Yx.shift()];let a=`AWS4${e.secretAccessKey}`;for(const c of[r,n,s,hL])a=await i8(t,a,c);return C1[o]=a},i8=(t,e,r)=>{const n=new t(e);return n.update(Sh(r)),n.digest()},o8=({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 gle||e!=null&&e.has(i)||xle.test(i)||ble.test(i))&&(!r||r&&!r.has(i))||(n[i]=t[s].trim().replace(/\s+/g," "))}return n},kle=({query:t={}})=>{const e=[],r={};for(const n of Object.keys(t).sort()){if(n.toLowerCase()===vle)continue;e.push(n);const s=t[n];typeof s=="string"?r[n]=`${ua(n)}=${ua(s)}`:Array.isArray(s)&&(r[n]=s.slice(0).reduce((i,o)=>i.concat([`${ua(n)}=${ua(o)}`]),[]).sort().join("&"))}return e.map(n=>r[n]).filter(n=>n).join("&")},Tle=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",Xx=async({headers:t,body:e},r)=>{for(const n of Object.keys(t))if(n.toLowerCase()===M2)return t[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||Tle(e)){const n=new r;return n.update(Sh(e)),Ec(await n.digest())}return Ele};class Ple{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(eC.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Rle.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(Rce(e.value.replace(/\-/g,"")),1),f}}}var a8;(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"})(a8||(a8={}));const Rle=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class eC{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&&c8(r),new eC(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&c8(e),parseInt(Ec(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function c8(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Ile=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},Ole=(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}},l8=t=>{t=Vn.clone(t);for(const e of Object.keys(t.headers))yle.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},_le=t=>Nle(t).toISOString().replace(/\.\d{3}Z$/,"Z"),Nle=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class u8{constructor({applyChecksum:e,credentials:r,region:n,service:s,sha256:i,uriEscapePath:o=!0}){this.headerFormatter=new Ple,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}=k1(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=Jx(h,f,l??this.service),y=Ole(l8(e),{unhoistableHeaders:o});u.sessionToken&&(y.query[uL]=u.sessionToken),y.query[ule]=Qx,y.query[fle]=`${u.accessKeyId}/${p}`,y.query[cL]=d,y.query[hle]=s.toString(10);const g=o8(y,i,a);return y.query[dle]=f8(g),y.query[lL]=await this.getSignature(d,p,this.getSigningKey(u,f,h,l),this.createCanonicalRequest(y,g,await Xx(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}=k1(n),u=Jx(c,a,o??this.service),f=await Xx({headers:{},body:r},this.sha256),d=new this.sha256;d.update(e);const h=Ec(await d.digest()),p=[wle,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}=k1(r),c=new this.sha256(await this.getSigningKey(i,o,a,s));return c.update(Sh(e)),Ec(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=l8(e),{longDate:u,shortDate:f}=k1(r),d=Jx(f,c,o??this.service);l.headers[dL]=u,a.sessionToken&&(l.headers[mle]=a.sessionToken);const h=await Xx(l,this.sha256);!Ile(M2,l.headers)&&this.applyChecksum&&(l.headers[M2]=h);const p=o8(l,s,n),y=await this.getSignature(u,d,this.getSigningKey(a,c,f,o),this.createCanonicalRequest(l,p,h));return l.headers[fL]=`${Qx} Credential=${a.accessKeyId}/${d}, SignedHeaders=${f8(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 Ma extends Bie{constructor(){super("en",Fie,Uie)}static wordlist(){return Dx==null&&(Dx=new Ma),Dx}}function SD(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=SD(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=Ma.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)&SD(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){z(this,"phrase");z(this,"password");z(this,"wordlist");z(this,"entropy");s==null&&(s=""),i==null&&(i=Ma.wordlist()),za(e,Bx,"Mnemonic"),me(this,{phrase:n,password:s,wordlist:i,entropy:r})}computeSeed(){const e=Sr("mnemonic"+this.password,"NFKD");return Ha(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,Qs;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,Qs,"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,Qs,"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,Qs,"f").length-1,n=[0,0,0,0];let s=Ux(e);for(let a=0;a<4;a++)s[a]^=hr(this,Qs,"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,Qs,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=hr(this,Qs,"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,Qs=new WeakMap;class AD{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 zA(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 HA extends AD{constructor(e,r){if(super("ECC",e,HA),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=TD(r);if(s.name==="pbkdf2"){const{salt:f,count:d,dkLen:h,algorithm:p}=s,y=Ha(n,f,d,h,p);return w0(r,y)}X(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=TD(n);if(i.name==="pbkdf2"){r&&(r(0),await O3(0));const{salt:d,count:h,dkLen:p,algorithm:y}=i,g=Ha(s,d,h,p,y);return r&&(r(1),await O3(0)),w0(n,g)}X(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 PD(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 RD(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=At(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/${o7}`,p=r.mnemonic.path||kD,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)),C=new Date,_="UTC--"+(C.getUTCFullYear()+"-"+Ud(C.getUTCMonth()+1,2)+"-"+Ud(C.getUTCDate(),2)+"T"+Ud(C.getUTCHours(),2)+"-"+Ud(C.getUTCMinutes(),2)+"-"+Ud(C.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 ID(t,e,r){r==null&&(r={});const n=Sy(e),s=PD(r),i=vd(n,s.salt,s.N,s.r,s.p,64);return RD(fe(i),s,t,r)}async function OD(t,e,r){r==null&&(r={});const n=Sy(e),s=PD(r),i=await yd(n,s.salt,s.N,s.r,s.p,64,r.progressCallback);return RD(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]),Aa=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 ND(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(Xs,o,"0x00000000",ne(i.slice(32)),"m",0,0,n,null)},q(ws,Qc);let bh=ws;class lp extends g2{constructor(r,n,s,i,o,a,c,l,u){super(n,u);z(this,"publicKey");z(this,"fingerprint");z(this,"parentFingerprint");z(this,"chainCode");z(this,"path");z(this,"index");z(this,"depth");za(r,Xs,"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(Xs,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,r)}get extendedKey(){return X(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),C2(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&~Aa),n&Aa&&(s+="'"));const{IR:i,IL:o}=_D(n,this.chainCode,this.publicKey,null),a=gi.addPoints(o,this.publicKey,!0),c=gy(a);return new lp(Xs,c,a,this.fingerprint,ne(i),s,n,this.depth+1,this.provider)}derivePath(r){return ND(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(Ha(n,n,2e3,32,"sha256")).slice(0,16),a=i.slice(0,16),c=i.slice(16),l=new HA(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 OD(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return ID(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},q(pc,Wp);let up=pc;const loe={en:Ma.wordlist()};BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const GA=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 W=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={[W.MAINNET]:{chainId:W.MAINNET,type:Fe.MAINNET,name:"mainnet",title:"Ethereum",logoURI:`https://assets.sequence.info/images/networks/medium/${W.MAINNET}.webp`,blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[W.ROPSTEN]:{chainId:W.ROPSTEN,type:Fe.TESTNET,name:"ropsten",title:"Ropsten",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.RINKEBY]:{chainId:W.RINKEBY,type:Fe.TESTNET,name:"rinkeby",title:"Rinkeby",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.GOERLI]:{chainId:W.GOERLI,type:Fe.TESTNET,name:"goerli",title:"Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.KOVAN]:{chainId:W.KOVAN,type:Fe.TESTNET,name:"kovan",title:"Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${W.KOVAN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"},nativeToken:{symbol:"kETH",name:"Kovan Ether",decimals:18},deprecated:!0},[W.SEPOLIA]:{chainId:W.SEPOLIA,type:Fe.TESTNET,name:"sepolia",title:"Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Sepolia)",rootUrl:"https://sepolia.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[W.POLYGON]:{chainId:W.POLYGON,type:Fe.MAINNET,name:"polygon",title:"Polygon",logoURI:`https://assets.sequence.info/images/networks/medium/${W.POLYGON}.webp`,blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},nativeToken:{symbol:"MATIC",name:"Polygon",decimals:18}},[W.POLYGON_MUMBAI]:{chainId:W.POLYGON_MUMBAI,type:Fe.TESTNET,name:"mumbai",title:"Polygon Mumbai",logoURI:`https://assets.sequence.info/images/networks/medium/${W.POLYGON_MUMBAI}.webp`,testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"},nativeToken:{symbol:"mMATIC",name:"Mumbai Polygon",decimals:18},deprecated:!0},[W.POLYGON_AMOY]:{chainId:W.POLYGON_AMOY,type:Fe.TESTNET,name:"amoy",title:"Polygon Amoy",logoURI:`https://assets.sequence.info/images/networks/medium/${W.POLYGON_AMOY}.webp`,testnet:!0,blockExplorer:{name:"OKLink (Amoy)",rootUrl:"https://www.oklink.com/amoy/"},nativeToken:{symbol:"aMATIC",name:"Amoy Polygon",decimals:18}},[W.POLYGON_ZKEVM]:{chainId:W.POLYGON_ZKEVM,type:Fe.MAINNET,name:"polygon-zkevm",title:"Polygon zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${W.POLYGON_ZKEVM}.webp`,blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.BSC]:{chainId:W.BSC,type:Fe.MAINNET,name:"bsc",title:"BNB Smart Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BSC}.webp`,blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"},nativeToken:{symbol:"BNB",name:"BNB",decimals:18}},[W.BSC_TESTNET]:{chainId:W.BSC_TESTNET,type:Fe.TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BSC_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"},nativeToken:{symbol:"tBNB",name:"Testnet BNB",decimals:18}},[W.OPTIMISM]:{chainId:W.OPTIMISM,type:Fe.MAINNET,name:"optimism",title:"Optimism",logoURI:`https://assets.sequence.info/images/networks/medium/${W.OPTIMISM}.webp`,blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.OPTIMISM_KOVAN]:{chainId:W.OPTIMISM_KOVAN,type:Fe.TESTNET,name:"optimism-kovan",title:"Optimism Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.OPTIMISM_GOERLI]:{chainId:W.OPTIMISM_GOERLI,type:Fe.TESTNET,name:"optimism-goerli",title:"Optimism Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.OPTIMISM_SEPOLIA]:{chainId:W.OPTIMISM_SEPOLIA,type:Fe.TESTNET,name:"optimism-sepolia",title:"Optimism Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.OPTIMISM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Sepolia)",rootUrl:"https://sepolia-optimistic.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[W.ARBITRUM]:{chainId:W.ARBITRUM,type:Fe.MAINNET,name:"arbitrum",title:"Arbitrum One",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ARBITRUM}.webp`,blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.ARBITRUM_GOERLI]:{chainId:W.ARBITRUM_GOERLI,type:Fe.TESTNET,name:"arbitrum-goerli",title:"Arbitrum Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.ARBITRUM_SEPOLIA]:{chainId:W.ARBITRUM_SEPOLIA,type:Fe.TESTNET,name:"arbitrum-sepolia",title:"Arbitrum Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ARBITRUM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Arbiscan (Sepolia Testnet)",rootUrl:"https://sepolia.arbiscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[W.ARBITRUM_NOVA]:{chainId:W.ARBITRUM_NOVA,type:Fe.MAINNET,name:"arbitrum-nova",title:"Arbitrum Nova",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ARBITRUM_NOVA}.webp`,blockExplorer:{name:"Arbiscan Nova",rootUrl:"https://nova.arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.AVALANCHE]:{chainId:W.AVALANCHE,type:Fe.MAINNET,name:"avalanche",title:"Avalanche",logoURI:`https://assets.sequence.info/images/networks/medium/${W.AVALANCHE}.webp`,blockExplorer:{name:"Snowtrace",rootUrl:"https://subnets.avax.network/c-chain/"},nativeToken:{symbol:"AVAX",name:"AVAX",decimals:18}},[W.AVALANCHE_TESTNET]:{chainId:W.AVALANCHE_TESTNET,type:Fe.TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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}},[W.GNOSIS]:{chainId:W.GNOSIS,type:Fe.MAINNET,name:"gnosis",title:"Gnosis Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${W.GNOSIS}.webp`,blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"},nativeToken:{symbol:"XDAI",name:"XDAI",decimals:18}},[W.BASE]:{chainId:W.BASE,type:Fe.MAINNET,name:"base",title:"Base (Coinbase)",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BASE}.webp`,blockExplorer:{name:"Base Explorer",rootUrl:"https://basescan.org/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.BASE_GOERLI]:{chainId:W.BASE_GOERLI,type:Fe.TESTNET,name:"base-goerli",title:"Base Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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},[W.BASE_SEPOLIA]:{chainId:W.BASE_SEPOLIA,type:Fe.TESTNET,name:"base-sepolia",title:"Base Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BASE_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Base Sepolia Explorer",rootUrl:"https://base-sepolia.blockscout.com/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[W.HOMEVERSE]:{chainId:W.HOMEVERSE,type:Fe.MAINNET,name:"homeverse",title:"Oasys Homeverse",logoURI:`https://assets.sequence.info/images/networks/medium/${W.HOMEVERSE}.webp`,blockExplorer:{name:"Oasys Homeverse Explorer",rootUrl:"https://explorer.oasys.homeverse.games/"},nativeToken:{symbol:"OAS",name:"OAS",decimals:18}},[W.HOMEVERSE_TESTNET]:{chainId:W.HOMEVERSE_TESTNET,type:Fe.TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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}},[W.XAI]:{chainId:W.XAI,type:Fe.MAINNET,name:"xai",title:"Xai",logoURI:`https://assets.sequence.info/images/networks/medium/${W.XAI}.webp`,blockExplorer:{name:"Xai Explorer",rootUrl:"https://explorer.xai-chain.net/"},nativeToken:{symbol:"XAI",name:"XAI",decimals:18}},[W.XAI_SEPOLIA]:{chainId:W.XAI_SEPOLIA,type:Fe.TESTNET,name:"xai-sepolia",title:"Xai Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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}},[W.ASTAR_ZKEVM]:{chainId:W.ASTAR_ZKEVM,type:Fe.MAINNET,name:"astar-zkevm",title:"Astar zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ASTAR_ZKEVM}.webp`,blockExplorer:{name:"Astar zkEVM Explorer",rootUrl:"https://astar-zkevm.explorer.startale.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.ASTAR_ZKYOTO]:{chainId:W.ASTAR_ZKYOTO,type:Fe.TESTNET,name:"astar-zkyoto",title:"Astar zKyoto Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.ASTAR_ZKYOTO}.webp`,testnet:!0,blockExplorer:{name:"Astar zKyoto Explorer",rootUrl:"https://astar-zkyoto.blockscout.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.XR_SEPOLIA]:{chainId:W.XR_SEPOLIA,type:Fe.TESTNET,name:"xr-sepolia",title:"XR Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.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}},[W.B3_SEPOLIA]:{chainId:W.B3_SEPOLIA,type:Fe.TESTNET,name:"b3-sepolia",title:"B3 Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.B3_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"B3 Sepolia Explorer",rootUrl:"https://sepolia.explorer.b3.fun/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.APECHAIN_TESTNET]:{chainId:W.APECHAIN_TESTNET,type:Fe.TESTNET,name:"apechain-testnet",title:"APE Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.APECHAIN_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"APE Chain Explorer",rootUrl:"https://curtis.explorer.caldera.xyz/"},nativeToken:{symbol:"APE",name:"ApeCoin",decimals:18}},[W.BLAST]:{chainId:W.BLAST,type:Fe.MAINNET,name:"blast",title:"Blast",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BLAST}.webp`,blockExplorer:{name:"Blast Explorer",rootUrl:"https://blastscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.BLAST_SEPOLIA]:{chainId:W.BLAST_SEPOLIA,type:Fe.TESTNET,name:"blast-sepolia",title:"Blast Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BLAST_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Blast Sepolia Explorer",rootUrl:"https://sepolia.blastexplorer.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.TELOS]:{chainId:W.TELOS,type:Fe.MAINNET,name:"telos",title:"Telos",logoURI:`https://assets.sequence.info/images/networks/medium/${W.TELOS}.webp`,blockExplorer:{name:"Telos Explorer",rootUrl:"https://explorer.telos.net/network/"},nativeToken:{symbol:"TLOS",name:"TLOS",decimals:18}},[W.BORNE_TESTNET]:{chainId:W.BORNE_TESTNET,type:Fe.TESTNET,name:"borne-testnet",title:"Borne Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${W.BORNE_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"Borne Testnet Explorer",rootUrl:"https://subnets-test.avax.network/bornegfdn"},nativeToken:{symbol:"BORNE",name:"BORNE",decimals:18}},[W.HARDHAT]:{chainId:W.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[W.HARDHAT_2]:{chainId:W.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},qA=(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})):"",MD=t=>qA("https://${network}-indexer.sequence.app",{network:t}),goe=t=>qA("https://${network}-relayer.sequence.app",{network:t}),xoe=t=>qA("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:MD(r.name),relayer:{url:goe(r.name),provider:{url:n}}},e)},boe=[Xf({},S0[W.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Xf({},S0[W.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})],woe=yoe([Xf({},Ke(W.POLYGON),{isDefaultChain:!0,isAuthChain:!0}),Ke(W.MAINNET),Ke(W.BSC),Ke(W.AVALANCHE),Ke(W.ARBITRUM),Ke(W.ARBITRUM_NOVA),Ke(W.OPTIMISM),Ke(W.OPTIMISM_SEPOLIA),Ke(W.POLYGON_ZKEVM),Ke(W.GNOSIS),Ke(W.RINKEBY,{disabled:!0}),Ke(W.GOERLI,{disabled:!0}),Ke(W.SEPOLIA),Ke(W.POLYGON_MUMBAI,{disabled:!0}),Ke(W.POLYGON_AMOY),Ke(W.BSC_TESTNET),Ke(W.ARBITRUM_SEPOLIA),Ke(W.BASE),Ke(W.BASE_SEPOLIA),Ke(W.HOMEVERSE),Ke(W.HOMEVERSE_TESTNET),Ke(W.XAI),Ke(W.XAI_SEPOLIA),Ke(W.AVALANCHE_TESTNET),Ke(W.ASTAR_ZKEVM),Ke(W.ASTAR_ZKYOTO),Ke(W.XR_SEPOLIA),Ke(W.B3_SEPOLIA),Ke(W.APECHAIN_TESTNET),Ke(W.BLAST),Ke(W.BLAST_SEPOLIA),Ke(W.TELOS),Ke(W.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 Aoe(){return L3||(L3=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const DD=new WeakMap,R2=new WeakMap,LD=new WeakMap,$x=new WeakMap,WA=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&&DD.set(r,t)}).catch(()=>{}),WA.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||LD.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 LD.set(n,e.sort?e.sort():[e]),Ca(n)}:Aoe().includes(t)?function(...e){return t.apply(zx(this),e),Ca(DD.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 Coe(t);if($x.has(t))return $x.get(t);const e=Roe(t);return e!==t&&($x.set(t,e),WA.set(e,t)),e}const zx=t=>WA.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 A0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(A0||(A0={}));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 C0{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}}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}$"),jD=t=>Koe.test(t)||t.startsWith("[")&&t.endsWith("]"),Qoe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),KA=(t,e=!1)=>{if(!e)return Qoe.test(t);const r=t.split(".");for(const n of r)if(!KA(n))return!1;return!0},k0={},hp="endpoints";function Da(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Da(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Da).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},BD=(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=jD(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:BD,isSet:Xoe,isValidHostLabel:KA,not:Zoe,parseURL:eae,stringEquals:tae,substring:rae,uriEncode:nae},FD=(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 FD(t,r);if(t.fn)return UD(t,r);if(t.ref)return iae(t,r);throw new $n(`'${e}': ${String(t)} is not a string, function or reference.`)},UD=({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=UD(e,r);return(i=(s=r.logger)==null?void 0:s.debug)==null||i.call(s,`${hp} evaluateCondition: ${Da(e)} = ${Da(n)}`),{result:n===""?!0:!!n,...t!=null&&{toAssign:{name:t,value:n}}}},QA=(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} := ${Da(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})}),{}),VD=(t,e)=>{if(Array.isArray(t))return t.map(r=>VD(r,e));switch(typeof t){case"string":return FD(t,e);case"object":if(t===null)throw new $n(`Unexpected endpoint property: ${t}`);return $D(t,e);case"boolean":return t;default:throw new $n(`Unexpected endpoint property type: ${typeof t}`)}},$D=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:VD(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}=QA(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: ${Da(n)}`),{...l!=null&&{headers:aae(l,o)},...c!=null&&{properties:$D(c,o)},url:cae(a,o)}},uae=(t,e)=>{const{conditions:r,error:n}=t,{result:s,referenceRecord:i}=QA(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}=QA(r,e);if(s)return zD(n,{...e,referenceRecord:{...e.referenceRecord,...i}})},zD=(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: ${Da(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=zD(i,{endpointParams:r,logger:n,referenceRecord:{}});return(d=(f=e.logger)==null?void 0:f.debug)==null||d.call(f,`${hp} Resolved endpoint: ${Da(c)}`),c},HD=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!HD(r))return!1;return!0}return!(!KA(t)||t.length<3||t.length>63||t!==t.toLowerCase()||jD(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}},GD={isVirtualHostableS3Bucket:HD,parseArn:pae,partition:xae};k0.aws=GD;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},Aae=t=>({applyToStack:e=>{e.add(Eae(t),Sae)}});var K3;(function(t){t.ENV="env",t.CONFIG="shared config entry"})(K3||(K3={}));const Cae=!1,kae=!1,ng=t=>t[O2]||(t[O2]={}),ka=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},qD=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),Q3=t=>qD(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 qD(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},WD=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}},KD=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 WD(r.serviceId),o&&(r.endpoint=()=>Promise.resolve(KD(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},YA={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function JA(t,e,r){return{applyToStack:n=>{n.add(Vae(t,r),zae),n.add($ae(t,e),YA)}}}const QD={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:YA.name},XA=(t,e)=>({applyToStack:r=>{r.addRelativeTo(Uae({config:t,instructions:e}),QD)}}),Hae=t=>{const e=t.tls??!0,{endpoint:r}=t,n=r!=null?async()=>KD(await ka(r)()):void 0,i={...t,endpoint:n,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:ka(t.useDualstackEndpoint??!1),useFipsEndpoint:ka(t.useFipsEndpoint??!1)};let o;return i.serviceConfiguredEndpoint=async()=>(t.serviceId&&!o&&(o=WD(t.serviceId)),o),i},Gae={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:QD.name},qae=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Rae(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Gae)}});YA.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},YD=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},JD=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&&!JD(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(),YD(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,XD=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(XD,Math.random()*2**n*t)),setDelayBase:n=>{t=n}}},J3=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(XD,t),getRetryCost:()=>r});class ZD{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 ZD(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 A1;const dce=new Uint8Array(16);function hce(){if(!A1&&(A1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!A1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return A1(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=ka(t.maxAttempts??P0);return{...t,maxAttempts:r,retryStrategy:async()=>e||(await ka(t.retryMode)()===Zf.ADAPTIVE?new fce(r):new ZD(r))}};class eL{trace(){}debug(){}info(){}warn(){}error(){}}const ec=(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=ec(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 ec(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 ec(m.name,m.aliases))p[x]=m;d.push(m)}),e.forEach(g=>{const m={...g,before:[],after:[]};for(const x of ec(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=ec(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(C=>{var O;return C.name===x||((O=C.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=ec(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(C=>{var O;return C.name===x||((O=C.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=ec(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 La={},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);La[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;La[n]=s,md[s]=n}for(let t=0;t<10;t++){La[t.toString(10)]=t+52;const e=t.toString(10),r=t+52;La[e]=r,md[r]=e}La["+"]=62;md[62]="+";La["/"]=63;md[63]="/";const Du=6,wh=8,bce=63,ZA=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),tL=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 rL(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"?rL(t):tL(t)}function Ece(t,e){return e==="base64"?nl.mutate(ZA(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 da=t=>encodeURIComponent(t).replace(/[!'()*]/g,Sce),Sce=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=da(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 eC{static create(e){return typeof(e==null?void 0:e.handle)=="function"?e:new eC(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 C of x.entries())b[C[0]]=C[1];return m.body!=null?{response:new C0({headers:b,reason:m.statusText,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new C0({headers:b,reason:m.statusText,statusCode:m.status,body:C})}))}),Cce(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=ZA(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 nL={},N2={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),nL[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 tC extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,tC.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 A0){const n=A0[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 eL?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=>YD(t)?"THROTTLING":JD(t)?"TRANSIENT":rce(t)?"SERVER_ERROR":"CLIENT_ERROR",sL={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Kce=t=>({applyToStack:e=>{e.add(Hce(t),sL)}}),Qce=t=>{if(!C0.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:sL.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=>iL(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))},C1=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 C0.isInstance(t)?((e=t.headers)==null?void 0:e.date)??((r=t.headers)==null?void 0:r.Date):void 0},oL=t=>new Date(Date.now()+t),ale=(t,e)=>Math.abs(oL(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:oL(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",aL="X-Amz-Date",hle="X-Amz-SignedHeaders",ple="X-Amz-Expires",cL="X-Amz-Signature",lL="X-Amz-Security-Token",uL="authorization",fL=aL.toLowerCase(),yle="date",vle=[uL,fL,yle],mle=cL.toLowerCase(),D2="x-amz-content-sha256",gle=lL.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",Ale=50,dL="aws4_request",Cle=60*60*24*7,k1={},Jx=[],Xx=(t,e,r)=>`${t}/${e}/${r}/${dL}`,kle=async(t,e,r,n,s)=>{const i=await s8(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${n}:${s}:${Ac(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,dL])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]=`${da(n)}=${da(s)}`:Array.isArray(s)&&(r[n]=s.slice(0).reduce((i,o)=>i.concat([`${da(n)}=${da(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)),Ac(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(rC.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 rC{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 rC(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&a8(e),parseInt(Ac(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=ka(n),this.credentialProvider=ka(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>Cle)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[lL]=u.sessionToken),y.query[fle]=Yx,y.query[dle]=`${u.accessKeyId}/${p}`,y.query[aL]=d,y.query[ple]=s.toString(10);const g=i8(y,i,a);return y.query[hle]=u8(g),y.query[cL]=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=Ac(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)),Ac(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[fL]=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[uL]=`${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)} -${kle(e)} +${Tle(e)} ${s.map(i=>`${i}:${r[i]}`).join(` `)} ${s.join(";")} -${n}`}async createStringToSign(e,r,n){const s=new this.sha256;s.update(Sh(n));const i=await s.digest();return`${Qx} +${n}`}async createStringToSign(e,r,n){const s=new this.sha256;s.update(Eh(n));const i=await s.digest();return`${Yx} ${e} ${r} -${Ec(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 ua(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(Sh(i)),Ec(await o.digest())}getSigningKey(e,r,n,s){return Cle(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 k1=t=>{const e=_le(t).replace(/[\-:]/g,"");return{longDate:e,shortDate:e.slice(0,8)}},f8=t=>Object.keys(t).sort().join(";"),Mle=t=>{let e;t.credentials&&(e=rle(t.credentials,tle,oL)),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||u8;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||u8;return new u(l)},{...t,systemClockOffset:n,signingEscapePath:r,credentials:e,signer:i}},Dle=(t,e)=>Ice(t,e).then(r=>e.utf8Encoder(r)),sg=(t,e)=>Dle(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{}}),Lle=async(t,e)=>{const r=await sg(t,e);return r.message=r.message??r.Message,r},jle=(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)},Ble=async(t,e,r)=>({operation:rg(e).operation,region:await Aa(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Fle(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:t.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}function dt(t){return{schemeId:"smithy.api#noAuth"}}const Ule=t=>{const e=[];switch(t.operation){case"AssociateSoftwareToken":{e.push(dt());break}case"ChangePassword":{e.push(dt());break}case"ConfirmDevice":{e.push(dt());break}case"ConfirmForgotPassword":{e.push(dt());break}case"ConfirmSignUp":{e.push(dt());break}case"DeleteUser":{e.push(dt());break}case"DeleteUserAttributes":{e.push(dt());break}case"ForgetDevice":{e.push(dt());break}case"ForgotPassword":{e.push(dt());break}case"GetDevice":{e.push(dt());break}case"GetUser":{e.push(dt());break}case"GetUserAttributeVerificationCode":{e.push(dt());break}case"GlobalSignOut":{e.push(dt());break}case"InitiateAuth":{e.push(dt());break}case"ListDevices":{e.push(dt());break}case"ResendConfirmationCode":{e.push(dt());break}case"RespondToAuthChallenge":{e.push(dt());break}case"RevokeToken":{e.push(dt());break}case"SetUserMFAPreference":{e.push(dt());break}case"SetUserSettings":{e.push(dt());break}case"SignUp":{e.push(dt());break}case"UpdateAuthEventFeedback":{e.push(dt());break}case"UpdateDeviceStatus":{e.push(dt());break}case"UpdateUserAttributes":{e.push(dt());break}case"VerifySoftwareToken":{e.push(dt());break}case"VerifyUserAttribute":{e.push(dt());break}default:e.push(Fle(t))}return e},Vle=t=>({...Mle(t)}),$le=t=>({...t,useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),tC={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},zle="@aws-sdk/client-cognito-identity-provider",Hle="AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native",Gle="3.637.0",qle={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"},Wle="./dist-cjs/index.js",Kle="./dist-types/index.d.ts",Qle="./dist-es/index.js",Yle=!1,Jle={"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.637.0","@aws-sdk/client-sts":"3.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},Xle={"@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"},Zle={node:">=16.0.0"},eue={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},tue=["dist-*/**"],rue={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},nue="Apache-2.0",sue={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},iue="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity-provider",oue={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-cognito-identity-provider"},aue={name:zle,description:Hle,version:Gle,scripts:qle,main:Wle,types:Kle,module:Qle,sideEffects:Yle,dependencies:Jle,devDependencies:Xle,engines:Zle,typesVersions:eue,files:tue,author:rue,license:nue,browser:sue,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:iue,repository:oue},cue=t=>new TextEncoder().encode(t);var lue=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:cue;function yp(t){return t instanceof Uint8Array?t:typeof t=="string"?lue(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function D2(t){return typeof t=="string"?t.length===0:t.byteLength===0}var pL={name:"SHA-256"},d8={name:"HMAC",hash:pL},uue=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 fue={};function fv(){return typeof window<"u"?window:typeof self<"u"?self:fue}var due=function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!D2(e)){var r=yp(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 fv().crypto.subtle.sign(d8,r,e.toHash).then(function(n){return new Uint8Array(n)})}):D2(this.toHash)?Promise.resolve(uue):Promise.resolve().then(function(){return fv().crypto.subtle.digest(pL,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){fv().crypto.subtle.importKey("raw",yp(e.secret),d8,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},t}();function hue(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 pue(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]gue)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+(vue[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}(),xue=function(){function t(e){this.secret=e,this.hash=new dv,this.reset()}return t.prototype.update=function(e){if(!(D2(e)||this.error))try{this.hash.update(yp(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 hue(this,void 0,void 0,function(){return pue(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new dv,this.secret){this.outer=new dv;var e=bue(this.secret),r=new Uint8Array(is);r.set(e);for(var n=0;nis){var r=new dv;r.update(e),e=r.digest()}var n=new Uint8Array(is);return n.set(e),n}var wue=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Eue(t){if(Sue(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return Aue(e)}return!1}function Sue(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&&wue.every(function(e){return typeof t[e]=="function"})}var Cue=function(){function t(e){Eue(fv())?this.hash=new due(e):this.hash=new xue(e)}return t.prototype.update=function(e,r){this.hash.update(yp(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t}();const kue={"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"},yL={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"},jo={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 kue[e]}static getBrowserTypeByAlias(e){return yL[e]||""}}const lt=/version\/(\d+(\.?_?\d+)+)/i,Tue=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=te.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||te.getFirstMatch(lt,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=te.getFirstMatch(lt,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(lt,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=te.getFirstMatch(lt,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(lt,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(lt,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(lt,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(lt,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=te.getFirstMatch(lt,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(lt,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(lt,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=te.getFirstMatch(lt,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(lt,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(lt,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(lt,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(lt,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(lt,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(lt,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(lt,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(lt,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(lt,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(lt,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(lt,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(lt,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(lt,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=te.getFirstMatch(lt,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=te.getFirstMatch(lt,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)}}}],Pue=[{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}}}],Rue=[{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}}}],Iue=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:jo.Blink};const r=te.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:jo.EdgeHTML,version:r}}},{test:[/trident/i],describe(t){const e={name:jo.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:jo.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:jo.Gecko},r=te.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:jo.Blink}}},{test:[/(apple)?webkit/i],describe(t){const e={name:jo.WebKit},r=te.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class h8{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(Tue,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(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.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(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.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(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.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))}}/*! +${Ac(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 da(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)),Ac(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,iL)),e||(t.credentialDefaultProvider?e=C1(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=C1(t.signer):t.regionInfoProvider?i=()=>C1(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 C1(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 ka(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"}),nC={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.645.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.645.0","@aws-sdk/client-sts":"3.645.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.645.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.645.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.645.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},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 hL={name:"SHA-256"},f8={name:"HMAC",hash:hL},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(hL,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(Aue(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return Cue(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 Cue(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"},pL={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 pL[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))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 - */class vL{static getParser(e,r=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new h8(e,r)}static parse(e){return new h8(e).getResult()}static get BROWSER_MAP(){return yL}static get ENGINE_MAP(){return jo}static get OS_MAP(){return Qr}static get PLATFORMS_MAP(){return Vt}}const Oue=({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)?vL.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},_ue=t=>()=>Promise.reject(t),p8=typeof TextEncoder=="function"?new TextEncoder:null,Nue=t=>{if(typeof t=="string"){if(p8)return p8.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}`)},mL="required",di="fn",hi="argv",gd="ref",y8=!0,v8="isSet",vp="booleanEquals",Hl="error",$d="endpoint",Pi="tree",rC="PartitionResult",m8={[mL]:!1,type:"String"},g8={[mL]:!0,default:!1,type:"Boolean"},x8={[gd]:"Endpoint"},gL={[di]:vp,[hi]:[{[gd]:"UseFIPS"},!0]},xL={[di]:vp,[hi]:[{[gd]:"UseDualStack"},!0]},Qs={},b8={[di]:"getAttr",[hi]:[{[gd]:rC},"supportsFIPS"]},w8={[di]:vp,[hi]:[!0,{[di]:"getAttr",[hi]:[{[gd]:rC},"supportsDualStack"]}]},E8=[gL],S8=[xL],A8=[{[gd]:"Region"}],Mue={version:"1.0",parameters:{Region:m8,UseDualStack:g8,UseFIPS:g8,Endpoint:m8},rules:[{conditions:[{[di]:v8,[hi]:[x8]}],rules:[{conditions:E8,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Hl},{conditions:S8,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Hl},{endpoint:{url:x8,properties:Qs,headers:Qs},type:$d}],type:Pi},{conditions:[{[di]:v8,[hi]:A8}],rules:[{conditions:[{[di]:"aws.partition",[hi]:A8,assign:rC}],rules:[{conditions:[gL,xL],rules:[{conditions:[{[di]:vp,[hi]:[y8,b8]},w8],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qs,headers:Qs},type:$d}],type:Pi},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Hl}],type:Pi},{conditions:E8,rules:[{conditions:[{[di]:vp,[hi]:[b8,y8]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Qs,headers:Qs},type:$d}],type:Pi},{error:"FIPS is enabled but this partition does not support FIPS",type:Hl}],type:Pi},{conditions:S8,rules:[{conditions:[w8],rules:[{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qs,headers:Qs},type:$d}],type:Pi},{error:"DualStack is enabled but this partition does not support DualStack",type:Hl}],type:Pi},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:Qs,headers:Qs},type:$d}],type:Pi}],type:Pi},{error:"Invalid Configuration: Missing Region",type:Hl}]},Due=Mue,Lue=(t,e={})=>uae(Due,{endpointParams:t,logger:e.logger});C0.aws=WD;const jue=t=>({apiVersion:"2016-04-18",base64Decoder:(t==null?void 0:t.base64Decoder)??JA,base64Encoder:(t==null?void 0:t.base64Encoder)??nL,disableHostPrefix:(t==null?void 0:t.disableHostPrefix)??!1,endpointProvider:(t==null?void 0:t.endpointProvider)??Lue,extensions:(t==null?void 0:t.extensions)??[],httpAuthSchemeProvider:(t==null?void 0:t.httpAuthSchemeProvider)??Ule,httpAuthSchemes:(t==null?void 0:t.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new cle},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Xce}],logger:(t==null?void 0:t.logger)??new tL,serviceId:(t==null?void 0:t.serviceId)??"Cognito Identity Provider",urlParser:(t==null?void 0:t.urlParser)??k0,utf8Decoder:(t==null?void 0:t.utf8Decoder)??ed,utf8Encoder:(t==null?void 0:t.utf8Encoder)??rL}),Bue=["in-region","cross-region","mobile","standard","legacy"],Fue=({defaultsMode:t}={})=>lle(async()=>{const e=typeof t=="function"?await t():t;switch(e==null?void 0:e.toLowerCase()){case"auto":return Promise.resolve(Uue()?"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 ${Bue.join(", ")}, got ${e}`)}}),Uue=()=>{var r,n;const t=typeof window<"u"&&((r=window==null?void 0:window.navigator)!=null&&r.userAgent)?vL.parse(window.navigator.userAgent):void 0,e=(n=t==null?void 0:t.platform)==null?void 0:n.type;return e==="tablet"||e==="mobile"},Vue=t=>{const e=Fue(t),r=()=>e().then(Dce),n=jue(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:(t==null?void 0:t.bodyLengthChecker)??Nue,credentialDefaultProvider:(t==null?void 0:t.credentialDefaultProvider)??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(t==null?void 0:t.defaultUserAgentProvider)??Oue({serviceId:n.serviceId,clientVersion:aue.version}),maxAttempts:(t==null?void 0:t.maxAttempts)??T0,region:(t==null?void 0:t.region)??_ue("Region is missing"),requestHandler:XA.create((t==null?void 0:t.requestHandler)??r),retryMode:(t==null?void 0:t.retryMode)??(async()=>(await r()).retryMode||Qae),sha256:(t==null?void 0:t.sha256)??Cue,streamCollector:(t==null?void 0:t.streamCollector)??Cce,useDualstackEndpoint:(t==null?void 0:t.useDualstackEndpoint)??(()=>Promise.resolve(Sae)),useFipsEndpoint:(t==null?void 0:t.useFipsEndpoint)??(()=>Promise.resolve(Aae))}},$ue=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}}},zue=t=>({region:t.region()}),Hue=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}}},Gue=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),T1=t=>t,que=(t,e)=>{const r={...T1($ue(t)),...T1(Uce(t)),...T1(Ooe(t)),...T1(Hue(t))};return e.forEach(n=>n.configure(r)),{...t,...zue(r),...Vce(r),..._oe(r),...Gue(r)}};class Wue extends gce{constructor(...[e]){const r=Vue(e||{}),n=$le(r),s=Goe(n),i=mce(s),o=Cae(i),a=o,c=zae(a),l=Vle(c),u=que(l,(e==null?void 0:e.extensions)||[]);super(u),this.config=u,this.middlewareStack.use(Eae(this.config)),this.middlewareStack.use(Wce(this.config)),this.middlewareStack.use(ile(this.config)),this.middlewareStack.use(Loe(this.config)),this.middlewareStack.use(Foe(this.config)),this.middlewareStack.use(Hoe(this.config)),this.middlewareStack.use(Gae(this.config,{httpAuthSchemeParametersProvider:Ble,identityProviderConfigProvider:async f=>new Jce({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Yce(this.config))}destroy(){super.destroy()}}class Te extends ZA{constructor(e){super(e),Object.setPrototypeOf(this,Te.prototype)}}class nC extends Te{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,nC.prototype)}}class sC extends Te{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,sC.prototype)}}class iC extends Te{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,iC.prototype)}}class oC extends Te{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,oC.prototype)}}class aC extends Te{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,aC.prototype)}}class cC extends Te{constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),this.name="UserImportInProgressException",this.$fault="client",Object.setPrototypeOf(this,cC.prototype)}}class lC extends Te{constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),this.name="UserNotFoundException",this.$fault="client",Object.setPrototypeOf(this,lC.prototype)}}class uC extends Te{constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),this.name="InvalidLambdaResponseException",this.$fault="client",Object.setPrototypeOf(this,uC.prototype)}}class fC extends Te{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,fC.prototype)}}class dC extends Te{constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),this.name="TooManyFailedAttemptsException",this.$fault="client",Object.setPrototypeOf(this,dC.prototype)}}class hC extends Te{constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),this.name="UnexpectedLambdaException",this.$fault="client",Object.setPrototypeOf(this,hC.prototype)}}class ig extends Te{constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),this.name="UserLambdaValidationException",this.$fault="client",Object.setPrototypeOf(this,ig.prototype)}}class pC extends Te{constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),this.name="CodeDeliveryFailureException",this.$fault="client",Object.setPrototypeOf(this,pC.prototype)}}class yC extends Te{constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),this.name="InvalidPasswordException",this.$fault="client",Object.setPrototypeOf(this,yC.prototype)}}class vC extends Te{constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidSmsRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,vC.prototype)}}class mC extends Te{constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),this.name="InvalidSmsRoleTrustRelationshipException",this.$fault="client",Object.setPrototypeOf(this,mC.prototype)}}class gC extends Te{constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),this.name="PreconditionNotMetException",this.$fault="client",Object.setPrototypeOf(this,gC.prototype)}}class xC extends Te{constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),this.name="UnsupportedUserStateException",this.$fault="client",Object.setPrototypeOf(this,xC.prototype)}}class bC extends Te{constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),this.name="UsernameExistsException",this.$fault="client",Object.setPrototypeOf(this,bC.prototype)}}class wC extends Te{constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),this.name="AliasExistsException",this.$fault="client",Object.setPrototypeOf(this,wC.prototype)}}class EC extends Te{constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),this.name="InvalidUserPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,EC.prototype)}}class SC extends Te{constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),this.name="MFAMethodNotFoundException",this.$fault="client",Object.setPrototypeOf(this,SC.prototype)}}class AC extends Te{constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),this.name="PasswordResetRequiredException",this.$fault="client",Object.setPrototypeOf(this,AC.prototype)}}class CC extends Te{constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),this.name="UserNotConfirmedException",this.$fault="client",Object.setPrototypeOf(this,CC.prototype)}}class kC extends Te{constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),this.name="UserPoolAddOnNotEnabledException",this.$fault="client",Object.setPrototypeOf(this,kC.prototype)}}class TC extends Te{constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidEmailRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,TC.prototype)}}class PC extends Te{constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),this.name="CodeMismatchException",this.$fault="client",Object.setPrototypeOf(this,PC.prototype)}}class RC extends Te{constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),this.name="ExpiredCodeException",this.$fault="client",Object.setPrototypeOf(this,RC.prototype)}}class IC extends Te{constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),this.name="PasswordHistoryPolicyViolationException",this.$fault="client",Object.setPrototypeOf(this,IC.prototype)}}class OC extends Te{constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),this.name="SoftwareTokenMFANotFoundException",this.$fault="client",Object.setPrototypeOf(this,OC.prototype)}}class _C extends Te{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,_C.prototype)}}class NC extends Te{constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),this.name="ForbiddenException",this.$fault="client",Object.setPrototypeOf(this,NC.prototype)}}class MC extends Te{constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),this.name="GroupExistsException",this.$fault="client",Object.setPrototypeOf(this,MC.prototype)}}class DC extends Te{constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),this.name="DuplicateProviderException",this.$fault="client",Object.setPrototypeOf(this,DC.prototype)}}class LC extends Te{constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),this.name="UserPoolTaggingException",this.$fault="client",Object.setPrototypeOf(this,LC.prototype)}}class jC extends Te{constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),this.name="InvalidOAuthFlowException",this.$fault="client",Object.setPrototypeOf(this,jC.prototype)}}class BC extends Te{constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),this.name="ScopeDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,BC.prototype)}}class FC extends Te{constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),this.name="UnsupportedIdentityProviderException",this.$fault="client",Object.setPrototypeOf(this,FC.prototype)}}const C8=t=>({...t,...t.Value&&{Value:lr}}),bL=t=>({...t,...t.AccessToken&&{AccessToken:lr},...t.RefreshToken&&{RefreshToken:lr},...t.IdToken&&{IdToken:lr}}),Kue=t=>({...t,...t.AuthParameters&&{AuthParameters:lr},...t.ClientId&&{ClientId:lr},...t.UserContextData&&{UserContextData:lr}}),Que=t=>({...t,...t.Session&&{Session:lr},...t.AuthenticationResult&&{AuthenticationResult:bL(t.AuthenticationResult)}}),Yue=t=>({...t,...t.ClientId&&{ClientId:lr},...t.Session&&{Session:lr},...t.ChallengeResponses&&{ChallengeResponses:lr},...t.UserContextData&&{UserContextData:lr}}),Jue=t=>({...t,...t.Session&&{Session:lr},...t.AuthenticationResult&&{AuthenticationResult:bL(t.AuthenticationResult)}});class UC extends Te{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,UC.prototype)}}class VC extends Te{constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),this.name="UnsupportedOperationException",this.$fault="client",Object.setPrototypeOf(this,VC.prototype)}}class $C extends Te{constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),this.name="UnsupportedTokenTypeException",this.$fault="client",Object.setPrototypeOf(this,$C.prototype)}}class zC extends Te{constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),this.name="EnableSoftwareTokenMFAException",this.$fault="client",Object.setPrototypeOf(this,zC.prototype)}}const Xue=t=>({...t,...t.ClientId&&{ClientId:lr},...t.SecretHash&&{SecretHash:lr},...t.Username&&{Username:lr},...t.Password&&{Password:lr},...t.UserAttributes&&{UserAttributes:t.UserAttributes.map(e=>C8(e))},...t.ValidationData&&{ValidationData:t.ValidationData.map(e=>C8(e))},...t.UserContextData&&{UserContextData:lr}}),Zue=async(t,e)=>{const r=qC("InitiateAuth");let n;return n=JSON.stringify(Se(t)),GC(e,r,"/",void 0,n)},efe=async(t,e)=>{const r=qC("RespondToAuthChallenge");let n;return n=JSON.stringify(Se(t)),GC(e,r,"/",void 0,n)},tfe=async(t,e)=>{const r=qC("SignUp");let n;return n=JSON.stringify(Se(t)),GC(e,r,"/",void 0,n)},rfe=async(t,e)=>{if(t.statusCode>=300)return HC(t,e);const r=await sg(t.body,e);let n={};return n=Se(r),{$metadata:Pe(t),...n}},nfe=async(t,e)=>{if(t.statusCode>=300)return HC(t,e);const r=await sg(t.body,e);let n={};return n=Se(r),{$metadata:Pe(t),...n}},sfe=async(t,e)=>{if(t.statusCode>=300)return HC(t,e);const r=await sg(t.body,e);let n={};return n=Se(r),{$metadata:Pe(t),...n}},HC=async(t,e)=>{const r={...t,body:await Lle(t.body,e)},n=jle(t,r.body);switch(n){case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await pfe(r);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await gfe(r);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Cfe(r);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Rfe(r);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Nfe(r);case"UserImportInProgressException":case"com.amazonaws.cognitoidentityprovider#UserImportInProgressException":throw await Ufe(r);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await Hfe(r);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await vfe(r);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await Sfe(r);case"TooManyFailedAttemptsException":case"com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException":throw await _fe(r);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await Dfe(r);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await Vfe(r);case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await ofe(r);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await xfe(r);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await bfe(r);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await wfe(r);case"PreconditionNotMetException":case"com.amazonaws.cognitoidentityprovider#PreconditionNotMetException":throw await Pfe(r);case"UnsupportedUserStateException":case"com.amazonaws.cognitoidentityprovider#UnsupportedUserStateException":throw await Ffe(r);case"UsernameExistsException":case"com.amazonaws.cognitoidentityprovider#UsernameExistsException":throw await $fe(r);case"AliasExistsException":case"com.amazonaws.cognitoidentityprovider#AliasExistsException":throw await ife(r);case"InvalidUserPoolConfigurationException":case"com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException":throw await Efe(r);case"MFAMethodNotFoundException":case"com.amazonaws.cognitoidentityprovider#MFAMethodNotFoundException":throw await Afe(r);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await Tfe(r);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await zfe(r);case"UserPoolAddOnNotEnabledException":case"com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException":throw await Gfe(r);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await yfe(r);case"CodeMismatchException":case"com.amazonaws.cognitoidentityprovider#CodeMismatchException":throw await afe(r);case"ExpiredCodeException":case"com.amazonaws.cognitoidentityprovider#ExpiredCodeException":throw await ffe(r);case"PasswordHistoryPolicyViolationException":case"com.amazonaws.cognitoidentityprovider#PasswordHistoryPolicyViolationException":throw await kfe(r);case"SoftwareTokenMFANotFoundException":case"com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException":throw await Ofe(r);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentityprovider#ConcurrentModificationException":throw await cfe(r);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await dfe(r);case"GroupExistsException":case"com.amazonaws.cognitoidentityprovider#GroupExistsException":throw await hfe(r);case"DuplicateProviderException":case"com.amazonaws.cognitoidentityprovider#DuplicateProviderException":throw await lfe(r);case"UserPoolTaggingException":case"com.amazonaws.cognitoidentityprovider#UserPoolTaggingException":throw await qfe(r);case"InvalidOAuthFlowException":case"com.amazonaws.cognitoidentityprovider#InvalidOAuthFlowException":throw await mfe(r);case"ScopeDoesNotExistException":case"com.amazonaws.cognitoidentityprovider#ScopeDoesNotExistException":throw await Ife(r);case"UnsupportedIdentityProviderException":case"com.amazonaws.cognitoidentityprovider#UnsupportedIdentityProviderException":throw await Lfe(r);case"UnauthorizedException":case"com.amazonaws.cognitoidentityprovider#UnauthorizedException":throw await Mfe(r);case"UnsupportedOperationException":case"com.amazonaws.cognitoidentityprovider#UnsupportedOperationException":throw await jfe(r);case"UnsupportedTokenTypeException":case"com.amazonaws.cognitoidentityprovider#UnsupportedTokenTypeException":throw await Bfe(r);case"EnableSoftwareTokenMFAException":case"com.amazonaws.cognitoidentityprovider#EnableSoftwareTokenMFAException":throw await ufe(r);default:const s=r.body;return Wfe({output:t,parsedBody:s,errorCode:n})}},ife=async(t,e)=>{const r=t.body,n=Se(r),s=new wC({$metadata:Pe(t),...n});return Oe(s,r)},ofe=async(t,e)=>{const r=t.body,n=Se(r),s=new pC({$metadata:Pe(t),...n});return Oe(s,r)},afe=async(t,e)=>{const r=t.body,n=Se(r),s=new PC({$metadata:Pe(t),...n});return Oe(s,r)},cfe=async(t,e)=>{const r=t.body,n=Se(r),s=new _C({$metadata:Pe(t),...n});return Oe(s,r)},lfe=async(t,e)=>{const r=t.body,n=Se(r),s=new DC({$metadata:Pe(t),...n});return Oe(s,r)},ufe=async(t,e)=>{const r=t.body,n=Se(r),s=new zC({$metadata:Pe(t),...n});return Oe(s,r)},ffe=async(t,e)=>{const r=t.body,n=Se(r),s=new RC({$metadata:Pe(t),...n});return Oe(s,r)},dfe=async(t,e)=>{const r=t.body,n=Se(r),s=new NC({$metadata:Pe(t),...n});return Oe(s,r)},hfe=async(t,e)=>{const r=t.body,n=Se(r),s=new MC({$metadata:Pe(t),...n});return Oe(s,r)},pfe=async(t,e)=>{const r=t.body,n=Se(r),s=new nC({$metadata:Pe(t),...n});return Oe(s,r)},yfe=async(t,e)=>{const r=t.body,n=Se(r),s=new TC({$metadata:Pe(t),...n});return Oe(s,r)},vfe=async(t,e)=>{const r=t.body,n=Se(r),s=new uC({$metadata:Pe(t),...n});return Oe(s,r)},mfe=async(t,e)=>{const r=t.body,n=Se(r),s=new jC({$metadata:Pe(t),...n});return Oe(s,r)},gfe=async(t,e)=>{const r=t.body,n=Se(r),s=new sC({$metadata:Pe(t),...n});return Oe(s,r)},xfe=async(t,e)=>{const r=t.body,n=Se(r),s=new yC({$metadata:Pe(t),...n});return Oe(s,r)},bfe=async(t,e)=>{const r=t.body,n=Se(r),s=new vC({$metadata:Pe(t),...n});return Oe(s,r)},wfe=async(t,e)=>{const r=t.body,n=Se(r),s=new mC({$metadata:Pe(t),...n});return Oe(s,r)},Efe=async(t,e)=>{const r=t.body,n=Se(r),s=new EC({$metadata:Pe(t),...n});return Oe(s,r)},Sfe=async(t,e)=>{const r=t.body,n=Se(r),s=new fC({$metadata:Pe(t),...n});return Oe(s,r)},Afe=async(t,e)=>{const r=t.body,n=Se(r),s=new SC({$metadata:Pe(t),...n});return Oe(s,r)},Cfe=async(t,e)=>{const r=t.body,n=Se(r),s=new iC({$metadata:Pe(t),...n});return Oe(s,r)},kfe=async(t,e)=>{const r=t.body,n=Se(r),s=new IC({$metadata:Pe(t),...n});return Oe(s,r)},Tfe=async(t,e)=>{const r=t.body,n=Se(r),s=new AC({$metadata:Pe(t),...n});return Oe(s,r)},Pfe=async(t,e)=>{const r=t.body,n=Se(r),s=new gC({$metadata:Pe(t),...n});return Oe(s,r)},Rfe=async(t,e)=>{const r=t.body,n=Se(r),s=new oC({$metadata:Pe(t),...n});return Oe(s,r)},Ife=async(t,e)=>{const r=t.body,n=Se(r),s=new BC({$metadata:Pe(t),...n});return Oe(s,r)},Ofe=async(t,e)=>{const r=t.body,n=Se(r),s=new OC({$metadata:Pe(t),...n});return Oe(s,r)},_fe=async(t,e)=>{const r=t.body,n=Se(r),s=new dC({$metadata:Pe(t),...n});return Oe(s,r)},Nfe=async(t,e)=>{const r=t.body,n=Se(r),s=new aC({$metadata:Pe(t),...n});return Oe(s,r)},Mfe=async(t,e)=>{const r=t.body,n=Se(r),s=new UC({$metadata:Pe(t),...n});return Oe(s,r)},Dfe=async(t,e)=>{const r=t.body,n=Se(r),s=new hC({$metadata:Pe(t),...n});return Oe(s,r)},Lfe=async(t,e)=>{const r=t.body,n=Se(r),s=new FC({$metadata:Pe(t),...n});return Oe(s,r)},jfe=async(t,e)=>{const r=t.body,n=Se(r),s=new VC({$metadata:Pe(t),...n});return Oe(s,r)},Bfe=async(t,e)=>{const r=t.body,n=Se(r),s=new $C({$metadata:Pe(t),...n});return Oe(s,r)},Ffe=async(t,e)=>{const r=t.body,n=Se(r),s=new xC({$metadata:Pe(t),...n});return Oe(s,r)},Ufe=async(t,e)=>{const r=t.body,n=Se(r),s=new cC({$metadata:Pe(t),...n});return Oe(s,r)},Vfe=async(t,e)=>{const r=t.body,n=Se(r),s=new ig({$metadata:Pe(t),...n});return Oe(s,r)},$fe=async(t,e)=>{const r=t.body,n=Se(r),s=new bC({$metadata:Pe(t),...n});return Oe(s,r)},zfe=async(t,e)=>{const r=t.body,n=Se(r),s=new CC({$metadata:Pe(t),...n});return Oe(s,r)},Hfe=async(t,e)=>{const r=t.body,n=Se(r),s=new lC({$metadata:Pe(t),...n});return Oe(s,r)},Gfe=async(t,e)=>{const r=t.body,n=Se(r),s=new kC({$metadata:Pe(t),...n});return Oe(s,r)},qfe=async(t,e)=>{const r=t.body,n=Se(r),s=new LC({$metadata:Pe(t),...n});return Oe(s,r)},Pe=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"]}),Wfe=Nce(Te),GC=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 qC(t){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}}class Kfe extends ng.classBuilder().ep({...tC}).m(function(e,r,n,s){return[QA(n,this.serialize,this.deserialize),YA(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").f(Kue,Que).ser(Zue).de(rfe).build(){}class Qfe extends ng.classBuilder().ep({...tC}).m(function(e,r,n,s){return[QA(n,this.serialize,this.deserialize),YA(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").f(Yue,Jue).ser(efe).de(nfe).build(){}class Yfe extends ng.classBuilder().ep({...tC}).m(function(e,r,n,s){return[QA(n,this.serialize,this.deserialize),YA(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").f(Xue,void 0).ser(tfe).de(sfe).build(){}class oh extends Error{}oh.prototype.name="InvalidTokenError";function Jfe(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 Xfe(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 Jfe(e)}catch{return atob(e)}}function wL(t,e){if(typeof t!="string")throw new oh("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 oh(`Invalid token specified: missing part #${r+1}`);let s;try{s=Xfe(n)}catch(i){throw new oh(`Invalid token specified: invalid base64 for part #${r+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new oh(`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 Zfe=["signatures"],ede=1,tde=`${ede} (Web ${loe})`;function Rr(t,e,r){const n=Math.floor(Date.now()/1e3),s=n+e;return{version:tde,issuedAt:n,expiresAt:s,name:t,data:r}}async function rde(t,e){const r=nde(e),n=await t.sign(new Uint8Array(r));return tr({},e,{signatures:[{sessionId:await t.sessionId(),signature:n}]})}function nde(t){const{version:e,issuedAt:r,expiresAt:n,name:s,data:i}=t,a=Sr(uoe({version:e,issuedAt:r,expiresAt:n,name:s,data:i}));return fe(Ct(a))}function sde(t,e){const r=Pr(t,Zfe),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}({}),Zx=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 ide({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 ode=["lifespan"],ade=["lifespan"],cde=["lifespan"],lde=["lifespan"],ude=["lifespan"],fde=["lifespan"],dde=["lifespan"],hde=["lifespan"],pde=["lifespan"];async function zd(t){let{lifespan:e}=t,r=Pr(t,ode);return Rr(Ir.initiateAuth,e,r)}async function k8(t){let{lifespan:e}=t,r=Pr(t,ade);return Rr(Ir.openSession,e,r)}async function yde(t){let{lifespan:e}=t,r=Pr(t,cde);return Rr(Ir.validateSession,e,r)}function vde(t){let{lifespan:e}=t,r=Pr(t,lde);return Rr(Ir.finishValidateSession,e,r)}function T8(t){let{lifespan:e}=t,r=Pr(t,ude);return Rr(Ir.closeSession,e,r)}function mde(t){let{lifespan:e}=t,r=Pr(t,fde);return Rr(Ir.listSessions,e,r)}function gde(t){let{lifespan:e}=t,r=Pr(t,dde);return Rr(Ir.getSession,e,r)}function xde(t){let{lifespan:e}=t,r=Pr(t,hde);return Rr(Ir.sessionAuthProof,e,r)}function bde(t){let{lifespan:e}=t,r=Pr(t,pde);return Rr(Ir.getIdToken,e,r)}const wde=["token","to","value"],Ede=["token","to","id","safe","data"],Sde=["token","to","values","data"],Ade=["to","value","abi","func","args"];function Cde({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===pl)throw new Error("Contract creation not supported");return SL(i)?{type:"transaction",to:i.to,value:zA(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:kde(s,o).map(a=>{if(!a.to||a.to===pl)throw new Error("Contract creation not supported");return SL(a)?{type:"transaction",to:a.to,value:zA(BigInt(a.value||0)),data:ne(a.data||"0x")}:a}),transactionsFeeQuote:i})}function kde(t,e){const r=[...t];if(e)switch(e.token.type){case Zx.unknown:r.push({to:e.to,value:e.value});break;case Zx.erc20Token:if(!e.token.contractAddress)throw new Error("contract address is required");r.push(WC({tokenAddress:e.token.contractAddress,to:e.to,value:e.value}));break;case Zx.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(KC({tokenAddress:e.token.contractAddress,to:e.to,vals:[{id:e.token.tokenID,amount:e.value}]}));break}return r}function Tde({lifespan:t,chainId:e,wallet:r,metaTxHash:n}){return Rr(Ir.getTransactionReceipt,t,{wallet:r,network:e.toString(),metaTxHash:n})}function Pde(t){let{token:e,to:r,value:n}=t,s=Pr(t,wde);return Cy(tr({transactions:[WC({tokenAddress:e,to:r,value:n.toString()})]},s))}function Rde(t){let{token:e,to:r,id:n,safe:s,data:i}=t,o=Pr(t,Ede);return Cy(tr({transactions:[_de({tokenAddress:e,to:r,id:n,data:i,safe:s})]},o))}function Ide(t){let{token:e,to:r,values:n,data:s}=t,i=Pr(t,Sde);const o=n.map(a=>({id:a.id,amount:BigInt(a.amount).toString()}));return Cy(tr({transactions:[KC({tokenAddress:e,to:r,vals:o,data:s})]},i))}function Ode(t){let{to:e,value:r,abi:n,func:s,args:i}=t,o=Pr(t,Ade);return Cy(tr({transactions:[EL({to:e,value:BigInt(r).toString(),data:{abi:n,func:s,args:i}})]},o))}function WC(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 _de(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 KC(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 EL(t){const e=t,r=t;if(e.abi!==void 0)return{type:"delayedEncode",to:e.to,value:zA(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 Nde(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 SL(t){return!["transaction","erc20send","erc721send","erc1155send","delayedEncode"].includes(t.type)}class hv{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 AL{constructor(){this.store=void 0,R0.isAvailable()?this.store=new R0:this.store=new Mde}async get(e){return this.store.get(e)}async set(e,r){return this.store.set(e,r)}}class R0{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(!R0.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 Mde{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 L2="seq-waas-session-p256k1",j2="seq-waas-session";async function CL(t,e){const r=await e.get(L2,j2,t);if(!r)throw new Error("No private key found");const n=new fp(r);return{sessionId(){return n.getAddress()},sign(s){return n.signMessage(s)},clear:async()=>{await e.delete(L2,j2,t)}}}async function Dde(t,e){const n=await new fp(t).getAddress();return await e.set(L2,j2,n,t),CL(n,e)}async function Lde(t){const e=fp.createRandom();return Dde(e.privateKey,t)}let kL=function(t){return t[t.ECDSAP256K1=0]="ECDSAP256K1",t[t.ECDSAP256R1=1]="ECDSAP256R1",t}({});const B2="seq-waas-session-p256r1",F2="seq-waas-session";async function TL(t,e,r){const n=await r.get(B2,F2,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]=kL.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(B2,F2,t)}}}async function jde(t,e,r){const n=await Fde(e,t.publicKey);return await r.set(B2,F2,n,t),TL(n,e,r)}async function Bde(t,e){const r=await t.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"]);return jde(r,t,e)}async function Fde(t,e){const r=await t.exportKey("raw",e),n=new Uint8Array(r.byteLength+1);return n[0]=kL.ECDSAP256R1,n.set(new Uint8Array(r),1),ne(n)}async function U2(t,e,r){if(!r)throw new Error("No secure store available");return e?TL(t,e,r):CL(t,r)}async function Ude(t,e){if(!e)throw new Error("No secure store available");return t?Bde(t,e):Lde(e)}const Vde=["lifespan"],$de=["lifespan"],zde=["lifespan"];function Hde(t){let{lifespan:e}=t,r=Pr(t,Vde);return Rr(Ir.listAccounts,e,r)}function Gde(t){let{lifespan:e}=t,r=Pr(t,$de);return Rr(Ir.federateAccount,e,r)}function qde(t){let{lifespan:e}=t,r=Pr(t,zde);return Rr(Ir.removeAccount,e,r)}const V2=Object.entries(E0).reduce((t,[e,r])=>(t[r.name]=r.chainId,t),{}),Wde=Object.entries(V2).reduce((t,[e,r])=>(t[r]=e,t),{});function eb(t){const e=typeof t=="number"?t:parseInt(t);if(e in Wde)return e;const r=t.toString().toLowerCase();if(r in V2)return V2[r];throw new Error(`Unknown network: ${t}`)}const PL=()=>RL()?new Kde:null;function RL(){return typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.subtle=="object"}class Kde{constructor(){if(!RL())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 IL=()=>OL()?new Qde:null;function OL(){return typeof indexedDB=="object"}class Qde{constructor(){if(this.db=void 0,!OL())throw new Error("IndexedDB is not available");this.db=null}async openDB(e,r,n){return this.db?this.db:(this.db=await Poe(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 Yde="@0xsequence.waas.wallet",Jde="@0xsequence.waas.session_id",Xde="@0xsequence.waas.status",Xt=5*60;class Zde{constructor(e={network:1},r=new AL,n=PL(),s=IL()){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 hv(this.store,Xde,"signed-out"),this.sessionId=new hv(this.store,Jde,void 0),this.wallet=new hv(this.store,Yde,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:eb(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 U2(r,this.cryptoBackend,this.secureStoreBackend);return rde(n,e)}async signUsingSessionKey(e){const r=await this.getSessionId();if(!r)throw new Error("session not open");return(await U2(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 Ude(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 k8({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 zd({sessionId:e,identityType:Ft.Guest,verifier:e,lifespan:Xt});return this.signIntent(r)}async initiateEmailAuth(e){const r=await this.getSessionId(),n=await zd({sessionId:r,identityType:Ft.Email,verifier:`${e};${r}`,lifespan:Xt});return this.signIntent(n)}async initiateIdTokenAuth(e,r){const n=await this.getSessionId(),s=Ar(e),i=await zd({sessionId:n,identityType:Ft.OIDC,verifier:`${s};${r}`,lifespan:Xt});return this.signIntent(i)}async initiateStytchAuth(e,r){const n=await this.getSessionId(),s=Ar(e),i=await zd({sessionId:n,identityType:Ft.Stytch,verifier:`${s};${r}`,lifespan:Xt});return this.signIntent(i)}async initiatePlayFabAuth(e,r){const n=await this.getSessionId(),s=Ar(r),i=await zd({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 k8(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=T8({lifespan:e||Xt,sessionId:r});return this.signIntent(n)}async signOutSession(e){const r=T8({lifespan:Xt,sessionId:e});return this.signIntent(r)}async listSessions(){const e=mde({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=xde({lifespan:(r=e.lifespan)!=null?r:Xt,network:eb(e.network||this.config.network).toString(),wallet:await this.getWalletAddress(),nonce:e.nonce});return this.signIntent(n)}async signMessage(e){var r;const n=ide(tr({chainId:eb(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=Tde(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=Pde(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=Rde(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=Ide(await this.commonArgs(e));return this.signIntent(r)}async callContract(e){const r=Ode(await this.commonArgs(e));return this.signIntent(r)}async feeOptions(e){const r=Cde(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 yde({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=gde({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=vde({sessionId:n,wallet:s,lifespan:Xt,salt:e,challenge:r});return this.signIntent(i)}async listAccounts(){const e=Hde({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=Gde(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=bde({wallet:await this.getWalletAddress(),lifespan:Xt,sessionId:r,nonce:e});return this.signIntent(n)}async batch(e){const r=Nde(e);return this.signIntent(r)}signalObservers(e,r){e.forEach(n=>n(r))}async updateIntentTime(e,r){const n=sde(e,r);return this.signIntent(n)}}class ehe{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"),tb(n,s,i)).then(o=>rb(o).then(a=>({session:a.session,response:a.response})),o=>{throw pv.new({cause:`fetch(): ${o.message||""}`})}),this.sendIntent=(n,s,i)=>this.fetch(this.url("SendIntent"),tb(n,s,i)).then(o=>rb(o).then(a=>({response:a.response})),o=>{throw pv.new({cause:`fetch(): ${o.message||""}`})}),this.chainList=(n,s)=>this.fetch(this.url("ChainList"),tb({},n,s)).then(i=>rb(i).then(o=>({chains:o.chains})),i=>{throw pv.new({cause:`fetch(): ${i.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const tb=(t={},e={},r=null)=>({method:"POST",headers:tr({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),rb=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),BL.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(fhe[n]||Yt).new(r)}return r});let Yt=class _L 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,_L.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},the=class NL extends Yt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,NL.prototype)}},pv=class ML extends Yt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ML.prototype)}},rhe=class DL extends Yt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,DL.prototype)}},nhe=class LL extends Yt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,LL.prototype)}},she=class jL extends Yt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,jL.prototype)}},BL=class FL extends Yt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,FL.prototype)}},ihe=class UL extends Yt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,UL.prototype)}},ohe=class VL extends Yt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,VL.prototype)}},ahe=class $L extends Yt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,$L.prototype)}},che=class zL extends Yt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,zL.prototype)}},lhe=class HL extends Yt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,HL.prototype)}},uhe=class GL extends Yt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,GL.prototype)}};class QC extends Yt{constructor(e="TenantNotFound",r=1001,n="Tenant not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,QC.prototype)}}class mp 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,mp.prototype)}}class YC 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,YC.prototype)}}class JC 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,JC.prototype)}}class gp 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,gp.prototype)}}class XC extends Yt{constructor(e="ChallengeExpired",r=7004,n="The challenge has expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,XC.prototype)}}class ZC extends Yt{constructor(e="TooManyAttempts",r=7005,n="Too many attempts",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ZC.prototype)}}const fhe={0:the,[-1]:pv,[-2]:rhe,[-3]:nhe,[-4]:she,[-5]:BL,[-6]:ihe,[-7]:ohe,[-8]:ahe,[-9]:che,[-10]:lhe,1e3:uhe,1001:QC,7e3:mp,7001:YC,7002:JC,7003:gp,7004:XC,7005:ZC};function P1(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 ky(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 qL(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 dhe(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 P8(t){return ky(t)||dhe(t)||qL(t)}function hhe(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 phe(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 yhe(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="feeOptions"&&typeof t.data=="object"&&Array.isArray(t.data.feeOptions)}function vhe(t){return typeof t=="object"&&t.code===xd.validationRequired&&typeof t.data=="object"&&typeof t.data.sessionId=="string"}function mhe(t){return typeof t=="object"&&t.code===xd.validationFinished&&typeof t.data=="object"}function ghe(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="sessionClosed"}function xhe(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 bhe(t){return typeof t=="object"&&t.code===xd.accountFederated&&typeof t.data=="object"&&typeof t.data.account=="object"}function whe(t){return typeof t=="object"&&t.code===xd.accountList&&typeof t.data=="object"}function R8(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 Ehe(t){return typeof t=="object"&&t.code===xd.idToken&&typeof t.data=="object"&&typeof t.data.idToken=="string"}class She{constructor(e,r){this.region=e,this.clientId=r,this.cognitoMemo=void 0}cognito(){return this.cognitoMemo||(this.cognitoMemo=new Wue({region:this.region})),this.cognitoMemo}signUp(e){return e=e.toLowerCase().trim(),this.cognito().send(new Yfe({ClientId:this.clientId,Username:e,Password:"aB1%"+Ahe(14),UserAttributes:[{Name:"email",Value:e}]}))}signIn(e){return e=e.toLowerCase().trim(),this.cognito().send(new Kfe({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 ig&&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 Qfe({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 Ahe(t){return Array.from(Che(t)).map(e=>e.toString(16).padStart(2,"0")).join("")}function Che(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=Ohe(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 C=`"content-digest": ${p} -"@signature-params": ${y.substring(4)}`,O={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},_=l.url.includes("dev-waas")?_he:Nhe,A=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 U=Uint8Array.from(atob(j),K=>K.charCodeAt(0));if(!await i.cryptoBackend.verify(O,A,U,new TextEncoder().encode(C)))throw new Error("Signature verification failed, consequent requests will fail")}catch(d){throw i.signatureVerificationFailed=!0,d}}),c},this.config=Ihe(e),this.waas=new Zde(tr({network:1},e),this.store,this.cryptoBackend,this.secureStoreBackend),this.client=new ehe(this.config.rpcServer,this._fetch),this.deviceName=new hv(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 She(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(R8(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 gp)throw f;if(f instanceof mp){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(!P1(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return new khe(e,n.data.challenge)}async initIdTokenAuth(e){var r;const n=wL(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(!P1(o))throw new Error(`Invalid response: ${JSON.stringify(o)}`);return s?new The(e):new WL(e)}async initEmailAuth(e){const r=await this.waas.getSessionId(),n=await this.waas.initiateEmailAuth(e),s=await this.sendIntent(n);if(!P1(s))throw new Error(`Invalid response: ${JSON.stringify(s)}`);return new ek(e,r,s.data.challenge)}async initPlayFabAuth(e,r){const n=await this.waas.initiatePlayFabAuth(e,r),s=await this.sendIntent(n);if(!P1(s))throw new Error(`Invalid response: ${JSON.stringify(s)}`);return new Phe(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 mp)&&!(s instanceof gp)&&await this.waas.completeSignOut(),s}}async registerSession(e,r){try{return await this.client.registerSession({intent:e,friendlyName:r},this.headers())}catch(n){if(R8(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 Ar(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(!ghe(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 U2(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(!mhe(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(!xhe(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,phe)}async listAccounts(){const e=await this.waas.listAccounts(),r=await this.sendIntent(e);if(!whe(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(!bhe(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(!Ehe(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(vhe(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,hhe)}async trySendTransactionIntent(e,r){let n=await this.trySendIntent(r,e,P8);for(;qL(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,P8)}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,yhe)}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 Dhe=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"},Lhe=t=>{const{onCancel:e,onConfirm:r}=t;return k.jsxs(G,{style:{maxWidth:"600px"},flexDirection:"column",paddingX:"10",paddingY:"4",alignItems:"center",gap:"4",children:[k.jsx(G,{children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Email already in use"})}),k.jsx(G,{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:["(",Dhe(t.info),")"]}),". You can cancel this or force create a new account."]})}),k.jsxs(G,{flexDirection:"row",gap:"3",marginTop:"6",marginBottom:"2",children:[k.jsx(ft,{label:"Cancel",onClick:e}),k.jsx(ft,{variant:"primary",label:"Create new account",onClick:r})]})]})};function I0(){return I0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ht({},n,s)).then(i=>St(i).then(o=>({status:o.status})),i=>{throw ut.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),ht({},n,s)).then(i=>St(i).then(o=>({version:o.version})),i=>{throw ut.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),ht({},n,s)).then(i=>St(i).then(o=>({status:o.status})),i=>{throw ut.new({cause:`fetch(): ${i.message||""}`})}),this.getChainID=(n,s)=>this.fetch(this.url("GetChainID"),ht({},n,s)).then(i=>St(i).then(o=>({chainID:o.chainID})),i=>{throw ut.new({cause:`fetch(): ${i.message||""}`})}),this.getEtherBalance=(n,s,i)=>this.fetch(this.url("GetEtherBalance"),ht(n,s,i)).then(o=>St(o).then(a=>({balance:a.balance})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalances=(n,s,i)=>this.fetch(this.url("GetTokenBalances"),ht(n,s,i)).then(o=>St(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSupplies=(n,s,i)=>this.fetch(this.url("GetTokenSupplies"),ht(n,s,i)).then(o=>St(o).then(a=>({page:a.page,contractType:a.contractType,tokenIDs:a.tokenIDs})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSuppliesMap=(n,s,i)=>this.fetch(this.url("GetTokenSuppliesMap"),ht(n,s,i)).then(o=>St(o).then(a=>({supplies:a.supplies})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.getBalanceUpdates=(n,s,i)=>this.fetch(this.url("GetBalanceUpdates"),ht(n,s,i)).then(o=>St(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.getTransactionHistory=(n,s,i)=>this.fetch(this.url("GetTransactionHistory"),ht(n,s,i)).then(o=>St(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.syncBalance=(n,s,i)=>this.fetch(this.url("SyncBalance"),ht(n,s,i)).then(o=>St(o).then(a=>({})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceipt=(n,s,i)=>this.fetch(this.url("FetchTransactionReceipt"),ht(n,s,i)).then(o=>St(o).then(a=>({receipt:a.receipt})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.getOrderbookOrders=(n,s,i)=>this.fetch(this.url("GetOrderbookOrders"),ht(n,s,i)).then(o=>St(o).then(a=>({page:a.page,orders:a.orders})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.getTopOrders=(n,s,i)=>this.fetch(this.url("GetTopOrders"),ht(n,s,i)).then(o=>St(o).then(a=>({orders:a.orders})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceiptWithFilter=(n,s,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),ht(n,s,i)).then(o=>St(o).then(a=>({receipt:a.receipt})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.getAllWebhookListeners=(n,s,i)=>this.fetch(this.url("GetAllWebhookListeners"),ht(n,s,i)).then(o=>St(o).then(a=>({listeners:a.listeners})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.getWebhookListener=(n,s,i)=>this.fetch(this.url("GetWebhookListener"),ht(n,s,i)).then(o=>St(o).then(a=>({listener:a.listener})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.addWebhookListener=(n,s,i)=>this.fetch(this.url("AddWebhookListener"),ht(n,s,i)).then(o=>St(o).then(a=>({status:a.status,listener:a.listener})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.updateWebhookListener=(n,s,i)=>this.fetch(this.url("UpdateWebhookListener"),ht(n,s,i)).then(o=>St(o).then(a=>({status:a.status})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.removeWebhookListener=(n,s,i)=>this.fetch(this.url("RemoveWebhookListener"),ht(n,s,i)).then(o=>St(o).then(a=>({status:a.status})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.toggleWebhookListener=(n,s,i)=>this.fetch(this.url("ToggleWebhookListener"),ht(n,s,i)).then(o=>St(o).then(a=>({webhookListener:a.webhookListener})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.pauseAllWebhookListeners=(n,s,i)=>this.fetch(this.url("PauseAllWebhookListeners"),ht(n,s,i)).then(o=>St(o).then(a=>({status:a.status})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.resumeAllWebhookListeners=(n,s,i)=>this.fetch(this.url("ResumeAllWebhookListeners"),ht(n,s,i)).then(o=>St(o).then(a=>({status:a.status})),o=>{throw ut.new({cause:`fetch(): ${o.message||""}`})}),this.subscribeReceipts=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeReceipts"),ht(n,s.headers,s.signal)).then(async function(o){await nb(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeEvents=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeEvents"),ht(n,s.headers,s.signal)).then(async function(o){await nb(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeBalanceUpdates=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeBalanceUpdates"),ht(n,s.headers,s.signal)).then(async function(o){await nb(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 nb=async(t,e,r)=>{const{onMessage:n,onOpen:s,onClose:i,onError:o}=e;if(!t.ok){try{await St(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(ut.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:I0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),St=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(KL[n]||rt).new(r)}return r});class rt 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,rt.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}}class tk extends rt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,tk.prototype)}}class ut extends rt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ut.prototype)}}class rk extends rt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,rk.prototype)}}class nk extends rt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nk.prototype)}}class sk extends rt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,sk.prototype)}}class td extends rt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,td.prototype)}}class ik extends rt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ik.prototype)}}class ok extends rt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ok.prototype)}}class ak extends rt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ak.prototype)}}class Lu extends rt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Lu.prototype)}}class ck extends rt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ck.prototype)}}class lk extends rt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lk.prototype)}}class uk extends rt{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uk.prototype)}}class fk extends rt{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fk.prototype)}}class dk extends rt{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dk.prototype)}}class hk extends rt{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hk.prototype)}}class pk extends rt{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pk.prototype)}}class yk extends rt{constructor(e="Timeout",r=2e3,n="Request timed out",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yk.prototype)}}class vk extends rt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vk.prototype)}}class mk extends rt{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mk.prototype)}}class gk extends rt{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gk.prototype)}}class xk extends rt{constructor(e="ResourceExhausted",r=2004,n="Resource exhausted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,xk.prototype)}}class bk extends rt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,bk.prototype)}}class wk extends rt{constructor(e="ProjectNotFound",r=3002,n="Project not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wk.prototype)}}class Ek extends rt{constructor(e="MetadataCallFailed",r=3003,n="Metadata service call failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Ek.prototype)}}const KL={0:tk,[-1]:ut,[-2]:rk,[-3]:nk,[-4]:sk,[-5]:td,[-6]:ik,[-7]:ok,[-8]:ak,[-9]:Lu,[-10]:ck,1e3:lk,1001:uk,1002:fk,1003:dk,1004:hk,1005:pk,2e3:yk,2001:vk,2002:mk,2003:gk,2004:xk,3e3:bk,3002:wk,3003:Ek},I8=globalThis.fetch;class QL extends jhe{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,I8),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=I0({},i.headers,o),I8(s,i)},this.fetch=this._fetch}}const O8=[..."🐶🐱🐭🐹🐰🦊🐻🐼🐨🐯🦁🐮🐷🐽🐸🐵🙈🙉🙊🐒🐔🐧🐦🐤🐣🐥🦆🦅🦉🦇🐺🐗🐴🦄🐝🐛🦋🐌🐞🐜🦟🦗🕷🕸🦂🐢🐍🦎🦖🦕🐙🦑🦐🦞🦀🐡🐠🐟🐬🐳🐋🦈🐊🐅🐆🦓🦍🦧🐘🦛🦏🐪🐫🦒🦘🐃🐂🐄🐎🐖🐏🐑🦙🐐🦌🐕🐩🦮🐈🐓🦃🦚🦜🦢🦩🕊🐇🦝🦨🦡🦦🦥🐁🐀🐿🦔🐾🐉🐲🌵🎄🌲🌳🌴🌱🌿🍀🎍🎋🍃👣🍂🍁🍄🐚🌾💐🌷🌹🥀🌺🌸🌼🌻🌞🌝🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈🥭🍍🥥🥝🍅🥑🥦🥬🥒🌶🌽🥕🧄🧅🥔🍠🥐🥯🍞🥖🥨🧀🥚🍳🧈🥞🧇🥓🥩🍗🍖🦴🌭🍔🍟🍕🥪🥙🧆🌮🌯🥗🥘🥫🍝🍜🍲🍛🍣🍱🥟🦪🍤🍙🍚🍘🍥🥠🥮🍢🍡🍧🍨🍦🥧🧁🍰🎂🍮🍭🍬🍫🍿🍩🍪🌰🥜👀👂👃👄👅👆👇👈👉👊👋👌👍👎👏👐👑👒👓🎯🎰🎱🎲🎳👾👯👺👻👽🏂🏃🏄"];function Vo(){const e=aoe.en,r=O8[Math.floor(Math.random()*O8.length)],n=e.getWord(Math.floor(Math.random()*2048)),s=e.getWord(Math.floor(Math.random()*2048));return`${r} ${n} ${s}`}function Bhe({onSuccess:t}){const[e,r]=v.useState(""),[n,s]=v.useState(),[i,o]=v.useState(!1),[a,c]=v.useState("");return{inProgress:i||!!a,loading:i,error:n,initiateAuth:async f=>{o(!0);try{const{instance:d}=await Ce.email.initiateAuth({email:f});c(d),r(f)}catch(d){console.error(d),s(d.message||"Unknown error")}finally{o(!1)}},sendChallengeAnswer:a?async f=>{o(!0);try{const d=await Ce.getSessionHash(),h=await Ce.email.finalizeAuth({instance:a,answer:f,email:e,sessionHash:d});if(!("idToken"in h))throw new Error("invalid identity returned by finalizeAuth");t(h.idToken)}catch(d){s(d.message||"Unknown error")}finally{o(!1)}}:void 0}}const yv=t=>t.name==="AccountAlreadyLinked";function YL({onSuccess:t,sessionName:e,linkAccount:r=!1}){const n=L7(),[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(()=>Ce.onEmailAuthCodeRequired(async m=>{a(!1),f(()=>m)}),[Ce,a,f]),{inProgress:c,initiateAuth:async m=>{a(!0),l(!0);try{if(r){const x=await Ce.initAuth({email:m});h(x),a(!1)}else{const x=await Ce.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 Ce.linkAccount(d.withAnswer(m))}catch(x){yv(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 Fhe=({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},Uhe=Fhe(),Vhe=(t,e)=>t===e?e:Object.keys(t).reduce((r,n)=>(n in e&&Uhe(t[n],e[n])&&(r[n]=t[n]),r),Object.assign({},e)),$he=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]},JL=(t,e="StytchProvider")=>`${t} can only be used inside <${e}>.`,zhe="You cannot render a inside another .",Hhe=`The @stytch/react library is not meant for use with serverside environments like NextJS. + */class yL{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 pL}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)?yL.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}`)},vL="required",fi="fn",di="argv",gd="ref",p8=!0,y8="isSet",yp="booleanEquals",Hl="error",Vd="endpoint",Ri="tree",sC="PartitionResult",v8={[vL]:!1,type:"String"},m8={[vL]:!0,default:!1,type:"Boolean"},g8={[gd]:"Endpoint"},mL={[fi]:yp,[di]:[{[gd]:"UseFIPS"},!0]},gL={[fi]:yp,[di]:[{[gd]:"UseDualStack"},!0]},Ks={},x8={[fi]:"getAttr",[di]:[{[gd]:sC},"supportsFIPS"]},b8={[fi]:yp,[di]:[!0,{[fi]:"getAttr",[di]:[{[gd]:sC},"supportsDualStack"]}]},w8=[mL],E8=[gL],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:Ks,headers:Ks},type:Vd}],type:Ri},{conditions:[{[fi]:y8,[di]:S8}],rules:[{conditions:[{[fi]:"aws.partition",[di]:S8,assign:sC}],rules:[{conditions:[mL,gL],rules:[{conditions:[{[fi]:yp,[di]:[p8,x8]},b8],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ks,headers:Ks},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:Ks,headers:Ks},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:Ks,headers:Ks},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:Ks,headers:Ks},type:Vd}],type:Ri}],type:Ri},{error:"Invalid Configuration: Missing Region",type:Hl}]},Lue=Due,jue=(t,e={})=>dae(Lue,{endpointParams:t,logger:e.logger});k0.aws=GD;const Bue=t=>({apiVersion:"2016-04-18",base64Decoder:(t==null?void 0:t.base64Decoder)??ZA,base64Encoder:(t==null?void 0:t.base64Encoder)??rL,disableHostPrefix:(t==null?void 0:t.disableHostPrefix)??!1,endpointProvider:(t==null?void 0:t.endpointProvider)??jue,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 eL,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)??tL}),Fue=["in-region","cross-region","mobile","standard","legacy"],Uue=({defaultsMode:t}={})=>ule(async()=>{const e=typeof t=="function"?await t():t;switch(e==null?void 0:e.toLowerCase()){case"auto":return Promise.resolve(Vue()?"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 ${Fue.join(", ")}, got ${e}`)}}),Vue=()=>{var r,n;const t=typeof window<"u"&&((r=window==null?void 0:window.navigator)!=null&&r.userAgent)?yL.parse(window.navigator.userAgent):void 0,e=(n=t==null?void 0:t.platform)==null?void 0:n.type;return e==="tablet"||e==="mobile"},$ue=t=>{const e=Uue(t),r=()=>e().then(Lce),n=Bue(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:eC.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(Cae)),useFipsEndpoint:(t==null?void 0:t.useFipsEndpoint)??(()=>Promise.resolve(kae))}},zue=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}}},Hue=t=>({region:t.region()}),Gue=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}}},que=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),P1=t=>t,Wue=(t,e)=>{const r={...P1(zue(t)),...P1(Vce(t)),...P1(Noe(t)),...P1(Gue(t))};return e.forEach(n=>n.configure(r)),{...t,...Hue(r),...$ce(r),...Moe(r),...que(r)}};class Kue extends xce{constructor(...[e]){const r=$ue(e||{}),n=zle(r),s=Woe(n),i=gce(s),o=Tae(i),a=o,c=Hae(a),l=$le(c),u=Wue(l,(e==null?void 0:e.extensions)||[]);super(u),this.config=u,this.middlewareStack.use(Aae(this.config)),this.middlewareStack.use(Kce(this.config)),this.middlewareStack.use(ole(this.config)),this.middlewareStack.use(Boe(this.config)),this.middlewareStack.use(Voe(this.config)),this.middlewareStack.use(qoe(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 Ie extends tC{constructor(e){super(e),Object.setPrototypeOf(this,Ie.prototype)}}class iC extends Ie{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,iC.prototype)}}class oC extends Ie{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,oC.prototype)}}class aC extends Ie{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,aC.prototype)}}class cC extends Ie{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,cC.prototype)}}class lC extends Ie{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,lC.prototype)}}class uC extends Ie{constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),this.name="UserImportInProgressException",this.$fault="client",Object.setPrototypeOf(this,uC.prototype)}}class fC extends Ie{constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),this.name="UserNotFoundException",this.$fault="client",Object.setPrototypeOf(this,fC.prototype)}}class dC extends Ie{constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),this.name="InvalidLambdaResponseException",this.$fault="client",Object.setPrototypeOf(this,dC.prototype)}}class hC extends Ie{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,hC.prototype)}}class pC extends Ie{constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),this.name="TooManyFailedAttemptsException",this.$fault="client",Object.setPrototypeOf(this,pC.prototype)}}class yC extends Ie{constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),this.name="UnexpectedLambdaException",this.$fault="client",Object.setPrototypeOf(this,yC.prototype)}}class og extends Ie{constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),this.name="UserLambdaValidationException",this.$fault="client",Object.setPrototypeOf(this,og.prototype)}}class vC extends Ie{constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),this.name="CodeDeliveryFailureException",this.$fault="client",Object.setPrototypeOf(this,vC.prototype)}}class mC extends Ie{constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),this.name="InvalidPasswordException",this.$fault="client",Object.setPrototypeOf(this,mC.prototype)}}class gC extends Ie{constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidSmsRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,gC.prototype)}}class xC extends Ie{constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),this.name="InvalidSmsRoleTrustRelationshipException",this.$fault="client",Object.setPrototypeOf(this,xC.prototype)}}class bC extends Ie{constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),this.name="PreconditionNotMetException",this.$fault="client",Object.setPrototypeOf(this,bC.prototype)}}class wC extends Ie{constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),this.name="UnsupportedUserStateException",this.$fault="client",Object.setPrototypeOf(this,wC.prototype)}}class EC extends Ie{constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),this.name="UsernameExistsException",this.$fault="client",Object.setPrototypeOf(this,EC.prototype)}}class SC extends Ie{constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),this.name="AliasExistsException",this.$fault="client",Object.setPrototypeOf(this,SC.prototype)}}class AC extends Ie{constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),this.name="InvalidUserPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,AC.prototype)}}class CC extends Ie{constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),this.name="MFAMethodNotFoundException",this.$fault="client",Object.setPrototypeOf(this,CC.prototype)}}class kC extends Ie{constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),this.name="PasswordResetRequiredException",this.$fault="client",Object.setPrototypeOf(this,kC.prototype)}}class TC extends Ie{constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),this.name="UserNotConfirmedException",this.$fault="client",Object.setPrototypeOf(this,TC.prototype)}}class PC extends Ie{constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),this.name="UserPoolAddOnNotEnabledException",this.$fault="client",Object.setPrototypeOf(this,PC.prototype)}}class RC extends Ie{constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidEmailRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,RC.prototype)}}class IC extends Ie{constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),this.name="CodeMismatchException",this.$fault="client",Object.setPrototypeOf(this,IC.prototype)}}class OC extends Ie{constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),this.name="ExpiredCodeException",this.$fault="client",Object.setPrototypeOf(this,OC.prototype)}}class _C extends Ie{constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),this.name="PasswordHistoryPolicyViolationException",this.$fault="client",Object.setPrototypeOf(this,_C.prototype)}}class NC extends Ie{constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),this.name="SoftwareTokenMFANotFoundException",this.$fault="client",Object.setPrototypeOf(this,NC.prototype)}}class MC extends Ie{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,MC.prototype)}}class DC extends Ie{constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),this.name="ForbiddenException",this.$fault="client",Object.setPrototypeOf(this,DC.prototype)}}class LC extends Ie{constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),this.name="GroupExistsException",this.$fault="client",Object.setPrototypeOf(this,LC.prototype)}}class jC extends Ie{constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),this.name="DuplicateProviderException",this.$fault="client",Object.setPrototypeOf(this,jC.prototype)}}class BC extends Ie{constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),this.name="UserPoolTaggingException",this.$fault="client",Object.setPrototypeOf(this,BC.prototype)}}class FC extends Ie{constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),this.name="InvalidOAuthFlowException",this.$fault="client",Object.setPrototypeOf(this,FC.prototype)}}class UC extends Ie{constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),this.name="ScopeDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,UC.prototype)}}class VC extends Ie{constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),this.name="UnsupportedIdentityProviderException",this.$fault="client",Object.setPrototypeOf(this,VC.prototype)}}const A8=t=>({...t,...t.Value&&{Value:ur}}),xL=t=>({...t,...t.AccessToken&&{AccessToken:ur},...t.RefreshToken&&{RefreshToken:ur},...t.IdToken&&{IdToken:ur}}),Que=t=>({...t,...t.AuthParameters&&{AuthParameters:ur},...t.ClientId&&{ClientId:ur},...t.UserContextData&&{UserContextData:ur}}),Yue=t=>({...t,...t.Session&&{Session:ur},...t.AuthenticationResult&&{AuthenticationResult:xL(t.AuthenticationResult)}}),Jue=t=>({...t,...t.ClientId&&{ClientId:ur},...t.Session&&{Session:ur},...t.ChallengeResponses&&{ChallengeResponses:ur},...t.UserContextData&&{UserContextData:ur}}),Xue=t=>({...t,...t.Session&&{Session:ur},...t.AuthenticationResult&&{AuthenticationResult:xL(t.AuthenticationResult)}});class $C extends Ie{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,$C.prototype)}}class zC extends Ie{constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),this.name="UnsupportedOperationException",this.$fault="client",Object.setPrototypeOf(this,zC.prototype)}}class HC extends Ie{constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),this.name="UnsupportedTokenTypeException",this.$fault="client",Object.setPrototypeOf(this,HC.prototype)}}class GC extends Ie{constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),this.name="EnableSoftwareTokenMFAException",this.$fault="client",Object.setPrototypeOf(this,GC.prototype)}}const Zue=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=>A8(e))},...t.ValidationData&&{ValidationData:t.ValidationData.map(e=>A8(e))},...t.UserContextData&&{UserContextData:ur}}),efe=async(t,e)=>{const r=KC("InitiateAuth");let n;return n=JSON.stringify(Ce(t)),WC(e,r,"/",void 0,n)},tfe=async(t,e)=>{const r=KC("RespondToAuthChallenge");let n;return n=JSON.stringify(Ce(t)),WC(e,r,"/",void 0,n)},rfe=async(t,e)=>{const r=KC("SignUp");let n;return n=JSON.stringify(Ce(t)),WC(e,r,"/",void 0,n)},nfe=async(t,e)=>{if(t.statusCode>=300)return qC(t,e);const r=await ig(t.body,e);let n={};return n=Ce(r),{$metadata:Oe(t),...n}},sfe=async(t,e)=>{if(t.statusCode>=300)return qC(t,e);const r=await ig(t.body,e);let n={};return n=Ce(r),{$metadata:Oe(t),...n}},ife=async(t,e)=>{if(t.statusCode>=300)return qC(t,e);const r=await ig(t.body,e);let n={};return n=Ce(r),{$metadata:Oe(t),...n}},qC=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 yfe(r);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await xfe(r);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await kfe(r);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Ife(r);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Mfe(r);case"UserImportInProgressException":case"com.amazonaws.cognitoidentityprovider#UserImportInProgressException":throw await Vfe(r);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await Gfe(r);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await mfe(r);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await Afe(r);case"TooManyFailedAttemptsException":case"com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException":throw await Nfe(r);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await Lfe(r);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await $fe(r);case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await afe(r);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await bfe(r);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await wfe(r);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await Efe(r);case"PreconditionNotMetException":case"com.amazonaws.cognitoidentityprovider#PreconditionNotMetException":throw await Rfe(r);case"UnsupportedUserStateException":case"com.amazonaws.cognitoidentityprovider#UnsupportedUserStateException":throw await Ufe(r);case"UsernameExistsException":case"com.amazonaws.cognitoidentityprovider#UsernameExistsException":throw await zfe(r);case"AliasExistsException":case"com.amazonaws.cognitoidentityprovider#AliasExistsException":throw await ofe(r);case"InvalidUserPoolConfigurationException":case"com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException":throw await Sfe(r);case"MFAMethodNotFoundException":case"com.amazonaws.cognitoidentityprovider#MFAMethodNotFoundException":throw await Cfe(r);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await Pfe(r);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await Hfe(r);case"UserPoolAddOnNotEnabledException":case"com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException":throw await qfe(r);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await vfe(r);case"CodeMismatchException":case"com.amazonaws.cognitoidentityprovider#CodeMismatchException":throw await cfe(r);case"ExpiredCodeException":case"com.amazonaws.cognitoidentityprovider#ExpiredCodeException":throw await dfe(r);case"PasswordHistoryPolicyViolationException":case"com.amazonaws.cognitoidentityprovider#PasswordHistoryPolicyViolationException":throw await Tfe(r);case"SoftwareTokenMFANotFoundException":case"com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException":throw await _fe(r);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentityprovider#ConcurrentModificationException":throw await lfe(r);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await hfe(r);case"GroupExistsException":case"com.amazonaws.cognitoidentityprovider#GroupExistsException":throw await pfe(r);case"DuplicateProviderException":case"com.amazonaws.cognitoidentityprovider#DuplicateProviderException":throw await ufe(r);case"UserPoolTaggingException":case"com.amazonaws.cognitoidentityprovider#UserPoolTaggingException":throw await Wfe(r);case"InvalidOAuthFlowException":case"com.amazonaws.cognitoidentityprovider#InvalidOAuthFlowException":throw await gfe(r);case"ScopeDoesNotExistException":case"com.amazonaws.cognitoidentityprovider#ScopeDoesNotExistException":throw await Ofe(r);case"UnsupportedIdentityProviderException":case"com.amazonaws.cognitoidentityprovider#UnsupportedIdentityProviderException":throw await jfe(r);case"UnauthorizedException":case"com.amazonaws.cognitoidentityprovider#UnauthorizedException":throw await Dfe(r);case"UnsupportedOperationException":case"com.amazonaws.cognitoidentityprovider#UnsupportedOperationException":throw await Bfe(r);case"UnsupportedTokenTypeException":case"com.amazonaws.cognitoidentityprovider#UnsupportedTokenTypeException":throw await Ffe(r);case"EnableSoftwareTokenMFAException":case"com.amazonaws.cognitoidentityprovider#EnableSoftwareTokenMFAException":throw await ffe(r);default:const s=r.body;return Kfe({output:t,parsedBody:s,errorCode:n})}},ofe=async(t,e)=>{const r=t.body,n=Ce(r),s=new SC({$metadata:Oe(t),...n});return Ne(s,r)},afe=async(t,e)=>{const r=t.body,n=Ce(r),s=new vC({$metadata:Oe(t),...n});return Ne(s,r)},cfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new IC({$metadata:Oe(t),...n});return Ne(s,r)},lfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new MC({$metadata:Oe(t),...n});return Ne(s,r)},ufe=async(t,e)=>{const r=t.body,n=Ce(r),s=new jC({$metadata:Oe(t),...n});return Ne(s,r)},ffe=async(t,e)=>{const r=t.body,n=Ce(r),s=new GC({$metadata:Oe(t),...n});return Ne(s,r)},dfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new OC({$metadata:Oe(t),...n});return Ne(s,r)},hfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new DC({$metadata:Oe(t),...n});return Ne(s,r)},pfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new LC({$metadata:Oe(t),...n});return Ne(s,r)},yfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new iC({$metadata:Oe(t),...n});return Ne(s,r)},vfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new RC({$metadata:Oe(t),...n});return Ne(s,r)},mfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new dC({$metadata:Oe(t),...n});return Ne(s,r)},gfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new FC({$metadata:Oe(t),...n});return Ne(s,r)},xfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new oC({$metadata:Oe(t),...n});return Ne(s,r)},bfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new mC({$metadata:Oe(t),...n});return Ne(s,r)},wfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new gC({$metadata:Oe(t),...n});return Ne(s,r)},Efe=async(t,e)=>{const r=t.body,n=Ce(r),s=new xC({$metadata:Oe(t),...n});return Ne(s,r)},Sfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new AC({$metadata:Oe(t),...n});return Ne(s,r)},Afe=async(t,e)=>{const r=t.body,n=Ce(r),s=new hC({$metadata:Oe(t),...n});return Ne(s,r)},Cfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new CC({$metadata:Oe(t),...n});return Ne(s,r)},kfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new aC({$metadata:Oe(t),...n});return Ne(s,r)},Tfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new _C({$metadata:Oe(t),...n});return Ne(s,r)},Pfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new kC({$metadata:Oe(t),...n});return Ne(s,r)},Rfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new bC({$metadata:Oe(t),...n});return Ne(s,r)},Ife=async(t,e)=>{const r=t.body,n=Ce(r),s=new cC({$metadata:Oe(t),...n});return Ne(s,r)},Ofe=async(t,e)=>{const r=t.body,n=Ce(r),s=new UC({$metadata:Oe(t),...n});return Ne(s,r)},_fe=async(t,e)=>{const r=t.body,n=Ce(r),s=new NC({$metadata:Oe(t),...n});return Ne(s,r)},Nfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new pC({$metadata:Oe(t),...n});return Ne(s,r)},Mfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new lC({$metadata:Oe(t),...n});return Ne(s,r)},Dfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new $C({$metadata:Oe(t),...n});return Ne(s,r)},Lfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new yC({$metadata:Oe(t),...n});return Ne(s,r)},jfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new VC({$metadata:Oe(t),...n});return Ne(s,r)},Bfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new zC({$metadata:Oe(t),...n});return Ne(s,r)},Ffe=async(t,e)=>{const r=t.body,n=Ce(r),s=new HC({$metadata:Oe(t),...n});return Ne(s,r)},Ufe=async(t,e)=>{const r=t.body,n=Ce(r),s=new wC({$metadata:Oe(t),...n});return Ne(s,r)},Vfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new uC({$metadata:Oe(t),...n});return Ne(s,r)},$fe=async(t,e)=>{const r=t.body,n=Ce(r),s=new og({$metadata:Oe(t),...n});return Ne(s,r)},zfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new EC({$metadata:Oe(t),...n});return Ne(s,r)},Hfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new TC({$metadata:Oe(t),...n});return Ne(s,r)},Gfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new fC({$metadata:Oe(t),...n});return Ne(s,r)},qfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new PC({$metadata:Oe(t),...n});return Ne(s,r)},Wfe=async(t,e)=>{const r=t.body,n=Ce(r),s=new BC({$metadata:Oe(t),...n});return Ne(s,r)},Oe=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"]}),Kfe=Mce(Ie),WC=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 KC(t){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}}class Qfe extends sg.classBuilder().ep({...nC}).m(function(e,r,n,s){return[JA(n,this.serialize,this.deserialize),XA(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").f(Que,Yue).ser(efe).de(nfe).build(){}class Yfe extends sg.classBuilder().ep({...nC}).m(function(e,r,n,s){return[JA(n,this.serialize,this.deserialize),XA(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").f(Jue,Xue).ser(tfe).de(sfe).build(){}class Jfe extends sg.classBuilder().ep({...nC}).m(function(e,r,n,s){return[JA(n,this.serialize,this.deserialize),XA(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").f(Zue,void 0).ser(rfe).de(ife).build(){}class ih extends Error{}ih.prototype.name="InvalidTokenError";function Xfe(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 Zfe(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 Xfe(e)}catch{return atob(e)}}function bL(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=Zfe(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 ede=["signatures"],tde=1,rde=`${tde} (Web ${foe})`;function Rr(t,e,r){const n=Math.floor(Date.now()/1e3),s=n+e;return{version:rde,issuedAt:n,expiresAt:s,name:t,data:r}}async function nde(t,e){const r=sde(e),n=await t.sign(new Uint8Array(r));return tr({},e,{signatures:[{sessionId:await t.sessionId(),signature:n}]})}function sde(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(At(a))}function ide(t,e){const r=Pr(t,ede),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 ode({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 ade=["lifespan"],cde=["lifespan"],lde=["lifespan"],ude=["lifespan"],fde=["lifespan"],dde=["lifespan"],hde=["lifespan"],pde=["lifespan"],yde=["lifespan"];async function $d(t){let{lifespan:e}=t,r=Pr(t,ade);return Rr(Ir.initiateAuth,e,r)}async function C8(t){let{lifespan:e}=t,r=Pr(t,cde);return Rr(Ir.openSession,e,r)}async function vde(t){let{lifespan:e}=t,r=Pr(t,lde);return Rr(Ir.validateSession,e,r)}function mde(t){let{lifespan:e}=t,r=Pr(t,ude);return Rr(Ir.finishValidateSession,e,r)}function k8(t){let{lifespan:e}=t,r=Pr(t,fde);return Rr(Ir.closeSession,e,r)}function gde(t){let{lifespan:e}=t,r=Pr(t,dde);return Rr(Ir.listSessions,e,r)}function xde(t){let{lifespan:e}=t,r=Pr(t,hde);return Rr(Ir.getSession,e,r)}function bde(t){let{lifespan:e}=t,r=Pr(t,pde);return Rr(Ir.sessionAuthProof,e,r)}function wde(t){let{lifespan:e}=t,r=Pr(t,yde);return Rr(Ir.getIdToken,e,r)}const Ede=["token","to","value"],Sde=["token","to","id","safe","data"],Ade=["token","to","values","data"],Cde=["to","value","abi","func","args"];function kde({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 EL(i)?{type:"transaction",to:i.to,value:GA(BigInt(i.value||0)),data:ne(i.data||"0x")}:i})})}function Ay({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:Tde(s,o).map(a=>{if(!a.to||a.to===vl)throw new Error("Contract creation not supported");return EL(a)?{type:"transaction",to:a.to,value:GA(BigInt(a.value||0)),data:ne(a.data||"0x")}:a}),transactionsFeeQuote:i})}function Tde(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(QC({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(YC({tokenAddress:e.token.contractAddress,to:e.to,vals:[{id:e.token.tokenID,amount:e.value}]}));break}return r}function Pde({lifespan:t,chainId:e,wallet:r,metaTxHash:n}){return Rr(Ir.getTransactionReceipt,t,{wallet:r,network:e.toString(),metaTxHash:n})}function Rde(t){let{token:e,to:r,value:n}=t,s=Pr(t,Ede);return Ay(tr({transactions:[QC({tokenAddress:e,to:r,value:n.toString()})]},s))}function Ide(t){let{token:e,to:r,id:n,safe:s,data:i}=t,o=Pr(t,Sde);return Ay(tr({transactions:[Nde({tokenAddress:e,to:r,id:n,data:i,safe:s})]},o))}function Ode(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 Ay(tr({transactions:[YC({tokenAddress:e,to:r,vals:o,data:s})]},i))}function _de(t){let{to:e,value:r,abi:n,func:s,args:i}=t,o=Pr(t,Cde);return Ay(tr({transactions:[wL({to:e,value:BigInt(r).toString(),data:{abi:n,func:s,args:i}})]},o))}function QC(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 Nde(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 YC(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 wL(t){const e=t,r=t;if(e.abi!==void 0)return{type:"delayedEncode",to:e.to,value:GA(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 Mde(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 EL(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 SL{constructor(){this.store=void 0,I0.isAvailable()?this.store=new I0:this.store=new Dde}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 Dde{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 AL(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 Lde(t,e){const n=await new up(t).getAddress();return await e.set(j2,B2,n,t),AL(n,e)}async function jde(t){const e=up.createRandom();return Lde(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 kL(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 Bde(t,e,r){const n=await Ude(e,t.publicKey);return await r.set(F2,U2,n,t),kL(n,e,r)}async function Fde(t,e){const r=await t.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"]);return Bde(r,t,e)}async function Ude(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?kL(t,e,r):AL(t,r)}async function Vde(t,e){if(!e)throw new Error("No secure store available");return t?Fde(t,e):jde(e)}const $de=["lifespan"],zde=["lifespan"],Hde=["lifespan"];function Gde(t){let{lifespan:e}=t,r=Pr(t,$de);return Rr(Ir.listAccounts,e,r)}function qde(t){let{lifespan:e}=t,r=Pr(t,zde);return Rr(Ir.federateAccount,e,r)}function Wde(t){let{lifespan:e}=t,r=Pr(t,Hde);return Rr(Ir.removeAccount,e,r)}const $2=Object.entries(S0).reduce((t,[e,r])=>(t[r.name]=r.chainId,t),{}),Kde=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 Kde)return e;const r=t.toString().toLowerCase();if(r in $2)return $2[r];throw new Error(`Unknown network: ${t}`)}const TL=()=>PL()?new Qde:null;function PL(){return typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.subtle=="object"}class Qde{constructor(){if(!PL())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 RL=()=>IL()?new Yde:null;function IL(){return typeof indexedDB=="object"}class Yde{constructor(){if(this.db=void 0,!IL())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 Jde="@0xsequence.waas.wallet",Xde="@0xsequence.waas.session_id",Zde="@0xsequence.waas.status",Xt=5*60;class ehe{constructor(e={network:1},r=new SL,n=TL(),s=RL()){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,Zde,"signed-out"),this.sessionId=new pv(this.store,Xde,void 0),this.wallet=new pv(this.store,Jde,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 nde(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 Vde(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 C8({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=Ar(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=Ar(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=Ar(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 C8(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=gde({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=bde({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=ode(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=Ay(await this.commonArgs(e));return this.signIntent(r)}async getTransactionReceipt(e){const r=Pde(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=Rde(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=Ide(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=Ode(await this.commonArgs(e));return this.signIntent(r)}async callContract(e){const r=_de(await this.commonArgs(e));return this.signIntent(r)}async feeOptions(e){const r=kde(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 vde({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=xde({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=mde({sessionId:n,wallet:s,lifespan:Xt,salt:e,challenge:r});return this.signIntent(i)}async listAccounts(){const e=Gde({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=qde(tr({wallet:await this.getWalletAddress(),lifespan:Xt,sessionId:r},e));return this.signIntent(n)}async removeAccount({accountId:e}){const r=Wde({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=wde({wallet:await this.getWalletAddress(),lifespan:Xt,sessionId:r,nonce:e});return this.signIntent(n)}async batch(e){const r=Mde(e);return this.signIntent(r)}signalObservers(e,r){e.forEach(n=>n(r))}async updateIntentTime(e,r){const n=ide(e,r);return this.signIntent(n)}}class the{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(dhe[n]||Yt).new(r)}return r});let Yt=class OL 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,OL.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},rhe=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)}},nhe=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)}},she=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)}},ihe=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)}},ohe=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)}},ahe=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)}},che=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)}},lhe=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)}},uhe=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)}},fhe=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 JC extends Yt{constructor(e="TenantNotFound",r=1001,n="Tenant not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,JC.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 XC 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,XC.prototype)}}class ZC 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,ZC.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 dhe={0:rhe,[-1]:yv,[-2]:nhe,[-3]:she,[-4]:ihe,[-5]:jL,[-6]:ohe,[-7]:ahe,[-8]:che,[-9]:lhe,[-10]:uhe,1e3:fhe,1001:JC,7e3:vp,7001:XC,7002:ZC,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 Cy(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 hhe(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 Cy(t)||hhe(t)||GL(t)}function phe(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 yhe(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 vhe(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="feeOptions"&&typeof t.data=="object"&&Array.isArray(t.data.feeOptions)}function mhe(t){return typeof t=="object"&&t.code===xd.validationRequired&&typeof t.data=="object"&&typeof t.data.sessionId=="string"}function ghe(t){return typeof t=="object"&&t.code===xd.validationFinished&&typeof t.data=="object"}function xhe(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="sessionClosed"}function bhe(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 whe(t){return typeof t=="object"&&t.code===xd.accountFederated&&typeof t.data=="object"&&typeof t.data.account=="object"}function Ehe(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 She(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 Kue({region:this.region})),this.cognitoMemo}signUp(e){return e=e.toLowerCase().trim(),this.cognito().send(new Jfe({ClientId:this.clientId,Username:e,Password:"aB1%"+Che(14),UserAttributes:[{Name:"email",Value:e}]}))}signIn(e){return e=e.toLowerCase().trim(),this.cognito().send(new Qfe({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 Yfe({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 Che(t){return Array.from(khe(t)).map(e=>e.toString(16).padStart(2,"0")).join("")}function khe(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=_he(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 C=`"content-digest": ${p} +"@signature-params": ${y.substring(4)}`,O={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},_=l.url.includes("dev-waas")?Nhe:Mhe,A=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 U=Uint8Array.from(atob(j),K=>K.charCodeAt(0));if(!await i.cryptoBackend.verify(O,A,U,new TextEncoder().encode(C)))throw new Error("Signature verification failed, consequent requests will fail")}catch(d){throw i.signatureVerificationFailed=!0,d}}),c},this.config=Ohe(e),this.waas=new ehe(tr({network:1},e),this.store,this.cryptoBackend,this.secureStoreBackend),this.client=new the(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 The(e,n.data.challenge)}async initIdTokenAuth(e){var r;const n=bL(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 Phe(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 Rhe(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 Ar(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(!xhe(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(!ghe(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(!bhe(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,yhe)}async listAccounts(){const e=await this.waas.listAccounts(),r=await this.sendIntent(e);if(!Ehe(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(!whe(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(!She(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(mhe(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,phe)}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,vhe)}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 Lhe=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"},jhe=t=>{const{onCancel:e,onConfirm:r}=t;return k.jsxs(G,{style:{maxWidth:"600px"},flexDirection:"column",paddingX:"10",paddingY:"4",alignItems:"center",gap:"4",children:[k.jsx(G,{children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Email already in use"})}),k.jsx(G,{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:["(",Lhe(t.info),")"]}),". You can cancel this or force create a new account."]})}),k.jsxs(G,{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 Ak extends nt{constructor(e="MetadataCallFailed",r=3003,n="Metadata service call failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Ak.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:Ak},R8=globalThis.fetch;class KL extends Bhe{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 $o(){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}`}function Fhe({onSuccess:t}){const[e,r]=v.useState(""),[n,s]=v.useState(),[i,o]=v.useState(!1),[a,c]=v.useState("");return{inProgress:i||!!a,loading:i,error:n,initiateAuth:async f=>{o(!0);try{const{instance:d}=await Te.email.initiateAuth({email:f});c(d),r(f)}catch(d){console.error(d),s(d.message||"Unknown error")}finally{o(!1)}},sendChallengeAnswer:a?async f=>{o(!0);try{const d=await Te.getSessionHash(),h=await Te.email.finalizeAuth({instance:a,answer:f,email:e,sessionHash:d});if(!("idToken"in h))throw new Error("invalid identity returned by finalizeAuth");t(h.idToken)}catch(d){s(d.message||"Unknown error")}finally{o(!1)}}:void 0}}const vv=t=>t.name==="AccountAlreadyLinked";function QL({onSuccess:t,sessionName:e,linkAccount:r=!1}){const n=D9(),[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(()=>Te.onEmailAuthCodeRequired(async m=>{a(!1),f(()=>m)}),[Te,a,f]),{inProgress:c,initiateAuth:async m=>{a(!0),l(!0);try{if(r){const x=await Te.initAuth({email:m});h(x),a(!1)}else{const x=await Te.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 Te.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 O0(t,e){if(!t)throw new Error(e)}const Ghe={user:null,fromCache:!1},qhe={session:null,fromCache:!1},Sk=v.createContext({isMounted:!1}),Whe=v.createContext(Ghe),XL=v.createContext(qhe),ZL=()=>v.useContext(Sk).isMounted,Khe=()=>(O0(ZL(),JL("useStytchSession")),v.useContext(XL)),Qhe=()=>{const t=v.useContext(Sk);return O0(t.isMounted,JL("useStytch")),t.client},Yhe=({stytch:t,children:e})=>{O0(!ZL(),zhe),O0(typeof window<"u",Hhe);const r=v.useMemo(()=>({client:t,isMounted:!0}),[t]),[{user:n,session:s},i]=$he({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 Vhe(o,a)})}),[i,t]),ar.createElement(Sk.Provider,{value:r},ar.createElement(Whe.Provider,{value:n},ar.createElement(XL.Provider,{value:s},e)))};function Jhe(){const t=Qhe(),{session:e}=Khe(),[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 Ce.signIn({idToken:c.session_jwt},Vo());console.log(`Wallet address: ${l}`),await t.session.revoke(),n(0),window.location.search="",_s.navigate("/")})())},[e,t,r]);const a=async c=>{localStorage.setItem("stytch_auth","native"),n(1),await t.magicLinks.email.loginOrCreate(c,{})};return k.jsxs(G,{children:[k.jsx(G,{marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Stytch login"})}),k.jsxs(G,{marginTop:"5",marginBottom:"4",children:[k.jsx(G,{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(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(ft,{variant:"primary",label:"Continue",onClick:()=>a(s),"data-id":"continueButton",disabled:r!==0})}),r===1&&k.jsx(G,{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 Xhe(){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(!0),[u,f]=v.useState(),[d,h]=v.useState(!1),p=v.useRef(null);Ce.onEmailConflict(async(J,se)=>{p.current=se,f(J),h(!0)});const y=n9({flow:"implicit",onSuccess:J=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:J.access_token,CreateAccount:!0,TitleId:"8F854"},async(se,ae)=>{if(se)try{const we=await Ce.signIn({playFabTitleId:"8F854",playFabSessionTicket:se.data.SessionTicket},Vo());console.log("Sequence response:",we),_s.navigate("/")}catch{console.error("Error: "+JSON.stringify(ae))}else ae&&console.error("Error: "+JSON.stringify(ae))})}}),{inProgress:g,loading:m,initiateAuth:x,sendChallengeAnswer:b,cancel:w}=YL({sessionName:Vo(),onSuccess:async({wallet:J})=>{console.log(`Wallet address: ${J}`),_s.navigate("/")}}),{inProgress:C,loading:O,initiateAuth:_,sendChallengeAnswer:A}=Bhe({onSuccess:async J=>{const se=await Ce.signIn({idToken:J},Vo());console.log(`Wallet address: ${se}`),_s.navigate("/")}}),j=c?g:C,U=c?m:O,H=c?x:_,K=c?b:A;v.useEffect(()=>{(async()=>await Ce.isSignedIn()&&_s.navigate("/"))()},[]);const Q=async J=>{const se=await Ce.signIn({idToken:J.credential},Vo());console.log(`Wallet address: ${se.wallet}`),console.log(`Email address: ${se.email}`),_s.navigate("/")},$="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":""),D=async J=>{const se=await Ce.signIn({idToken:J.authorization.id_token},Vo());console.log(`Wallet address: ${se.wallet}`),console.log(`Email address: ${se.email}`),_s.navigate("/")},T=async()=>{const J=await Ce.signIn({guest:!0},Vo());console.log(`Wallet address: ${J.wallet}`),_s.navigate("/")},P=new URLSearchParams(window.location.search),R=P.get("env")==="dev",[I,F]=v.useState(R);return k.jsxs(k.Fragment,{children:[k.jsxs(G,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[k.jsxs(G,{marginBottom:"16",flexDirection:"row",children:[k.jsx(a9,{}),k.jsx(G,{marginLeft:"auto",children:k.jsx(PJ,{label:"Use dev env",checked:I,onCheckedChange:()=>{I?(P.delete("env"),window.location.search=P.toString()):(P.set("env","dev"),window.location.search=P.toString()),F(!I)}})})]}),k.jsx(G,{gap:"4",children:k.jsx(ft,{label:"Guest login",onClick:T})}),k.jsx(gr,{background:"buttonGlass"}),k.jsxs(G,{marginTop:"6",children:[k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Email Login"}),k.jsx(G,{marginTop:"4",children:k.jsx(W6,{label:"Use v2 email login",checked:c,onCheckedChange:()=>{l(!c)}})})]}),K?k.jsxs(G,{flexDirection:"column",children:[k.jsx(G,{marginTop:"6",children:k.jsx(ue,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),k.jsx(G,{marginTop:"4",children:k.jsx(o9,{value:o,digits:6,onChange:a})}),k.jsx(G,{gap:"2",marginY:"4",children:U?k.jsx(Bn,{}):k.jsx(ft,{variant:"primary",disabled:o.includes(""),label:"Verify",onClick:()=>K(o.join("")),"data-id":"verifyButton"})})]}):k.jsxs(G,{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(G,{marginTop:"6",children:[k.jsx(sr,{name:"email",type:"email",onChange:J=>{e(J.target.value)},ref:r,onKeyDown:J=>{t&&J.key==="Enter"&&H(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(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:U?k.jsx(Bn,{}):k.jsx(ft,{variant:"primary",disabled:!n,label:"Continue",onClick:()=>H(t),"data-id":"continueButton"})})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(G,{paddingY:"4",gap:"4",flexDirection:"column",width:"full",children:!j&&k.jsxs(k.Fragment,{children:[k.jsx(G,{marginBottom:"2",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Social Login"})}),k.jsxs(G,{gap:"4",flexDirection:"column",width:"fit",children:[k.jsx(G,{children:k.jsx(r9,{onSuccess:Q,shape:"circle",width:230},"google")}),k.jsx(i9,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:$,usePopup:!0},onError:J=>console.error(J),onSuccess:D,uiType:"dark"},"apple")]}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsxs(G,{children:[k.jsx(G,{marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Playfab login"})}),k.jsx(G,{children:k.jsx(ft,{label:"Login with Google (through Playfab)",onClick:y})})]}),k.jsx(Jhe,{}),""]})})]}),d&&u&&k.jsx(IN,{size:"small",onClose:()=>h(!1),children:k.jsx(Lhe,{info:u,onCancel:()=>{h(!1),f(void 0),j&&(a([]),w(),e(""))},onConfirm:async()=>{var J;h(!1),f(void 0),await((J=p.current)==null?void 0:J.call(p))}})})]})}async function ag({transactions:t,network:e}){const r=await Ce.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 cg(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(G,{marginTop:"5",children:[k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options:"}),k.jsx(G,{marginTop:"3"}),k.jsx(Pm,{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(G,{alignItems:"center",gap:"2",children:k.jsxs(ue,{children:[(a=o==null?void 0:o.token)==null?void 0:a.name," ",yA(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(G,{})}const Zhe="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function epe(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(),[C,O]=v.useState(),[_,A]=v.useState(!1);v.useEffect(()=>{j()},[]),v.useEffect(()=>{var K,Q;if(t.network){const $=dp(t.network.name);if($){const D=$.name in{polygon:1,mumbai:1}?"MATIC":"ETH";s(D),j(),(K=$.blockExplorer)!=null&&K.rootUrl&&o((Q=$.blockExplorer)==null?void 0:Q.rootUrl)}}},[t.network]);const j=async()=>{if(!t.network)return;const K=dp(t.network.name);if(!K)return;const Q=await Ce.getAddress(),D=await new QL(LD(K.name),Zhe).getEtherBalance({accountAddress:Q});r(BigInt(D.balance.balanceWei))},U=async(K,Q)=>{const $=await ag({transactions:[{to:K,value:S4(Q)}],network:t.network});if($.feeQuote&&$.feeOptions){x($.feeOptions),O($.feeQuote),console.log("feeOptions",$);return}A(!0),console.log("tx sponsored")},H=async(K,Q)=>{var $;try{g(void 0),p(!0);const D=await Ce.sendTransaction({transactions:[{to:K,value:S4(Q)}],network:($=t.network)==null?void 0:$.id,transactionsFeeOption:b,transactionsFeeQuote:C});ky(D)?d(D.data.txHash):g(D.data.error),p(!1)}catch(D){console.error(D),p(!1)}finally{O(void 0),x(void 0),w(void 0),A(!1)}};return k.jsxs(G,{children:[k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Native token balance: ",ate(e||0)," ",n]}),k.jsx(ft,{marginLeft:"2",size:"xs",label:"Fetch",onClick:j}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"sendNativeTokenTo",type:"text",onChange:K=>{c(K.target.value)},value:a,placeholder:"To address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"sendNativeTokenAmount",type:"text",onChange:K=>{u(K.target.value)},value:l,placeholder:"Amount",required:!0,"data-id":"nativeTokenSendAmount"})}),y&&k.jsxs(G,{marginTop:"3",children:["Transaction failed: ",y]}),k.jsx(cg,{feeOptions:m,onSelected:w}),_&&k.jsx(G,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h?k.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(G,{children:[k.jsx(ft,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:a===""&&l==="",onClick:()=>U(a,l)}),k.jsx(ft,{marginTop:"5",label:"Send native token",disabled:a===""&&l==="",onClick:()=>H(a,l)})]}),f&&k.jsxs(G,{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 tpe(){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 Ce.dropSession({sessionId:l}),e(await Ce.listSessions())}catch(u){a(u.message),e(await Ce.listSessions())}i(!1)};return v.useEffect(()=>{Promise.all([Ce.listSessions(),Ce.getSessionId()]).then(([l,u])=>{e(l),n(u),i(!1)}).catch(l=>{a(l.message),i(!1)})},[]),k.jsxs(G,{children:[k.jsxs(G,{marginBottom:"5",children:[k.jsx(G,{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(G,{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 rpe(t){const[e,r]=v.useState(""),[n,s]=v.useState(),i=async()=>{var a;const o=await Ce.signMessage({message:e,network:(a=t.network)==null?void 0:a.id});s(o.data.signature)};return k.jsxs(G,{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(ft,{marginTop:"5",label:"Sign message",disabled:e==="",onClick:()=>i()}),n&&n!==""&&k.jsxs(G,{flexDirection:"column",marginTop:"5",children:[k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Signature for ",e,":"]}),k.jsx(G,{children:k.jsx(ue,{as:"p",wordBreak:"break-word",children:n})})]})]})}function npe(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(),[C,O]=v.useState(!1),[_,A]=v.useState("");v.useEffect(()=>{var H,K;if(t.network){const Q=dp(t.network.name);(H=Q==null?void 0:Q.blockExplorer)!=null&&H.rootUrl&&A((K=Q.blockExplorer)==null?void 0:K.rootUrl)}},[t.network]);const j=async()=>{const H=await ag({transactions:[EL({to:e,abi:n,func:i,args:JSON.parse(a),value:"0"})],network:t.network});if(H.feeQuote&&H.feeOptions){g(H.feeOptions),w(H.feeQuote),console.log("feeOptions",H);return}O(!0),console.log("tx sponsored")},U=async()=>{var H;try{p(void 0),d(!0);const K=await Ce.callContract({network:(H=t.network)==null?void 0:H.id,to:e,abi:n,func:i,args:JSON.parse(a),value:0,transactionsFeeOption:m,transactionsFeeQuote:b});ky(K)?u(K.data.txHash):p(K.data.error),d(!1)}catch(K){console.error(K),d(!1)}};return k.jsxs(G,{children:[k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"callContractAddress",type:"text",onChange:H=>{r(H.target.value)},value:e,placeholder:"Contract address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"callContractAbi",type:"text",onChange:H=>{s(H.target.value)},value:n,placeholder:"Contract ABI or function ABI, e.g. [{...}] or [{...}, {...}] or transfer(address,uint256)",required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"callContractMethod",type:"text",onChange:H=>{o(H.target.value)},value:i,placeholder:"Method name, e.g. transfer",required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"callContractArgs",type:"text",onChange:H=>{c(H.target.value)},value:a,placeholder:'Method args, e.g. [0x..., 1000] or named { "to": "0x...", "amount": "1000" }',required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(cg,{feeOptions:y,onSelected:x}),C&&k.jsx(G,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h&&k.jsxs(G,{marginTop:"3",children:["Transaction failed: ",h]}),f?k.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(G,{children:[k.jsx(ft,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&n===""&&i===""&&a==="",onClick:()=>j()}),k.jsx(ft,{marginTop:"5",label:"Call contract",disabled:e===""&&n===""&&i===""&&a==="",onClick:()=>U()})]}),l&&k.jsxs(G,{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 _8=[{label:"Custom Token",value:"Custom"},{label:"USDC Old",value:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"},{label:"USDC New",value:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},{label:"DAI",value:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"}];function spe(t){const[e,r]=v.useState(_8[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),[C,O]=v.useState(),[_,A]=v.useState(),[j,U]=v.useState(),[H,K]=v.useState(!1),[Q,$]=v.useState("");v.useEffect(()=>{var I,F;if(t.network){const B=dp(t.network.name);(I=B==null?void 0:B.blockExplorer)!=null&&I.rootUrl&&$((F=B.blockExplorer)==null?void 0:F.rootUrl)}},[t.network]),v.useEffect(()=>{D(n)},[n]);const D=async I=>{var J;if(!Zre(I)){c("---");return}c("...");const F=new AD(`https://nodes.sequence.app/${(J=t.network)==null?void 0:J.name}`),B=new Mu(I,["function balanceOf(address) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)"],F);try{const[se,ae,we]=await Promise.all([B.balanceOf(Ce.getAddress()),B.decimals(),B.symbol()]);w(ae),c(`${yA(se,ae)} ${we}`)}catch{c("---")}},T=async()=>{const I=await ag({transactions:[WC({token:n,to:l,value:Zh(f,b).toString()})],network:t.network});if(I.feeQuote&&I.feeOptions){O(I.feeOptions),U(I.feeQuote),console.log("feeOptions",I);return}K(!0),console.log("tx sponsored")},P=async()=>{var I;try{g(""),x(!0);const F=await Ce.sendERC20({token:n,to:l,value:Zh(f,b),network:(I=t.network)==null?void 0:I.id,transactionsFeeOption:_,transactionsFeeQuote:j});ky(F)?p(F.data.txHash):g(F.data.error)}catch(F){console.error(F)}finally{x(!1)}},R=I=>{r(I),I==="Custom"?(s(""),o(!0)):(s(I),o(!1))};return k.jsxs(G,{children:[k.jsxs(G,{marginTop:"5",children:[k.jsx(Pm,{name:"token",options:_8,value:e??"",onValueChange:I=>R(I)}),k.jsx(G,{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(G,{marginTop:"3",children:[k.jsxs(ue,{variant:"normal",color:"text100",children:["Token Balance: ",a]}),k.jsx(ft,{marginLeft:"2",size:"xs",label:"Fetch",onClick:()=>D(n)})]}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{type:"text",value:l,onChange:I=>u(I.target.value),placeholder:"Destination Address"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{type:"text",value:f,onChange:I=>d(I.target.value),placeholder:"Amount"})}),y&&k.jsx(G,{marginTop:"3",children:k.jsxs(ue,{color:"error",children:["Error: ",y]})}),k.jsx(cg,{feeOptions:C,onSelected:A}),H&&k.jsx(G,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),m?k.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(G,{children:[k.jsx(ft,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:n===""&&l==="",onClick:()=>T()}),k.jsx(ft,{marginTop:"5",label:"Send Token",onClick:P})]}),h&&k.jsxs(G,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),k.jsx("a",{href:`${Q}tx/${h}`,target:"_blank",rel:"noopener noreferrer",children:h})]})]})}const ipe="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function ope(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(G,{style:i,children:[k.jsx(G,{style:o,children:k.jsx(Pm,{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(G,{style:o,children:k.jsx(sr,{type:"text",value:e,onChange:c=>r(c.target.value),placeholder:"Token ID"})}),k.jsx(G,{style:o,children:k.jsx(sr,{type:"text",value:n,onChange:c=>s(c.target.value),placeholder:"Amount"})}),k.jsx(G,{style:o,children:k.jsx(ft,{label:"Remove",onClick:()=>t.removeTokenEntry(t.index)})})]})}function ape(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(),[C,O]=v.useState(!1),[_,A]=v.useState("");v.useEffect(()=>{var D,T;if(t.network){const P=dp(t.network.name);(D=P==null?void 0:P.blockExplorer)!=null&&D.rootUrl&&A((T=P.blockExplorer)==null?void 0:T.rootUrl)}},[t.network]);const j=()=>{s([...n,{tokenId:"",amount:""}])},U=async()=>{if(!e||!t.network)return;const D=t.network.name,T=new QL("https://"+D+"-indexer.sequence.app",ipe),P=e,R=await Ce.getAddress(),I=!0;p(await T.getTokenBalances({contractAddress:P,accountAddress:R,includeMetadata:I}))};v.useEffect(()=>{U()},[e]);const H=(D,T)=>{const P=[...n];P[D]=T,s(P)},K=D=>{const T=[...n];T.splice(D,1),s(T)},Q=async()=>{const D=await ag({transactions:[KC({to:i,token:e,values:n.map(T=>({id:T.tokenId,amount:Zh(T.amount,0)}))})],network:t.network});if(D.feeQuote&&D.feeOptions){g(D.feeOptions),w(D.feeQuote),console.log("feeOptions",D);return}O(!0),console.log("tx sponsored")},$=async()=>{var D;try{u(""),d(!0);const T=await Ce.sendERC1155({to:i,token:e,values:n.map(P=>({id:P.tokenId,amount:Zh(P.amount,0)})),network:(D=t.network)==null?void 0:D.id,transactionsFeeOption:m,transactionsFeeQuote:b});ky(T)?c(T.data.txHash):u(T.data.error)}catch(T){console.error(T)}finally{d(!1)}};return k.jsxs(G,{children:[k.jsx(G,{marginBottom:"5",children:k.jsx(sr,{type:"text",value:e,onChange:D=>r(D.target.value),placeholder:"Token Contract Address"})}),k.jsx(G,{marginBottom:"5",children:k.jsx(ft,{label:"Fetch metadata",onClick:()=>U()})}),n.map((D,T)=>k.jsx(G,{marginBottom:"3",children:k.jsx(ope,{index:T,options:h,onChange:(P,R,I)=>H(P,{tokenId:R,amount:I}),removeTokenEntry:K})},T)),k.jsx(ft,{label:"Add Token",onClick:j}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{type:"text",value:i,onChange:D=>o(D.target.value),placeholder:"Destination Address"})}),l&&k.jsx(G,{marginTop:"3",children:k.jsxs(ue,{color:"error",children:["Error: ",l]})}),k.jsx(cg,{feeOptions:y,onSelected:x}),C&&k.jsx(G,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),f?k.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(G,{children:[k.jsx(ft,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&i===""&&n.length!==0,onClick:()=>Q()}),k.jsx(ft,{marginTop:"5",label:"Send Tokens",onClick:$})]}),a&&k.jsxs(G,{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},cpe={[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 lpe({onNetworkChange:t}){const[e,r]=v.useState(),[n,s]=v.useState([]);return v.useEffect(()=>{Ce.networkList().then(i=>{s(i),r(i[0]),t(i[0])})},[]),n.length===0?k.jsx(G,{marginY:"5",children:k.jsx(Bn,{})}):k.jsxs(G,{marginBottom:"4",children:[k.jsx(G,{marginBottom:"4",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Network to use with requests:"})}),k.jsx(G,{children:k.jsx(Pm,{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(G,{alignItems:"center",gap:"2",children:[k.jsx(xX,{src:cpe[i.id],size:"sm"}),k.jsx(ue,{children:i.name})]}),value:String(i.name)}))]})})]})}function ej(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(G,{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(G,{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 upe(){var K;const t=L7(),[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=(K=f.current)==null?void 0:K.validity.valid,[h,p]=v.useState(!1),[y,g]=v.useState([]),[m,x]=v.useState(!0),{inProgress:b,loading:w,initiateAuth:C,sendChallengeAnswer:O}=YL({sessionName:Vo(),onSuccess:async({wallet:Q})=>{console.log(`Wallet address: ${Q}`)},linkAccount:!0}),_=async Q=>{o(!0),s(void 0);try{await Ce.removeAccount(Q);const $=await Ce.listAccounts();s($.accounts)}catch($){c($.message);const D=await Ce.listAccounts();s(D.accounts)}o(!1)},A=async Q=>{const $=await Ce.initAuth({idToken:Q.credential});try{const D=await Ce.linkAccount($);s(T=>[...T||[],D.account])}catch(D){yv(D)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},j="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":"/"),U=async Q=>{const $=await Ce.initAuth({idToken:Q.authorization.id_token});try{const D=await Ce.linkAccount($);s(T=>[...T||[],D.account])}catch(D){yv(D)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},H=n9({flow:"implicit",onSuccess:Q=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:Q.access_token,CreateAccount:!0,TitleId:"8F854"},async($,D)=>{if($)try{const T=await Ce.initAuth({playFabTitleId:"8F854",playFabSessionTicket:$.data.SessionTicket}),P=await Ce.linkAccount(T);console.log("playfab account",JSON.stringify(P.account,null,2)),s(R=>[...R||[],P.account])}catch(T){console.error(T),yv(T)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}else D&&console.log("Error: "+JSON.stringify(D))})}});return v.useEffect(()=>{Ce.listAccounts().then(Q=>{s(Q.accounts),Q.currentAccountId&&r(Q.accounts.find($=>$.id===Q.currentAccountId)),o(!1)}).catch(Q=>{c(Q.message),o(!1)})},[b]),k.jsxs(G,{children:[k.jsx(gr,{background:"buttonGlass"}),k.jsxs(G,{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(Q=>k.jsxs(G,{flexDirection:"row",alignItems:"center",gap:"2",children:[k.jsx(ue,{variant:"normal",color:"text100",children:ej(Q)}),Q.id!==(e==null?void 0:e.id)&&k.jsx(ft,{size:"xs",label:"Remove",onClick:()=>_(Q.id)}),Q.id===(e==null?void 0:e.id)&&k.jsx(G,{children:k.jsx(ue,{variant:"small",color:"text100",children:"(Account you logged in with)"})})]},Q.id))}),i&&k.jsx(Bn,{})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsxs(G,{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(r9,{onSuccess:A,shape:"circle",width:230}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(i9,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:j,usePopup:!0},onError:Q=>console.error(Q),onSuccess:U,uiType:"dark"}),k.jsxs(k.Fragment,{children:[k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(G,{marginTop:"2",children:k.jsx(G,{children:k.jsx(ft,{label:"Login with Google (through Playfab)",onClick:H})})})]}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsxs(G,{marginTop:"2",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Email"}),k.jsx(G,{marginTop:"4",children:k.jsx(W6,{label:"Use v2 email login",disabled:!0,checked:m,onChange:()=>x(!m)})})]}),O?k.jsxs(G,{flexDirection:"column",children:[k.jsx(G,{marginTop:"3",children:k.jsx(ue,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),k.jsx(G,{marginTop:"4",children:k.jsx(fY,{value:y,digits:6,onChange:g})}),k.jsx(G,{gap:"2",marginY:"4",children:w?k.jsx(Bn,{}):k.jsx(ft,{variant:"primary",disabled:y.includes(""),label:"Verify",onClick:()=>O(y.join("")),"data-id":"verifyButton"})})]}):k.jsxs(G,{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(G,{marginTop:"6",children:[k.jsx(sr,{name:"email",type:"email",onChange:Q=>{u(Q.target.value)},ref:f,onKeyDown:Q=>{l&&Q.key==="Enter"&&C(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(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:w?k.jsx(Bn,{}):k.jsx(ft,{variant:"primary",disabled:!d,label:"Continue",onClick:()=>C(l),"data-id":"continueButton"})})]})]}),a&&k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Error loading accounts: ",a]})]})}function fpe(){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(()=>{Ce.getAddress().then(p=>{e(p)}).catch(p=>{n(p.message)}),Ce.listAccounts().then(p=>{p.currentAccountId&&h(p.accounts.find(y=>y.id===p.currentAccountId))})},[]),v.useEffect(()=>{Ce.isSignedIn().then(p=>{p||_s.navigate("/login")})},[]),v.useEffect(()=>{const p=s.join("");p.length===6&&(l(!0),Ce.finishValidateSession(p))},[s]),v.useEffect(()=>{const p=Ce.onValidationRequired(()=>{a(!0),Ce.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(pS,{children:o&&k.jsx(IN,{children:k.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1.2em",height:"50vh"},children:k.jsxs(G,{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(o9,{value:s,digits:6,onChange:i}),k.jsx(G,{marginTop:"5",children:c&&k.jsx(Bn,{})})]})})})}),k.jsxs(G,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[k.jsx(G,{marginBottom:"10",children:k.jsx(a9,{})}),k.jsxs(G,{marginBottom:"5",flexDirection:"row",children:[d&&k.jsxs(G,{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&&ej(d)]}),k.jsx(ft,{marginLeft:"auto",label:"Log out",size:"xs",onClick:async()=>{try{await Ce.dropSession({strict:!1})}catch(p){console.warn(`Could not drop session: ${p.message}`)}yee(),_s.navigate("/login")}})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(G,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your wallet address:"})}),k.jsx(G,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"normal",children:t?k.jsx(G,{children:k.jsx(ue,{children:t})}):k.jsx(Bn,{})})}),k.jsx(G,{children:r&&k.jsxs(ue,{children:["Error fetching wallet address: ",r]})}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(tpe,{}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(G,{marginBottom:"5",children:k.jsx(lpe,{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(epe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Send ERC20 transaction",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(spe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Send ERC1155 transaction",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(ape,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Sign a message",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(rpe,{network:u})]}),k.jsxs(_l,{marginY:"3",label:"Call contracts",children:[k.jsx(gr,{background:"buttonGlass"}),k.jsx(npe,{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(wG,{position:"relative",top:"1",marginLeft:"1"})]})}),k.jsx(upe,{})]})]})}function dpe(t,e,r){return e=sj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $2(t,e){return ype(t)||ppe(t,e)||tj(t,e)||hpe()}function hpe(){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 ppe(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 ype(t){if(Array.isArray(t))return t}function vpe(t){return xpe(t)||gpe(t)||tj(t)||mpe()}function mpe(){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 tj(t,e){if(t){if(typeof t=="string")return z2(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 z2(t,e)}}function gpe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function xpe(t){if(Array.isArray(t))return z2(t)}function z2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--F){var B=this.tryEntries[F],J=B.completion;if(B.tryLoc==="root")return I("end");if(B.tryLoc<=this.prev){var se=n.call(B,"catchLoc"),ae=n.call(B,"finallyLoc");if(se&&ae){if(this.prev=0;--I){var F=this.tryEntries[I];if(F.tryLoc<=this.prev&&n.call(F,"finallyLoc")&&this.prev=0;--R){var I=this.tryEntries[R];if(I.finallyLoc===P)return this.complete(I.completion,I.afterLoc),Q(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 F=I.completion;if(F.type==="throw"){var B=F.arg;Q(I)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(P,R,I){return this.delegate={iterator:D(P),resultName:R,nextLoc:I},this.method==="next"&&(this.arg=t),g}},e}function js(t){"@babel/helpers - typeof";return js=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},js(t)}function wn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N8(t,e){for(var r=0;rv.useContext(Ck).isMounted,Qhe=()=>(_0(XL(),YL("useStytchSession")),v.useContext(JL)),Yhe=()=>{const t=v.useContext(Ck);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(Ck.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 Te.signIn({idToken:c.session_jwt},$o());console.log(`Wallet address: ${l}`),await t.session.revoke(),n(0),window.location.search="",_s.navigate("/")})())},[e,t,r]);const a=async c=>{localStorage.setItem("stytch_auth","native"),n(1),await t.magicLinks.email.loginOrCreate(c,{})};return k.jsxs(G,{children:[k.jsx(G,{marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Stytch login"})}),k.jsxs(G,{marginTop:"5",marginBottom:"4",children:[k.jsx(G,{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(G,{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(G,{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(!0),[u,f]=v.useState(),[d,h]=v.useState(!1),p=v.useRef(null);Te.onEmailConflict(async(J,se)=>{p.current=se,f(J),h(!0)});const y=t7({flow:"implicit",onSuccess:J=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:J.access_token,CreateAccount:!0,TitleId:"8F854"},async(se,ae)=>{if(se)try{const Se=await Te.signIn({playFabTitleId:"8F854",playFabSessionTicket:se.data.SessionTicket},$o());console.log("Sequence response:",Se),_s.navigate("/")}catch{console.error("Error: "+JSON.stringify(ae))}else ae&&console.error("Error: "+JSON.stringify(ae))})}}),{inProgress:g,loading:m,initiateAuth:x,sendChallengeAnswer:b,cancel:w}=QL({sessionName:$o(),onSuccess:async({wallet:J})=>{console.log(`Wallet address: ${J}`),_s.navigate("/")}}),{inProgress:C,loading:O,initiateAuth:_,sendChallengeAnswer:A}=Fhe({onSuccess:async J=>{const se=await Te.signIn({idToken:J},$o());console.log(`Wallet address: ${se}`),_s.navigate("/")}}),j=c?g:C,U=c?m:O,H=c?x:_,K=c?b:A;v.useEffect(()=>{(async()=>await Te.isSignedIn()&&_s.navigate("/"))()},[]);const Q=async J=>{const se=await Te.signIn({idToken:J.credential},$o());console.log(`Wallet address: ${se.wallet}`),console.log(`Email address: ${se.email}`),_s.navigate("/")},$="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":""),D=async J=>{const se=await Te.signIn({idToken:J.authorization.id_token},$o());console.log(`Wallet address: ${se.wallet}`),console.log(`Email address: ${se.email}`),_s.navigate("/")},T=async()=>{const J=await Te.signIn({guest:!0},$o());console.log(`Wallet address: ${J.wallet}`),_s.navigate("/")},P=new URLSearchParams(window.location.search),R=P.get("env")==="dev",[I,F]=v.useState(R);return k.jsxs(k.Fragment,{children:[k.jsxs(G,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[k.jsxs(G,{marginBottom:"16",flexDirection:"row",children:[k.jsx(i7,{}),k.jsx(G,{marginLeft:"auto",children:k.jsx(TJ,{label:"Use dev env",checked:I,onCheckedChange:()=>{I?(P.delete("env"),window.location.search=P.toString()):(P.set("env","dev"),window.location.search=P.toString()),F(!I)}})})]}),k.jsx(G,{gap:"4",children:k.jsx(ut,{label:"Guest login",onClick:T})}),k.jsx(gr,{background:"buttonGlass"}),k.jsxs(G,{marginTop:"6",children:[k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Email Login"}),k.jsx(G,{marginTop:"4",children:k.jsx(q6,{label:"Use v2 email login",checked:c,onCheckedChange:()=>{l(!c)}})})]}),K?k.jsxs(G,{flexDirection:"column",children:[k.jsx(G,{marginTop:"6",children:k.jsx(ue,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),k.jsx(G,{marginTop:"4",children:k.jsx(s7,{value:o,digits:6,onChange:a})}),k.jsx(G,{gap:"2",marginY:"4",children:U?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:o.includes(""),label:"Verify",onClick:()=>K(o.join("")),"data-id":"verifyButton"})})]}):k.jsxs(G,{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(G,{marginTop:"6",children:[k.jsx(sr,{name:"email",type:"email",onChange:J=>{e(J.target.value)},ref:r,onKeyDown:J=>{t&&J.key==="Enter"&&H(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(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:U?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:!n,label:"Continue",onClick:()=>H(t),"data-id":"continueButton"})})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(G,{paddingY:"4",gap:"4",flexDirection:"column",width:"full",children:!j&&k.jsxs(k.Fragment,{children:[k.jsx(G,{marginBottom:"2",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Social Login"})}),k.jsxs(G,{gap:"4",flexDirection:"column",width:"fit",children:[k.jsx(G,{children:k.jsx(e7,{onSuccess:Q,shape:"circle",width:230},"google")}),k.jsx(n7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:$,usePopup:!0},onError:J=>console.error(J),onSuccess:D,uiType:"dark"},"apple")]}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsxs(G,{children:[k.jsx(G,{marginBottom:"4",children:k.jsx(ue,{variant:"large",color:"text100",fontWeight:"bold",children:"Playfab login"})}),k.jsx(G,{children:k.jsx(ut,{label:"Login with Google (through Playfab)",onClick:y})})]}),k.jsx(Xhe,{}),""]})})]}),d&&u&&k.jsx(RN,{size:"small",onClose:()=>h(!1),children:k.jsx(jhe,{info:u,onCancel:()=>{h(!1),f(void 0),j&&(a([]),w(),e(""))},onConfirm:async()=>{var J;h(!1),f(void 0),await((J=p.current)==null?void 0:J.call(p))}})})]})}async function cg({transactions:t,network:e}){const r=await Te.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(G,{marginTop:"5",children:[k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options:"}),k.jsx(G,{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(G,{alignItems:"center",gap:"2",children:k.jsxs(ue,{children:[(a=o==null?void 0:o.token)==null?void 0:a.name," ",mA(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(G,{})}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(),[C,O]=v.useState(),[_,A]=v.useState(!1);v.useEffect(()=>{j()},[]),v.useEffect(()=>{var K,Q;if(t.network){const $=fp(t.network.name);if($){const D=$.name in{polygon:1,mumbai:1}?"MATIC":"ETH";s(D),j(),(K=$.blockExplorer)!=null&&K.rootUrl&&o((Q=$.blockExplorer)==null?void 0:Q.rootUrl)}}},[t.network]);const j=async()=>{if(!t.network)return;const K=fp(t.network.name);if(!K)return;const Q=await Te.getAddress(),D=await new KL(MD(K.name),epe).getEtherBalance({accountAddress:Q});r(BigInt(D.balance.balanceWei))},U=async(K,Q)=>{const $=await cg({transactions:[{to:K,value:E4(Q)}],network:t.network});if($.feeQuote&&$.feeOptions){x($.feeOptions),O($.feeQuote),console.log("feeOptions",$);return}A(!0),console.log("tx sponsored")},H=async(K,Q)=>{var $;try{g(void 0),p(!0);const D=await Te.sendTransaction({transactions:[{to:K,value:E4(Q)}],network:($=t.network)==null?void 0:$.id,transactionsFeeOption:b,transactionsFeeQuote:C});Cy(D)?d(D.data.txHash):g(D.data.error),p(!1)}catch(D){console.error(D),p(!1)}finally{O(void 0),x(void 0),w(void 0),A(!1)}};return k.jsxs(G,{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(G,{marginTop:"5",children:k.jsx(sr,{name:"sendNativeTokenTo",type:"text",onChange:K=>{c(K.target.value)},value:a,placeholder:"To address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"sendNativeTokenAmount",type:"text",onChange:K=>{u(K.target.value)},value:l,placeholder:"Amount",required:!0,"data-id":"nativeTokenSendAmount"})}),y&&k.jsxs(G,{marginTop:"3",children:["Transaction failed: ",y]}),k.jsx(lg,{feeOptions:m,onSelected:w}),_&&k.jsx(G,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h?k.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(G,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:a===""&&l==="",onClick:()=>U(a,l)}),k.jsx(ut,{marginTop:"5",label:"Send native token",disabled:a===""&&l==="",onClick:()=>H(a,l)})]}),f&&k.jsxs(G,{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 Te.dropSession({sessionId:l}),e(await Te.listSessions())}catch(u){a(u.message),e(await Te.listSessions())}i(!1)};return v.useEffect(()=>{Promise.all([Te.listSessions(),Te.getSessionId()]).then(([l,u])=>{e(l),n(u),i(!1)}).catch(l=>{a(l.message),i(!1)})},[]),k.jsxs(G,{children:[k.jsxs(G,{marginBottom:"5",children:[k.jsx(G,{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(G,{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 Te.signMessage({message:e,network:(a=t.network)==null?void 0:a.id});s(o.data.signature)};return k.jsxs(G,{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(G,{flexDirection:"column",marginTop:"5",children:[k.jsxs(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:["Signature for ",e,":"]}),k.jsx(G,{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(),[C,O]=v.useState(!1),[_,A]=v.useState("");v.useEffect(()=>{var H,K;if(t.network){const Q=fp(t.network.name);(H=Q==null?void 0:Q.blockExplorer)!=null&&H.rootUrl&&A((K=Q.blockExplorer)==null?void 0:K.rootUrl)}},[t.network]);const j=async()=>{const H=await cg({transactions:[wL({to:e,abi:n,func:i,args:JSON.parse(a),value:"0"})],network:t.network});if(H.feeQuote&&H.feeOptions){g(H.feeOptions),w(H.feeQuote),console.log("feeOptions",H);return}O(!0),console.log("tx sponsored")},U=async()=>{var H;try{p(void 0),d(!0);const K=await Te.callContract({network:(H=t.network)==null?void 0:H.id,to:e,abi:n,func:i,args:JSON.parse(a),value:0,transactionsFeeOption:m,transactionsFeeQuote:b});Cy(K)?u(K.data.txHash):p(K.data.error),d(!1)}catch(K){console.error(K),d(!1)}};return k.jsxs(G,{children:[k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"callContractAddress",type:"text",onChange:H=>{r(H.target.value)},value:e,placeholder:"Contract address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"callContractAbi",type:"text",onChange:H=>{s(H.target.value)},value:n,placeholder:"Contract ABI or function ABI, e.g. [{...}] or [{...}, {...}] or transfer(address,uint256)",required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"callContractMethod",type:"text",onChange:H=>{o(H.target.value)},value:i,placeholder:"Method name, e.g. transfer",required:!0,"data-id":"nativeTokenSendAmount"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{name:"callContractArgs",type:"text",onChange:H=>{c(H.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}),C&&k.jsx(G,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h&&k.jsxs(G,{marginTop:"3",children:["Transaction failed: ",h]}),f?k.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(G,{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:()=>U()})]}),l&&k.jsxs(G,{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),[C,O]=v.useState(),[_,A]=v.useState(),[j,U]=v.useState(),[H,K]=v.useState(!1),[Q,$]=v.useState("");v.useEffect(()=>{var I,F;if(t.network){const B=fp(t.network.name);(I=B==null?void 0:B.blockExplorer)!=null&&I.rootUrl&&$((F=B.blockExplorer)==null?void 0:F.rootUrl)}},[t.network]),v.useEffect(()=>{D(n)},[n]);const D=async I=>{var J;if(!tne(I)){c("---");return}c("...");const F=new ED(`https://nodes.sequence.app/${(J=t.network)==null?void 0:J.name}`),B=new Mu(I,["function balanceOf(address) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)"],F);try{const[se,ae,Se]=await Promise.all([B.balanceOf(Te.getAddress()),B.decimals(),B.symbol()]);w(ae),c(`${mA(se,ae)} ${Se}`)}catch{c("---")}},T=async()=>{const I=await cg({transactions:[QC({token:n,to:l,value:Xh(f,b).toString()})],network:t.network});if(I.feeQuote&&I.feeOptions){O(I.feeOptions),U(I.feeQuote),console.log("feeOptions",I);return}K(!0),console.log("tx sponsored")},P=async()=>{var I;try{g(""),x(!0);const F=await Te.sendERC20({token:n,to:l,value:Xh(f,b),network:(I=t.network)==null?void 0:I.id,transactionsFeeOption:_,transactionsFeeQuote:j});Cy(F)?p(F.data.txHash):g(F.data.error)}catch(F){console.error(F)}finally{x(!1)}},R=I=>{r(I),I==="Custom"?(s(""),o(!0)):(s(I),o(!1))};return k.jsxs(G,{children:[k.jsxs(G,{marginTop:"5",children:[k.jsx(Rm,{name:"token",options:O8,value:e??"",onValueChange:I=>R(I)}),k.jsx(G,{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(G,{marginTop:"3",children:[k.jsxs(ue,{variant:"normal",color:"text100",children:["Token Balance: ",a]}),k.jsx(ut,{marginLeft:"2",size:"xs",label:"Fetch",onClick:()=>D(n)})]}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{type:"text",value:l,onChange:I=>u(I.target.value),placeholder:"Destination Address"})}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{type:"text",value:f,onChange:I=>d(I.target.value),placeholder:"Amount"})}),y&&k.jsx(G,{marginTop:"3",children:k.jsxs(ue,{color:"error",children:["Error: ",y]})}),k.jsx(lg,{feeOptions:C,onSelected:A}),H&&k.jsx(G,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),m?k.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(G,{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(G,{marginTop:"3",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),k.jsx("a",{href:`${Q}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(G,{style:i,children:[k.jsx(G,{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(G,{style:o,children:k.jsx(sr,{type:"text",value:e,onChange:c=>r(c.target.value),placeholder:"Token ID"})}),k.jsx(G,{style:o,children:k.jsx(sr,{type:"text",value:n,onChange:c=>s(c.target.value),placeholder:"Amount"})}),k.jsx(G,{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(),[C,O]=v.useState(!1),[_,A]=v.useState("");v.useEffect(()=>{var D,T;if(t.network){const P=fp(t.network.name);(D=P==null?void 0:P.blockExplorer)!=null&&D.rootUrl&&A((T=P.blockExplorer)==null?void 0:T.rootUrl)}},[t.network]);const j=()=>{s([...n,{tokenId:"",amount:""}])},U=async()=>{if(!e||!t.network)return;const D=t.network.name,T=new KL("https://"+D+"-indexer.sequence.app",ope),P=e,R=await Te.getAddress(),I=!0;p(await T.getTokenBalances({contractAddress:P,accountAddress:R,includeMetadata:I}))};v.useEffect(()=>{U()},[e]);const H=(D,T)=>{const P=[...n];P[D]=T,s(P)},K=D=>{const T=[...n];T.splice(D,1),s(T)},Q=async()=>{const D=await cg({transactions:[YC({to:i,token:e,values:n.map(T=>({id:T.tokenId,amount:Xh(T.amount,0)}))})],network:t.network});if(D.feeQuote&&D.feeOptions){g(D.feeOptions),w(D.feeQuote),console.log("feeOptions",D);return}O(!0),console.log("tx sponsored")},$=async()=>{var D;try{u(""),d(!0);const T=await Te.sendERC1155({to:i,token:e,values:n.map(P=>({id:P.tokenId,amount:Xh(P.amount,0)})),network:(D=t.network)==null?void 0:D.id,transactionsFeeOption:m,transactionsFeeQuote:b});Cy(T)?c(T.data.txHash):u(T.data.error)}catch(T){console.error(T)}finally{d(!1)}};return k.jsxs(G,{children:[k.jsx(G,{marginBottom:"5",children:k.jsx(sr,{type:"text",value:e,onChange:D=>r(D.target.value),placeholder:"Token Contract Address"})}),k.jsx(G,{marginBottom:"5",children:k.jsx(ut,{label:"Fetch metadata",onClick:()=>U()})}),n.map((D,T)=>k.jsx(G,{marginBottom:"3",children:k.jsx(ape,{index:T,options:h,onChange:(P,R,I)=>H(P,{tokenId:R,amount:I}),removeTokenEntry:K})},T)),k.jsx(ut,{label:"Add Token",onClick:j}),k.jsx(G,{marginTop:"5",children:k.jsx(sr,{type:"text",value:i,onChange:D=>o(D.target.value),placeholder:"Destination Address"})}),l&&k.jsx(G,{marginTop:"3",children:k.jsxs(ue,{color:"error",children:["Error: ",l]})}),k.jsx(lg,{feeOptions:y,onSelected:x}),C&&k.jsx(G,{marginTop:"5",children:k.jsx(ue,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),f?k.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:k.jsx(Bn,{})}):k.jsxs(G,{children:[k.jsx(ut,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&i===""&&n.length!==0,onClick:()=>Q()}),k.jsx(ut,{marginTop:"5",label:"Send Tokens",onClick:$})]}),a&&k.jsxs(G,{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(()=>{Te.networkList().then(i=>{s(i),r(i[0]),t(i[0])})},[]),n.length===0?k.jsx(G,{marginY:"5",children:k.jsx(Bn,{})}):k.jsxs(G,{marginBottom:"4",children:[k.jsx(G,{marginBottom:"4",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Network to use with requests:"})}),k.jsx(G,{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(G,{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(G,{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(G,{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 K;const t=D9(),[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=(K=f.current)==null?void 0:K.validity.valid,[h,p]=v.useState(!1),[y,g]=v.useState([]),[m,x]=v.useState(!0),{inProgress:b,loading:w,initiateAuth:C,sendChallengeAnswer:O}=QL({sessionName:$o(),onSuccess:async({wallet:Q})=>{console.log(`Wallet address: ${Q}`)},linkAccount:!0}),_=async Q=>{o(!0),s(void 0);try{await Te.removeAccount(Q);const $=await Te.listAccounts();s($.accounts)}catch($){c($.message);const D=await Te.listAccounts();s(D.accounts)}o(!1)},A=async Q=>{const $=await Te.initAuth({idToken:Q.credential});try{const D=await Te.linkAccount($);s(T=>[...T||[],D.account])}catch(D){vv(D)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},j="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":"/"),U=async Q=>{const $=await Te.initAuth({idToken:Q.authorization.id_token});try{const D=await Te.linkAccount($);s(T=>[...T||[],D.account])}catch(D){vv(D)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},H=t7({flow:"implicit",onSuccess:Q=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:Q.access_token,CreateAccount:!0,TitleId:"8F854"},async($,D)=>{if($)try{const T=await Te.initAuth({playFabTitleId:"8F854",playFabSessionTicket:$.data.SessionTicket}),P=await Te.linkAccount(T);console.log("playfab account",JSON.stringify(P.account,null,2)),s(R=>[...R||[],P.account])}catch(T){console.error(T),vv(T)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}else D&&console.log("Error: "+JSON.stringify(D))})}});return v.useEffect(()=>{Te.listAccounts().then(Q=>{s(Q.accounts),Q.currentAccountId&&r(Q.accounts.find($=>$.id===Q.currentAccountId)),o(!1)}).catch(Q=>{c(Q.message),o(!1)})},[b]),k.jsxs(G,{children:[k.jsx(gr,{background:"buttonGlass"}),k.jsxs(G,{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(Q=>k.jsxs(G,{flexDirection:"row",alignItems:"center",gap:"2",children:[k.jsx(ue,{variant:"normal",color:"text100",children:ZL(Q)}),Q.id!==(e==null?void 0:e.id)&&k.jsx(ut,{size:"xs",label:"Remove",onClick:()=>_(Q.id)}),Q.id===(e==null?void 0:e.id)&&k.jsx(G,{children:k.jsx(ue,{variant:"small",color:"text100",children:"(Account you logged in with)"})})]},Q.id))}),i&&k.jsx(Bn,{})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsxs(G,{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(e7,{onSuccess:A,shape:"circle",width:230}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(n7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:j,usePopup:!0},onError:Q=>console.error(Q),onSuccess:U,uiType:"dark"}),k.jsxs(k.Fragment,{children:[k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsx(G,{marginTop:"2",children:k.jsx(G,{children:k.jsx(ut,{label:"Login with Google (through Playfab)",onClick:H})})})]}),k.jsx(gr,{background:"buttonGlass",width:"full"}),k.jsxs(G,{marginTop:"2",children:[k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Email"}),k.jsx(G,{marginTop:"4",children:k.jsx(q6,{label:"Use v2 email login",disabled:!0,checked:m,onChange:()=>x(!m)})})]}),O?k.jsxs(G,{flexDirection:"column",children:[k.jsx(G,{marginTop:"3",children:k.jsx(ue,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),k.jsx(G,{marginTop:"4",children:k.jsx(uY,{value:y,digits:6,onChange:g})}),k.jsx(G,{gap:"2",marginY:"4",children:w?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:y.includes(""),label:"Verify",onClick:()=>O(y.join("")),"data-id":"verifyButton"})})]}):k.jsxs(G,{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(G,{marginTop:"6",children:[k.jsx(sr,{name:"email",type:"email",onChange:Q=>{u(Q.target.value)},ref:f,onKeyDown:Q=>{l&&Q.key==="Enter"&&C(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(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:w?k.jsx(Bn,{}):k.jsx(ut,{variant:"primary",disabled:!d,label:"Continue",onClick:()=>C(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(()=>{Te.getAddress().then(p=>{e(p)}).catch(p=>{n(p.message)}),Te.listAccounts().then(p=>{p.currentAccountId&&h(p.accounts.find(y=>y.id===p.currentAccountId))})},[]),v.useEffect(()=>{Te.isSignedIn().then(p=>{p||_s.navigate("/login")})},[]),v.useEffect(()=>{const p=s.join("");p.length===6&&(l(!0),Te.finishValidateSession(p))},[s]),v.useEffect(()=>{const p=Te.onValidationRequired(()=>{a(!0),Te.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(RN,{children:k.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1.2em",height:"50vh"},children:k.jsxs(G,{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(s7,{value:s,digits:6,onChange:i}),k.jsx(G,{marginTop:"5",children:c&&k.jsx(Bn,{})})]})})})}),k.jsxs(G,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[k.jsx(G,{marginBottom:"10",children:k.jsx(i7,{})}),k.jsxs(G,{marginBottom:"5",flexDirection:"row",children:[d&&k.jsxs(G,{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 Te.dropSession({strict:!1})}catch(p){console.warn(`Could not drop session: ${p.message}`)}mee(),_s.navigate("/login")}})]}),k.jsx(gr,{background:"buttonGlass"}),k.jsx(G,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your wallet address:"})}),k.jsx(G,{marginBottom:"5",children:k.jsx(ue,{variant:"normal",color:"text100",fontWeight:"normal",children:t?k.jsx(G,{children:k.jsx(ue,{children:t})}):k.jsx(Bn,{})})}),k.jsx(G,{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(G,{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;--F){var B=this.tryEntries[F],J=B.completion;if(B.tryLoc==="root")return I("end");if(B.tryLoc<=this.prev){var se=n.call(B,"catchLoc"),ae=n.call(B,"finallyLoc");if(se&&ae){if(this.prev=0;--I){var F=this.tryEntries[I];if(F.tryLoc<=this.prev&&n.call(F,"finallyLoc")&&this.prev=0;--R){var I=this.tryEntries[R];if(I.finallyLoc===P)return this.complete(I.completion,I.afterLoc),Q(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 F=I.completion;if(F.type==="throw"){var B=F.arg;Q(I)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(P,R,I){return this.delegate={iterator:D(P),resultName:R,nextLoc:I},this.method==="next"&&(this.arg=t),g}},e}function js(t){"@babel/helpers - typeof";return js=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},js(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 cj(t,e){if(t){if(typeof t=="string")return z8(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 z8(t,e)}}function z8(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--F){var B=this.tryEntries[F],J=B.completion;if(B.tryLoc==="root")return I("end");if(B.tryLoc<=this.prev){var se=n.call(B,"catchLoc"),ae=n.call(B,"finallyLoc");if(se&&ae){if(this.prev=0;--I){var F=this.tryEntries[I];if(F.tryLoc<=this.prev&&n.call(F,"finallyLoc")&&this.prev=0;--R){var I=this.tryEntries[R];if(I.finallyLoc===P)return this.complete(I.completion,I.afterLoc),Q(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 F=I.completion;if(F.type==="throw"){var B=F.arg;Q(I)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(P,R,I){return this.delegate={iterator:D(P),resultName:R,nextLoc:I},this.method==="next"&&(this.arg=t),g}},e}function H8(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(!Jpe(r))throw TypeError("Stringified UUID is invalid");return r}function Pk(t,e,r){t=t||{};var n=t.random||(t.rng||Qpe)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Xpe(n)}var I1={};function Rk(t,e){return xe(this,void 0,void 0,Z().mark(function r(){return Z().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(I1[t]===void 0){s.next=2;break}return s.abrupt("return",I1[t]);case 2:return I1[t]=Zpe(t,e),s.abrupt("return",I1[t]);case 4:case"end":return s.stop()}},r)}))}function Zpe(t,e){return new Promise(function(r,n){var s=tye(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=rye(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 eye=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]'))};function tye(t){var e=eye(t);if(e[0])return e[0]}function rye(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 ib=["[Stytch]"],nye=!1,bi={debug:function(){return nye},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;--F){var B=this.tryEntries[F],J=B.completion;if(B.tryLoc==="root")return I("end");if(B.tryLoc<=this.prev){var se=n.call(B,"catchLoc"),ae=n.call(B,"finallyLoc");if(se&&ae){if(this.prev=0;--I){var F=this.tryEntries[I];if(F.tryLoc<=this.prev&&n.call(F,"finallyLoc")&&this.prev=0;--R){var I=this.tryEntries[R];if(I.finallyLoc===P)return this.complete(I.completion,I.afterLoc),Q(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 F=I.completion;if(F.type==="throw"){var B=F.arg;Q(I)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(P,R,I){return this.delegate={iterator:D(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"))},oye=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:Hpe},dj=function(e){return e.includes("public-token-test")},aye=function(){return"event-id-".concat(Pk())},cye=function(){return"app-session-id-".concat(Pk())},lye=function(){return"persistent-id-".concat(Pk())},Pt=function(e){var r={isObject:function(s,i){var o=Si(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=aj(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},Xs=function(e){var r=uj(e,["request_id","status_code"]);return r},qt=function(e){var r=uj(e,["__user"]);return r},uye=function(){return Rk("".concat(Gpe,"/telemetry.js"),function(){return window.GetTelemetryID})},fye=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 xe(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 xe(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 xe(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 xe(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===N0.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 xe(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,uye();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)}))})}),dye=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(Cpe,r);case"StytchSDKSchemaError":return t.inflate(kpe,r);case"StytchAPIUnreachableError":return t.inflate(Ql,r);case"StytchAPISchemaError":return t.inflate(ij,r);case"StytchSDKAPIError":return t.inflate(Tpe,r);case"StytchAPIError":return t.inflate(oj,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}(),hye=15,pye=800,yye=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 xe(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}(),G8;(function(t){t.LoginOrCreateEML="login_or_create_eml",t.LoginOrCreateOTP="login_or_create_otp",t.ResetPassword="reset_password"})(G8||(G8={}));var vye=Or(function t(e,r){var n=this;_r(this,t),this._networkClient=e,this._subscriptionService=r,this.get=function(){return xe(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=Xs(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 xe(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 Pt("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=Xs(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 xe(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=Xs(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 xe(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=Xs(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 xe(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=Xs(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 xe(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=Xs(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 xe(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=Xs(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 xe(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=Xs(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)}}),mye=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 xe(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():q2.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 xe(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 q2.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;Pt("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}(),gye=Promise.resolve({pkceRequiredForEmailMagicLinks:!1}),xye=function(){function t(e,r,n,s){var i=this,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:gye,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 xe(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 xe(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 xe(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 Pt("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 xe(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 xe(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}(),bye=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 xe(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 xe(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 xe(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 xe(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 xe(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 xe(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 xe(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 Pt("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)}))}}),wye=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 xe(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 Pt("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||bi.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},Js=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=Js(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=Js(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=Js(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=Js(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=Js(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=Js(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=Js(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=Js(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:Xs(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 xe(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(!dj(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 xe(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&&(Pt("startOAuthFlow").isStringArray("custom_scopes",a),p.searchParams.set("custom_scopes",a.join(" "))),c){Pt("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}(),Eye=Promise.resolve({siweRequiredForCryptoWallets:!1}),Sye=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]:Eye;_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 xe(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 Pt("stytch.cryptoWallets.authenticateStart").isString("crypto_wallet_address",r.crypto_wallet_address).isString("crypto_wallet_type",r.crypto_wallet_type),r.siwe_params&&Pt("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 xe(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 Pt("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:Xs(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 xe(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 Pt("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 xe(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 Pt("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 xe(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 xe(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 Pt("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 hj(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 xe(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 Pt("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,Oye({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 xe(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 Pt("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,Mye(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 xe(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 xe(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}(),Lye=Promise.resolve({pkceRequiredForPasswordResets:!1}),jye=function(){function t(e,r,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Lye,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 xe(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 xe(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 Pt("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 xe(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 Pt("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 xe(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 Pt("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 xe(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 Pt("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 xe(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 Pt("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 xe(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 Pt("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 xe(this,void 0,void 0,Z().mark(function n(){return Z().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return Pt("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 Bye=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?bi.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 xe(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(dye.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}(),Fye=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}(),Uye=function(e){return!!(e!=null&&e.session)},gj=function(){function t(e,r){var n=this;_r(this,t),this._subscriptionService=e,this._headlessSessionClient=r,this._onDataChange=function(s){Uye(s)?n.scheduleBackgroundRefresh():n.cancelBackgroundRefresh()},this._reauthenticateWithBackoff=function(){return xe(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){bi.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 q2.includes(r.error_type)}}]),t}();gj.REFRESH_INTERVAL_MS=1e3*60*3;var Vye=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)})}}),q8="bootstrap",ab=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}},$ye=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(q8,JSON.stringify(i)),i}).catch(function(i){return bi.error(i),ab()})}return En(t,[{key:"getSync",value:function(){var r=this._dataLayer.getItem(q8);if(r===null)return ab();try{return JSON.parse(r)}catch{return ab()}}},{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 Bs(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 zye=function(e){return Rk("https://www.google.com/recaptcha/enterprise.js?render=".concat(e),function(){return window.grecaptcha.enterprise})},Hye=En(function t(e){var r=this;wn(this,t),this.bootstrapPromise=e,this.executeRecaptcha=function(){return Bs(r,void 0,void 0,It().mark(function n(){var s,i,o,a;return It().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 Bs(r,void 0,void 0,It().mark(function s(){return It().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,zye(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)}))})}),Gye=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 Bye(this.iframeURL),this._frameClient}},{key:"call",value:function(r,n){return this.frameClient.call(r,[n])}}]),t}(),qye=function(t){ug(e,t);function e(r,n,s,i,o,a){var c;return wn(this,e),c=lg(this,e,[r,n,s,i,o]),c._oneTap=a,c.startOneTap=function(l){return Bs(nj(c),void 0,void 0,It().mark(function u(){var f,d,h;return It().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:Sc.floating},onOneTapCancelled:l.onOneTapCancelled,callback:h}));case 8:case"end":return y.stop()}},u,this)}))},c.googleOneTap={start:c.startOneTap},c}return En(e)}(wye),Wye="4.18.2",xj=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 yye({maxBatchSize:hye,intervalDurationMs:pye,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:aye(),app_session_id:cye(),persistent_id:lye(),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:Wye}})}},{key:"fetchSDK",value:function(r){var n=r.url,s=r.body,i=r.errorMessage,o=r.method;return Bs(this,void 0,void 0,It().mark(function a(){var c,l,u,f;return It().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",K2({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 Bs(this,void 0,void 0,It().mark(function c(){var l,u,f,d;return It().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",Wpe({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}(),Kye=typeof window<"u"&&"IdentityCredential"in window,bj=function(e){return e===Sc.forceLegacyEmbedded?"force":e===Sc.embeddedOnly||e===Sc.embedded||e===Sc.floatingOrEmbedded},Qye=function(e){var r=bj(e);return r==="force"||r&&!Kye},Yye=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 Bs(this,void 0,void 0,It().mark(function o(){var a=this,c,l,u;return It().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=bj(i.position),l=Qye(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(lj)&&(n.style.width="100%")})}}]),t}(),Jye=function(){return Rk(qpe,function(){return window.google.accounts.id})},Xye=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 Bs(n,void 0,void 0,It().mark(function l(){var u,f,d;return It().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 Bs(this,void 0,void 0,It().mark(function r(){var n,s,i,o;return It().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=Yye,c.next=16,Jye();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 Bs(this,void 0,void 0,It().mark(function o(){var a,c;return It().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}(),Zye="PKCE_VERIFIER";function e1e(t){var e=t.toString(16);return e.length===1&&(e="0"+e),e}function t1e(t){var e;return btoa((e=String.fromCharCode).call.apply(e,[null].concat(vpe(new Uint8Array(t))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var cb=function(){function t(e,r){wn(this,t),this._dataLayer=e,this.namespace=r}return En(t,[{key:"key",value:function(){return Zye+":"+this.namespace}},{key:"startPKCETransaction",value:function(){return Bs(this,void 0,void 0,It().mark(function r(){var n;return It().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{bi.warn("Found malformed Proof Key pair in localstorage.");return}}},{key:"clearPKPair",value:function(){return this._dataLayer.removeItem(this.key())}}],[{key:"createProofkeyPair",value:function(){return Bs(this,void 0,void 0,It().mark(function r(){var n,s,i;return It().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(e1e).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:t1e(i),code_verifier:s});case 7:case"end":return a.stop()}},r)}))}}]),t}(),r1e=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 js(o)!==js(a)?!1:o===null||a===null?o===a:js(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=$2(c,1),u=l[0];return!n.includes(u)}).every(function(c){var l=$2(c,2),u=l[0],f=l[1];return i(f,a[u])}):o===a};return s},n1e=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}$/))},s1e=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:zpe,testAPIURL:(i=(s=e==null?void 0:e.endpoints)===null||s===void 0?void 0:s.testAPIURL)!==null&&i!==void 0?i:Upe,liveAPIURL:(a=(o=e==null?void 0:e.endpoints)===null||o===void 0?void 0:o.liveAPIURL)!==null&&a!==void 0?a:Vpe,dfpBackendURL:oye(e),clientsideServicesIframeURL:(l=(c=e==null?void 0:e.endpoints)===null||c===void 0?void 0:c.clientsideServicesIframeURL)!==null&&l!==void 0?l:$pe}}},O1=function(e){var r=document.cookie?document.cookie.split("; "):[],n=r.filter(function(s){var i=s.split("="),o=$2(i,1),a=o[0];return e===a});return n.length>1},i1e="stytch_sdk_state_",Oi=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"".concat(i1e).concat(e).concat(r?"::".concat(r):"")};/*! js-cookie v3.0.1 | MIT */function _1(t){for(var e=1;e"u")){o=_1({},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=!K8(s,i);(o||a)&&(W8(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 p1e(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}(),v1e=function(t){ug(e,t);function e(){var r;return wn(this,e),r=lg(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)}(y1e),m1e=Symbol.for("stytch__internal_b2c"),g1e=function(e,r){Object.assign(e,dpe({},m1e,r))},x1e=function(t){ug(e,t);function e(r,n,s,i,o){wn(this,e);var a=s;return dj(r)&&(a=i),lg(this,e,[r,n,a,o])}return En(e)}(xj),b1e=En(function t(e,r){var n=this;wn(this,t),iye("StytchHeadlessClient"),sye(e);var s=r,i=s1e(s);this._dataLayer=h1e(e,s),this._subscriptionService=new v1e(e,this._dataLayer),this._stateChangeClient=new Vye(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 cb(this._dataLayer,"passwords");this._networkClient=new xj(e,this._dataLayer,i.endpoints.sdkBackendURL,o),this._apiNetworkClient=new x1e(e,this._dataLayer,i.endpoints.liveAPIURL,i.endpoints.testAPIURL,o);var c=new $ye(e,this._networkClient,this._dataLayer),l=new Hye(c.getAsync()),u=new fye(e,i.endpoints.dfpBackendURL,c.getAsync(),l.executeRecaptcha),f=new Gye(i.endpoints.clientsideServicesIframeURL),d=new Xye(e,f),h=new Fye(this._networkClient,u);this.user=new vye(this._networkClient,this._subscriptionService),this.session=new mye(this._networkClient,this._subscriptionService),this.magicLinks=new xye(this._networkClient,this._subscriptionService,new cb(this._dataLayer,"magic_links"),a,c.getAsync(),u),this.otps=new bye(this._networkClient,this._subscriptionService,l.executeRecaptcha,u),this.oauth=new qye(this._networkClient,this._subscriptionService,new cb(this._dataLayer,"oauth"),c.getAsync(),{publicToken:e,testAPIURL:i.endpoints.testAPIURL,liveAPIURL:i.endpoints.liveAPIURL},d),this.cryptoWallets=new Sye(this._networkClient,this._apiNetworkClient,this._subscriptionService,l.executeRecaptcha,u,c.getAsync()),this.totps=new Aye(this._networkClient,this._subscriptionService,u),this.webauthn=new Dye(this._networkClient,this._subscriptionService,u),this.passwords=new jye(this._networkClient,this._subscriptionService,a,c.getAsync(),u),this._sessionManager=new gj(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}}),g1e(this,{bootstrap:c,clientsideServices:f,captcha:l,oneTap:d,searchManager:h,publicToken:e,dataLayer:this._dataLayer,networkClient:this._networkClient})});const w1e="public-token-test-b10ed486-70f4-44d3-8696-662052833e88";function E1e({children:t}){return k.jsx(Yhe,{stytch:new b1e(w1e),children:t})}const S1e="970987756660-35a6tc48hvi8cev9cnknp0iugv9poa23.apps.googleusercontent.com",Q8="970987756660-6ibakd38eibf3cg9rq42hri7o0jn5va8.apps.googleusercontent.com",A1e="AQAAAAAAAEGv4rUgioUNUbcdNZlvOZE72JI",C1e="eyJwcm9qZWN0SWQiOjE2ODE1LCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI2N2V2NXVvc3ZxMzVmcGI2OXI3NnJoYnVoIiwicnBjU2VydmVyIjoiaHR0cHM6Ly93YWFzLnNlcXVlbmNlLmFwcCJ9",Y8="AQAAAAAAAAP3L-mJ8W7g2GNLea1JlhmvC-Q",J8="eyJwcm9qZWN0SWQiOjEwMTUsImVtYWlsUmVnaW9uIjoiY2EtY2VudHJhbC0xIiwiZW1haWxDbGllbnRJZCI6IjU0YXRuNXVwaTYzcWM1OWExZW0zdmJocnNuIiwicnBjU2VydmVyIjoiaHR0cHM6Ly9kZXYtd2Fhcy5zZXF1ZW5jZS5hcHAifQ==";new AD("https://nodes.sequence.app/polygon");const fg=new URLSearchParams(window.location.search),k1e=fg.get("env")??"prod";let Sj=fg.get("projectAccessKey")??A1e,Aj=fg.get("waasConfigKey")??C1e,Cj=fg.get("googleClientId")??S1e;k1e==="dev"&&(console.log("Using dev environment"),console.log(`Project Access Key: ${Y8}`),console.log(`Waas Config Key: ${J8}`),console.log(`Google Client ID: ${Q8}`),Sj=Y8,Aj=J8,Cj=Q8);const Ce=new Mhe({network:"polygon",projectAccessKey:Sj,waasConfigKey:Aj}),_s=ZZ([{path:"/login",element:k.jsx(Xhe,{})},{path:"/",element:k.jsx(fpe,{})}]);fb.createRoot(document.getElementById("root")).render(k.jsx(ar.StrictMode,{children:k.jsx(ZQ,{children:k.jsx(cX,{children:k.jsx(dee,{clientId:Cj,children:k.jsx(E1e,{children:k.jsx(cee,{router:_s})})})})})})); +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:Js(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}),Aye=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:Js(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}(),Cye=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 Bs(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 Bs(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 Bs(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 Bs(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:Cc.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 Bs(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 Bs(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===Cc.forceLegacyEmbedded?"force":e===Cc.embeddedOnly||e===Cc.embedded||e===Cc.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 Bs(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 Bs(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 Bs(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 Bs(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 Bs(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 Bs(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 js(o)!==js(a)?!1:o===null||a===null?o===a:js(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 Aye(this._networkClient,this._apiNetworkClient,this._subscriptionService,l.executeRecaptcha,u,c.getAsync()),this.totps=new Cye(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 A1e="970987756660-35a6tc48hvi8cev9cnknp0iugv9poa23.apps.googleusercontent.com",K8="970987756660-6ibakd38eibf3cg9rq42hri7o0jn5va8.apps.googleusercontent.com",C1e="AQAAAAAAAEGv4rUgioUNUbcdNZlvOZE72JI",k1e="eyJwcm9qZWN0SWQiOjE2ODE1LCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI2N2V2NXVvc3ZxMzVmcGI2OXI3NnJoYnVoIiwicnBjU2VydmVyIjoiaHR0cHM6Ly93YWFzLnNlcXVlbmNlLmFwcCJ9",Q8="AQAAAAAAAAK2JvvZhWqZ51riasWBftkrVXE",Y8="eyJwcm9qZWN0SWQiOjY5NCwiZW1haWxSZWdpb24iOiJjYS1jZW50cmFsLTEiLCJlbWFpbENsaWVudElkIjoiNTRhdG41dXBpNjNxYzU5YTFlbTN2Ymhyc24iLCJycGNTZXJ2ZXIiOiJodHRwczovL2Rldi13YWFzLnNlcXVlbmNlLmFwcCJ9";new ED("https://nodes.sequence.app/polygon");const dg=new URLSearchParams(window.location.search),T1e=dg.get("env")??"prod";let Ej=dg.get("projectAccessKey")??C1e,Sj=dg.get("waasConfigKey")??k1e,Aj=dg.get("googleClientId")??A1e;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,Aj=K8);const Te=new Dhe({network:"polygon",projectAccessKey:Ej,waasConfigKey:Sj}),_s=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:Aj,children:k.jsx(S1e,{children:k.jsx(uee,{router:_s})})})})})})); diff --git a/index.html b/index.html index 7ed2465..4b9aee9 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Demo Waas App - +