@dodoex/widgets 2.6.12-beta.6 → 2.6.12-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{Trans as e,I18nProvider as t,useLingui as r}from"@lingui/react";import{i18n as n}from"@lingui/core";import o,{BigNumber as i}from"bignumber.js";import{merge as s,isArray as a,unionBy as l,chunk as c,debounce as d}from"lodash";import*as u from"react";import p,{forwardRef as h,memo as f,useState as m,useRef as g,useCallback as y,useId as b,useEffect as v,useLayoutEffect as x,useMemo as w,cloneElement as E,createContext as A,useContext as C}from"react";import{ThemeContext as k,Global as T}from"@emotion/react";import{Loading as R,QuestionBorder as S,Done as N,Search as M,Error as O,CaretUp as I,ErrorWarn as F,DoneBorder as j,ArrowTopRightBorder as L,ArrowBack as _,DoubleRight as W,DetailBorder as P,Warn as D,Switch as B,Lock as U,Time as V,GasFee as Z,ArrowRight as H,Setting as z,Dodo as Y}from"@dodoex/icons";import G from"@emotion/styled";import*as X from"react-dom";import J from"react-dom";import{useSelector as q,useDispatch as Q,Provider as K}from"react-redux";import $ from"identicon.js";import{initializeConnector as ee,useWeb3React as te,Web3ReactProvider as re}from"@web3-react/core";import{EIP1193 as ne}from"@web3-react/eip1193";import{WalletConnect as oe}from"@web3-react/walletconnect-v2";import{MetaMask as ie}from"@web3-react/metamask";import{Connector as se}from"@web3-react/types";import{configureStore as ae}from"@reduxjs/toolkit";import{combineReducers as le}from"redux";import{create as ce}from"zustand";import{TonConnect as de,TonConnectUI as ue}from"@tonconnect/ui";import{getHttpEndpoint as pe,getHttpV4Endpoint as he}from"@orbs-network/ton-access";import{TonClient as fe,TonClient4 as me,Address as ge,beginCell as ye,Cell as be,storeMessage as ve,toNano as xe,JettonMaster as we}from"ton";import{_base36To16 as Ee,BigNumber as Ae,parseFixed as Ce}from"@ethersproject/bignumber";import{Contract as ke}from"@ethersproject/contracts";import{FixedSizeList as Te}from"react-window";import Re from"axios";import Se from"@twa-dev/sdk";import{QueryClient as Ne,QueryClientProvider as Me,useQuery as Oe}from"@tanstack/react-query";var Ie,Fe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},je={exports:{}},Le={exports:{}},_e={};var We,Pe,De,Be,Ue,Ve,Ze,He,ze,Ye,Ge,Xe,Je,qe,Qe={};
1
+ import{Trans as e,I18nProvider as t,useLingui as r}from"@lingui/react";import{i18n as n}from"@lingui/core";import o,{BigNumber as i}from"bignumber.js";import{merge as s,isArray as a,unionBy as l,chunk as c,debounce as d}from"lodash";import*as u from"react";import p,{forwardRef as h,memo as f,useState as m,useRef as g,useEffect as y,cloneElement as b,useCallback as v,useId as x,useLayoutEffect as w,useMemo as E,createContext as A,useContext as C}from"react";import{Global as k,ThemeContext as T}from"@emotion/react";import{Loading as R,QuestionBorder as S,Done as N,Search as M,Error as O,CaretUp as I,ErrorWarn as F,DoneBorder as j,ArrowTopRightBorder as L,ArrowBack as _,DoubleRight as W,DetailBorder as P,Warn as D,Switch as B,Lock as U,Time as V,GasFee as Z,ArrowRight as H,Setting as z,Dodo as Y}from"@dodoex/icons";import G from"@emotion/styled";import*as X from"react-dom";import J from"react-dom";import{_base36To16 as q,BigNumber as Q,parseFixed as K}from"@ethersproject/bignumber";import{useSelector as $,useDispatch as ee,Provider as te}from"react-redux";import re from"identicon.js";import{initializeConnector as ne,useWeb3React as oe,Web3ReactProvider as ie}from"@web3-react/core";import{EIP1193 as se}from"@web3-react/eip1193";import{WalletConnect as ae}from"@web3-react/walletconnect-v2";import{MetaMask as le}from"@web3-react/metamask";import{Connector as ce}from"@web3-react/types";import{configureStore as de}from"@reduxjs/toolkit";import{combineReducers as ue}from"redux";import{create as pe}from"zustand";import{TonConnect as he,TonConnectUI as fe}from"@tonconnect/ui";import{getHttpEndpoint as me,getHttpV4Endpoint as ge}from"@orbs-network/ton-access";import{TonClient as ye,TonClient4 as be,Address as ve,beginCell as xe,Cell as we,storeMessage as Ee,toNano as Ae,JettonMaster as Ce}from"ton";import{Contract as ke}from"@ethersproject/contracts";import{FixedSizeList as Te}from"react-window";import Re from"axios";import Se from"@twa-dev/sdk";import{QueryClient as Ne,QueryClientProvider as Me,useQuery as Oe}from"@tanstack/react-query";var Ie,Fe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},je={exports:{}},Le={exports:{}},_e={};var We,Pe,De,Be,Ue,Ve,Ze,He,ze,Ye,Ge,Xe,Je,qe,Qe={};
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -29,12 +29,12 @@ object-assign
29
29
  *
30
30
  * This source code is licensed under the MIT license found in the
31
31
  * LICENSE file in the root directory of this source tree.
32
- */function ft(e){const{styles:t,defaultTheme:r={}}=e;return nt.exports.jsx(T,{styles:"function"==typeof t?e=>{return t(null==(n=e)||0===Object.keys(n).length?r:e);var n}:t})}
32
+ */function ft(e){const{styles:t,defaultTheme:r={}}=e;return nt.exports.jsx(k,{styles:"function"==typeof t?e=>{return t(null==(n=e)||0===Object.keys(n).length?r:e);var n}:t})}
33
33
  /** @license MUI v5.10.8
34
34
  *
35
35
  * This source code is licensed under the MIT license found in the
36
36
  * LICENSE file in the root directory of this source tree.
37
- */function mt(e,t){const r=G(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const n="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${n})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${n})(...args) API requires all its args to be defined.`),r(...t)}:r}!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(ct)return ut;ct=1;var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case n:case i:case o:case d:case u:return e;default:switch(e=e&&e.$$typeof){case l:case a:case c:case h:case p:case s:return e;default:return f}}case r:return f}}}return e=Symbol.for("react.module.reference"),ut.ContextConsumer=a,ut.ContextProvider=s,ut.Element=t,ut.ForwardRef=c,ut.Fragment=n,ut.Lazy=h,ut.Memo=p,ut.Portal=r,ut.Profiler=i,ut.StrictMode=o,ut.Suspense=d,ut.SuspenseList=u,ut.isAsyncMode=function(){return!1},ut.isConcurrentMode=function(){return!1},ut.isContextConsumer=function(e){return m(e)===a},ut.isContextProvider=function(e){return m(e)===s},ut.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ut.isForwardRef=function(e){return m(e)===c},ut.isFragment=function(e){return m(e)===n},ut.isLazy=function(e){return m(e)===h},ut.isMemo=function(e){return m(e)===p},ut.isPortal=function(e){return m(e)===r},ut.isProfiler=function(e){return m(e)===i},ut.isStrictMode=function(e){return m(e)===o},ut.isSuspense=function(e){return m(e)===d},ut.isSuspenseList=function(e){return m(e)===u},ut.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===d||t===u||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===p||t.$$typeof===s||t.$$typeof===a||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},ut.typeOf=m,ut}():e.exports=(pt||(pt=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var m=e.type;switch(m){case n:case i:case o:case d:case u:return m;default:var g=m&&m.$$typeof;switch(g){case l:case a:case c:case h:case p:case s:return g;default:return f}}case r:return f}}}e=Symbol.for("react.module.reference");var g=a,y=s,b=t,v=c,x=n,w=h,E=p,A=r,C=i,k=o,T=d,R=u,S=!1,N=!1;ht.ContextConsumer=g,ht.ContextProvider=y,ht.Element=b,ht.ForwardRef=v,ht.Fragment=x,ht.Lazy=w,ht.Memo=E,ht.Portal=A,ht.Profiler=C,ht.StrictMode=k,ht.Suspense=T,ht.SuspenseList=R,ht.isAsyncMode=function(e){return S||(S=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},ht.isConcurrentMode=function(e){return N||(N=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},ht.isContextConsumer=function(e){return m(e)===a},ht.isContextProvider=function(e){return m(e)===s},ht.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ht.isForwardRef=function(e){return m(e)===c},ht.isFragment=function(e){return m(e)===n},ht.isLazy=function(e){return m(e)===h},ht.isMemo=function(e){return m(e)===p},ht.isPortal=function(e){return m(e)===r},ht.isProfiler=function(e){return m(e)===i},ht.isStrictMode=function(e){return m(e)===o},ht.isSuspense=function(e){return m(e)===d},ht.isSuspenseList=function(e){return m(e)===u},ht.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===d||t===u||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===p||t.$$typeof===s||t.$$typeof===a||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},ht.typeOf=m}()),ht)}(dt),"production"!==process.env.NODE_ENV&&(ft.propTypes={defaultTheme:je.exports.object,styles:je.exports.oneOfType([je.exports.string,je.exports.object,je.exports.func])});var gt="production"!==process.env.NODE_ENV?je.exports.oneOfType([je.exports.number,je.exports.string,je.exports.object,je.exports.array]):{};function yt(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...r){return e(...r)||t(...r)}}function bt(){return bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bt.apply(this,arguments)}function vt(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function xt(e){if(!vt(e))return e;const t={};return Object.keys(e).forEach((r=>{t[r]=xt(e[r])})),t}function wt(e,t,r={clone:!0}){const n=r.clone?bt({},e):e;return vt(e)&&vt(t)&&Object.keys(t).forEach((o=>{"__proto__"!==o&&(vt(t[o])&&o in e&&vt(e[o])?n[o]=wt(e[o],t[o],r):r.clone?n[o]=vt(t[o])?xt(t[o]):t[o]:n[o]=t[o])})),n}function Et(e,t,r,n,o){const i=e[t],s=o||t;if(null==i||"undefined"==typeof window)return null;let a;const l=i.type;return"function"!=typeof l||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(l)||(a="Did you accidentally use a plain function component for an element instead?"),void 0!==a?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const At=yt(je.exports.element,Et);At.isRequired=yt(je.exports.element.isRequired,Et);var Ct=At;function kt(e){return"production"===process.env.NODE_ENV?e:bt({},e,{"exact-prop: ​":t=>{const r=Object.keys(t).filter((t=>!e.hasOwnProperty(t)));return r.length>0?new Error(`The following props are not supported: ${r.map((e=>`\`${e}\``)).join(", ")}. Please remove them.`):null}})}function Tt(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const Rt=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function St(e,t=""){return e.displayName||e.name||function(e){const t=`${e}`.match(Rt);return t&&t[1]||""}(e)||t}function Nt(e,t,r){const n=St(t);return e.displayName||(""!==n?`${r}(${n})`:r)}function Mt(e,t,r,n,o){if("production"===process.env.NODE_ENV)return null;const i=e[t],s=o||t;return null==i?null:i&&1!==i.nodeType?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an HTMLElement.`):null}var Ot=je.exports.oneOfType([je.exports.func,je.exports.object]);function It(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Tt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ft(...e){return e.reduce(((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)}),(()=>{}))}function jt(e){return e&&e.ownerDocument||document}function Lt(e){return jt(e).defaultView||window}function _t(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Wt="undefined"!=typeof window?u.useLayoutEffect:u.useEffect;function Pt(e){const t=u.useRef(e);return Wt((()=>{t.current=e})),u.useCallback(((...e)=>(0,t.current)(...e)),[])}function Dt(...e){return u.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{_t(e,t)}))}),e)}let Bt,Ut=!0,Vt=!1;const Zt={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ht(e){e.metaKey||e.altKey||e.ctrlKey||(Ut=!0)}function zt(){Ut=!1}function Yt(){"hidden"===this.visibilityState&&Vt&&(Ut=!0)}function Gt(){const e=u.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",Ht,!0),t.addEventListener("mousedown",zt,!0),t.addEventListener("pointerdown",zt,!0),t.addEventListener("touchstart",zt,!0),t.addEventListener("visibilitychange",Yt,!0))}),[]),t=u.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return Ut||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!Zt[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(Vt=!0,window.clearTimeout(Bt),Bt=window.setTimeout((()=>{Vt=!1}),100),t.current=!1,!0)},ref:e}}function Xt(e,t){const r=bt({},t);return Object.keys(e).forEach((n=>{if(n.toString().match(/^(components|slots)$/))r[n]=bt({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},i=t[n];r[n]={},i&&Object.keys(i)?o&&Object.keys(o)?(r[n]=bt({},i),Object.keys(o).forEach((e=>{r[n][e]=Xt(o[e],i[e])}))):r[n]=i:r[n]=o}else void 0===r[n]&&(r[n]=e[n])})),r}function Jt(e,t,r){const n={};return Object.keys(e).forEach((o=>{n[o]=e[o].reduce(((e,n)=>{if(n){const o=t(n);""!==o&&e.push(o),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}const qt=e=>e;var Qt=(()=>{let e=qt;return{configure(t){e=t},generate:t=>e(t),reset(){e=qt}}})();const Kt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function $t(e,t,r="Mui"){const n=Kt[t];return n?`${r}-${n}`:`${Qt.generate(e)}-${t}`}function er(e,t,r="Mui"){const n={};return t.forEach((t=>{n[t]=$t(e,t,r)})),n}function tr(e,t){return t?wt(e,t,{clone:!1}):e}const rr={xs:0,sm:600,md:900,lg:1200,xl:1536},nr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${rr[e]}px)`};function or(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const e=n.breakpoints||nr;return t.reduce(((n,o,i)=>(n[e.up(e.keys[i])]=r(t[i]),n)),{})}if("object"==typeof t){const e=n.breakpoints||nr;return Object.keys(t).reduce(((n,o)=>{if(-1!==Object.keys(e.values||rr).indexOf(o))n[e.up(o)]=r(t[o],o);else{const e=o;n[e]=t[e]}return n}),{})}return r(t)}function ir(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){const r=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=r)return r}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function sr(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:ir(e,r)||n,t&&(o=t(o)),o}function ar(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],s=ir(e.theme,n)||{};return or(e,i,(e=>{let n=sr(s,o,e);return e===n&&"string"==typeof e&&(n=sr(s,o,`${t}${"default"===e?"":It(e)}`,e)),!1===r?n:{[r]:n}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:gt}:{},i.filterProps=[t],i}function lr(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((r=>{e[r]=t})),e)),{}),r=e=>Object.keys(e).reduce(((r,n)=>t[n]?tr(r,t[n](e)):r),{});return r.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},r.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),r}const cr={m:"margin",p:"padding"},dr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ur={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pr=function(e){const t={};return e=>(void 0===t[e]&&(t[e]=(e=>{if(e.length>2){if(!ur[e])return[e];e=ur[e]}const[t,r]=e.split(""),n=cr[t],o=dr[r]||"";return Array.isArray(o)?o.map((e=>n+e)):[n+o]})(e)),t[e])}(),hr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],mr=[...hr,...fr];function gr(e,t,r,n){var o;const i=null!=(o=ir(e,t,!1))?o:r;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function yr(e){return gr(e,"spacing",8,"spacing")}function br(e,t){if("string"==typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"==typeof r?-r:`-${r}`}function vr(e){return function(e,t){const r=yr(e.theme);return Object.keys(e).map((n=>function(e,t,r,n){if(-1===t.indexOf(r))return null;const o=function(e,t){return r=>e.reduce(((e,n)=>(e[n]=br(t,r),e)),{})}(pr(r),n);return or(e,e[r],o)}(e,t,n,r))).reduce(tr,{})}(e,mr)}function xr(e){return"number"!=typeof e?e:`${e}px solid`}"production"===process.env.NODE_ENV||hr.reduce(((e,t)=>(e[t]=gt,e)),{}),"production"===process.env.NODE_ENV||fr.reduce(((e,t)=>(e[t]=gt,e)),{}),vr.propTypes="production"!==process.env.NODE_ENV?mr.reduce(((e,t)=>(e[t]=gt,e)),{}):{},vr.filterProps=mr;const wr=ar({prop:"border",themeKey:"borders",transform:xr}),Er=ar({prop:"borderTop",themeKey:"borders",transform:xr}),Ar=ar({prop:"borderRight",themeKey:"borders",transform:xr}),Cr=ar({prop:"borderBottom",themeKey:"borders",transform:xr}),kr=ar({prop:"borderLeft",themeKey:"borders",transform:xr}),Tr=ar({prop:"borderColor",themeKey:"palette"}),Rr=ar({prop:"borderTopColor",themeKey:"palette"}),Sr=ar({prop:"borderRightColor",themeKey:"palette"}),Nr=ar({prop:"borderBottomColor",themeKey:"palette"}),Mr=ar({prop:"borderLeftColor",themeKey:"palette"}),Or=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=gr(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:br(t,e)});return or(e,e.borderRadius,r)}return null};Or.propTypes="production"!==process.env.NODE_ENV?{borderRadius:gt}:{},Or.filterProps=["borderRadius"];var Ir=lr(wr,Er,Ar,Cr,kr,Tr,Rr,Sr,Nr,Mr,Or),Fr=lr(ar({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),ar({prop:"display"}),ar({prop:"overflow"}),ar({prop:"textOverflow"}),ar({prop:"visibility"}),ar({prop:"whiteSpace"})),jr=lr(ar({prop:"flexBasis"}),ar({prop:"flexDirection"}),ar({prop:"flexWrap"}),ar({prop:"justifyContent"}),ar({prop:"alignItems"}),ar({prop:"alignContent"}),ar({prop:"order"}),ar({prop:"flex"}),ar({prop:"flexGrow"}),ar({prop:"flexShrink"}),ar({prop:"alignSelf"}),ar({prop:"justifyItems"}),ar({prop:"justifySelf"}));const Lr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=gr(e.theme,"spacing",8,"gap"),r=e=>({gap:br(t,e)});return or(e,e.gap,r)}return null};Lr.propTypes="production"!==process.env.NODE_ENV?{gap:gt}:{},Lr.filterProps=["gap"];const _r=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=gr(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:br(t,e)});return or(e,e.columnGap,r)}return null};_r.propTypes="production"!==process.env.NODE_ENV?{columnGap:gt}:{},_r.filterProps=["columnGap"];const Wr=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=gr(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:br(t,e)});return or(e,e.rowGap,r)}return null};Wr.propTypes="production"!==process.env.NODE_ENV?{rowGap:gt}:{},Wr.filterProps=["rowGap"];var Pr=lr(Lr,_r,Wr,ar({prop:"gridColumn"}),ar({prop:"gridRow"}),ar({prop:"gridAutoFlow"}),ar({prop:"gridAutoColumns"}),ar({prop:"gridAutoRows"}),ar({prop:"gridTemplateColumns"}),ar({prop:"gridTemplateRows"}),ar({prop:"gridTemplateAreas"}),ar({prop:"gridArea"})),Dr=lr(ar({prop:"color",themeKey:"palette"}),ar({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),ar({prop:"backgroundColor",themeKey:"palette"})),Br=lr(ar({prop:"position"}),ar({prop:"zIndex",themeKey:"zIndex"}),ar({prop:"top"}),ar({prop:"right"}),ar({prop:"bottom"}),ar({prop:"left"})),Ur=ar({prop:"boxShadow",themeKey:"shadows"});function Vr(e){return e<=1&&0!==e?100*e+"%":e}const Zr=ar({prop:"width",transform:Vr}),Hr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n,o;return{maxWidth:(null==(r=e.theme)||null==(n=r.breakpoints)||null==(o=n.values)?void 0:o[t])||rr[t]||Vr(t)}};return or(e,e.maxWidth,t)}return null};Hr.filterProps=["maxWidth"];const zr=ar({prop:"minWidth",transform:Vr}),Yr=ar({prop:"height",transform:Vr}),Gr=ar({prop:"maxHeight",transform:Vr}),Xr=ar({prop:"minHeight",transform:Vr});ar({prop:"size",cssProperty:"width",transform:Vr}),ar({prop:"size",cssProperty:"height",transform:Vr});var Jr=lr(Zr,Hr,zr,Yr,Gr,Xr,ar({prop:"boxSizing"}));const qr=ar({prop:"fontFamily",themeKey:"typography"}),Qr=ar({prop:"fontSize",themeKey:"typography"}),Kr=ar({prop:"fontStyle",themeKey:"typography"}),$r=ar({prop:"fontWeight",themeKey:"typography"}),en=ar({prop:"letterSpacing"}),tn=ar({prop:"textTransform"}),rn=ar({prop:"lineHeight"}),nn=ar({prop:"textAlign"});var on=lr(ar({prop:"typography",cssProperty:!1,themeKey:"typography"}),qr,Qr,Kr,$r,en,rn,nn,tn);const sn={borders:Ir.filterProps,display:Fr.filterProps,flexbox:jr.filterProps,grid:Pr.filterProps,positions:Br.filterProps,palette:Dr.filterProps,shadows:Ur.filterProps,sizing:Jr.filterProps,spacing:vr.filterProps,typography:on.filterProps},an={borders:Ir,display:Fr,flexbox:jr,grid:Pr,positions:Br,palette:Dr,shadows:Ur,sizing:Jr,spacing:vr,typography:on},ln=Object.keys(sn).reduce(((e,t)=>(sn[t].forEach((r=>{e[r]=an[t]})),e)),{}),cn=function(e=an){const t=Object.keys(e).reduce(((t,r)=>(e[r].filterProps.forEach((n=>{t[n]=e[r]})),t)),{});function r(e,r,n){const o={[e]:r,theme:n},i=t[e];return i?i(o):{[e]:r}}return function e(n){const{sx:o,theme:i={}}=n||{};if(!o)return null;function s(n){let o=n;if("function"==typeof n)o=n(i);else if("object"!=typeof n)return n;if(!o)return null;const s=function(e={}){var t;return(null==e||null==(t=e.keys)?void 0:t.reduce(((t,r)=>(t[e.up(r)]={},t)),{}))||{}}(i.breakpoints),a=Object.keys(s);let l=s;return Object.keys(o).forEach((n=>{const s="function"==typeof(a=o[n])?a(i):a;var a;if(null!=s)if("object"==typeof s)if(t[n])l=tr(l,r(n,s,i));else{const t=or({theme:i},s,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),r=new Set(t);return e.every((e=>r.size===Object.keys(e).length))}(t,s)?l=tr(l,t):l[n]=e({sx:s,theme:i})}else l=tr(l,r(n,s,i))})),function(e,t){return e.reduce(((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}(a,l)}return Array.isArray(o)?o.map(s):s(o)}}();cn.filterProps=["sx"];var dn=cn;function un(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const pn=["sx"];function hn(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=hn(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function fn(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=hn(e))&&(n&&(n+=" "),n+=t);return n}const mn=["values","unit","step"];var gn={borderRadius:4};const yn=["breakpoints","palette","spacing","shape"];function bn(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=e,s=un(e,yn),a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=un(e,mn),i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>bt({},e,{[t.key]:t.val})),{})})(t),s=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function c(e,o){const i=s.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==i&&"number"==typeof t[s[i]]?t[s[i]]:o)-n/100}${r})`}return bt({keys:s,values:i,up:a,down:l,between:c,only:function(e){return s.indexOf(e)+1<s.length?c(e,s[s.indexOf(e)+1]):a(e)},not:function(e){const t=s.indexOf(e);return 0===t?a(s[1]):t===s.length-1?l(s[t]):c(e,s[s.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},o)}(r),l=function(e=8){if(e.mui)return e;const t=yr({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(o);let c=wt({breakpoints:a,direction:"ltr",components:{},palette:bt({mode:"light"},n),spacing:l,shape:bt({},gn,i)},s);return c=t.reduce(((e,t)=>wt(e,t)),c),c}const vn=u.createContext(null);"production"!==process.env.NODE_ENV&&(vn.displayName="ThemeContext");var xn=vn;function wn(){const e=u.useContext(xn);return"production"!==process.env.NODE_ENV&&u.useDebugValue(e),e}var En="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function An(e){const{children:t,theme:r}=e,n=wn();"production"!==process.env.NODE_ENV&&null===n&&"function"==typeof r&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join("\n"));const o=u.useMemo((()=>{const e=null===n?r:function(e,t){if("function"==typeof t){const r=t(e);return"production"!==process.env.NODE_ENV&&(r||console.error(["MUI: You should return an object from your theme function, i.e.","<ThemeProvider theme={() => ({})} />"].join("\n"))),r}return bt({},e,t)}(n,r);return null!=e&&(e[En]=null!==n),e}),[r,n]);return nt.exports.jsx(xn.Provider,{value:o,children:t})}function Cn(e=null){const t=wn();return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}"production"!==process.env.NODE_ENV&&(An.propTypes={children:je.exports.node,theme:je.exports.oneOfType([je.exports.object,je.exports.func]).isRequired}),"production"!==process.env.NODE_ENV&&"production"!==process.env.NODE_ENV&&(An.propTypes=kt(An.propTypes));const kn=bn();function Tn(e=kn){return Cn(e)}const Rn=["className","component"],Sn=function(e={}){const{defaultTheme:t,defaultClassName:r="MuiBox-root",generateClassName:n,styleFunctionSx:o=dn}=e,i=mt("div")(o);return u.forwardRef((function(e,o){const s=Tn(t),a=function(e){const{sx:t}=e,r=un(e,pn),{systemProps:n,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((r=>{ln[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t})(r);let i;return i=Array.isArray(t)?[n,...t]:"function"==typeof t?(...e)=>{const r=t(...e);return vt(r)?bt({},n,r):n}:bt({},n,t),bt({},o,{sx:i})}(e),{className:l,component:c="div"}=a,d=un(a,Rn);return nt.exports.jsx(i,bt({as:c,ref:o,className:fn(l,n?n(r):r),theme:s},d))}))}();"production"!==process.env.NODE_ENV&&(Sn.propTypes={children:je.exports.node,component:je.exports.elementType,sx:je.exports.oneOfType([je.exports.arrayOf(je.exports.oneOfType([je.exports.func,je.exports.object,je.exports.bool])),je.exports.func,je.exports.object])});var Nn=Sn;const Mn=["variant"];function On(e){return 0===e.length}function In(e){const{variant:t}=e,r=un(e,Mn);let n=t||"";return Object.keys(r).sort().forEach((t=>{n+="color"===t?On(n)?e[t]:It(e[t]):`${On(n)?t:It(t)}${It(e[t].toString())}`})),n}const Fn=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],jn=["theme"],Ln=["theme"];function _n(e){return 0===Object.keys(e).length}function Wn(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const Pn=bn(),Dn=function(e={}){const{defaultTheme:t=Pn,rootShouldForwardProp:r=Wn,slotShouldForwardProp:n=Wn,styleFunctionSx:o=dn}=e;return(e,i={})=>{const{name:s,slot:a,skipVariantsResolver:l,skipSx:c,overridesResolver:d}=i,u=un(i,Fn),p=void 0!==l?l:a&&"Root"!==a||!1,h=c||!1;let f;var m;"production"!==process.env.NODE_ENV&&s&&(f=`${s}-${m=a||"Root",m.charAt(0).toLowerCase()+m.slice(1)}`);let g=Wn;"Root"===a?g=r:a&&(g=n);const y=mt(e,bt({shouldForwardProp:g,label:f},u)),b=(r,...n)=>{const i=n?n.map((e=>"function"==typeof e&&e.__emotion_real!==e?r=>{let{theme:n}=r,o=un(r,jn);return e(bt({theme:_n(n)?t:n},o))}:e)):[];let l=r;s&&d&&i.push((e=>{const r=_n(e.theme)?t:e.theme,n=((e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null)(s,r);if(n){const t={};return Object.entries(n).forEach((([n,o])=>{t[n]="function"==typeof o?o(bt({},e,{theme:r})):o})),d(e,t)}return null})),s&&!p&&i.push((e=>{const r=_n(e.theme)?t:e.theme;return((e,t,r,n)=>{var o,i;const{ownerState:s={}}=e,a=[],l=null==r||null==(o=r.components)||null==(i=o[n])?void 0:i.variants;return l&&l.forEach((r=>{let n=!0;Object.keys(r.props).forEach((t=>{s[t]!==r.props[t]&&e[t]!==r.props[t]&&(n=!1)})),n&&a.push(t[In(r.props)])})),a})(e,((e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);const n={};return r.forEach((e=>{const t=In(e.props);n[t]=e.style})),n})(s,r),r,s)})),h||i.push((e=>{const r=_n(e.theme)?t:e.theme;return o(bt({},e,{theme:r}))}));const c=i.length-n.length;if(Array.isArray(r)&&c>0){const e=new Array(c).fill("");l=[...r,...e],l.raw=[...r.raw,...e]}else"function"==typeof r&&r.__emotion_real!==r&&(l=e=>{let{theme:n}=e,o=un(e,Ln);return r(bt({theme:_n(n)?t:n},o))});const u=y(l,...i);if("production"!==process.env.NODE_ENV){let t;s&&(t=`${s}${a||""}`),void 0===t&&(t=`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return St(e,"Component");if("object"==typeof e)switch(e.$$typeof){case dt.exports.ForwardRef:return Nt(e,e.render,"ForwardRef");case dt.exports.Memo:return Nt(e,e.type,"memo");default:return}}}(e)})`),u.displayName=t}return u};return y.withConfig&&(b.withConfig=y.withConfig),b}}();var Bn=Dn;function Un(e){const{theme:t,name:r,props:n}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?Xt(t.components[r].defaultProps,n):n}function Vn(e){if(e.type)return e;if("#"===e.charAt(0))return Vn(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?`rgb${4===r.length?"a":""}(${r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Tt(9,e));let n,o=e.substring(t+1,e.length-1);if("color"===r){if(o=o.split(" "),n=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${n}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Tt(10,n))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:r,values:o,colorSpace:n}}function Zn(e,t){return e=Vn(e),t=function(e,t=0,r=1){return"production"!==process.env.NODE_ENV&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),Math.min(Math.max(t,e),r)}(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}(e)}function Hn(e){const t=Tn();return nt.exports.jsx(k.Provider,{value:"object"==typeof t?t:{},children:e.children})}function zn(e){const{children:t,theme:r}=e;return nt.exports.jsx(An,{theme:r,children:nt.exports.jsx(Hn,{children:t})})}"production"!==process.env.NODE_ENV&&(Hn.propTypes={children:je.exports.node}),"production"!==process.env.NODE_ENV&&(zn.propTypes={children:je.exports.node,theme:je.exports.oneOfType([je.exports.func,je.exports.object]).isRequired}),"production"!==process.env.NODE_ENV&&"production"!==process.env.NODE_ENV&&(zn.propTypes=kt(zn.propTypes));var Yn=function(){return Yn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yn.apply(this,arguments)};function Gn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function Xn(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function Jn(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function qn(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Qn={mode:"dark",primary:{main:"#FFE804"},secondary:{main:"#FFE804",contrastText:"#1A1A1B"},error:{main:"#FF6187",contrastText:"#FFFFFF"},warning:{main:"#EB8D27",contrastText:"#1A1A1B"},success:{main:"#55F9C7",contrastText:"#1A1A1B"},purple:{main:"#BC9CFF",contrastText:"#1A1A1B"},background:{default:"#252831",paper:"#33363F",paperContrast:"#41454F",backdrop:Zn("#000",.9),input:"#252831",tag:Zn("#FFF",.04)},text:{primary:"#FFF",secondary:Zn("#FFF",.5),disabled:Zn("#FFF",.3),placeholder:Zn("#FFF",.3),link:"#FFE804"},border:{main:"#454851",light:Zn("#FFF",.3),disabled:Zn("#FFF",.1)},hover:{default:Zn("#FFF",.1)}},Kn={mode:"light",primary:{main:"#1A1A1B"},secondary:{main:"#FFE804",contrastText:"#1A1A1B"},error:{main:"#EC5A7D",contrastText:"#FFFFFF"},warning:{main:"#B15600",contrastText:"#1A1A1B"},success:{main:"#2FBA90",contrastText:"#1A1A1B"},purple:{main:"#6851B4",contrastText:"#1A1A1B"},background:{default:"#F9F6E8",paper:"#FFFFFF",paperContrast:"#F6F6F6",backdrop:Zn("#000",.9),input:"#F0F0F0",tag:Zn("#1A1A1B",.04)},text:{primary:"#1A1A1B",secondary:Zn("#1A1A1B",.5),disabled:Zn("#1A1A1B",.3),placeholder:Zn("#1A1A1B",.3),link:"#1A1A1B"},border:{main:Zn("#454851",.1),light:Zn("#1A1A1B",.3),disabled:Zn("#1A1A1B",.1)},hover:{default:Zn("#1A1A1B",.1)}},$n=function(e,t,r){var n,o,i,a="light"===e,l=r?["zh-CN","ja-JP","ko-KR"].includes(r)?400:500:400,c=a?Kn:Qn;(null===(n=null==t?void 0:t.palette)||void 0===n?void 0:n.mode)===e&&(c=t.palette);var d={spacing:1,shape:{borderRadius:1},breakpoints:{values:{mobile:0,tablet:768,laptop:1024,desktop:1200,largeDesktop:1536}},typography:{fontFamily:Jn(Jn(["Manrope"],Xn("ja-JP"===r?["Meiryo"]:[]),!1),["Poppins","Inter","PingFangSC-Regular",'"Microsoft YaHei"',"sans-serif"],!1).join(","),fontSize:16,h1:{fontSize:36,lineHeight:"49px",fontWeight:600},h2:{fontSize:32,fontWeight:600,lineHeight:"44px"},h3:{fontSize:28,fontWeight:600,lineHeight:"38px"},caption:{fontSize:20,fontWeight:600,lineHeight:"28px"},h5:{fontSize:18,lineHeight:"24px",fontWeight:600},body1:{fontSize:16,lineHeight:"22px",fontWeight:l},body2:{fontSize:14,lineHeight:"19px",fontWeight:l},h6:{fontSize:12,lineHeight:"17px",fontWeight:l},button:{fontSize:16,lineHeight:1,fontWeight:600}},components:{MuiCssBaseline:{styleOverrides:{"::-webkit-scrollbar":{width:6,backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{backgroundColor:null===(o=c.border)||void 0===o?void 0:o.main,borderColor:null===(i=c.border)||void 0===i?void 0:i.main,borderRadius:100}}},MuiTypography:{defaultProps:{variantMapping:{h1:"h2",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"div",caption:"h5",subtitle1:"h5",subtitle2:"h5",body1:"div",body2:"div"}}}},zIndex:{tooltip:1500}};return Yn(Yn({},s(d,t)),{palette:c})};var eo=function(e,t){var r;return Yn({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&{colorScheme:null===(r=e.palette)||void 0===r?void 0:r.mode})},to=function(e){var t,r,n;return Yn({color:null===(t=e.palette)||void 0===t?void 0:t.text.primary,fontFamily:null===(r=e.typography)||void 0===r?void 0:r.fontFamily},(null===(n=e.typography)||void 0===n?void 0:n.body1)||{})},ro=function(e){var t;return Yn(Yn({},to(e)),{backgroundColor:null===(t=e.palette)||void 0===t?void 0:t.background.default,"@media print":{backgroundColor:"#FFF"}})};function no(e){var t=e.styles,r=function({props:e,name:t,defaultTheme:r}){return Un({theme:Tn(r),name:t,props:e})}({props:Gn(e,["styles"]),name:"DODOCssBaseline"}),n=r.children,o=r.enableColorScheme,i=void 0!==o&&o,s=r.container;return nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(ft,{styles:function(e){return function(e,t,r,n){var o,i,s,a,l,c;void 0===t&&(t=!1);var d={html:eo(e,t),"*, *::before, *::after":{boxSizing:"border-box"},"strong, b":{fontWeight:(null===(s=e.typography)||void 0===s?void 0:s.fontWeightBold)||"bolder"},body:Yn(Yn({margin:0},ro(e)),{"&::backdrop":{backgroundColor:null===(a=e.palette)||void 0===a?void 0:a.background.default}})};r&&(delete d.html,delete d.body,(o={})[r]=Yn(Yn({},d),to(e)),d=o);var u=null===(c=null===(l=e.components)||void 0===l?void 0:l.MuiCssBaseline)||void 0===c?void 0:c.styleOverrides;if(u){if(r){var p={};Object.keys(u).forEach((function(e){p["*"+e]=u[e]})),(i={})[r]=p,u=i}d=[d,u,n]}else d=[d,n];return d}(e,i,s,t)}}),n]})}function oo(e){return $t("MuiButton",e)}function io(e,t=[]){if(void 0===e)return{};const r={};return Object.keys(e).filter((r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r))).forEach((t=>{r[t]=e[t]})),r}function so(e){return"string"==typeof e}er("MuiButton",["root","active","disabled","focusVisible"]);const ao={disableDefaultClasses:!1},lo=u.createContext(ao);function co(e){const{disableDefaultClasses:t}=u.useContext(lo);return r=>t?"":e(r)}function uo(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((r=>{t[r]=e[r]})),t}const po=["elementType","externalSlotProps","ownerState"];function ho(e){var t;const{elementType:r,externalSlotProps:n,ownerState:o}=e,i=un(e,po),s=function(e,t){return"function"==typeof e?e(t):e}(n,o),{props:a,internalRef:l}=function(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:i}=e;if(!t){const e=fn(null==o?void 0:o.className,null==n?void 0:n.className,i,null==r?void 0:r.className),t=bt({},null==r?void 0:r.style,null==o?void 0:o.style,null==n?void 0:n.style),s=bt({},r,o,n);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}const s=io(bt({},o,n)),a=uo(n),l=uo(o),c=t(s),d=fn(null==c?void 0:c.className,null==r?void 0:r.className,i,null==o?void 0:o.className,null==n?void 0:n.className),u=bt({},null==c?void 0:c.style,null==r?void 0:r.style,null==o?void 0:o.style,null==n?void 0:n.style),p=bt({},c,r,l,a);return d.length>0&&(p.className=d),Object.keys(u).length>0&&(p.style=u),{props:p,internalRef:c.ref}}(bt({},i,{externalSlotProps:s})),c=function(e,t,r){return void 0===e||so(e)?t:bt({},t,{ownerState:bt({},t.ownerState,r)})}(r,bt({},a,{ref:Dt(l,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref)}),o);return c}const fo=["action","children","disabled","focusableWhenDisabled","onFocusVisible","slotProps","slots"],mo=u.forwardRef((function(e,t){var r;const{action:n,children:o,focusableWhenDisabled:i=!1,slotProps:s={},slots:a={}}=e,l=un(e,fo),c=u.useRef(),{active:d,focusVisible:p,setFocusVisible:h,getRootProps:f}=function(e={}){const{disabled:t=!1,focusableWhenDisabled:r,href:n,rootRef:o,tabIndex:i,to:s,type:a}=e,l=u.useRef(),[c,d]=u.useState(!1),{isFocusVisibleRef:p,onFocus:h,onBlur:f,ref:m}=Gt(),[g,y]=u.useState(!1);t&&!r&&g&&y(!1),u.useEffect((()=>{p.current=g}),[g,p]);const[b,v]=u.useState(""),x=e=>t=>{var r;g&&t.preventDefault(),null==(r=e.onMouseLeave)||r.call(e,t)},w=e=>t=>{var r;f(t),!1===p.current&&y(!1),null==(r=e.onBlur)||r.call(e,t)},E=e=>t=>{var r,n;l.current||(l.current=t.currentTarget),h(t),!0===p.current&&(y(!0),null==(n=e.onFocusVisible)||n.call(e,t)),null==(r=e.onFocus)||r.call(e,t)},A=()=>{const e=l.current;return"BUTTON"===b||"INPUT"===b&&["button","submit","reset"].includes(null==e?void 0:e.type)||"A"===b&&(null==e?void 0:e.href)},C=e=>r=>{var n;t||null==(n=e.onClick)||n.call(e,r)},k=e=>r=>{var n;t||(d(!0),document.addEventListener("mouseup",(()=>{d(!1)}),{once:!0})),null==(n=e.onMouseDown)||n.call(e,r)},T=e=>r=>{var n,o;null==(n=e.onKeyDown)||n.call(e,r),r.defaultMuiPrevented||(r.target!==r.currentTarget||A()||" "!==r.key||r.preventDefault(),r.target!==r.currentTarget||" "!==r.key||t||d(!0),r.target!==r.currentTarget||A()||"Enter"!==r.key||t||(null==(o=e.onClick)||o.call(e,r),r.preventDefault()))},R=e=>r=>{var n,o;r.target===r.currentTarget&&d(!1),null==(n=e.onKeyUp)||n.call(e,r),r.target!==r.currentTarget||A()||t||" "!==r.key||r.defaultMuiPrevented||null==(o=e.onClick)||o.call(e,r)},S=Dt(u.useCallback((e=>{var t;v(null!=(t=null==e?void 0:e.tagName)?t:"")}),[]),o,m,l),N={};return"BUTTON"===b?(N.type=null!=a?a:"button",r?N["aria-disabled"]=t:N.disabled=t):""!==b&&(n||s||(N.role="button",N.tabIndex=null!=i?i:0),t&&(N["aria-disabled"]=t,N.tabIndex=r?null!=i?i:0:-1)),{getRootProps:(t={})=>{const r=bt({},io(e),t);return delete r.onFocusVisible,bt({type:a},r,N,{onBlur:w(r),onClick:C(r),onFocus:E(r),onKeyDown:T(r),onKeyUp:R(r),onMouseDown:k(r),onMouseLeave:x(r),ref:S})},focusVisible:g,setFocusVisible:y,active:c,rootRef:S}}(bt({},e,{focusableWhenDisabled:i}));u.useImperativeHandle(n,(()=>({focusVisible:()=>{h(!0),c.current.focus()}})),[h]);const m=bt({},e,{active:d,focusableWhenDisabled:i,focusVisible:p}),g=(e=>{const{active:t,disabled:r,focusVisible:n}=e;return Jt({root:["root",r&&"disabled",n&&"focusVisible",t&&"active"]},co(oo))})(m),y=l.href||l.to?"a":"button",b=null!=(r=a.root)?r:y,v=ho({elementType:b,getSlotProps:f,externalForwardedProps:l,externalSlotProps:s.root,additionalProps:{ref:t},ownerState:m,className:g.root});return nt.exports.jsx(b,bt({},v,{children:o}))}));"production"!==process.env.NODE_ENV&&(mo.propTypes={action:je.exports.oneOfType([je.exports.func,je.exports.shape({current:je.exports.shape({focusVisible:je.exports.func.isRequired})})]),children:je.exports.node,disabled:je.exports.bool,focusableWhenDisabled:je.exports.bool,href:je.exports.string,onFocusVisible:je.exports.func,slotProps:je.exports.shape({root:je.exports.oneOfType([je.exports.func,je.exports.object])}),slots:je.exports.shape({root:je.exports.elementType}),to:je.exports.string});var go,yo,bo,vo=mo;(bo=go||(go={})).contained="contained",bo.outlined="outlined",bo.dashed="dashed",bo.second="second",bo.tag="tag",function(e){e.small="small",e.middle="middle",e.big="big"}(yo||(yo={}));var xo=function(e,t){var r,n,o,i,a,l=e.fullWidth,c=e.variant,d=e.sx,u=e.danger,p={px:16,py:10,typography:"button",whiteSpace:"nowrap",fontFamily:"inherit",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&[disabled]":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}};switch(e.size){case yo.small:p.height=36,p.borderRadius=8,p.typography="body2";break;case yo.big:p.height=60,p.borderRadius=16;break;default:p.height=48,p.borderRadius=8}l&&(p.display="flex",p.width="100%");var h="&:not([disabled]):hover, &:focus-visible";switch(c){case go.outlined:p=Yn(Yn({},p),((r={border:"solid 1px ".concat(u?t.palette.error.main:t.palette.primary.main),color:u?"error.main":"primary.main","&[disabled]":{color:"text.disabled",borderColor:"border.disabled"}})[h]={background:Zn(u?t.palette.error.main:t.palette.primary.main,.1)},r));break;case go.dashed:p=Yn(Yn({},p),((n={height:p.height-1,border:"dashed 1px ".concat(u?t.palette.error.main:t.palette.border.light),color:u?"error.main":"primary.main","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[h]={background:Zn(u?t.palette.error.main:t.palette.border.disabled,.1)},n));break;case go.second:p=Yn(Yn({},p),((o={backgroundColor:u?"error.main":t.palette.background.tag,border:"none",color:u?"error.contrastText":"text.primary","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[h]={background:u?Zn(t.palette.error.main,.1):Zn(t.palette.border.disabled,.2)},o));break;case go.tag:p=Yn(Yn({},p),((i={px:10,py:3,height:"auto",borderRadius:4,typography:"body2",backgroundColor:u?"error.main":"background.tag",border:"none",color:u?"error.contrastText":"primary.main","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[h]={background:u?Zn(t.palette.error.main,.1):Zn(t.palette.border.disabled,.2)},i));break;default:p=Yn(Yn({},p),((a={backgroundColor:u?"error.main":"secondary.main"})[h]={background:"linear-gradient(0deg, rgba(26, 26, 27, 0.1), rgba(26, 26, 27, 0.1)), ".concat(u?t.palette.error.main:(null==d?void 0:d.backgroundColor)||t.palette.secondary.main)},a.color=u?"error.contrastText":"secondary.contrastText",a["&[disabled]"]={backgroundColor:"border.disabled",color:"text.disabled"},a))}return s(p,d)},wo=function(e){var t=e.onClick,r=e.disabled,n=e.children,o=e.component,i=e.to,s=e.isLoading,a=e.fullWidth,l=e.variant,c=e.sx,d=e.danger,u=e.size;e.ref;var p=Gn(e,["onClick","disabled","children","component","to","isLoading","fullWidth","variant","sx","danger","size","ref"]),h=Tn(),f={disabled:r,sx:xo({fullWidth:a,variant:l,sx:c,danger:d,size:u},h),onClick:t,component:o,to:i};return nt.exports.jsx(Nn,Yn({},f,p,{component:vo,disabled:!!s||r,className:l||go.contained},{children:nt.exports.jsxs(nt.exports.Fragment,{children:[s&&nt.exports.jsx(Nn,{component:R,sx:{mr:8,"& path":{fill:h.palette.text.disabled},animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}}}),n]})}))};wo.Variant=go,wo.Size=yo;var Eo,Ao=Bn(vo)(Eo||(Eo=qn(["\n margin: 0;\n border: none;\n padding: 0;\n cursor: pointer;\n background: none;\n font-family: inherit;\n &:focus {\n outline: none;\n }\n &:active {\n outline: none;\n }\n"],["\n margin: 0;\n border: none;\n padding: 0;\n cursor: pointer;\n background: none;\n font-family: inherit;\n &:focus {\n outline: none;\n }\n &:active {\n outline: none;\n }\n"])));function Co(e){return $t("MuiInput",e)}var ko=er("MuiInput",["root","formControl","focused","disabled","error","multiline","input","inputMultiline","inputTypeSearch","adornedStart","adornedEnd"]);const To=u.createContext(void 0);"production"!==process.env.NODE_ENV&&(To.displayName="FormControlContext");var Ro=To;function So(e){const{defaultValue:t,disabled:r=!1,error:n=!1,onBlur:o,onChange:i,onFocus:s,required:a=!1,value:l,inputRef:c}=e,d=u.useContext(Ro);let p,h,f,m,g;var y,b,v;if(d){if(p=void 0,h=null!=(y=d.disabled)&&y,f=null!=(b=d.error)&&b,m=null!=(v=d.required)&&v,g=d.value,"production"!==process.env.NODE_ENV){const t=["defaultValue","disabled","error","required","value"].filter((t=>void 0!==e[t]));t.length>0&&console.warn(["MUI: You have set props on an input that is inside a FormControl.","Set these props on a FormControl instead. Otherwise they will be ignored.",`Ignored props: ${t.join(", ")}`].join("\n"))}}else p=t,h=r,f=n,m=a,g=l;const{current:x}=u.useRef(null!=g),w=u.useCallback((e=>{"production"!==process.env.NODE_ENV&&e&&"INPUT"!==e.nodeName&&!e.focus&&console.error(["MUI: You have provided a `slots.input` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join("\n"))}),[]),E=u.useRef(null),A=Dt(E,c,w),[C,k]=u.useState(!1);u.useEffect((()=>{!d&&h&&C&&(k(!1),null==o||o())}),[d,h,C,o]);const T=e=>t=>{var r,n;null!=d&&d.disabled?t.stopPropagation():(null==(r=e.onFocus)||r.call(e,t),d&&d.onFocus?null==d||null==(n=d.onFocus)||n.call(d):k(!0))},R=e=>(t,...r)=>{var n,o;if(!x&&null==(t.target||E.current))throw new Error("production"!==process.env.NODE_ENV?"MUI: Expected valid input target. Did you use a custom `slots.input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Tt(17));null==d||null==(n=d.onChange)||n.call(d,t),null==(o=e.onChange)||o.call(e,t,...r)};return{disabled:h,error:f,focused:C,formControlContext:d,getInputProps:(e={})=>{const t=bt({},{onBlur:o,onChange:i,onFocus:s},io(e)),r=bt({},e,t,{onBlur:(n=t,e=>{var t;null==(t=n.onBlur)||t.call(n,e),d&&d.onBlur?d.onBlur():k(!1)}),onChange:R(t),onFocus:T(t)});var n;return bt({},r,{"aria-invalid":f||void 0,defaultValue:p,ref:A,value:g,required:m,disabled:h})},getRootProps:(t={})=>{const r=bt({},io(e,["onBlur","onChange","onFocus"]),io(t));return bt({},t,r,{onClick:(n=r,e=>{var t;E.current&&e.currentTarget===e.target&&E.current.focus(),null==(t=n.onClick)||t.call(n,e)})});var n},inputRef:A,required:m,value:g}}const No=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","endAdornment","error","id","multiline","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","startAdornment","value","type","rows","slotProps","slots","minRows","maxRows"],Mo=u.forwardRef((function(e,t){var r,n,o;const{"aria-describedby":i,"aria-label":s,"aria-labelledby":a,autoComplete:l,autoFocus:c,className:d,defaultValue:u,disabled:p,endAdornment:h,error:f,id:m,multiline:g=!1,name:y,onClick:b,onChange:v,onKeyDown:x,onKeyUp:w,onFocus:E,onBlur:A,placeholder:C,readOnly:k,required:T,startAdornment:R,value:S,type:N,rows:M,slotProps:O={},slots:I={},minRows:F,maxRows:j}=e,L=un(e,No),{getRootProps:_,getInputProps:W,focused:P,formControlContext:D,error:B,disabled:U}=So({disabled:p,defaultValue:u,error:f,onBlur:A,onClick:b,onChange:v,onFocus:E,required:T,value:S}),V=g?void 0:null!=N?N:"text",Z=bt({},e,{disabled:U,error:B,focused:P,formControlContext:D,multiline:g,type:V}),H=(e=>{const{disabled:t,error:r,focused:n,formControlContext:o,multiline:i,startAdornment:s,endAdornment:a}=e;return Jt({root:["root",t&&"disabled",r&&"error",n&&"focused",Boolean(o)&&"formControl",i&&"multiline",Boolean(s)&&"adornedStart",Boolean(a)&&"adornedEnd"],input:["input",t&&"disabled",i&&"multiline"]},co(Co))})(Z),z={"aria-describedby":i,"aria-label":s,"aria-labelledby":a,autoComplete:l,autoFocus:c,id:m,onKeyDown:x,onKeyUp:w,name:y,placeholder:C,readOnly:k,type:V},Y=null!=(r=I.root)?r:"div",G=ho({elementType:Y,getSlotProps:_,externalSlotProps:O.root,externalForwardedProps:L,additionalProps:{ref:t},ownerState:Z,className:[H.root,d]}),X=g?null!=(n=I.textarea)?n:"textarea":null!=(o=I.input)?o:"input",J=ho({elementType:X,getSlotProps:e=>W(bt({},z,e)),externalSlotProps:O.input,additionalProps:bt({rows:g?M:void 0},g&&!so(X)&&{minRows:M||F,maxRows:M||j}),ownerState:Z,className:H.input});return"production"!==process.env.NODE_ENV&&g&&M&&(F||j)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),nt.exports.jsxs(Y,bt({},G,{children:[R,nt.exports.jsx(X,bt({},J)),h]}))}));"production"!==process.env.NODE_ENV&&(Mo.propTypes={"aria-describedby":je.exports.string,"aria-label":je.exports.string,"aria-labelledby":je.exports.string,autoComplete:je.exports.string,autoFocus:je.exports.bool,className:je.exports.string,defaultValue:je.exports.any,disabled:je.exports.bool,endAdornment:je.exports.node,error:je.exports.bool,id:je.exports.string,inputRef:je.exports.oneOfType([je.exports.func,je.exports.shape({current:je.exports.object})]),maxRows:je.exports.number,minRows:je.exports.number,multiline:je.exports.bool,name:je.exports.string,onBlur:je.exports.func,onChange:je.exports.func,onClick:je.exports.func,onFocus:je.exports.func,onKeyDown:je.exports.func,onKeyUp:je.exports.func,placeholder:je.exports.string,readOnly:je.exports.bool,required:je.exports.bool,rows:je.exports.number,slotProps:je.exports.shape({input:je.exports.oneOfType([je.exports.func,je.exports.object]),root:je.exports.oneOfType([je.exports.func,je.exports.object])}),slots:je.exports.shape({input:je.exports.elementType,root:je.exports.elementType,textarea:je.exports.elementType}),startAdornment:je.exports.node,type:je.exports.oneOf(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"]),value:je.exports.any});var Oo=Mo;function Io(e){var t,r,n=e.fullWidth,o=e.height,i=e.suffixGap,a=e.error,l=e.sx,c=Gn(e,["fullWidth","height","suffixGap","error","sx"]);return nt.exports.jsx(Nn,Yn({component:"div",sx:s(Yn(Yn(Yn((t={position:"relative",display:n?"flex":"inline-flex",alignItems:"center",border:"1px solid",borderColor:a?"error.main":"border.main",borderRadius:8,backgroundColor:"background.input"},t["&.".concat(ko.disabled)]={color:"text.disabled",cursor:"default"},t.height=o,t),n&&{width:"100%"}),{"& > *:not(input):not(.MuiSelect-select):first-of-type":{ml:i,whiteSpace:"nowrap"},"& > *:not(input):last-child":{mr:i,whiteSpace:"nowrap"}}),a?{}:(r={},r["&.".concat(ko.focused)]={borderColor:"text.secondary"},r)),l)},c))}var Fo=Bn(Nn)((function(e){var t=e.theme,r="{\n color: ".concat(t.palette.text.placeholder,";\n font-size: 14px;\n font-weight: 500;\n opacity: 1;\n }");return"\n font: inherit;\n font-size: 16px;\n font-weight: 600;\n line-height: 19px;\n padding: ".concat(t.spacing(14,16),";\n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n }\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }\n height: 100%;\n width: 100%;\n border: none;\n color: ").concat(t.palette.text.primary,";\n background-color: transparent;\n &::-webkit-input-placeholder ").concat(r,";\n &::-moz-placeholder ").concat(r,";\n &:-ms-input-placeholder ").concat(r,";\n &::-ms-input-placeholder ").concat(r,";\n &:focus {\n outline: 0;\n }\n &:invalid {\n box-shadow: none;\n }\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n &.").concat(ko.disabled," {\n opacity: 1;\n -webkit-text-fill-color: ").concat(t.palette.text.disabled,";\n }\n ")})),jo=h((function(e,t){var r=e.fullWidth,n=e.error,o=e.errorMsg,i=e.sx,s=e.suffix,a=e.prefix,l=e.height,c=e.suffixGap,d=void 0===c?16:c,u=e.dataTestId,p=e.inputSx,h=Gn(e,["fullWidth","error","errorMsg","sx","suffix","prefix","height","suffixGap","dataTestId","inputSx"]),f=y((function(e){return nt.exports.jsx(Io,Yn({fullWidth:r,height:l,suffixGap:d,error:n,sx:i,"data-testid":u},e))}),[r,l,d,n,u,JSON.stringify(i)]);return nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Oo,Yn({slots:{root:f,input:Fo},startAdornment:a,endAdornment:s,slotProps:{input:{component:"input",sx:p}}},h,{ref:t})),o?nt.exports.jsx(Nn,Yn({sx:{typography:"body2",color:"error.main",mt:6}},{children:o})):""]})})),Lo=h((function(e,t){var r=e.weak,n=e.color,o=e.sx,i=Gn(e,["weak","color","sx"]),a=r?"text.primary":"text.secondary",l=r?"text.secondary":"text.primary";return n&&(a=n,l=n),nt.exports.jsx(Nn,Yn({ref:t,sx:s(Yn({color:a,opacity:n&&!r?.5:1},{"&:hover":{color:l,opacity:n&&r?.5:1}}),o)},i))}));function _o(e){var t=e.clearValue,r=e.hideSearchIcon,n=e.height,o=void 0===n?48:n,i=e.inputSx,a=Gn(e,["clearValue","hideSearchIcon","height","inputSx"]),l=Tn(),c=a.value;return nt.exports.jsx(jo,Yn({prefix:r?null:nt.exports.jsx(M,{style:{width:24,minWidth:24,height:24,color:l.palette.text.placeholder}}),suffix:c&&t?nt.exports.jsx(Lo,Yn({sx:{width:24,minWidth:24,height:24,mr:12,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",backgroundColor:"background.tag",cursor:"pointer"},onClick:t},{children:nt.exports.jsx(Nn,{component:O,sx:{width:14,height:14}})})):null},a,{inputSx:s({pl:4},i),height:o}))}var Wo=function(e){var t=e.sx,r=Tn();return nt.exports.jsx(Nn,{sx:Yn({width:20,color:r.palette.primary.main,animation:"spin 3s linear infinite","@keyframes spin":{"100%":{transform:"rotate(360deg)"}}},t),component:R})},Po=u.forwardRef((function(e,t){var r=e.sx,n=e.variant,o=e.width,i=e.height,s=Gn(e,["sx","variant","width","height"]),a=n||"rounded",l="circular"===a?null!=i?i:o:null!=i?i:"1.2rem",c="circular"===a?"50%":4,d=Tn();return nt.exports.jsx(Nn,Yn({ref:t},s,{sx:Yn({width:o,height:l,backgroundColor:Zn(d.palette.text.primary,"light"===d.palette.mode?.11:.13),borderRadius:c,animation:"pulseKeyframe 2s ease-in-out 0.5s infinite","@keyframes pulseKeyframe":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}},r)}))})),Do=h((function(e,t){var r,n=e.loading,o=e.loadingSx,i=e.loadingProps,a=e.children,l=Gn(e,["loading","loadingSx","loadingProps","children"]);return nt.exports.jsx(Nn,Yn({ref:t},l,{children:n?nt.exports.jsx(Po,Yn({height:"fit-content",width:null!==(r=null==o?void 0:o.width)&&void 0!==r?r:"100%"},i,{sx:s({borderRadius:4},o,null==i?void 0:i.sx)},{children:nt.exports.jsx(Nn,Yn({sx:{visibility:"hidden"}},{children:"1"}))})):a}))}));function Bo(e){return e.substring(2).toLowerCase()}function Uo(e){const{children:t,disableReactTree:r=!1,mouseEvent:n="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,s=u.useRef(!1),a=u.useRef(null),l=u.useRef(!1),c=u.useRef(!1);u.useEffect((()=>(setTimeout((()=>{l.current=!0}),0),()=>{l.current=!1})),[]);const d=Dt(t.ref,a),p=Pt((e=>{const t=c.current;c.current=!1;const n=jt(a.current);if(!l.current||!a.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,n))return;if(s.current)return void(s.current=!1);let i;i=e.composedPath?e.composedPath().indexOf(a.current)>-1:!n.documentElement.contains(e.target)||a.current.contains(e.target),i||!r&&t||o(e)})),h=e=>r=>{c.current=!0;const n=t.props[e];n&&n(r)},f={ref:d};return!1!==i&&(f[i]=h(i)),u.useEffect((()=>{if(!1!==i){const e=Bo(i),t=jt(a.current),r=()=>{s.current=!0};return t.addEventListener(e,p),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,p),t.removeEventListener("touchmove",r)}}}),[p,i]),!1!==n&&(f[n]=h(n)),u.useEffect((()=>{if(!1!==n){const e=Bo(n),t=jt(a.current);return t.addEventListener(e,p),()=>{t.removeEventListener(e,p)}}}),[p,n]),nt.exports.jsx(u.Fragment,{children:u.cloneElement(t,f)})}"production"!==process.env.NODE_ENV&&(Uo.propTypes={children:Ct.isRequired,disableReactTree:je.exports.bool,mouseEvent:je.exports.oneOf(["onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp",!1]),onClickAway:je.exports.func.isRequired,touchEvent:je.exports.oneOf(["onTouchEnd","onTouchStart",!1])}),"production"!==process.env.NODE_ENV&&(Uo.propTypes=kt(Uo.propTypes));var Vo="top",Zo="bottom",Ho="right",zo="left",Yo=[Vo,Zo,Ho,zo],Go=Yo.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),Xo=[].concat(Yo,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),Jo=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function qo(e){return e?(e.nodeName||"").toLowerCase():null}function Qo(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ko(e){return e instanceof Qo(e).Element||e instanceof Element}function $o(e){return e instanceof Qo(e).HTMLElement||e instanceof HTMLElement}function ei(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Qo(e).ShadowRoot||e instanceof ShadowRoot)}var ti={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];$o(o)&&qo(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});$o(n)&&qo(n)&&(Object.assign(n.style,i),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function ri(e){return e.split("-")[0]}var ni=Math.max,oi=Math.min,ii=Math.round;function si(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function ai(){return!/^((?!chrome|android).)*safari/i.test(si())}function li(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&$o(e)&&(o=e.offsetWidth>0&&ii(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&ii(n.height)/e.offsetHeight||1);var s=(Ko(e)?Qo(e):window).visualViewport,a=!ai()&&r,l=(n.left+(a&&s?s.offsetLeft:0))/o,c=(n.top+(a&&s?s.offsetTop:0))/i,d=n.width/o,u=n.height/i;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function ci(e){var t=li(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function di(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&ei(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ui(e){return Qo(e).getComputedStyle(e)}function pi(e){return["table","td","th"].indexOf(qo(e))>=0}function hi(e){return((Ko(e)?e.ownerDocument:e.document)||window.document).documentElement}function fi(e){return"html"===qo(e)?e:e.assignedSlot||e.parentNode||(ei(e)?e.host:null)||hi(e)}function mi(e){return $o(e)&&"fixed"!==ui(e).position?e.offsetParent:null}function gi(e){for(var t=Qo(e),r=mi(e);r&&pi(r)&&"static"===ui(r).position;)r=mi(r);return r&&("html"===qo(r)||"body"===qo(r)&&"static"===ui(r).position)?t:r||function(e){var t=/firefox/i.test(si());if(/Trident/i.test(si())&&$o(e)&&"fixed"===ui(e).position)return null;var r=fi(e);for(ei(r)&&(r=r.host);$o(r)&&["html","body"].indexOf(qo(r))<0;){var n=ui(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}function yi(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function bi(e,t,r){return ni(e,oi(t,r))}function vi(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function xi(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}var wi={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,a=ri(r.placement),l=yi(a),c=[zo,Ho].indexOf(a)>=0?"height":"width";if(i&&s){var d=function(e,t){return vi("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:xi(e,Yo))}(o.padding,r),u=ci(i),p="y"===l?Vo:zo,h="y"===l?Zo:Ho,f=r.rects.reference[c]+r.rects.reference[l]-s[l]-r.rects.popper[c],m=s[l]-r.rects.reference[l],g=gi(i),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=f/2-m/2,v=d[p],x=y-u[c]-d[h],w=y/2-u[c]/2+b,E=bi(v,w,x),A=l;r.modifiersData[n]=((t={})[A]=E,t.centerOffset=E-w,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&di(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ei(e){return e.split("-")[1]}var Ai={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ci(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,p=s.x,h=void 0===p?0:p,f=s.y,m=void 0===f?0:f,g="function"==typeof d?d({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),v=zo,x=Vo,w=window;if(c){var E=gi(r),A="clientHeight",C="clientWidth";E===Qo(r)&&"static"!==ui(E=hi(r)).position&&"absolute"===a&&(A="scrollHeight",C="scrollWidth"),(o===Vo||(o===zo||o===Ho)&&"end"===i)&&(x=Zo,m-=(u&&E===w&&w.visualViewport?w.visualViewport.height:E[A])-n.height,m*=l?1:-1),o!==zo&&(o!==Vo&&o!==Zo||"end"!==i)||(v=Ho,h-=(u&&E===w&&w.visualViewport?w.visualViewport.width:E[C])-n.width,h*=l?1:-1)}var k,T=Object.assign({position:a},c&&Ai),R=!0===d?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:ii(r*o)/o||0,y:ii(n*o)/o||0}}({x:h,y:m},Qo(r)):{x:h,y:m};return h=R.x,m=R.y,l?Object.assign({},T,((k={})[x]=b?"0":"",k[v]=y?"0":"",k.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",k)):Object.assign({},T,((t={})[x]=b?m+"px":"",t[v]=y?h+"px":"",t.transform="",t))}var ki={passive:!0},Ti={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ti[e]}))}var Si={start:"end",end:"start"};function Ni(e){return e.replace(/start|end/g,(function(e){return Si[e]}))}function Mi(e){var t=Qo(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Oi(e){return li(hi(e)).left+Mi(e).scrollLeft}function Ii(e){var t=ui(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function Fi(e){return["html","body","#document"].indexOf(qo(e))>=0?e.ownerDocument.body:$o(e)&&Ii(e)?e:Fi(fi(e))}function ji(e,t){var r;void 0===t&&(t=[]);var n=Fi(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=Qo(n),s=o?[i].concat(i.visualViewport||[],Ii(n)?n:[]):n,a=t.concat(s);return o?a:a.concat(ji(fi(s)))}function Li(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _i(e,t,r){return"viewport"===t?Li(function(e,t){var r=Qo(e),n=hi(e),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=ai();(c||!c&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+Oi(e),y:l}}(e,r)):Ko(t)?function(e,t){var r=li(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):Li(function(e){var t,r=hi(e),n=Mi(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=ni(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=ni(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+Oi(e),l=-n.scrollTop;return"rtl"===ui(o||r).direction&&(a+=ni(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(hi(e)))}function Wi(e){var t,r=e.reference,n=e.element,o=e.placement,i=o?ri(o):null,s=o?Ei(o):null,a=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(i){case Vo:t={x:a,y:r.y-n.height};break;case Zo:t={x:a,y:r.y+r.height};break;case Ho:t={x:r.x+r.width,y:l};break;case zo:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=i?yi(i):null;if(null!=c){var d="y"===c?"height":"width";switch(s){case"start":t[c]=t[c]-(r[d]/2-n[d]/2);break;case"end":t[c]=t[c]+(r[d]/2-n[d]/2)}}return t}function Pi(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,i=r.strategy,s=void 0===i?e.strategy:i,a=r.boundary,l=void 0===a?"clippingParents":a,c=r.rootBoundary,d=void 0===c?"viewport":c,u=r.elementContext,p=void 0===u?"popper":u,h=r.altBoundary,f=void 0!==h&&h,m=r.padding,g=void 0===m?0:m,y=vi("number"!=typeof g?g:xi(g,Yo)),b="popper"===p?"reference":"popper",v=e.rects.popper,x=e.elements[f?b:p],w=function(e,t,r,n){var o="clippingParents"===t?function(e){var t=ji(fi(e)),r=["absolute","fixed"].indexOf(ui(e).position)>=0&&$o(e)?gi(e):e;return Ko(r)?t.filter((function(e){return Ko(e)&&di(e,r)&&"body"!==qo(e)})):[]}(e):[].concat(t),i=[].concat(o,[r]),s=i[0],a=i.reduce((function(t,r){var o=_i(e,r,n);return t.top=ni(o.top,t.top),t.right=oi(o.right,t.right),t.bottom=oi(o.bottom,t.bottom),t.left=ni(o.left,t.left),t}),_i(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(Ko(x)?x:x.contextElement||hi(e.elements.popper),l,d,s),E=li(e.elements.reference),A=Wi({reference:E,element:v,strategy:"absolute",placement:o}),C=Li(Object.assign({},v,A)),k="popper"===p?C:E,T={top:w.top-k.top+y.top,bottom:k.bottom-w.bottom+y.bottom,left:w.left-k.left+y.left,right:k.right-w.right+y.right},R=e.modifiersData.offset;if("popper"===p&&R){var S=R[o];Object.keys(T).forEach((function(e){var t=[Ho,Zo].indexOf(e)>=0?1:-1,r=[Vo,Zo].indexOf(e)>=0?"y":"x";T[e]+=S[r]*t}))}return T}var Di={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,s=r.altAxis,a=void 0===s||s,l=r.fallbackPlacements,c=r.padding,d=r.boundary,u=r.rootBoundary,p=r.altBoundary,h=r.flipVariations,f=void 0===h||h,m=r.allowedAutoPlacements,g=t.options.placement,y=ri(g),b=l||(y!==g&&f?function(e){if("auto"===ri(e))return[];var t=Ri(e);return[Ni(e),t,Ni(t)]}(g):[Ri(g)]),v=[g].concat(b).reduce((function(e,r){return e.concat("auto"===ri(r)?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?Xo:l,d=Ei(n),u=d?a?Go:Go.filter((function(e){return Ei(e)===d})):Yo,p=u.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=u);var h=p.reduce((function(t,r){return t[r]=Pi(e,{placement:r,boundary:o,rootBoundary:i,padding:s})[ri(r)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:r,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:m}):r)}),[]),x=t.rects.reference,w=t.rects.popper,E=new Map,A=!0,C=v[0],k=0;k<v.length;k++){var T=v[k],R=ri(T),S="start"===Ei(T),N=[Vo,Zo].indexOf(R)>=0,M=N?"width":"height",O=Pi(t,{placement:T,boundary:d,rootBoundary:u,altBoundary:p,padding:c}),I=N?S?Ho:zo:S?Zo:Vo;x[M]>w[M]&&(I=Ri(I));var F=Ri(I),j=[];if(i&&j.push(O[R]<=0),a&&j.push(O[I]<=0,O[F]<=0),j.every((function(e){return e}))){C=T,A=!1;break}E.set(T,j)}if(A)for(var L=function(e){var t=v.find((function(t){var r=E.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},_=f?3:1;_>0&&"break"!==L(_);_--);t.placement!==C&&(t.modifiersData[n]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Bi(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Ui(e){return[Vo,Ho,Zo,zo].some((function(t){return e[t]>=0}))}var Vi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=void 0===o?[0,0]:o,s=Xo.reduce((function(e,r){return e[r]=function(e,t,r){var n=ri(e),o=[zo,Vo].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},t,{placement:e})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[zo,Ho].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(r,t.rects,i),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=s}},Zi={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=void 0===o||o,s=r.altAxis,a=void 0!==s&&s,l=r.boundary,c=r.rootBoundary,d=r.altBoundary,u=r.padding,p=r.tether,h=void 0===p||p,f=r.tetherOffset,m=void 0===f?0:f,g=Pi(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),y=ri(t.placement),b=Ei(t.placement),v=!b,x=yi(y),w="x"===x?"y":"x",E=t.modifiersData.popperOffsets,A=t.rects.reference,C=t.rects.popper,k="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,T="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(E){if(i){var N,M="y"===x?Vo:zo,O="y"===x?Zo:Ho,I="y"===x?"height":"width",F=E[x],j=F+g[M],L=F-g[O],_=h?-C[I]/2:0,W="start"===b?A[I]:C[I],P="start"===b?-C[I]:-A[I],D=t.elements.arrow,B=h&&D?ci(D):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=U[M],Z=U[O],H=bi(0,A[I],B[I]),z=v?A[I]/2-_-H-V-T.mainAxis:W-H-V-T.mainAxis,Y=v?-A[I]/2+_+H+Z+T.mainAxis:P+H+Z+T.mainAxis,G=t.elements.arrow&&gi(t.elements.arrow),X=G?"y"===x?G.clientTop||0:G.clientLeft||0:0,J=null!=(N=null==R?void 0:R[x])?N:0,q=F+Y-J,Q=bi(h?oi(j,F+z-J-X):j,F,h?ni(L,q):L);E[x]=Q,S[x]=Q-F}if(a){var K,$="x"===x?Vo:zo,ee="x"===x?Zo:Ho,te=E[w],re="y"===w?"height":"width",ne=te+g[$],oe=te-g[ee],ie=-1!==[Vo,zo].indexOf(y),se=null!=(K=null==R?void 0:R[w])?K:0,ae=ie?ne:te-A[re]-C[re]-se+T.altAxis,le=ie?te+A[re]+C[re]-se-T.altAxis:oe,ce=h&&ie?function(e,t,r){var n=bi(e,t,r);return n>r?r:n}(ae,te,le):bi(h?ae:ne,te,h?le:oe);E[w]=ce,S[w]=ce-te}t.modifiersData[n]=S}},requiresIfExists:["offset"]};function Hi(e,t,r){void 0===r&&(r=!1);var n,o,i=$o(t),s=$o(t)&&function(e){var t=e.getBoundingClientRect(),r=ii(t.width)/e.offsetWidth||1,n=ii(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),a=hi(t),l=li(e,s,r),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(i||!i&&!r)&&(("body"!==qo(t)||Ii(a))&&(c=(n=t)!==Qo(n)&&$o(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:Mi(n)),$o(t)?((d=li(t,!0)).x+=t.clientLeft,d.y+=t.clientTop):a&&(d.x=Oi(a))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function zi(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}var Yi={placement:"bottom",modifiers:[],strategy:"absolute"};function Gi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}var Xi=function(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,i=void 0===o?Yi:o;return function(e,t,r){void 0===r&&(r=i);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Yi,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,d={state:a,setOptions:function(r){var o="function"==typeof r?r(a.options):r;u(),a.options=Object.assign({},i,a.options,o),a.scrollParents={reference:Ko(e)?ji(e):e.contextElement?ji(e.contextElement):[],popper:ji(t)};var s,c,p=function(e){var t=zi(e);return Jo.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}((s=[].concat(n,a.options.modifiers),c=s.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return a.orderedModifiers=p.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var i=o({state:a,name:t,instance:d,options:n});l.push(i||function(){})}})),d.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,r=e.popper;if(Gi(t,r)){a.rects={reference:Hi(t,gi(r),"fixed"===a.options.strategy),popper:ci(r)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var o=a.orderedModifiers[n],i=o.fn,s=o.options,l=void 0===s?{}:s,u=o.name;"function"==typeof i&&(a=i({state:a,options:l,name:u,instance:d})||a)}else a.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(e){d.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(o())}))}))),s}),destroy:function(){u(),c=!0}};if(!Gi(e,t))return d;function u(){l.forEach((function(e){return e()})),l=[]}return d.setOptions(r).then((function(e){!c&&r.onFirstUpdate&&r.onFirstUpdate(e)})),d}}({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,s=n.resize,a=void 0===s||s,l=Qo(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",r.update,ki)})),a&&l.addEventListener("resize",r.update,ki),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",r.update,ki)})),a&&l.removeEventListener("resize",r.update,ki)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Wi({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,s=void 0===i||i,a=r.roundOffsets,l=void 0===a||a,c={placement:ri(t.placement),variation:Ei(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ci(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ci(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ti,Vi,Di,Zi,wi,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=Pi(t,{elementContext:"reference"}),a=Pi(t,{altBoundary:!0}),l=Bi(s,n),c=Bi(a,o,i),d=Ui(l),u=Ui(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]});const Ji=u.forwardRef((function(e,t){const{children:r,container:n,disablePortal:o=!1}=e,[i,s]=u.useState(null),a=Dt(u.isValidElement(r)?r.ref:null,t);if(Wt((()=>{o||s(function(e){return"function"==typeof e?e():e}(n)||document.body)}),[n,o]),Wt((()=>{if(i&&!o)return _t(t,i),()=>{_t(t,null)}}),[t,i,o]),o){if(u.isValidElement(r)){const e={ref:a};return u.cloneElement(r,e)}return nt.exports.jsx(u.Fragment,{children:r})}return nt.exports.jsx(u.Fragment,{children:i?X.createPortal(r,i):i})}));"production"!==process.env.NODE_ENV&&(Ji.propTypes={children:je.exports.node,container:je.exports.oneOfType([Mt,je.exports.func]),disablePortal:je.exports.bool}),"production"!==process.env.NODE_ENV&&(Ji.propTypes=kt(Ji.propTypes));var qi=Ji;function Qi(e){return $t("MuiPopper",e)}er("MuiPopper",["root"]);const Ki=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],$i=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function es(e){return"function"==typeof e?e():e}function ts(e){return void 0!==e.nodeType}const rs={},ns=u.forwardRef((function(e,t){var r;const{anchorEl:n,children:o,direction:i,disablePortal:s,modifiers:a,open:l,placement:c,popperOptions:d,popperRef:p,slotProps:h={},slots:f={},TransitionProps:m}=e,g=un(e,Ki),y=u.useRef(null),b=Dt(y,t),v=u.useRef(null),x=Dt(v,p),w=u.useRef(x);Wt((()=>{w.current=x}),[x]),u.useImperativeHandle(p,(()=>v.current),[]);const E=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(c,i),[A,C]=u.useState(E),[k,T]=u.useState(es(n));u.useEffect((()=>{v.current&&v.current.forceUpdate()})),u.useEffect((()=>{n&&T(es(n))}),[n]),Wt((()=>{if(!k||!l)return;if("production"!==process.env.NODE_ENV&&k&&ts(k)&&1===k.nodeType){const e=k.getBoundingClientRect();"test"!==process.env.NODE_ENV&&0===e.top&&0===e.left&&0===e.right&&0===e.bottom&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}let e=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{C(e.placement)}}];null!=a&&(e=e.concat(a)),d&&null!=d.modifiers&&(e=e.concat(d.modifiers));const t=Xi(k,y.current,bt({placement:E},d,{modifiers:e}));return w.current(t),()=>{t.destroy(),w.current(null)}}),[k,s,a,l,d,E]);const R={placement:A};null!==m&&(R.TransitionProps=m);const S=Jt({root:["root"]},co(Qi)),N=null!=(r=f.root)?r:"div",M=ho({elementType:N,externalSlotProps:h.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:S.root});return nt.exports.jsx(N,bt({},M,{children:"function"==typeof o?o(R):o}))})),os=u.forwardRef((function(e,t){const{anchorEl:r,children:n,container:o,direction:i="ltr",disablePortal:s=!1,keepMounted:a=!1,modifiers:l,open:c,placement:d="bottom",popperOptions:p=rs,popperRef:h,style:f,transition:m=!1,slotProps:g={},slots:y={}}=e,b=un(e,$i),[v,x]=u.useState(!0);if(!a&&!c&&(!m||v))return null;let w;if(o)w=o;else if(r){const e=es(r);w=e&&ts(e)?jt(e).body:jt(null).body}const E=m?{in:c,onEnter:()=>{x(!1)},onExited:()=>{x(!0)}}:void 0;return nt.exports.jsx(qi,{disablePortal:s,container:w,children:nt.exports.jsx(ns,bt({anchorEl:r,direction:i,disablePortal:s,modifiers:l,ref:t,open:m?!v:c,placement:d,popperOptions:p,popperRef:h,slotProps:g,slots:y},b,{style:bt({position:"fixed",top:0,left:0,display:c||!a||m&&!v?void 0:"none"},f),TransitionProps:E,children:n}))})}));"production"!==process.env.NODE_ENV&&(os.propTypes={anchorEl:yt(je.exports.oneOfType([Mt,je.exports.object,je.exports.func]),(e=>{if(e.open){const t=es(e.anchorEl);if(t&&ts(t)&&1===t.nodeType){const e=t.getBoundingClientRect();if("test"!==process.env.NODE_ENV&&0===e.top&&0===e.left&&0===e.right&&0===e.bottom)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}else if(!t||"function"!=typeof t.getBoundingClientRect||!ts(t)&&null!=t.contextElement&&1!==t.contextElement.nodeType)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join("\n"))}return null})),children:je.exports.oneOfType([je.exports.node,je.exports.func]),container:je.exports.oneOfType([Mt,je.exports.func]),direction:je.exports.oneOf(["ltr","rtl"]),disablePortal:je.exports.bool,keepMounted:je.exports.bool,modifiers:je.exports.arrayOf(je.exports.shape({data:je.exports.object,effect:je.exports.func,enabled:je.exports.bool,fn:je.exports.func,name:je.exports.any,options:je.exports.object,phase:je.exports.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:je.exports.arrayOf(je.exports.string),requiresIfExists:je.exports.arrayOf(je.exports.string)})),open:je.exports.bool.isRequired,placement:je.exports.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:je.exports.shape({modifiers:je.exports.array,onFirstUpdate:je.exports.func,placement:je.exports.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:je.exports.oneOf(["absolute","fixed"])}),popperRef:Ot,slotProps:je.exports.shape({root:je.exports.oneOfType([je.exports.func,je.exports.object])}),slots:je.exports.shape({root:je.exports.elementType}),transition:je.exports.bool});var is=os,ss="undefined"!=typeof window?u.useLayoutEffect:u.useEffect;function as(e,t,r,n,o){var i="undefined"!=typeof window&&void 0!==window.matchMedia,s=Xn(u.useState((function(){return o&&i?r(e).matches:n?n(e).matches:t})),2),a=s[0],l=s[1];return ss((function(){var t=!0;if(i){var n=r(e),o=function(){t&&l(n.matches)};return o(),n.addListener(o),function(){t=!1,n.removeListener(o)}}}),[e,r,i]),a}var ls=u.useSyncExternalStore;function cs(e,t,r,n){var o=u.useCallback((function(){return t}),[t]),i=u.useMemo((function(){if(null!==n){var t=n(e).matches;return function(){return t}}return o}),[o,e,n]),s=Xn(u.useMemo((function(){if(null===r)return[o,function(){return function(){}}];var t=r(e);return[function(){return t.matches},function(e){return t.addListener(e),function(){t.removeListener(e)}}]}),[o,r,e]),2),a=s[0],l=s[1];return ls(l,a,i)}function ds(){return{isMobile:function(e,t){void 0===t&&(t={});var r=Cn(),n="undefined"!=typeof window&&void 0!==window.matchMedia,o=Un({name:"MuiUseMediaQuery",props:t,theme:r||void 0}),i=o.defaultMatches,s=void 0!==i&&i,a=o.matchMedia,l=void 0===a?n?window.matchMedia:null:a,c=o.ssrMatchMedia,d=void 0===c?null:c,p=o.noSsr;"production"!==process.env.NODE_ENV&&null===r&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join("\n"));var h=e(r);h=h.replace(/^@media( ?)/m,"");var f=(void 0!==ls?cs:as)(h,s,l,d,p);return"production"!==process.env.NODE_ENV&&u.useDebugValue({query:h,match:f}),f}((function(e){return e.breakpoints.down("tablet")}))}}var us="DODOTooltip-arrow",ps=Bn("div")((function(e){var t,r=e.theme;return"\n z-index: ".concat(null===(t=r.zIndex)||void 0===t?void 0:t.tooltip,';\n &[data-popper-placement*="bottom"] .').concat(us," {\n top: 0;\n margin-top: -").concat(8,'px;\n &::before {\n transform-origin: 0 100%;\n }\n }\n &[data-popper-placement*="top"] .').concat(us," {\n bottom: 0;\n margin-bottom: -").concat(8,'px;\n &::before {\n transform-origin: 100% 0;\n }\n }\n &[data-popper-placement*="right"] .').concat(us,' {\n &::before {\n transform-origin: 100% 100%;\n }\n }\n &[data-popper-placement*="left"] .').concat(us," {\n &::before {\n transform-origin: 0 0;\n }\n }\n ")}));function hs(e){var t=e.title,r=e.sx,n=e.maxWidth,o=void 0===n?"auto":n,i=e.popperOptions,a=e.children,l=e.onlyHover,c=e.enterDelay,d=void 0===c?100:c,u=e.leaveDelay,p=void 0===u?0:u,h=Gn(e,["title","sx","maxWidth","popperOptions","children","onlyHover","enterDelay","leaveDelay"]);Tn();var f=ds().isMobile,y=g(!1),b=g(!1),x=g(),w=g(),A=Xn(m(),2),C=A[0],k=A[1],T=Xn(m(),2),R=T[0],S=T[1],N=Xn(m(!1),2),M=N[0],O=N[1],I=f&&!l,F={ref:k};if(I)F.onClick=function(){O(!0)};else{var j=function(){b.current=!0,clearTimeout(w.current),clearTimeout(x.current),x.current=setTimeout((function(){O(!0)}),d)};F.onMouseOut=j,F.onMouseEnter=j,F.onMouseLeave=function(){b.current=!1,clearTimeout(w.current),clearTimeout(x.current),w.current=setTimeout((function(){b.current||y.current||O(!1)}),p)}}return v((function(){return function(){O(!1),clearTimeout(w.current),clearTimeout(x.current)}}),[]),nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsxs(is,Yn({open:M,anchorEl:C,slots:{root:ps},popperOptions:s({modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"preventOverflow",options:{padding:20}},{name:"arrow",options:{element:R,padding:4}}]},i)},h,{children:[nt.exports.jsx(Nn,Yn({sx:Yn({typography:"h6",padding:12,maxWidth:o,fontWeight:500,backgroundColor:"background.paperContrast",borderRadius:8,color:"text.secondary",borderColor:"border.main",borderWidth:1,borderStyle:"solid",whiteSpace:"pre-wrap"},r),onMouseEnter:function(){I||(y.current=!0,clearTimeout(w.current),clearTimeout(x.current))},onMouseLeave:function(){I||(y.current=!1,clearTimeout(w.current),clearTimeout(x.current),w.current=setTimeout((function(){b.current||y.current||O(!1)}),p))},onClick:function(e){return e.stopPropagation()}},{children:t})),nt.exports.jsx(Nn,{ref:S,className:us,sx:{overflow:"hidden",position:"absolute",width:16,height:9,boxSizing:"border-box",color:"background.paperContrast",bottom:0,marginBottom:-8,"&::before":{transformOrigin:"100% 0",content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)",border:"solid 1px",borderColor:"border.main"}}})]})),nt.exports.jsx(Uo,Yn({onClickAway:function(){I&&O(!1)}},{children:E(a,F)}))]})}function fs(e){var t=e.title,r=e.ml,n=e.mr,o=e.size,i=void 0===o?15:o,s=e.sx,a=e.maxWidth,l=e.container;return e.onlyHover,t?nt.exports.jsx(hs,Yn({title:t,placement:"top",container:l,maxWidth:a,onlyHover:!0},{children:nt.exports.jsx(Lo,{component:S,sx:Yn({ml:r,mr:n,width:i,height:i},s)})})):null}function ms(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function gs(e){return parseInt(Lt(e).getComputedStyle(e).paddingRight,10)||0}function ys(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),r=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),r="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||r}(e);t&&r&&ms(e,o)}))}function bs(e,t){let r=-1;return e.some(((e,n)=>!!t(e)&&(r=n,!0))),r}const vs=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function xs(e){const t=[],r=[];return Array.from(e.querySelectorAll(vs)).forEach(((e,n)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}(e))}(e)&&(0===o?t.push(e):r.push({documentOrder:n,tabIndex:o,node:e}))})),r.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function ws(){return!0}function Es(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:o=!1,getTabbable:i=xs,isEnabled:s=ws,open:a}=e,l=u.useRef(!1),c=u.useRef(null),d=u.useRef(null),p=u.useRef(null),h=u.useRef(null),f=u.useRef(!1),m=u.useRef(null),g=Dt(t.ref,m),y=u.useRef(null);u.useEffect((()=>{a&&m.current&&(f.current=!r)}),[r,a]),u.useEffect((()=>{if(!a||!m.current)return;const e=jt(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||("production"!==process.env.NODE_ENV&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join("\n")),m.current.setAttribute("tabIndex","-1")),f.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}}),[a]),u.useEffect((()=>{if(!a||!m.current)return;const e=jt(m.current),t=t=>{const{current:r}=m;if(null!==r)if(e.hasFocus()&&!n&&s()&&!l.current){if(!r.contains(e.activeElement)){if(t&&h.current!==t.target||e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!f.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==d.current||(n=i(m.current)),n.length>0){var o,a;const e=Boolean((null==(o=y.current)?void 0:o.shiftKey)&&"Tab"===(null==(a=y.current)?void 0:a.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else r.focus()}}else l.current=!1},r=t=>{y.current=t,!n&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(l.current=!0,d.current&&d.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",r,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&t(null)}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",t),e.removeEventListener("keydown",r,!0)}}),[r,n,o,s,a,i]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0};return nt.exports.jsxs(u.Fragment,{children:[nt.exports.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),u.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0,h.current=e.target;const r=t.props.onFocus;r&&r(e)}}),nt.exports.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}function As(e){return $t("MuiModal",e)}"production"!==process.env.NODE_ENV&&(Es.propTypes={children:Ct,disableAutoFocus:je.exports.bool,disableEnforceFocus:je.exports.bool,disableRestoreFocus:je.exports.bool,getTabbable:je.exports.func,isEnabled:je.exports.func,open:je.exports.bool.isRequired}),"production"!==process.env.NODE_ENV&&(Es.propTypes=kt(Es.propTypes)),er("MuiModal",["root","hidden","backdrop"]);const Cs=["children","closeAfterTransition","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],ks=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&ms(e.modalRef,!1);const n=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);ys(t,e.mount,e.modalRef,n,!0);const o=bs(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),r)}mount(e,t){const r=bs(this.containers,(t=>-1!==t.modals.indexOf(e))),n=this.containers[r];n.restore||(n.restore=function(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(function(e){const t=jt(e);return t.body===e?Lt(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(n)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(jt(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${gs(n)+e}px`;const t=jt(n).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{r.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${gs(t)+e}px`}))}let e;if(n.parentNode instanceof DocumentFragment)e=jt(n).body;else{const t=n.parentElement,r=Lt(n);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===r.getComputedStyle(t).overflowY?t:n}r.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{r.forEach((({value:e,el:t,property:r})=>{e?t.style.setProperty(r,e):t.style.removeProperty(r)}))}}(n,t))}remove(e,t=!0){const r=this.modals.indexOf(e);if(-1===r)return r;const n=bs(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[n];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&ms(e.modalRef,t),ys(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&ms(e.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},Ts=u.forwardRef((function(e,t){var r,n;const{children:o,closeAfterTransition:i=!1,container:s,disableAutoFocus:a=!1,disableEnforceFocus:l=!1,disableEscapeKeyDown:c=!1,disablePortal:d=!1,disableRestoreFocus:p=!1,disableScrollLock:h=!1,hideBackdrop:f=!1,keepMounted:m=!1,manager:g=ks,onBackdropClick:y,onClose:b,onKeyDown:v,open:x,onTransitionEnter:w,onTransitionExited:E,slotProps:A={},slots:C={}}=e,k=un(e,Cs),T=g,[R,S]=u.useState(!x),N=u.useRef({}),M=u.useRef(null),O=u.useRef(null),I=Dt(O,t),F=function(e){return!!e&&e.props.hasOwnProperty("in")}(o),j=null==(r=e["aria-hidden"])||r,L=()=>(N.current.modalRef=O.current,N.current.mountNode=M.current,N.current),_=()=>{T.mount(L(),{disableScrollLock:h}),O.current&&(O.current.scrollTop=0)},W=Pt((()=>{const e=function(e){return"function"==typeof e?e():e}(s)||jt(M.current).body;T.add(L(),e),O.current&&_()})),P=u.useCallback((()=>T.isTopModal(L())),[T]),D=Pt((e=>{M.current=e,e&&O.current&&(x&&P()?_():ms(O.current,j))})),B=u.useCallback((()=>{T.remove(L(),j)}),[T,j]);u.useEffect((()=>()=>{B()}),[B]),u.useEffect((()=>{x?W():F&&i||B()}),[x,B,F,i,W]);const U=bt({},e,{closeAfterTransition:i,disableAutoFocus:a,disableEnforceFocus:l,disableEscapeKeyDown:c,disablePortal:d,disableRestoreFocus:p,disableScrollLock:h,exited:R,hideBackdrop:f,keepMounted:m}),V=(e=>{const{open:t,exited:r}=e;return Jt({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},co(As))})(U),Z={};void 0===o.props.tabIndex&&(Z.tabIndex="-1"),F&&(Z.onEnter=Ft((()=>{S(!1),w&&w()}),o.props.onEnter),Z.onExited=Ft((()=>{S(!0),E&&E(),i&&B()}),o.props.onExited));const H=null!=(n=C.root)?n:"div",z=ho({elementType:H,externalSlotProps:A.root,externalForwardedProps:k,additionalProps:{ref:I,role:"presentation",onKeyDown:e=>{v&&v(e),"Escape"===e.key&&P()&&(c||(e.stopPropagation(),b&&b(e,"escapeKeyDown")))}},className:V.root,ownerState:U}),Y=C.backdrop,G=ho({elementType:Y,externalSlotProps:A.backdrop,additionalProps:{"aria-hidden":!0,onClick:e=>{e.target===e.currentTarget&&(y&&y(e),b&&b(e,"backdropClick"))},open:x},className:V.backdrop,ownerState:U});return m||x||F&&!R?nt.exports.jsx(qi,{ref:D,container:s,disablePortal:d,children:nt.exports.jsxs(H,bt({},z,{children:[!f&&Y?nt.exports.jsx(Y,bt({},G)):null,nt.exports.jsx(Es,{disableEnforceFocus:l,disableAutoFocus:a,disableRestoreFocus:p,isEnabled:P,open:x,children:u.cloneElement(o,Z)})]}))}):null}));"production"!==process.env.NODE_ENV&&(Ts.propTypes={children:Ct.isRequired,closeAfterTransition:je.exports.bool,container:je.exports.oneOfType([Mt,je.exports.func]),disableAutoFocus:je.exports.bool,disableEnforceFocus:je.exports.bool,disableEscapeKeyDown:je.exports.bool,disablePortal:je.exports.bool,disableRestoreFocus:je.exports.bool,disableScrollLock:je.exports.bool,hideBackdrop:je.exports.bool,keepMounted:je.exports.bool,onBackdropClick:je.exports.func,onClose:je.exports.func,onTransitionEnter:je.exports.func,onTransitionExited:je.exports.func,open:je.exports.bool.isRequired,slotProps:je.exports.shape({backdrop:je.exports.oneOfType([je.exports.func,je.exports.object]),root:je.exports.oneOfType([je.exports.func,je.exports.object])}),slots:je.exports.shape({backdrop:je.exports.elementType,root:je.exports.elementType})});var Rs,Ss,Ns=Ts,Ms=h((function(e,t){var r=e.open,n=e.className,o=Gn(e,["open","className"]);return nt.exports.jsx("div",Yn({className:fn({"MuiBackdrop-open":r},n),ref:t},o))})),Os=Bn(Ns)(Rs||(Rs=qn(["\n position: absolute;\n z-index: 1300;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n display: flex;\n align-items: flex-end;\n"],["\n position: absolute;\n z-index: 1300;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n display: flex;\n align-items: flex-end;\n"]))),Is=Bn(Ms)(Ss||(Ss=qn(["\n z-index: -1;\n position: absolute;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n background-color: ",";\n -webkit-tap-highlight-color: transparent;\n"],["\n z-index: -1;\n position: absolute;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n background-color: ",";\n -webkit-tap-highlight-color: transparent;\n"])),(function(e){return e.theme.palette.background.backdrop}));function Fs(e){return nt.exports.jsx(Os,Yn({slots:{backdrop:Is}},e))}var js=h((function(e,t){var r=Tn(),n=e.size,o=void 0===n?18:n,i=e.sx,s=Gn(e,["size","sx"]);return nt.exports.jsx(Nn,Yn({component:"span",sx:Yn({position:"relative",cursor:"pointer",userSelect:"none",width:o,height:o,"&:hover > .checkbox-icon":{borderColor:r.palette.text.primary}},i)},{children:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,Yn({component:"input",type:"checkbox",ref:t,sx:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,m:0,p:0,zIndex:1,"&:checked + .checkbox-icon":{border:"none",backgroundColor:"secondary.main",color:"secondary.contrastText","& svg":{display:"inline-block"}}}},s)),nt.exports.jsx(Nn,Yn({component:"span",className:"checkbox-icon",sx:{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:4,width:o,height:o,borderStyle:"solid",borderWidth:1,flex:1,borderColor:r.palette.text.secondary,".Mui-focusVisible &":{outline:"none",outlineOffset:2},"input:disabled ~ &":{borderColor:r.palette.text.disabled}}},{children:nt.exports.jsx(Nn,{component:N,sx:{display:"none",width:"75%",height:"75%"}})}))]})}))}));function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ls.apply(this,arguments)}function _s(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const Ws=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Ps=e=>e?6:5,Ds=new Map,Bs=new Map,Us=(e,t,r,n,o,i)=>{clearTimeout(o);const s=(e=>({_s:e,status:Ws[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}))(t),a=new Map(n.current);a.set(e,s),r(a),n.current=a,i&&i({key:e,current:s})},Vs=["transition","transitionTimeout"],Zs=(e,t)=>!0===e||!(!e||!e[t]),Hs=A({}),zs=(e,t,r)=>(n,o)=>{const i=t?`${e}__${t}`:e;let s=i;r&&Object.keys(r).forEach((e=>{const t=r[e];t&&(s+=` ${i}--${!0===t?e:`${e}-${t}`}`)}));let a="function"==typeof n?n(o):n;return"string"==typeof a&&(a=a.trim(),a&&(s+=` ${a}`)),s},Ys=(e,t)=>{if(!t)return e;const r=Ls({},e);return Object.keys(t).forEach((n=>{const o=e[n],i=t[n];r[n]="function"==typeof i&&o?(...e)=>{o(...e),i(...e)}:i})),r},Gs=e=>nt.exports.jsx(Hs.Provider,Ls({},e)),Xs=e=>{do{e=e.parentElement}while(e&&!e.hasAttribute("data-szh-adn"));return e},Js=(e,t,r)=>e?t>0?t-1:r-1:(t+1)%r,qs=(e,t)=>{const{activeElement:r}=document;if(!r||!r.hasAttribute("data-szh-adn-btn")||Xs(r)!==t.currentTarget)return;const n=t.currentTarget.querySelectorAll("[data-szh-adn-btn]"),{length:o}=n;for(let i=0;i<o;i++)if(n[i]===r){let r=Js(e,i,o);for(;Xs(n[i])!==Xs(n[r]);)r=Js(e,r,o);i!==r&&(t.preventDefault(),n[r].focus());break}},Qs=["providerValue","className"],Ks=h(((e,t)=>{let{providerValue:r,className:n}=e,o=_s(e,Qs);const{accordionProps:i}={accordionProps:{"data-szh-adn":"",onKeyDown:e=>"ArrowUp"===e.key?qs(!0,e):"ArrowDown"===e.key&&qs(!1,e)}};return nt.exports.jsx(Gs,{value:r,children:nt.exports.jsx("div",Ls({},Ys(i,o),{ref:t,className:zs("szh-accordion")(n)}))})}));Ks.displayName="ControlledAccordion";const $s=["allowMultiple","initialEntered","mountOnEnter","unmountOnExit","transition","transitionTimeout","onStateChange"],ea=h(((e,t)=>{let{allowMultiple:r,initialEntered:n,mountOnEnter:o,unmountOnExit:i,transition:s,transitionTimeout:a,onStateChange:l}=e,c=_s(e,$s);const d=((e={})=>{let{transition:t,transitionTimeout:r}=e,n=_s(e,Vs);const o=(({allowMultiple:e,enter:t=!0,exit:r=!0,preEnter:n,preExit:o,timeout:i,initialEntered:s,mountOnEnter:a,unmountOnExit:l,onStateChange:c}={})=>{const[d,u]=m(Ds),p=g(d),h=g(Bs),[f,b]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(i),v=y(((e,t)=>{const{initialEntered:r=s}=t||{},n=r?2:Ps(a);Us(e,n,u,p),h.current.set(e,{})}),[s,a]),x=y((e=>{const t=new Map(p.current);return!!t.delete(e)&&(u(t),p.current=t,h.current.delete(e),!0)}),[]),w=y((e=>{const t=p.current.get(e);if(!t)return void("production"!==process.env.NODE_ENV&&console.error(`[React-Transition-State] invalid key: ${e}`));const{timeoutId:r}=h.current.get(e),n=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return Ps(t)}})(t._s,l);n&&Us(e,n,u,p,r,c)}),[c,l]),E=y(((i,s)=>{const a=p.current.get(i);if(!a)return void("production"!==process.env.NODE_ENV&&console.error(`[React-Transition-State] invalid key: ${i}`));const d=h.current.get(i),m=e=>{switch(Us(i,e,u,p,d.timeoutId,c),e){case 1:f>=0&&(d.timeoutId=setTimeout((()=>w(i)),f));break;case 4:b>=0&&(d.timeoutId=setTimeout((()=>w(i)),b));break;case 0:case 3:d.timeoutId=setTimeout((()=>m(e+1)),0)}},g=a.isEnter;"boolean"!=typeof s&&(s=!g),s?g||(m(t?n?0:1:2),!e&&p.current.forEach(((e,t)=>t!==i&&E(t,!1)))):g&&m(r?o?3:4:Ps(l))}),[c,w,e,t,r,n,o,f,b,l]),A=y((t=>{if(e||!1===t)for(const e of p.current.keys())E(e,t)}),[e,E]);return{stateMap:d,toggle:E,toggleAll:A,endTransition:w,setItem:v,deleteItem:x}})(Ls({timeout:r,enter:Zs(t,"enter"),exit:Zs(t,"exit"),preEnter:Zs(t,"preEnter"),preExit:Zs(t,"preExit")},n));return Ls({mountOnEnter:!!n.mountOnEnter,initialEntered:!!n.initialEntered},o)})({allowMultiple:r,initialEntered:n,mountOnEnter:o,unmountOnExit:i,transition:s,transitionTimeout:a,onStateChange:l});return nt.exports.jsx(Ks,Ls({},c,{ref:t,providerValue:d}))}));ea.displayName="Accordion";let ta=0;const ra=b||(()=>{const[e,t]=m();return v((()=>t(++ta)),[]),e&&`szh-adn-${e}`}),na="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?x:v;function oa(e,t){"function"==typeof e?e(t):e.current=t}function ia(e,t){return w((()=>e?t?r=>{oa(e,r),oa(t,r)}:e:t),[e,t])}const sa=["itemKey","initialEntered"],aa=["forwardedRef","itemRef","state","toggle","className","disabled","header","headingTag","headingProps","buttonProps","contentProps","panelProps","children"],la=(e,t)=>"function"==typeof e?e(t):e,ca=f((e=>{let{forwardedRef:t,itemRef:r,state:n,toggle:o,className:i,disabled:s,header:a,headingTag:l="h3",headingProps:c,buttonProps:d,contentProps:u,panelProps:p,children:h}=e,f=_s(e,aa);const y={state:n,toggle:o,disabled:s},{buttonProps:b,panelProps:v}=(({state:e,toggle:t,disabled:r})=>{const n=ra(),o=n&&n+"-",i={id:n,"aria-controls":o,"aria-expanded":e.isEnter,onClick:t};return r?i.disabled=!0:i["data-szh-adn-btn"]="",{buttonProps:i,panelProps:{id:o,"aria-labelledby":n,role:"region"}}})(y),[x,w]=(({status:e,isResolved:t})=>{const[r,n]=m(),o=g(null);return na((()=>{("preEnter"===e||"preExit"===e)&&n(o.current.getBoundingClientRect().height)}),[e]),[{height:"preEnter"===e||"exiting"===e?0:"entering"===e||"preExit"===e?r:void 0,overflow:t?void 0:"hidden"},o]})(n),E=ia(p&&p.ref,w),{status:A,isMounted:C,isEnter:k}=n;return nt.exports.jsxs("div",Ls({},f,{ref:ia(t,r),className:zs("szh-accordion","item",{status:A,expanded:k})(i,n),children:[nt.exports.jsx(l,Ls({},c,{style:Ls({margin:0},c&&c.style),className:zs("szh-accordion","item-heading")(c&&c.className,n),children:nt.exports.jsx("button",Ls({},Ys(b,d),{type:"button",className:zs("szh-accordion","item-btn")(d&&d.className,n),children:la(a,y)}))})),C&&nt.exports.jsx("div",Ls({},u,{style:Ls({display:"exited"===A?"none":void 0},x,u&&u.style),className:zs("szh-accordion","item-content")(u&&u.className,n),children:nt.exports.jsx("div",Ls({},Ys(v,p),{ref:E,className:zs("szh-accordion","item-panel")(p&&p.className,n),children:la(h,y)}))}))]}))}));ca.displayName="AccordionItem";const da=(e=>{const t=h(((t,r)=>{let{itemKey:n,initialEntered:o}=t,i=_s(t,sa);return nt.exports.jsx(e,Ls({forwardedRef:r},i,(({itemKey:e,initialEntered:t,disabled:r}={})=>{const n=g(null),o=(()=>{const e=C(Hs);if("production"!==process.env.NODE_ENV&&!e.stateMap)throw new Error("[React-Accordion] Cannot find a <AccordionProvider/> above this AccordionItem.");return e})(),i=null!=e?e:n.current,s=((e,t,r)=>{const{stateMap:n,mountOnEnter:o,initialEntered:i}=e,s=null!=r?r:i;return n.get(t)||{status:s?"entered":o?"unmounted":"exited",isMounted:!o,isEnter:s,isResolved:!0}})(o,i,t),{setItem:a,deleteItem:l,toggle:c}=o;return v((()=>{if(r)return;const o=null!=e?e:n.current;return a(o,{initialEntered:t}),()=>{l(o)}}),[a,l,e,t,r]),{itemRef:n,state:s,toggle:y((e=>c(i,e)),[c,i])}})({itemKey:n,initialEntered:o,disabled:i.disabled})))}));return t.displayName="WithAccordionItem",t})(ca);function ua(e){var t=e.sx,r=e.buttonProps,n=Gn(e,["sx","buttonProps"]);return nt.exports.jsx(Nn,Yn({component:da,sx:s({"& button":{p:0,border:"none",width:"100%",backgroundColor:"transparent",cursor:"pointer"}},t),buttonProps:Yn({className:function(e){var t=e.isEnter;return"".concat(t?"active":"")}},r)},n))}function pa({input:e,showDecimals:t=4,showPrecisionDecimals:r=2,showIntegerOnly:n=!1,showDecimalsOnly:o=!1,noGroupSeparator:s=!1}){const a=new i(e);if(a.isNaN())return"-";let l=a.dp(t,i.ROUND_DOWN);return l.eq(0)&&(a.gt(0)||a.lt(0))&&(l=a.sd(null!=r?r:t,i.ROUND_DOWN)),n&&(l=l.integerValue(i.ROUND_DOWN)),o&&(l=l.minus(l.integerValue(i.ROUND_DOWN))),s?l.toFormat({decimalSeparator:".",groupSeparator:"",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0}):l.toFormat()}function ha({input:e,decimals:t,showPrecisionDecimals:r=2,noGroupSeparator:n}){if(null==e)return"-";const o=new i(e);if(o.isNaN())return"-";return pa({input:o,showDecimals:void 0===t?0:t>6?6:t>4?4:t,showPrecisionDecimals:r,noGroupSeparator:n})}function fa(e){if("number"==typeof e)return fa(new i(e));if(e.isNaN())return"NaN";if(e.isNegative())return`-${fa(e.negated())}`;if(e.isZero())return"0";let t=e.integerValue(i.ROUND_FLOOR),r=e.minus(t),n="";for(;!t.isZero();){n=t.modulo(10).toString().toString()+n,t=t.idiv(10)}if(""===n&&(n="0"),r.isZero())return n;n+=".";let o=0;for(;!r.isZero()&&o<100;){const e=r.times(10),t=e.integerValue(i.ROUND_FLOOR);n+=t.toString(),r=e.minus(t),o+=1}return n}const ma=(e,t)=>{if("string"==typeof e&&!e.match(/[-+]?\d+(.+d+)?/))return e;const r=new i(e);if(t){let e=r.toFixed(t,i.ROUND_DOWN);return new i(e).isZero()&&(e=fa(r.precision(t,i.ROUND_DOWN))),e}return fa(r)},ga=(e,t)=>{let r=e;const n=r.match("[0-9。.]+");r=n&&n.length>0?n[0]:"",r=r.replace("。",".");let o=0;if(r){const e=r.split("."),t=0===e[0].length?["0"]:[e[0]];e.length>1?t[1]=e.slice(1,e.length).join(""):t[0].length>1&&"0"===t[0][0]&&(t[0]=t[0].slice(1,t[0].length)),t.length>1&&(o=t[1].length),r=t.join(".")}return t>=0&&o>t?ma(r,t):r},ya=(e,t,r)=>{const n=new i(e).times(new i(10).pow(t));return r?n:n.dp(0)};function ba(e){return Number(e.toString().split(".")[0])}let va=!1,xa=!1;const wa={debug:1,default:2,info:2,warning:3,error:4,off:5};let Ea=wa.default,Aa=null;const Ca=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var ka,Ta;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(ka||(ka={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(Ta||(Ta={}));const Ra="0123456789abcdef";class Sa{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==wa[r]&&this.throwArgumentError("invalid log level name","logLevel",e),Ea>wa[r]||console.log.apply(console,t)}debug(...e){this._log(Sa.levels.DEBUG,e)}info(...e){this._log(Sa.levels.INFO,e)}warn(...e){this._log(Sa.levels.WARNING,e)}makeError(e,t,r){if(xa)return this.makeError("censored error",t,{});t||(t=Sa.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=Ra[t[e]>>4],r+=Ra[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let i="";switch(t){case Ta.NUMERIC_FAULT:{i="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":i+="-"+t;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case Ta.CALL_EXCEPTION:case Ta.INSUFFICIENT_FUNDS:case Ta.MISSING_NEW:case Ta.NONCE_EXPIRED:case Ta.REPLACEMENT_UNDERPRICED:case Ta.TRANSACTION_REPLACED:case Ta.UNPREDICTABLE_GAS_LIMIT:i=t}i&&(e+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(r).forEach((function(e){s[e]=r[e]})),s}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,Sa.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){Ca&&this.throwError("platform missing String.prototype.normalize",Sa.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ca})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,Sa.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,Sa.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,Sa.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,Sa.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",Sa.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",Sa.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",Sa.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Aa||(Aa=new Sa("logger/5.7.0")),Aa}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",Sa.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),va){if(!e)return;this.globalLogger().throwError("error censorship permanent",Sa.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}xa=!!e,va=!!t}static setLogLevel(e){const t=wa[e.toLowerCase()];null!=t?Ea=t:Sa.globalLogger().warn("invalid log level - "+e)}static from(e){return new Sa(e)}}Sa.errors=Ta,Sa.levels=ka;const Na=new Sa("bytes/5.7.0");function Ma(e){return!!e.toHexString}function Oa(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return Oa(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function Ia(e){return Pa(e)&&!(e.length%2)||ja(e)}function Fa(e){return"number"==typeof e&&e==e&&e%1==0}function ja(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!Fa(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const r=e[t];if(!Fa(r)||r<0||r>=256)return!1}return!0}function La(e,t){if(t||(t={}),"number"==typeof e){Na.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),Oa(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Ma(e)&&(e=e.toHexString()),Pa(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":Na.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;e<r.length;e+=2)n.push(parseInt(r.substring(e,e+2),16));return Oa(new Uint8Array(n))}return ja(e)?Oa(new Uint8Array(e)):Na.throwArgumentError("invalid arrayify value","value",e)}function _a(e){const t=e.map((e=>La(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),Oa(n)}function Wa(e){let t=La(e);if(0===t.length)return t;let r=0;for(;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function Pa(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function Da(e,t){if(t||(t={}),"number"==typeof e){Na.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t="0123456789abcdef"[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Ma(e))return e.toHexString();if(Pa(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":Na.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(ja(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+="0123456789abcdef"[(240&n)>>4]+"0123456789abcdef"[15&n]}return t}return Na.throwArgumentError("invalid hexlify value","value",e)}function Ba(e){if("string"!=typeof e)e=Da(e);else if(!Pa(e)||e.length%2)return null;return(e.length-2)/2}function Ua(e,t,r){return"string"!=typeof e?e=Da(e):(!Pa(e)||e.length%2)&&Na.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function Va(e){let t="0x";return e.forEach((e=>{t+=Da(e).substring(2)})),t}function Za(e){const t=function(e){"string"!=typeof e&&(e=Da(e));Pa(e)||Na.throwArgumentError("invalid hex string","value",e);e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}(Da(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function Ha(e,t){for("string"!=typeof e?e=Da(e):Pa(e)||Na.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&Na.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function za(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Ia(e)){let r=La(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=Da(r.slice(0,32)),t.s=Da(r.slice(32,64))):65===r.length?(t.r=Da(r.slice(0,32)),t.s=Da(r.slice(32,64)),t.v=r[64]):Na.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:Na.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=Da(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=function(e,t){(e=La(e)).length>t&&Na.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),Oa(r)}(La(t._vs),32);t._vs=Da(r);const n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&Na.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=Da(r);null==t.s?t.s=o:t.s!==o&&Na.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?Na.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&Na.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&Pa(t.r)?t.r=Ha(t.r,32):Na.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&Pa(t.s)?t.s=Ha(t.s,32):Na.throwArgumentError("signature missing or invalid s","signature",e);const r=La(t.s);r[0]>=128&&Na.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const n=Da(r);t._vs&&(Pa(t._vs)||Na.throwArgumentError("signature invalid _vs","signature",e),t._vs=Ha(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&Na.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}var Ya={exports:{}};
37
+ */function mt(e,t){const r=G(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const n="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${n})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${n})(...args) API requires all its args to be defined.`),r(...t)}:r}!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(ct)return ut;ct=1;var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case n:case i:case o:case d:case u:return e;default:switch(e=e&&e.$$typeof){case l:case a:case c:case h:case p:case s:return e;default:return f}}case r:return f}}}return e=Symbol.for("react.module.reference"),ut.ContextConsumer=a,ut.ContextProvider=s,ut.Element=t,ut.ForwardRef=c,ut.Fragment=n,ut.Lazy=h,ut.Memo=p,ut.Portal=r,ut.Profiler=i,ut.StrictMode=o,ut.Suspense=d,ut.SuspenseList=u,ut.isAsyncMode=function(){return!1},ut.isConcurrentMode=function(){return!1},ut.isContextConsumer=function(e){return m(e)===a},ut.isContextProvider=function(e){return m(e)===s},ut.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ut.isForwardRef=function(e){return m(e)===c},ut.isFragment=function(e){return m(e)===n},ut.isLazy=function(e){return m(e)===h},ut.isMemo=function(e){return m(e)===p},ut.isPortal=function(e){return m(e)===r},ut.isProfiler=function(e){return m(e)===i},ut.isStrictMode=function(e){return m(e)===o},ut.isSuspense=function(e){return m(e)===d},ut.isSuspenseList=function(e){return m(e)===u},ut.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===d||t===u||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===p||t.$$typeof===s||t.$$typeof===a||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},ut.typeOf=m,ut}():e.exports=(pt||(pt=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var m=e.type;switch(m){case n:case i:case o:case d:case u:return m;default:var g=m&&m.$$typeof;switch(g){case l:case a:case c:case h:case p:case s:return g;default:return f}}case r:return f}}}e=Symbol.for("react.module.reference");var g=a,y=s,b=t,v=c,x=n,w=h,E=p,A=r,C=i,k=o,T=d,R=u,S=!1,N=!1;ht.ContextConsumer=g,ht.ContextProvider=y,ht.Element=b,ht.ForwardRef=v,ht.Fragment=x,ht.Lazy=w,ht.Memo=E,ht.Portal=A,ht.Profiler=C,ht.StrictMode=k,ht.Suspense=T,ht.SuspenseList=R,ht.isAsyncMode=function(e){return S||(S=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},ht.isConcurrentMode=function(e){return N||(N=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},ht.isContextConsumer=function(e){return m(e)===a},ht.isContextProvider=function(e){return m(e)===s},ht.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ht.isForwardRef=function(e){return m(e)===c},ht.isFragment=function(e){return m(e)===n},ht.isLazy=function(e){return m(e)===h},ht.isMemo=function(e){return m(e)===p},ht.isPortal=function(e){return m(e)===r},ht.isProfiler=function(e){return m(e)===i},ht.isStrictMode=function(e){return m(e)===o},ht.isSuspense=function(e){return m(e)===d},ht.isSuspenseList=function(e){return m(e)===u},ht.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===d||t===u||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===p||t.$$typeof===s||t.$$typeof===a||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},ht.typeOf=m}()),ht)}(dt),"production"!==process.env.NODE_ENV&&(ft.propTypes={defaultTheme:je.exports.object,styles:je.exports.oneOfType([je.exports.string,je.exports.object,je.exports.func])});var gt="production"!==process.env.NODE_ENV?je.exports.oneOfType([je.exports.number,je.exports.string,je.exports.object,je.exports.array]):{};function yt(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...r){return e(...r)||t(...r)}}function bt(){return bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bt.apply(this,arguments)}function vt(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function xt(e){if(!vt(e))return e;const t={};return Object.keys(e).forEach((r=>{t[r]=xt(e[r])})),t}function wt(e,t,r={clone:!0}){const n=r.clone?bt({},e):e;return vt(e)&&vt(t)&&Object.keys(t).forEach((o=>{"__proto__"!==o&&(vt(t[o])&&o in e&&vt(e[o])?n[o]=wt(e[o],t[o],r):r.clone?n[o]=vt(t[o])?xt(t[o]):t[o]:n[o]=t[o])})),n}function Et(e,t,r,n,o){const i=e[t],s=o||t;if(null==i||"undefined"==typeof window)return null;let a;const l=i.type;return"function"!=typeof l||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(l)||(a="Did you accidentally use a plain function component for an element instead?"),void 0!==a?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const At=yt(je.exports.element,Et);At.isRequired=yt(je.exports.element.isRequired,Et);var Ct=At;function kt(e){return"production"===process.env.NODE_ENV?e:bt({},e,{"exact-prop: ​":t=>{const r=Object.keys(t).filter((t=>!e.hasOwnProperty(t)));return r.length>0?new Error(`The following props are not supported: ${r.map((e=>`\`${e}\``)).join(", ")}. Please remove them.`):null}})}function Tt(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const Rt=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function St(e,t=""){return e.displayName||e.name||function(e){const t=`${e}`.match(Rt);return t&&t[1]||""}(e)||t}function Nt(e,t,r){const n=St(t);return e.displayName||(""!==n?`${r}(${n})`:r)}function Mt(e,t,r,n,o){if("production"===process.env.NODE_ENV)return null;const i=e[t],s=o||t;return null==i?null:i&&1!==i.nodeType?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an HTMLElement.`):null}var Ot=je.exports.oneOfType([je.exports.func,je.exports.object]);function It(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Tt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ft(...e){return e.reduce(((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)}),(()=>{}))}function jt(e){return e&&e.ownerDocument||document}function Lt(e){return jt(e).defaultView||window}function _t(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Wt="undefined"!=typeof window?u.useLayoutEffect:u.useEffect;function Pt(e){const t=u.useRef(e);return Wt((()=>{t.current=e})),u.useCallback(((...e)=>(0,t.current)(...e)),[])}function Dt(...e){return u.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{_t(e,t)}))}),e)}let Bt,Ut=!0,Vt=!1;const Zt={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ht(e){e.metaKey||e.altKey||e.ctrlKey||(Ut=!0)}function zt(){Ut=!1}function Yt(){"hidden"===this.visibilityState&&Vt&&(Ut=!0)}function Gt(){const e=u.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",Ht,!0),t.addEventListener("mousedown",zt,!0),t.addEventListener("pointerdown",zt,!0),t.addEventListener("touchstart",zt,!0),t.addEventListener("visibilitychange",Yt,!0))}),[]),t=u.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return Ut||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!Zt[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(Vt=!0,window.clearTimeout(Bt),Bt=window.setTimeout((()=>{Vt=!1}),100),t.current=!1,!0)},ref:e}}function Xt(e,t){const r=bt({},t);return Object.keys(e).forEach((n=>{if(n.toString().match(/^(components|slots)$/))r[n]=bt({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},i=t[n];r[n]={},i&&Object.keys(i)?o&&Object.keys(o)?(r[n]=bt({},i),Object.keys(o).forEach((e=>{r[n][e]=Xt(o[e],i[e])}))):r[n]=i:r[n]=o}else void 0===r[n]&&(r[n]=e[n])})),r}function Jt(e,t,r){const n={};return Object.keys(e).forEach((o=>{n[o]=e[o].reduce(((e,n)=>{if(n){const o=t(n);""!==o&&e.push(o),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}const qt=e=>e;var Qt=(()=>{let e=qt;return{configure(t){e=t},generate:t=>e(t),reset(){e=qt}}})();const Kt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function $t(e,t,r="Mui"){const n=Kt[t];return n?`${r}-${n}`:`${Qt.generate(e)}-${t}`}function er(e,t,r="Mui"){const n={};return t.forEach((t=>{n[t]=$t(e,t,r)})),n}function tr(e,t){return t?wt(e,t,{clone:!1}):e}const rr={xs:0,sm:600,md:900,lg:1200,xl:1536},nr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${rr[e]}px)`};function or(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const e=n.breakpoints||nr;return t.reduce(((n,o,i)=>(n[e.up(e.keys[i])]=r(t[i]),n)),{})}if("object"==typeof t){const e=n.breakpoints||nr;return Object.keys(t).reduce(((n,o)=>{if(-1!==Object.keys(e.values||rr).indexOf(o))n[e.up(o)]=r(t[o],o);else{const e=o;n[e]=t[e]}return n}),{})}return r(t)}function ir(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){const r=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=r)return r}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function sr(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:ir(e,r)||n,t&&(o=t(o)),o}function ar(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],s=ir(e.theme,n)||{};return or(e,i,(e=>{let n=sr(s,o,e);return e===n&&"string"==typeof e&&(n=sr(s,o,`${t}${"default"===e?"":It(e)}`,e)),!1===r?n:{[r]:n}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:gt}:{},i.filterProps=[t],i}function lr(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((r=>{e[r]=t})),e)),{}),r=e=>Object.keys(e).reduce(((r,n)=>t[n]?tr(r,t[n](e)):r),{});return r.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},r.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),r}const cr={m:"margin",p:"padding"},dr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ur={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pr=function(e){const t={};return e=>(void 0===t[e]&&(t[e]=(e=>{if(e.length>2){if(!ur[e])return[e];e=ur[e]}const[t,r]=e.split(""),n=cr[t],o=dr[r]||"";return Array.isArray(o)?o.map((e=>n+e)):[n+o]})(e)),t[e])}(),hr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],mr=[...hr,...fr];function gr(e,t,r,n){var o;const i=null!=(o=ir(e,t,!1))?o:r;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function yr(e){return gr(e,"spacing",8,"spacing")}function br(e,t){if("string"==typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"==typeof r?-r:`-${r}`}function vr(e){return function(e,t){const r=yr(e.theme);return Object.keys(e).map((n=>function(e,t,r,n){if(-1===t.indexOf(r))return null;const o=function(e,t){return r=>e.reduce(((e,n)=>(e[n]=br(t,r),e)),{})}(pr(r),n);return or(e,e[r],o)}(e,t,n,r))).reduce(tr,{})}(e,mr)}function xr(e){return"number"!=typeof e?e:`${e}px solid`}"production"===process.env.NODE_ENV||hr.reduce(((e,t)=>(e[t]=gt,e)),{}),"production"===process.env.NODE_ENV||fr.reduce(((e,t)=>(e[t]=gt,e)),{}),vr.propTypes="production"!==process.env.NODE_ENV?mr.reduce(((e,t)=>(e[t]=gt,e)),{}):{},vr.filterProps=mr;const wr=ar({prop:"border",themeKey:"borders",transform:xr}),Er=ar({prop:"borderTop",themeKey:"borders",transform:xr}),Ar=ar({prop:"borderRight",themeKey:"borders",transform:xr}),Cr=ar({prop:"borderBottom",themeKey:"borders",transform:xr}),kr=ar({prop:"borderLeft",themeKey:"borders",transform:xr}),Tr=ar({prop:"borderColor",themeKey:"palette"}),Rr=ar({prop:"borderTopColor",themeKey:"palette"}),Sr=ar({prop:"borderRightColor",themeKey:"palette"}),Nr=ar({prop:"borderBottomColor",themeKey:"palette"}),Mr=ar({prop:"borderLeftColor",themeKey:"palette"}),Or=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=gr(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:br(t,e)});return or(e,e.borderRadius,r)}return null};Or.propTypes="production"!==process.env.NODE_ENV?{borderRadius:gt}:{},Or.filterProps=["borderRadius"];var Ir=lr(wr,Er,Ar,Cr,kr,Tr,Rr,Sr,Nr,Mr,Or),Fr=lr(ar({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),ar({prop:"display"}),ar({prop:"overflow"}),ar({prop:"textOverflow"}),ar({prop:"visibility"}),ar({prop:"whiteSpace"})),jr=lr(ar({prop:"flexBasis"}),ar({prop:"flexDirection"}),ar({prop:"flexWrap"}),ar({prop:"justifyContent"}),ar({prop:"alignItems"}),ar({prop:"alignContent"}),ar({prop:"order"}),ar({prop:"flex"}),ar({prop:"flexGrow"}),ar({prop:"flexShrink"}),ar({prop:"alignSelf"}),ar({prop:"justifyItems"}),ar({prop:"justifySelf"}));const Lr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=gr(e.theme,"spacing",8,"gap"),r=e=>({gap:br(t,e)});return or(e,e.gap,r)}return null};Lr.propTypes="production"!==process.env.NODE_ENV?{gap:gt}:{},Lr.filterProps=["gap"];const _r=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=gr(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:br(t,e)});return or(e,e.columnGap,r)}return null};_r.propTypes="production"!==process.env.NODE_ENV?{columnGap:gt}:{},_r.filterProps=["columnGap"];const Wr=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=gr(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:br(t,e)});return or(e,e.rowGap,r)}return null};Wr.propTypes="production"!==process.env.NODE_ENV?{rowGap:gt}:{},Wr.filterProps=["rowGap"];var Pr=lr(Lr,_r,Wr,ar({prop:"gridColumn"}),ar({prop:"gridRow"}),ar({prop:"gridAutoFlow"}),ar({prop:"gridAutoColumns"}),ar({prop:"gridAutoRows"}),ar({prop:"gridTemplateColumns"}),ar({prop:"gridTemplateRows"}),ar({prop:"gridTemplateAreas"}),ar({prop:"gridArea"})),Dr=lr(ar({prop:"color",themeKey:"palette"}),ar({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),ar({prop:"backgroundColor",themeKey:"palette"})),Br=lr(ar({prop:"position"}),ar({prop:"zIndex",themeKey:"zIndex"}),ar({prop:"top"}),ar({prop:"right"}),ar({prop:"bottom"}),ar({prop:"left"})),Ur=ar({prop:"boxShadow",themeKey:"shadows"});function Vr(e){return e<=1&&0!==e?100*e+"%":e}const Zr=ar({prop:"width",transform:Vr}),Hr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n,o;return{maxWidth:(null==(r=e.theme)||null==(n=r.breakpoints)||null==(o=n.values)?void 0:o[t])||rr[t]||Vr(t)}};return or(e,e.maxWidth,t)}return null};Hr.filterProps=["maxWidth"];const zr=ar({prop:"minWidth",transform:Vr}),Yr=ar({prop:"height",transform:Vr}),Gr=ar({prop:"maxHeight",transform:Vr}),Xr=ar({prop:"minHeight",transform:Vr});ar({prop:"size",cssProperty:"width",transform:Vr}),ar({prop:"size",cssProperty:"height",transform:Vr});var Jr=lr(Zr,Hr,zr,Yr,Gr,Xr,ar({prop:"boxSizing"}));const qr=ar({prop:"fontFamily",themeKey:"typography"}),Qr=ar({prop:"fontSize",themeKey:"typography"}),Kr=ar({prop:"fontStyle",themeKey:"typography"}),$r=ar({prop:"fontWeight",themeKey:"typography"}),en=ar({prop:"letterSpacing"}),tn=ar({prop:"textTransform"}),rn=ar({prop:"lineHeight"}),nn=ar({prop:"textAlign"});var on=lr(ar({prop:"typography",cssProperty:!1,themeKey:"typography"}),qr,Qr,Kr,$r,en,rn,nn,tn);const sn={borders:Ir.filterProps,display:Fr.filterProps,flexbox:jr.filterProps,grid:Pr.filterProps,positions:Br.filterProps,palette:Dr.filterProps,shadows:Ur.filterProps,sizing:Jr.filterProps,spacing:vr.filterProps,typography:on.filterProps},an={borders:Ir,display:Fr,flexbox:jr,grid:Pr,positions:Br,palette:Dr,shadows:Ur,sizing:Jr,spacing:vr,typography:on},ln=Object.keys(sn).reduce(((e,t)=>(sn[t].forEach((r=>{e[r]=an[t]})),e)),{}),cn=function(e=an){const t=Object.keys(e).reduce(((t,r)=>(e[r].filterProps.forEach((n=>{t[n]=e[r]})),t)),{});function r(e,r,n){const o={[e]:r,theme:n},i=t[e];return i?i(o):{[e]:r}}return function e(n){const{sx:o,theme:i={}}=n||{};if(!o)return null;function s(n){let o=n;if("function"==typeof n)o=n(i);else if("object"!=typeof n)return n;if(!o)return null;const s=function(e={}){var t;return(null==e||null==(t=e.keys)?void 0:t.reduce(((t,r)=>(t[e.up(r)]={},t)),{}))||{}}(i.breakpoints),a=Object.keys(s);let l=s;return Object.keys(o).forEach((n=>{const s="function"==typeof(a=o[n])?a(i):a;var a;if(null!=s)if("object"==typeof s)if(t[n])l=tr(l,r(n,s,i));else{const t=or({theme:i},s,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),r=new Set(t);return e.every((e=>r.size===Object.keys(e).length))}(t,s)?l=tr(l,t):l[n]=e({sx:s,theme:i})}else l=tr(l,r(n,s,i))})),function(e,t){return e.reduce(((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}(a,l)}return Array.isArray(o)?o.map(s):s(o)}}();cn.filterProps=["sx"];var dn=cn;function un(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const pn=["sx"];function hn(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=hn(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function fn(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=hn(e))&&(n&&(n+=" "),n+=t);return n}const mn=["values","unit","step"];var gn={borderRadius:4};const yn=["breakpoints","palette","spacing","shape"];function bn(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=e,s=un(e,yn),a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=un(e,mn),i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>bt({},e,{[t.key]:t.val})),{})})(t),s=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function c(e,o){const i=s.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==i&&"number"==typeof t[s[i]]?t[s[i]]:o)-n/100}${r})`}return bt({keys:s,values:i,up:a,down:l,between:c,only:function(e){return s.indexOf(e)+1<s.length?c(e,s[s.indexOf(e)+1]):a(e)},not:function(e){const t=s.indexOf(e);return 0===t?a(s[1]):t===s.length-1?l(s[t]):c(e,s[s.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},o)}(r),l=function(e=8){if(e.mui)return e;const t=yr({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(o);let c=wt({breakpoints:a,direction:"ltr",components:{},palette:bt({mode:"light"},n),spacing:l,shape:bt({},gn,i)},s);return c=t.reduce(((e,t)=>wt(e,t)),c),c}const vn=u.createContext(null);"production"!==process.env.NODE_ENV&&(vn.displayName="ThemeContext");var xn=vn;function wn(){const e=u.useContext(xn);return"production"!==process.env.NODE_ENV&&u.useDebugValue(e),e}var En="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function An(e){const{children:t,theme:r}=e,n=wn();"production"!==process.env.NODE_ENV&&null===n&&"function"==typeof r&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join("\n"));const o=u.useMemo((()=>{const e=null===n?r:function(e,t){if("function"==typeof t){const r=t(e);return"production"!==process.env.NODE_ENV&&(r||console.error(["MUI: You should return an object from your theme function, i.e.","<ThemeProvider theme={() => ({})} />"].join("\n"))),r}return bt({},e,t)}(n,r);return null!=e&&(e[En]=null!==n),e}),[r,n]);return nt.exports.jsx(xn.Provider,{value:o,children:t})}function Cn(e=null){const t=wn();return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}"production"!==process.env.NODE_ENV&&(An.propTypes={children:je.exports.node,theme:je.exports.oneOfType([je.exports.object,je.exports.func]).isRequired}),"production"!==process.env.NODE_ENV&&"production"!==process.env.NODE_ENV&&(An.propTypes=kt(An.propTypes));const kn=bn();function Tn(e=kn){return Cn(e)}const Rn=["className","component"],Sn=function(e={}){const{defaultTheme:t,defaultClassName:r="MuiBox-root",generateClassName:n,styleFunctionSx:o=dn}=e,i=mt("div")(o);return u.forwardRef((function(e,o){const s=Tn(t),a=function(e){const{sx:t}=e,r=un(e,pn),{systemProps:n,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((r=>{ln[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t})(r);let i;return i=Array.isArray(t)?[n,...t]:"function"==typeof t?(...e)=>{const r=t(...e);return vt(r)?bt({},n,r):n}:bt({},n,t),bt({},o,{sx:i})}(e),{className:l,component:c="div"}=a,d=un(a,Rn);return nt.exports.jsx(i,bt({as:c,ref:o,className:fn(l,n?n(r):r),theme:s},d))}))}();"production"!==process.env.NODE_ENV&&(Sn.propTypes={children:je.exports.node,component:je.exports.elementType,sx:je.exports.oneOfType([je.exports.arrayOf(je.exports.oneOfType([je.exports.func,je.exports.object,je.exports.bool])),je.exports.func,je.exports.object])});var Nn=Sn;const Mn=["variant"];function On(e){return 0===e.length}function In(e){const{variant:t}=e,r=un(e,Mn);let n=t||"";return Object.keys(r).sort().forEach((t=>{n+="color"===t?On(n)?e[t]:It(e[t]):`${On(n)?t:It(t)}${It(e[t].toString())}`})),n}const Fn=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],jn=["theme"],Ln=["theme"];function _n(e){return 0===Object.keys(e).length}function Wn(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const Pn=bn(),Dn=function(e={}){const{defaultTheme:t=Pn,rootShouldForwardProp:r=Wn,slotShouldForwardProp:n=Wn,styleFunctionSx:o=dn}=e;return(e,i={})=>{const{name:s,slot:a,skipVariantsResolver:l,skipSx:c,overridesResolver:d}=i,u=un(i,Fn),p=void 0!==l?l:a&&"Root"!==a||!1,h=c||!1;let f;var m;"production"!==process.env.NODE_ENV&&s&&(f=`${s}-${m=a||"Root",m.charAt(0).toLowerCase()+m.slice(1)}`);let g=Wn;"Root"===a?g=r:a&&(g=n);const y=mt(e,bt({shouldForwardProp:g,label:f},u)),b=(r,...n)=>{const i=n?n.map((e=>"function"==typeof e&&e.__emotion_real!==e?r=>{let{theme:n}=r,o=un(r,jn);return e(bt({theme:_n(n)?t:n},o))}:e)):[];let l=r;s&&d&&i.push((e=>{const r=_n(e.theme)?t:e.theme,n=((e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null)(s,r);if(n){const t={};return Object.entries(n).forEach((([n,o])=>{t[n]="function"==typeof o?o(bt({},e,{theme:r})):o})),d(e,t)}return null})),s&&!p&&i.push((e=>{const r=_n(e.theme)?t:e.theme;return((e,t,r,n)=>{var o,i;const{ownerState:s={}}=e,a=[],l=null==r||null==(o=r.components)||null==(i=o[n])?void 0:i.variants;return l&&l.forEach((r=>{let n=!0;Object.keys(r.props).forEach((t=>{s[t]!==r.props[t]&&e[t]!==r.props[t]&&(n=!1)})),n&&a.push(t[In(r.props)])})),a})(e,((e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);const n={};return r.forEach((e=>{const t=In(e.props);n[t]=e.style})),n})(s,r),r,s)})),h||i.push((e=>{const r=_n(e.theme)?t:e.theme;return o(bt({},e,{theme:r}))}));const c=i.length-n.length;if(Array.isArray(r)&&c>0){const e=new Array(c).fill("");l=[...r,...e],l.raw=[...r.raw,...e]}else"function"==typeof r&&r.__emotion_real!==r&&(l=e=>{let{theme:n}=e,o=un(e,Ln);return r(bt({theme:_n(n)?t:n},o))});const u=y(l,...i);if("production"!==process.env.NODE_ENV){let t;s&&(t=`${s}${a||""}`),void 0===t&&(t=`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return St(e,"Component");if("object"==typeof e)switch(e.$$typeof){case dt.exports.ForwardRef:return Nt(e,e.render,"ForwardRef");case dt.exports.Memo:return Nt(e,e.type,"memo");default:return}}}(e)})`),u.displayName=t}return u};return y.withConfig&&(b.withConfig=y.withConfig),b}}();var Bn=Dn;function Un(e){const{theme:t,name:r,props:n}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?Xt(t.components[r].defaultProps,n):n}function Vn(e){if(e.type)return e;if("#"===e.charAt(0))return Vn(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?`rgb${4===r.length?"a":""}(${r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Tt(9,e));let n,o=e.substring(t+1,e.length-1);if("color"===r){if(o=o.split(" "),n=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${n}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Tt(10,n))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:r,values:o,colorSpace:n}}function Zn(e,t){return e=Vn(e),t=function(e,t=0,r=1){return"production"!==process.env.NODE_ENV&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),Math.min(Math.max(t,e),r)}(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}(e)}function Hn(e){const t=Tn();return nt.exports.jsx(T.Provider,{value:"object"==typeof t?t:{},children:e.children})}function zn(e){const{children:t,theme:r}=e;return nt.exports.jsx(An,{theme:r,children:nt.exports.jsx(Hn,{children:t})})}"production"!==process.env.NODE_ENV&&(Hn.propTypes={children:je.exports.node}),"production"!==process.env.NODE_ENV&&(zn.propTypes={children:je.exports.node,theme:je.exports.oneOfType([je.exports.func,je.exports.object]).isRequired}),"production"!==process.env.NODE_ENV&&"production"!==process.env.NODE_ENV&&(zn.propTypes=kt(zn.propTypes));var Yn=function(){return Yn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yn.apply(this,arguments)};function Gn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function Xn(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function Jn(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function qn(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Qn={mode:"dark",primary:{main:"#FFE804"},secondary:{main:"#FFE804",contrastText:"#1A1A1B"},error:{main:"#FF6187",contrastText:"#FFFFFF"},warning:{main:"#EB8D27",contrastText:"#1A1A1B"},success:{main:"#55F9C7",contrastText:"#1A1A1B"},purple:{main:"#BC9CFF",contrastText:"#1A1A1B"},background:{default:"#252831",paper:"#33363F",paperContrast:"#41454F",backdrop:Zn("#000",.9),input:"#252831",tag:Zn("#FFF",.04)},text:{primary:"#FFF",secondary:Zn("#FFF",.5),disabled:Zn("#FFF",.3),placeholder:Zn("#FFF",.3),link:"#FFE804"},border:{main:"#454851",light:Zn("#FFF",.3),disabled:Zn("#FFF",.1)},hover:{default:Zn("#FFF",.1)}},Kn={mode:"light",primary:{main:"#1A1A1B"},secondary:{main:"#FFE804",contrastText:"#1A1A1B"},error:{main:"#EC5A7D",contrastText:"#FFFFFF"},warning:{main:"#B15600",contrastText:"#1A1A1B"},success:{main:"#2FBA90",contrastText:"#1A1A1B"},purple:{main:"#6851B4",contrastText:"#1A1A1B"},background:{default:"#F9F6E8",paper:"#FFFFFF",paperContrast:"#F6F6F6",backdrop:Zn("#000",.9),input:"#F0F0F0",tag:Zn("#1A1A1B",.04)},text:{primary:"#1A1A1B",secondary:Zn("#1A1A1B",.5),disabled:Zn("#1A1A1B",.3),placeholder:Zn("#1A1A1B",.3),link:"#1A1A1B"},border:{main:Zn("#454851",.1),light:Zn("#1A1A1B",.3),disabled:Zn("#1A1A1B",.1)},hover:{default:Zn("#1A1A1B",.1)}},$n=function(e,t,r){var n,o,i,a="light"===e,l=r?["zh-CN","ja-JP","ko-KR"].includes(r)?400:500:400,c=a?Kn:Qn;(null===(n=null==t?void 0:t.palette)||void 0===n?void 0:n.mode)===e&&(c=t.palette);var d={spacing:1,shape:{borderRadius:1},breakpoints:{values:{mobile:0,tablet:768,laptop:1024,desktop:1200,largeDesktop:1536}},typography:{fontFamily:Jn(Jn(["Manrope"],Xn("ja-JP"===r?["Meiryo"]:[]),!1),["Poppins","Inter","PingFangSC-Regular",'"Microsoft YaHei"',"sans-serif"],!1).join(","),fontSize:16,h1:{fontSize:36,lineHeight:"49px",fontWeight:600},h2:{fontSize:32,fontWeight:600,lineHeight:"44px"},h3:{fontSize:28,fontWeight:600,lineHeight:"38px"},caption:{fontSize:20,fontWeight:600,lineHeight:"28px"},h5:{fontSize:18,lineHeight:"24px",fontWeight:600},body1:{fontSize:16,lineHeight:"22px",fontWeight:l},body2:{fontSize:14,lineHeight:"19px",fontWeight:l},h6:{fontSize:12,lineHeight:"17px",fontWeight:l},button:{fontSize:16,lineHeight:1,fontWeight:600}},components:{MuiCssBaseline:{styleOverrides:{"::-webkit-scrollbar":{width:6,backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{backgroundColor:null===(o=c.border)||void 0===o?void 0:o.main,borderColor:null===(i=c.border)||void 0===i?void 0:i.main,borderRadius:100}}},MuiTypography:{defaultProps:{variantMapping:{h1:"h2",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"div",caption:"h5",subtitle1:"h5",subtitle2:"h5",body1:"div",body2:"div"}}}},zIndex:{tooltip:1500}};return Yn(Yn({},s(d,t)),{palette:c})};var eo=function(e,t){var r;return Yn({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&{colorScheme:null===(r=e.palette)||void 0===r?void 0:r.mode})},to=function(e){var t,r,n;return Yn({color:null===(t=e.palette)||void 0===t?void 0:t.text.primary,fontFamily:null===(r=e.typography)||void 0===r?void 0:r.fontFamily},(null===(n=e.typography)||void 0===n?void 0:n.body1)||{})},ro=function(e){var t;return Yn(Yn({},to(e)),{backgroundColor:null===(t=e.palette)||void 0===t?void 0:t.background.default,"@media print":{backgroundColor:"#FFF"}})};function no(e){var t=e.styles,r=function({props:e,name:t,defaultTheme:r}){return Un({theme:Tn(r),name:t,props:e})}({props:Gn(e,["styles"]),name:"DODOCssBaseline"}),n=r.children,o=r.enableColorScheme,i=void 0!==o&&o,s=r.container;return nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(ft,{styles:function(e){return function(e,t,r,n){var o,i,s,a,l,c;void 0===t&&(t=!1);var d={html:eo(e,t),"*, *::before, *::after":{boxSizing:"border-box"},"strong, b":{fontWeight:(null===(s=e.typography)||void 0===s?void 0:s.fontWeightBold)||"bolder"},body:Yn(Yn({margin:0},ro(e)),{"&::backdrop":{backgroundColor:null===(a=e.palette)||void 0===a?void 0:a.background.default}})};r&&(delete d.html,delete d.body,(o={})[r]=Yn(Yn({},d),to(e)),d=o);var u=null===(c=null===(l=e.components)||void 0===l?void 0:l.MuiCssBaseline)||void 0===c?void 0:c.styleOverrides;if(u){if(r){var p={};Object.keys(u).forEach((function(e){p["*"+e]=u[e]})),(i={})[r]=p,u=i}d=[d,u,n]}else d=[d,n];return d}(e,i,s,t)}}),n]})}function oo(e){return $t("MuiButton",e)}function io(e,t=[]){if(void 0===e)return{};const r={};return Object.keys(e).filter((r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r))).forEach((t=>{r[t]=e[t]})),r}function so(e){return"string"==typeof e}er("MuiButton",["root","active","disabled","focusVisible"]);const ao={disableDefaultClasses:!1},lo=u.createContext(ao);function co(e){const{disableDefaultClasses:t}=u.useContext(lo);return r=>t?"":e(r)}function uo(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((r=>{t[r]=e[r]})),t}const po=["elementType","externalSlotProps","ownerState"];function ho(e){var t;const{elementType:r,externalSlotProps:n,ownerState:o}=e,i=un(e,po),s=function(e,t){return"function"==typeof e?e(t):e}(n,o),{props:a,internalRef:l}=function(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:i}=e;if(!t){const e=fn(null==o?void 0:o.className,null==n?void 0:n.className,i,null==r?void 0:r.className),t=bt({},null==r?void 0:r.style,null==o?void 0:o.style,null==n?void 0:n.style),s=bt({},r,o,n);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}const s=io(bt({},o,n)),a=uo(n),l=uo(o),c=t(s),d=fn(null==c?void 0:c.className,null==r?void 0:r.className,i,null==o?void 0:o.className,null==n?void 0:n.className),u=bt({},null==c?void 0:c.style,null==r?void 0:r.style,null==o?void 0:o.style,null==n?void 0:n.style),p=bt({},c,r,l,a);return d.length>0&&(p.className=d),Object.keys(u).length>0&&(p.style=u),{props:p,internalRef:c.ref}}(bt({},i,{externalSlotProps:s})),c=function(e,t,r){return void 0===e||so(e)?t:bt({},t,{ownerState:bt({},t.ownerState,r)})}(r,bt({},a,{ref:Dt(l,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref)}),o);return c}const fo=["action","children","disabled","focusableWhenDisabled","onFocusVisible","slotProps","slots"],mo=u.forwardRef((function(e,t){var r;const{action:n,children:o,focusableWhenDisabled:i=!1,slotProps:s={},slots:a={}}=e,l=un(e,fo),c=u.useRef(),{active:d,focusVisible:p,setFocusVisible:h,getRootProps:f}=function(e={}){const{disabled:t=!1,focusableWhenDisabled:r,href:n,rootRef:o,tabIndex:i,to:s,type:a}=e,l=u.useRef(),[c,d]=u.useState(!1),{isFocusVisibleRef:p,onFocus:h,onBlur:f,ref:m}=Gt(),[g,y]=u.useState(!1);t&&!r&&g&&y(!1),u.useEffect((()=>{p.current=g}),[g,p]);const[b,v]=u.useState(""),x=e=>t=>{var r;g&&t.preventDefault(),null==(r=e.onMouseLeave)||r.call(e,t)},w=e=>t=>{var r;f(t),!1===p.current&&y(!1),null==(r=e.onBlur)||r.call(e,t)},E=e=>t=>{var r,n;l.current||(l.current=t.currentTarget),h(t),!0===p.current&&(y(!0),null==(n=e.onFocusVisible)||n.call(e,t)),null==(r=e.onFocus)||r.call(e,t)},A=()=>{const e=l.current;return"BUTTON"===b||"INPUT"===b&&["button","submit","reset"].includes(null==e?void 0:e.type)||"A"===b&&(null==e?void 0:e.href)},C=e=>r=>{var n;t||null==(n=e.onClick)||n.call(e,r)},k=e=>r=>{var n;t||(d(!0),document.addEventListener("mouseup",(()=>{d(!1)}),{once:!0})),null==(n=e.onMouseDown)||n.call(e,r)},T=e=>r=>{var n,o;null==(n=e.onKeyDown)||n.call(e,r),r.defaultMuiPrevented||(r.target!==r.currentTarget||A()||" "!==r.key||r.preventDefault(),r.target!==r.currentTarget||" "!==r.key||t||d(!0),r.target!==r.currentTarget||A()||"Enter"!==r.key||t||(null==(o=e.onClick)||o.call(e,r),r.preventDefault()))},R=e=>r=>{var n,o;r.target===r.currentTarget&&d(!1),null==(n=e.onKeyUp)||n.call(e,r),r.target!==r.currentTarget||A()||t||" "!==r.key||r.defaultMuiPrevented||null==(o=e.onClick)||o.call(e,r)},S=Dt(u.useCallback((e=>{var t;v(null!=(t=null==e?void 0:e.tagName)?t:"")}),[]),o,m,l),N={};return"BUTTON"===b?(N.type=null!=a?a:"button",r?N["aria-disabled"]=t:N.disabled=t):""!==b&&(n||s||(N.role="button",N.tabIndex=null!=i?i:0),t&&(N["aria-disabled"]=t,N.tabIndex=r?null!=i?i:0:-1)),{getRootProps:(t={})=>{const r=bt({},io(e),t);return delete r.onFocusVisible,bt({type:a},r,N,{onBlur:w(r),onClick:C(r),onFocus:E(r),onKeyDown:T(r),onKeyUp:R(r),onMouseDown:k(r),onMouseLeave:x(r),ref:S})},focusVisible:g,setFocusVisible:y,active:c,rootRef:S}}(bt({},e,{focusableWhenDisabled:i}));u.useImperativeHandle(n,(()=>({focusVisible:()=>{h(!0),c.current.focus()}})),[h]);const m=bt({},e,{active:d,focusableWhenDisabled:i,focusVisible:p}),g=(e=>{const{active:t,disabled:r,focusVisible:n}=e;return Jt({root:["root",r&&"disabled",n&&"focusVisible",t&&"active"]},co(oo))})(m),y=l.href||l.to?"a":"button",b=null!=(r=a.root)?r:y,v=ho({elementType:b,getSlotProps:f,externalForwardedProps:l,externalSlotProps:s.root,additionalProps:{ref:t},ownerState:m,className:g.root});return nt.exports.jsx(b,bt({},v,{children:o}))}));"production"!==process.env.NODE_ENV&&(mo.propTypes={action:je.exports.oneOfType([je.exports.func,je.exports.shape({current:je.exports.shape({focusVisible:je.exports.func.isRequired})})]),children:je.exports.node,disabled:je.exports.bool,focusableWhenDisabled:je.exports.bool,href:je.exports.string,onFocusVisible:je.exports.func,slotProps:je.exports.shape({root:je.exports.oneOfType([je.exports.func,je.exports.object])}),slots:je.exports.shape({root:je.exports.elementType}),to:je.exports.string});var go,yo,bo,vo=mo;(bo=go||(go={})).contained="contained",bo.outlined="outlined",bo.dashed="dashed",bo.second="second",bo.tag="tag",function(e){e.small="small",e.middle="middle",e.big="big"}(yo||(yo={}));var xo=function(e,t){var r,n,o,i,a,l=e.fullWidth,c=e.variant,d=e.sx,u=e.danger,p={px:16,py:10,typography:"button",whiteSpace:"nowrap",fontFamily:"inherit",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&[disabled]":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}};switch(e.size){case yo.small:p.height=36,p.borderRadius=8,p.typography="body2";break;case yo.big:p.height=60,p.borderRadius=16;break;default:p.height=48,p.borderRadius=8}l&&(p.display="flex",p.width="100%");var h="&:not([disabled]):hover, &:focus-visible";switch(c){case go.outlined:p=Yn(Yn({},p),((r={border:"solid 1px ".concat(u?t.palette.error.main:t.palette.primary.main),color:u?"error.main":"primary.main","&[disabled]":{color:"text.disabled",borderColor:"border.disabled"}})[h]={background:Zn(u?t.palette.error.main:t.palette.primary.main,.1)},r));break;case go.dashed:p=Yn(Yn({},p),((n={height:p.height-1,border:"dashed 1px ".concat(u?t.palette.error.main:t.palette.border.light),color:u?"error.main":"primary.main","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[h]={background:Zn(u?t.palette.error.main:t.palette.border.disabled,.1)},n));break;case go.second:p=Yn(Yn({},p),((o={backgroundColor:u?"error.main":t.palette.background.tag,border:"none",color:u?"error.contrastText":"text.primary","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[h]={background:u?Zn(t.palette.error.main,.1):Zn(t.palette.border.disabled,.2)},o));break;case go.tag:p=Yn(Yn({},p),((i={px:10,py:3,height:"auto",borderRadius:4,typography:"body2",backgroundColor:u?"error.main":"background.tag",border:"none",color:u?"error.contrastText":"primary.main","&[disabled]":{backgroundColor:"border.disabled",color:"text.disabled"}})[h]={background:u?Zn(t.palette.error.main,.1):Zn(t.palette.border.disabled,.2)},i));break;default:p=Yn(Yn({},p),((a={backgroundColor:u?"error.main":"secondary.main"})[h]={background:"linear-gradient(0deg, rgba(26, 26, 27, 0.1), rgba(26, 26, 27, 0.1)), ".concat(u?t.palette.error.main:(null==d?void 0:d.backgroundColor)||t.palette.secondary.main)},a.color=u?"error.contrastText":"secondary.contrastText",a["&[disabled]"]={backgroundColor:"border.disabled",color:"text.disabled"},a))}return s(p,d)},wo=function(e){var t=e.onClick,r=e.disabled,n=e.children,o=e.component,i=e.to,s=e.isLoading,a=e.fullWidth,l=e.variant,c=e.sx,d=e.danger,u=e.size;e.ref;var p=Gn(e,["onClick","disabled","children","component","to","isLoading","fullWidth","variant","sx","danger","size","ref"]),h=Tn(),f={disabled:r,sx:xo({fullWidth:a,variant:l,sx:c,danger:d,size:u},h),onClick:t,component:o,to:i};return nt.exports.jsx(Nn,Yn({},f,p,{component:vo,disabled:!!s||r,className:l||go.contained},{children:nt.exports.jsxs(nt.exports.Fragment,{children:[s&&nt.exports.jsx(Nn,{component:R,sx:{mr:8,"& path":{fill:h.palette.text.disabled},animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}}}),n]})}))};wo.Variant=go,wo.Size=yo;var Eo,Ao=Bn(vo)(Eo||(Eo=qn(["\n margin: 0;\n border: none;\n padding: 0;\n cursor: pointer;\n background: none;\n font-family: inherit;\n &:focus {\n outline: none;\n }\n &:active {\n outline: none;\n }\n"],["\n margin: 0;\n border: none;\n padding: 0;\n cursor: pointer;\n background: none;\n font-family: inherit;\n &:focus {\n outline: none;\n }\n &:active {\n outline: none;\n }\n"])));function Co(e){return $t("MuiInput",e)}var ko=er("MuiInput",["root","formControl","focused","disabled","error","multiline","input","inputMultiline","inputTypeSearch","adornedStart","adornedEnd"]);const To=u.createContext(void 0);"production"!==process.env.NODE_ENV&&(To.displayName="FormControlContext");var Ro=To;function So(e){const{defaultValue:t,disabled:r=!1,error:n=!1,onBlur:o,onChange:i,onFocus:s,required:a=!1,value:l,inputRef:c}=e,d=u.useContext(Ro);let p,h,f,m,g;var y,b,v;if(d){if(p=void 0,h=null!=(y=d.disabled)&&y,f=null!=(b=d.error)&&b,m=null!=(v=d.required)&&v,g=d.value,"production"!==process.env.NODE_ENV){const t=["defaultValue","disabled","error","required","value"].filter((t=>void 0!==e[t]));t.length>0&&console.warn(["MUI: You have set props on an input that is inside a FormControl.","Set these props on a FormControl instead. Otherwise they will be ignored.",`Ignored props: ${t.join(", ")}`].join("\n"))}}else p=t,h=r,f=n,m=a,g=l;const{current:x}=u.useRef(null!=g),w=u.useCallback((e=>{"production"!==process.env.NODE_ENV&&e&&"INPUT"!==e.nodeName&&!e.focus&&console.error(["MUI: You have provided a `slots.input` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join("\n"))}),[]),E=u.useRef(null),A=Dt(E,c,w),[C,k]=u.useState(!1);u.useEffect((()=>{!d&&h&&C&&(k(!1),null==o||o())}),[d,h,C,o]);const T=e=>t=>{var r,n;null!=d&&d.disabled?t.stopPropagation():(null==(r=e.onFocus)||r.call(e,t),d&&d.onFocus?null==d||null==(n=d.onFocus)||n.call(d):k(!0))},R=e=>(t,...r)=>{var n,o;if(!x&&null==(t.target||E.current))throw new Error("production"!==process.env.NODE_ENV?"MUI: Expected valid input target. Did you use a custom `slots.input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Tt(17));null==d||null==(n=d.onChange)||n.call(d,t),null==(o=e.onChange)||o.call(e,t,...r)};return{disabled:h,error:f,focused:C,formControlContext:d,getInputProps:(e={})=>{const t=bt({},{onBlur:o,onChange:i,onFocus:s},io(e)),r=bt({},e,t,{onBlur:(n=t,e=>{var t;null==(t=n.onBlur)||t.call(n,e),d&&d.onBlur?d.onBlur():k(!1)}),onChange:R(t),onFocus:T(t)});var n;return bt({},r,{"aria-invalid":f||void 0,defaultValue:p,ref:A,value:g,required:m,disabled:h})},getRootProps:(t={})=>{const r=bt({},io(e,["onBlur","onChange","onFocus"]),io(t));return bt({},t,r,{onClick:(n=r,e=>{var t;E.current&&e.currentTarget===e.target&&E.current.focus(),null==(t=n.onClick)||t.call(n,e)})});var n},inputRef:A,required:m,value:g}}const No=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","endAdornment","error","id","multiline","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","startAdornment","value","type","rows","slotProps","slots","minRows","maxRows"],Mo=u.forwardRef((function(e,t){var r,n,o;const{"aria-describedby":i,"aria-label":s,"aria-labelledby":a,autoComplete:l,autoFocus:c,className:d,defaultValue:u,disabled:p,endAdornment:h,error:f,id:m,multiline:g=!1,name:y,onClick:b,onChange:v,onKeyDown:x,onKeyUp:w,onFocus:E,onBlur:A,placeholder:C,readOnly:k,required:T,startAdornment:R,value:S,type:N,rows:M,slotProps:O={},slots:I={},minRows:F,maxRows:j}=e,L=un(e,No),{getRootProps:_,getInputProps:W,focused:P,formControlContext:D,error:B,disabled:U}=So({disabled:p,defaultValue:u,error:f,onBlur:A,onClick:b,onChange:v,onFocus:E,required:T,value:S}),V=g?void 0:null!=N?N:"text",Z=bt({},e,{disabled:U,error:B,focused:P,formControlContext:D,multiline:g,type:V}),H=(e=>{const{disabled:t,error:r,focused:n,formControlContext:o,multiline:i,startAdornment:s,endAdornment:a}=e;return Jt({root:["root",t&&"disabled",r&&"error",n&&"focused",Boolean(o)&&"formControl",i&&"multiline",Boolean(s)&&"adornedStart",Boolean(a)&&"adornedEnd"],input:["input",t&&"disabled",i&&"multiline"]},co(Co))})(Z),z={"aria-describedby":i,"aria-label":s,"aria-labelledby":a,autoComplete:l,autoFocus:c,id:m,onKeyDown:x,onKeyUp:w,name:y,placeholder:C,readOnly:k,type:V},Y=null!=(r=I.root)?r:"div",G=ho({elementType:Y,getSlotProps:_,externalSlotProps:O.root,externalForwardedProps:L,additionalProps:{ref:t},ownerState:Z,className:[H.root,d]}),X=g?null!=(n=I.textarea)?n:"textarea":null!=(o=I.input)?o:"input",J=ho({elementType:X,getSlotProps:e=>W(bt({},z,e)),externalSlotProps:O.input,additionalProps:bt({rows:g?M:void 0},g&&!so(X)&&{minRows:M||F,maxRows:M||j}),ownerState:Z,className:H.input});return"production"!==process.env.NODE_ENV&&g&&M&&(F||j)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),nt.exports.jsxs(Y,bt({},G,{children:[R,nt.exports.jsx(X,bt({},J)),h]}))}));"production"!==process.env.NODE_ENV&&(Mo.propTypes={"aria-describedby":je.exports.string,"aria-label":je.exports.string,"aria-labelledby":je.exports.string,autoComplete:je.exports.string,autoFocus:je.exports.bool,className:je.exports.string,defaultValue:je.exports.any,disabled:je.exports.bool,endAdornment:je.exports.node,error:je.exports.bool,id:je.exports.string,inputRef:je.exports.oneOfType([je.exports.func,je.exports.shape({current:je.exports.object})]),maxRows:je.exports.number,minRows:je.exports.number,multiline:je.exports.bool,name:je.exports.string,onBlur:je.exports.func,onChange:je.exports.func,onClick:je.exports.func,onFocus:je.exports.func,onKeyDown:je.exports.func,onKeyUp:je.exports.func,placeholder:je.exports.string,readOnly:je.exports.bool,required:je.exports.bool,rows:je.exports.number,slotProps:je.exports.shape({input:je.exports.oneOfType([je.exports.func,je.exports.object]),root:je.exports.oneOfType([je.exports.func,je.exports.object])}),slots:je.exports.shape({input:je.exports.elementType,root:je.exports.elementType,textarea:je.exports.elementType}),startAdornment:je.exports.node,type:je.exports.oneOf(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"]),value:je.exports.any});var Oo=Mo;function Io(e){var t,r,n=e.fullWidth,o=e.height,i=e.suffixGap,a=e.error,l=e.sx,c=Gn(e,["fullWidth","height","suffixGap","error","sx"]);return nt.exports.jsx(Nn,Yn({component:"div",sx:s(Yn(Yn(Yn((t={position:"relative",display:n?"flex":"inline-flex",alignItems:"center",border:"1px solid",borderColor:a?"error.main":"border.main",borderRadius:8,backgroundColor:"background.input"},t["&.".concat(ko.disabled)]={color:"text.disabled",cursor:"default"},t.height=o,t),n&&{width:"100%"}),{"& > *:not(input):not(.MuiSelect-select):first-of-type":{ml:i,whiteSpace:"nowrap"},"& > *:not(input):last-child":{mr:i,whiteSpace:"nowrap"}}),a?{}:(r={},r["&.".concat(ko.focused)]={borderColor:"text.secondary"},r)),l)},c))}var Fo=Bn(Nn)((function(e){var t=e.theme,r="{\n color: ".concat(t.palette.text.placeholder,";\n font-size: 14px;\n font-weight: 500;\n opacity: 1;\n }");return"\n font: inherit;\n font-size: 16px;\n font-weight: 600;\n line-height: 19px;\n padding: ".concat(t.spacing(14,16),";\n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n }\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }\n height: 100%;\n width: 100%;\n border: none;\n color: ").concat(t.palette.text.primary,";\n background-color: transparent;\n &::-webkit-input-placeholder ").concat(r,";\n &::-moz-placeholder ").concat(r,";\n &:-ms-input-placeholder ").concat(r,";\n &::-ms-input-placeholder ").concat(r,";\n &:focus {\n outline: 0;\n }\n &:invalid {\n box-shadow: none;\n }\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n &.").concat(ko.disabled," {\n opacity: 1;\n -webkit-text-fill-color: ").concat(t.palette.text.disabled,";\n }\n ")})),jo=h((function(e,t){var r=e.fullWidth,n=e.error,o=e.errorMsg,i=e.sx,s=e.suffix,a=e.prefix,l=e.height,c=e.suffixGap,d=void 0===c?16:c,u=e.dataTestId,p=e.inputSx,h=Gn(e,["fullWidth","error","errorMsg","sx","suffix","prefix","height","suffixGap","dataTestId","inputSx"]),f=v((function(e){return nt.exports.jsx(Io,Yn({fullWidth:r,height:l,suffixGap:d,error:n,sx:i,"data-testid":u},e))}),[r,l,d,n,u,JSON.stringify(i)]);return nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Oo,Yn({slots:{root:f,input:Fo},startAdornment:a,endAdornment:s,slotProps:{input:{component:"input",sx:p}}},h,{ref:t})),o?nt.exports.jsx(Nn,Yn({sx:{typography:"body2",color:"error.main",mt:6}},{children:o})):""]})})),Lo=h((function(e,t){var r=e.weak,n=e.color,o=e.sx,i=Gn(e,["weak","color","sx"]),a=r?"text.primary":"text.secondary",l=r?"text.secondary":"text.primary";return n&&(a=n,l=n),nt.exports.jsx(Nn,Yn({ref:t,sx:s(Yn({color:a,opacity:n&&!r?.5:1},{"&:hover":{color:l,opacity:n&&r?.5:1}}),o)},i))}));function _o(e){var t=e.clearValue,r=e.hideSearchIcon,n=e.height,o=void 0===n?48:n,i=e.inputSx,a=Gn(e,["clearValue","hideSearchIcon","height","inputSx"]),l=Tn(),c=a.value;return nt.exports.jsx(jo,Yn({prefix:r?null:nt.exports.jsx(M,{style:{width:24,minWidth:24,height:24,color:l.palette.text.placeholder}}),suffix:c&&t?nt.exports.jsx(Lo,Yn({sx:{width:24,minWidth:24,height:24,mr:12,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",backgroundColor:"background.tag",cursor:"pointer"},onClick:t},{children:nt.exports.jsx(Nn,{component:O,sx:{width:14,height:14}})})):null},a,{inputSx:s({pl:4},i),height:o}))}var Wo=function(e){var t=e.sx,r=Tn();return nt.exports.jsx(Nn,{sx:Yn({width:20,color:r.palette.primary.main,animation:"spin 3s linear infinite","@keyframes spin":{"100%":{transform:"rotate(360deg)"}}},t),component:R})},Po=u.forwardRef((function(e,t){var r=e.sx,n=e.variant,o=e.width,i=e.height,s=Gn(e,["sx","variant","width","height"]),a=n||"rounded",l="circular"===a?null!=i?i:o:null!=i?i:"1.2rem",c="circular"===a?"50%":4,d=Tn();return nt.exports.jsx(Nn,Yn({ref:t},s,{sx:Yn({width:o,height:l,backgroundColor:Zn(d.palette.text.primary,"light"===d.palette.mode?.11:.13),borderRadius:c,animation:"pulseKeyframe 2s ease-in-out 0.5s infinite","@keyframes pulseKeyframe":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}},r)}))})),Do=h((function(e,t){var r,n=e.loading,o=e.loadingSx,i=e.loadingProps,a=e.children,l=Gn(e,["loading","loadingSx","loadingProps","children"]);return nt.exports.jsx(Nn,Yn({ref:t},l,{children:n?nt.exports.jsx(Po,Yn({height:"fit-content",width:null!==(r=null==o?void 0:o.width)&&void 0!==r?r:"100%"},i,{sx:s({borderRadius:4},o,null==i?void 0:i.sx)},{children:nt.exports.jsx(Nn,Yn({sx:{visibility:"hidden"}},{children:"1"}))})):a}))}));function Bo(e){return e.substring(2).toLowerCase()}function Uo(e){const{children:t,disableReactTree:r=!1,mouseEvent:n="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,s=u.useRef(!1),a=u.useRef(null),l=u.useRef(!1),c=u.useRef(!1);u.useEffect((()=>(setTimeout((()=>{l.current=!0}),0),()=>{l.current=!1})),[]);const d=Dt(t.ref,a),p=Pt((e=>{const t=c.current;c.current=!1;const n=jt(a.current);if(!l.current||!a.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,n))return;if(s.current)return void(s.current=!1);let i;i=e.composedPath?e.composedPath().indexOf(a.current)>-1:!n.documentElement.contains(e.target)||a.current.contains(e.target),i||!r&&t||o(e)})),h=e=>r=>{c.current=!0;const n=t.props[e];n&&n(r)},f={ref:d};return!1!==i&&(f[i]=h(i)),u.useEffect((()=>{if(!1!==i){const e=Bo(i),t=jt(a.current),r=()=>{s.current=!0};return t.addEventListener(e,p),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,p),t.removeEventListener("touchmove",r)}}}),[p,i]),!1!==n&&(f[n]=h(n)),u.useEffect((()=>{if(!1!==n){const e=Bo(n),t=jt(a.current);return t.addEventListener(e,p),()=>{t.removeEventListener(e,p)}}}),[p,n]),nt.exports.jsx(u.Fragment,{children:u.cloneElement(t,f)})}"production"!==process.env.NODE_ENV&&(Uo.propTypes={children:Ct.isRequired,disableReactTree:je.exports.bool,mouseEvent:je.exports.oneOf(["onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp",!1]),onClickAway:je.exports.func.isRequired,touchEvent:je.exports.oneOf(["onTouchEnd","onTouchStart",!1])}),"production"!==process.env.NODE_ENV&&(Uo.propTypes=kt(Uo.propTypes));var Vo="top",Zo="bottom",Ho="right",zo="left",Yo=[Vo,Zo,Ho,zo],Go=Yo.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),Xo=[].concat(Yo,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),Jo=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function qo(e){return e?(e.nodeName||"").toLowerCase():null}function Qo(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ko(e){return e instanceof Qo(e).Element||e instanceof Element}function $o(e){return e instanceof Qo(e).HTMLElement||e instanceof HTMLElement}function ei(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Qo(e).ShadowRoot||e instanceof ShadowRoot)}var ti={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];$o(o)&&qo(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});$o(n)&&qo(n)&&(Object.assign(n.style,i),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function ri(e){return e.split("-")[0]}var ni=Math.max,oi=Math.min,ii=Math.round;function si(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function ai(){return!/^((?!chrome|android).)*safari/i.test(si())}function li(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&$o(e)&&(o=e.offsetWidth>0&&ii(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&ii(n.height)/e.offsetHeight||1);var s=(Ko(e)?Qo(e):window).visualViewport,a=!ai()&&r,l=(n.left+(a&&s?s.offsetLeft:0))/o,c=(n.top+(a&&s?s.offsetTop:0))/i,d=n.width/o,u=n.height/i;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function ci(e){var t=li(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function di(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&ei(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ui(e){return Qo(e).getComputedStyle(e)}function pi(e){return["table","td","th"].indexOf(qo(e))>=0}function hi(e){return((Ko(e)?e.ownerDocument:e.document)||window.document).documentElement}function fi(e){return"html"===qo(e)?e:e.assignedSlot||e.parentNode||(ei(e)?e.host:null)||hi(e)}function mi(e){return $o(e)&&"fixed"!==ui(e).position?e.offsetParent:null}function gi(e){for(var t=Qo(e),r=mi(e);r&&pi(r)&&"static"===ui(r).position;)r=mi(r);return r&&("html"===qo(r)||"body"===qo(r)&&"static"===ui(r).position)?t:r||function(e){var t=/firefox/i.test(si());if(/Trident/i.test(si())&&$o(e)&&"fixed"===ui(e).position)return null;var r=fi(e);for(ei(r)&&(r=r.host);$o(r)&&["html","body"].indexOf(qo(r))<0;){var n=ui(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}function yi(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function bi(e,t,r){return ni(e,oi(t,r))}function vi(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function xi(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}var wi={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,a=ri(r.placement),l=yi(a),c=[zo,Ho].indexOf(a)>=0?"height":"width";if(i&&s){var d=function(e,t){return vi("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:xi(e,Yo))}(o.padding,r),u=ci(i),p="y"===l?Vo:zo,h="y"===l?Zo:Ho,f=r.rects.reference[c]+r.rects.reference[l]-s[l]-r.rects.popper[c],m=s[l]-r.rects.reference[l],g=gi(i),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=f/2-m/2,v=d[p],x=y-u[c]-d[h],w=y/2-u[c]/2+b,E=bi(v,w,x),A=l;r.modifiersData[n]=((t={})[A]=E,t.centerOffset=E-w,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&di(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ei(e){return e.split("-")[1]}var Ai={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ci(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,p=s.x,h=void 0===p?0:p,f=s.y,m=void 0===f?0:f,g="function"==typeof d?d({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),v=zo,x=Vo,w=window;if(c){var E=gi(r),A="clientHeight",C="clientWidth";E===Qo(r)&&"static"!==ui(E=hi(r)).position&&"absolute"===a&&(A="scrollHeight",C="scrollWidth"),(o===Vo||(o===zo||o===Ho)&&"end"===i)&&(x=Zo,m-=(u&&E===w&&w.visualViewport?w.visualViewport.height:E[A])-n.height,m*=l?1:-1),o!==zo&&(o!==Vo&&o!==Zo||"end"!==i)||(v=Ho,h-=(u&&E===w&&w.visualViewport?w.visualViewport.width:E[C])-n.width,h*=l?1:-1)}var k,T=Object.assign({position:a},c&&Ai),R=!0===d?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:ii(r*o)/o||0,y:ii(n*o)/o||0}}({x:h,y:m},Qo(r)):{x:h,y:m};return h=R.x,m=R.y,l?Object.assign({},T,((k={})[x]=b?"0":"",k[v]=y?"0":"",k.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",k)):Object.assign({},T,((t={})[x]=b?m+"px":"",t[v]=y?h+"px":"",t.transform="",t))}var ki={passive:!0},Ti={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ti[e]}))}var Si={start:"end",end:"start"};function Ni(e){return e.replace(/start|end/g,(function(e){return Si[e]}))}function Mi(e){var t=Qo(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Oi(e){return li(hi(e)).left+Mi(e).scrollLeft}function Ii(e){var t=ui(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function Fi(e){return["html","body","#document"].indexOf(qo(e))>=0?e.ownerDocument.body:$o(e)&&Ii(e)?e:Fi(fi(e))}function ji(e,t){var r;void 0===t&&(t=[]);var n=Fi(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=Qo(n),s=o?[i].concat(i.visualViewport||[],Ii(n)?n:[]):n,a=t.concat(s);return o?a:a.concat(ji(fi(s)))}function Li(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _i(e,t,r){return"viewport"===t?Li(function(e,t){var r=Qo(e),n=hi(e),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=ai();(c||!c&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+Oi(e),y:l}}(e,r)):Ko(t)?function(e,t){var r=li(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):Li(function(e){var t,r=hi(e),n=Mi(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=ni(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=ni(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+Oi(e),l=-n.scrollTop;return"rtl"===ui(o||r).direction&&(a+=ni(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(hi(e)))}function Wi(e){var t,r=e.reference,n=e.element,o=e.placement,i=o?ri(o):null,s=o?Ei(o):null,a=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(i){case Vo:t={x:a,y:r.y-n.height};break;case Zo:t={x:a,y:r.y+r.height};break;case Ho:t={x:r.x+r.width,y:l};break;case zo:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=i?yi(i):null;if(null!=c){var d="y"===c?"height":"width";switch(s){case"start":t[c]=t[c]-(r[d]/2-n[d]/2);break;case"end":t[c]=t[c]+(r[d]/2-n[d]/2)}}return t}function Pi(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,i=r.strategy,s=void 0===i?e.strategy:i,a=r.boundary,l=void 0===a?"clippingParents":a,c=r.rootBoundary,d=void 0===c?"viewport":c,u=r.elementContext,p=void 0===u?"popper":u,h=r.altBoundary,f=void 0!==h&&h,m=r.padding,g=void 0===m?0:m,y=vi("number"!=typeof g?g:xi(g,Yo)),b="popper"===p?"reference":"popper",v=e.rects.popper,x=e.elements[f?b:p],w=function(e,t,r,n){var o="clippingParents"===t?function(e){var t=ji(fi(e)),r=["absolute","fixed"].indexOf(ui(e).position)>=0&&$o(e)?gi(e):e;return Ko(r)?t.filter((function(e){return Ko(e)&&di(e,r)&&"body"!==qo(e)})):[]}(e):[].concat(t),i=[].concat(o,[r]),s=i[0],a=i.reduce((function(t,r){var o=_i(e,r,n);return t.top=ni(o.top,t.top),t.right=oi(o.right,t.right),t.bottom=oi(o.bottom,t.bottom),t.left=ni(o.left,t.left),t}),_i(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(Ko(x)?x:x.contextElement||hi(e.elements.popper),l,d,s),E=li(e.elements.reference),A=Wi({reference:E,element:v,strategy:"absolute",placement:o}),C=Li(Object.assign({},v,A)),k="popper"===p?C:E,T={top:w.top-k.top+y.top,bottom:k.bottom-w.bottom+y.bottom,left:w.left-k.left+y.left,right:k.right-w.right+y.right},R=e.modifiersData.offset;if("popper"===p&&R){var S=R[o];Object.keys(T).forEach((function(e){var t=[Ho,Zo].indexOf(e)>=0?1:-1,r=[Vo,Zo].indexOf(e)>=0?"y":"x";T[e]+=S[r]*t}))}return T}var Di={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,s=r.altAxis,a=void 0===s||s,l=r.fallbackPlacements,c=r.padding,d=r.boundary,u=r.rootBoundary,p=r.altBoundary,h=r.flipVariations,f=void 0===h||h,m=r.allowedAutoPlacements,g=t.options.placement,y=ri(g),b=l||(y!==g&&f?function(e){if("auto"===ri(e))return[];var t=Ri(e);return[Ni(e),t,Ni(t)]}(g):[Ri(g)]),v=[g].concat(b).reduce((function(e,r){return e.concat("auto"===ri(r)?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?Xo:l,d=Ei(n),u=d?a?Go:Go.filter((function(e){return Ei(e)===d})):Yo,p=u.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=u);var h=p.reduce((function(t,r){return t[r]=Pi(e,{placement:r,boundary:o,rootBoundary:i,padding:s})[ri(r)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:r,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:m}):r)}),[]),x=t.rects.reference,w=t.rects.popper,E=new Map,A=!0,C=v[0],k=0;k<v.length;k++){var T=v[k],R=ri(T),S="start"===Ei(T),N=[Vo,Zo].indexOf(R)>=0,M=N?"width":"height",O=Pi(t,{placement:T,boundary:d,rootBoundary:u,altBoundary:p,padding:c}),I=N?S?Ho:zo:S?Zo:Vo;x[M]>w[M]&&(I=Ri(I));var F=Ri(I),j=[];if(i&&j.push(O[R]<=0),a&&j.push(O[I]<=0,O[F]<=0),j.every((function(e){return e}))){C=T,A=!1;break}E.set(T,j)}if(A)for(var L=function(e){var t=v.find((function(t){var r=E.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},_=f?3:1;_>0&&"break"!==L(_);_--);t.placement!==C&&(t.modifiersData[n]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Bi(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Ui(e){return[Vo,Ho,Zo,zo].some((function(t){return e[t]>=0}))}var Vi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=void 0===o?[0,0]:o,s=Xo.reduce((function(e,r){return e[r]=function(e,t,r){var n=ri(e),o=[zo,Vo].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},t,{placement:e})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[zo,Ho].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(r,t.rects,i),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=s}},Zi={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=void 0===o||o,s=r.altAxis,a=void 0!==s&&s,l=r.boundary,c=r.rootBoundary,d=r.altBoundary,u=r.padding,p=r.tether,h=void 0===p||p,f=r.tetherOffset,m=void 0===f?0:f,g=Pi(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),y=ri(t.placement),b=Ei(t.placement),v=!b,x=yi(y),w="x"===x?"y":"x",E=t.modifiersData.popperOffsets,A=t.rects.reference,C=t.rects.popper,k="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,T="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(E){if(i){var N,M="y"===x?Vo:zo,O="y"===x?Zo:Ho,I="y"===x?"height":"width",F=E[x],j=F+g[M],L=F-g[O],_=h?-C[I]/2:0,W="start"===b?A[I]:C[I],P="start"===b?-C[I]:-A[I],D=t.elements.arrow,B=h&&D?ci(D):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=U[M],Z=U[O],H=bi(0,A[I],B[I]),z=v?A[I]/2-_-H-V-T.mainAxis:W-H-V-T.mainAxis,Y=v?-A[I]/2+_+H+Z+T.mainAxis:P+H+Z+T.mainAxis,G=t.elements.arrow&&gi(t.elements.arrow),X=G?"y"===x?G.clientTop||0:G.clientLeft||0:0,J=null!=(N=null==R?void 0:R[x])?N:0,q=F+Y-J,Q=bi(h?oi(j,F+z-J-X):j,F,h?ni(L,q):L);E[x]=Q,S[x]=Q-F}if(a){var K,$="x"===x?Vo:zo,ee="x"===x?Zo:Ho,te=E[w],re="y"===w?"height":"width",ne=te+g[$],oe=te-g[ee],ie=-1!==[Vo,zo].indexOf(y),se=null!=(K=null==R?void 0:R[w])?K:0,ae=ie?ne:te-A[re]-C[re]-se+T.altAxis,le=ie?te+A[re]+C[re]-se-T.altAxis:oe,ce=h&&ie?function(e,t,r){var n=bi(e,t,r);return n>r?r:n}(ae,te,le):bi(h?ae:ne,te,h?le:oe);E[w]=ce,S[w]=ce-te}t.modifiersData[n]=S}},requiresIfExists:["offset"]};function Hi(e,t,r){void 0===r&&(r=!1);var n,o,i=$o(t),s=$o(t)&&function(e){var t=e.getBoundingClientRect(),r=ii(t.width)/e.offsetWidth||1,n=ii(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),a=hi(t),l=li(e,s,r),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(i||!i&&!r)&&(("body"!==qo(t)||Ii(a))&&(c=(n=t)!==Qo(n)&&$o(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:Mi(n)),$o(t)?((d=li(t,!0)).x+=t.clientLeft,d.y+=t.clientTop):a&&(d.x=Oi(a))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function zi(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}var Yi={placement:"bottom",modifiers:[],strategy:"absolute"};function Gi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}var Xi=function(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,i=void 0===o?Yi:o;return function(e,t,r){void 0===r&&(r=i);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Yi,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,d={state:a,setOptions:function(r){var o="function"==typeof r?r(a.options):r;u(),a.options=Object.assign({},i,a.options,o),a.scrollParents={reference:Ko(e)?ji(e):e.contextElement?ji(e.contextElement):[],popper:ji(t)};var s,c,p=function(e){var t=zi(e);return Jo.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}((s=[].concat(n,a.options.modifiers),c=s.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return a.orderedModifiers=p.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var i=o({state:a,name:t,instance:d,options:n});l.push(i||function(){})}})),d.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,r=e.popper;if(Gi(t,r)){a.rects={reference:Hi(t,gi(r),"fixed"===a.options.strategy),popper:ci(r)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var o=a.orderedModifiers[n],i=o.fn,s=o.options,l=void 0===s?{}:s,u=o.name;"function"==typeof i&&(a=i({state:a,options:l,name:u,instance:d})||a)}else a.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(e){d.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(o())}))}))),s}),destroy:function(){u(),c=!0}};if(!Gi(e,t))return d;function u(){l.forEach((function(e){return e()})),l=[]}return d.setOptions(r).then((function(e){!c&&r.onFirstUpdate&&r.onFirstUpdate(e)})),d}}({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,s=n.resize,a=void 0===s||s,l=Qo(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",r.update,ki)})),a&&l.addEventListener("resize",r.update,ki),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",r.update,ki)})),a&&l.removeEventListener("resize",r.update,ki)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Wi({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,s=void 0===i||i,a=r.roundOffsets,l=void 0===a||a,c={placement:ri(t.placement),variation:Ei(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ci(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ci(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ti,Vi,Di,Zi,wi,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=Pi(t,{elementContext:"reference"}),a=Pi(t,{altBoundary:!0}),l=Bi(s,n),c=Bi(a,o,i),d=Ui(l),u=Ui(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]});const Ji=u.forwardRef((function(e,t){const{children:r,container:n,disablePortal:o=!1}=e,[i,s]=u.useState(null),a=Dt(u.isValidElement(r)?r.ref:null,t);if(Wt((()=>{o||s(function(e){return"function"==typeof e?e():e}(n)||document.body)}),[n,o]),Wt((()=>{if(i&&!o)return _t(t,i),()=>{_t(t,null)}}),[t,i,o]),o){if(u.isValidElement(r)){const e={ref:a};return u.cloneElement(r,e)}return nt.exports.jsx(u.Fragment,{children:r})}return nt.exports.jsx(u.Fragment,{children:i?X.createPortal(r,i):i})}));"production"!==process.env.NODE_ENV&&(Ji.propTypes={children:je.exports.node,container:je.exports.oneOfType([Mt,je.exports.func]),disablePortal:je.exports.bool}),"production"!==process.env.NODE_ENV&&(Ji.propTypes=kt(Ji.propTypes));var qi=Ji;function Qi(e){return $t("MuiPopper",e)}er("MuiPopper",["root"]);const Ki=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],$i=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function es(e){return"function"==typeof e?e():e}function ts(e){return void 0!==e.nodeType}const rs={},ns=u.forwardRef((function(e,t){var r;const{anchorEl:n,children:o,direction:i,disablePortal:s,modifiers:a,open:l,placement:c,popperOptions:d,popperRef:p,slotProps:h={},slots:f={},TransitionProps:m}=e,g=un(e,Ki),y=u.useRef(null),b=Dt(y,t),v=u.useRef(null),x=Dt(v,p),w=u.useRef(x);Wt((()=>{w.current=x}),[x]),u.useImperativeHandle(p,(()=>v.current),[]);const E=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(c,i),[A,C]=u.useState(E),[k,T]=u.useState(es(n));u.useEffect((()=>{v.current&&v.current.forceUpdate()})),u.useEffect((()=>{n&&T(es(n))}),[n]),Wt((()=>{if(!k||!l)return;if("production"!==process.env.NODE_ENV&&k&&ts(k)&&1===k.nodeType){const e=k.getBoundingClientRect();"test"!==process.env.NODE_ENV&&0===e.top&&0===e.left&&0===e.right&&0===e.bottom&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}let e=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{C(e.placement)}}];null!=a&&(e=e.concat(a)),d&&null!=d.modifiers&&(e=e.concat(d.modifiers));const t=Xi(k,y.current,bt({placement:E},d,{modifiers:e}));return w.current(t),()=>{t.destroy(),w.current(null)}}),[k,s,a,l,d,E]);const R={placement:A};null!==m&&(R.TransitionProps=m);const S=Jt({root:["root"]},co(Qi)),N=null!=(r=f.root)?r:"div",M=ho({elementType:N,externalSlotProps:h.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:S.root});return nt.exports.jsx(N,bt({},M,{children:"function"==typeof o?o(R):o}))})),os=u.forwardRef((function(e,t){const{anchorEl:r,children:n,container:o,direction:i="ltr",disablePortal:s=!1,keepMounted:a=!1,modifiers:l,open:c,placement:d="bottom",popperOptions:p=rs,popperRef:h,style:f,transition:m=!1,slotProps:g={},slots:y={}}=e,b=un(e,$i),[v,x]=u.useState(!0);if(!a&&!c&&(!m||v))return null;let w;if(o)w=o;else if(r){const e=es(r);w=e&&ts(e)?jt(e).body:jt(null).body}const E=m?{in:c,onEnter:()=>{x(!1)},onExited:()=>{x(!0)}}:void 0;return nt.exports.jsx(qi,{disablePortal:s,container:w,children:nt.exports.jsx(ns,bt({anchorEl:r,direction:i,disablePortal:s,modifiers:l,ref:t,open:m?!v:c,placement:d,popperOptions:p,popperRef:h,slotProps:g,slots:y},b,{style:bt({position:"fixed",top:0,left:0,display:c||!a||m&&!v?void 0:"none"},f),TransitionProps:E,children:n}))})}));"production"!==process.env.NODE_ENV&&(os.propTypes={anchorEl:yt(je.exports.oneOfType([Mt,je.exports.object,je.exports.func]),(e=>{if(e.open){const t=es(e.anchorEl);if(t&&ts(t)&&1===t.nodeType){const e=t.getBoundingClientRect();if("test"!==process.env.NODE_ENV&&0===e.top&&0===e.left&&0===e.right&&0===e.bottom)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}else if(!t||"function"!=typeof t.getBoundingClientRect||!ts(t)&&null!=t.contextElement&&1!==t.contextElement.nodeType)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join("\n"))}return null})),children:je.exports.oneOfType([je.exports.node,je.exports.func]),container:je.exports.oneOfType([Mt,je.exports.func]),direction:je.exports.oneOf(["ltr","rtl"]),disablePortal:je.exports.bool,keepMounted:je.exports.bool,modifiers:je.exports.arrayOf(je.exports.shape({data:je.exports.object,effect:je.exports.func,enabled:je.exports.bool,fn:je.exports.func,name:je.exports.any,options:je.exports.object,phase:je.exports.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:je.exports.arrayOf(je.exports.string),requiresIfExists:je.exports.arrayOf(je.exports.string)})),open:je.exports.bool.isRequired,placement:je.exports.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:je.exports.shape({modifiers:je.exports.array,onFirstUpdate:je.exports.func,placement:je.exports.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:je.exports.oneOf(["absolute","fixed"])}),popperRef:Ot,slotProps:je.exports.shape({root:je.exports.oneOfType([je.exports.func,je.exports.object])}),slots:je.exports.shape({root:je.exports.elementType}),transition:je.exports.bool});var is=os,ss="undefined"!=typeof window?u.useLayoutEffect:u.useEffect;function as(e,t,r,n,o){var i="undefined"!=typeof window&&void 0!==window.matchMedia,s=Xn(u.useState((function(){return o&&i?r(e).matches:n?n(e).matches:t})),2),a=s[0],l=s[1];return ss((function(){var t=!0;if(i){var n=r(e),o=function(){t&&l(n.matches)};return o(),n.addListener(o),function(){t=!1,n.removeListener(o)}}}),[e,r,i]),a}var ls=u.useSyncExternalStore;function cs(e,t,r,n){var o=u.useCallback((function(){return t}),[t]),i=u.useMemo((function(){if(null!==n){var t=n(e).matches;return function(){return t}}return o}),[o,e,n]),s=Xn(u.useMemo((function(){if(null===r)return[o,function(){return function(){}}];var t=r(e);return[function(){return t.matches},function(e){return t.addListener(e),function(){t.removeListener(e)}}]}),[o,r,e]),2),a=s[0],l=s[1];return ls(l,a,i)}function ds(){return{isMobile:function(e,t){void 0===t&&(t={});var r=Cn(),n="undefined"!=typeof window&&void 0!==window.matchMedia,o=Un({name:"MuiUseMediaQuery",props:t,theme:r||void 0}),i=o.defaultMatches,s=void 0!==i&&i,a=o.matchMedia,l=void 0===a?n?window.matchMedia:null:a,c=o.ssrMatchMedia,d=void 0===c?null:c,p=o.noSsr;"production"!==process.env.NODE_ENV&&null===r&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join("\n"));var h=e(r);h=h.replace(/^@media( ?)/m,"");var f=(void 0!==ls?cs:as)(h,s,l,d,p);return"production"!==process.env.NODE_ENV&&u.useDebugValue({query:h,match:f}),f}((function(e){return e.breakpoints.down("tablet")}))}}var us="DODOTooltip-arrow",ps=Bn("div")((function(e){var t,r=e.theme;return"\n z-index: ".concat(null===(t=r.zIndex)||void 0===t?void 0:t.tooltip,';\n &[data-popper-placement*="bottom"] .').concat(us," {\n top: 0;\n margin-top: -").concat(8,'px;\n &::before {\n transform-origin: 0 100%;\n }\n }\n &[data-popper-placement*="top"] .').concat(us," {\n bottom: 0;\n margin-bottom: -").concat(8,'px;\n &::before {\n transform-origin: 100% 0;\n }\n }\n &[data-popper-placement*="right"] .').concat(us,' {\n &::before {\n transform-origin: 100% 100%;\n }\n }\n &[data-popper-placement*="left"] .').concat(us," {\n &::before {\n transform-origin: 0 0;\n }\n }\n ")}));function hs(e){var t=e.title,r=e.sx,n=e.maxWidth,o=void 0===n?"auto":n,i=e.popperOptions,a=e.children,l=e.onlyHover,c=e.enterDelay,d=void 0===c?100:c,u=e.leaveDelay,p=void 0===u?0:u,h=Gn(e,["title","sx","maxWidth","popperOptions","children","onlyHover","enterDelay","leaveDelay"]);Tn();var f=ds().isMobile,v=g(!1),x=g(!1),w=g(),E=g(),A=Xn(m(),2),C=A[0],k=A[1],T=Xn(m(),2),R=T[0],S=T[1],N=Xn(m(!1),2),M=N[0],O=N[1],I=f&&!l,F={ref:k};if(I)F.onClick=function(){O(!0)};else{var j=function(){x.current=!0,clearTimeout(E.current),clearTimeout(w.current),w.current=setTimeout((function(){O(!0)}),d)};F.onMouseOut=j,F.onMouseEnter=j,F.onMouseLeave=function(){x.current=!1,clearTimeout(E.current),clearTimeout(w.current),E.current=setTimeout((function(){x.current||v.current||O(!1)}),p)}}return y((function(){return function(){O(!1),clearTimeout(E.current),clearTimeout(w.current)}}),[]),nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsxs(is,Yn({open:M,anchorEl:C,slots:{root:ps},popperOptions:s({modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"preventOverflow",options:{padding:20}},{name:"arrow",options:{element:R,padding:4}}]},i)},h,{children:[nt.exports.jsx(Nn,Yn({sx:Yn({typography:"h6",padding:12,maxWidth:o,fontWeight:500,backgroundColor:"background.paperContrast",borderRadius:8,color:"text.secondary",borderColor:"border.main",borderWidth:1,borderStyle:"solid",whiteSpace:"pre-wrap"},r),onMouseEnter:function(){I||(v.current=!0,clearTimeout(E.current),clearTimeout(w.current))},onMouseLeave:function(){I||(v.current=!1,clearTimeout(E.current),clearTimeout(w.current),E.current=setTimeout((function(){x.current||v.current||O(!1)}),p))},onClick:function(e){return e.stopPropagation()}},{children:t})),nt.exports.jsx(Nn,{ref:S,className:us,sx:{overflow:"hidden",position:"absolute",width:16,height:9,boxSizing:"border-box",color:"background.paperContrast",bottom:0,marginBottom:-8,"&::before":{transformOrigin:"100% 0",content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)",border:"solid 1px",borderColor:"border.main"}}})]})),nt.exports.jsx(Uo,Yn({onClickAway:function(){I&&O(!1)}},{children:b(a,F)}))]})}function fs(e){var t=e.title,r=e.ml,n=e.mr,o=e.size,i=void 0===o?15:o,s=e.sx,a=e.maxWidth,l=e.container;return e.onlyHover,t?nt.exports.jsx(hs,Yn({title:t,placement:"top",container:l,maxWidth:a,onlyHover:!0},{children:nt.exports.jsx(Lo,{component:S,sx:Yn({ml:r,mr:n,width:i,height:i},s)})})):null}function ms(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function gs(e){return parseInt(Lt(e).getComputedStyle(e).paddingRight,10)||0}function ys(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),r=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),r="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||r}(e);t&&r&&ms(e,o)}))}function bs(e,t){let r=-1;return e.some(((e,n)=>!!t(e)&&(r=n,!0))),r}const vs=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function xs(e){const t=[],r=[];return Array.from(e.querySelectorAll(vs)).forEach(((e,n)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}(e))}(e)&&(0===o?t.push(e):r.push({documentOrder:n,tabIndex:o,node:e}))})),r.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function ws(){return!0}function Es(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:o=!1,getTabbable:i=xs,isEnabled:s=ws,open:a}=e,l=u.useRef(!1),c=u.useRef(null),d=u.useRef(null),p=u.useRef(null),h=u.useRef(null),f=u.useRef(!1),m=u.useRef(null),g=Dt(t.ref,m),y=u.useRef(null);u.useEffect((()=>{a&&m.current&&(f.current=!r)}),[r,a]),u.useEffect((()=>{if(!a||!m.current)return;const e=jt(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||("production"!==process.env.NODE_ENV&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join("\n")),m.current.setAttribute("tabIndex","-1")),f.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}}),[a]),u.useEffect((()=>{if(!a||!m.current)return;const e=jt(m.current),t=t=>{const{current:r}=m;if(null!==r)if(e.hasFocus()&&!n&&s()&&!l.current){if(!r.contains(e.activeElement)){if(t&&h.current!==t.target||e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!f.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==d.current||(n=i(m.current)),n.length>0){var o,a;const e=Boolean((null==(o=y.current)?void 0:o.shiftKey)&&"Tab"===(null==(a=y.current)?void 0:a.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else r.focus()}}else l.current=!1},r=t=>{y.current=t,!n&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(l.current=!0,d.current&&d.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",r,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&t(null)}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",t),e.removeEventListener("keydown",r,!0)}}),[r,n,o,s,a,i]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0};return nt.exports.jsxs(u.Fragment,{children:[nt.exports.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),u.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0,h.current=e.target;const r=t.props.onFocus;r&&r(e)}}),nt.exports.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}function As(e){return $t("MuiModal",e)}"production"!==process.env.NODE_ENV&&(Es.propTypes={children:Ct,disableAutoFocus:je.exports.bool,disableEnforceFocus:je.exports.bool,disableRestoreFocus:je.exports.bool,getTabbable:je.exports.func,isEnabled:je.exports.func,open:je.exports.bool.isRequired}),"production"!==process.env.NODE_ENV&&(Es.propTypes=kt(Es.propTypes)),er("MuiModal",["root","hidden","backdrop"]);const Cs=["children","closeAfterTransition","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],ks=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&ms(e.modalRef,!1);const n=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);ys(t,e.mount,e.modalRef,n,!0);const o=bs(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),r)}mount(e,t){const r=bs(this.containers,(t=>-1!==t.modals.indexOf(e))),n=this.containers[r];n.restore||(n.restore=function(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(function(e){const t=jt(e);return t.body===e?Lt(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(n)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(jt(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${gs(n)+e}px`;const t=jt(n).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{r.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${gs(t)+e}px`}))}let e;if(n.parentNode instanceof DocumentFragment)e=jt(n).body;else{const t=n.parentElement,r=Lt(n);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===r.getComputedStyle(t).overflowY?t:n}r.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{r.forEach((({value:e,el:t,property:r})=>{e?t.style.setProperty(r,e):t.style.removeProperty(r)}))}}(n,t))}remove(e,t=!0){const r=this.modals.indexOf(e);if(-1===r)return r;const n=bs(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[n];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&ms(e.modalRef,t),ys(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&ms(e.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},Ts=u.forwardRef((function(e,t){var r,n;const{children:o,closeAfterTransition:i=!1,container:s,disableAutoFocus:a=!1,disableEnforceFocus:l=!1,disableEscapeKeyDown:c=!1,disablePortal:d=!1,disableRestoreFocus:p=!1,disableScrollLock:h=!1,hideBackdrop:f=!1,keepMounted:m=!1,manager:g=ks,onBackdropClick:y,onClose:b,onKeyDown:v,open:x,onTransitionEnter:w,onTransitionExited:E,slotProps:A={},slots:C={}}=e,k=un(e,Cs),T=g,[R,S]=u.useState(!x),N=u.useRef({}),M=u.useRef(null),O=u.useRef(null),I=Dt(O,t),F=function(e){return!!e&&e.props.hasOwnProperty("in")}(o),j=null==(r=e["aria-hidden"])||r,L=()=>(N.current.modalRef=O.current,N.current.mountNode=M.current,N.current),_=()=>{T.mount(L(),{disableScrollLock:h}),O.current&&(O.current.scrollTop=0)},W=Pt((()=>{const e=function(e){return"function"==typeof e?e():e}(s)||jt(M.current).body;T.add(L(),e),O.current&&_()})),P=u.useCallback((()=>T.isTopModal(L())),[T]),D=Pt((e=>{M.current=e,e&&O.current&&(x&&P()?_():ms(O.current,j))})),B=u.useCallback((()=>{T.remove(L(),j)}),[T,j]);u.useEffect((()=>()=>{B()}),[B]),u.useEffect((()=>{x?W():F&&i||B()}),[x,B,F,i,W]);const U=bt({},e,{closeAfterTransition:i,disableAutoFocus:a,disableEnforceFocus:l,disableEscapeKeyDown:c,disablePortal:d,disableRestoreFocus:p,disableScrollLock:h,exited:R,hideBackdrop:f,keepMounted:m}),V=(e=>{const{open:t,exited:r}=e;return Jt({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},co(As))})(U),Z={};void 0===o.props.tabIndex&&(Z.tabIndex="-1"),F&&(Z.onEnter=Ft((()=>{S(!1),w&&w()}),o.props.onEnter),Z.onExited=Ft((()=>{S(!0),E&&E(),i&&B()}),o.props.onExited));const H=null!=(n=C.root)?n:"div",z=ho({elementType:H,externalSlotProps:A.root,externalForwardedProps:k,additionalProps:{ref:I,role:"presentation",onKeyDown:e=>{v&&v(e),"Escape"===e.key&&P()&&(c||(e.stopPropagation(),b&&b(e,"escapeKeyDown")))}},className:V.root,ownerState:U}),Y=C.backdrop,G=ho({elementType:Y,externalSlotProps:A.backdrop,additionalProps:{"aria-hidden":!0,onClick:e=>{e.target===e.currentTarget&&(y&&y(e),b&&b(e,"backdropClick"))},open:x},className:V.backdrop,ownerState:U});return m||x||F&&!R?nt.exports.jsx(qi,{ref:D,container:s,disablePortal:d,children:nt.exports.jsxs(H,bt({},z,{children:[!f&&Y?nt.exports.jsx(Y,bt({},G)):null,nt.exports.jsx(Es,{disableEnforceFocus:l,disableAutoFocus:a,disableRestoreFocus:p,isEnabled:P,open:x,children:u.cloneElement(o,Z)})]}))}):null}));"production"!==process.env.NODE_ENV&&(Ts.propTypes={children:Ct.isRequired,closeAfterTransition:je.exports.bool,container:je.exports.oneOfType([Mt,je.exports.func]),disableAutoFocus:je.exports.bool,disableEnforceFocus:je.exports.bool,disableEscapeKeyDown:je.exports.bool,disablePortal:je.exports.bool,disableRestoreFocus:je.exports.bool,disableScrollLock:je.exports.bool,hideBackdrop:je.exports.bool,keepMounted:je.exports.bool,onBackdropClick:je.exports.func,onClose:je.exports.func,onTransitionEnter:je.exports.func,onTransitionExited:je.exports.func,open:je.exports.bool.isRequired,slotProps:je.exports.shape({backdrop:je.exports.oneOfType([je.exports.func,je.exports.object]),root:je.exports.oneOfType([je.exports.func,je.exports.object])}),slots:je.exports.shape({backdrop:je.exports.elementType,root:je.exports.elementType})});var Rs,Ss,Ns=Ts,Ms=h((function(e,t){var r=e.open,n=e.className,o=Gn(e,["open","className"]);return nt.exports.jsx("div",Yn({className:fn({"MuiBackdrop-open":r},n),ref:t},o))})),Os=Bn(Ns)(Rs||(Rs=qn(["\n position: absolute;\n z-index: 1300;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n display: flex;\n align-items: flex-end;\n"],["\n position: absolute;\n z-index: 1300;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n display: flex;\n align-items: flex-end;\n"]))),Is=Bn(Ms)(Ss||(Ss=qn(["\n z-index: -1;\n position: absolute;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n background-color: ",";\n -webkit-tap-highlight-color: transparent;\n"],["\n z-index: -1;\n position: absolute;\n right: 0;\n bottom: 0;\n top: 0;\n left: 0;\n background-color: ",";\n -webkit-tap-highlight-color: transparent;\n"])),(function(e){return e.theme.palette.background.backdrop}));function Fs(e){return nt.exports.jsx(Os,Yn({slots:{backdrop:Is}},e))}var js=h((function(e,t){var r=Tn(),n=e.size,o=void 0===n?18:n,i=e.sx,s=Gn(e,["size","sx"]);return nt.exports.jsx(Nn,Yn({component:"span",sx:Yn({position:"relative",cursor:"pointer",userSelect:"none",width:o,height:o,"&:hover > .checkbox-icon":{borderColor:r.palette.text.primary}},i)},{children:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,Yn({component:"input",type:"checkbox",ref:t,sx:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,m:0,p:0,zIndex:1,"&:checked + .checkbox-icon":{border:"none",backgroundColor:"secondary.main",color:"secondary.contrastText","& svg":{display:"inline-block"}}}},s)),nt.exports.jsx(Nn,Yn({component:"span",className:"checkbox-icon",sx:{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:4,width:o,height:o,borderStyle:"solid",borderWidth:1,flex:1,borderColor:r.palette.text.secondary,".Mui-focusVisible &":{outline:"none",outlineOffset:2},"input:disabled ~ &":{borderColor:r.palette.text.disabled}}},{children:nt.exports.jsx(Nn,{component:N,sx:{display:"none",width:"75%",height:"75%"}})}))]})}))}));function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ls.apply(this,arguments)}function _s(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const Ws=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Ps=e=>e?6:5,Ds=new Map,Bs=new Map,Us=(e,t,r,n,o,i)=>{clearTimeout(o);const s=(e=>({_s:e,status:Ws[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}))(t),a=new Map(n.current);a.set(e,s),r(a),n.current=a,i&&i({key:e,current:s})},Vs=["transition","transitionTimeout"],Zs=(e,t)=>!0===e||!(!e||!e[t]),Hs=A({}),zs=(e,t,r)=>(n,o)=>{const i=t?`${e}__${t}`:e;let s=i;r&&Object.keys(r).forEach((e=>{const t=r[e];t&&(s+=` ${i}--${!0===t?e:`${e}-${t}`}`)}));let a="function"==typeof n?n(o):n;return"string"==typeof a&&(a=a.trim(),a&&(s+=` ${a}`)),s},Ys=(e,t)=>{if(!t)return e;const r=Ls({},e);return Object.keys(t).forEach((n=>{const o=e[n],i=t[n];r[n]="function"==typeof i&&o?(...e)=>{o(...e),i(...e)}:i})),r},Gs=e=>nt.exports.jsx(Hs.Provider,Ls({},e)),Xs=e=>{do{e=e.parentElement}while(e&&!e.hasAttribute("data-szh-adn"));return e},Js=(e,t,r)=>e?t>0?t-1:r-1:(t+1)%r,qs=(e,t)=>{const{activeElement:r}=document;if(!r||!r.hasAttribute("data-szh-adn-btn")||Xs(r)!==t.currentTarget)return;const n=t.currentTarget.querySelectorAll("[data-szh-adn-btn]"),{length:o}=n;for(let i=0;i<o;i++)if(n[i]===r){let r=Js(e,i,o);for(;Xs(n[i])!==Xs(n[r]);)r=Js(e,r,o);i!==r&&(t.preventDefault(),n[r].focus());break}},Qs=["providerValue","className"],Ks=h(((e,t)=>{let{providerValue:r,className:n}=e,o=_s(e,Qs);const{accordionProps:i}={accordionProps:{"data-szh-adn":"",onKeyDown:e=>"ArrowUp"===e.key?qs(!0,e):"ArrowDown"===e.key&&qs(!1,e)}};return nt.exports.jsx(Gs,{value:r,children:nt.exports.jsx("div",Ls({},Ys(i,o),{ref:t,className:zs("szh-accordion")(n)}))})}));Ks.displayName="ControlledAccordion";const $s=["allowMultiple","initialEntered","mountOnEnter","unmountOnExit","transition","transitionTimeout","onStateChange"],ea=h(((e,t)=>{let{allowMultiple:r,initialEntered:n,mountOnEnter:o,unmountOnExit:i,transition:s,transitionTimeout:a,onStateChange:l}=e,c=_s(e,$s);const d=((e={})=>{let{transition:t,transitionTimeout:r}=e,n=_s(e,Vs);const o=(({allowMultiple:e,enter:t=!0,exit:r=!0,preEnter:n,preExit:o,timeout:i,initialEntered:s,mountOnEnter:a,unmountOnExit:l,onStateChange:c}={})=>{const[d,u]=m(Ds),p=g(d),h=g(Bs),[f,y]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(i),b=v(((e,t)=>{const{initialEntered:r=s}=t||{},n=r?2:Ps(a);Us(e,n,u,p),h.current.set(e,{})}),[s,a]),x=v((e=>{const t=new Map(p.current);return!!t.delete(e)&&(u(t),p.current=t,h.current.delete(e),!0)}),[]),w=v((e=>{const t=p.current.get(e);if(!t)return void("production"!==process.env.NODE_ENV&&console.error(`[React-Transition-State] invalid key: ${e}`));const{timeoutId:r}=h.current.get(e),n=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return Ps(t)}})(t._s,l);n&&Us(e,n,u,p,r,c)}),[c,l]),E=v(((i,s)=>{const a=p.current.get(i);if(!a)return void("production"!==process.env.NODE_ENV&&console.error(`[React-Transition-State] invalid key: ${i}`));const d=h.current.get(i),m=e=>{switch(Us(i,e,u,p,d.timeoutId,c),e){case 1:f>=0&&(d.timeoutId=setTimeout((()=>w(i)),f));break;case 4:y>=0&&(d.timeoutId=setTimeout((()=>w(i)),y));break;case 0:case 3:d.timeoutId=setTimeout((()=>m(e+1)),0)}},g=a.isEnter;"boolean"!=typeof s&&(s=!g),s?g||(m(t?n?0:1:2),!e&&p.current.forEach(((e,t)=>t!==i&&E(t,!1)))):g&&m(r?o?3:4:Ps(l))}),[c,w,e,t,r,n,o,f,y,l]),A=v((t=>{if(e||!1===t)for(const e of p.current.keys())E(e,t)}),[e,E]);return{stateMap:d,toggle:E,toggleAll:A,endTransition:w,setItem:b,deleteItem:x}})(Ls({timeout:r,enter:Zs(t,"enter"),exit:Zs(t,"exit"),preEnter:Zs(t,"preEnter"),preExit:Zs(t,"preExit")},n));return Ls({mountOnEnter:!!n.mountOnEnter,initialEntered:!!n.initialEntered},o)})({allowMultiple:r,initialEntered:n,mountOnEnter:o,unmountOnExit:i,transition:s,transitionTimeout:a,onStateChange:l});return nt.exports.jsx(Ks,Ls({},c,{ref:t,providerValue:d}))}));ea.displayName="Accordion";let ta=0;const ra=x||(()=>{const[e,t]=m();return y((()=>t(++ta)),[]),e&&`szh-adn-${e}`}),na="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?w:y;function oa(e,t){"function"==typeof e?e(t):e.current=t}function ia(e,t){return E((()=>e?t?r=>{oa(e,r),oa(t,r)}:e:t),[e,t])}const sa=["itemKey","initialEntered"],aa=["forwardedRef","itemRef","state","toggle","className","disabled","header","headingTag","headingProps","buttonProps","contentProps","panelProps","children"],la=(e,t)=>"function"==typeof e?e(t):e,ca=f((e=>{let{forwardedRef:t,itemRef:r,state:n,toggle:o,className:i,disabled:s,header:a,headingTag:l="h3",headingProps:c,buttonProps:d,contentProps:u,panelProps:p,children:h}=e,f=_s(e,aa);const y={state:n,toggle:o,disabled:s},{buttonProps:b,panelProps:v}=(({state:e,toggle:t,disabled:r})=>{const n=ra(),o=n&&n+"-",i={id:n,"aria-controls":o,"aria-expanded":e.isEnter,onClick:t};return r?i.disabled=!0:i["data-szh-adn-btn"]="",{buttonProps:i,panelProps:{id:o,"aria-labelledby":n,role:"region"}}})(y),[x,w]=(({status:e,isResolved:t})=>{const[r,n]=m(),o=g(null);return na((()=>{("preEnter"===e||"preExit"===e)&&n(o.current.getBoundingClientRect().height)}),[e]),[{height:"preEnter"===e||"exiting"===e?0:"entering"===e||"preExit"===e?r:void 0,overflow:t?void 0:"hidden"},o]})(n),E=ia(p&&p.ref,w),{status:A,isMounted:C,isEnter:k}=n;return nt.exports.jsxs("div",Ls({},f,{ref:ia(t,r),className:zs("szh-accordion","item",{status:A,expanded:k})(i,n),children:[nt.exports.jsx(l,Ls({},c,{style:Ls({margin:0},c&&c.style),className:zs("szh-accordion","item-heading")(c&&c.className,n),children:nt.exports.jsx("button",Ls({},Ys(b,d),{type:"button",className:zs("szh-accordion","item-btn")(d&&d.className,n),children:la(a,y)}))})),C&&nt.exports.jsx("div",Ls({},u,{style:Ls({display:"exited"===A?"none":void 0},x,u&&u.style),className:zs("szh-accordion","item-content")(u&&u.className,n),children:nt.exports.jsx("div",Ls({},Ys(v,p),{ref:E,className:zs("szh-accordion","item-panel")(p&&p.className,n),children:la(h,y)}))}))]}))}));ca.displayName="AccordionItem";const da=(e=>{const t=h(((t,r)=>{let{itemKey:n,initialEntered:o}=t,i=_s(t,sa);return nt.exports.jsx(e,Ls({forwardedRef:r},i,(({itemKey:e,initialEntered:t,disabled:r}={})=>{const n=g(null),o=(()=>{const e=C(Hs);if("production"!==process.env.NODE_ENV&&!e.stateMap)throw new Error("[React-Accordion] Cannot find a <AccordionProvider/> above this AccordionItem.");return e})(),i=null!=e?e:n.current,s=((e,t,r)=>{const{stateMap:n,mountOnEnter:o,initialEntered:i}=e,s=null!=r?r:i;return n.get(t)||{status:s?"entered":o?"unmounted":"exited",isMounted:!o,isEnter:s,isResolved:!0}})(o,i,t),{setItem:a,deleteItem:l,toggle:c}=o;return y((()=>{if(r)return;const o=null!=e?e:n.current;return a(o,{initialEntered:t}),()=>{l(o)}}),[a,l,e,t,r]),{itemRef:n,state:s,toggle:v((e=>c(i,e)),[c,i])}})({itemKey:n,initialEntered:o,disabled:i.disabled})))}));return t.displayName="WithAccordionItem",t})(ca);function ua(e){var t=e.sx,r=e.buttonProps,n=Gn(e,["sx","buttonProps"]);return nt.exports.jsx(Nn,Yn({component:da,sx:s({"& button":{p:0,border:"none",width:"100%",backgroundColor:"transparent",cursor:"pointer"}},t),buttonProps:Yn({className:function(e){var t=e.isEnter;return"".concat(t?"active":"")}},r)},n))}function pa({input:e,showDecimals:t=4,showPrecisionDecimals:r=2,showIntegerOnly:n=!1,showDecimalsOnly:o=!1,noGroupSeparator:s=!1}){const a=new i(e);if(a.isNaN())return"-";let l=a.dp(t,i.ROUND_DOWN);return l.eq(0)&&(a.gt(0)||a.lt(0))&&(l=a.sd(null!=r?r:t,i.ROUND_DOWN)),n&&(l=l.integerValue(i.ROUND_DOWN)),o&&(l=l.minus(l.integerValue(i.ROUND_DOWN))),s?l.toFormat({decimalSeparator:".",groupSeparator:"",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0}):l.toFormat()}function ha({input:e,decimals:t,showPrecisionDecimals:r=2,noGroupSeparator:n}){if(null==e)return"-";const o=new i(e);if(o.isNaN())return"-";return pa({input:o,showDecimals:void 0===t?0:t>6?6:t>4?4:t,showPrecisionDecimals:r,noGroupSeparator:n})}function fa(e){if("number"==typeof e)return fa(new i(e));if(e.isNaN())return"NaN";if(e.isNegative())return`-${fa(e.negated())}`;if(e.isZero())return"0";let t=e.integerValue(i.ROUND_FLOOR),r=e.minus(t),n="";for(;!t.isZero();){n=t.modulo(10).toString().toString()+n,t=t.idiv(10)}if(""===n&&(n="0"),r.isZero())return n;n+=".";let o=0;for(;!r.isZero()&&o<100;){const e=r.times(10),t=e.integerValue(i.ROUND_FLOOR);n+=t.toString(),r=e.minus(t),o+=1}return n}const ma=(e,t)=>{if("string"==typeof e&&!e.match(/[-+]?\d+(.+d+)?/))return e;const r=new i(e);if(t){let e=r.toFixed(t,i.ROUND_DOWN);return new i(e).isZero()&&(e=fa(r.precision(t,i.ROUND_DOWN))),e}return fa(r)},ga=(e,t)=>{let r=e;const n=r.match("[0-9。.]+");r=n&&n.length>0?n[0]:"",r=r.replace("。",".");let o=0;if(r){const e=r.split("."),t=0===e[0].length?["0"]:[e[0]];e.length>1?t[1]=e.slice(1,e.length).join(""):t[0].length>1&&"0"===t[0][0]&&(t[0]=t[0].slice(1,t[0].length)),t.length>1&&(o=t[1].length),r=t.join(".")}return t>=0&&o>t?ma(r,t):r},ya=(e,t,r)=>{const n=new i(e).times(new i(10).pow(t));return r?n:n.dp(0)};function ba(e){return Number(e.toString().split(".")[0])}let va=!1,xa=!1;const wa={debug:1,default:2,info:2,warning:3,error:4,off:5};let Ea=wa.default,Aa=null;const Ca=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var ka,Ta;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(ka||(ka={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(Ta||(Ta={}));const Ra="0123456789abcdef";class Sa{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==wa[r]&&this.throwArgumentError("invalid log level name","logLevel",e),Ea>wa[r]||console.log.apply(console,t)}debug(...e){this._log(Sa.levels.DEBUG,e)}info(...e){this._log(Sa.levels.INFO,e)}warn(...e){this._log(Sa.levels.WARNING,e)}makeError(e,t,r){if(xa)return this.makeError("censored error",t,{});t||(t=Sa.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=Ra[t[e]>>4],r+=Ra[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let i="";switch(t){case Ta.NUMERIC_FAULT:{i="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":i+="-"+t;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case Ta.CALL_EXCEPTION:case Ta.INSUFFICIENT_FUNDS:case Ta.MISSING_NEW:case Ta.NONCE_EXPIRED:case Ta.REPLACEMENT_UNDERPRICED:case Ta.TRANSACTION_REPLACED:case Ta.UNPREDICTABLE_GAS_LIMIT:i=t}i&&(e+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(r).forEach((function(e){s[e]=r[e]})),s}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,Sa.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){Ca&&this.throwError("platform missing String.prototype.normalize",Sa.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ca})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,Sa.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,Sa.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,Sa.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,Sa.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",Sa.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",Sa.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",Sa.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Aa||(Aa=new Sa("logger/5.7.0")),Aa}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",Sa.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),va){if(!e)return;this.globalLogger().throwError("error censorship permanent",Sa.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}xa=!!e,va=!!t}static setLogLevel(e){const t=wa[e.toLowerCase()];null!=t?Ea=t:Sa.globalLogger().warn("invalid log level - "+e)}static from(e){return new Sa(e)}}Sa.errors=Ta,Sa.levels=ka;const Na=new Sa("bytes/5.7.0");function Ma(e){return!!e.toHexString}function Oa(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return Oa(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function Ia(e){return Pa(e)&&!(e.length%2)||ja(e)}function Fa(e){return"number"==typeof e&&e==e&&e%1==0}function ja(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!Fa(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const r=e[t];if(!Fa(r)||r<0||r>=256)return!1}return!0}function La(e,t){if(t||(t={}),"number"==typeof e){Na.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),Oa(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Ma(e)&&(e=e.toHexString()),Pa(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":Na.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;e<r.length;e+=2)n.push(parseInt(r.substring(e,e+2),16));return Oa(new Uint8Array(n))}return ja(e)?Oa(new Uint8Array(e)):Na.throwArgumentError("invalid arrayify value","value",e)}function _a(e){const t=e.map((e=>La(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),Oa(n)}function Wa(e){let t=La(e);if(0===t.length)return t;let r=0;for(;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function Pa(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function Da(e,t){if(t||(t={}),"number"==typeof e){Na.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t="0123456789abcdef"[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Ma(e))return e.toHexString();if(Pa(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":Na.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(ja(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+="0123456789abcdef"[(240&n)>>4]+"0123456789abcdef"[15&n]}return t}return Na.throwArgumentError("invalid hexlify value","value",e)}function Ba(e){if("string"!=typeof e)e=Da(e);else if(!Pa(e)||e.length%2)return null;return(e.length-2)/2}function Ua(e,t,r){return"string"!=typeof e?e=Da(e):(!Pa(e)||e.length%2)&&Na.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function Va(e){let t="0x";return e.forEach((e=>{t+=Da(e).substring(2)})),t}function Za(e){const t=function(e){"string"!=typeof e&&(e=Da(e));Pa(e)||Na.throwArgumentError("invalid hex string","value",e);e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}(Da(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function Ha(e,t){for("string"!=typeof e?e=Da(e):Pa(e)||Na.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&Na.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function za(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Ia(e)){let r=La(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=Da(r.slice(0,32)),t.s=Da(r.slice(32,64))):65===r.length?(t.r=Da(r.slice(0,32)),t.s=Da(r.slice(32,64)),t.v=r[64]):Na.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:Na.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=Da(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=function(e,t){(e=La(e)).length>t&&Na.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),Oa(r)}(La(t._vs),32);t._vs=Da(r);const n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&Na.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=Da(r);null==t.s?t.s=o:t.s!==o&&Na.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?Na.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&Na.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&Pa(t.r)?t.r=Ha(t.r,32):Na.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&Pa(t.s)?t.s=Ha(t.s,32):Na.throwArgumentError("signature missing or invalid s","signature",e);const r=La(t.s);r[0]>=128&&Na.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const n=Da(r);t._vs&&(Pa(t._vs)||Na.throwArgumentError("signature invalid _vs","signature",e),t._vs=Ha(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&Na.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}var Ya={exports:{}};
38
38
  /**
39
39
  * [js-sha3]{@link https://github.com/emn178/js-sha3}
40
40
  *
@@ -42,4 +42,4 @@ object-assign
42
42
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
43
43
  * @copyright Chen, Yi-Cyuan 2015-2018
44
44
  * @license MIT
45
- */!function(e){!function(){var t="input is invalid type",r="object"==typeof window,n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var o=!r&&"object"==typeof self;!n.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?n=Fe:o&&(n=self);var i=!n.JS_SHA3_NO_COMMON_JS&&e.exports,s=!n.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,a="0123456789abcdef".split(""),l=[4,1024,262144,67108864],c=[0,8,16,24],d=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],p=[128,256],h=["hex","buffer","arrayBuffer","array","digest"],f={128:168,256:136};!n.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!s||!n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var m=function(e,t,r){return function(n){return new M(e,t,e).update(n)[r]()}},g=function(e,t,r){return function(n,o){return new M(e,t,o).update(n)[r]()}},y=function(e,t,r){return function(t,n,o,i){return E["cshake"+e].update(t,n,o,i)[r]()}},b=function(e,t,r){return function(t,n,o,i){return E["kmac"+e].update(t,n,o,i)[r]()}},v=function(e,t,r,n){for(var o=0;o<h.length;++o){var i=h[o];e[i]=t(r,n,i)}return e},x=function(e,t){var r=m(e,t,"hex");return r.create=function(){return new M(e,t,e)},r.update=function(e){return r.create().update(e)},v(r,m,e,t)},w=[{name:"keccak",padding:[1,256,65536,16777216],bits:u,createMethod:x},{name:"sha3",padding:[6,1536,393216,100663296],bits:u,createMethod:x},{name:"shake",padding:[31,7936,2031616,520093696],bits:p,createMethod:function(e,t){var r=g(e,t,"hex");return r.create=function(r){return new M(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},v(r,g,e,t)}},{name:"cshake",padding:l,bits:p,createMethod:function(e,t){var r=f[e],n=y(e,0,"hex");return n.create=function(n,o,i){return o||i?new M(e,t,n).bytepad([o,i],r):E["shake"+e].create(n)},n.update=function(e,t,r,o){return n.create(t,r,o).update(e)},v(n,y,e,t)}},{name:"kmac",padding:l,bits:p,createMethod:function(e,t){var r=f[e],n=b(e,0,"hex");return n.create=function(n,o,i){return new O(e,t,o).bytepad(["KMAC",i],r).bytepad([n],r)},n.update=function(e,t,r,o){return n.create(e,r,o).update(t)},v(n,b,e,t)}}],E={},A=[],C=0;C<w.length;++C)for(var k=w[C],T=k.bits,R=0;R<T.length;++R){var S=k.name+"_"+T[R];if(A.push(S),E[S]=k.createMethod(T[R],k.padding),"sha3"!==k.name){var N=k.name+T[R];A.push(N),E[N]=E[S]}}function M(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function O(e,t,r){M.call(this,e,t,r)}M.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var o,i,a=this.blocks,l=this.byteCount,d=e.length,u=this.blockCount,p=0,h=this.s;p<d;){if(this.reset)for(this.reset=!1,a[0]=this.block,o=1;o<u+1;++o)a[o]=0;if(r)for(o=this.start;p<d&&o<l;++p)a[o>>2]|=e[p]<<c[3&o++];else for(o=this.start;p<d&&o<l;++p)(i=e.charCodeAt(p))<128?a[o>>2]|=i<<c[3&o++]:i<2048?(a[o>>2]|=(192|i>>6)<<c[3&o++],a[o>>2]|=(128|63&i)<<c[3&o++]):i<55296||i>=57344?(a[o>>2]|=(224|i>>12)<<c[3&o++],a[o>>2]|=(128|i>>6&63)<<c[3&o++],a[o>>2]|=(128|63&i)<<c[3&o++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++p)),a[o>>2]|=(240|i>>18)<<c[3&o++],a[o>>2]|=(128|i>>12&63)<<c[3&o++],a[o>>2]|=(128|i>>6&63)<<c[3&o++],a[o>>2]|=(128|63&i)<<c[3&o++]);if(this.lastByteIndex=o,o>=l){for(this.start=o-l,this.block=a[u],o=0;o<u;++o)h[o]^=a[o];I(h),this.reset=!0}else this.start=o}return this},M.prototype.encode=function(e,t){var r=255&e,n=1,o=[r];for(r=255&(e>>=8);r>0;)o.unshift(r),r=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length},M.prototype.encodeString=function(e){var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}var o=0,i=e.length;if(r)o=i;else for(var a=0;a<e.length;++a){var l=e.charCodeAt(a);l<128?o+=1:l<2048?o+=2:l<55296||l>=57344?o+=3:(l=65536+((1023&l)<<10|1023&e.charCodeAt(++a)),o+=4)}return o+=this.encode(8*o),this.update(e),o},M.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var o=t-r%t,i=[];return i.length=o,this.update(i),this},M.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];I(n)}},M.prototype.toString=M.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,l="";s<n;){for(i=0;i<t&&s<n;++i,++s)e=r[i],l+=a[e>>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(I(r),i=0)}return o&&(e=r[i],l+=a[e>>4&15]+a[15&e],o>1&&(l+=a[e>>12&15]+a[e>>8&15]),o>2&&(l+=a[e>>20&15]+a[e>>16&15])),l},M.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,a=this.outputBits>>3;e=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var l=new Uint32Array(e);s<n;){for(i=0;i<t&&s<n;++i,++s)l[s]=r[i];s%t==0&&I(r)}return o&&(l[i]=r[i],e=e.slice(0,a)),e},M.prototype.buffer=M.prototype.arrayBuffer,M.prototype.digest=M.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,o=this.outputBlocks,i=this.extraBytes,s=0,a=0,l=[];a<o;){for(s=0;s<r&&a<o;++s,++a)e=a<<2,t=n[s],l[e]=255&t,l[e+1]=t>>8&255,l[e+2]=t>>16&255,l[e+3]=t>>24&255;a%r==0&&I(n)}return i&&(e=a<<2,t=n[s],l[e]=255&t,i>1&&(l[e+1]=t>>8&255),i>2&&(l[e+2]=t>>16&255)),l},O.prototype=new M,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var I=function(e){var t,r,n,o,i,s,a,l,c,u,p,h,f,m,g,y,b,v,x,w,E,A,C,k,T,R,S,N,M,O,I,F,j,L,_,W,P,D,B,U,V,Z,H,z,Y,G,X,J,q,Q,K,$,ee,te,re,ne,oe,ie,se,ae,le,ce,de;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(f=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(l<<1|c>>>31),r=i^(c<<1|l>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(u<<1|p>>>31),r=a^(p<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=l^(h<<1|f>>>31),r=c^(f<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(o<<1|i>>>31),r=p^(i<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],g=e[1],G=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,le=e[30]<<9|e[31]>>>23,Z=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,_=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,q=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,de=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,W=e[14]<<6|e[15]>>>26,P=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,x=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,K=e[35]<<15|e[34]>>>17,F=e[45]<<29|e[44]>>>3,j=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,T=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,B=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,Y=e[9]<<27|e[8]>>>5,R=e[18]<<20|e[19]>>>12,S=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,U=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,A=e[48]<<14|e[49]>>>18,C=e[49]<<14|e[48]>>>18,e[0]=m^~y&v,e[1]=g^~b&x,e[10]=k^~R&N,e[11]=T^~S&M,e[20]=L^~W&D,e[21]=_^~P&B,e[30]=z^~G&J,e[31]=Y^~X&q,e[40]=te^~ne&ie,e[41]=re^~oe&se,e[2]=y^~v&w,e[3]=b^~x&E,e[12]=R^~N&O,e[13]=S^~M&I,e[22]=W^~D&U,e[23]=P^~B&V,e[32]=G^~J&Q,e[33]=X^~q&K,e[42]=ne^~ie&ae,e[43]=oe^~se&le,e[4]=v^~w&A,e[5]=x^~E&C,e[14]=N^~O&F,e[15]=M^~I&j,e[24]=D^~U&Z,e[25]=B^~V&H,e[34]=J^~Q&$,e[35]=q^~K&ee,e[44]=ie^~ae&ce,e[45]=se^~le&de,e[6]=w^~A&m,e[7]=E^~C&g,e[16]=O^~F&k,e[17]=I^~j&T,e[26]=U^~Z&L,e[27]=V^~H&_,e[36]=Q^~$&z,e[37]=K^~ee&Y,e[46]=ae^~ce&te,e[47]=le^~de&re,e[8]=A^~m&y,e[9]=C^~g&b,e[18]=F^~k&R,e[19]=j^~T&S,e[28]=Z^~L&W,e[29]=H^~_&P,e[38]=$^~z&G,e[39]=ee^~Y&X,e[48]=ce^~te&ne,e[49]=de^~re&oe,e[0]^=d[n],e[1]^=d[n+1]};if(i)e.exports=E;else for(C=0;C<A.length;++C)n[A[C]]=E[A[C]]}()}(Ya);var Ga=Ya.exports;function Xa(e){return"0x"+Ga.keccak_256(La(e))}const Ja=new Sa("rlp/5.7.0");function qa(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function Qa(e,t,r){let n=0;for(let o=0;o<r;o++)n=256*n+e[t+o];return n}function Ka(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(Ka(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=qa(t.length);return r.unshift(247+r.length),r.concat(t)}Ia(e)||Ja.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call(La(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=qa(t.length);return r.unshift(183+r.length),r.concat(t)}function $a(e){return Da(Ka(e))}function el(e,t,r,n){const o=[];for(;r<t+1+n;){const i=tl(e,r);o.push(i.result),(r+=i.consumed)>t+1+n&&Ja.throwError("child data too short",Sa.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function tl(e,t){if(0===e.length&&Ja.throwError("data too short",Sa.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&Ja.throwError("data short segment too short",Sa.errors.BUFFER_OVERRUN,{});const n=Qa(e,t+1,r);return t+1+r+n>e.length&&Ja.throwError("data long segment too short",Sa.errors.BUFFER_OVERRUN,{}),el(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&Ja.throwError("data array too short",Sa.errors.BUFFER_OVERRUN,{}),el(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&Ja.throwError("data array too short",Sa.errors.BUFFER_OVERRUN,{});const n=Qa(e,t+1,r);t+1+r+n>e.length&&Ja.throwError("data array too short",Sa.errors.BUFFER_OVERRUN,{});return{consumed:1+r+n,result:Da(e.slice(t+1+r,t+1+r+n))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&Ja.throwError("data too short",Sa.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:Da(e.slice(t+1,t+1+r))}}return{consumed:1,result:Da(e[t])}}function rl(e){const t=La(e),r=tl(t,0);return r.consumed!==t.length&&Ja.throwArgumentError("invalid rlp data","data",e),r.result}const nl=new Sa("address/5.7.0");function ol(e){Pa(e,20)||nl.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=La(Xa(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const il={};for(let e=0;e<10;e++)il[String(e)]=String(e);for(let e=0;e<26;e++)il[String.fromCharCode(65+e)]=String(10+e);const sl=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function al(e){let t=null;if("string"!=typeof e&&nl.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=ol(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&nl.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>il[e])).join("");for(;t.length>=sl;){let e=t.substring(0,sl);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}(e)&&nl.throwArgumentError("bad icap checksum","address",e),t=Ee(e.substring(4));t.length<40;)t="0"+t;t=ol("0x"+t)}else nl.throwArgumentError("invalid address","address",e);return t}var ll;!function(e){e[e.MAINNET=1]="MAINNET",e[e.GOERLI=5]="GOERLI",e[e.BSC=56]="BSC",e[e.POLYGON=137]="POLYGON",e[e.ARBITRUM_ONE=42161]="ARBITRUM_ONE",e[e.AURORA=1313161554]="AURORA",e[e.OKCHAIN=66]="OKCHAIN",e[e.OPTIMISM=10]="OPTIMISM",e[e.AVALANCHE=43114]="AVALANCHE",e[e.CONFLUX=1030]="CONFLUX",e[e.BASE=8453]="BASE",e[e.LINEA=59144]="LINEA",e[e.SCROLL=534352]="SCROLL",e[e.MANTA=169]="MANTA",e[e.MANTLE=5e3]="MANTLE",e[e.TON=-239]="TON"}(ll||(ll={}));const cl={[ll.MAINNET]:["https://rpc.ankr.com/eth"],[ll.GOERLI]:["https://goerli.optimism.io/"],[ll.BSC]:["https://bsc-dataseed1.binance.org","https://bsc-dataseed2.binance.org","https://bsc-dataseed3.binance.org"],[ll.POLYGON]:["https://polygon-rpc.com","https://rpc-mainnet.matic.quiknode.pro","https://rpc.ankr.com/polygon"],[ll.ARBITRUM_ONE]:["https://arb1.arbitrum.io/rpc","https://rpc.ankr.com/arbitrum"],[ll.AURORA]:["https://mainnet.aurora.dev/"],[ll.OKCHAIN]:["https://exchainrpc.okex.org"],[ll.OPTIMISM]:["https://optimism-mainnet.public.blastapi.io"],[ll.AVALANCHE]:["https://api.avax.network/ext/bc/C/rpc","https://rpc.ankr.com/avalanche"],[ll.CONFLUX]:["https://evm.confluxrpc.com"],[ll.BASE]:["https://mainnet.base.org"],[ll.LINEA]:["https://rpc.linea.build"],[ll.SCROLL]:["https://rpc.scroll.io"],[ll.MANTA]:["https://pacific-rpc.manta.network/http"],[ll.MANTLE]:["https://rpc.mantle.xyz"],[ll.TON]:[]},dl={symbol:"ETH",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,showDecimals:4,wrappedTokenSymbol:"WETH"},ul={[ll.MAINNET]:Object.assign(Object.assign({},dl),{wrappedTokenAddress:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}),[ll.GOERLI]:Object.assign(Object.assign({},dl),{wrappedTokenAddress:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"}),[ll.OPTIMISM]:Object.assign(Object.assign({},dl),{wrappedTokenAddress:"0x4200000000000000000000000000000000000006"}),[ll.CONFLUX]:Object.assign(Object.assign({},dl),{symbol:"CFX",name:"CFX",wrappedTokenSymbol:"WCFX",wrappedTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b"}),[ll.BSC]:Object.assign(Object.assign({},dl),{symbol:"BNB",name:"BNB",wrappedTokenSymbol:"WBNB",wrappedTokenAddress:"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}),[ll.OKCHAIN]:Object.assign(Object.assign({},dl),{symbol:"OKT",name:"OKT",wrappedTokenSymbol:"WOKT",wrappedTokenAddress:"0x8F8526dbfd6E38E3D8307702cA8469Bae6C56C15"}),[ll.POLYGON]:Object.assign(Object.assign({},dl),{symbol:"MATIC",name:"MATIC",showDecimals:6,wrappedTokenSymbol:"WMATIC",wrappedTokenAddress:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"}),[ll.ARBITRUM_ONE]:Object.assign(Object.assign({},dl),{name:"Ethereum",showDecimals:6,wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}),[ll.AURORA]:Object.assign(Object.assign({},dl),{name:"Ethereum",showDecimals:6,wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB"}),[ll.AVALANCHE]:Object.assign(Object.assign({},dl),{symbol:"AVAX",name:"Avalanche",showDecimals:6,wrappedTokenSymbol:"WAVAX",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7"}),[ll.BASE]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WETH",wrappedTokenAddress:"0x4200000000000000000000000000000000000006"}),[ll.LINEA]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WETH",wrappedTokenAddress:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f"}),[ll.SCROLL]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WETH",wrappedTokenAddress:"0x5300000000000000000000000000000000000004"}),[ll.MANTA]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WETH",wrappedTokenAddress:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746"}),[ll.MANTLE]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WMNT",wrappedTokenAddress:"0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8"}),[ll.TON]:Object.assign(Object.assign({},dl),{symbol:"TON",name:"TON",decimals:9,wrappedTokenSymbol:"TON",wrappedTokenAddress:""})},pl={[ll.MAINNET]:"ethereum",[ll.GOERLI]:"goerli",[ll.OPTIMISM]:"optimism",[ll.CONFLUX]:"cfx",[ll.BSC]:"bsc",[ll.OKCHAIN]:"okex-chain",[ll.POLYGON]:"polygon",[ll.ARBITRUM_ONE]:"arbitrum",[ll.AURORA]:"aurora",[ll.AVALANCHE]:"avalanche",[ll.BASE]:"base",[ll.LINEA]:"linea",[ll.SCROLL]:"scr",[ll.MANTA]:"manta",[ll.MANTLE]:"mantle",[ll.TON]:""},hl={[ll.MAINNET]:"etherscan.io",[ll.GOERLI]:"goerli.etherscan.io",[ll.OPTIMISM]:"optimistic.etherscan.io",[ll.CONFLUX]:"snowtrace.io",[ll.BSC]:"bscscan.com",[ll.OKCHAIN]:"www.oklink.com/okexchain",[ll.POLYGON]:"polygonscan.com",[ll.ARBITRUM_ONE]:"arbiscan.io",[ll.AURORA]:"aurorascan.dev",[ll.AVALANCHE]:"snowtrace.io",[ll.BASE]:"basescan.org",[ll.LINEA]:"lineascan.build",[ll.SCROLL]:"scrollscan.com",[ll.MANTA]:"pacific-explorer.manta.network",[ll.MANTLE]:"explorer.mantle.xyz",[ll.TON]:"tonviewer.com"},fl=(e,t)=>{if(0===e.length||0===t.length)return!1;if(t.length===e.length)return e.toLowerCase()===t.toLowerCase();const r=e.substring(2,e.length).toLowerCase(),n=t.substring(2,t.length).toLowerCase();return r.length>n.length?r.endsWith(n):n.endsWith(r)};function ml(e){return e.toLocaleLowerCase()==="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE".toLocaleLowerCase()}function gl(e,t){return`https://${hl[t||1]}${e?`/${e}`:""}`}function yl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function bl(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}const vl=e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_POPULAR_TOKEN_LIST",payload:e})})),xl=(e,t)=>r=>bl(void 0,void 0,void 0,(function*(){r({type:"SET_ETH_BALANCE",payload:{[e]:t}})})),wl=e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_ACCOUNT_BALANCES",payload:e})})),El=e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_BALANCE_LOADINGS",payload:e})}));var Al=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const Cl=new Sa("properties/5.7.0");function kl(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function Tl(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function Rl(e){return Al(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function Sl(e){const t={};for(const r in e)t[r]=e[r];return t}const Nl={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Ml(e){if(null==e||Nl[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;r<t.length;r++){let n=null;try{n=e[t[r]]}catch(e){continue}if(!Ml(n))return!1}return!0}return Cl.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function Ol(e){if(Ml(e))return e;if(Array.isArray(e))return Object.freeze(e.map((e=>Il(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&kl(t,r,Il(n))}return t}return Cl.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function Il(e){return Ol(e)}class Fl{constructor(e){for(const t in e)this[t]=Il(e[t])}}var jl=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const Ll=new Sa("abstract-provider/5.7.0");class _l extends Fl{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class Wl{constructor(){Ll.checkAbstract(new.target,Wl),kl(this,"_isProvider",!0)}getFeeData(){return jl(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield Rl({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,n=null,o=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,o=Ae.from("1500000000"),n=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:r,maxFeePerGas:n,maxPriorityFeePerGas:o,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}const Pl=new Sa("networks/5.7.1");function Dl(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new t.PocketProvider(e,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const o=["ropsten"],i=new t.AnkrProvider(e,r.ankr);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let o=1;return null!=r.quorum?o=r.quorum:"homestead"===e&&(o=2),new t.FallbackProvider(n,o)}return n[0]};return t.renetwork=function(e){return Dl(e)},t}function Bl(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return Bl(e,t)},r}const Ul={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Dl("homestead")},Vl={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Dl("ropsten")},Zl={chainId:63,name:"classicMordor",_defaultProvider:Bl("https://www.ethercluster.com/mordor","classicMordor")},Hl={unspecified:{chainId:0,name:"unspecified"},homestead:Ul,mainnet:Ul,morden:{chainId:2,name:"morden"},ropsten:Vl,testnet:Vl,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Dl("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Dl("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Dl("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Dl("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Bl("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Zl,classicTestnet:Zl,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Bl("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Dl("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Dl("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function zl(e){e=atob(e);const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return La(t)}function Yl(e){e=La(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}class Gl{constructor(e){kl(this,"alphabet",e),kl(this,"base",e.length),kl(this,"_alphabetMap",{}),kl(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=La(e);if(0===t.length)return"";let r=[0];for(let e=0;e<t.length;++e){let n=t[e];for(let e=0;e<r.length;++e)n+=r[e]<<8,r[e]=n%this.base,n=n/this.base|0;for(;n>0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e<t.length-1;++e)n+=this._leader;for(let e=r.length-1;e>=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let n=this._alphabetMap[e[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let o=n;for(let e=0;e<t.length;++e)o+=t[e]*this.base,t[e]=255&o,o>>=8;for(;o>0;)t.push(255&o),o>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return La(new Uint8Array(t.reverse()))}}new Gl("abcdefghijklmnopqrstuvwxyz234567");const Xl=new Gl("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Jl="0x0000000000000000000000000000000000000000",ql=Ae.from(-1),Ql=Ae.from(0),Kl=Ae.from(1),$l=Ae.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ec=new Sa("strings/5.7.0");var tc,rc;function nc(e,t,r,n,o){if(e===rc.BAD_PREFIX||e===rc.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return e===rc.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(tc||(tc={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(rc||(rc={}));const oc=Object.freeze({error:function(e,t,r,n,o){return ec.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:nc,replace:function(e,t,r,n,o){return e===rc.OVERLONG?(n.push(o),0):(n.push(65533),nc(e,t,r))}});function ic(e,t){null==t&&(t=oc.error),e=La(e);const r=[];let n=0;for(;n<e.length;){const o=e[n++];if(o>>7==0){r.push(o);continue}let i=null,s=null;if(192==(224&o))i=1,s=127;else if(224==(240&o))i=2,s=2047;else{if(240!=(248&o)){n+=t(128==(192&o)?rc.UNEXPECTED_CONTINUE:rc.BAD_PREFIX,n-1,e,r);continue}i=3,s=65535}if(n-1+i>=e.length){n+=t(rc.OVERRUN,n-1,e,r);continue}let a=o&(1<<8-i-1)-1;for(let o=0;o<i;o++){let o=e[n];if(128!=(192&o)){n+=t(rc.MISSING_CONTINUE,n,e,r),a=null;break}a=a<<6|63&o,n++}null!==a&&(a>1114111?n+=t(rc.OUT_OF_RANGE,n-1-i,e,r,a):a>=55296&&a<=57343?n+=t(rc.UTF16_SURROGATE,n-1-i,e,r,a):a<=s?n+=t(rc.OVERLONG,n-1-i,e,r,a):r.push(a))}return r}function sc(e,t=tc.current){t!=tc.current&&(ec.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);if(t>=e.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const i=65536+((1023&n)<<10)+(1023&o);r.push(i>>18|240),r.push(i>>12&63|128),r.push(i>>6&63|128),r.push(63&i|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return La(r)}function ac(e,t){return ic(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function lc(e){return Xa(sc(e))}function cc(e,t){null==t&&(t=1);const r=[],n=r.forEach,o=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?o(e,t-1):r.push(e)}))};return o(e,t),r}function dc(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),o=1,i=[0,1];for(let e=1;e<n;e++)i.push(o+=r());let s=r(),a=t;t+=s;let l=0,c=0;function d(){return 0==l&&(c=c<<8|e[t++],l=8),c>>--l&1}const u=Math.pow(2,31),p=u>>>1,h=p>>1,f=u-1;let m=0;for(let e=0;e<31;e++)m=m<<1|d();let g=[],y=0,b=u;for(;;){let e=Math.floor(((m-y+1)*o-1)/b),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<i[n]?r=n:t=n}if(0==t)break;g.push(t);let s=y+Math.floor(b*i[t]/o),a=y+Math.floor(b*i[t+1]/o)-1;for(;0==((s^a)&p);)m=m<<1&f|d(),s=s<<1&f,a=a<<1&f|1;for(;s&~a&h;)m=m&p|m<<1&f>>>1|d(),s=s<<1^p,a=(a^p)<<1|p|1;y=s,b=1+a-s}let v=n-4;return g.map((t=>{switch(t-v){case 3:return v+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return v+256+(e[a++]<<8|e[a++]);case 1:return v+e[a++];default:return t-1}}))}(e))}function uc(e){return 1&e?~e>>1:e>>1}function pc(e,t){let r=Array(e);for(let n=0,o=-1;n<e;n++)r[n]=o+=1+t();return r}function hc(e,t){let r=Array(e);for(let n=0,o=0;n<e;n++)r[n]=o+=uc(t());return r}function fc(e,t){let r=pc(e(),e),n=e(),o=pc(n,e),i=function(e,t){let r=Array(e);for(let n=0;n<e;n++)r[n]=1+t();return r}(n,e);for(let e=0;e<n;e++)for(let t=0;t<i[e];t++)r.push(o[e]+t);return t?r.map((e=>t[e])):r}function mc(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let o=0;o<t;o++)hc(e,r).forEach(((e,t)=>n[t].push(e)));return n}function gc(e,t){let r=1+t(),n=t(),o=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return cc(mc(o.length,1+e,t).map(((e,t)=>{const i=e[0],s=e.slice(1);return Array(o[t]).fill(void 0).map(((e,t)=>{let o=t*n;return[i+t*r,s.map((e=>e+o))]}))})))}function yc(e,t){return mc(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const bc=dc(zl("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),vc=new Set(fc(bc)),xc=new Set(fc(bc)),wc=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(gc(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(yc(r,e))}return function(e){const t={};for(let r=0;r<e.length;r++){const n=e[r];t[n[0]]=n[1]}return t}(cc(t))}(bc),Ec=function(e){let t=fc(e).sort(((e,t)=>e-t));return function r(){let n=[];for(;;){let o=fc(e,t);if(0==o.length)break;n.push({set:new Set(o),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let o=e(),i=o%3;o=o/3|0;let s=!!(1&o);return o>>=1,{branches:n,valid:i,fe0f:s,save:1==o,check:2==o}}()}(bc);function Ac(e){return function(e,t=tc.current){return ic(sc(e,t))}(e)}function Cc(e){return e.filter((e=>65039!=e))}function kc(e){for(let t of e.split(".")){let e=Ac(t);try{for(let t=e.lastIndexOf(95)-1;t>=0;t--)if(95!==e[t])throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&45===e[2]&&45===e[3])throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function Tc(e){return kc(function(e,t){let r=Ac(e).reverse(),n=[];for(;r.length;){let e=Rc(r);if(e){n.push(...t(e));continue}let o=r.pop();if(vc.has(o)){n.push(o);continue}if(xc.has(o))continue;let i=wc[o];if(!i)throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`);n.push(...i)}return kc(function(e){return e.normalize("NFC")}(String.fromCodePoint(...n)))}(e,Cc))}function Rc(e,t){var r;let n,o,i=Ec,s=[],a=e.length;for(t&&(t.length=0);a;){let l=e[--a];if(i=null===(r=i.branches.find((e=>e.set.has(l))))||void 0===r?void 0:r.node,!i)break;if(i.save)o=l;else if(i.check&&l===o)break;s.push(l),i.fe0f&&(s.push(65039),a>0&&65039==e[a-1]&&a--),i.valid&&(n=s.slice(),2==i.valid&&n.splice(1,1),t&&t.push(...e.slice(a).reverse()),e.length=a)}return n}const Sc=new Sa("hash/5.7.0"),Nc=new Uint8Array(32);function Mc(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function Oc(e){const t=sc(Tc(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++){46===t[e]&&(r.push(Mc(t.slice(n,e))),n=e+1)}if(n>=t.length)throw new Error("invalid ENS name; empty component");return r.push(Mc(t.slice(n))),r}function Ic(e){"string"!=typeof e&&Sc.throwArgumentError("invalid ENS name; not a string","name",e);let t=Nc;const r=Oc(e);for(;r.length;)t=Xa(_a([t,Xa(r.pop())]));return Da(t)}Nc.fill(0);var Fc=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const jc=new Sa("hash/5.7.0"),Lc=new Uint8Array(32);Lc.fill(0);const _c=Ae.from(-1),Wc=Ae.from(0),Pc=Ae.from(1),Dc=Ae.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const Bc=Ha(Pc.toHexString(),32),Uc=Ha(Wc.toHexString(),32),Vc={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Zc=["name","version","chainId","verifyingContract","salt"];function Hc(e){return function(t){return"string"!=typeof t&&jc.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const zc={name:Hc("name"),version:Hc("version"),chainId:function(e){try{return Ae.from(e).toString()}catch(e){}return jc.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return al(e).toLowerCase()}catch(e){}return jc.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=La(e);if(32!==t.length)throw new Error("bad length");return Da(t)}catch(e){}return jc.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function Yc(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&jc.throwArgumentError("invalid numeric width","type",e);const o=Dc.mask(r?n-1:n),i=r?o.add(Pc).mul(_c):Wc;return function(t){const r=Ae.from(t);return(r.lt(i)||r.gt(o))&&jc.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),Ha(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&jc.throwArgumentError("invalid bytes width","type",e),function(t){return La(t).length!==r&&jc.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=La(e),r=t.length%32;return r?Va([t,Lc.slice(r)]):Da(t)}(t)}}}switch(e){case"address":return function(e){return Ha(al(e),32)};case"bool":return function(e){return e?Bc:Uc};case"bytes":return function(e){return Xa(e)};case"string":return function(e){return lc(e)}}return null}function Gc(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class Xc{constructor(e){kl(this,"types",Object.freeze(Il(e))),kl(this,"_encoderCache",{}),kl(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const o={};e[n].forEach((i=>{o[i.name]&&jc.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(n)}`,"types",e),o[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===n&&jc.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e);Yc(s)||(r[s]||jc.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",e),r[s].push(n),t[n][s]=!0)}))}const o=Object.keys(r).filter((e=>0===r[e].length));0===o.length?jc.throwArgumentError("missing primary type","types",e):o.length>1&&jc.throwArgumentError(`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),kl(this,"primaryType",o[0]),function o(i,s){s[i]&&jc.throwArgumentError(`circular type reference to ${JSON.stringify(i)}`,"types",e),s[i]=!0,Object.keys(t[i]).forEach((e=>{r[e]&&(o(e,s),Object.keys(s).forEach((t=>{n[t][e]=!0})))})),delete s[i]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=Gc(t,e[t])+r.map((t=>Gc(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=Yc(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&jc.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let o=t.map(r);return this._types[e]&&(o=o.map(Xa)),Xa(Va(o))}}const r=this.types[e];if(r){const t=lc(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?Xa(n):n}));return n.unshift(t),Va(n)}}return jc.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||jc.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Xa(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(Yc(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],o=parseInt(n[3]);return o>=0&&t.length!==o&&jc.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const o=this.types[e];return o?o.reduce(((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e)),{}):jc.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Xc(e)}static getPrimaryType(e){return Xc.from(e).primaryType}static hashStruct(e,t,r){return Xc.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=Vc[r];n||jc.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>Zc.indexOf(e.name)-Zc.indexOf(t.name))),Xc.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return Va(["0x1901",Xc.hashDomain(e),Xc.from(t).hash(r)])}static hash(e,t,r){return Xa(Xc.encode(e,t,r))}static resolveNames(e,t,r,n){return Fc(this,void 0,void 0,(function*(){e=Sl(e);const o={};e.verifyingContract&&!Pa(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const i=Xc.from(t);i.visit(r,((e,t)=>("address"!==e||Pa(t,20)||(o[t]="0x"),t)));for(const e in o)o[e]=yield n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=i.visit(r,((e,t)=>"address"===e&&o[t]?o[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){Xc.hashDomain(e);const n={},o=[];Zc.forEach((t=>{const r=e[t];null!=r&&(n[t]=zc[t](r),o.push({name:t,type:Vc[t]}))}));const i=Xc.from(t),s=Sl(t);return s.EIP712Domain?jc.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):s.EIP712Domain=o,i.encode(r),{types:s,domain:n,primaryType:i.primaryType,message:i.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return Da(La(t));if(e.match(/^u?int/))return Ae.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&jc.throwArgumentError("invalid string","value",t),t}return jc.throwArgumentError("unsupported type","type",e)}))}}}var Jc={},qc={},Qc=Kc;function Kc(e,t){if(!e)throw new Error(t||"Assertion failed")}Kc.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var $c,ed={exports:{}},td={exports:{}};!function(e){try{var t=require("util");if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=($c||($c=1,"function"==typeof Object.create?td.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:td.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),td.exports)}}(ed);var rd=Qc,nd=ed.exports;function od(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function id(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function sd(e){return 1===e.length?"0"+e:e}function ad(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}qc.inherits=nd,qc.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)r.push(parseInt(e[o]+e[o+1],16))}else for(var n=0,o=0;o<e.length;o++){var i=e.charCodeAt(o);i<128?r[n++]=i:i<2048?(r[n++]=i>>6|192,r[n++]=63&i|128):od(e,o)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++o)),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=63&i|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=63&i|128)}else for(o=0;o<e.length;o++)r[o]=0|e[o];return r},qc.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=sd(e[r].toString(16));return t},qc.htonl=id,qc.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var o=e[n];"little"===t&&(o=id(o)),r+=ad(o.toString(16))}return r},qc.zero2=sd,qc.zero8=ad,qc.join32=function(e,t,r,n){var o=r-t;rd(o%4==0);for(var i=new Array(o/4),s=0,a=t;s<i.length;s++,a+=4){var l;l="big"===n?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],i[s]=l>>>0}return i},qc.split32=function(e,t){for(var r=new Array(4*e.length),n=0,o=0;n<e.length;n++,o+=4){var i=e[n];"big"===t?(r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=255&i):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=255&i)}return r},qc.rotr32=function(e,t){return e>>>t|e<<32-t},qc.rotl32=function(e,t){return e<<t|e>>>32-t},qc.sum32=function(e,t){return e+t>>>0},qc.sum32_3=function(e,t,r){return e+t+r>>>0},qc.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},qc.sum32_5=function(e,t,r,n,o){return e+t+r+n+o>>>0},qc.sum64=function(e,t,r,n){var o=e[t],i=n+e[t+1]>>>0,s=(i<n?1:0)+r+o;e[t]=s>>>0,e[t+1]=i},qc.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},qc.sum64_lo=function(e,t,r,n){return t+n>>>0},qc.sum64_4_hi=function(e,t,r,n,o,i,s,a){var l=0,c=t;return l+=(c=c+n>>>0)<t?1:0,l+=(c=c+i>>>0)<i?1:0,e+r+o+s+(l+=(c=c+a>>>0)<a?1:0)>>>0},qc.sum64_4_lo=function(e,t,r,n,o,i,s,a){return t+n+i+a>>>0},qc.sum64_5_hi=function(e,t,r,n,o,i,s,a,l,c){var d=0,u=t;return d+=(u=u+n>>>0)<t?1:0,d+=(u=u+i>>>0)<i?1:0,d+=(u=u+a>>>0)<a?1:0,e+r+o+s+l+(d+=(u=u+c>>>0)<c?1:0)>>>0},qc.sum64_5_lo=function(e,t,r,n,o,i,s,a,l,c){return t+n+i+a+c>>>0},qc.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},qc.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},qc.shr64_hi=function(e,t,r){return e>>>r},qc.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var ld={},cd=qc,dd=Qc;function ud(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}ld.BlockHash=ud,ud.prototype.update=function(e,t){if(e=cd.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=cd.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},ud.prototype.digest=function(e){return this.update(this._pad()),dd(null===this.pending),this._digest(e)},ud.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var o=1;o<r;o++)n[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=e>>>24&255,n[o++]=e>>>16&255,n[o++]=e>>>8&255,n[o++]=255&e}else for(n[o++]=255&e,n[o++]=e>>>8&255,n[o++]=e>>>16&255,n[o++]=e>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,i=8;i<this.padLength;i++)n[o++]=0;return n};var pd={},hd={},fd=qc.rotr32;function md(e,t,r){return e&t^~e&r}function gd(e,t,r){return e&t^e&r^t&r}function yd(e,t,r){return e^t^r}hd.ft_1=function(e,t,r,n){return 0===e?md(t,r,n):1===e||3===e?yd(t,r,n):2===e?gd(t,r,n):void 0},hd.ch32=md,hd.maj32=gd,hd.p32=yd,hd.s0_256=function(e){return fd(e,2)^fd(e,13)^fd(e,22)},hd.s1_256=function(e){return fd(e,6)^fd(e,11)^fd(e,25)},hd.g0_256=function(e){return fd(e,7)^fd(e,18)^e>>>3},hd.g1_256=function(e){return fd(e,17)^fd(e,19)^e>>>10};var bd=qc,vd=ld,xd=hd,wd=bd.rotl32,Ed=bd.sum32,Ad=bd.sum32_5,Cd=xd.ft_1,kd=vd.BlockHash,Td=[1518500249,1859775393,2400959708,3395469782];function Rd(){if(!(this instanceof Rd))return new Rd;kd.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}bd.inherits(Rd,kd);var Sd=Rd;Rd.blockSize=512,Rd.outSize=160,Rd.hmacStrength=80,Rd.padLength=64,Rd.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=wd(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var o=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4];for(n=0;n<r.length;n++){var c=~~(n/20),d=Ad(wd(o,5),Cd(c,i,s,a),l,r[n],Td[c]);l=a,a=s,s=wd(i,30),i=o,o=d}this.h[0]=Ed(this.h[0],o),this.h[1]=Ed(this.h[1],i),this.h[2]=Ed(this.h[2],s),this.h[3]=Ed(this.h[3],a),this.h[4]=Ed(this.h[4],l)},Rd.prototype._digest=function(e){return"hex"===e?bd.toHex32(this.h,"big"):bd.split32(this.h,"big")};var Nd=qc,Md=ld,Od=hd,Id=Qc,Fd=Nd.sum32,jd=Nd.sum32_4,Ld=Nd.sum32_5,_d=Od.ch32,Wd=Od.maj32,Pd=Od.s0_256,Dd=Od.s1_256,Bd=Od.g0_256,Ud=Od.g1_256,Vd=Md.BlockHash,Zd=[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];function Hd(){if(!(this instanceof Hd))return new Hd;Vd.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Zd,this.W=new Array(64)}Nd.inherits(Hd,Vd);var zd=Hd;Hd.blockSize=512,Hd.outSize=256,Hd.hmacStrength=192,Hd.padLength=64,Hd.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=jd(Ud(r[n-2]),r[n-7],Bd(r[n-15]),r[n-16]);var o=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4],c=this.h[5],d=this.h[6],u=this.h[7];for(Id(this.k.length===r.length),n=0;n<r.length;n++){var p=Ld(u,Dd(l),_d(l,c,d),this.k[n],r[n]),h=Fd(Pd(o),Wd(o,i,s));u=d,d=c,c=l,l=Fd(a,p),a=s,s=i,i=o,o=Fd(p,h)}this.h[0]=Fd(this.h[0],o),this.h[1]=Fd(this.h[1],i),this.h[2]=Fd(this.h[2],s),this.h[3]=Fd(this.h[3],a),this.h[4]=Fd(this.h[4],l),this.h[5]=Fd(this.h[5],c),this.h[6]=Fd(this.h[6],d),this.h[7]=Fd(this.h[7],u)},Hd.prototype._digest=function(e){return"hex"===e?Nd.toHex32(this.h,"big"):Nd.split32(this.h,"big")};var Yd=qc,Gd=zd;function Xd(){if(!(this instanceof Xd))return new Xd;Gd.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Yd.inherits(Xd,Gd);var Jd=Xd;Xd.blockSize=512,Xd.outSize=224,Xd.hmacStrength=192,Xd.padLength=64,Xd.prototype._digest=function(e){return"hex"===e?Yd.toHex32(this.h.slice(0,7),"big"):Yd.split32(this.h.slice(0,7),"big")};var qd=qc,Qd=ld,Kd=Qc,$d=qd.rotr64_hi,eu=qd.rotr64_lo,tu=qd.shr64_hi,ru=qd.shr64_lo,nu=qd.sum64,ou=qd.sum64_hi,iu=qd.sum64_lo,su=qd.sum64_4_hi,au=qd.sum64_4_lo,lu=qd.sum64_5_hi,cu=qd.sum64_5_lo,du=Qd.BlockHash,uu=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function pu(){if(!(this instanceof pu))return new pu;du.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=uu,this.W=new Array(160)}qd.inherits(pu,du);var hu=pu;function fu(e,t,r,n,o){var i=e&r^~e&o;return i<0&&(i+=4294967296),i}function mu(e,t,r,n,o,i){var s=t&n^~t&i;return s<0&&(s+=4294967296),s}function gu(e,t,r,n,o){var i=e&r^e&o^r&o;return i<0&&(i+=4294967296),i}function yu(e,t,r,n,o,i){var s=t&n^t&i^n&i;return s<0&&(s+=4294967296),s}function bu(e,t){var r=$d(e,t,28)^$d(t,e,2)^$d(t,e,7);return r<0&&(r+=4294967296),r}function vu(e,t){var r=eu(e,t,28)^eu(t,e,2)^eu(t,e,7);return r<0&&(r+=4294967296),r}function xu(e,t){var r=$d(e,t,14)^$d(e,t,18)^$d(t,e,9);return r<0&&(r+=4294967296),r}function wu(e,t){var r=eu(e,t,14)^eu(e,t,18)^eu(t,e,9);return r<0&&(r+=4294967296),r}function Eu(e,t){var r=$d(e,t,1)^$d(e,t,8)^tu(e,t,7);return r<0&&(r+=4294967296),r}function Au(e,t){var r=eu(e,t,1)^eu(e,t,8)^ru(e,t,7);return r<0&&(r+=4294967296),r}function Cu(e,t){var r=$d(e,t,19)^$d(t,e,29)^tu(e,t,6);return r<0&&(r+=4294967296),r}function ku(e,t){var r=eu(e,t,19)^eu(t,e,29)^ru(e,t,6);return r<0&&(r+=4294967296),r}pu.blockSize=1024,pu.outSize=512,pu.hmacStrength=192,pu.padLength=128,pu.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var o=Cu(r[n-4],r[n-3]),i=ku(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],l=Eu(r[n-30],r[n-29]),c=Au(r[n-30],r[n-29]),d=r[n-32],u=r[n-31];r[n]=su(o,i,s,a,l,c,d,u),r[n+1]=au(o,i,s,a,l,c,d,u)}},pu.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],o=this.h[1],i=this.h[2],s=this.h[3],a=this.h[4],l=this.h[5],c=this.h[6],d=this.h[7],u=this.h[8],p=this.h[9],h=this.h[10],f=this.h[11],m=this.h[12],g=this.h[13],y=this.h[14],b=this.h[15];Kd(this.k.length===r.length);for(var v=0;v<r.length;v+=2){var x=y,w=b,E=xu(u,p),A=wu(u,p),C=fu(u,p,h,f,m),k=mu(u,p,h,f,m,g),T=this.k[v],R=this.k[v+1],S=r[v],N=r[v+1],M=lu(x,w,E,A,C,k,T,R,S,N),O=cu(x,w,E,A,C,k,T,R,S,N);x=bu(n,o),w=vu(n,o),E=gu(n,o,i,s,a),A=yu(n,o,i,s,a,l);var I=ou(x,w,E,A),F=iu(x,w,E,A);y=m,b=g,m=h,g=f,h=u,f=p,u=ou(c,d,M,O),p=iu(d,d,M,O),c=a,d=l,a=i,l=s,i=n,s=o,n=ou(M,O,I,F),o=iu(M,O,I,F)}nu(this.h,0,n,o),nu(this.h,2,i,s),nu(this.h,4,a,l),nu(this.h,6,c,d),nu(this.h,8,u,p),nu(this.h,10,h,f),nu(this.h,12,m,g),nu(this.h,14,y,b)},pu.prototype._digest=function(e){return"hex"===e?qd.toHex32(this.h,"big"):qd.split32(this.h,"big")};var Tu=qc,Ru=hu;function Su(){if(!(this instanceof Su))return new Su;Ru.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Tu.inherits(Su,Ru);var Nu=Su;Su.blockSize=1024,Su.outSize=384,Su.hmacStrength=192,Su.padLength=128,Su.prototype._digest=function(e){return"hex"===e?Tu.toHex32(this.h.slice(0,12),"big"):Tu.split32(this.h.slice(0,12),"big")},pd.sha1=Sd,pd.sha224=Jd,pd.sha256=zd,pd.sha384=Nu,pd.sha512=hu;var Mu={},Ou=qc,Iu=ld,Fu=Ou.rotl32,ju=Ou.sum32,Lu=Ou.sum32_3,_u=Ou.sum32_4,Wu=Iu.BlockHash;function Pu(){if(!(this instanceof Pu))return new Pu;Wu.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Du(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function Bu(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function Uu(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}Ou.inherits(Pu,Wu),Mu.ripemd160=Pu,Pu.blockSize=512,Pu.outSize=160,Pu.hmacStrength=192,Pu.padLength=64,Pu.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],o=this.h[2],i=this.h[3],s=this.h[4],a=r,l=n,c=o,d=i,u=s,p=0;p<80;p++){var h=ju(Fu(_u(r,Du(p,n,o,i),e[Vu[p]+t],Bu(p)),Hu[p]),s);r=s,s=i,i=Fu(o,10),o=n,n=h,h=ju(Fu(_u(a,Du(79-p,l,c,d),e[Zu[p]+t],Uu(p)),zu[p]),u),a=u,u=d,d=Fu(c,10),c=l,l=h}h=Lu(this.h[1],o,d),this.h[1]=Lu(this.h[2],i,u),this.h[2]=Lu(this.h[3],s,a),this.h[3]=Lu(this.h[4],r,l),this.h[4]=Lu(this.h[0],n,c),this.h[0]=h},Pu.prototype._digest=function(e){return"hex"===e?Ou.toHex32(this.h,"little"):Ou.split32(this.h,"little")};var Vu=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Zu=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Hu=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],zu=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Yu=qc,Gu=Qc;function Xu(e,t,r){if(!(this instanceof Xu))return new Xu(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(Yu.toArray(t,r))}var Ju=Xu;Xu.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),Gu(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},Xu.prototype.update=function(e,t){return this.inner.update(e,t),this},Xu.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=Jc;t.utils=qc,t.common=ld,t.sha=pd,t.ripemd=Mu,t.hmac=Ju,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}();var qu=Jc;function Qu(e){return"0x"+qu.sha256().update(La(e)).digest("hex")}new Sa("sha2/5.7.0");var Ku=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function $u(e,t){return Ku(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),o=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach(((e,t)=>{i[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{i[e.toLowerCase()]=n.headers.get(e)})),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:La(new Uint8Array(o))}}))}var ep=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const tp=new Sa("web/5.7.1");function rp(e){return new Promise((t=>{setTimeout(t,e)}))}function np(e,t){if(null==e)return null;if("string"==typeof e)return e;if(Ia(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return ac(e)}catch(e){}return Da(e)}return e}function op(e,t,r){let n=null;if(null!=t){n=sc(t);const r="string"==typeof e?{url:e}:Sl(e);if(r.headers){0!==Object.keys(r.headers).filter((e=>"content-type"===e.toLowerCase())).length||(r.headers=Sl(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return function(e,t,r){const n="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;tp.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);const o="object"==typeof e?e.throttleCallback:null,i="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;tp.assertArgument(i>0&&i%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const s="object"==typeof e&&!!e.errorPassThrough,a={};let l=null;const c={method:"GET"};let d=!1,u=12e4;if("string"==typeof e)l=e;else if("object"==typeof e){if(null!=e&&null!=e.url||tp.throwArgumentError("missing URL","connection.url",e),l=e.url,"number"==typeof e.timeout&&e.timeout>0&&(u=e.timeout),e.headers)for(const t in e.headers)a[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(d=!0);if(c.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==l.substring(0,6)&&!0!==e.allowInsecureAuthentication&&tp.throwError("basic authentication requires a secure https url",Sa.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;a.authorization={key:"Authorization",value:"Basic "+Yl(sc(t))}}null!=e.skipFetchSetup&&(c.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(c.fetchOptions=Sl(e.fetchOptions))}const p=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=l?l.match(p):null;if(h)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?zl(h[3]):(f=h[3],sc(f.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){tp.throwError("processing response error",Sa.errors.SERVER_ERROR,{body:np(h[1],h[2]),error:e,requestBody:null,requestMethod:"GET",url:l})}var f;t&&(c.method="POST",c.body=t,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(t.length)}));const m={};Object.keys(a).forEach((e=>{const t=a[e];m[t.key]=t.value})),c.headers=m;const g=function(){let e=null;return{promise:new Promise((function(t,r){u&&(e=setTimeout((()=>{null!=e&&(e=null,r(tp.makeError("timeout",Sa.errors.TIMEOUT,{requestBody:np(c.body,m["content-type"]),requestMethod:c.method,timeout:u,url:l})))}),u))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),y=function(){return ep(this,void 0,void 0,(function*(){for(let e=0;e<n;e++){let t=null;try{if(t=yield $u(l,c),e<n)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===c.method&&e.match(/^https:/)){l=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(o&&(r=yield o(e,l)),r){let r=0;const n=t.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):i*parseInt(String(Math.random()*Math.pow(2,e))),yield rp(r);continue}}}catch(e){t=e.response,null==t&&(g.cancel(),tp.throwError("missing response",Sa.errors.SERVER_ERROR,{requestBody:np(c.body,m["content-type"]),requestMethod:c.method,serverError:e,url:l}))}let a=t.body;if(d&&304===t.statusCode?a=null:!s&&(t.statusCode<200||t.statusCode>=300)&&(g.cancel(),tp.throwError("bad response",Sa.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:np(a,t.headers?t.headers["content-type"]:null),requestBody:np(c.body,m["content-type"]),requestMethod:c.method,url:l})),r)try{const e=yield r(a,t);return g.cancel(),e}catch(r){if(r.throttleRetry&&e<n){let t=!0;if(o&&(t=yield o(e,l)),t){const t=i*parseInt(String(Math.random()*Math.pow(2,e)));yield rp(t);continue}}g.cancel(),tp.throwError("processing response error",Sa.errors.SERVER_ERROR,{body:np(a,t.headers?t.headers["content-type"]:null),error:r,requestBody:np(c.body,m["content-type"]),requestMethod:c.method,url:l})}return g.cancel(),a}return tp.throwError("failed response",Sa.errors.SERVER_ERROR,{requestBody:np(c.body,m["content-type"]),requestMethod:c.method,url:l})}))}();return Promise.race([g.promise,y])}(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse(ac(e))}catch(t){tp.throwError("invalid JSON",Sa.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function ip(e,t){return t||(t={}),null==(t=Sl(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let o=null,i=!1;const s=()=>!i&&(i=!0,o&&clearTimeout(o),!0);t.timeout&&(o=setTimeout((()=>{s()&&n(new Error("timeout"))}),t.timeout));const a=t.retryLimit;let l=0;!function o(){return e().then((function(e){if(void 0!==e)s()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",o);else if(t.onceBlock)t.onceBlock.once("block",o);else if(!i){if(l++,l>a)return void(s()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,l)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(o,e)}return null}),(function(e){s()&&n(e)}))}()}))}for(var sp="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ap={},lp=0;lp<sp.length;lp++){var cp=sp.charAt(lp);if(void 0!==ap[cp])throw new TypeError(cp+" is ambiguous");ap[cp]=lp}function dp(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function up(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=dp(t)^n>>5}for(t=dp(t),r=0;r<e.length;++r){var o=e.charCodeAt(r);t=dp(t)^31&o}return t}function pp(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var o=(e=r).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var i=e.slice(0,o),s=e.slice(o+1);if(s.length<6)return"Data too short";var a=up(i);if("string"==typeof a)return a;for(var l=[],c=0;c<s.length;++c){var d=s.charAt(c),u=ap[d];if(void 0===u)return"Unknown character "+d;a=dp(a)^u,c+6>=s.length||l.push(u)}return 1!==a?"Invalid checksum for "+e:{prefix:i,words:l}}function hp(e,t,r,n){for(var o=0,i=0,s=(1<<r)-1,a=[],l=0;l<e.length;++l)for(o=o<<t|e[l],i+=t;i>=r;)i-=r,a.push(o>>i&s);if(n)i>0&&a.push(o<<r-i&s);else{if(i>=t)return"Excess padding";if(o<<r-i&s)return"Non-zero padding"}return a}var fp={decodeUnsafe:function(){var e=pp.apply(null,arguments);if("object"==typeof e)return e},decode:function(e){var t=pp.apply(null,arguments);if("object"==typeof t)return t;throw new Error(t)},encode:function(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");var n=up(e=e.toLowerCase());if("string"==typeof n)throw new Error(n);for(var o=e+"1",i=0;i<t.length;++i){var s=t[i];if(s>>5!=0)throw new Error("Non 5-bit word");n=dp(n)^s,o+=sp.charAt(s)}for(i=0;i<6;++i)n=dp(n);for(n^=1,i=0;i<6;++i){o+=sp.charAt(n>>5*(5-i)&31)}return o},toWordsUnsafe:function(e){var t=hp(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=hp(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=hp(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=hp(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}};const mp="providers/5.7.2";var gp={exports:{}};!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var i;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function a(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,n,o){for(var i=0,s=0,a=Math.min(e.length,n),l=t;l<a;l++){var c=e.charCodeAt(l)-48;i*=o,s=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&s<o,"Invalid character"),i+=s}return i}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this._parseHex(e,o,n):(this._parseBase(e,t,o),"le"===n&&this._initArray(this.toArray(),t,n)))},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,s,a=0;if("be"===n)for(o=e.length-1,i=0;o>=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===n)for(o=0,i=0;o<e.length;o+=3)s=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,i=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)o=a(e,t,n)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)o=a(e,t,n)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,o=1;o<=67108863;o*=t)n++;n--,o=o/t|0;for(var i=e.length-r,s=i%n,a=Math.min(i,i-s)+r,c=0,d=r;d<a;d+=n)c=l(e,d,d+n,t),this.imuln(o),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var u=1;for(c=l(e,d,e.length,t),d=0;d<s;d++)u*=t;this.imuln(u),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var o=0|e.words[0],i=0|t.words[0],s=o*i,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var d=l>>>26,u=67108863&l,p=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=p;h++){var f=c-h|0;d+=(s=(o=0|e.words[f])*(i=0|t.words[h])+u)/67108864|0,u=67108863&s}r.words[c]=0|u,l=0|d}return 0!==l?r.words[c]=0|l:r.length--,r._strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<o|i)).toString(16);i=a>>>24-o&16777215,(o+=2)>=26&&(o-=26,s--),n=0!==i||s!==this.length-1?u[6-l.length]+l+n:l+n}for(0!==i&&(n=i.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=p[e],d=h[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(d).toString(e);n=(f=f.idivn(d)).isZero()?m+n:u[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},i&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,o),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===i?(r<e.length&&(e[r++]=s>>24&255),n=0,i=0):(n=s>>>24,i+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===i?(r>=0&&(e[r--]=s>>24&255),n=0,i=0):(n=s>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return n>0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<o:this.words[n]&~(1<<o),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var o=0,i=0;i<n.length;i++)t=(0|r.words[i])+(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<r.length;i++)t=(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;i<r.length;i++)this.words[i]=r.words[i];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s<n.length;s++)i=(t=(0|r.words[s])-(0|n.words[s])+i)>>26,this.words[s]=67108863&t;for(;0!==i&&s<r.length;s++)i=(t=(0|r.words[s])+i)>>26,this.words[s]=67108863&t;if(0===i&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,o,i,s=e.words,a=t.words,l=r.words,c=0,d=0|s[0],u=8191&d,p=d>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],x=8191&v,w=v>>>13,E=0|s[4],A=8191&E,C=E>>>13,k=0|s[5],T=8191&k,R=k>>>13,S=0|s[6],N=8191&S,M=S>>>13,O=0|s[7],I=8191&O,F=O>>>13,j=0|s[8],L=8191&j,_=j>>>13,W=0|s[9],P=8191&W,D=W>>>13,B=0|a[0],U=8191&B,V=B>>>13,Z=0|a[1],H=8191&Z,z=Z>>>13,Y=0|a[2],G=8191&Y,X=Y>>>13,J=0|a[3],q=8191&J,Q=J>>>13,K=0|a[4],$=8191&K,ee=K>>>13,te=0|a[5],re=8191&te,ne=te>>>13,oe=0|a[6],ie=8191&oe,se=oe>>>13,ae=0|a[7],le=8191&ae,ce=ae>>>13,de=0|a[8],ue=8191&de,pe=de>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(u,U))|0)+((8191&(o=(o=Math.imul(u,V))+Math.imul(p,U)|0))<<13)|0;c=((i=Math.imul(p,V))+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(f,U),o=(o=Math.imul(f,V))+Math.imul(m,U)|0,i=Math.imul(m,V);var ye=(c+(n=n+Math.imul(u,H)|0)|0)+((8191&(o=(o=o+Math.imul(u,z)|0)+Math.imul(p,H)|0))<<13)|0;c=((i=i+Math.imul(p,z)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,U),o=(o=Math.imul(y,V))+Math.imul(b,U)|0,i=Math.imul(b,V),n=n+Math.imul(f,H)|0,o=(o=o+Math.imul(f,z)|0)+Math.imul(m,H)|0,i=i+Math.imul(m,z)|0;var be=(c+(n=n+Math.imul(u,G)|0)|0)+((8191&(o=(o=o+Math.imul(u,X)|0)+Math.imul(p,G)|0))<<13)|0;c=((i=i+Math.imul(p,X)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(x,U),o=(o=Math.imul(x,V))+Math.imul(w,U)|0,i=Math.imul(w,V),n=n+Math.imul(y,H)|0,o=(o=o+Math.imul(y,z)|0)+Math.imul(b,H)|0,i=i+Math.imul(b,z)|0,n=n+Math.imul(f,G)|0,o=(o=o+Math.imul(f,X)|0)+Math.imul(m,G)|0,i=i+Math.imul(m,X)|0;var ve=(c+(n=n+Math.imul(u,q)|0)|0)+((8191&(o=(o=o+Math.imul(u,Q)|0)+Math.imul(p,q)|0))<<13)|0;c=((i=i+Math.imul(p,Q)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,U),o=(o=Math.imul(A,V))+Math.imul(C,U)|0,i=Math.imul(C,V),n=n+Math.imul(x,H)|0,o=(o=o+Math.imul(x,z)|0)+Math.imul(w,H)|0,i=i+Math.imul(w,z)|0,n=n+Math.imul(y,G)|0,o=(o=o+Math.imul(y,X)|0)+Math.imul(b,G)|0,i=i+Math.imul(b,X)|0,n=n+Math.imul(f,q)|0,o=(o=o+Math.imul(f,Q)|0)+Math.imul(m,q)|0,i=i+Math.imul(m,Q)|0;var xe=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(o=(o=o+Math.imul(u,ee)|0)+Math.imul(p,$)|0))<<13)|0;c=((i=i+Math.imul(p,ee)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),o=(o=Math.imul(T,V))+Math.imul(R,U)|0,i=Math.imul(R,V),n=n+Math.imul(A,H)|0,o=(o=o+Math.imul(A,z)|0)+Math.imul(C,H)|0,i=i+Math.imul(C,z)|0,n=n+Math.imul(x,G)|0,o=(o=o+Math.imul(x,X)|0)+Math.imul(w,G)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(y,q)|0,o=(o=o+Math.imul(y,Q)|0)+Math.imul(b,q)|0,i=i+Math.imul(b,Q)|0,n=n+Math.imul(f,$)|0,o=(o=o+Math.imul(f,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0;var we=(c+(n=n+Math.imul(u,re)|0)|0)+((8191&(o=(o=o+Math.imul(u,ne)|0)+Math.imul(p,re)|0))<<13)|0;c=((i=i+Math.imul(p,ne)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(N,U),o=(o=Math.imul(N,V))+Math.imul(M,U)|0,i=Math.imul(M,V),n=n+Math.imul(T,H)|0,o=(o=o+Math.imul(T,z)|0)+Math.imul(R,H)|0,i=i+Math.imul(R,z)|0,n=n+Math.imul(A,G)|0,o=(o=o+Math.imul(A,X)|0)+Math.imul(C,G)|0,i=i+Math.imul(C,X)|0,n=n+Math.imul(x,q)|0,o=(o=o+Math.imul(x,Q)|0)+Math.imul(w,q)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,o=(o=o+Math.imul(y,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0,n=n+Math.imul(f,re)|0,o=(o=o+Math.imul(f,ne)|0)+Math.imul(m,re)|0,i=i+Math.imul(m,ne)|0;var Ee=(c+(n=n+Math.imul(u,ie)|0)|0)+((8191&(o=(o=o+Math.imul(u,se)|0)+Math.imul(p,ie)|0))<<13)|0;c=((i=i+Math.imul(p,se)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(I,U),o=(o=Math.imul(I,V))+Math.imul(F,U)|0,i=Math.imul(F,V),n=n+Math.imul(N,H)|0,o=(o=o+Math.imul(N,z)|0)+Math.imul(M,H)|0,i=i+Math.imul(M,z)|0,n=n+Math.imul(T,G)|0,o=(o=o+Math.imul(T,X)|0)+Math.imul(R,G)|0,i=i+Math.imul(R,X)|0,n=n+Math.imul(A,q)|0,o=(o=o+Math.imul(A,Q)|0)+Math.imul(C,q)|0,i=i+Math.imul(C,Q)|0,n=n+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,o=(o=o+Math.imul(y,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0,n=n+Math.imul(f,ie)|0,o=(o=o+Math.imul(f,se)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,se)|0;var Ae=(c+(n=n+Math.imul(u,le)|0)|0)+((8191&(o=(o=o+Math.imul(u,ce)|0)+Math.imul(p,le)|0))<<13)|0;c=((i=i+Math.imul(p,ce)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,U),o=(o=Math.imul(L,V))+Math.imul(_,U)|0,i=Math.imul(_,V),n=n+Math.imul(I,H)|0,o=(o=o+Math.imul(I,z)|0)+Math.imul(F,H)|0,i=i+Math.imul(F,z)|0,n=n+Math.imul(N,G)|0,o=(o=o+Math.imul(N,X)|0)+Math.imul(M,G)|0,i=i+Math.imul(M,X)|0,n=n+Math.imul(T,q)|0,o=(o=o+Math.imul(T,Q)|0)+Math.imul(R,q)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,n=n+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,o=(o=o+Math.imul(y,se)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,se)|0,n=n+Math.imul(f,le)|0,o=(o=o+Math.imul(f,ce)|0)+Math.imul(m,le)|0,i=i+Math.imul(m,ce)|0;var Ce=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(o=(o=o+Math.imul(u,pe)|0)+Math.imul(p,ue)|0))<<13)|0;c=((i=i+Math.imul(p,pe)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(P,U),o=(o=Math.imul(P,V))+Math.imul(D,U)|0,i=Math.imul(D,V),n=n+Math.imul(L,H)|0,o=(o=o+Math.imul(L,z)|0)+Math.imul(_,H)|0,i=i+Math.imul(_,z)|0,n=n+Math.imul(I,G)|0,o=(o=o+Math.imul(I,X)|0)+Math.imul(F,G)|0,i=i+Math.imul(F,X)|0,n=n+Math.imul(N,q)|0,o=(o=o+Math.imul(N,Q)|0)+Math.imul(M,q)|0,i=i+Math.imul(M,Q)|0,n=n+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(C,re)|0,i=i+Math.imul(C,ne)|0,n=n+Math.imul(x,ie)|0,o=(o=o+Math.imul(x,se)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,se)|0,n=n+Math.imul(y,le)|0,o=(o=o+Math.imul(y,ce)|0)+Math.imul(b,le)|0,i=i+Math.imul(b,ce)|0,n=n+Math.imul(f,ue)|0,o=(o=o+Math.imul(f,pe)|0)+Math.imul(m,ue)|0,i=i+Math.imul(m,pe)|0;var ke=(c+(n=n+Math.imul(u,fe)|0)|0)+((8191&(o=(o=o+Math.imul(u,me)|0)+Math.imul(p,fe)|0))<<13)|0;c=((i=i+Math.imul(p,me)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(P,H),o=(o=Math.imul(P,z))+Math.imul(D,H)|0,i=Math.imul(D,z),n=n+Math.imul(L,G)|0,o=(o=o+Math.imul(L,X)|0)+Math.imul(_,G)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(I,q)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(F,q)|0,i=i+Math.imul(F,Q)|0,n=n+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(M,$)|0,i=i+Math.imul(M,ee)|0,n=n+Math.imul(T,re)|0,o=(o=o+Math.imul(T,ne)|0)+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(A,ie)|0,o=(o=o+Math.imul(A,se)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,se)|0,n=n+Math.imul(x,le)|0,o=(o=o+Math.imul(x,ce)|0)+Math.imul(w,le)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(y,ue)|0,o=(o=o+Math.imul(y,pe)|0)+Math.imul(b,ue)|0,i=i+Math.imul(b,pe)|0;var Te=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(o=(o=o+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;c=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(P,G),o=(o=Math.imul(P,X))+Math.imul(D,G)|0,i=Math.imul(D,X),n=n+Math.imul(L,q)|0,o=(o=o+Math.imul(L,Q)|0)+Math.imul(_,q)|0,i=i+Math.imul(_,Q)|0,n=n+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(F,$)|0,i=i+Math.imul(F,ee)|0,n=n+Math.imul(N,re)|0,o=(o=o+Math.imul(N,ne)|0)+Math.imul(M,re)|0,i=i+Math.imul(M,ne)|0,n=n+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,se)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,se)|0,n=n+Math.imul(A,le)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(C,le)|0,i=i+Math.imul(C,ce)|0,n=n+Math.imul(x,ue)|0,o=(o=o+Math.imul(x,pe)|0)+Math.imul(w,ue)|0,i=i+Math.imul(w,pe)|0;var Re=(c+(n=n+Math.imul(y,fe)|0)|0)+((8191&(o=(o=o+Math.imul(y,me)|0)+Math.imul(b,fe)|0))<<13)|0;c=((i=i+Math.imul(b,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(P,q),o=(o=Math.imul(P,Q))+Math.imul(D,q)|0,i=Math.imul(D,Q),n=n+Math.imul(L,$)|0,o=(o=o+Math.imul(L,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(I,re)|0,o=(o=o+Math.imul(I,ne)|0)+Math.imul(F,re)|0,i=i+Math.imul(F,ne)|0,n=n+Math.imul(N,ie)|0,o=(o=o+Math.imul(N,se)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,se)|0,n=n+Math.imul(T,le)|0,o=(o=o+Math.imul(T,ce)|0)+Math.imul(R,le)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(A,ue)|0,o=(o=o+Math.imul(A,pe)|0)+Math.imul(C,ue)|0,i=i+Math.imul(C,pe)|0;var Se=(c+(n=n+Math.imul(x,fe)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(w,fe)|0))<<13)|0;c=((i=i+Math.imul(w,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,$),o=(o=Math.imul(P,ee))+Math.imul(D,$)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,o=(o=o+Math.imul(L,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(I,ie)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(F,ie)|0,i=i+Math.imul(F,se)|0,n=n+Math.imul(N,le)|0,o=(o=o+Math.imul(N,ce)|0)+Math.imul(M,le)|0,i=i+Math.imul(M,ce)|0,n=n+Math.imul(T,ue)|0,o=(o=o+Math.imul(T,pe)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,pe)|0;var Ne=(c+(n=n+Math.imul(A,fe)|0)|0)+((8191&(o=(o=o+Math.imul(A,me)|0)+Math.imul(C,fe)|0))<<13)|0;c=((i=i+Math.imul(C,me)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(P,re),o=(o=Math.imul(P,ne))+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,o=(o=o+Math.imul(L,se)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,se)|0,n=n+Math.imul(I,le)|0,o=(o=o+Math.imul(I,ce)|0)+Math.imul(F,le)|0,i=i+Math.imul(F,ce)|0,n=n+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,pe)|0)+Math.imul(M,ue)|0,i=i+Math.imul(M,pe)|0;var Me=(c+(n=n+Math.imul(T,fe)|0)|0)+((8191&(o=(o=o+Math.imul(T,me)|0)+Math.imul(R,fe)|0))<<13)|0;c=((i=i+Math.imul(R,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(P,ie),o=(o=Math.imul(P,se))+Math.imul(D,ie)|0,i=Math.imul(D,se),n=n+Math.imul(L,le)|0,o=(o=o+Math.imul(L,ce)|0)+Math.imul(_,le)|0,i=i+Math.imul(_,ce)|0,n=n+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,pe)|0)+Math.imul(F,ue)|0,i=i+Math.imul(F,pe)|0;var Oe=(c+(n=n+Math.imul(N,fe)|0)|0)+((8191&(o=(o=o+Math.imul(N,me)|0)+Math.imul(M,fe)|0))<<13)|0;c=((i=i+Math.imul(M,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(P,le),o=(o=Math.imul(P,ce))+Math.imul(D,le)|0,i=Math.imul(D,ce),n=n+Math.imul(L,ue)|0,o=(o=o+Math.imul(L,pe)|0)+Math.imul(_,ue)|0,i=i+Math.imul(_,pe)|0;var Ie=(c+(n=n+Math.imul(I,fe)|0)|0)+((8191&(o=(o=o+Math.imul(I,me)|0)+Math.imul(F,fe)|0))<<13)|0;c=((i=i+Math.imul(F,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(P,ue),o=(o=Math.imul(P,pe))+Math.imul(D,ue)|0,i=Math.imul(D,pe);var Fe=(c+(n=n+Math.imul(L,fe)|0)|0)+((8191&(o=(o=o+Math.imul(L,me)|0)+Math.imul(_,fe)|0))<<13)|0;c=((i=i+Math.imul(_,me)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863;var je=(c+(n=Math.imul(P,fe))|0)+((8191&(o=(o=Math.imul(P,me))+Math.imul(D,fe)|0))<<13)|0;return c=((i=Math.imul(D,me))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,l[0]=ge,l[1]=ye,l[2]=be,l[3]=ve,l[4]=xe,l[5]=we,l[6]=Ee,l[7]=Ae,l[8]=Ce,l[9]=ke,l[10]=Te,l[11]=Re,l[12]=Se,l[13]=Ne,l[14]=Me,l[15]=Oe,l[16]=Ie,l[17]=Fe,l[18]=je,0!==c&&(l[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,i=0;i<r.length-1;i++){var s=o;o=0;for(var a=67108863&n,l=Math.min(i,t.length-1),c=Math.max(0,i-e.length+1);c<=l;c++){var d=i-c,u=(0|e.words[d])*(0|t.words[c]),p=67108863&u;a=67108863&(p=p+a|0),o+=(s=(s=s+(u/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[i]=a,n=s,s=o}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}Math.imul||(m=f),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?f(this,e,t):r<1024?g(this,e,t):y(this,e,t)},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,o=0;o<this.length;o++){var i=(0|this.words[o])*e,s=(67108863&i)+(67108863&n);n>>=26,n+=i/67108864|0,n+=s>>>26,this.words[o]=67108863&s}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,o=r%26;t[r]=e.words[n]>>>o&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&i,l=(0|this.words[t])-a<<n;this.words[t]=l|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var o;r("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,s=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<<i,l=n;if(o-=s,o=Math.max(0,o),l){for(var c=0;c<s;c++)l.words[c]=this.words[c];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var d=0;for(c=this.length-1;c>=0&&(0!==d||c>=o);c--){var u=0|this.words[c];this.words[c]=d<<26-i|u>>>i,d=u&a}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<<t;return!(this.length<=n||!(this.words[n]&o))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var o,i,s=e.length+n;this._expand(s);var a=0;for(o=0;o<e.length;o++){i=(0|this.words[o+n])+a;var l=(0|e.words[o])*t;a=((i-=67108863&l)>>26)-(l/67108864|0),this.words[o+n]=67108863&i}for(;o<this.length-n;o++)a=(i=(0|this.words[o+n])+a)>>26,this.words[o+n]=67108863&i;if(0===a)return this._strip();for(r(-1===a),a=0,o=0;o<this.length;o++)a=(i=-(0|this.words[o])+a)>>26,this.words[o]=67108863&i;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,l=n.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var d=n.clone()._ishlnsubmul(i,1,l);0===d.negative&&(n=d,a&&(a.words[l]=1));for(var u=l-1;u>=0;u--){var p=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]);for(p=Math.min(p/s|0,67108863),n._ishlnsubmul(i,p,u);0!==n.negative;)p--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=p)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),i=r.cmp(n);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,o=0,i=this.length-1;i>=0;i--)o=(n*o+(0|this.words[i]))%e;return t?-o:o},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*n;this.words[o]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var d=n.clone(),u=t.clone();!t.isZero();){for(var p=0,h=1;0==(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(d),s.isub(u)),i.iushrn(1),s.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(d),l.isub(u)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(l)):(n.isub(t),a.isub(i),l.isub(s))}return{a:a,b:l,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,d=1;0==(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var u=0,p=1;0==(n.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(n.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var o=t.cmp(r);if(o<0){var i=t;t=r,r=i}else if(0===o||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=o,this;for(var i=o,s=n;0!==i&&s<this.length;s++){var a=0|this.words[s];i=(a+=i)>>>26,a&=67108863,this.words[s]=a}return 0!==i&&(this.words[s]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],o=0|e.words[r];if(n!==o){n<o?t=-1:n>o&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new C(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(x,v),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),o=0;o<n;o++)t.words[o]=e.words[o];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&r,o=10;o<e.length;o++){var s=0|e.words[o];e.words[o-10]=(s&r)<<4|i>>>22,i=s}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,v),n(E,v),n(A,v),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,o=67108863&n;n>>>=26,e.words[r]=o,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new w;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return b[e]=t,t},C.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},C.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,c).cmp(l);)d.redIAdd(l);for(var u=this.pow(d,i),p=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<f);var y=this.pow(u,new o(1).iushln(f-g-1));p=p.redMul(y),u=y.redSqr(),h=h.redMul(u),f=g}return p},C.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},C.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],d=l-1;d>=0;d--){var u=c>>d&1;i!==r[0]&&(i=this.sqr(i)),0!==u||0!==s?(s<<=1,s|=u,(4==++a||0===n&&0===d)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}l=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},n(k,C),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(gp,Fe);var yp=gp.exports;function bp(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var vp=xp;function xp(e,t){if(!e)throw new Error(t||"Assertion failed")}xp.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var wp=bp((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var o=e.charCodeAt(n),i=o>>8,s=255&o;i?r.push(i,s):r.push(s)}return r},r.zero2=n,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e}})),Ep=bp((function(e,t){var r=t;r.assert=vp,r.toArray=wp.toArray,r.zero2=wp.zero2,r.toHex=wp.toHex,r.encode=wp.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var o=1<<t+1,i=e.clone(),s=0;s<n.length;s++){var a,l=i.andln(o-1);i.isOdd()?(a=l>(o>>1)-1?(o>>1)-l:l,i.isubn(a)):a=0,n[s]=a,i.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,o=0,i=0;e.cmpn(-o)>0||t.cmpn(-i)>0;){var s,a,l=e.andln(3)+o&3,c=t.andln(3)+i&3;3===l&&(l=-1),3===c&&(c=-1),s=0==(1&l)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==c?l:-l,r[0].push(s),a=0==(1&c)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==l?c:-c,r[1].push(a),2*o===s+1&&(o=1-o),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new yp(e,"hex","le")}})),Ap=Ep.getNAF,Cp=Ep.getJSF,kp=Ep.assert;function Tp(e,t){this.type=e,this.p=new yp(t.p,16),this.red=t.prime?yp.red(t.prime):yp.mont(this.p),this.zero=new yp(0).toRed(this.red),this.one=new yp(1).toRed(this.red),this.two=new yp(2).toRed(this.red),this.n=t.n&&new yp(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Rp=Tp;function Sp(e,t){this.curve=e,this.type=t,this.precomputed=null}Tp.prototype.point=function(){throw new Error("Not implemented")},Tp.prototype.validate=function(){throw new Error("Not implemented")},Tp.prototype._fixedNafMul=function(e,t){kp(e.precomputed);var r=e._getDoubles(),n=Ap(t,1,this._bitLength),o=(1<<r.step+1)-(r.step%2==0?2:1);o/=3;var i,s,a=[];for(i=0;i<n.length;i+=r.step){s=0;for(var l=i+r.step-1;l>=i;l--)s=(s<<1)+n[l];a.push(s)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),u=o;u>0;u--){for(i=0;i<a.length;i++)(s=a[i])===u?d=d.mixedAdd(r.points[i]):s===-u&&(d=d.mixedAdd(r.points[i].neg()));c=c.add(d)}return c.toP()},Tp.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var o=n.points,i=Ap(t,r,this._bitLength),s=this.jpoint(null,null,null),a=i.length-1;a>=0;a--){for(var l=0;a>=0&&0===i[a];a--)l++;if(a>=0&&l++,s=s.dblp(l),a<0)break;var c=i[a];kp(0!==c),s="affine"===e.type?c>0?s.mixedAdd(o[c-1>>1]):s.mixedAdd(o[-c-1>>1].neg()):c>0?s.add(o[c-1>>1]):s.add(o[-c-1>>1].neg())}return"affine"===e.type?s.toP():s},Tp.prototype._wnafMulAdd=function(e,t,r,n,o){var i,s,a,l=this._wnafT1,c=this._wnafT2,d=this._wnafT3,u=0;for(i=0;i<n;i++){var p=(a=t[i])._getNAFPoints(e);l[i]=p.wnd,c[i]=p.points}for(i=n-1;i>=1;i-=2){var h=i-1,f=i;if(1===l[h]&&1===l[f]){var m=[t[h],null,null,t[f]];0===t[h].y.cmp(t[f].y)?(m[1]=t[h].add(t[f]),m[2]=t[h].toJ().mixedAdd(t[f].neg())):0===t[h].y.cmp(t[f].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[f]),m[2]=t[h].add(t[f].neg())):(m[1]=t[h].toJ().mixedAdd(t[f]),m[2]=t[h].toJ().mixedAdd(t[f].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=Cp(r[h],r[f]);for(u=Math.max(y[0].length,u),d[h]=new Array(u),d[f]=new Array(u),s=0;s<u;s++){var b=0|y[0][s],v=0|y[1][s];d[h][s]=g[3*(b+1)+(v+1)],d[f][s]=0,c[h]=m}}else d[h]=Ap(r[h],l[h],this._bitLength),d[f]=Ap(r[f],l[f],this._bitLength),u=Math.max(d[h].length,u),u=Math.max(d[f].length,u)}var x=this.jpoint(null,null,null),w=this._wnafT4;for(i=u;i>=0;i--){for(var E=0;i>=0;){var A=!0;for(s=0;s<n;s++)w[s]=0|d[s][i],0!==w[s]&&(A=!1);if(!A)break;E++,i--}if(i>=0&&E++,x=x.dblp(E),i<0)break;for(s=0;s<n;s++){var C=w[s];0!==C&&(C>0?a=c[s][C-1>>1]:C<0&&(a=c[s][-C-1>>1].neg()),x="affine"===a.type?x.mixedAdd(a):x.add(a))}}for(i=0;i<n;i++)c[i]=null;return o?x:x.toP()},Tp.BasePoint=Sp,Sp.prototype.eq=function(){throw new Error("Not implemented")},Sp.prototype.validate=function(){return this.curve.validate(this)},Tp.prototype.decodePoint=function(e,t){e=Ep.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?kp(e[e.length-1]%2==0):7===e[0]&&kp(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},Sp.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Sp.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},Sp.prototype.encode=function(e,t){return Ep.encode(this._encode(t),e)},Sp.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Sp.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Sp.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,o=0;o<t;o+=e){for(var i=0;i<e;i++)n=n.dbl();r.push(n)}return{step:e,points:r}},Sp.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),o=1;o<r;o++)t[o]=t[o-1].add(n);return{wnd:e,points:t}},Sp.prototype._getBeta=function(){return null},Sp.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var Np=bp((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),Mp=Ep.assert;function Op(e){Rp.call(this,"short",e),this.a=new yp(e.a,16).toRed(this.red),this.b=new yp(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Np(Op,Rp);var Ip=Op;function Fp(e,t,r,n){Rp.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new yp(t,16),this.y=new yp(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function jp(e,t,r,n){Rp.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new yp(0)):(this.x=new yp(t,16),this.y=new yp(r,16),this.z=new yp(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Op.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new yp(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new yp(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],Mp(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new yp(e.a,16),b:new yp(e.b,16)}})):this._getEndoBasis(r)}}},Op.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:yp.mont(e),r=new yp(2).toRed(t).redInvm(),n=r.redNeg(),o=new yp(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},Op.prototype._getEndoBasis=function(e){for(var t,r,n,o,i,s,a,l,c,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=e,p=this.n.clone(),h=new yp(1),f=new yp(0),m=new yp(0),g=new yp(1),y=0;0!==u.cmpn(0);){var b=p.div(u);l=p.sub(b.mul(u)),c=m.sub(b.mul(h));var v=g.sub(b.mul(f));if(!n&&l.cmp(d)<0)t=a.neg(),r=h,n=l.neg(),o=c;else if(n&&2==++y)break;a=l,p=u,u=l,m=h,h=c,g=f,f=v}i=l.neg(),s=c;var x=n.sqr().add(o.sqr());return i.sqr().add(s.sqr()).cmp(x)>=0&&(i=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),i.negative&&(i=i.neg(),s=s.neg()),[{a:n,b:o},{a:i,b:s}]},Op.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],o=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),s=o.mul(r.a),a=i.mul(n.a),l=o.mul(r.b),c=i.mul(n.b);return{k1:e.sub(s).sub(a),k2:l.add(c).neg()}},Op.prototype.pointFromX=function(e,t){(e=new yp(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},Op.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},Op.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,i=0;i<e.length;i++){var s=this._endoSplit(t[i]),a=e[i],l=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),l=l.neg(!0)),n[2*i]=a,n[2*i+1]=l,o[2*i]=s.k1,o[2*i+1]=s.k2}for(var c=this._wnafMulAdd(1,n,o,2*i,r),d=0;d<2*i;d++)n[d]=null,o[d]=null;return c},Np(Fp,Rp.BasePoint),Op.prototype.point=function(e,t,r){return new Fp(this,e,t,r)},Op.prototype.pointFromJSON=function(e,t){return Fp.fromJSON(this,e,t)},Fp.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},Fp.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Fp.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function o(t){return e.point(t[0],t[1],r)}var i=t[2];return n.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[n].concat(i.doubles.points.map(o))},naf:i.naf&&{wnd:i.naf.wnd,points:[n].concat(i.naf.points.map(o))}},n},Fp.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Fp.prototype.isInfinity=function(){return this.inf},Fp.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},Fp.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,s)},Fp.prototype.getX=function(){return this.x.fromRed()},Fp.prototype.getY=function(){return this.y.fromRed()},Fp.prototype.mul=function(e){return e=new yp(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Fp.prototype.mulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2)},Fp.prototype.jmulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0)},Fp.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Fp.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},Fp.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Np(jp,Rp.BasePoint),Op.prototype.jpoint=function(e,t,r){return new jp(this,e,t,r)},jp.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},jp.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},jp.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),o=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(o),l=i.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),d=c.redMul(a),u=n.redMul(c),p=l.redSqr().redIAdd(d).redISub(u).redISub(u),h=l.redMul(u.redISub(p)).redISub(i.redMul(d)),f=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(p,h,f)},jp.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),o=this.y,i=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=o.redSub(i);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),c=l.redMul(s),d=r.redMul(l),u=a.redSqr().redIAdd(c).redISub(d).redISub(d),p=a.redMul(d.redISub(u)).redISub(o.redMul(c)),h=this.z.redMul(s);return this.curve.jpoint(u,p,h)},jp.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,o=this.curve.tinv,i=this.x,s=this.y,a=this.z,l=a.redSqr().redSqr(),c=s.redAdd(s);for(t=0;t<e;t++){var d=i.redSqr(),u=c.redSqr(),p=u.redSqr(),h=d.redAdd(d).redIAdd(d).redIAdd(n.redMul(l)),f=i.redMul(u),m=h.redSqr().redISub(f.redAdd(f)),g=f.redISub(m),y=h.redMul(g);y=y.redIAdd(y).redISub(p);var b=c.redMul(a);t+1<e&&(l=l.redMul(p)),i=m,a=b,c=y}return this.curve.jpoint(i,c.redMul(o),a)},jp.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},jp.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(n).redISub(i);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),l=a.redSqr().redISub(s).redISub(s),c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),e=l,t=a.redMul(s.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var d=this.x.redSqr(),u=this.y.redSqr(),p=u.redSqr(),h=this.x.redAdd(u).redSqr().redISub(d).redISub(p);h=h.redIAdd(h);var f=d.redAdd(d).redIAdd(d),m=f.redSqr(),g=p.redIAdd(p);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=f.redMul(h.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},jp.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(n).redISub(i);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),l=a.redSqr().redISub(s).redISub(s);e=l;var c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(s.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var d=this.z.redSqr(),u=this.y.redSqr(),p=this.x.redMul(u),h=this.x.redSub(d).redMul(this.x.redAdd(d));h=h.redAdd(h).redIAdd(h);var f=p.redIAdd(p),m=(f=f.redIAdd(f)).redAdd(f);e=h.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(u).redISub(d);var g=u.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(f.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},jp.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,o=n.redSqr().redSqr(),i=t.redSqr(),s=r.redSqr(),a=i.redAdd(i).redIAdd(i).redIAdd(e.redMul(o)),l=t.redAdd(t),c=(l=l.redIAdd(l)).redMul(s),d=a.redSqr().redISub(c.redAdd(c)),u=c.redISub(d),p=s.redSqr();p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var h=a.redMul(u).redISub(p),f=r.redAdd(r).redMul(n);return this.curve.jpoint(d,h,f)},jp.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),o=e.redAdd(e).redIAdd(e),i=o.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(i)).redSqr(),l=n.redIAdd(n);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var c=o.redIAdd(s).redSqr().redISub(i).redISub(a).redISub(l),d=t.redMul(c);d=(d=d.redIAdd(d)).redIAdd(d);var u=this.x.redMul(a).redISub(d);u=(u=u.redIAdd(u)).redIAdd(u);var p=this.y.redMul(c.redMul(l.redISub(c)).redISub(s.redMul(a)));p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var h=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(u,p,h)},jp.prototype.mul=function(e,t){return e=new yp(e,t),this.curve._wnafMul(this,e)},jp.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),o=r.redMul(e.z);return 0===this.y.redMul(o).redISub(e.y.redMul(n)).cmpn(0)},jp.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),o=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0}},jp.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},jp.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Lp=bp((function(e,t){var r=t;r.base=Rp,r.short=Ip,r.mont=null,r.edwards=null})),_p=bp((function(e,t){var r,n=t,o=Ep.assert;function i(e){"short"===e.type?this.curve=new Lp.short(e):"edwards"===e.type?this.curve=new Lp.edwards(e):this.curve=new Lp.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:qu.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:qu.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:qu.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:qu.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:qu.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:qu.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:qu.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:qu.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function Wp(e){if(!(this instanceof Wp))return new Wp(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=wp.toArray(e.entropy,e.entropyEnc||"hex"),r=wp.toArray(e.nonce,e.nonceEnc||"hex"),n=wp.toArray(e.pers,e.persEnc||"hex");vp(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var Pp=Wp;Wp.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},Wp.prototype._hmac=function(){return new qu.hmac(this.hash,this.K)},Wp.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},Wp.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=wp.toArray(e,t),r=wp.toArray(r,n),vp(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},Wp.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=wp.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var i=o.slice(0,e);return this._update(r),this._reseed++,wp.encode(i,t)};var Dp=Ep.assert;function Bp(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var Up=Bp;Bp.fromPublic=function(e,t,r){return t instanceof Bp?t:new Bp(e,{pub:t,pubEnc:r})},Bp.fromPrivate=function(e,t,r){return t instanceof Bp?t:new Bp(e,{priv:t,privEnc:r})},Bp.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Bp.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},Bp.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},Bp.prototype._importPrivate=function(e,t){this.priv=new yp(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},Bp.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?Dp(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Dp(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},Bp.prototype.derive=function(e){return e.validate()||Dp(e.validate(),"public point not validated"),e.mul(this.priv).getX()},Bp.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},Bp.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},Bp.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Vp=Ep.assert;function Zp(e,t){if(e instanceof Zp)return e;this._importDER(e,t)||(Vp(e.r&&e.s,"Signature without r or s"),this.r=new yp(e.r,16),this.s=new yp(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Hp=Zp;function zp(){this.place=0}function Yp(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var o=0,i=0,s=t.place;i<n;i++,s++)o<<=8,o|=e[s],o>>>=0;return!(o<=127)&&(t.place=s,o)}function Gp(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function Xp(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}Zp.prototype._importDER=function(e,t){e=Ep.toArray(e,t);var r=new zp;if(48!==e[r.place++])return!1;var n=Yp(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=Yp(e,r);if(!1===o)return!1;var i=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var s=Yp(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var a=e.slice(r.place,s+r.place);if(0===i[0]){if(!(128&i[1]))return!1;i=i.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new yp(i),this.s=new yp(a),this.recoveryParam=null,!0},Zp.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=Gp(t),r=Gp(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Xp(n,t.length),(n=n.concat(t)).push(2),Xp(n,r.length);var o=n.concat(r),i=[48];return Xp(i,o.length),i=i.concat(o),Ep.encode(i,e)};var Jp=function(){throw new Error("unsupported")},qp=Ep.assert;function Qp(e){if(!(this instanceof Qp))return new Qp(e);"string"==typeof e&&(qp(Object.prototype.hasOwnProperty.call(_p,e),"Unknown curve "+e),e=_p[e]),e instanceof _p.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Kp=Qp;Qp.prototype.keyPair=function(e){return new Up(this,e)},Qp.prototype.keyFromPrivate=function(e,t){return Up.fromPrivate(this,e,t)},Qp.prototype.keyFromPublic=function(e,t){return Up.fromPublic(this,e,t)},Qp.prototype.genKeyPair=function(e){e||(e={});for(var t=new Pp({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Jp(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new yp(2));;){var o=new yp(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},Qp.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Qp.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new yp(e,16));for(var o=this.n.byteLength(),i=t.getPrivate().toArray("be",o),s=e.toArray("be",o),a=new Pp({hash:this.hash,entropy:i,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new yp(1)),c=0;;c++){var d=n.k?n.k(c):new yp(a.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var u=this.g.mul(d);if(!u.isInfinity()){var p=u.getX(),h=p.umod(this.n);if(0!==h.cmpn(0)){var f=d.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(f=f.umod(this.n)).cmpn(0)){var m=(u.getY().isOdd()?1:0)|(0!==p.cmp(h)?2:0);return n.canonical&&f.cmp(this.nh)>0&&(f=this.n.sub(f),m^=1),new Hp({r:h,s:f,recoveryParam:m})}}}}}},Qp.prototype.verify=function(e,t,r,n){e=this._truncateToN(new yp(e,16)),r=this.keyFromPublic(r,n);var o=(t=new Hp(t,"hex")).r,i=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var s,a=i.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(l,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},Qp.prototype.recoverPubKey=function(e,t,r,n){qp((3&r)===r,"The recovery param is more than two bits"),t=new Hp(t,n);var o=this.n,i=new yp(e),s=t.r,a=t.s,l=1&r,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");s=c?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=t.r.invm(o),u=o.sub(i).mul(d).umod(o),p=a.mul(d).umod(o);return this.g.mulAdd(u,s,p)},Qp.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new Hp(t,n)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var $p=bp((function(e,t){var r=t;r.version="6.5.4",r.utils=Ep,r.rand=function(){throw new Error("unsupported")},r.curve=Lp,r.curves=_p,r.ec=Kp,r.eddsa=null})).ec;const eh=new Sa("signing-key/5.7.0");let th=null;function rh(){return th||(th=new $p("secp256k1")),th}class nh{constructor(e){kl(this,"curve","secp256k1"),kl(this,"privateKey",Da(e)),32!==Ba(this.privateKey)&&eh.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=rh().keyFromPrivate(La(this.privateKey));kl(this,"publicKey","0x"+t.getPublic(!1,"hex")),kl(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),kl(this,"_isSigningKey",!0)}_addPoint(e){const t=rh().keyFromPublic(La(this.publicKey)),r=rh().keyFromPublic(La(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=rh().keyFromPrivate(La(this.privateKey)),r=La(e);32!==r.length&&eh.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return za({recoveryParam:n.recoveryParam,r:Ha("0x"+n.r.toString(16),32),s:Ha("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=rh().keyFromPrivate(La(this.privateKey)),r=rh().keyFromPublic(La(oh(e)));return Ha("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function oh(e,t){const r=La(e);if(32===r.length){const e=new nh(r);return t?"0x"+rh().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?Da(r):"0x"+rh().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+rh().keyFromPublic(r).getPublic(!0,"hex"):Da(r):eh.throwArgumentError("invalid public or private key","key","[REDACTED]")}const ih=new Sa("transactions/5.7.0");var sh;function ah(e){return"0x"===e?null:al(e)}function lh(e){return"0x"===e?Ql:Ae.from(e)}function ch(e,t){return function(e){return al(Ua(Xa(Ua(oh(e),1)),12))}(function(e,t){const r=za(t),n={r:La(r.r),s:La(r.s)};return"0x"+rh().recoverPubKey(La(e),n,r.recoveryParam).encode("hex",!1)}(La(e),t))}function dh(e,t){const r=Wa(Ae.from(e).toHexString());return r.length>32&&ih.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function uh(e,t){return{address:al(e),storageKeys:(t||[]).map(((t,r)=>(32!==Ba(t)&&ih.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function ph(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&ih.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),uh(e[0],e[1])):uh(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return uh(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function hh(e){return ph(e).map((e=>[e.address,e.storageKeys]))}function fh(e,t){if(null!=e.gasPrice){const t=Ae.from(e.gasPrice),r=Ae.from(e.maxFeePerGas||0);t.eq(r)||ih.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[dh(e.chainId||0,"chainId"),dh(e.nonce||0,"nonce"),dh(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),dh(e.maxFeePerGas||0,"maxFeePerGas"),dh(e.gasLimit||0,"gasLimit"),null!=e.to?al(e.to):"0x",dh(e.value||0,"value"),e.data||"0x",hh(e.accessList||[])];if(t){const e=za(t);r.push(dh(e.recoveryParam,"recoveryParam")),r.push(Wa(e.r)),r.push(Wa(e.s))}return Va(["0x02",$a(r)])}function mh(e,t){const r=[dh(e.chainId||0,"chainId"),dh(e.nonce||0,"nonce"),dh(e.gasPrice||0,"gasPrice"),dh(e.gasLimit||0,"gasLimit"),null!=e.to?al(e.to):"0x",dh(e.value||0,"value"),e.data||"0x",hh(e.accessList||[])];if(t){const e=za(t);r.push(dh(e.recoveryParam,"recoveryParam")),r.push(Wa(e.r)),r.push(Wa(e.s))}return Va(["0x01",$a(r)])}function gh(e,t,r){try{const r=lh(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){ih.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=Ha(t[1],32),e.s=Ha(t[2],32);try{const t=Xa(r(e));e.from=ch(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function yh(e){const t=La(e);if(t[0]>127)return function(e){const t=rl(e);9!==t.length&&6!==t.length&&ih.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:lh(t[0]).toNumber(),gasPrice:lh(t[1]),gasLimit:lh(t[2]),to:ah(t[3]),value:lh(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=Ae.from(t[6]).toNumber()}catch(e){return r}if(r.r=Ha(t[7],32),r.s=Ha(t[8],32),Ae.from(r.r).isZero()&&Ae.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const o=t.slice(0,6);0!==r.chainId&&(o.push(Da(r.chainId)),o.push("0x"),o.push("0x"),n-=2*r.chainId+8);const i=Xa($a(o));try{r.from=ch(i,{r:Da(r.r),s:Da(r.s),recoveryParam:n})}catch(e){}r.hash=Xa(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=rl(e.slice(1));8!==t.length&&11!==t.length&&ih.throwArgumentError("invalid component count for transaction type: 1","payload",Da(e));const r={type:1,chainId:lh(t[0]).toNumber(),nonce:lh(t[1]).toNumber(),gasPrice:lh(t[2]),gasLimit:lh(t[3]),to:ah(t[4]),value:lh(t[5]),data:t[6],accessList:ph(t[7])};return 8===t.length||(r.hash=Xa(e),gh(r,t.slice(8),mh)),r}(t);case 2:return function(e){const t=rl(e.slice(1));9!==t.length&&12!==t.length&&ih.throwArgumentError("invalid component count for transaction type: 2","payload",Da(e));const r=lh(t[2]),n=lh(t[3]),o={type:2,chainId:lh(t[0]).toNumber(),nonce:lh(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:lh(t[4]),to:ah(t[5]),value:lh(t[6]),data:t[7],accessList:ph(t[8])};return 9===t.length||(o.hash=Xa(e),gh(o,t.slice(9),fh)),o}(t)}return ih.throwError(`unsupported transaction type: ${t[0]}`,Sa.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(sh||(sh={}));const bh=new Sa(mp);class vh{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),o=this.data.bind(this),i=this.hash.bind(this),s=this.hex.bind(this),a=this.number.bind(this),l=this.type.bind(this);return e.transaction={hash:i,type:l,accessList:vh.allowNull(this.accessList.bind(this),null),blockHash:vh.allowNull(i,null),blockNumber:vh.allowNull(a,null),transactionIndex:vh.allowNull(a,null),confirmations:vh.allowNull(a,null),from:t,gasPrice:vh.allowNull(r),maxPriorityFeePerGas:vh.allowNull(r),maxFeePerGas:vh.allowNull(r),gasLimit:r,to:vh.allowNull(t,null),value:r,nonce:a,data:o,r:vh.allowNull(this.uint256),s:vh.allowNull(this.uint256),v:vh.allowNull(a),creates:vh.allowNull(t,null),raw:vh.allowNull(o)},e.transactionRequest={from:vh.allowNull(t),nonce:vh.allowNull(a),gasLimit:vh.allowNull(r),gasPrice:vh.allowNull(r),maxPriorityFeePerGas:vh.allowNull(r),maxFeePerGas:vh.allowNull(r),to:vh.allowNull(t),value:vh.allowNull(r),data:vh.allowNull((e=>this.data(e,!0))),type:vh.allowNull(a),accessList:vh.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:i,address:t,topics:vh.arrayOf(i),data:o,logIndex:a,blockHash:i},e.receipt={to:vh.allowNull(this.address,null),from:vh.allowNull(this.address,null),contractAddress:vh.allowNull(t,null),transactionIndex:a,root:vh.allowNull(s),gasUsed:r,logsBloom:vh.allowNull(o),blockHash:i,transactionHash:i,logs:vh.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:vh.allowNull(a,null),cumulativeGasUsed:r,effectiveGasPrice:vh.allowNull(r),status:vh.allowNull(a),type:l},e.block={hash:vh.allowNull(i),parentHash:i,number:a,timestamp:a,nonce:vh.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:vh.allowNull(t),extraData:o,transactions:vh.allowNull(vh.arrayOf(i)),baseFeePerGas:vh.allowNull(r)},e.blockWithTransactions=Sl(e.block),e.blockWithTransactions.transactions=vh.allowNull(vh.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:vh.allowNull(n,void 0),toBlock:vh.allowNull(n,void 0),blockHash:vh.allowNull(i,void 0),address:vh.allowNull(t,void 0),topics:vh.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:vh.allowNull(a),blockHash:vh.allowNull(i),transactionIndex:a,removed:vh.allowNull(this.boolean.bind(this)),address:t,data:vh.allowFalsish(o,"0x"),topics:vh.arrayOf(i),transactionHash:i,logIndex:a},e}accessList(e){return ph(e||[])}number(e){return"0x"===e?0:Ae.from(e).toNumber()}type(e){return"0x"===e||null==e?0:Ae.from(e).toNumber()}bigNumber(e){return Ae.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),Pa(e))?e.toLowerCase():bh.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return al(e)}callAddress(e){if(!Pa(e,32))return null;const t=al(Ua(e,12));return t===Jl?null:t}contractAddress(e){return function(e){let t=null;try{t=al(e.from)}catch(t){nl.throwArgumentError("missing from address","transaction",e)}return al(Ua(Xa($a([t,Wa(La(Ae.from(e.nonce).toHexString()))])),12))}(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||Pa(e))return Za(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==Ba(r)?bh.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=Ae.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!Pa(e))throw new Error("invalid uint256");return Ha(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=vh.check(t,e);return n._difficulty=null==r?null:Ae.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return vh.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&Ae.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=vh.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;Pa(r)&&(r=Ae.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),Pa(r)&&(r=Ae.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return yh(e)}receiptLog(e){return vh.check(this.formats.receiptLog,e)}receipt(e){const t=vh.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=Ae.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&bh.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):bh.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&bh.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return vh.check(this.formats.filter,e)}filterLog(e){return vh.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const o=e[n](t[n]);void 0!==o&&(r[n]=o)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}var xh=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const wh=new Sa(mp);function Eh(e){return null==e?"null":(32!==Ba(e)&&wh.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function Ah(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[Eh(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return Eh(e)})).join("&")}function Ch(e){if("string"==typeof e){if(32===Ba(e=e.toLowerCase()))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+Ah(e);if(_l.isForkEvent(e))throw wh.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+Ah(e.topics||[])}throw new Error("invalid event - "+e)}function kh(){return(new Date).getTime()}function Th(e){return new Promise((t=>{setTimeout(t,e)}))}const Rh=["block","network","pending","poll"];class Sh{constructor(e,t,r){kl(this,"tag",e),kl(this,"listener",t),kl(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const o={};return r.length>0&&(o.topics=r),t&&"*"!==t&&(o.address=t),o}pollable(){return this.tag.indexOf(":")>=0||Rh.indexOf(this.tag)>=0}}const Nh={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Mh(e){return Ha(Ae.from(e).toHexString(),32)}function Oh(e){return Xl.encode(_a([e,Ua(Qu(Qu(e)),0,4)]))}const Ih=new RegExp("^(ipfs)://(.*)$","i"),Fh=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Ih,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function jh(e,t){try{return ac(Lh(e,t))}catch(e){}return null}function Lh(e,t){if("0x"===e)return null;const r=Ae.from(Ua(e,t,t+32)).toNumber(),n=Ae.from(Ua(e,r,r+32)).toNumber();return Ua(e,r+32,r+32+n)}function _h(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):wh.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function Wh(e){const t=La(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function Ph(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function Dh(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(null),r+=32;for(let n=0;n<e.length;n++){const o=La(e[n]);t[n]=Wh(r),t.push(Wh(o.length)),t.push(Ph(o)),r+=32+32*Math.ceil(o.length/32)}return Va(t)}class Bh{constructor(e,t,r,n){kl(this,"provider",e),kl(this,"name",r),kl(this,"address",e.formatter.address(t)),kl(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((e=>Ae.from(e).eq(1))).catch((e=>{if(e.code===Sa.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return xh(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:Va([e,Ic(this.name),t||"0x"])};let n=!1;var o;(yield this.supportsWildcard())&&(n=!0,r.data=Va(["0x9061b923",Dh([(o=this.name,Da(_a(Oc(o).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"),r.data])]));try{let e=yield this.provider.call(r);return La(e).length%32==4&&wh.throwError("resolver threw error",Sa.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=Lh(e,0)),e}catch(e){if(e.code===Sa.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return xh(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?Lh(r,0):null}))}_getAddress(e,t){const r=Nh[String(e)];if(null==r&&wh.throwError(`unsupported coin type: ${e}`,Sa.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=La(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Oh(_a([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Oh(_a([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=fp.toWords(n.slice(2));return e.unshift(t),fp.encode(r.prefix,e)}}return null}getAddress(e){return xh(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||"0x0000000000000000000000000000000000000000000000000000000000000000"===e?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===Sa.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",Mh(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&wh.throwError("invalid or unsupported coin data",Sa.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return xh(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<Fh.length;r++){const n=t.match(Fh[r]);if(null==n)continue;const o=n[1].toLowerCase();switch(o){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:_h(t)};case"erc721":case"erc1155":{const r="erc721"===o?"0xc87b56dd":"0x0e89341c";e.push({type:o,content:t});const i=this._resolvedAddress||(yield this.getAddress()),s=(n[2]||"").split("/");if(2!==s.length)return null;const a=yield this.provider.formatter.address(s[0]),l=Ha(Ae.from(s[1]).toHexString(),32);if("erc721"===o){const t=this.provider.formatter.callAddress(yield this.provider.call({to:a,data:Va(["0x6352211e",l])}));if(i!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===o){const t=Ae.from(yield this.provider.call({to:a,data:Va(["0x00fdd58e",Ha(i,32),l])}));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}const c={to:this.provider.formatter.address(s[0]),data:Va([r,l])};let d=jh(yield this.provider.call(c),0);if(null==d)return null;e.push({type:"metadata-url-base",content:d}),"erc1155"===o&&(d=d.replace("{id}",l.substring(2)),e.push({type:"metadata-url-expanded",content:d})),d.match(/^ipfs:/i)&&(d=_h(d)),e.push({type:"metadata-url",content:d});const u=yield op(d);if(!u)return null;e.push({type:"metadata",content:JSON.stringify(u)});let p=u.image;if("string"!=typeof p)return null;if(p.match(/^(https:\/\/|data:)/i));else{if(null==p.match(Ih))return null;e.push({type:"url-ipfs",content:p}),p=_h(p)}return e.push({type:"url",content:p}),{linkage:e,url:p}}}}}catch(e){}return null}))}getContentHash(){return xh(this,void 0,void 0,(function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+Xl.encode("0x"+t[1])}const r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+Xl.encode("0x"+r[1])}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const o=e.match(/^0x90b2c605([0-9a-f]*)$/);if(o&&68===o[1].length){const e={"=":"","+":"-","/":"_"};return"sia://"+Yl("0x"+o[1]).replace(/[=+\/]/g,(t=>e[t]))}return wh.throwError("invalid or unsupported content hash data",Sa.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return xh(this,void 0,void 0,(function*(){let t=sc(e);t=_a([Mh(64),Mh(t.length),t]),t.length%32!=0&&(t=_a([t,Ha("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",Da(t));return null==r||"0x"===r?null:ac(r)}))}}let Uh=null,Vh=1;class Zh extends Wl{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),kl(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=Tl(new.target,"getNetwork")(e);t?(kl(this,"_network",t),this.emit("network",t,null)):wh.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return xh(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||wh.throwError("no network detected",Sa.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:kl(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return ip((()=>this._ready().then((e=>e),(e=>{if(e.code!==Sa.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==Uh&&(Uh=new vh),Uh}static getNetwork(e){return function(e){if(null==e)return null;if("number"==typeof e){for(const t in Hl){const r=Hl[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=Hl[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=Hl[e.name];if(!t)return"number"!=typeof e.chainId&&Pl.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&Pl.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var n;return null==r&&t._defaultProvider&&(r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}(null==e?"homestead":e)}ccipReadFetch(e,t,r){return xh(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),o=t.toLowerCase(),i=[];for(let e=0;e<r.length;e++){const t=r[e],s=t.replace("{sender}",n).replace("{data}",o),a=t.indexOf("{data}")>=0?null:JSON.stringify({data:o,sender:n}),l=yield op({url:s,errorPassThrough:!0},a,((e,t)=>(e.status=t.statusCode,e)));if(l.data)return l.data;const c=l.message||"unknown error";if(l.status>=400&&l.status<500)return wh.throwError(`response not found during CCIP fetch: ${c}`,Sa.errors.SERVER_ERROR,{url:t,errorMessage:c});i.push(c)}return wh.throwError(`error encountered during CCIP fetch: ${i.map((e=>JSON.stringify(e))).join(", ")}`,Sa.errors.SERVER_ERROR,{urls:r,errorMessages:i})}))}_getInternalBlockNumber(e){return xh(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(kh()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=kh(),r=Rl({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const o=kh();return(e=Ae.from(e).toNumber())<this._maxInternalBlockNumber&&(e=this._maxInternalBlockNumber),this._maxInternalBlockNumber=e,this._setFastBlockNumber(e),{blockNumber:e,reqTime:t,respTime:o}}));return this._internalBlockNumber=r,r.catch((e=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return xh(this,void 0,void 0,(function*(){const e=Vh++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)wh.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",wh.makeError("network block skew detected",Sa.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const o=n.toBlock-this._maxFilterBlockRange;o>n.fromBlock&&(n.fromBlock=o),n.fromBlock<0&&(n.fromBlock=0);const i=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(i)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return xh(this,void 0,void 0,(function*(){return wh.throwError("provider does not support network detection",Sa.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return xh(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Th(0),this._network;const r=wh.makeError("underlying network changed",Sa.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=kh();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=kh(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return xh(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return xh(this,void 0,void 0,(function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=t?o:new Promise(((o,i)=>{const s=[];let a=!1;const l=function(){return!!a||(a=!0,s.forEach((e=>{e()})),!1)},c=e=>{e.confirmations<t||l()||o(e)};if(this.on(e,c),s.push((()=>{this.removeListener(e,c)})),n){let r=n.startBlock,o=null;const c=s=>xh(this,void 0,void 0,(function*(){a||(yield Th(1e3),this.getTransactionCount(n.from).then((d=>xh(this,void 0,void 0,(function*(){if(!a){if(d<=n.nonce)r=s;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==o&&(o=r-3,o<n.startBlock&&(o=n.startBlock));o<=s;){if(a)return;const r=yield this.getBlockWithTransactions(o);for(let o=0;o<r.transactions.length;o++){const s=r.transactions[o];if(s.hash===e)return;if(s.from===n.from&&s.nonce===n.nonce){if(a)return;const r=yield this.waitForTransaction(s.hash,t);if(l())return;let o="replaced";return s.data===n.data&&s.to===n.to&&s.value.eq(n.value)?o="repriced":"0x"===s.data&&s.from===s.to&&s.value.isZero()&&(o="cancelled"),void i(wh.makeError("transaction was replaced",Sa.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===o||"cancelled"===o,reason:o,replacement:this._wrapTransaction(s),hash:e,receipt:r}))}}o++}}a||this.once("block",c)}}))),(e=>{a||this.once("block",c)})))}));if(a)return;this.once("block",c),s.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{l()||i(wh.makeError("timeout exceeded",Sa.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),s.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return xh(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return xh(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Ae.from(e)}catch(t){return wh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return xh(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield Rl({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return Ae.from(n)}catch(e){return wh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return xh(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield Rl({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return Ae.from(n).toNumber()}catch(e){return wh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return xh(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield Rl({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return Da(n)}catch(e){return wh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return xh(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield Rl({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>Za(e)))}),o=yield this.perform("getStorageAt",n);try{return Da(o)}catch(e){return wh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:o,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==Ba(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&wh.throwError("Transaction hash mismatch from Provider.sendTransaction.",Sa.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>xh(this,void 0,void 0,(function*(){let o;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const i=yield this._waitForTransaction(e.hash,t,n,o);return null==i&&0===t?null:(this._emitted["t:"+e.hash]=i.blockNumber,0===i.status&&wh.throwError("transaction failed",Sa.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:i}),i)})),n}sendTransaction(e){return xh(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>Da(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return xh(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?Ae.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?Da(e):null)))})),this.formatter.transactionRequest(yield Rl(r))}))}_getFilter(e){return xh(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield Rl(t))}))}_call(e,t,r){return xh(this,void 0,void 0,(function*(){r>=10&&wh.throwError("CCIP read exceeded maximum redirections",Sa.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,o=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===o.substring(0,10)&&Ba(o)%32==4)try{const i=Ua(o,4),s=Ua(i,0,32);Ae.from(s).eq(n)||wh.throwError("CCIP Read sender did not match",Sa.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const a=[],l=Ae.from(Ua(i,32,64)).toNumber(),c=Ae.from(Ua(i,l,l+32)).toNumber(),d=Ua(i,l+32);for(let t=0;t<c;t++){const r=jh(d,32*t);null==r&&wh.throwError("CCIP Read contained corrupt URL string",Sa.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),a.push(r)}const u=Lh(i,64);Ae.from(Ua(i,100,128)).isZero()||wh.throwError("CCIP Read callback selector included junk",Sa.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const p=Ua(i,96,100),h=Lh(i,128),f=yield this.ccipReadFetch(e,u,a);null==f&&wh.throwError("CCIP Read disabled or provided no URLs",Sa.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const m={to:n,data:Va([p,Dh([f,h])])};return this._call(m,t,r+1)}catch(e){if(e.code===Sa.errors.SERVER_ERROR)throw e}try{return Da(o)}catch(r){return wh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:o,error:r})}}))}call(e,t){return xh(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield Rl({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)}))}estimateGas(e){return xh(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Rl({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return Ae.from(r)}catch(e){return wh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:e})}}))}_getAddress(e){return xh(this,void 0,void 0,(function*(){"string"!=typeof(e=yield e)&&wh.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return null==t&&wh.throwError("ENS name not configured",Sa.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t}))}_getBlock(e,t){return xh(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;let r=-128;const n={includeTransactions:!!t};if(Pa(e,32))n.blockHash=e;else try{n.blockTag=yield this._getBlockTag(e),Pa(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(t){wh.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return ip((()=>xh(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;r<e.transactions.length;r++){const n=e.transactions[r];if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){null==t&&(t=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let e=t-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}}const r=this.formatter.blockWithTransactions(e);return r.transactions=r.transactions.map((e=>this._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return xh(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return ip((()=>xh(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return xh(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return ip((()=>xh(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return xh(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Rl({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),vh.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return xh(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return xh(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&wh.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return xh(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new Bh(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return xh(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||wh.throwError("network does not support ENS",Sa.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+Ic(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return xh(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if(Pa(e))throw t}"string"!=typeof e&&wh.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return xh(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=jh(yield this.call({to:r,data:"0x691f3431"+Ic(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return xh(this,void 0,void 0,(function*(){let t=null;if(Pa(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new Bh(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==Sa.errors.CALL_EXCEPTION)throw e}try{const e=jh(yield this.call({to:n,data:"0x691f3431"+Ic(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==Sa.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return wh.throwError(e+" not implemented",Sa.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new Sh(Ch(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],o=Ch(e);return this._events=this._events.filter((e=>e.tag!==o||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=Ch(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=Ch(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,o=Ch(e);return this._events=this._events.filter((e=>e.tag!==o||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=Ch(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var Hh=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const zh=new Sa("abstract-signer/5.7.0"),Yh=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Gh=[Sa.errors.INSUFFICIENT_FUNDS,Sa.errors.NONCE_EXPIRED,Sa.errors.REPLACEMENT_UNDERPRICED];class Xh{constructor(){zh.checkAbstract(new.target,Xh),kl(this,"_isSigner",!0)}getBalance(e){return Hh(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return Hh(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return Hh(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield Rl(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return Hh(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield Rl(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return Hh(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return Hh(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return Hh(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return Hh(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return Hh(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===Yh.indexOf(t)&&zh.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=Sl(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&zh.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return Hh(this,void 0,void 0,(function*(){const t=yield Rl(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>Hh(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&zh.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||zh.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):zh.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&zh.throwError("network does not support EIP-1559",Sa.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):zh.throwError("failed to get consistent fee data",Sa.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(Gh.indexOf(e.code)>=0)throw e;return zh.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Sa.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&zh.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield Rl(t)}))}_checkProvider(e){this.provider||zh.throwError("missing provider",Sa.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}var Jh=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const qh=new Sa(mp),Qh=["call","estimateGas"];function Kh(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=Pa(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=Kh(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return Kh(JSON.parse(e),t)}catch(e){}return null}function $h(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=Kh(t,!0);if(e)return e.data;qh.throwError("missing revert data in call exception; Transaction reverted without a reason string",Sa.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=Kh(t.body,!1);null==r&&(r=Kh(t,!1)),r&&qh.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Sa.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let o=t.message;throw t.code===Sa.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?o=t.error.message:"string"==typeof t.body?o=t.body:"string"==typeof t.responseText&&(o=t.responseText),o=(o||"").toLowerCase(),o.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&qh.throwError("insufficient funds for intrinsic transaction cost",Sa.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),o.match(/nonce (is )?too low/i)&&qh.throwError("nonce has already been used",Sa.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),o.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&qh.throwError("replacement fee too low",Sa.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),o.match(/only replay-protected/i)&&qh.throwError("legacy pre-eip-155 transactions not supported",Sa.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),Qh.indexOf(e)>=0&&o.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&qh.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Sa.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function ef(e){return new Promise((function(t){setTimeout(t,e)}))}function tf(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function rf(e){return e?e.toLowerCase():e}const nf={};class of extends Xh{constructor(e,t,r){if(super(),e!==nf)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");kl(this,"provider",t),null==r&&(r=0),"string"==typeof r?(kl(this,"_address",this.provider.formatter.address(r)),kl(this,"_index",null)):"number"==typeof r?(kl(this,"_index",r),kl(this,"_address",null)):qh.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return qh.throwError("cannot alter JSON-RPC Signer connection",Sa.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new sf(nf,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&qh.throwError("unknown account #"+this._index,Sa.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=Sl(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=Sl(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>Jh(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&qh.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),Rl({tx:Rl(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&qh.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&qh.throwError("user rejected transaction",Sa.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),$h("sendTransaction",e,n))))}))}signTransaction(e){return qh.throwError("signing transactions is unsupported",Sa.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Jh(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield ip((()=>Jh(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return Jh(this,void 0,void 0,(function*(){const t="string"==typeof e?sc(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Da(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&qh.throwError("user rejected signing",Sa.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return Jh(this,void 0,void 0,(function*(){const t="string"==typeof e?sc(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),Da(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&qh.throwError("user rejected signing",Sa.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return Jh(this,void 0,void 0,(function*(){const n=yield Xc.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(Xc.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&qh.throwError("user rejected signing",Sa.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return Jh(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class sf extends of{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const af={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class lf extends Zh{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=Tl(this.constructor,"defaultUrl")()),kl(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(Sl(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Jh(this,void 0,void 0,(function*(){yield ef(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=Tl(this.constructor,"getNetwork");try{return t(Ae.from(e).toNumber())}catch(t){return qh.throwError("could not detect network",Sa.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return qh.throwError("could not detect network",Sa.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new of(nf,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Il(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const o=op(this.connection,JSON.stringify(r),tf).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=o,setTimeout((()=>{this._cache[e]=null}),0)),o}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[rf(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[rf(t.address),t.blockTag]];case"getCode":return["eth_getCode",[rf(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[rf(t.address),Ha(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[Tl(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[Tl(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=rf(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return Jh(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&Ae.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=Sl(t)).transaction=Sl(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&qh.throwError(e+" not implemented",Sa.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return $h(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return ef(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=Sl(af);if(t)for(const e in t)t[e]&&(r[e]=!0);var n,o;o=r,(n=e)&&"object"==typeof n||Cl.throwArgumentError("invalid object","object",n),Object.keys(n).forEach((e=>{o[e]||Cl.throwArgumentError("invalid object key - "+e,"transaction:"+e,n)}));const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=Za(Ae.from(e[t]));"gasLimit"===t&&(t="gas"),i[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=Da(e[t]))})),e.accessList&&(i.accessList=ph(e.accessList)),i}}var cf=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const df=new Sa(mp);class uf extends lf{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return cf(this,void 0,void 0,(function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||df.throwError("no network detected",Sa.errors.UNKNOWN_ERROR,{}),null==this._network&&(kl(this,"_network",t),this.emit("network",t,null))),t}))}}function pf(e){return Number.parseInt(e,16)}new Sa(mp);class hf extends se{constructor(e,t,r){super(e,r),this.customProvider=t;const n=null==t?void 0:t.provider;n&&(this.provider=n);(null!=n?n:t).on("connect",(({chainId:e})=>{setTimeout((()=>{this.actions.update({chainId:pf(e)})}))})).on("disconnect",(e=>{setTimeout((()=>{var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.actions.resetState()}))})).on("chainChanged",(e=>{setTimeout((()=>{this.actions.update({chainId:pf(e)})}))})).on("accountsChanged",(e=>{setTimeout((()=>{this.actions.update({accounts:e})}))}))}activateAccounts(){return bl(this,void 0,void 0,(function*(){const e=this.actions.startActivation();try{const e=yield this.customProvider.listAccounts(),{chainId:t}=yield this.customProvider.getNetwork();this.actions.update({chainId:t,accounts:e})}catch(t){throw e(),t}}))}connectEagerly(){return bl(this,void 0,void 0,(function*(){return this.activateAccounts()}))}activate(){return bl(this,void 0,void 0,(function*(){return this.activateAccounts()}))}}function ff([e,t]){return[e,t]}var mf;function gf(){return gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gf.apply(this,arguments)}var yf,bf;function vf(){return vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vf.apply(this,arguments)}var xf;!function(e){e.INTEGRATOR="integrator",e.METAMASK="metamask",e.WALLET_CONNECT="walletConnect"}(xf||(xf={}));const wf={[xf.METAMASK]:{name:"MetaMask",type:xf.METAMASK,icon:function(e){return u.createElement("svg",gf({height:355,viewBox:"0 0 397 355",width:397,xmlns:"http://www.w3.org/2000/svg"},e),mf||(mf=u.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(-1 -1)"},u.createElement("path",{d:"m114.622644 327.195472 52.004717 13.810198v-18.05949l4.245283-4.249292h29.716982v21.246459 14.872523h-31.839624l-39.268868-16.997169z",fill:"#cdbdb2"}),u.createElement("path",{d:"m199.528305 327.195472 50.943397 13.810198v-18.05949l4.245283-4.249292h29.716981v21.246459 14.872523h-31.839623l-39.268868-16.997169z",fill:"#cdbdb2",transform:"matrix(-1 0 0 1 483.96227 0)"}),u.createElement("path",{d:"m170.872644 287.889523-4.245283 35.056657 5.306604-4.249292h55.18868l6.367925 4.249292-4.245284-35.056657-8.490565-5.311615-42.452832 1.062323z",fill:"#393939"}),u.createElement("path",{d:"m142.216984 50.9915022 25.471698 59.4900858 11.674528 173.158643h41.391511l12.735849-173.158643 23.349056-59.4900858z",fill:"#f89c35"}),u.createElement("path",{d:"m30.7783023 181.657226-29.71698153 86.048161 74.29245393-4.249293h47.7594343v-37.181303l-2.122641-76.487253-10.613208 8.498583z",fill:"#f89d35"}),u.createElement("path",{d:"m87.0283032 191.218134 87.0283028 2.124646-9.551886 44.617563-41.391511-10.623229z",fill:"#d87c30"}),u.createElement("path",{d:"m87.0283032 192.280457 36.0849058 33.994334v33.994334z",fill:"#ea8d3a"}),u.createElement("path",{d:"m123.113209 227.337114 42.452831 10.623229 13.79717 45.679888-9.551886 5.311615-46.698115-27.620398z",fill:"#f89d35"}),u.createElement("path",{d:"m123.113209 261.331448-8.490565 65.864024 56.25-39.305949z",fill:"#eb8f35"}),u.createElement("path",{d:"m174.056606 193.34278 5.306604 90.297451-15.919812-46.211049z",fill:"#ea8e3a"}),u.createElement("path",{d:"m74.2924539 262.393771 48.8207551-1.062323-8.490565 65.864024z",fill:"#d87c30"}),u.createElement("path",{d:"m24.4103777 355.878193 90.2122663-28.682721-40.3301901-64.801701-73.23113313 5.311616z",fill:"#eb8f35"}),u.createElement("path",{d:"m167.688682 110.481588-45.636793 38.243627-35.0235858 42.492919 87.0283028 3.186969z",fill:"#e8821e"}),u.createElement("path",{d:"m114.622644 327.195472 56.25-39.305949-4.245283 33.994334v19.121813l-38.207548-7.43626z",fill:"#dfcec3"}),u.createElement("path",{d:"m229.245286 327.195472 55.18868-39.305949-4.245283 33.994334v19.121813l-38.207548-7.43626z",fill:"#dfcec3",transform:"matrix(-1 0 0 1 513.679252 0)"}),u.createElement("path",{d:"m132.665096 212.464593-11.674528 24.433427 41.39151-10.623229z",fill:"#393939",transform:"matrix(-1 0 0 1 283.372646 0)"}),u.createElement("path",{d:"m23.349057 1.06232296 144.339625 109.41926504-24.410378-59.4900858z",fill:"#e88f35"}),u.createElement("path",{d:"m23.349057 1.06232296-19.10377392 58.42776294 10.61320772 63.7393781-7.42924541 4.249292 10.61320771 9.560906-8.49056617 7.436261 11.67452847 10.623229-7.4292454 6.373938 16.9811323 21.246459 79.5990577-24.433428c38.915096-31.161473 58.018869-47.096318 57.311322-47.804533-.707548-.708215-48.820756-37.1813036-144.339625-109.41926504z",fill:"#8e5a30"}),u.createElement("g",{transform:"matrix(-1 0 0 1 399.056611 0)"},u.createElement("path",{d:"m30.7783023 181.657226-29.71698153 86.048161 74.29245393-4.249293h47.7594343v-37.181303l-2.122641-76.487253-10.613208 8.498583z",fill:"#f89d35"}),u.createElement("path",{d:"m87.0283032 191.218134 87.0283028 2.124646-9.551886 44.617563-41.391511-10.623229z",fill:"#d87c30"}),u.createElement("path",{d:"m87.0283032 192.280457 36.0849058 33.994334v33.994334z",fill:"#ea8d3a"}),u.createElement("path",{d:"m123.113209 227.337114 42.452831 10.623229 13.79717 45.679888-9.551886 5.311615-46.698115-27.620398z",fill:"#f89d35"}),u.createElement("path",{d:"m123.113209 261.331448-8.490565 65.864024 55.18868-38.243626z",fill:"#eb8f35"}),u.createElement("path",{d:"m174.056606 193.34278 5.306604 90.297451-15.919812-46.211049z",fill:"#ea8e3a"}),u.createElement("path",{d:"m74.2924539 262.393771 48.8207551-1.062323-8.490565 65.864024z",fill:"#d87c30"}),u.createElement("path",{d:"m24.4103777 355.878193 90.2122663-28.682721-40.3301901-64.801701-73.23113313 5.311616z",fill:"#eb8f35"}),u.createElement("path",{d:"m167.688682 110.481588-45.636793 38.243627-35.0235858 42.492919 87.0283028 3.186969z",fill:"#e8821e"}),u.createElement("path",{d:"m132.665096 212.464593-11.674528 24.433427 41.39151-10.623229z",fill:"#393939",transform:"matrix(-1 0 0 1 283.372646 0)"}),u.createElement("path",{d:"m23.349057 1.06232296 144.339625 109.41926504-24.410378-59.4900858z",fill:"#e88f35"}),u.createElement("path",{d:"m23.349057 1.06232296-19.10377392 58.42776294 10.61320772 63.7393781-7.42924541 4.249292 10.61320771 9.560906-8.49056617 7.436261 11.67452847 10.623229-7.4292454 6.373938 16.9811323 21.246459 79.5990577-24.433428c38.915096-31.161473 58.018869-47.096318 57.311322-47.804533-.707548-.708215-48.820756-37.1813036-144.339625-109.41926504z",fill:"#8e5a30"})))))},link:"https://metamask.io"},[xf.WALLET_CONNECT]:{name:"WalletConnect",type:xf.WALLET_CONNECT,icon:function(e){return u.createElement("svg",vf({height:512,viewBox:"0 0 512 512",width:512,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),yf||(yf=u.createElement("radialGradient",{id:"walletConnect",cx:"0%",cy:"50%",r:"100%"},u.createElement("stop",{offset:0,stopColor:"#5d9df6"}),u.createElement("stop",{offset:1,stopColor:"#006fff"}))),bf||(bf=u.createElement("g",{fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"m256 0c141.384896 0 256 114.615104 256 256s-114.615104 256-256 256-256-114.615104-256-256 114.615104-256 256-256z",fill:"url(#walletConnect)"}),u.createElement("path",{d:"m64.6917558 37.7088298c51.5328072-50.2784397 135.0839942-50.2784397 186.6167992 0l6.202057 6.0510906c2.57664 2.5139218 2.57664 6.5897948 0 9.1037177l-21.215998 20.6995759c-1.288321 1.2569619-3.3771 1.2569619-4.665421 0l-8.534766-8.3270205c-35.950573-35.0754962-94.237969-35.0754962-130.188544 0l-9.1400282 8.9175519c-1.2883217 1.2569609-3.3771016 1.2569609-4.6654208 0l-21.2159973-20.6995759c-2.5766403-2.5139229-2.5766403-6.5897958 0-9.1037177zm230.4934852 42.8089117 18.882279 18.4227262c2.576627 2.5139103 2.576642 6.5897593.000032 9.1036863l-85.141498 83.070358c-2.576623 2.513941-6.754182 2.513969-9.33084.000066-.00001-.00001-.000023-.000023-.000033-.000034l-60.428256-58.957451c-.64416-.628481-1.68855-.628481-2.33271 0-.000004.000004-.000008.000007-.000012.000011l-60.4269683 58.957408c-2.5766141 2.513947-6.7541746 2.51399-9.3308408.000092-.0000151-.000014-.0000309-.000029-.0000467-.000046l-85.14386774-83.071463c-2.57663928-2.513921-2.57663928-6.589795 0-9.1037163l18.88231264-18.4226955c2.5766393-2.5139222 6.7541993-2.5139222 9.3308397 0l60.4291347 58.9582758c.6441608.62848 1.6885495.62848 2.3327103 0 .0000095-.000009.0000182-.000018.0000277-.000025l60.4261065-58.9582508c2.576581-2.51398 6.754142-2.5140743 9.33084-.0002103.000037.0000354.000072.0000709.000107.0001063l60.429056 58.9583548c.644159.628479 1.688549.628479 2.332709 0l60.428079-58.9571925c2.57664-2.5139231 6.754199-2.5139231 9.330839 0z",fill:"#fff",fillRule:"nonzero",transform:"translate(98 160)"}))))}}},Ef={};function Af({provider:e,jsonRpcUrlMap:t,defaultChainId:r}){const n=w((()=>console.error),[]),o=w((()=>function(e,t){if(t){if(lf.isProvider(t))return ff(ee((r=>new hf(r,t,e))));if(lf.isProvider(t.provider))throw new Error("Eip1193Bridge is experimental: pass your ethers Provider directly");return ff(ee((r=>new ne({actions:r,provider:t,onError:e}))))}}(n,e)),[n,e]),i=w((()=>function(e){return ff(ee((t=>new ie({actions:t,onError:e}))))}(n)),[n]),s=w((()=>t?Object.assign(Object.assign({},cl),t):cl),[JSON.stringify(t)]),a=w((()=>function(e,t,r,n){return ff(ee((o=>new oe({actions:o,options:{rpcMap:r?{[r]:t[r]}:t,projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:r?[r]:[],showQrModal:e,qrModalOptions:{desktopWallets:[]}},onError:n,defaultChainId:r}))))}(!0,s,r,n)),[s,r,n]),l=g(0),c=w((()=>(o&&(Ef[xf.INTEGRATOR]=o),Ef[xf.METAMASK]=i,Ef[xf.WALLET_CONNECT]=a,l.current+=1,Object.values(Ef))),[o,i,a]);return v((()=>{e&&o&&Cf(xf.INTEGRATOR,void 0,(e=>{console.error(e)}))}),[e]),{connectors:c,key:l.current}}function Cf(e,t,r){var n,o,i,s,a,l;return bl(this,void 0,void 0,(function*(){const c=Ef[e];if(!c)throw new Error(`Unknown wallet type: ${e}`);const[d]=c;try{d.connectEagerly&&(yield d.connectEagerly(t)),e===xf.WALLET_CONNECT&&(null===(n=d.provider)||void 0===n?void 0:n.chainId)&&!(null===(o=d.chains)||void 0===o?void 0:o.includes(null===(i=d.provider)||void 0===i?void 0:i.chainId))&&d.deactivate&&((null===(s=d.provider)||void 0===s?void 0:s.disconnect)&&(yield null===(a=d.provider)||void 0===a?void 0:a.disconnect()),yield d.deactivate())}catch(e){console.error(e)}yield null===(l=d.activate(t))||void 0===l?void 0:l.catch((e=>{4001!==e.code?r(e):d.connectEagerly?d.connectEagerly(t):d.activate(t)}))}))}const kf={colorMode:"dark",slippage:null,ddl:20};var Tf=(e=kf,t)=>{switch(t.type){case"SET_COLOR_MODE":return Object.assign(Object.assign({},e),{colorMode:t.payload});case"SET_SLIPPAGE":return Object.assign(Object.assign({},e),{slippage:t.payload});case"SET_TRANSACTION_DDL":return Object.assign(Object.assign({},e),{ddl:t.payload});default:return e}};const Rf={chainId:ll.MAINNET,latestBlockNumber:0};var Sf=(e=Rf,t)=>{switch(t.type){case"SET_CHAIN_ID":return Object.assign(Object.assign({},e),{chainId:t.payload});case"SET_FROM_TOKEN_CHAIN_ID":return Object.assign(Object.assign({},e),{fromTokenChainId:t.payload});case"SET_TO_TOKEN_CHAIN_ID":return Object.assign(Object.assign({},e),{toTokenChainId:t.payload});case"SET_BLOCK_NUMBER":return Object.assign(Object.assign({},e),{latestBlockNumber:t.payload});default:return e}};const Nf={tokenList:[],popularTokenList:[],ethBalance:{},accountBalances:{},balanceLoadings:{},slippageWithTokens:[]};var Mf,Of=(e=Nf,t)=>{switch(t.type){case"SET_TOKEN_LIST":return Object.assign(Object.assign({},e),{tokenList:t.payload});case"SET_POPULAR_TOKEN_LIST":return Object.assign(Object.assign({},e),{popularTokenList:t.payload});case"SET_SLIPPAGE_WITH_TOKENS":return Object.assign(Object.assign({},e),{slippageWithTokens:t.payload});case"SET_ETH_BALANCE":return Object.assign(Object.assign({},e),{ethBalance:Object.assign(Object.assign({},e.ethBalance),t.payload)});case"SET_DEFAULT_FROM_TOKEN":return Object.assign(Object.assign({},e),{defaultFromToken:t.payload});case"SET_DEFAULT_TO_TOKEN":return Object.assign(Object.assign({},e),{defaultToToken:t.payload});case"SET_ACCOUNT_BALANCES":return Object.assign(Object.assign({},e),{accountBalances:Object.assign(Object.assign({},e.accountBalances),t.payload)});case"SET_ACCOUNT_ALLOWANCES":const r=Object.assign({},e.accountBalances);return Object.keys(r).map((e=>{r[e].tokenAllowances=t.payload})),Object.assign(Object.assign({},e),{accountBalances:r});case"SET_BALANCE_LOADINGS":return Object.assign(Object.assign({},e),{balanceLoadings:Object.assign(Object.assign({},e.balanceLoadings),t.payload)});default:return e}};!function(e){e.Initial="Initial",e.Pending="Pending",e.ApproveSuccess="ApproveSuccess",e.TxSuccess="TxSuccess",e.Failed="Failed"}(Mf||(Mf={}));const If={height:void 0,width:void 0,apikey:"",feeRate:0,rebateTo:"",isReverseRouting:!1,contractStatus:Mf.Initial,autoConnectLoading:void 0,autoSlippage:void 0};const Ff={settings:kf,wallet:Rf,globals:If,token:Nf},jf=ae({reducer:le({settings:Tf,wallet:Sf,token:Of,globals:(e=If,t)=>{var r,n;switch(t.type){case"SET_GLOBAL_PROPS":return Object.assign(Object.assign({},e),t.payload);case"SET_AUTO_CONNECT_LOADING":return Object.assign(Object.assign({},e),{autoConnectLoading:t.payload});case"SET_AUTO_SLIPPAGE":return Object.assign(Object.assign({},e),{autoSlippage:t.payload});case"SET_AUTO_SLIPPAGE_LOADING":return Object.assign(Object.assign({},e),{autoSlippage:{loading:t.payload,value:null!==(n=null===(r=e.autoSlippage)||void 0===r?void 0:r.value)&&void 0!==n?n:null}});default:return e}}}),middleware:e=>e({serializableCheck:{ignoredActions:["SET_ACCOUNT_BALANCES","SET_ETH_BALANCE"],ignoredPaths:["token.accountBalances","token.ethBalance"]}}),preloadedState:Ff}),Lf=e=>(null!=e?e:jf.getState()).wallet.chainId,_f=e=>(null!=e?e:jf.getState()).wallet.fromTokenChainId,Wf=e=>(null!=e?e:jf.getState()).wallet.toTokenChainId,Pf=e=>(null!=e?e:jf.getState()).wallet.latestBlockNumber,Df=ce(((e,t)=>({enabled:!1,initialize:()=>bl(void 0,void 0,void 0,(function*(){const t=yield pe(),r=new fe({endpoint:t}),n=yield he(),o=new me({endpoint:n});const i=new class{dispatchEvent(t,r){return bl(this,void 0,void 0,(function*(){if("ton-connect-connection-completed"===t)if("connection-completed"===r.type&&r.is_success){if(!r.wallet_address)throw new Error("wallet_address not found");e({connected:{chainId:Number(r.custom_data.chain_id),account:ge.parseRaw(r.wallet_address).toString({bounceable:!1})}})}}))}addEventListener(e,t,r){throw new Error("Method not implemented.")}},s=new de({eventDispatcher:i}),a=new ue({connector:s});e({tonConnectUI:a,client:r,clientV4:o})})),connect:()=>bl(void 0,void 0,void 0,(function*(){var e,r;const{initialize:n}=t();t().tonConnectUI||(yield n());const{tonConnectUI:o}=t();if(!o)throw new Error("tonConnectUI not initialized");(null===(e=o.account)||void 0===e?void 0:e.address)||(yield o.connector.restoreConnection(),(null===(r=o.account)||void 0===r?void 0:r.address)||(yield o.openModal()))})),getBlockNumber:()=>bl(void 0,void 0,void 0,(function*(){const{initialize:e}=t();t().clientV4||(yield e());const{clientV4:r}=t();if(!r)throw new Error("clientV4 not initialized");return(yield r.getLastBlock()).last.seqno})),getJettonWallet:e=>bl(void 0,void 0,void 0,(function*(){const{initialize:r}=t();t().client||(yield r());const{client:n,tonConnectUI:o,connected:i}=t();if(!n||!o)throw new Error("tonConnect not initialized");if(!i)throw new Error("account not found");const s=ge.parseFriendly(i.account).address;return(yield n.runMethod(ge.parseFriendly(e).address,"get_wallet_address",[{type:"slice",cell:ye().storeAddress(s).endCell()}])).stack.readAddress().toString()})),getBalance:e=>bl(void 0,void 0,void 0,(function*(){const{initialize:r}=t();t().client||(yield r());const{client:n}=t();if(!n)throw new Error("tonConnect not initialized");const i=ge.parseFriendly(e).address,s=yield n.getBalance(i);return new o(s.toString()).div(10**9)})),getTokenBalance:(e,r)=>bl(void 0,void 0,void 0,(function*(){const{getJettonWallet:n}=t(),i=yield n(e),{initialize:s}=t();t().client||(yield s());const{client:a}=t();if(!a)throw new Error("client not initialized");let l=new o(0);try{const e=yield a.runMethod(ge.parseFriendly(i).address,"get_wallet_data");l=new o(e.stack.readBigNumber().toString()).div(10**r)}catch(e){if(!(yield t().getBalance(i)).isEqualTo(0))throw e}return l}))})));function Bf({isTon:e}={}){const t=te(),r=Df(),n=q(_f),i=p.useCallback((n=>bl(this,void 0,void 0,(function*(){var o;e&&(r.tonConnectUI||(yield r.initialize()),r.tonConnectUI&&r.tonConnectUI.connector.restoreConnection()),(null===(o=t.connector)||void 0===o?void 0:o.connectEagerly)?yield t.connector.connectEagerly(n):yield t.connector.activate(n)}))),[e,t,r]);return p.useMemo((()=>{var s,a,l,c,d,u,p;return n===ll.TON||e?{isTon:!0,chainId:null===(s=r.connected)||void 0===s?void 0:s.chainId,account:null===(a=r.connected)||void 0===a?void 0:a.account,tonAccount:null===(l=r.connected)||void 0===l?void 0:l.account,evmAccount:t.account,isMetamask:!1,autoConnect:i,connect:r.connect,getLastBlockNumber:r.getBlockNumber,getBalance:e=>bl(this,void 0,void 0,(function*(){return yield r.getBalance(e)}))}:{isTon:!1,chainId:t.chainId,account:t.account,tonAccount:null===(c=r.connected)||void 0===c?void 0:c.account,evmAccount:t.account,isMetamask:null===(u=null===(d=t.provider)||void 0===d?void 0:d.provider)||void 0===u?void 0:u.isMetaMask,autoConnect:i,connect:()=>t.connector.deactivate?t.connector.deactivate():t.connector.resetState(),provider:t.provider,getLastBlockNumber:null===(p=t.provider)||void 0===p?void 0:p.getBlockNumber,getBalance:t.provider?e=>bl(this,void 0,void 0,(function*(){var r;const n=yield null===(r=t.provider)||void 0===r?void 0:r.getBalance(e);return n?new o(n.toString()).div(1e18):n})):void 0}}),[i,e,n,t,r])}function Uf(){const{chainId:e}=Bf(),t=q(Lf);return w((()=>e||t||1),[e,t])}var Vf=[{chainId:1,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/prKmKP8yDTuPMHTCZ_DcxG8BqsuHNO8w5KDmJWmPodg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOUVaWU1ER2ZVN3g2N3ZBZThqWkUxZzA0RExUaFhaV0JIb09wZFhpeXhHRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNNeVgyTnZhVzV0WVhKclpYUmpZWEJmWTI5dFgzTjBZWFJwWTE5cGJXZGZZMjlwYm5OZk5qUjROalJmTVRBeU4xOHhNekkyTjJGbE5EY3dMbkJ1WncucG5n.webp"},{chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:1,address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",name:"Binance USD",decimals:18,symbol:"BUSD",logoURI:"https://images.dodoex.io/xZmadzpVOnpuq2jNG_5EGKeqMET0LU_gmfnp4VxkcxI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSHQwWXZKMGNnU0lGTFM0aHExTV9jOXVITV9fMHpXaHBKSGVOQU5neTBuby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMkoxYzJSZk4ySTJOalJpWWpReVpDOWlkWE5rWHpkaU5qWTBZbUkwTW1RdWNHNW4ucG5n.webp"},{chainId:1,address:"0x6b175474e89094c44da98b954eedeac495271d0f",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/h2lbKBfBJ2LNSTNCuwjsBkshT4eXzDDmAV0lhWS0llA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUnVJNWt2eHBwalI4TTZsenFZZVAyTTB4eVFMUGJ0S1hONDdWVTN1dUszZy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWmpBNU5qUmpPVFUxT1M1d2JtYy5wbmc.webp"},{chainId:1,address:"0x43dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/PGIGjN4ix9pInoESO_mCmajbMpygApWZyGKaE6vyJFk/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8veFJDQ0hnQXBuaENRTFZNUXAwdTdwd0pSQzIxRHJ4cFY0b2Z0bndaYnRmMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5UaGxZelEyTlRFelpTOUVUMFJQWHpVNFpXTTBOalV4TTJVdWMzWm4uc3Zn.webp"},{chainId:1,address:"0xdac17f958d2ee523a2206206994597c13d831ec7",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:1,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://images.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:1,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:"https://images.dodoex.io/mI69kq-S-tNT1W57qYizPd5r2WNFzpAq5y6NhOcrTkY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVEZhSVNLVVZIWThLTVhyTkVmZDRXRUJmMGJoSHRweHY3Q1hDT0dKbGY2by9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmT0dVeFpEaG1PVEEyWlM1d2JtYy5wbmc.webp"},{chainId:5,symbol:"USDC",address:"0xC4106029d03c33731Ca01Ba59b5A6368c660E596",name:"USDC",decimals:6,logoURI:""},{chainId:5,symbol:"USDT",address:"0xed8a325D87D3b6edED04FB992A1482231647EE5e",name:"USDT Token",decimals:6,logoURI:""},{chainId:5,symbol:"WETH",address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",name:"Wrapped Ether",decimals:18,logoURI:""},{chainId:5,symbol:"ETH",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,logoURI:""},{chainId:56,address:"0xe9e7cea3dedca5984780bafc599bd69add087d56",name:"BUSD Token",decimals:18,symbol:"BUSD",logoURI:"https://images.dodoex.io/BvxyffA5gsLB4bLmlOVkfu7AVami78-VcW_6_i8I6kc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vbC1Sa25meFB3ZXlCOGVYSWJ2b04wdHczLTlzckZOckxfRHdTTnRLSHVRRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDJOa2JsOXRaV1JwWVY5a2IyUnZaWGhmYVc5ZlluVnpaRjgyTXpsbFlqZzNZV0V4WDJKMWMyUmZOak01WldJNE4yRmhNVjlsT1dVMVlXRTBOemxtTG5OMlp3LnN2Zw.webp"},{chainId:56,address:"0x55d398326f99059ff775485246999027b3197955",name:"Tether USD",decimals:18,symbol:"USDT",logoURI:"https://images.dodoex.io/QOl7CvP_WSmTUOMthbxQsNKjDj0s5kSjup69dW_-UeA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTjdQU3RXV2ZGaGNTVzM1QlE2TEJIaF9keVROUEJqa1RLTXRwTll5cEhSWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDJOa2JsOXRaV1JwWVY5a2IyUnZaWGhmYVc5ZmRYTmtkRjh4TlRZME1XWmpaRFF3WDNWelpIUmZNVFUyTkRGbVkyUTBNRjlqWmpJMVpUYzVZVE5qTG5OMlp3LnN2Zw.webp",canBridgeToTon:!0},{chainId:56,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"BNB",decimals:18,symbol:"BNB",logoURI:"https://images.dodoex.io/BWNSMMqu68bSFJsr9vsiCV09IonH3yuAkR9gQxaipBw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDhvazF4akd3bU9GUXUtMVdzNEVRLVBNRnJYMW9DLXlmYTc3OGJUUkx0US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpPUWw5alpEUTVNalE0TXpJMkwwSk9RbDlqWkRRNU1qUTRNekkyTG5CdVp3LnBuZw.webp"},{chainId:56,address:"0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c",name:"BTCB Token",decimals:18,symbol:"BTCB",logoURI:"https://images.dodoex.io/fZG0z_RZ1U73_LuuC3RGrrZvNR-bgrCUjkwvaro-PCY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZ1NXN0RuYWNkMnc2YWxSQnFmcENqTHNDZWJhc2VtQTc0dDJlTEdDZjhfNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWmpJNVlXRmpZamxoTVM1d2JtYy5wbmc.webp"},{chainId:56,address:"0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",name:"Dai Token",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/bhz9Vtma8hPb_-GnhwqQkhfTQ5PwKcR1Qbzn7aBKlfs/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZW04OHB4YXNDdEg0Nl9BcjhVandzZWR2SFBFUUtjVWVkc0FmV2lvenB2Yy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWVRoaFptSmxaRFppWkM1d2JtYy5wbmc.webp"},{chainId:56,address:"0x67ee3Cb086F8a16f34beE3ca72FAD36F7Db929e2",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/PGIGjN4ix9pInoESO_mCmajbMpygApWZyGKaE6vyJFk/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8veFJDQ0hnQXBuaENRTFZNUXAwdTdwd0pSQzIxRHJ4cFY0b2Z0bndaYnRmMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5UaGxZelEyTlRFelpTOUVUMFJQWHpVNFpXTTBOalV4TTJVdWMzWm4uc3Zn.webp"},{chainId:56,address:"0x2170ed0880ac9a755fd29b2688956bd959f933f8",name:"Ethereum Token",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:56,address:"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",name:"Binance-Peg USD Coin",decimals:18,symbol:"USDC",logoURI:"https://images.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:56,address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",name:"Wrapped BNB",decimals:18,symbol:"WBNB",logoURI:"https://images.dodoex.io/-Pua5rc9k9iW4yuF5ajLVKzMkRhBq06D8HiEZ5gjezA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMDZOWTdBTmdOYWdFOHpXYUMtX2IzYXVPOUxsTEp6QlpLTUR3VlM5eW9DQS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmT1dRellXTmtZMlEzTnk1d2JtYy5wbmc.webp"},{chainId:137,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"MATIC",decimals:18,symbol:"MATIC",logoURI:"https://images.dodoex.io/cQFrEB6yGIqMkh_6Pie8VR3kIStL58IS-y8FbroHVwA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vc2VNUUk2dkpoaXljeldrczJaWWdGdk8zSEoxSWFIa053LXZYeXFneER4US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMekZmTWpkbE56TXlNRE13TWk4eFh6STNaVGN6TWpBek1ESXVjRzVuLnBuZw.webp"},{chainId:137,address:"0xe4bf2864ebec7b7fdf6eeca9bacae7cdfdaffe78",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/KEPetVp3nQkB6BZ_cb05trEfBbGxFEg92UnF8NZsEzM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVE5wTlRseEJGbFRDalM1ZFh3SWJ3Mm1hZ3NPUFFkZ3Z1UEhuZDZrNWdyMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk4yUTBaamxtTldOaU15OUVUMFJQWHpka05HWTVaalZqWWpNdWNHNW4ucG5n.webp"},{chainId:137,address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/hdRkGay_hj0t1OzN5C3c30cmch26tJhHUSroffg7ciY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOHd3UndQOG9DTTdBcF9NOW11bGVOQWRqYjhBOXpvX2FYUE5pVTNBYUtzYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhnMlgwSXhOelUwTnpSZlJUZzVNRGswWDBNME5GOUVZVGs0WWprMU5GOUZaV1JsWDBGRFh6UTVOVEkzTVdRd1gwWmZiRzluYjE4MFpXSXdNVE0zTVRZeExuQnVady5wbmc.webp"},{chainId:137,address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",name:"Ether",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/WAobi4MZtLSxB59wgpyNlXLI44ZwlBh55qiGS2wLSGU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSUVnUUx3TjRMU2dKRDJTM3RmSFlHcmxZbFZQNGlJeFcxeEZVOUwwUExRNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlF6QXlZV0ZmUVRNNVlqSXlNMTlHUlY4NFgwUXdYMEV3WlRWZlF6UmZSakkzWlY5QlJGODVNRGd6WDBNM05UWmZRMk15WDJ4dloyOWZZelk0WXprelpHRXlNQzV3Ym1jLnBuZw.webp"},{chainId:137,address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/er3iAGv39hCC7F8AydW_AteD3hnZj9HI2XcAaruHeqA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVE9WUWtzN3JQWU5OZWdmNTRuNC1Za1NGTFYyLXVGZmlJRFVYem85aVMzOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlFUQmlPRFk1T1RGak5qSXhPR0l6Tm1NeFpERTVYMFEwWVRKbE9WOUZZakJqWDBVek5qQTJaVjlDTkRoZmJHOW5iMTlpTmpGbE5EVmtNbVF6TG5CdVp3LnBuZw.webp",canBridgeToTon:!0},{chainId:137,address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/WeK6L9_RjWUfAsnMuOAdyXIZVE3JK_H3lZU5vk2m7Tg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTFJ0aEt6X2VrSXdmTEh6NnAycW5rSkRFeUk1RXZrODlXQ0J2VW43MUJLNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoa1gwRkRYekUzWDBZNU5UaGZSREpsWlRVeU0yRXlNakEyTWpBMk9UazBOVGszWDBNeE0xOUVPRE14WldNM1gyeHZaMjlmWXpCbU9XVTFaamxoTmk1d2JtYy5wbmc.webp",canBridgeToTon:!0},{chainId:137,address:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://images.dodoex.io/_KjvB9pCVqbIIv_UnQvRWpjySBHiFnuHNSXUm_52UZM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDQ4OVYzTW1NMi1qaFJueEQ2Y3MyY1gydXdGS2tkRHpiRGZsbkZhTTJxOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhneU1qWXdYMFpCUTE4MVgwVTFOVFF5WVRjM00xOUJZVFEwWmw5Q1gwTm1aVjlFWmpkZlF6RTVNMkpqTWw5RE5UazVYMnh2WjI5Zk5HTmpORE0zTlRneFppNXdibWMucG5n.webp"},{chainId:137,address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",name:"Wrapped MATIC",decimals:18,symbol:"WMATIC",logoURI:"https://images.dodoex.io/HfZVSaAES3QRplSybW2uoKmYf6pVTRaxufn95_Qto_A/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMERhZEZTUUVFX0d4YlBoMHY3Wk1Hb1FwaWtOQm1vaWFyZTFlaFdJbU44dy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjFoZEdsalgyVmlOekZtTkdFMU9XRXZiV0YwYVdOZlpXSTNNV1kwWVRVNVlTNTNaV0p3LndlYnA.webp"},{chainId:42161,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"ETH",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:42161,address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:"https://images.dodoex.io/6VmZGvbENd4TM1VK0rsYrfznRtG-GwxP-zCy2qyc9bM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWnJZUDB0ZHVTLUdDNE5FTThmRmV1RHhVWklPNUZpWnpqdkdBc0lfNlBQMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh5TW1GbU4yVTVOVFJpTDFkRlZFaGZhV052Ymw4eU1tRm1OMlU1TlRSaUxuQnVady5wbmc.webp"},{chainId:42161,address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:42161,address:"0x69Eb4FA4a2fbd498C257C57Ea8b7655a2559A581",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/6U51l5aajoRrCaO6cpbrclQ2olWNDzuShggOCfoktCA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8va3RkSlhwQ3dsQVZtZXNPb1dvQV95SG9IazBnV3UxUExienBKa1AxYnlJdy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5tTmtPVEV4WXprNE15OUVUMFJQWHpaalpEa3hNV001T0RNdWNHNW4ucG5n.webp"},{chainId:42161,address:"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",name:"USD Coin (Arb1)",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/EaCi6KUTS-dinU-wGdG2IcundJ0fJfsOw97FRI2vaB8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdEVMaUx0Y1FaTVlBb3hkeExLdnRrZ2ltdVB5dmZRdUQ5U1BxU1c1bDZsMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZmFXTnZibDh5WlRFeU5tSTRaRFV5TDFWVFJFTmZhV052Ymw4eVpURXlObUk0WkRVeUxuQnVady5wbmc.webp",canBridgeToTon:!0},{chainId:42161,address:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:42161,address:"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://images.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:66,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"OKT",decimals:18,symbol:"OKT",logoURI:"https://images.dodoex.io/pcltGNcIp7DP33nj3YxxBpuFEekNcOW3pwq9tjSrpY4/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTzJHSDJYTndRancwbXMzQXNidG5xNzRkVEROVld3QWFOU1dXU2ZnU01QTS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RTVOalF5T1RCZk1qQXlNakExTWpBd056STNORFl3TWpJdWMzWm4uc3Zn.webp"},{chainId:66,address:"0x382bB369d343125BfB2117af9c149795C6C65C50",name:"USDT",decimals:18,symbol:"USDT",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:66,address:"0x218c3c3D49d0E7B37aff0D8bB079de36Ae61A4c0",name:"BNB",decimals:18,symbol:"BNB",logoURI:"https://images.dodoex.io/BWNSMMqu68bSFJsr9vsiCV09IonH3yuAkR9gQxaipBw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDhvazF4akd3bU9GUXUtMVdzNEVRLVBNRnJYMW9DLXlmYTc3OGJUUkx0US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpPUWw5alpEUTVNalE0TXpJMkwwSk9RbDlqWkRRNU1qUTRNekkyTG5CdVp3LnBuZw.webp"},{chainId:66,address:"0x54e4622DC504176b3BB432dCCAf504569699a7fF",name:"BTCK",decimals:18,symbol:"BTCK",logoURI:"https://images.dodoex.io/L3kcNUKg94qnX8OPFlEvHKqWybnJD8SA9HTne3PW-Rg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vNU1MQTB3Q3V6eEs4Q3ZMV0RqempuOVhzalBTWE1zbUpWZ0RRN1RPMG9FWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpVUTB0Zk1HWmlaRGRsTWpnNU5pOUNWRU5MWHpCbVltUTNaVEk0T1RZdWNHNW4ucG5n.webp"},{chainId:66,address:"0x332730a4F6E03D9C55829435f10360E13cfA41Ff",name:"BUSD",decimals:18,symbol:"BUSD",logoURI:"https://images.dodoex.io/-aEkA13gC6lOFoRyGeSy2BotE5YY3WUmcSlPa9Rpddc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaXVmSjhaNHFJYzlMMDgtNHpxRUMxWl94WVlqRkEtT3BqS1FJbmQyeHpHUS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpWVTBSZk1XTTJNRFpqTjJZeE55OUNWVk5FWHpGak5qQTJZemRtTVRjdWNHNW4ucG5n.webp"},{chainId:66,address:"0x21cDE7E32a6CAF4742d00d44B07279e7596d26B9",name:"DAIK",decimals:18,symbol:"DAIK",logoURI:"https://images.dodoex.io/LOb-sXupURNN9HA0zBSfLfpZlx52N9qRSDUyzk3cg0A/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vck5pZzMtWU5TOUl4T3ZHX19taTFRSU9WYTZsczdZNXViRVhGcTJJVGplby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJCU1V0Zk5ESTVNV1l4WlRoa1pTOUVRVWxMWHpReU9URm1NV1U0WkdVdWNHNW4ucG5n.webp"},{chainId:66,address:"0xEF71CA2EE68F45B9Ad6F72fbdb33d707b872315C",name:"ETHK",decimals:18,symbol:"ETHK",logoURI:"https://images.dodoex.io/IwBclhMMQLOo79RdRo6-HnUiXxshO_hSi02YK3L6MFI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcFBSd192aEx2MHh3WkRHU2k3eGYyYVJiQjlocVhfU2tacUdGc3RJR0pYRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFZVU0V0Zk1UQTVNamMzTW1VMU9DOUZWRWhMWHpFd09USTNOekpsTlRndWNHNW4ucG5n.webp"},{chainId:66,address:"0xc946DAf81b08146B1C7A8Da2A851Ddf2B3EAaf85",name:"USDC",decimals:18,symbol:"USDC",logoURI:"https://images.dodoex.io/bXLFjIP5_obFZS9jvWA1bZc2b2Vsw4-tqcvj10aPUpU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcXhZT0hTcDYzemNTaDVHRVV1SFlya3JGS2s1MW9zLVUycG42bjNXV2pYay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZk1UTTFZak13TkRkaVpDOVZVMFJEWHpFek5XSXpNRFEzWW1RdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:66,address:"0xdCAC52E001f5bd413aa6ea83956438F29098166b",name:"USDK",decimals:18,symbol:"USDK",logoURI:"https://images.dodoex.io/X-_D75ZOpI-yC70WjdgC8wiqcssfRIALEv0eUfD3HiE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vd290dHEzaWdkTDVzQlhSR2VFZkhQLTNpZHhDZzV0V3VGQmE3YjNrNUZITS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkV0Zk56aGpZekV6TW1OaVpDOVZVMFJMWHpjNFkyTXhNekpqWW1RdWNHNW4ucG5n.webp"},{chainId:66,address:"0x506f731F7656e2FB34b587B912808f2a7aB640BD",name:"WBTCK",decimals:18,symbol:"WBTCK",logoURI:"https://images.dodoex.io/7Gb1gYkvjWESf9ungWe4YKOrr5GY5UILmTwU_U95kCA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOTQ4NWZpU2NmUzBNc2V1YVZXWXo2Z1RuNVVidXJvZkxmN1VGSWhMdndjTS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOTFgyVXlZamRpWVRJNU16TXZWMEpVUTB0ZlpUSmlOMkpoTWprek15NXdibWMucG5n.webp"},{chainId:1313161554,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ethereum",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/WAobi4MZtLSxB59wgpyNlXLI44ZwlBh55qiGS2wLSGU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSUVnUUx3TjRMU2dKRDJTM3RmSFlHcmxZbFZQNGlJeFcxeEZVOUwwUExRNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlF6QXlZV0ZmUVRNNVlqSXlNMTlHUlY4NFgwUXdYMEV3WlRWZlF6UmZSakkzWlY5QlJGODVNRGd6WDBNM05UWmZRMk15WDJ4dloyOWZZelk0WXprelpHRXlNQzV3Ym1jLnBuZw.webp"},{chainId:1313161554,address:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",name:"Wrapped Ethereum",decimals:18,symbol:"WETH",logoURI:"https://images.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0x8BEc47865aDe3B172A928df8f990Bc7f2A3b9f79",name:"Aurora",decimals:18,symbol:"Aurora",logoURI:"https://images.dodoex.io/2C2jfpO2-VYuwlga3SdtP5I6eJNJXIYq3LvPU4aFuiU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcHFWVWlJOEQ4VU5iUEZYRElvUnA3cFhEZFc4dmx4dWEtTmxubmxlam1PMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMkYxY205eVlWOHlOVEprWlRFeE56YzBMMkYxY205eVlWOHlOVEprWlRFeE56YzBMbmRsWW5BLndlYnA.webp"},{chainId:1313161554,address:"0xe3520349F477A5F6EB06107066048508498A291b",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:1313161554,address:"0xe301eD8C7630C9678c39E4E45193D1e7Dfb914f7",name:"DODO Bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/SEcMDWMmtHb3GFW5l7fTKYurpTqALHdZI3D6qzad1rs/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vQXRNMzllUjhRQzhYTl8tem5HU0pSLS1lV0tPUW91V3p2ci0zQ014WlJTSS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMekl3TUhneU1EQmZNVjh3WWpReFl6VTJZV1UxTHpJd01IZ3lNREJmTVY4d1lqUXhZelUyWVdVMUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0xB12BFcA5A55806AaF64E99521918A4bf0fC40802",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/EaCi6KUTS-dinU-wGdG2IcundJ0fJfsOw97FRI2vaB8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdEVMaUx0Y1FaTVlBb3hkeExLdnRrZ2ltdVB5dmZRdUQ5U1BxU1c1bDZsMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZmFXTnZibDh5WlRFeU5tSTRaRFV5TDFWVFJFTmZhV052Ymw4eVpURXlObUk0WkRVeUxuQnVady5wbmc.webp",canBridgeToTon:!0},{chainId:1313161554,address:"0x4988a896b1227218e4A686fdE5EabdcAbd91571f",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:1313161554,address:"0xF4eB217Ba2454613b15dBdea6e5f22276410e89e",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://images.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:43114,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Avalanche",decimals:18,symbol:"AVAX",logoURI:"https://images.dodoex.io/yBkeC0v6hqQP-wNBxAq_C_D6JTYUc4Q86Wh6WIciESI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcmpNamFFdHJ5WUZxNks3TkpxYkRWczlEZF80aHp4ZUo3YnB0eGgtVERDYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjEzWDI1ZlRqaHRNRjgwTURCNE5EQXdYems0WlRKaU5EQm1PRGN2YlhkZmJsOU9PRzB3WHpRd01IZzBNREJmT1RobE1tSTBNR1k0Tnk1cWNHYy5qcGc.webp"},{chainId:43114,address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",name:"Wrapped AVAX",decimals:18,symbol:"WAVAX",logoURI:"https://images.dodoex.io/yBkeC0v6hqQP-wNBxAq_C_D6JTYUc4Q86Wh6WIciESI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcmpNamFFdHJ5WUZxNks3TkpxYkRWczlEZF80aHp4ZUo3YnB0eGgtVERDYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjEzWDI1ZlRqaHRNRjgwTURCNE5EQXdYems0WlRKaU5EQm1PRGN2YlhkZmJsOU9PRzB3WHpRd01IZzBNREJmT1RobE1tSTBNR1k0Tnk1cWNHYy5qcGc.webp"},{chainId:43114,address:"0x19860CCB0A68fd4213aB9D8266F7bBf05A8dDe98",name:"Binance USD",decimals:18,symbol:"BUSD.e",logoURI:"https://images.dodoex.io/-aEkA13gC6lOFoRyGeSy2BotE5YY3WUmcSlPa9Rpddc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaXVmSjhaNHFJYzlMMDgtNHpxRUMxWl94WVlqRkEtT3BqS1FJbmQyeHpHUS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpWVTBSZk1XTTJNRFpqTjJZeE55OUNWVk5FWHpGak5qQTJZemRtTVRjdWNHNW4ucG5n.webp"},{chainId:43114,address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",name:"Dai Stablecoin",decimals:18,symbol:"DAI.e",logoURI:"https://images.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:43114,address:"0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664",name:"USD Coin",decimals:6,symbol:"USDC.e",logoURI:"https://images.dodoex.io/bXLFjIP5_obFZS9jvWA1bZc2b2Vsw4-tqcvj10aPUpU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcXhZT0hTcDYzemNTaDVHRVV1SFlya3JGS2s1MW9zLVUycG42bjNXV2pYay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZk1UTTFZak13TkRkaVpDOVZVMFJEWHpFek5XSXpNRFEzWW1RdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:43114,address:"0xc7198437980c041c805A1EDcbA50c1Ce5db95118",name:"Tether USD",decimals:6,symbol:"USDT.e ",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:43114,address:"0x50b7545627a5162F82A992c33b87aDc75187B218",name:"Wrapped BTC",decimals:8,symbol:"WBTC.e",logoURI:"https://images.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:43114,address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",name:"Wrapped Ether",decimals:18,symbol:"WETH.e",logoURI:"https://images.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:10,address:"0x4200000000000000000000000000000000000006",name:"WETH",decimals:18,symbol:"WETH",logoURI:"https://images.dodoex.io/f9SbZq39ynUZS5ueKvAwzLmKUfcZvYpKDaysT3dkcvM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vc2NkVzJUWjladmRiX3BVSjZ3b2YzeHRvYk94YUw3bEV5RmhhemhJUFhlMC9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RXdNamd3TkRaZk1qQXlNakEwTWpJd01UQXpORGc1TURVdWNHNW4ucG5n.webp"},{chainId:10,address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",name:"DAI",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/04gwZiu2K_9fdb2zLwzsX1nONCbBWrZOvTyOoEFhx3g/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaDJCcmdhUmZxUzBLZDBEOVpZbEUteEtNMVdzeFFtRzBEWVpKOGJCaWN4US9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6SXlNRFUwTVRsZk1qQXlNakEwTWpJd01UQTBNak00TlRVdWFuQm4uanBn.webp"},{chainId:10,address:"0x7F5c764cBc14f9669B88837ca1490cCa17c31607",name:"USDC",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:10,address:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",name:"USDT",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/iD2HcQfBC7tC1Eb0ERs67UIyUo0G-S77OaYuzCArFC0/rs:fit:32:32:0/g:no/aHR0cHM6Ly90b2tlbi1pbWcuZG9kb2V4LmlvLzEwLzB4OTRiMDA4YWEwMDU3OWMxMzA3YjBlZjJjNDk5YWQ5OGE4Y2U1OGU1OA.webp",canBridgeToTon:!0},{chainId:10,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"ETH",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/bcyoORJ04NyP1HhYUZ9RrTZ-MEOFeNnMcrr__JZ6Ruw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vV1lHaU9IVFVnVWs4Q3Z3WmNyN0hWX2w4SlNrQjRVQUh1UXpzaWd4U3Nmay9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6VTVPREk0T1Y4eU1ESXlNRFF5TWpBeU1qTTBNelk0TlM1d2JtYy5wbmc.webp"},{decimals:18,logoURI:"https://images.dodoex.io/Gbch2fMVm-itKQ-wYdO0BE9s_LVK-8fr2eoJxyjM_pY/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOXZDZEdXMV9BQnM2VTA3RzNIcDd1VnRURnppdWJvQlJObVJyVEZLaXhEcy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RTVORFV4TXpoZk1qQXlNekEzTURNd056RTRNalkyT0RjdWFuQm4uanBn.webp",name:"Wrapped Conflux",address:"0x14b2D3bC65e74DAE1030EAFd8ac30c533c976A9b",symbol:"WCFX",chainId:1030},{decimals:18,logoURI:"https://images.dodoex.io/74nSnlgHYl303M6PsFI2ItXIpPdEaN5W62bJk0xrm6g/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vRUw0TjJvclJYb2pibEZwa2pTZy1mVlZuVDhhMWZ6amloek43eGlSZFdmWS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6ZzNNRGN4TXpOZk1qQXlNekEzTURNd056TTJNVGM0TXpndWNHNW4ucG5n.webp",name:"BNB",address:"0x94bd7A37d2cE24cC597E158fACaa8d601083ffeC",symbol:"BNB",chainId:1030},{decimals:18,logoURI:"https://images.dodoex.io/Tzga6cVcC2NZzIAvdf812Bcl5zSn5mNomHQRJhkjaiI/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVG5iZnNQSUVGWmFEeGkxSm9GUUd3blZSUUtrREkza3h2ekhuUnllTmUwYy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6STNNVEkwTTE4eU1ESXpNRGN3TXpBM01qa3lOVEl6TVM1d2JtYy5wbmc.webp",name:"Ethereum Token",address:"0xa47f43DE2f9623aCb395CA4905746496D2014d57",symbol:"ETH",chainId:1030},{chainId:1030,address:"0xfe97e85d13abd9c1c33384e796f10b73905637ce",name:"Tether USD",decimals:18,symbol:"USDT",logoURI:"https://images.dodoex.io/n_bg2q8GR4MlobGgr4RYo4r2gS6om7hmtGABi6qoulQ/rs:fit:96:96:0/g:no/aHR0cHM6Ly9jbXAuZG9kb2V4LmlvL2lnTHA5WW1zMnY4em9jOEVEcHRBOWRFTi0xZHZ0V2RkRGVMWjZaVjh1OGMvcnM6Zml0OjE2MDoxNjA6MC9nOm5vL2FIUjBjSE02THk5cGJXRm5aUzF3Y205NGVTNWtiMlJ2WlhndWFXOHZhQzFxVkRnMVZWVTRUalpUT1dsVlZuSkpMVnBCU0hjd1dXaDBTSFJPUjNoNWJUZHVZa2QyVUZobmR5OWhTRkl3WTBoTk5reDVPWHBrUnpsNVdWZGtiRXh0WkhaaU1tUnpXbGRHZDJGWVRYVlpNamwwVERKU2RscEhPSFJpVjFacllWZEZkR016VW1oYU1teDFXbms1TVdOSGVIWlpWMUptWVZjeGJsaDZhekpPYWtVMVRsWTRlVTFFU1hwTlJHTjNUWHBCTTAxcVdYZFBSR2N5VDFNMWQySnRZeTV3Ym1jLndlYnA.webp",canBridgeToTon:!0},{chainId:1030,address:"0x1F545487c62e5ACfEa45dcAdd9c627361d1616D8",name:"Wrapped BTC",decimals:18,symbol:"WBTC",logoURI:"https://images.dodoex.io/1e_VT8Ppoj0-PDkhFC58pxdegwGCdWBOa5JTPU-Ol2U/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVU92VExkR1I4SzNHWnhISnA0aEVSN09teVdjdWdsNDBlU1hEbmJKWlJ2RS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6a3hNVGd3TWpaZk1qQXlNekEzTURNd056TXhOVEUzT1RVdWNHNW4ucG5n.webp",canBridgeToTon:!0},{decimals:18,logoURI:"https://images.dodoex.io/Wr2Rsy3ec2m0qdAHY95E-niUfibhSvMC9j6I9a2jW0w/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWWNqMXJhUEVTYTYxeVpfeDdNNktWOGdabmxpVjdELTRCaWRpcVNYRExCZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6TXlOVGs1TWpGZk1qQXlNekE0TURRd05ETTJNamM0TXpJdWFuQm4uanBn.webp",name:"Bald",address:"0x27D2DECb4bFC9C76F0309b8E88dec3a601Fe25a8",symbol:"BALD",chainId:8453},{decimals:18,logoURI:"https://images.dodoex.io/20ZPKcy3KFBFeRhzXhM17Jn_ECPETHKMulANNxeUovo/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZHV4b2JTNm03dzQyUWdfd09rZDBqV1JCWm5TNW5GQjRHM1A5Yk5wWDc3MC9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6SXhNVFk1TnpkZk1qQXlNekE0TURRd05ESTNNVEkyTmprdWMzWm4uc3Zn.webp",name:"Wrapped Ether",address:"0x4200000000000000000000000000000000000006",symbol:"WETH",chainId:8453},{decimals:6,logoURI:"https://images.dodoex.io/XZ0_CC_Hy6CLGuNpjsfkgdGp67czyMKPcq8HcsabhyQ/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vbm93dE5BTjlkNEYzeDQwVEtlWFVwRTJtTEo4OEd1ZWo1RHplUFVLeWRQUS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6WXdOemM0TkRaZk1qQXlNekE0TURRd05ETTRORGszTnprdWMzWm4uc3Zn.webp",name:"Axelar Wrapped USDC",address:"0xEB466342C4d449BC9f53A865D5Cb90586f405215",symbol:"axlUSDC",chainId:8453},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ethereum",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",symbol:"ETH",chainId:8453},{decimals:6,logoURI:"https://images.dodoex.io/UzsHCVfq_wYVDFVhkYthXWfHdldQUNx7LH3-3uXCs_U/rs:fit:96:96:0/g:no/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3RydXN0d2FsbGV0L2Fzc2V0cy9tYXN0ZXIvYmxvY2tjaGFpbnMvZXRoZXJldW0vYXNzZXRzLzB4QTBiODY5OTFjNjIxOGIzNmMxZDE5RDRhMmU5RWIwY0UzNjA2ZUI0OC9sb2dvLnBuZw.webp",name:"USD Base Coin",address:"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",symbol:"USDbC",chainId:8453},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",symbol:"ETH",chainId:59144},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",symbol:"WETH",chainId:59144},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0x5300000000000000000000000000000000000004",symbol:"WETH",chainId:534352},{decimals:6,logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",name:"USD Coin",address:"0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",symbol:"USDC",chainId:534352,canBridgeToTon:!0},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",symbol:"WETH",chainId:169},{decimals:6,logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",name:"USD Coin",address:"0xb73603c5d87fa094b7314c74ace2e64d165016fb",symbol:"USDC",chainId:169,canBridgeToTon:!0},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",symbol:"ETH",chainId:169},{decimals:6,logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",name:"Tether USD",address:"0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE",symbol:"USDT",chainId:5e3,canBridgeToTon:!0},{decimals:6,logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",name:"USD Coin",address:"0x09bc4e0d864854c6afb6eb9a9cdf58ac190d0df9",symbol:"USDC",chainId:5e3,canBridgeToTon:!0},{decimals:6,logoURI:"https://tether.to/images/logoCircle.png",name:"Tether USD",address:"EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA",symbol:"jUSDT",chainId:-239},{decimals:6,logoURI:"https://tether.to/images/logoCircle.png",name:"Tether USD",address:"EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",symbol:"USDT",chainId:-239},{decimals:6,logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",name:"USD Coin",address:"EQB-MPwrd1G6WKNkLz_VnV6WqBDd142KMQv-g1O-8QUA3728",symbol:"jUSDC",chainId:-239}];function Zf({tokenList:e,popularTokenList:t,isTon:r}){const n=Q(),{account:o}=Bf(),i=Uf();v((()=>{(()=>{bl(this,void 0,void 0,(function*(){let o=[];o=a(e)?e:l(t,Vf,(e=>e.address.toLowerCase()+e.chainId+e.side)),r&&(o=o.filter((e=>e.chainId===ll.TON||e.canBridgeToTon))),n((e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_TOKEN_LIST",payload:e})})))(o))}))})()}),[e,n,t,r]),v((()=>{n(wl({}))}),[o,i]),v((()=>{var e;n(vl(r?null!==(e=null==t?void 0:t.filter((e=>e.chainId===ll.TON||e.canBridgeToTon)))&&void 0!==e?e:[]:null!=t?t:[]))}),[t,n,r])}const Hf=e=>(null!=e?e:jf.getState()).token.tokenList,zf=e=>{const{tokenList:t,popularTokenList:r}=(null!=e?e:jf.getState()).token;return l(r,t,(e=>e.address.toLowerCase()+e.chainId+e.side))},Yf=e=>(null!=e?e:jf.getState()).token.accountBalances,Gf=e=>(null!=e?e:jf.getState()).token.ethBalance,Xf=e=>(null!=e?e:jf.getState()).token.defaultFromToken,Jf=e=>(null!=e?e:jf.getState()).token.defaultToToken,qf=e=>(null!=e?e:jf.getState()).token.balanceLoadings;function Qf(){const{account:e,chainId:t}=Bf(),r=q(Yf),n=q(Gf),o=y((o=>{var i,s,a;if(!e||!o)return null;if(fl(o.address,"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE")){const e=n[null!==(s=null!==(i=o.chainId)&&void 0!==i?i:t)&&void 0!==s?s:1];return!e||(null==e?void 0:e.isNaN())?null:e}const l=null===(a=r[o.address.toLocaleLowerCase()])||void 0===a?void 0:a.tokenBalances;return!l||(null==l?void 0:l.isNaN())?null:l}),[r,n,e]);return o}const Kf=e=>(null!=e?e:jf.getState()).globals,$f=e=>(null!=e?e:jf.getState()).globals.autoConnectLoading,em=e=>(null!=e?e:jf.getState()).globals.autoSlippage;var tm=[{constant:!0,inputs:[],name:"getCurrentBlockTimestamp",outputs:[{name:"timestamp",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{components:[{name:"target",type:"address"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{name:"blockNumber",type:"uint256"},{name:"returnData",type:"bytes[]"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getLastBlockHash",outputs:[{name:"blockHash",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockDifficulty",outputs:[{name:"difficulty",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockGasLimit",outputs:[{name:"gaslimit",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockCoinbase",outputs:[{name:"coinbase",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{name:"blockHash",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"}];const rm={[ll.MAINNET]:{MULTI_CALL:"0xeefba1e63905ef1d7acba5a8513c70307c1ce441",DODO_APPROVE:"0xCB859eA579b28e02B87A1FDE08d087ab9dbE5149",ERC20_HELPER:"0xD9ef2d1583e8Aa196123e773BE38B539a4d149df"},[ll.GOERLI]:{MULTI_CALL:"0x696E25A5e2AEd1C55E6d6Cfa0532Bbda9020165d",DODO_APPROVE:"0xC9143e54021f4a6d33b9b89DBB9F458AaEdd56FB",ERC20_HELPER:"0x24549FC74B3076A962624A26370ed556c467F74C"},[ll.BSC]:{MULTI_CALL:"0x1Ee38d535d541c55C9dae27B12edf090C608E6Fb",DODO_APPROVE:"0xa128Ba44B2738A558A1fdC06d6303d52D3Cef8c1",ERC20_HELPER:"0x566651Ad34f6306872FaC5fB95bbF4C9beE8D8F2"},[ll.POLYGON]:{MULTI_CALL:"0xc9eD9B18e447e600238fe50e944B9062B664DEa4",DODO_APPROVE:"0x6D310348d5c12009854DFCf72e0DF9027e8cb4f4",ERC20_HELPER:"0xfd24312Ec7871A6D1a31e454D5AbB16c6c25a9b3"},[ll.ARBITRUM_ONE]:{MULTI_CALL:"0xF718F2bd590E5621e53f7b89398e52f7Acced8ca",DODO_APPROVE:"0xA867241cDC8d3b0C07C85cC06F25a0cD3b5474d8",ERC20_HELPER:"0x7C062B9C584fA6eC2504270790D38240A2c5fE72"},[ll.AURORA]:{MULTI_CALL:"0x989DcAA95801C527C5B73AA65d3962dF9aCe1b0C",DODO_APPROVE:"0x335aC99bb3E51BDbF22025f092Ebc1Cf2c5cC619",ERC20_HELPER:"0xE8C9A78725D0451FA19878D5f8A3dC0D55FECF25"},[ll.OKCHAIN]:{MULTI_CALL:"0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01",DODO_APPROVE:"0x7737fd30535c69545deeEa54AB8Dd590ccaEBD3c",ERC20_HELPER:"0x4775b1858f1e417C9609D455C3Ad8751ec01daC4"},[ll.OPTIMISM]:{MULTI_CALL:"0xb98Ac2fEFc8b73aeAE33D02BB00c26E12afCa9Df",DODO_APPROVE:"0xa492d6eABcdc3E204676f15B950bBdD448080364",ERC20_HELPER:"0x42E456ea0dd7538ea103fBb1d0388D14C97bB5b2"},[ll.AVALANCHE]:{MULTI_CALL:"0x97f0153E7F5749640aDF3Ff9CFC518b79D6Fe53b",DODO_APPROVE:"0xCFea63e3DE31De53D68780Dd65675F169439e470",ERC20_HELPER:"0xC3528D128CC227fd60793007b5e3FdF7c2945282"},[ll.CONFLUX]:{MULTI_CALL:"0x696e25a5e2aed1c55e6d6cfa0532bbda9020165d",DODO_APPROVE:"0x5BaF16d57620Cb361F622232F3cb4090e35F3da2",ERC20_HELPER:"0x24549FC74B3076A962624A26370ed556c467F74C"},[ll.BASE]:{MULTI_CALL:"0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",DODO_APPROVE:"0x89872650fA1A391f58B4E144222bB02e44db7e3B",ERC20_HELPER:"0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780"},[ll.LINEA]:{MULTI_CALL:"0xa7b9C3a116b20bEDDdBE4d90ff97157f67F0bD97",DODO_APPROVE:"0x6de4d882a84A98f4CCD5D33ea6b3C99A07BAbeB1",ERC20_HELPER:"0xbcd2FDC3B884Cf0dfD932f55Ec2Fe1fB7e8c62Da"},[ll.SCROLL]:{MULTI_CALL:"0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",DODO_APPROVE:"0x20E77aD760eC9E922Fd2dA8847ABFbB2471B92CD",ERC20_HELPER:"0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780"},[ll.MANTA]:{MULTI_CALL:"0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",DODO_APPROVE:"0x0226fCE8c969604C3A0AD19c37d1FAFac73e13c2",ERC20_HELPER:"0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780"},[ll.MANTLE]:{MULTI_CALL:"0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",DODO_APPROVE:"0xa71415675F68f29259ddD63215E5518d2735bf0a",ERC20_HELPER:"0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780"},[ll.TON]:{MULTI_CALL:"",DODO_APPROVE:"",ERC20_HELPER:""}},nm=new Sa("abi/5.7.0"),om={};let im={calldata:!0,memory:!0,storage:!0},sm={calldata:!0,memory:!0};function am(e,t){if("bytes"===e||"string"===e){if(im[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&sm[t])return!0;return(im[t]||"payable"===t)&&nm.throwArgumentError("invalid modifier","name",t),!1}function lm(e,t){for(let r in t)kl(e,r,t[r])}const cm=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),dm=new RegExp(/^(.*)\[([0-9]*)\]$/);class um{constructor(e,t){e!==om&&nm.throwError("use fromString",Sa.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),lm(this,t);let r=this.type.match(dm);lm(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:um.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=cm.sighash),cm[e]||nm.throwArgumentError("invalid format type","format",e),e===cm.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==cm.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===cm.full?", ":",")+")"):t+=this.type,e!==cm.sighash&&(!0===this.indexed&&(t+=" indexed"),e===cm.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?um.fromString(e,t):um.fromObject(e)}static fromObject(e){return um.isParamType(e)?e:new um(om,{name:e.name||null,type:Em(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(um.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){nm.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function o(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let i={type:"",name:"",state:{allowType:!0}},s=i;for(let r=0;r<e.length;r++){let i=e[r];switch(i){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||n(r),s.state.allowType=!1,s.type=Em(s.type),s.components=[o(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),am(s.type,s.name)&&(s.name=""),s.type=Em(s.type);let e=s;s=s.parent,s||n(r),delete e.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),am(s.type,s.name)&&(s.name=""),s.type=Em(s.type);let a=o(s.parent);s.parent.components.push(a),delete s.parent,s=a;break;case" ":s.state.allowType&&""!==s.type&&(s.type=Em(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(t||n(r),s.indexed&&n(r),s.indexed=!0,s.name=""):am(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||n(r),s.type+=i,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||n(r),s.type+=i,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=i,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=i,delete s.state.allowArray):s.state.readArray?s.type+=i:n(r)}}return s.parent&&nm.throwArgumentError("unexpected eof","param",e),delete i.state,"indexed"===s.name?(t||n(r.length-7),s.indexed&&n(r.length-7),s.indexed=!0,s.name=""):am(s.type,s.name)&&(s.name=""),i.type=Em(i.type),i}(e,!!t),um.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(e){return!(null==e||!e._isParamType)}}function pm(e,t){return function(e){e=e.trim();let t=[],r="",n=0;for(let o=0;o<e.length;o++){let i=e[o];","===i&&0===n?(t.push(r),r=""):(r+=i,"("===i?n++:")"===i&&(n--,-1===n&&nm.throwArgumentError("unbalanced parenthesis","value",e)))}r&&t.push(r);return t}(e).map((e=>um.fromString(e,t)))}class hm{constructor(e,t){e!==om&&nm.throwError("use a static from method",Sa.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),lm(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return hm.isFragment(e)?e:"string"==typeof e?hm.fromString(e):hm.fromObject(e)}static fromObject(e){if(hm.isFragment(e))return e;switch(e.type){case"function":return vm.fromObject(e);case"event":return fm.fromObject(e);case"constructor":return bm.fromObject(e);case"error":return wm.fromObject(e);case"fallback":case"receive":return null}return nm.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?fm.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?vm.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?bm.fromString(e.trim()):"error"===e.split(" ")[0]?wm.fromString(e.substring(5).trim()):nm.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class fm extends hm{format(e){if(e||(e=cm.sighash),cm[e]||nm.throwArgumentError("invalid format type","format",e),e===cm.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==cm.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===cm.full?", ":",")+") ",e!==cm.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?fm.fromString(e):fm.fromObject(e)}static fromObject(e){if(fm.isEventFragment(e))return e;"event"!==e.type&&nm.throwArgumentError("invalid event object","value",e);const t={name:Cm(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(um.fromObject):[],type:"event"};return new fm(om,t)}static fromString(e){let t=e.match(km);t||nm.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:nm.warn("unknown modifier: "+e)}})),fm.fromObject({name:t[1].trim(),anonymous:r,inputs:pm(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function mm(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&nm.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||nm.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=Ae.from(r[1]),r[0]):e}function gm(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function ym(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&nm.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&nm.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||nm.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&nm.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&nm.throwArgumentError("unable to determine stateMutability","value",e),t}class bm extends hm{format(e){if(e||(e=cm.sighash),cm[e]||nm.throwArgumentError("invalid format type","format",e),e===cm.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===cm.sighash&&nm.throwError("cannot format a constructor for sighash",Sa.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===cm.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?bm.fromString(e):bm.fromObject(e)}static fromObject(e){if(bm.isConstructorFragment(e))return e;"constructor"!==e.type&&nm.throwArgumentError("invalid constructor object","value",e);let t=ym(e);t.constant&&nm.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(um.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?Ae.from(e.gas):null};return new bm(om,r)}static fromString(e){let t={type:"constructor"},r=(e=mm(e,t)).match(km);return r&&"constructor"===r[1].trim()||nm.throwArgumentError("invalid constructor string","value",e),t.inputs=pm(r[2].trim(),!1),gm(r[3].trim(),t),bm.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class vm extends bm{format(e){if(e||(e=cm.sighash),cm[e]||nm.throwArgumentError("invalid format type","format",e),e===cm.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==cm.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===cm.full?", ":",")+") ",e!==cm.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?vm.fromString(e):vm.fromObject(e)}static fromObject(e){if(vm.isFunctionFragment(e))return e;"function"!==e.type&&nm.throwArgumentError("invalid function object","value",e);let t=ym(e);const r={type:e.type,name:Cm(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(um.fromObject):[],outputs:e.outputs?e.outputs.map(um.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?Ae.from(e.gas):null};return new vm(om,r)}static fromString(e){let t={type:"function"},r=(e=mm(e,t)).split(" returns ");r.length>2&&nm.throwArgumentError("invalid function string","value",e);let n=r[0].match(km);if(n||nm.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&Cm(t.name),t.inputs=pm(n[2],!1),gm(n[3].trim(),t),r.length>1){let n=r[1].match(km);""==n[1].trim()&&""==n[3].trim()||nm.throwArgumentError("unexpected tokens","value",e),t.outputs=pm(n[2],!1)}else t.outputs=[];return vm.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function xm(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||nm.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class wm extends hm{format(e){if(e||(e=cm.sighash),cm[e]||nm.throwArgumentError("invalid format type","format",e),e===cm.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==cm.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===cm.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?wm.fromString(e):wm.fromObject(e)}static fromObject(e){if(wm.isErrorFragment(e))return e;"error"!==e.type&&nm.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:Cm(e.name),inputs:e.inputs?e.inputs.map(um.fromObject):[]};return xm(new wm(om,t))}static fromString(e){let t={type:"error"},r=e.match(km);return r||nm.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&Cm(t.name),t.inputs=pm(r[2],!1),xm(wm.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function Em(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const Am=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Cm(e){return e&&e.match(Am)||nm.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const km=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const Tm=new Sa("abi/5.7.0");class Rm{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){Tm.throwArgumentError(e,this.localName,t)}}class Sm{constructor(e){kl(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return Va(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(_a(e._data))}writeBytes(e){let t=La(e);const r=t.length%this.wordSize;return r&&(t=_a([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=La(Ae.from(e));return t.length>this.wordSize&&Tm.throwError("value out-of-bounds",Sa.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=_a([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class Nm{constructor(e,t,r,n){kl(this,"_data",La(e)),kl(this,"wordSize",t||32),kl(this,"_coerceFunc",r),kl(this,"allowLoose",n),this._offset=0}get data(){return Da(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):Nm.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:Tm.throwError("data out-of-bounds",Sa.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new Nm(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return Ae.from(this.readBytes(this.wordSize))}}class Mm extends Rm{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=al(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return al(Ha(e.readValue().toHexString(),20))}}class Om extends Rm{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const Im=new Sa("abi/5.7.0");function Fm(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||Im.throwError("cannot encode object for signature with missing names",Sa.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&Im.throwError("cannot encode object for signature with duplicate names",Sa.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else Im.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&Im.throwArgumentError("types/value length mismatch","tuple",r);let o=new Sm(e.wordSize),i=new Sm(e.wordSize),s=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=i.length;e.encode(i,r);let n=o.writeUpdatableValue();s.push((e=>{n(e+t)}))}else e.encode(o,r)})),s.forEach((e=>{e(o.length)}));let a=e.appendWriter(o);return a+=e.appendWriter(i),a}function jm(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readValue(),i=n.subReader(r.toNumber());try{o=t.decode(i)}catch(e){if(e.code===Sa.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if(e.code===Sa.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}null!=o&&r.push(o)}));const o=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const i=r[t];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw i}}):r[n]=i}));for(let e=0;e<r.length;e++){const t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class Lm extends Rm{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),Im.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let e=0;e<t.length;e++)n.push(this.coder);return Fm(e,n,t)}decode(e){let t=this.length;-1===t&&(t=e.readValue().toNumber(),32*t>e._data.length&&Im.throwError("insufficient data length",Sa.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e<t;e++)r.push(new Om(this.coder));return e.coerce(this.name,jm(e,r))}}class _m extends Rm{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){return e.writeValue(t?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class Wm extends Rm{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=La(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class Pm extends Wm{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,Da(super.decode(e)))}}class Dm extends Rm{constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=La(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return e.coerce(this.name,Da(e.readBytes(this.size)))}}class Bm extends Rm{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}class Um extends Rm{constructor(e,t,r){const n=(t?"int":"uint")+8*e;super(n,n,r,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let r=Ae.from(t),n=$l.mask(8*e.wordSize);if(this.signed){let e=n.mask(8*this.size-1);(r.gt(e)||r.lt(e.add(Kl).mul(ql)))&&this._throwError("value out-of-bounds",t)}else(r.lt(Ql)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}decode(e){let t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}class Vm extends Wm{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,sc(t))}decode(e){return ac(super.decode(e))}}class Zm extends Rm{constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]))})),Object.freeze(e)}encode(e,t){return Fm(e,this.coders,t)}decode(e){return e.coerce(this.name,jm(e,this.coders))}}const Hm=new Sa("abi/5.7.0"),zm=new RegExp(/^bytes([0-9]*)$/),Ym=new RegExp(/^(u?int)([0-9]*)$/);const Gm=new class{constructor(e){kl(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Mm(e.name);case"bool":return new _m(e.name);case"string":return new Vm(e.name);case"bytes":return new Pm(e.name);case"array":return new Lm(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Zm((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new Bm(e.name)}let t=e.type.match(Ym);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&Hm.throwArgumentError("invalid "+t[1]+" bit length","param",e),new Um(r/8,"int"===t[1],e.name)}if(t=e.type.match(zm),t){let r=parseInt(t[1]);return(0===r||r>32)&&Hm.throwArgumentError("invalid bytes length","param",e),new Dm(r,e.name)}return Hm.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new Nm(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new Sm(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(um.from(e))));return new Zm(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&Hm.throwError("types/values length mismatch",Sa.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(um.from(e)))),n=new Zm(r,"_"),o=this._getWriter();return n.encode(o,t),o.data}decode(e,t,r){const n=e.map((e=>this._getCoder(um.from(e))));return new Zm(n,"_").decode(this._getReader(La(t),r))}},Xm=new Sa("abi/5.7.0");class Jm extends Fl{}class qm extends Fl{}class Qm extends Fl{}class Km extends Fl{static isIndexed(e){return!(!e||!e._isIndexed)}}const $m={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function eg(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class tg{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,kl(this,"fragments",t.map((e=>hm.from(e))).filter((e=>null!=e))),kl(this,"_abiCoder",Tl(new.target,"getAbiCoder")()),kl(this,"functions",{}),kl(this,"errors",{}),kl(this,"events",{}),kl(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void Xm.warn("duplicate definition - constructor"):void kl(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?Xm.warn("duplicate definition - "+r):t[r]=e})),this.deploy||kl(this,"deploy",bm.from({payable:!1,type:"constructor"})),kl(this,"_isInterface",!0)}format(e){e||(e=cm.full),e===cm.sighash&&Xm.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===cm.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return Gm}static getAddress(e){return al(e)}static getSighash(e){return Ua(lc(e.format()),0,4)}static getEventTopic(e){return lc(e.format())}getFunction(e){if(Pa(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];Xm.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?Xm.throwArgumentError("no matching function","name",t):r.length>1&&Xm.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[vm.fromString(e).format()];return t||Xm.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(Pa(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];Xm.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?Xm.throwArgumentError("no matching event","name",t):r.length>1&&Xm.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[fm.fromString(e).format()];return t||Xm.throwArgumentError("no matching event","signature",e),t}getError(e){if(Pa(e)){const t=Tl(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}Xm.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?Xm.throwArgumentError("no matching error","name",t):r.length>1&&Xm.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[vm.fromString(e).format()];return t||Xm.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return Tl(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),Tl(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=La(t);return Da(r.slice(0,4))!==this.getSighash(e)&&Xm.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Da(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),Da(_a([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=La(t);return Da(r.slice(0,4))!==this.getSighash(e)&&Xm.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Da(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Da(_a([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=La(t),n=null,o="",i=null,s=null,a=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=Da(r.slice(0,4)),t=$m[e];if(t)i=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.signature,t.reason&&(n=i[0]),"Error"===s?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(i[0])}`:"Panic"===s&&(o=`; VM Exception while processing transaction: reverted with panic code ${i[0]}`);else try{const t=this.getError(e);i=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.format()}catch(e){}break}}return Xm.throwError("call revert exception"+o,Sa.errors.CALL_EXCEPTION,{method:e.format(),data:Da(t),errorArgs:i,errorName:s,errorSignature:a,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Da(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&Xm.throwError("too many arguments for "+e.format(),Sa.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?lc(t):"bytes"===e.type?Xa(Da(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=Ae.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),Ha(Da(t),32));for(t.forEach(((t,o)=>{let i=e.inputs[o];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?Xm.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>n(i,e)))):r.push(n(i,t)):null!=t&&Xm.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Xm.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,i)=>{const s=t[i];if(e.indexed)if("string"===e.type)r.push(lc(s));else if("bytes"===e.type)r.push(Xa(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[s]))}else n.push(e),o.push(s)})),{data:this._abiCoder.encode(n,o),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);Pa(r[0],32)&&r[0].toLowerCase()===t||Xm.throwError("fragment/topic mismatch",Sa.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],o=[],i=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(um.fromObject({type:"bytes32",name:e.name})),i.push(!0)):(n.push(e),i.push(!1)):(o.push(e),i.push(!1))}));let s=null!=r?this._abiCoder.decode(n,_a(r)):null,a=this._abiCoder.decode(o,t,!0),l=[],c=0,d=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)l[t]=new Km({_isIndexed:!0,hash:null});else if(i[t])l[t]=new Km({_isIndexed:!0,hash:s[d++]});else try{l[t]=s[d++]}catch(e){l[t]=e}else try{l[t]=a[c++]}catch(e){l[t]=e}if(e.name&&null==l[e.name]){const r=l[t];r instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw eg(`property ${JSON.stringify(e.name)}`,r)}}):l[e.name]=r}}));for(let e=0;e<l.length;e++){const t=l[e];t instanceof Error&&Object.defineProperty(l,e,{enumerable:!0,get:()=>{throw eg(`index ${e}`,t)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new qm({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:Ae.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Jm({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=Da(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new Qm({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}function rg(e,t,...r){return bl(this,void 0,void 0,(function*(){const n=[];for(const e of r)for(const t of e)t.callData&&n.push(t.callData);const o=yield function(e,t,r){return bl(this,void 0,void 0,(function*(){const n=yield ng(e,t,r),o=new Map;for(const{req:e,resp:t}of n)o.set(e,t);return e.map((e=>({req:e,resp:o.get(e)})))}))}(n,e,t),i=new Map;for(const{req:e,resp:t}of o)i.set(e,null==t?void 0:t.result);return r.map((e=>e.filter((e=>!e.callData||i.get(e.callData))).map(((e,t)=>e.processor(e.callData?i.get(e.callData):null,t)))))}))}function ng(e,t,r){return bl(this,void 0,void 0,(function*(){let n=[e];e.length>800&&(n=c(e,800));let o=[];const i=n.map((e=>bl(this,void 0,void 0,(function*(){const n=e.map((e=>[e.to,e.data])),i={data:t.interface.encodeFunctionData("aggregate",[n]),to:r};let s;try{s=yield t.provider.call(i)}catch(n){const i=e.length;if(i>20){const n=Math.floor(i/2),[s,a]=yield Promise.all([ng(e.slice(0,n),t,r),ng(e.slice(n,i),t,r)]);o=[...o,...s,...a]}else{const e="[sendCallReqs] error";console.error(e,n)}}if(void 0===s)throw new Error("Unexpected batch result");const[a,l]=Gm.decode(["uint256","bytes[]"],s);if(e.length!==l.length)throw new Error("Unexpected length mismatch");return l.map(((t,r)=>({resp:{result:t},req:e[r]})))}))));return(yield Promise.allSettled(i)).filter((e=>"fulfilled"===e.status)).forEach((({value:e})=>{o=[...o,...e]})),o}))}const og=new Map;function ig(e,t){if(og.has(e))return og.get(e);const r=new uf(e,t);return og.set(e,r),r}function sg(e,t,r,n){if(!function(e){try{return al(e)}catch(e){return!1}}(e)||e===Jl)throw Error(`Invalid 'address' parameter '${e}'.`);return new ke(e,t,function(e,t){return t?function(e,t){return e.getSigner(t).connectUnchecked()}(e,t):e}(r,n))}function ag(e){const{provider:t,account:r,chainId:n}=te(),[o,i]=m(!1),s=w((()=>rm[null!=e?e:n]),[n,e]),a=q(Kf).jsonRpcUrlMap,l=y(((o,i)=>{if(e&&e!==n){const t=Object.assign(Object.assign({},cl),a)[e],r=ig(null==t?void 0:t[0],e);return new ke(o,i,r)}if(t)return sg(o,i,t,r)}),[t,r,e,a]),c=y((e=>{if(!s)return;const{MULTI_CALL:t}=s;if(!t)return;const r=l(t,tm);return(()=>bl(this,void 0,void 0,(function*(){if(r){i(!0);try{const[n]=yield rg(r,t,e);return n}catch(e){console.error("Contract: useMultiContract is error",e)}i(!1)}})))()}),[s,l]);return{getContract:l,contractConfig:s,call:c,loading:o}}var lg=[{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"isERC20",outputs:[{internalType:"bool",name:"isOk",type:"bool"},{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"decimals",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"allownance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"judgeERC20",outputs:[{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"decimals",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"allownance",type:"uint256"}],stateMutability:"view",type:"function"}];const cg=new o(2).pow(256).minus(1);function dg({tokenList:e,blockNumber:t,chainId:r,skip:n}){var i;const{account:s}=te(),a=Df(),l=Q(),[c,d]=w((()=>{const t=[],r=[];return null==e||e.forEach((e=>bl(this,void 0,void 0,(function*(){e.chainId===ll.TON?ml(e.address)||r.push(e):t.push(e)})))),[t.map((e=>e.address.toLocaleLowerCase())),r]}),[e]),{getContract:u,contractConfig:p,call:h}=ag(r),[f,g]=m(),y=w((()=>{if(!s||!c.length||!p)return;const{DODO_APPROVE:e,ERC20_HELPER:t}=p,r=u(t,lg);if(!r)return;return c.map((n=>({callData:{data:r.interface.encodeFunctionData("isERC20",[n,s,e]),to:t},processor:e=>{const t=new tg(lg).decodeFunctionResult("isERC20",e),{balance:r,isOk:i}=t,s=parseInt(t.decimals),a=new o(10).pow(s),l=new o(t.allownance.toString()).div(a);return i?{address:n,decimals:s,symbol:t.symbol,name:t.name,balance:new o(r.toString()).div(a),allowance:l}:{address:n,balance:new o(0),allowance:new o(0)}}})))}),[s,u,JSON.stringify(c)]);return v((()=>{(()=>{bl(this,void 0,void 0,(function*(){if(!y||n)return;let e={};c.forEach((t=>{e[t]=!0})),l(El(e));const t=yield h(y),r={};t&&(t.forEach((e=>{ml(e.address)||(r[e.address.toLocaleLowerCase()]={tokenBalances:e.balance,tokenAllowances:e.allowance})})),l(wl(r))),g(t),c.forEach((t=>{e[t]=!1})),l(El(e))}))})()}),[y,t,n]),v((()=>{var e;const t=()=>bl(this,void 0,void 0,(function*(){if(n)return;let e={};const{getTokenBalance:t}=Df.getState(),r={},o=[],i=null==d?void 0:d.map((n=>bl(this,void 0,void 0,(function*(){const i=n.address.toLocaleLowerCase();e[i]=!0;const s=yield t(n.address,n.decimals);return o.push({address:i,decimals:n.decimals,symbol:n.symbol,name:n.name,balance:s,allowance:cg}),r[i]={tokenBalances:s,tokenAllowances:cg},Promise.resolve(!0)}))));i&&(l(El(e)),yield Promise.all(i),d.forEach((t=>{const r=t.address.toLocaleLowerCase();e[r]=!1})),l(El(e)),l(wl(r)),g(o))}));d.length&&(null===(e=a.connected)||void 0===e?void 0:e.account)&&t()}),[JSON.stringify(d),t,n,null===(i=a.connected)||void 0===i?void 0:i.account]),{data:f}}function ug(e){const{getBalance:t,account:r,chainId:n,evmAccount:i}=Bf(),s=Q(),a=q(Pf),l=q(Kf).jsonRpcUrlMap;v((()=>{(()=>{bl(this,void 0,void 0,(function*(){if(t&&r)if(e&&e!==n){if(e!==ll.TON&&i){const t=Object.assign(Object.assign({},cl),l)[e],r=ig(null==t?void 0:t[0],e),n=yield r.getBalance(i);n&&s(xl(e,new o(n.toString()).div(1e18)))}}else{const e=yield t(r);e&&s(xl(null!=n?n:1,e))}}))})()}),[t,r,s,a,e,i])}const pg=e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_FROM_TOKEN_CHAIN_ID",payload:e})})),hg=e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_TO_TOKEN_CHAIN_ID",payload:e})}));function fg(){const{getLastBlockNumber:e,chainId:t}=Bf(),r=Q(),n=y((()=>bl(this,void 0,void 0,(function*(){if(!e||!t)return;const n=yield e();r((e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_BLOCK_NUMBER",payload:e})})))(n))}))),[e,t]);return{updateBlockNumber:n}}var mg,gg=[{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];function yg(e,t,r,n=0){if(r&&(e=e.toLocaleLowerCase(),t=t.toLocaleLowerCase()),e===t)return mg.fully+n;const o=e.indexOf(t);return 0===o?mg.prefix+n:o>0?mg.other+n:mg.none}!function(e){e[e.fully=1]="fully",e[e.prefix=2]="prefix",e[e.other=3]="other",e[e.none=0]="none"}(mg||(mg={}));function bg({value:e,onChange:t,occupiedAddrs:r,occupiedChainId:n,hiddenAddrs:i,showAddrs:s,side:a,chainId:l,visible:c,defaultLoadBalance:d}){const[u,p]=m(""),h=q(Hf),f=Uf(),g=w((()=>null!=l?l:f),[l,f]),b=Qf(),v=w((()=>{const e=h.filter((e=>e.chainId===g));return e}),[h,g]),x=q((e=>((e,t)=>(null!=t?t:jf.getState()).token.popularTokenList.filter((({chainId:t})=>e===t)))(g,e))),E=w((()=>(null==Vf?void 0:Vf.filter((e=>e.chainId===g)))||[]),[Vf,g]),A=w((()=>new Set(i?i.map((e=>e.toLowerCase())):void 0)),[i]),C=w((()=>s?new Set(s.map((e=>e.toLowerCase()))):void 0),[s]),k=y((e=>e.filter((e=>{if(e.chainId!==g)return!1;let t=!0;return t=C?C.has(e.address.toLowerCase()):!A.has(e.address.toLowerCase()),t&&a&&(t=!e.side||e.side===a),t}))),[C,g,A]),T=w((()=>k(x)),[x,k]),R=y((t=>{if(null===t)return null;const n=[];u?t.forEach((e=>{const t=((e,t,{matchAddress:r}={})=>{if(!t)return 0;const n=t.toLocaleLowerCase();let o=0;r&&e.address.toLocaleLowerCase()===n&&(o=1),o||(o=yg(e.symbol.toLocaleLowerCase(),n,!1,1));if(o)e.name.toLocaleLowerCase()===n&&(o=mg.fully+1);else{let t=yg(e.name.toLocaleLowerCase(),n,!1,10);t=t===mg.fully+10?mg.fully+1:t,o=t}return o})(e,u,{matchAddress:!0});t&&n.push({sort:t,token:e})})):t.forEach((e=>{n.push({sort:0,token:e})}));const i=[];return n.sort(((t,n)=>{const i=t.token,s=n.token;if(e){if(i.address===e.address)return-1;if(s.address===e.address)return 1}if(null==r?void 0:r.includes(i.address))return-1;if(null==r?void 0:r.includes(s.address))return 1;const a=b&&b(i)||new o(0),l=b&&b(s)||new o(0),c=T.map((e=>e.address));if(null==c?void 0:c.includes(i.address))return-1;if(null==c?void 0:c.includes(s.address))return 1;if(!a.eq(l))return a.gt(l)?-1:1;if(t.sort!==n.sort)return t.sort>n.sort?1:-1;const d=E.map((e=>e.address));return(null==d?void 0:d.includes(i.address))?-1:(null==d?void 0:d.includes(s.address))?1:i.symbol.localeCompare(s.symbol)})).some((e=>!!(u&&i.length>21)||(i.push(e.token),!1))),i}),[u,b,r,e,T,E]),S=y((e=>{const o=e.address.toLowerCase();t(e,!!(null==r?void 0:r.some((t=>t.toLowerCase()===o&&(!n||e.chainId===n)))))}),[t,r,n]),N=w((()=>{const e=k(v),t=new Set;return e.forEach((e=>{t.add(e.address)})),T.forEach((r=>{t.has(r.address)||e.push(r)})),R(e)||[]}),[v,k,R,T]);return function({chainId:e,value:t,tokenList:r,popularTokenList:n,visible:o,defaultLoadBalance:i}){const s=q($f),a=q(Pf),l=w((()=>{if(void 0===s||s)return[];const t=new Set,o=[];return r.forEach((r=>{r.chainId===e&&(t.add(r.address),o.push(r))})),null==n||n.forEach((r=>{r.chainId!==e||t.has(r.address)||(t.add(r.address),o.push(r))})),o}),[r,n,e,s]),[c,d]=w((()=>t?[[t],t.chainId]:[]),[t]);dg({tokenList:l,chainId:e,skip:!1===o&&!i}),ug(e),dg({tokenList:c,chainId:d,blockNumber:a})}({chainId:g,tokenList:N,popularTokenList:T,value:e,visible:c,defaultLoadBalance:d}),{filter:u,setFilter:p,showTokenList:N,onSelectToken:S,popularTokenList:T}}var vg,xg;function wg(){return wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wg.apply(this,arguments)}var Eg,Ag,Cg,kg,Tg,Rg=function(e){return u.createElement("svg",wg({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),vg||(vg=u.createElement("g",{clipPath:"url(#clip0_5431_179637)"},u.createElement("path",{d:"M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",fill:"#F2F4F7"}),u.createElement("path",{d:"M12.3735 3V9.6525L17.9963 12.165L12.3735 3Z",fill:"#343434"}),u.createElement("path",{d:"M12.3735 3L6.75 12.165L12.3735 9.6525V3Z",fill:"#8C8C8C"}),u.createElement("path",{d:"M12.3735 16.4759V20.9962L18 13.2119L12.3735 16.4759Z",fill:"#3C3C3B"}),u.createElement("path",{d:"M12.3735 20.9962V16.4752L6.75 13.2119L12.3735 20.9962Z",fill:"#8C8C8C"}),u.createElement("path",{d:"M12.3735 15.4298L17.9963 12.1651L12.3735 9.65405V15.4298Z",fill:"#141414"}),u.createElement("path",{d:"M6.75 12.1651L12.3735 15.4298V9.65405L6.75 12.1651Z",fill:"#393939"}))),xg||(xg=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_5431_179637"},u.createElement("rect",{width:24,height:24,fill:"white"})))))};function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sg.apply(this,arguments)}var Ng,Mg;function Og(){return Og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Og.apply(this,arguments)}var Ig,Fg,jg;function Lg(){return Lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lg.apply(this,arguments)}var _g,Wg;function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pg.apply(this,arguments)}var Dg,Bg;function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ug.apply(this,arguments)}var Vg;function Zg(){return Zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zg.apply(this,arguments)}var Hg,zg;function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yg.apply(this,arguments)}var Gg;function Xg(){return Xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xg.apply(this,arguments)}var Jg,qg;function Qg(){return Qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qg.apply(this,arguments)}var Kg,$g,ey;function ty(){return ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ty.apply(this,arguments)}var ry,ny,oy,iy,sy;function ay(){return ay=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ay.apply(this,arguments)}var ly,cy,dy=function(e){return u.createElement("svg",ay({width:24,height:24,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),ry||(ry=u.createElement("path",{d:"m22.289 16.217.002-13.915C22.27 1.137 21.348.2 20.18.2H5.657A5.758 5.758 0 0 0 0 5.96c0 1.063.284 1.969.721 2.763.365.662.944 1.286 1.518 1.756.157.128.083.08.576.383.68.417 1.46.624 1.46.624l-.006 8.322c.016.393.06.771.158 1.123a3.721 3.721 0 0 0 2.243 2.51 4.29 4.29 0 0 0 1.541.31l11.6.043A4.192 4.192 0 0 0 24 19.599a4.191 4.191 0 0 0-1.709-3.38l-.002-.002z",fill:"#FFEEDA"})),ny||(ny=u.createElement("path",{d:"M22.57 19.688a2.764 2.764 0 0 1-2.761 2.675l-7.985-.031a4.165 4.165 0 0 0 1.022-2.736c0-1.639-.977-2.766-.977-2.766h7.94a2.764 2.764 0 0 1 2.762 2.767v.09h-.001z",fill:"#EBC28E"})),oy||(oy=u.createElement("path",{d:"M2.992 9.295C2.076 8.427 1.426 7.3 1.426 5.959l.002-.142c.074-2.28 1.951-4.114 4.228-4.186h14.523c.38.012.686.286.686.671v12.285c.336.061.496.102.818.22.252.09.61.293.61.293V2.302C22.27 1.137 21.349.2 20.18.2H5.657A5.758 5.758 0 0 0 0 5.96c0 1.828.832 3.386 2.198 4.484.091.073.181.168.426.167.428 0 .728-.337.71-.71-.015-.306-.144-.42-.342-.607z",fill:"#190602"})),iy||(iy=u.createElement("path",{d:"M19.809 15.403H8.417a1.396 1.396 0 0 0-1.383 1.395v1.633c.021.757.666 1.406 1.428 1.406h.847V18.43h-.847v-1.599h.461c1.438 0 2.496 1.339 2.496 2.767 0 1.264-1.152 2.887-3.086 2.756-1.718-.115-2.64-1.64-2.639-2.756V5.714c0-.628-.509-1.137-1.136-1.137H3.422v1.417h.845v13.603c-.043 2.766 1.97 4.16 4.067 4.16l11.474.034a4.192 4.192 0 0 0 4.189-4.195 4.192 4.192 0 0 0-4.19-4.195l.002.002zm2.76 4.286a2.764 2.764 0 0 1-2.76 2.675l-7.985-.03a4.165 4.165 0 0 0 1.022-2.736c0-1.64-.977-2.767-.977-2.767h7.94a2.764 2.764 0 0 1 2.762 2.767v.091h-.001zM16.743 4.833H8.157V6.25h8.587a.709.709 0 0 0 0-1.417z",fill:"#190602"})),sy||(sy=u.createElement("path",{d:"M16.743 11.52H8.157v1.416h8.587a.709.709 0 0 0 0-1.416zM18.255 8.177H8.157v1.417h10.098a.709.709 0 0 0 0-1.417z",fill:"#190602"})))};function uy(){return uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uy.apply(this,arguments)}var py,hy,fy=function(e){return u.createElement("svg",uy({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ly||(ly=u.createElement("g",{clipPath:"url(#a)"},u.createElement("rect",{width:24,height:24,rx:12,fill:"#fff"}),u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.58 20.606A10.72 10.72 0 0 1 1.262 12C1.263 6.07 6.07 1.263 12 1.263c4.894 0 10.238 2.925 11.53 7.404C22.087 3.662 17.473 0 12 0 5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12v-.632h-.747a21.577 21.577 0 0 1-1.449-.075c-.9-.08-1.927-.232-2.626-.512-1.125-.449-1.76-1.045-2.486-1.742L16.65 9c-.727-.699-1.544-1.483-2.96-2.15-1.395-.656-2.937-.55-4.07-.317a10.319 10.319 0 0 0-1.832.562c-.57.24-1.124.524-1.684.788a73.87 73.87 0 0 0 1.732.499 6.356 6.356 0 0 1 1.375.657c.586.376 1.072.85 1.27 1.432-1.243.163-2.41.71-3.281 1.223a13.438 13.438 0 0 0-1.639 1.139c-.07.058-1.194 1.048-1.194 1.048s1.449.154 2.164.298c.475.096 1.117.25 1.785.483.672.235 1.35.542 1.914.935.564.394.978.85 1.182 1.371.594 1.518.011 2.997-1.16 3.83-1.156.821-2.914 1.017-4.673-.19zm4.094 1.878c.468-.152.91-.374 1.31-.658 1.593-1.132 2.431-3.206 1.604-5.32-.325-.83-.945-1.464-1.635-1.946-.69-.482-1.485-.835-2.22-1.091-.484-.169-.951-.3-1.36-.398.153-.1.309-.197.467-.29.972-.572 2.196-1.097 3.37-1.097 1.77 0 3.088.543 4.347 1.126l.344.16c1.125.528 2.306 1.083 3.678 1.083 1.33 0 2.367-.377 3.081-.766-.636 5.323-5.166 9.45-10.66 9.45-.799 0-1.577-.087-2.326-.253zm11.622-9.973a5.289 5.289 0 0 1-1.717.279c-1.076 0-2.001-.432-3.175-.98l-.317-.146c-1.175-.545-2.535-1.122-4.306-1.226-.237-1.172-1.126-1.973-1.887-2.463a6.731 6.731 0 0 0-.253-.155c.076-.017.154-.035.233-.051 1.023-.21 2.244-.263 3.278.223 1.227.578 1.92 1.243 2.64 1.935l.025.023c.74.712 1.525 1.458 2.892 2.004.76.304 1.743.467 2.587.557z",fill:"url(#b)"}))),cy||(cy=u.createElement("defs",null,u.createElement("linearGradient",{id:"b",x1:0,y1:24,x2:24.43,y2:23.554,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29CCB9"}),u.createElement("stop",{offset:.495,stopColor:"#0091FF"}),u.createElement("stop",{offset:1,stopColor:"#FF66B7"})),u.createElement("clipPath",{id:"a"},u.createElement("rect",{width:24,height:24,rx:12,fill:"#fff"})))))};function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},my.apply(this,arguments)}var gy,yy,by;function vy(){return vy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vy.apply(this,arguments)}const xy=new Map([[ll.MAINNET,{chainId:ll.MAINNET,logo:Rg,name:"Ethereum"}],[ll.GOERLI,{chainId:ll.GOERLI,logo:Rg,name:"Goerli",mainnet:ll.MAINNET}],[ll.ARBITRUM_ONE,{chainId:ll.ARBITRUM_ONE,logo:function(e){return u.createElement("svg",Sg({height:"692pt",viewBox:"0 0 619 692",width:"619pt",xmlns:"http://www.w3.org/2000/svg"},e),Eg||(Eg=u.createElement("path",{d:"m280.46 17.3c18.85-10.03 43.1-9.37 61.23 1.99 78.77 45.29 157.52 90.59 236.28 135.88 17.98 10.27 30.16 30.12 30.76 50.87v275.89c.49 19.03-8.56 38.11-23.76 49.6-83.95 48.66-167.91 97.29-251.9 145.88-14.93 5.88-32.32 5.81-47.05-.66-10.1-5.39-19.93-11.25-29.88-16.91-25.72-14.85-51.49-29.62-77.2-44.49 7.13-11.82 13.88-23.88 21.17-35.61 34.11 19.55 68.15 39.21 102.24 58.77 5.43 2.44 12.28 2.51 17.36-.81 28.11-16.31 56.23-32.61 84.36-48.89 28.58-16.52 57.15-33.07 85.69-49.67 7.92-4.6 15.84-9.2 23.78-13.77 14.97-8.59 29.86-17.33 44.83-25.93 5.77-3.22 8.74-10.05 8.75-16.47-.04-14.36.09-28.73-.07-43.09.18-76.95.01-153.9.09-230.85.24-7.26-3.78-14.44-10.07-18.06-79.37-45.64-158.72-91.3-238.08-136.94-6.26-3.47-14.38-3.15-20.42.66-78.73 45.56-157.48 91.1-236.15 136.78-6.59 3.53-10.68 11.06-10.31 18.5.21 73.45.1 146.9.48 220.34-12.68 20.02-25.84 39.75-38.67 59.68-.95 1.49-1.95 2.96-3.1 4.31-.23-95.74-.02-191.5-.1-287.25.31-22.52 14.44-43.97 34.72-53.61 78.35-45.36 156.61-90.87 235.02-136.14z",fill:"#8cbfdf"})),Ag||(Ag=u.createElement("path",{d:"m298.57 54.69c6.04-3.81 14.16-4.13 20.42-.66 79.36 45.64 158.71 91.3 238.08 136.94 6.29 3.62 10.31 10.8 10.07 18.06-.08 76.95.09 153.9-.09 230.85-6.25-8.84-11.77-18.21-17.74-27.25-38.11-59.38-76.26-118.73-114.34-178.12l-.71.13c-16.14 27.89-32.81 55.48-48.94 83.38 42.77 69.1 85.49 138.23 128.22 207.35-7.94 4.57-15.86 9.17-23.78 13.77-40.35-63.61-80.71-127.22-121.07-190.83l-.73-.41c-19.01 31.61-37.43 63.61-56.36 95.28 4.29 7.87 9.61 15.25 14.3 22.94 26.05 40.9 52.13 81.79 78.17 122.69-28.13 16.28-56.25 32.58-84.36 48.89-5.08 3.32-11.93 3.25-17.36.81-34.09-19.56-68.13-39.22-102.24-58.77 73.38-124.27 146.6-248.63 219.92-372.94l-.41-.3c-25.22.18-50.45.2-75.67.29-7.21.39-14.55-.37-21.69.39-73.43 121.29-146.88 242.57-220.46 363.77-8.47-4.83-16.92-9.69-25.34-14.61 19.61-32.21 39.88-64.05 59.74-96.12 51.98-83.37 103.96-166.73 155.94-250.1.66-1.19 1.78-2.22 1.79-3.66-13.31-.19-26.61-.72-39.92-.97-20.59.3-41.98 3.68-59.65 14.9-6.98 4.5-13.13 10.36-17.61 17.37-41.35 64.21-82.86 128.31-124.16 192.55-.38-73.44-.27-146.89-.48-220.34-.37-7.44 3.72-14.97 10.31-18.5 78.67-45.68 157.42-91.22 236.15-136.78z",fill:"#2b374d"})),Cg||(Cg=u.createElement("path",{d:"m194.36 220.39c17.67-11.22 39.06-14.6 59.65-14.9 13.31.25 26.61.78 39.92.97-.01 1.44-1.13 2.47-1.79 3.66-51.98 83.37-103.96 166.73-155.94 250.1-19.86 32.07-40.13 63.91-59.74 96.12-13.05-7.52-26.09-15.05-39.14-22.57-9.44-4.83-16.23-13.58-21.12-22.76-2.5-5.29-4.79-10.85-5.38-16.71 1.15-1.35 2.15-2.82 3.1-4.31 12.83-19.93 25.99-39.66 38.67-59.68 41.3-64.24 82.81-128.34 124.16-192.55 4.48-7.01 10.63-12.87 17.61-17.37z",fill:"#fff"})),kg||(kg=u.createElement("path",{d:"m343.95 206.79c25.22-.09 50.45-.11 75.67-.29l.41.3c-73.32 124.31-146.54 248.67-219.92 372.94-7.29 11.73-14.04 23.79-21.17 35.61-25.73-14.78-51.42-29.61-77.14-44.4 73.58-121.2 147.03-242.48 220.46-363.77 7.14-.76 14.48 0 21.69-.39z",fill:"#fff"})),Tg||(Tg=u.createElement("g",{fill:"#00a2f7"},u.createElement("path",{d:"m434.26 234.64.71-.13c38.08 59.39 76.23 118.74 114.34 178.12 5.97 9.04 11.49 18.41 17.74 27.25.16 14.36.03 28.73.07 43.09-.01 6.42-2.98 13.25-8.75 16.47-14.97 8.6-29.86 17.34-44.83 25.93-42.73-69.12-85.45-138.25-128.22-207.35 16.13-27.9 32.8-55.49 48.94-83.38z"}),u.createElement("path",{d:"m311.6 443.18c18.93-31.67 37.35-63.67 56.36-95.28l.73.41c40.36 63.61 80.72 127.22 121.07 190.83-28.54 16.6-57.11 33.15-85.69 49.67-26.04-40.9-52.12-81.79-78.17-122.69-4.69-7.69-10.01-15.07-14.3-22.94z"}))))},name:"Arbitrum"}],[ll.POLYGON,{chainId:ll.POLYGON,logo:function(e){return u.createElement("svg",Og({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Ng||(Ng=u.createElement("defs",null,u.createElement("circle",{id:"path-1",cx:12,cy:12,r:12}))),Mg||(Mg=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{transform:"translate(-223.000000, -266.000000)"},u.createElement("g",{transform:"translate(18.000000, 132.000000)"},u.createElement("g",{transform:"translate(20.000000, 41.000000)"},u.createElement("g",{transform:"translate(156.000000, 82.000000)"},u.createElement("g",{transform:"translate(29.000000, 11.000000)"},u.createElement("mask",{id:"mask-2",fill:"white"},u.createElement("use",{xlinkHref:"#path-1"})),u.createElement("g",null),u.createElement("g",{mask:"url(#mask-2)"},u.createElement("circle",{fill:"#8247E5",fillRule:"nonzero",cx:12,cy:12,r:12}),u.createElement("path",{d:"M8.01148,5.30068 C8.25312,5.16644 8.54688,5.16644 8.78852,5.30068 L12.38852,7.30068 C12.64248,7.44176 12.8,7.70948 12.8,8 L12.8,9.30068 L11.2,10.2 L11.2,8.47072 L8.4,6.91516 L5.6,8.47072 L5.6,11.52928 L8.4,13.08484 L15.21148,9.30068 C15.45312,9.16644 15.74688,9.16644 15.98852,9.30068 L19.58852,11.30068 C19.84248,11.44176 20,11.70948 20,12 L20,16 C20,16.29052 19.84248,16.55824 19.58852,16.69932 L15.98852,18.69932 C15.74688,18.83356 15.45312,18.83356 15.21148,18.69932 L11.61148,16.69932 C11.35752,16.55824 11.2,16.29052 11.2,16 L11.2,14.69932 L12.8,13.8 L12.8,15.52928 L15.6,17.08484 L18.4,15.52928 L18.4,12.47072 L15.6,10.91516 L8.78852,14.69932 C8.54688,14.83356 8.25312,14.83356 8.01148,14.69932 L4.41148,12.69932 C4.15752,12.55824 4,12.29052 4,12 L4,8 C4,7.70948 4.15752,7.44176 4.41148,7.30068 L8.01148,5.30068 Z",fill:"#FFFFFF"}))))))))))},name:"Polygon"}],[ll.BSC,{chainId:ll.BSC,logo:function(e){return u.createElement("svg",Lg({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"7.5in",height:"7.5in",style:{shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"optimizeQuality",fillRule:"evenodd",clipRule:"evenodd"},viewBox:"0 0 7500 7500"},e),Ig||(Ig=u.createElement("defs",null,u.createElement("style",{type:"text/css"},".fil0 {fill:none}\n .fil1 {fill:#f0b90b}\n .fil2 {fill:#fff}"))),Fg||(Fg=u.createElement("g",{id:"Layer_x0020_1"},u.createElement("metadata",{id:"CorelCorpID_0Corel-Layer"}),u.createElement("rect",{className:"fil0",width:7500,height:7500}),u.createElement("g",{id:"_2419820813232"},u.createElement("circle",{className:"fil1",cx:3750,cy:3750,r:3500}),u.createElement("g",null,u.createElement("path",{className:"fil2",d:"M2779 3351l971 -971 971 972 565 -565 -1536 -1537 -1536 1536 565 565 0 0zm-1529 399l565 -565 565 565 -565 565 -565 -565zm1529 399l971 971 971 -972 566 565 0 0 -1537 1537 -1536 -1536 -1 -1 566 -564 0 0zm2341 -399l565 -565 565 565 -565 565 -565 -565z"})),u.createElement("g",null,u.createElement("path",{className:"fil2",d:"M4380 3750l0 0 -630 -632 -466 467 0 0 -54 54 -111 111 -1 1 1 1 630 630 631 -631 0 0 0 0 0 -1zm0 0l0 0 0 0z"}))))),jg||(jg=u.createElement("style",{xmlns:""},"#yddContainer{display:block;font-family:Microsoft YaHei;position:relative;width:100%;height:100%;top:-4px;left:-4px;font-size:12px;border:1px solid}#yddTop{display:block;height:22px}#yddTopBorderlr{display:block;position:static;height:17px;padding:2px 28px;line-height:17px;font-size:12px;color:#5079bb;font-weight:bold;border-style:none solid;border-width:1px}#yddTopBorderlr .ydd-sp{position:absolute;top:2px;height:0;overflow:hidden}.ydd-icon{left:5px;width:17px;padding:0px 0px 0px 0px;padding-top:17px;background-position:-16px -44px}.ydd-close{right:5px;width:16px;padding-top:16px;background-position:left -44px}#yddKeyTitle{float:left;text-decoration:none}#yddMiddle{display:block;margin-bottom:10px}.ydd-tabs{display:block;margin:5px 0;padding:0 5px;height:18px;border-bottom:1px solid}.ydd-tab{display:block;float:left;height:18px;margin:0 5px -1px 0;padding:0 4px;line-height:18px;border:1px solid;border-bottom:none}.ydd-trans-container{display:block;line-height:160%}.ydd-trans-container a{text-decoration:none;}#yddBottom{position:absolute;bottom:0;left:0;width:100%;height:22px;line-height:22px;overflow:hidden;background-position:left -22px}.ydd-padding010{padding:0 10px}#yddWrapper{color:#252525;z-index:10001;background:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ab20.png);}#yddContainer{background:#fff;border-color:#4b7598}#yddTopBorderlr{border-color:#f0f8fc}#yddWrapper .ydd-sp{background-image:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ydd-sprite.png)}#yddWrapper a,#yddWrapper a:hover,#yddWrapper a:visited{color:#50799b}#yddWrapper .ydd-tabs{color:#959595}.ydd-tabs,.ydd-tab{background:#fff;border-color:#d5e7f3}#yddBottom{color:#363636}#yddWrapper{min-width:250px;max-width:400px;}")))},name:"BNBChain"}],[ll.OPTIMISM,{chainId:ll.OPTIMISM,logo:function(e){return u.createElement("svg",Pg({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),_g||(_g=u.createElement("defs",null,u.createElement("circle",{id:"path-1",cx:12,cy:12,r:12}))),Wg||(Wg=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{transform:"translate(-223.000000, -266.000000)"},u.createElement("g",{transform:"translate(18.000000, 132.000000)"},u.createElement("g",{transform:"translate(20.000000, 41.000000)"},u.createElement("g",{transform:"translate(156.000000, 82.000000)"},u.createElement("g",{transform:"translate(29.000000, 11.000000)"},u.createElement("mask",{id:"mask-2",fill:"white"},u.createElement("use",{xlinkHref:"#path-1"})),u.createElement("g",null),u.createElement("g",{id:"optimism.caeb9392",mask:"url(#mask-2)",fillRule:"nonzero"},u.createElement("circle",{fill:"#FF0420",cx:12,cy:12,r:12}),u.createElement("path",{d:"M7.85495544,16 C7.01608475,16 6.32880363,15.7925669 5.7930557,15.37776 C5.2643519,14.9555511 5,14.3555763 5,13.5777763 C5,13.4148143 5.01763849,13.2147832 5.05285911,12.9777422 C5.14454543,12.4444444 5.27494626,11.8036699 5.44411795,11.0555371 C5.92345653,9.01851235 7.16063019,8 9.15558257,8 C9.69837462,8 10.1847573,8.09628495 10.614787,8.28885484 C11.0448167,8.47402275 11.3831601,8.75553483 11.6298735,9.13333185 C11.8765869,9.50366768 12,9.94814173 12,10.4666356 C12,10.6221956 11.9823615,10.8184961 11.9470845,11.0555371 C11.8413663,11.7147869 11.7144594,12.3555615 11.5664201,12.9777422 C11.3197066,13.9925832 10.8932272,14.7518486 10.2869817,15.2555385 C9.68073613,15.7518264 8.8700983,16 7.85495544,16 Z M8.00299476,14.3999882 C8.39780384,14.3999882 8.73259699,14.2777667 9.00754325,14.0333237 C9.28953364,13.7888807 9.49043207,13.4148143 9.61023853,12.9111244 C9.7723661,12.2148054 9.89577916,11.6073694 9.98036501,11.0888756 C10.0085415,10.9333156 10.0226298,10.7740842 10.0226298,10.611063 C10.0226298,9.93700916 9.68778026,9.59995263 9.01813761,9.59995263 C8.62332853,9.59995263 8.28498515,9.72217411 8.00299476,9.96661707 C7.72810485,10.2111193 7.53070031,10.5851857 7.41089384,11.0888756 C7.28398689,11.5851635 7.15707995,12.1925995 7.03022936,12.9111244 C7.00199651,13.0592232 6.98790826,13.2147832 6.98790826,13.3777452 C6.98790826,14.0592602 7.32630799,14.3999882 8.00299476,14.3999882 Z",fill:"#FFFFFF"}),u.createElement("path",{d:"M12.2418282,16 C12.1556269,16 12.0889713,15.9733226 12.0419867,15.9199677 C12.0027701,15.8589994 11.9910553,15.7904787 12.0067168,15.7142835 L13.6288783,8.28571646 C13.6445399,8.20190792 13.6876405,8.13332623 13.7581802,8.07997137 C13.8287198,8.02667743 13.9031435,8 13.981514,8 L17.1083126,8 C17.9781556,8 18.675596,8.1752305 19.2006341,8.52569149 C19.7335656,8.87621339 20,9.38284087 20,10.0456958 C20,10.2361531 19.9765077,10.4342848 19.9294603,10.6399689 C19.7335656,11.5161823 19.3378293,12.1638104 18.7422516,12.5828531 C18.1545047,13.0018957 17.347308,13.2114171 16.3207242,13.2114171 L14.7338326,13.2114171 L14.1931329,15.7142835 C14.1774087,15.7980921 14.1343081,15.8666129 14.0638311,15.9199677 C13.9932915,15.9733226 13.9188051,16 13.8404973,16 L12.2418282,16 Z M16.4030414,11.6342817 C16.732122,11.6342817 17.0181647,11.546636 17.2611068,11.3714055 C17.5118797,11.196175 17.6764513,10.9447494 17.7548217,10.6171287 C17.7783141,10.4875787 17.7900916,10.3733165 17.7900916,10.2742811 C17.7900916,10.0533092 17.7234986,9.8856921 17.5902501,9.77142988 C17.4570016,9.64949333 17.2297837,9.58858596 16.9084712,9.58858596 L15.497866,9.58858596 L15.0511984,11.6342817 L16.4030414,11.6342817 Z",fill:"#FFFFFF"}))))))))))},name:"Optimism"}],[ll.AVALANCHE,{chainId:ll.AVALANCHE,logo:function(e){return u.createElement("svg",Ug({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Dg||(Dg=u.createElement("defs",null,u.createElement("circle",{id:"path-1",cx:12,cy:12,r:12}))),Bg||(Bg=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",null,u.createElement("mask",{fill:"white"},u.createElement("use",{xlinkHref:"#path-1"})),u.createElement("use",{fill:"#E84142",xlinkHref:"#path-1"}),u.createElement("g",{mask:"url(#mask-2)",fill:"#FFFFFF",fillRule:"nonzero"},u.createElement("g",{transform:"translate(5.000000, 5.000000)"},u.createElement("path",{d:"M3.51363108,13 L1.15960067,13 C0.664946832,13 0.420612287,13 0.271614013,12.9001615 C0.110719232,12.7911601 0.0123723422,12.6101909 0.000457589205,12.410743 C-0.00848303711,12.226815 0.113693358,12.0023407 0.358027903,11.5534302 L6.1704203,0.83471072 C6.41774722,0.379558003 6.54289774,0.1519721 6.70083664,0.0678061674 C6.87067205,-0.0226020558 7.07329583,-0.0226020558 7.24314949,0.0678061674 C7.40108839,0.1519721 7.52623891,0.379558003 7.77354758,0.83471072 L8.96845316,3.01699266 C9.23960959,3.51267254 9.37667486,3.76207783 9.43628512,4.0239486 C9.50182538,4.30763877 9.50182538,4.60692511 9.43628512,4.89061527 C9.37667486,5.15248605 9.24258371,5.40189134 8.97142729,5.89757122 L5.91831288,11.5440764 C5.64418233,12.0459985 5.50711706,12.2985154 5.31640802,12.4885903 C5.11079187,12.6943759 4.86348319,12.8440382 4.59230852,12.9282232 C4.34499985,13 4.06787693,13 3.51363108,13 Z"}),u.createElement("path",{d:"M12.8314423,13 L9.45829001,13 C8.96066205,13 8.710361,13 8.5643551,12.9003524 C8.40344207,12.7911601 8.30511343,12.6071366 8.29319868,12.4077078 C8.28425805,12.2237606 8.40940857,11.9993054 8.65970962,11.5472643 L10.3432113,8.52326579 C10.5906295,8.07746696 10.7157982,7.85612335 10.8707083,7.77193833 C11.0405802,7.6815301 11.2401933,7.6815301 11.4100652,7.77193833 C11.5680771,7.85612335 11.690144,8.07746696 11.9404816,8.52015419 L13.6300775,11.5441527 C13.8802326,11.9961938 14.0085032,12.220649 13.9995625,12.4045771 C13.9906219,12.6040822 13.8891732,12.7881057 13.7284244,12.8971072 C13.5793531,13 13.3290156,13 12.8314423,13 Z"})))))))},name:"Avalanche"}],[ll.AURORA,{chainId:ll.AURORA,logo:function(e){return u.createElement("svg",Zg({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Vg||(Vg=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"aurora-avatar-grn",fillRule:"nonzero"},u.createElement("path",{d:"M12,0 L12,0 C18.625,0 24,5.375 24,12 L24,12 C24,18.625 18.625,24 12,24 L12,24 C5.375,24 0,18.625 0,12 L0,12 C0,5.375 5.375,0 12,0 Z",id:"\\u8DEF\\u5F84",fill:"#70D44B"}),u.createElement("path",{d:"M12,4.9 C12.6333333,4.9 13.2083333,5.25833333 13.4916667,5.825 L18.175,15.2 C18.5833333,16.025 18.25,17.025 17.425,17.4333333 C17.1916667,17.55 16.9416667,17.6083333 16.6833333,17.6083333 L7.31666667,17.6083333 C6.4,17.6083333 5.65,16.8583333 5.65,15.9416667 C5.65,15.6833333 5.70833333,15.425 5.825,15.2 L10.5083333,5.825 C10.7916667,5.25 11.3666667,4.89166667 12,4.9 M12,3.75 C10.9333333,3.75 9.95833333,4.35 9.48333333,5.30833333 L4.8,14.6833333 C4.10833333,16.075 4.66666667,17.7583333 6.05833333,18.4583333 C6.45,18.65 6.88333333,18.7583333 7.31666667,18.7583333 L16.6916667,18.7583333 C18.2416667,18.7583333 19.5083333,17.5 19.5083333,15.95 C19.5083333,15.5166667 19.4083333,15.0833333 19.2083333,14.6916667 L14.5166667,5.30833333 C14.0416667,4.35 13.0666667,3.75 12,3.75 Z",id:"\\u5F62\\u72B6",fill:"#FFFFFF"})))))},name:"Aurora"}],[ll.OKCHAIN,{chainId:ll.OKCHAIN,logo:function(e){return u.createElement("svg",Yg({width:72,height:72,viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Hg||(Hg=u.createElement("circle",{cx:36,cy:36,r:36,fill:"black"})),zg||(zg=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.2 18H18.8C18.3582 18 18 18.3582 18 18.8V29.2C18 29.6418 18.3582 30 18.8 30H29.2C29.6418 30 30 29.6418 30 29.2V18.8C30 18.3582 29.6418 18 29.2 18ZM41.2052 30H30.8052C30.3633 30 30.0051 30.3582 30.0051 30.8V41.2C30.0051 41.6418 30.3633 41.9999 30.8052 41.9999H41.2052C41.647 41.9999 42.0051 41.6418 42.0051 41.2V30.8C42.0051 30.3582 41.647 30 41.2052 30ZM42.8 18H53.2C53.6418 18 54 18.3582 54 18.8V29.2C54 29.6418 53.6418 30 53.2 30H42.8C42.3582 30 42 29.6418 42 29.2V18.8C42 18.3582 42.3582 18 42.8 18ZM29.2 42H18.8C18.3582 42 18 42.3582 18 42.8V53.2C18 53.6418 18.3582 54 18.8 54H29.2C29.6418 54 30 53.6418 30 53.2V42.8C30 42.3582 29.6418 42 29.2 42ZM42.8 42H53.2C53.6418 42 54 42.3582 54 42.8V53.2C54 53.6418 53.6418 54 53.2 54H42.8C42.3582 54 42 53.6418 42 53.2V42.8C42 42.3582 42.3582 42 42.8 42Z",fill:"white"})))},name:"OKTC"}],[ll.CONFLUX,{chainId:ll.CONFLUX,logo:function(e){return u.createElement("svg",Xg({width:"199px",height:"245px",viewBox:"0 0 199 245",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Gg||(Gg=u.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Conflux_Logo_Mark_Color",transform:"translate(0.000000, -0.000000)",fillRule:"nonzero"},u.createElement("polygon",{id:"Path",fill:"#1A1A1A",points:"151.057838 145.949662 98.7961863 198.210803 69.7103803 169.125338 121.972032 116.863685 98.7291726 93.6209957 22.9712333 169.376384 98.5203077 244.923077 174.276376 169.167689"}),u.createElement("polygon",{id:"Path",fill:"#38A1DB",points:"197.693744 98.7101231 98.9858316 9.56888949e-05 0 98.9860017 0.31563441 145.252991 98.5658906 47.0051607 197.528761 145.971262"})))))},name:"Conflux eSpace"}],[ll.BASE,{chainId:ll.BASE,logo:function(e){return u.createElement("svg",Qg({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Jg||(Jg=u.createElement("path",{d:"M16 32C19.1645 32 22.2579 31.0616 24.8891 29.3035C27.5203 27.5454 29.5711 25.0466 30.7821 22.1229C31.9931 19.1993 32.3099 15.9823 31.6926 12.8786C31.0752 9.77486 29.5513 6.92394 27.3137 4.6863C25.0761 2.44866 22.2251 0.924806 19.1214 0.307443C16.0177 -0.309921 12.8007 0.00693265 9.87706 1.21793C6.95345 2.42894 4.45459 4.4797 2.69649 7.11088C0.938384 9.74207 0 12.8355 0 16C0 20.2435 1.68571 24.3131 4.68629 27.3137C7.68687 30.3143 11.7565 32 16 32Z",fill:"#0052FF"})),qg||(qg=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9624 27.2676C22.1853 27.2676 27.23 22.223 27.23 16C27.23 9.7771 22.1853 4.73242 15.9624 4.73242C10.0588 4.73242 5.21562 9.27262 4.73409 15.0518H21.4544V16.9281H4.73242C5.20435 22.7169 10.0519 27.2676 15.9624 27.2676Z",fill:"white"})))},name:"Base"}],[ll.LINEA,{chainId:ll.LINEA,logo:function(e){return u.createElement("svg",ty({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Kg||(Kg=u.createElement("path",{d:"M0 12C0 18.6274 5.37258 24 12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12Z",fill:"#121212"})),$g||($g=u.createElement("path",{d:"M15.5387 17.9973H6V7.94678H8.18247V16.0495H15.5387V17.9963V17.9973Z",fill:"white"})),ey||(ey=u.createElement("path",{d:"M15.5386 9.89355C16.6137 9.89355 17.4853 9.02195 17.4853 7.94678C17.4853 6.8716 16.6137 6 15.5386 6C14.4633 6 13.5918 6.8716 13.5918 7.94678C13.5918 9.02195 14.4633 9.89355 15.5386 9.89355Z",fill:"white"})))},name:"Linea"}],[ll.SCROLL,{chainId:ll.SCROLL,logo:dy,name:"Scroll"}],[ll.MANTA,{chainId:ll.MANTA,logo:fy,name:"Manta"}],[ll.MANTLE,{chainId:ll.MANTLE,logo:function(e){return u.createElement("svg",my({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),py||(py=u.createElement("g",{clipPath:"url(#a)"},u.createElement("path",{d:"M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12z",fill:"#000"}),u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.958 5.9.477-3.071A9.405 9.405 0 0 0 12 2.719h-.008v6.265H12c.264 0 .525.034.777.1l.81-3.052a6.247 6.247 0 0 0-.629-.132zM10.49 9.388 8.93 6.702a6.22 6.22 0 0 0-.535.348L6.533 4.499a9.34 9.34 0 0 1 1.24-.764L9.19 6.501c.287-.146.586-.27.892-.371l-.964-2.955a9.27 9.27 0 0 1 1.417-.341l.496 3.119c-.21.033-.418.08-.624.134l.807 3c-.253.067-.497.17-.724.301zM3.724 7.794 6.54 9.227a6.12 6.12 0 0 0-.366.887l-3.006-.972c.15-.461.337-.915.557-1.348zm13.572 1.133-2.685 1.56c.132.228.233.472.301.725l3-.808c.055.206.1.414.134.623l3.119-.496a9.215 9.215 0 0 0-.342-1.417l-2.954.965a6.14 6.14 0 0 0-.372-.892l2.765-1.42a9.269 9.269 0 0 0-.764-1.238l-2.55 1.863c.125.171.24.35.347.535zM16.2 3.722zm-1.348-.556c.462.149.915.335 1.348.556l-1.43 2.815a6.087 6.087 0 0 0-.888-.366l.97-3.006zm.227 3.481-1.577 2.737c.229.132.439.293.627.48l4.422-4.438a9.305 9.305 0 0 0-1.107-.944L15.62 6.997a6.054 6.054 0 0 0-.54-.35zm-5.694 3.849L6.65 8.917c.107-.185.224-.365.35-.54L4.485 6.554c.284-.392.602-.765.944-1.107L9.865 9.87a3.04 3.04 0 0 0-.48.626zm-3.352-.087 3.052.813c-.067.252-.101.513-.101.778H2.719a9.4 9.4 0 0 1 .111-1.44l3.071.479c.033-.212.077-.422.132-.63zm11.428 4.364 2.815 1.433a9.23 9.23 0 0 0 .557-1.348l-3.006-.972a6.135 6.135 0 0 1-.366.887zm-3.95-.161 1.559 2.686c.184-.107.363-.222.535-.347l1.862 2.55a9.334 9.334 0 0 1-1.24.764L14.81 17.5a6.215 6.215 0 0 1-.893.37l.965 2.955c-.461.15-.938.266-1.418.342l-.495-3.12c.21-.033.418-.08.624-.134l-.807-3a3.01 3.01 0 0 0 .724-.301zm-6.807.46 2.685-1.56a2.982 2.982 0 0 1-.301-.724l-3 .808a6.182 6.182 0 0 1-.134-.623l-3.12.496c.077.48.192.957.343 1.418l2.954-.966c.1.306.224.605.371.892l-2.765 1.42c.221.43.478.846.764 1.238l2.55-1.863a6.076 6.076 0 0 1-.347-.535zM7.8 20.279zm0 0c.434.22.887.407 1.349.556l.97-3.005a6.087 6.087 0 0 1-.888-.366L7.8 20.278zm1.121-2.925h.001zm0 0 1.578-2.737a3.036 3.036 0 0 1-.627-.48L5.45 18.575c.343.342.716.66 1.108.944l1.824-2.515c.174.126.354.242.54.35zm5.695-3.849 2.737 1.579a6.248 6.248 0 0 1-.351.54l2.514 1.825a9.353 9.353 0 0 1-.944 1.107l-4.436-4.425c.187-.187.349-.398.48-.626zm-3.392 1.412zm0 0-.81 3.052c.207.055.417.099.628.132l-.476 3.071c.471.073.954.11 1.434.11h.008v-6.265h-.008a3.03 3.03 0 0 1-.776-.1zm3.692-2.138c.067-.251.101-.513.101-.777h6.265c0 .482-.037.966-.111 1.44l-3.07-.48a6.072 6.072 0 0 1-.132.63l-3.053-.813z",fill:"#fff"}))),hy||(hy=u.createElement("defs",null,u.createElement("clipPath",{id:"a"},u.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))))},name:"Mantle"}],[ll.TON,{chainId:ll.TON,logo:function(e){return u.createElement("svg",vy({xmlns:"http://www.w3.org/2000/svg",width:56,height:56,viewBox:"0 0 56 56",fill:"none"},e),gy||(gy=u.createElement("path",{d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"#0098EA"})),yy||(yy=u.createElement("path",{d:"M37.5603 15.6277H18.4386C14.9228 15.6277 12.6944 19.4202 14.4632 22.4861L26.2644 42.9409C27.0345 44.2765 28.9644 44.2765 29.7345 42.9409L41.5381 22.4861C43.3045 19.4251 41.0761 15.6277 37.5627 15.6277H37.5603ZM26.2548 36.8068L23.6847 31.8327L17.4833 20.7414C17.0742 20.0315 17.5795 19.1218 18.4362 19.1218H26.2524V36.8092L26.2548 36.8068ZM38.5108 20.739L32.3118 31.8351L29.7417 36.8068V19.1194H37.5579C38.4146 19.1194 38.9199 20.0291 38.5108 20.739Z",fill:"white"})),by||(by=u.createElement("script",{xmlns:""})))},name:"Ton"}]]);function wy({width:e=24,height:t=24,marginRight:r=8,url:n,zIndex:o,cross:i,address:s,token:a,sx:l,chainId:c}){var d;const[u,p]=m(!1),[h,f]=m(""),[g,b]=m(""),[x,E]=m(!1),A=y((()=>p(!0)),[]);let C=function(e){const t=q(Hf),{chainId:r}=Bf();return w((()=>{if(!e)return;let n=t.find((({address:t,chainId:n})=>n===r&&t===e));return n||(n=t.find((({address:t})=>t===e))),n}),[e,t,r])}(s);a&&(C=a);const k=s||(null==C?void 0:C.address),T=null==C?void 0:C.symbol,R=null==T?void 0:T.charAt(0).toUpperCase(),S=w((()=>{const e=null==C?void 0:C.logoURI;return n||e||""}),[n,C]);return v((()=>{E(!1)}),[k,S]),v((()=>{i&&(S?function(e,t){const r=new XMLHttpRequest;let n;r.onload=function(){const e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(r.response)},r.onerror=function(){t()};try{n=new URL(e)}catch(e){}finally{r.open("GET",n||e),r.responseType="blob",r.send()}}(S,(e=>{f(e)})):f(""))}),[S,i]),v((()=>{try{let t=k;if(t&&t.length<15&&(t=t.padEnd(15,"0")),t){const r=new $(t,{size:e,format:"svg",margin:.2,background:[255,234,4,255]}).toString();b(`data:image/svg+xml;base64,${r}`)}}catch(e){console.error("generate Identicon error: ",e)}}),[k,e]),nt.exports.jsxs(Nn,{sx:Object.assign({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",minWidth:e,width:e,height:t,marginRight:r,zIndex:o,border:"solid 1px",borderColor:"border.main",borderRadius:"50%"},l||{}),style:{width:e,height:t},children:[!u&&nt.exports.jsx(Nn,{sx:{typography:"ht",height:"100%",width:"100%",borderRadius:"50%",border:"transparent 2px solid",borderColor:"text.primary",color:"text.primary",display:"flex",alignItems:"center",justifyContent:"center"},children:R}),nt.exports.jsx(Nn,{component:"img",src:!(i?h:S)||x?g:i?h:S,onLoad:A,onError:e=>{const t=e.target;k&&g&&E(!0),t.onerror=null},sx:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",borderRadius:"50%",overflow:"hidden",width:"100%",height:"100%"}}),c&&xy.has(c)?nt.exports.jsx(Nn,{sx:{position:"absolute",right:0,bottom:-1,width:12,height:12,transform:"translateX(50%)",border:"solid 1px",borderColor:"border.main",borderRadius:"50%"},children:nt.exports.jsx(Nn,{component:null===(d=xy.get(c))||void 0===d?void 0:d.logo,sx:{display:"block",width:"100%",height:"100%"}})}):""]})}function Ey({token:t,onClick:r,showChainLogo:n}){var o,i;const s=Tn();return nt.exports.jsxs(Nn,{component:Ao,sx:{display:"flex",alignItems:"center",color:s.palette.text.primary,typography:"h5",fontWeight:600,"&:focus-visible":{opacity:.5}},onClick:e=>{r&&r(e)},"data-testid":"swap-select-token-btn",children:[(null==t?void 0:t.address)?nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(wy,{url:null==t?void 0:t.logoURI,address:null!==(o=null==t?void 0:t.address)&&void 0!==o?o:"",marginRight:6,chainId:n?null==t?void 0:t.chainId:void 0}),nt.exports.jsx(Nn,{children:null!==(i=null==t?void 0:t.symbol)&&void 0!==i?i:"-"})]}):nt.exports.jsx(e,{id:"sIPJGT",message:"SELECT TOKEN"}),nt.exports.jsx(Nn,{sx:{ml:7,width:12,transform:"rotateX(180deg)"},component:I})]})}function Ay({onClick:t,balance:r,decimals:n,address:o,showMaxBtn:i}){const{palette:s}=Tn();return nt.exports.jsxs(Nn,{sx:{display:"flex",typography:"body2",color:s.text.secondary},children:[nt.exports.jsx(e,{id:"0QDjxt",message:"Balance:"})," ",o?ha({input:r,decimals:Math.min(n||4,4)}):"-",i&&r&&r.gt(0)&&nt.exports.jsx(Nn,{component:Ao,sx:{ml:6,color:(null==r?void 0:r.gt(0))?s.primary.main:s.text.disabled,cursor:o&&t?"pointer":"unset"},onClick:()=>t&&t(r?r.toString():""),children:nt.exports.jsx(e,{id:"CK1KXz",message:"Max"})})]})}function Cy({readOnly:e,sx:t,value:r,decimals:n,onChange:o,suffix:i,withClear:s,onFocus:a,placeholder:l}){const c=Tn(),d=w((()=>i||(s&&r&&o?nt.exports.jsx(Nn,{component:Ao,sx:{ml:5,width:18,height:18,borderRadius:"50%",backgroundColor:"border.main",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0,color:"text.secondary","&:focus-visible":{border:"solid 1px",borderColor:"text.primary"}},onClick:()=>{o&&o("")},children:nt.exports.jsx(Nn,{component:O,sx:{width:12}})}):void 0)),[o,i,c.palette.text.primary,r,s]);return nt.exports.jsxs(Nn,{sx:Object.assign({mt:12,display:"flex",justifyContent:"space-between",alignItems:"center"},t),"data-testid":"number-input-wrapper",children:[nt.exports.jsx(jo,{fullWidth:!0,value:r,readOnly:e,placeholder:l||"0.00",onFocus:a,onChange:e=>{const t=e.target.value,r=0===t.length?"":ga(t,n);o&&o(r)},sx:{width:"inherit",border:"none","& .MuiInput-input":{fontSize:24,border:"none",outline:"none",padding:0,color:"text.primary","&::placeholder":{fontSize:24,color:"text.disabled"}}}}),!e&&r&&d]})}function ky({open:e,onClose:t,afterClose:r,title:n,rightSlot:o,canBack:i=!0,children:s,height:a,testId:l}){return nt.exports.jsxs(Nn,{sx:{position:"absolute",top:e?0:"100%",transition:"all 300ms",zIndex:1,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",borderRadius:16,height:a},"data-testid":l,"data-active":e?"1":"0",children:[n?nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:20},children:[nt.exports.jsx(Nn,{sx:{display:"flex",alignItems:"center",typography:"caption"},children:n}),o,!o&&i&&nt.exports.jsx(Nn,{component:O,sx:{color:"text.secondary",cursor:"pointer"},onClick:()=>{t&&t(),setTimeout((()=>r&&r()),300)}})]}):"",e?s:""]})}function Ty({token:e,disabled:t,style:r,onClick:n}){const o=Tn(),i=Qf(),{account:s}=te(),a=i(e),l=a?pa({input:a}):"";return nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2",px:6,py:5,borderRadius:8,cursor:t?"auto":"pointer",opacity:t?.5:1,"&:hover":{backgroundColor:"hover.default"}},style:r,onClick:()=>{t||n()},"data-testid":"token-picker-item",children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(wy,{token:e}),nt.exports.jsxs(Nn,{children:[nt.exports.jsx(Nn,{sx:{fontWeight:600,textAlign:"left"},children:e.symbol}),s&&nt.exports.jsx(Nn,{sx:{mt:4,textAlign:"left"},children:(null==a?void 0:a.gte(0))?l:nt.exports.jsx(Nn,{component:R,width:18,sx:{"& path":{fill:o.palette.text.disabled},animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}}})})]})]}),nt.exports.jsx(Nn,{sx:{color:"text.secondary",textAlign:"right"},children:e.name})]})}function Ry({chain:t,active:r,onClick:n}){return nt.exports.jsx(hs,{title:t.name,placement:"top",onlyHover:!0,children:nt.exports.jsxs(Nn,{sx:Object.assign({display:"flex",alignItems:"center",p:8,borderRadius:8,cursor:"pointer"},r?{backgroundColor:"secondary.main",color:"secondary.contrastText"}:{border:"1px solid",borderColor:"border.main","&:hover":{backgroundColor:"hover.default"}}),onClick:n,children:[nt.exports.jsx(Nn,{component:t.logo,sx:{width:24,height:24}}),r?nt.exports.jsxs(Nn,{sx:{ml:8},children:[nt.exports.jsx(e,{id:"Fdp03t",message:"on"}),` ${t.name}`]}):""]})},t.chainId)}function Sy({value:e,onChange:t,occupiedAddrs:r,occupiedChainId:o,hiddenAddrs:i,showAddrs:s,visible:a,side:l,defaultLoadBalance:c}){const{chainList:d,selectChainId:u,setSelectChainId:p}=function(e){const{chainId:t}=Bf(),r=q(zf),n=q(Kf).crossChain,o=w((()=>{const t=new Set;return r.forEach((r=>{r.side&&e&&r.side!==e||t.add(r.chainId)})),t}),[r,e]),i=w((()=>{if(!n)return[];const e=new Map;let r;return xy.forEach(((n,i)=>{if(o.has(n.chainId)){if(n.mainnet){if(t!==n.chainId)return;r=n.mainnet}e.set(i,Object.assign({},n))}})),void 0!==r&&e.delete(r),Array.from(e.values())}),[t,r,n]),s=w((()=>!i.length||t&&o.has(t)?t:i[0].chainId),[t,o]),[a,l]=m(s);v((()=>{void 0===a&&l(s)}),[s]);const c=w((()=>null!=a?a:s),[a,s]);return{chainList:i,selectChainId:c,setSelectChainId:l}}(l),{showTokenList:h,filter:f,setFilter:b,onSelectToken:x,popularTokenList:E}=bg({value:e,onChange:t,occupiedAddrs:r,occupiedChainId:o,hiddenAddrs:i,showAddrs:s,side:l,chainId:u,visible:a,defaultLoadBalance:c}),A=g(null),[C,k]=m(0);v((()=>{a&&(null==e?void 0:e.chainId)&&(null==e?void 0:e.chainId)!==u&&p(e.chainId)}),[e,a]),v((()=>{a&&A.current&&k(A.current.offsetHeight-16)}),[A,a,u]);const T=y((({index:t,style:r})=>{const n=h[t];return n?nt.exports.jsx(Ty,{token:n,disabled:!!e&&e.address===n.address&&e.chainId===n.chainId,style:r,onClick:()=>x(n)},n.address+n.chainId):null}),[h,E,e]);return nt.exports.jsxs(Nn,{sx:{display:"flex",flexDirection:"column",px:20,flex:1,overflow:"hidden"},children:[nt.exports.jsx(_o,{fullWidth:!0,height:48,value:f,onChange:e=>b(e.target.value),clearValue:()=>b(""),placeholder:n._({id:"72/M0o",message:"Enter the token symbol or address"}),sx:{mb:16}}),d.length?nt.exports.jsx(Nn,{sx:{position:"relative",display:"flex",gap:8,flexWrap:"wrap",pb:32,"&::after":{content:'""',position:"absolute",bottom:16,left:0,right:0,height:"1px",backgroundColor:"border.main"}},children:d.map((e=>nt.exports.jsx(Ry,{chain:e,active:e.chainId===u,onClick:()=>{p(e.chainId)}},e.chainId)))}):"",nt.exports.jsx(Nn,{sx:{pb:16,flex:1,minHeight:64},ref:A,children:nt.exports.jsx(Te,{height:C,itemCount:h.length,itemSize:52,width:"100%",className:"token-list",children:T})})]})}function Ny({open:t,value:r,onClose:n,occupiedAddrs:o,occupiedChainId:i,onTokenChange:s,side:a,defaultLoadBalance:l}){const{height:c}=q(Kf);return nt.exports.jsx(ky,{height:c,open:t,onClose:n,title:nt.exports.jsx(e,{id:"T0Y2+3",message:"Select a token"}),testId:"token-picker-wrapper",children:nt.exports.jsx(Sy,{value:r,visible:t,onChange:s,occupiedAddrs:o,occupiedChainId:i,side:a,defaultLoadBalance:l})})}function My(e,t){localStorage.setItem("from"===e?"DODO_WIDGET_LAST_FROM_TOKEN":"DODO_WIDGET_LAST_TO_TOKEN",t?JSON.stringify(t):"")}function Oy(e){const{provider:t}=Bf(),r=w((()=>{var r;if(e&&(null===(r=null==t?void 0:t.provider)||void 0===r?void 0:r.isMetaMask))return()=>function({chainId:e,provider:t}){var r,n,o;return bl(this,void 0,void 0,(function*(){if(!t)return!1;const i=`0x${e.toString(16)}`;try{return yield t.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]}),!0}catch(s){const{code:a}=s,l=ul[e];if(!l)throw new Error(`Chain ${e} does not exist`);const c={chainId:i,chainName:null===(r=xy.get(e))||void 0===r?void 0:r.name,rpcUrls:[...cl[e],...null!==(o=null===(n=jf.getState().globals.jsonRpcUrlMap)||void 0===n?void 0:n[e])&&void 0!==o?o:[]],nativeCurrency:{name:l.name,symbol:l.symbol,decimals:l.decimals},blockExplorerUrls:[`https://${hl[e]}/`]};if(4902===a||-32603===a)try{return yield t.request({method:"wallet_addEthereumChain",params:[c]}),!0}catch(t){console.error(`[failed to add ${e}]: `,c,t)}console.error(`[failed to switch ${e}]: `,c,s)}return!1}))}({chainId:e,provider:null==t?void 0:t.provider})}),[e]);return r}function Iy({locale:e,children:r}){return v((()=>{(()=>{bl(this,void 0,void 0,(function*(){yield function(e="en-US"){return bl(this,void 0,void 0,(function*(){try{const t=yield import(`./locales/${e}.js`);n.load(e,t.messages||t.default.messages)}catch(e){}n.activate(e)}))}(e)}))})()}),[e]),nt.exports.jsx(t,{i18n:n,children:r})}var Fy,jy,Ly,_y;!function(e){e[e.Running=0]="Running",e[e.Success=1]="Success",e[e.Failed=2]="Failed",e[e.Warning=3]="Warning"}(Fy||(Fy={})),function(e){e.Canceled="canceled",e.Failed="failed",e.Success="success",e.Submitted="submitted"}(jy||(jy={})),function(e){e[e.Failed=0]="Failed",e[e.Success=1]="Success"}(Ly||(Ly={})),function(e){e[e.Failed=0]="Failed",e[e.Success=1]="Success",e[e.Warning=2]="Warning"}(_y||(_y={}));const Wy=(e,t)=>bl(void 0,void 0,void 0,(function*(){const{value:r,from:n,to:o,data:i}=e,s={from:n,to:o,value:r,data:i};r&&!/^0x0*$/.test(r)||delete s.value;try{return(yield t.estimateGas(s)).add(5e4)}catch(e){console.error(e);try{if(yield t.call(s),"test"!==process.env.NODE_ENV)throw new Error("Unexpected issue with estimating the gas. Please try again.")}catch(e){if("test"!==process.env.NODE_ENV)throw e}}return null})),Py=(e,t)=>bl(void 0,void 0,void 0,(function*(){try{return yield t.getSigner().sendTransaction(e)}catch(e){throw 4001===(null==e?void 0:e.code)?new Error(n._({id:"em6LzM",message:"Transaction rejected."})):e}}));function Dy(e,t){var r;const o=null===(r=ul[e])||void 0===r?void 0:r.symbol,i=[{error:"insufficient",msg:n._({id:"CkfzUf",message:"Insufficient funds - Please retry after depositing more {EtherTokenSymbol} into your wallet",values:{EtherTokenSymbol:o}})},{error:["External Swap execution Failed","Return amount is not enough"],msg:n._({id:"AghcDJ",message:"Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance."})},{error:"SafeERC20: low-level call failed",msg:n._({id:"tMVAXL",message:"SafeERC20: low-level call failed. Please contact the DODO team."})},{error:["User denied","cancel","User rejected","user rejected"],msg:n._({id:"xEbi+8",message:"User denied transaction signature."})},{error:["Cannot set properties of undefined (setting 'loadingDefauIts'){\"originalError\":{",'[ethjs-query]while formatting outputs from RPC\'["value":["code":-32000,"message":"header not found"))'],msg:n._({id:"h4RLFN",message:"RPC node data exception"})},{error:['execution reverted:FORCESTOP ["originalError"'],msg:n._({id:"yM82Jw",message:"ForceStop exception"})},{error:["replacement transaction underpriced","Gasprice too low","transaction underprice"],msg:n._({id:"gz+9Rb",message:"Gas price is too low, please adjust in your wallet and try again"})},{error:["MINT_INVALID"],msg:n._({id:"Xpkm7d",message:"No ForceStop access"})},{error:["NOT_PHASE_EXE"],msg:n._({id:"qK7wuW",message:"Unable to SETTLE during the cooling-off period"})},{error:["params specify an EIP-1559transaction but the currentnetwork does not support"],msg:n._({id:"TizaRy",message:"Wallet incompatibility"})},{error:["ALREADY_SETTLED"],msg:n._({id:"C1mcuF",message:"This CP has been settled by other addrs"})},{error:["create RFQ order failed]:LESS_THAN_FEE_LIMIT"],msg:n._({id:"g3x+cF",message:"Service update, please wait and try again"})}];let s="";return i.some((e=>Array.isArray(e.error)?e.error.some((r=>t.indexOf(r)>-1&&(s=e.msg,!0))):t.indexOf(e.error)>-1&&(s=e.msg,!0))),s||t}var By,Uy;!function(e){e.Approval="APPROVAL",e.TX="TX",e.TypedSign="TypedSign"}(By||(By={})),function(e){e.Normal="Normal",e.Privacy="Privacy",e.LimitOrder="LimitOrder",e.RFQ="RFQ"}(Uy||(Uy={}));const Vy=e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_GLOBAL_PROPS",payload:e})})),Zy=e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_AUTO_CONNECT_LOADING",payload:e})})),Hy=e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_AUTO_SLIPPAGE",payload:e})}));function zy({onTxFail:e,onTxSubmit:t,onTxSuccess:r}={}){const{account:n,provider:i}=Bf(),s=Uf(),[a,l]=m(!1),[c,d]=m(new Map),u=Q(),[p,h]=m(null),[f,g]=m(""),[b,v]=m(null),[x,E]=m(!1),[A,C]=m(),{updateBlockNumber:k}=fg(),T=y(((a,c,p,f=!1,m,y,b,x)=>bl(this,void 0,void 0,(function*(){if(g(""),h(""),!n||!i)throw new Error("Submission: Cannot execute step when the wallet is disconnected");let w,A,T;C((()=>b)),l(!1);try{if(l(!0),c.opcode===By.Approval)T=yield((e,t,r,n,i,s)=>bl(void 0,void 0,void 0,(function*(){const a=sg(e,gg,i,s).interface.encodeFunctionData("approve",[r,n.toFixed()]),l={from:t,to:e,data:a,value:`0x${new o("0").toString(16)}`,gasLimit:void 0},c=yield Wy(l,i);return c&&(l.gasLimit=c),yield Py(l,i)})))(c.token.address,n,c.contract,c.amt||cg,i,n),w=T.hash,g(w);else{if(c.opcode!==By.TX)throw new Error(`Op ${c.opcode} not implemented!`);if(""===c.to)throw new Error("Submission: malformed to");if(0===c.data.length)throw new Error("Submission: malformed data");if(0===c.data.indexOf("0x")&&c.data.length<=2)throw new Error("Submission: malformed data");if(A={value:c.value,data:c.data,to:c.to,gasLimit:c.gasLimit,from:n,chainId:s},!A.gasLimit)try{const e=yield Wy(A,i);e&&(A.gasLimit=e)}catch(e){console.debug(e)}if(T=yield Py(A,i),w=T.hash,g(w),!w)throw new Error(`Unexpected tx: ${w}`)}}catch(t){if(l(!1),v({spec:c,brief:a,subtitle:p}),console.error(t),t.message){u(Vy({contractStatus:Mf.Failed}));const r={error:t.message,brief:a};y&&Object.assign(r,y),e&&e(t,y),h(Dy(s,t.message))}return jy.Failed}v({spec:c,brief:a,subtitle:p}),E(!1),l(!1);const R=Object.assign(Object.assign(Object.assign(Object.assign({brief:a},c),A),{tx:w,subtitle:p}),y);u(Vy({contractStatus:Mf.Pending})),t&&t(w,R),m&&m();const S={brief:a,spec:c,tx:w,subtitle:p};if(d((e=>e.set(w,[S,Fy.Running]))),f)return jy.Submitted;if(m&&m(),null==T?void 0:T.wait){const e=yield T.wait(1);if(E(!0),e.status===Ly.Success)return"TX"===R.opcode&&u(Vy({contractStatus:Mf.TxSuccess})),"APPROVAL"===R.opcode&&u(Vy({contractStatus:Mf.ApproveSuccess})),x&&x(w,r),r&&r(w,R),yield k(),d((e=>e.set(w,[S,Fy.Success]))),jy.Success}return yield k(),E(!0),d((e=>e.set(w,[S,Fy.Failed]))),jy.Failed}))),[n,s,l,i,k]),R=y((({brief:n,subtitle:o,early:i,mixpanelProps:a,submittedBack:c,submittedConfirmBack:d,successBack:p,handler:f})=>bl(this,void 0,void 0,(function*(){C((()=>d)),g(""),h(""),l(!1);const m=Object.assign({brief:n,subtitle:o},a);return new Promise((d=>bl(this,void 0,void 0,(function*(){const y={opcode:By.TX,value:"",to:"",data:""},b=(e,r)=>{g(e),v({spec:y,brief:n,subtitle:o}),E(!1),l(!1),u(Vy({contractStatus:Mf.Pending})),t&&t(e,Object.assign(Object.assign({tx:e},m),r)),c&&c(),i&&d(jy.Submitted)},x=(e,t)=>bl(this,void 0,void 0,(function*(){g(e),u(Vy({contractStatus:Mf.TxSuccess})),p&&p(e,r),r&&r(e,Object.assign(Object.assign({tx:e},m),t)),yield k(),E(!0)})),w=t=>{if(l(!1),v({spec:y,brief:n,subtitle:o}),console.error(t),t.message){u(Vy({contractStatus:Mf.Failed}));const r={error:t.message,brief:n};a&&Object.assign(r,a),e&&e(t,a),h(Dy(s,t.message))}d(jy.Failed)};try{l(!0),yield f({onSubmit:b,onSuccess:x,onError:w})}catch(e){return void w(e)}}))))}))),[s,l,k]),S=w((()=>({execute:T,executeCustom:R,requests:c,setShowing:v,waitingSubmit:a})),[T,R,c,v]),N=y((()=>{v(null),A&&(A(),C(void 0))}),[A]);return{showing:b,showingDone:x,transactionTx:f,errorMessage:p,setErrorMessage:h,closeShowing:N,ctxVal:S,requests:c}}function Yy(){const{requests:e}=Xy(),t=[];return null==e||e.forEach((function([e,r]){r===Fy.Running&&t.push(e)})),{runningRequests:t,isInflight:t.length>0}}const Gy=A({execute:()=>Promise.resolve(jy.Canceled),executeCustom:()=>Promise.resolve(jy.Canceled),requests:void 0,waitingSubmit:!1});function Xy(){return C(Gy)}var Jy;function qy(){return qy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qy.apply(this,arguments)}var Qy=function(e){return u.createElement("svg",qy({width:"33px",height:"33px",viewBox:"0 0 33 33",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Jy||(Jy=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},u.createElement("g",{transform:"translate(-186.000000, -375.000000)",stroke:"currentColor",strokeWidth:4},u.createElement("g",{transform:"translate(18.000000, 291.000000)"},u.createElement("g",{transform:"translate(40.000000, 83.000000)"},u.createElement("path",{d:"M159,32 C159,15.9837423 146.016258,3 130,3"})))))))};function Ky({showingDone:e,errorMessage:t}){return t?nt.exports.jsx(Nn,{component:F,sx:{width:64,height:64,color:"error.main"}}):e?nt.exports.jsx(Nn,{component:j,sx:{width:64,height:64,color:"success.main"}}):nt.exports.jsx(Nn,{sx:{mx:"auto",border:e=>{var t;return`6px solid ${null===(t=e.palette)||void 0===t?void 0:t.background.input}`},borderRadius:"50%",width:"64px",height:"64px",position:"relative",animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}},children:nt.exports.jsx(Nn,{component:Qy,sx:{position:"absolute",top:"-6px",right:"-6px",color:"primary.main"}})})}function $y({showingDone:e,showing:t}){return nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[nt.exports.jsx(Nn,{sx:{mt:60},children:e?n._({id:"4xbbt/",message:"{0} confirmed",values:{0:null==t?void 0:t.brief}}):n._({id:"/nzjSF",message:"{0} pending",values:{0:null==t?void 0:t.brief}})}),(null==t?void 0:t.subtitle)?nt.exports.jsx(Nn,{sx:{mt:20,typography:"body2"},children:null==t?void 0:t.subtitle}):""]})}function eb({isStarted:t,isEnded:r,tx:n}){const[o,i]=m(0),{chainId:s}=Bf(),a=w((()=>{const e=hl[s||1];let t="tx";return s===ll.TON&&(t="transaction"),`https://${e}/${t}/${n}`}),[n,s]),l=w((()=>{const e=Math.floor(o/60),t=o%60;return e?`${e}m ${t}s`:`${t}s`}),[o]),c=g();return v((()=>(t&&(i(0),clearInterval(c.current),c.current=setInterval((()=>{i((e=>e+1))}),1e3)),()=>{clearInterval(c.current)})),[t]),v((()=>{clearInterval(c.current)}),[r]),nt.exports.jsxs(Nn,{sx:{mt:20,pt:20,display:"flex",justifyContent:"space-between",alignItems:"center",typography:"body2",color:"text.secondary",border:"solid 1px transparent",borderTopColor:"border.main"},children:[nt.exports.jsxs(Nn,{children:[nt.exports.jsx(e,{id:"+Jkdiu",message:"Transaction Time:"}),l]}),nt.exports.jsxs(Lo,{sx:{display:"flex",alignItems:"center",cursor:"pointer"},component:"a",href:a,target:"_blank",rel:"noopener noreferrer",children:[nt.exports.jsx(e,{id:"S3piC2",message:"Tx"}),nt.exports.jsx(Nn,{component:L,sx:{width:16,height:16,ml:6}})]})]})}function tb(t){var{children:r,executionStatus:n}=t;const o=zy(yl(t,["children","executionStatus"])),{ctxVal:i,showing:s,closeShowing:a,showingDone:l,errorMessage:c,transactionTx:d}=Object.assign(Object.assign({},o),n),u=Q();return nt.exports.jsxs(Gy.Provider,{value:i,children:[r,nt.exports.jsx(ky,{open:!!s,onClose:a,children:nt.exports.jsxs(Nn,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",px:20,pb:20,flex:1,overflowY:"auto"},children:[nt.exports.jsxs(Nn,{children:[nt.exports.jsx(Nn,{sx:{textAlign:"center",pt:60},children:nt.exports.jsx(Ky,{showingDone:l,errorMessage:c})}),c?nt.exports.jsxs(Nn,{sx:{textAlign:"center",mt:60},children:[nt.exports.jsx(Nn,{children:nt.exports.jsx(e,{id:"kf83Ld",message:"Something went wrong."})}),nt.exports.jsx(Nn,{sx:{color:"text.secondary",mt:12,typography:"body2",wordBreak:"break-all"},children:c})]}):nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx($y,{showingDone:l,showing:s}),nt.exports.jsx(eb,{isStarted:!!s,isEnded:l,tx:d})]})]}),nt.exports.jsx(wo,{fullWidth:!0,size:wo.Size.big,onClick:()=>{u(Vy({contractStatus:Mf.Initial})),a()},sx:{mt:20},children:c?nt.exports.jsx(e,{id:"1QfxQT",message:"Dismiss"}):nt.exports.jsx(e,{id:"yz7wBu",message:"Close"})})]})})]})}const rb=e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_SLIPPAGE",payload:e})}));function nb({width:e,height:t,feeRate:r,rebateTo:n,colorMode:o,apikey:i,defaultChainId:s,defaultToToken:a,defaultFromToken:l,jsonRpcUrlMap:c,swapSlippage:d,bridgeSlippage:u,apiServices:p,crossChain:h,noPowerBy:f,tonConnect:m}){const g=Q();v((()=>{o&&g((e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_COLOR_MODE",payload:e})})))(o))}),[o]),v((()=>{var e;s&&g((e=s,t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_CHAIN_ID",payload:e})}))))}),[s]),v((()=>{g(Vy({height:t}))}),[t]),v((()=>{g(Vy({width:e}))}),[e]),v((()=>{i&&g(Vy({apikey:i}))}),[i]),v((()=>{r&&g(Vy({feeRate:r}))}),[r]),v((()=>{n&&g(Vy({rebateTo:n}))}),[n]),v((()=>{d&&g(Vy({swapSlippage:d}))}),[d]),v((()=>{u&&g(Vy({bridgeSlippage:u}))}),[u]),v((()=>{p&&g(Vy({apiServices:p}))}),[p]),v((()=>{l&&g((e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_DEFAULT_FROM_TOKEN",payload:e})})))(l))}),[l]),v((()=>{a&&g((e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_DEFAULT_TO_TOKEN",payload:e})})))(a))}),[a]),v((()=>{c&&g(Vy({jsonRpcUrlMap:c}))}),[c]),v((()=>{void 0!==h&&g(Vy({crossChain:h}))}),[h]),v((()=>{void 0!==f&&g(Vy({noPowerBy:f}))}),[f]),v((()=>{void 0!==m&&Df.setState({enabled:!!m})}),[m])}function ob({refetch:e,interval:t}){let r;v((()=>(e(),clearTimeout(r),r=setInterval((()=>{e()}),null!=t?t:15e3),()=>clearTimeout(r))),[e])}var ib;!function(e){e.routePrice="routePrice",e.fiatPrice="fiatPrice",e.bridgeRoutePrice="bridgeRoutePrice",e.bridgeEncode="bridgeEncode",e.bridgeCreateRoute="bridgeCreateRoute"}(ib||(ib={}));const sb="https://api.dodoex.io/cross-chain/widget",ab=`${sb}/routes`,lb=`${sb}/transaction/encode`,cb=`${sb}/order/create`;function db(e){const t=q(Kf);return w((()=>function(e,t={}){var r,n,o,i,s;switch(e){case ib.routePrice:return null!==(r=t.routePrice)&&void 0!==r?r:"https://api.dodoex.io/route-service/v2/widget/getdodoroute";case ib.fiatPrice:return null!==(n=t.fiatPrice)&&void 0!==n?n:"https://api.dodoex.io/frontend-price-api/current/batch";case ib.bridgeRoutePrice:return null!==(o=t.bridgeRoutePrice)&&void 0!==o?o:ab;case ib.bridgeEncode:return null!==(i=t.bridgeEncode)&&void 0!==i?i:lb;case ib.bridgeCreateRoute:return null!==(s=t.bridgeCreateRoute)&&void 0!==s?s:cb;default:throw new Error(`Invalid key = ${e}`)}}(e,t.apiServices)),[t.apiServices,e])}function ub({fromToken:e,toToken:t,chainId:r}){const[n,o]=m(!1),{apikey:i}=q(Kf),[s,a]=m(""),[l,c]=m(""),d=db(ib.fiatPrice),u=y((()=>{if(!r||!e||!t)return;const n=[];e.chainId!==ll.TON&&n.push(e),t.chainId!==ll.TON&&n.push(t),n.length&&(o(!0),Re.post(d,{networks:n.map((e=>{var t;return(e=>pl[e]||pl[ll.MAINNET])(null!==(t=e.chainId)&&void 0!==t?t:r)})),addresses:n.map((e=>e.address)),symbols:n.map((e=>e.symbol)),isCache:!0},i?{headers:{apikey:i}}:void 0).then((r=>{var n,i,s;o(!1);const l=null===(n=r.data)||void 0===n?void 0:n.data;l&&(a(null===(i=l.find((t=>t.address===e.address)))||void 0===i?void 0:i.price),c(null===(s=l.find((e=>e.address===t.address)))||void 0===s?void 0:s.price))})).catch((e=>{o(!1),console.error(e)})))}),[r,e,t,i,d]);return ob({refetch:u}),{loading:n,refetch:u,toFiatPrice:l,fromFiatPrice:s}}const pb=e=>(null!=e?e:jf.getState()).settings.slippage,hb=e=>(null!=e?e:jf.getState()).settings.ddl,fb="0x0000000000000000000000000000000000000000";function mb(e){const t=q(Kf),r=q(em);return{defaultSlippage:w((()=>{var n,o;return!(null==r?void 0:r.loading)&&(null==r?void 0:r.value)?r.value:e?null!==(n=t.bridgeSlippage)&&void 0!==n?n:.5:null!==(o=t.swapSlippage)&&void 0!==o?o:.2}),[t.swapSlippage,t.bridgeSlippage,e,r]),loading:null==r?void 0:r.loading}}var gb;function yb({toToken:e,fromToken:t,fromAmount:r,toAmount:o,marginAmount:i,estimateGas:s}){const{account:a,chainId:l,provider:c}=Bf(),d=q(Lf),u=w((()=>(null==t?void 0:t.chainId)||l||d),[l,t,d]),{defaultSlippage:p,loading:h}=mb(!1),f=q(pb)||p,b=q(hb)||20,x=g(0),{feeRate:E,rebateTo:A,apikey:C,isReverseRouting:k}=q(Kf),T=w((()=>Math.floor(Date.now()/1e3)+60*b),[b]),[R,S]=m(gb.Initial),[N,M]=m(null),O=db(ib.routePrice),I=y((()=>{M(null)}),[N]);v((()=>{I()}),[t,e]);const F=y((()=>bl(this,void 0,void 0,(function*(){if(!u||!t||!e||t.chainId!==e.chainId||!k&&!r||k&&!o)return void S(gb.Initial);x.current=x.current+1;const n=x.current;if(S(gb.Loading),h)return;const i={chainId:u,deadLine:T,apikey:C,slippage:f,source:"dodoV2AndMixWasm",toTokenAddress:e.address,fromTokenAddress:t.address,userAddr:a||fb,estimateGas:s};k?i.toAmount=Ce(String(o||1),e.decimals).toString():i.fromAmount=Ce(String(r||1),t.decimals).toString(),A&&E&&(i.rebateTo=A,i.fee=E);try{const e=yield Re.get(O,{params:i});if(n<x.current)return;const t=e.data.data;(null==t?void 0:t.resAmount)?(S(gb.Success),M(t)):(S(gb.Failed),M(null))}catch(e){S(gb.Failed),M(null),console.error(e)}}))),[T,a,u,e,E,f,A,t,c,r,o,C,k,O,h,s]);ob({refetch:F});const j=w((()=>{const e=k?o:r;return N&&R!==gb.Loading&&e?N:null}),[N,R,k,o,r]),L=function(){const{chainId:e,account:t}=Bf(),r=Xy(),o=y((({to:e,data:o,useSource:i,duration:s,ddl:a,gasLimit:l,subtitle:c,value:d})=>{const u=60*a,p=d;i&&"weth"!==i.toLowerCase()&&l&&l.lt(3e4)&&console.debug("Warning: GasLimit less than the minimum!");const h={from:t,to:e,data:o,value:p,route:i,duration:s,ddlSecRel:u,gasLimit:l};r.execute(n._({id:"vH2C/2",message:"Swap"}),Object.assign({opcode:By.TX},h),c)}),[t,e]);return o}(),_=y((e=>{if(!j)return;const{resAmount:n,to:o,data:i,useSource:s,duration:a,value:l}=j;t&&(k?n:r)&&L({to:o,data:i,useSource:s,duration:a,ddl:b,value:l,subtitle:e})}),[b,t,r,k,j]);return{status:R,rawBrief:j,refetch:F,executeSwap:_,reset:I}}!function(e){e.Initial="Initial",e.Loading="Loading",e.Failed="Failed",e.Success="Success"}(gb||(gb={}));const bb=new Ne;function vb(e){Zf(Object.assign(Object.assign({},e),{isTon:!!e.tonConnect})),ug(),fg();const{provider:t,autoConnect:r}=Bf({isTon:!!e.tonConnect}),n=Q(),o=q($f);v((()=>{if(void 0===o){n(Zy(!0));(()=>bl(this,void 0,void 0,(function*(){const t=e.defaultChainId;try{yield r(t)}finally{n(Zy(!1))}})))()}}),[r]),v((()=>{e.onProviderChanged&&e.onProviderChanged(t);const o=null==t?void 0:t.provider,i=()=>bl(this,void 0,void 0,(function*(){n(Zy(!0));try{yield r()}finally{n(Zy(!1))}}));return(null==o?void 0:o.on)&&o.on("chainChanged",i),()=>{(null==o?void 0:o.removeListener)&&o.removeListener("chainChanged",i)}}),[t]),v((()=>{e.tonConnect&&Se.ready()}),[e.tonConnect]);const i=e.width||375,s=e.height||494;return nb(Object.assign(Object.assign({},e),{width:i,height:s})),nt.exports.jsx(Nn,{sx:{width:i,height:s,overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",minWidth:335,minHeight:494,borderRadius:16,backgroundColor:"background.paper"},className:"dodo-widget-container",children:nt.exports.jsx(tb,{...e,children:e.children})})}function xb(e){const t=q(_f),r=q(Wf),n=w((()=>{var n;if(t){if(t!==ll.TON)return t;if(r&&r!==ll.TON)return r}return null!==(n=e.defaultChainId)&&void 0!==n?n:1}),[e.defaultChainId,t]),{connectors:o,key:i}=Af({provider:e.provider,jsonRpcUrlMap:e.jsonRpcUrlMap,defaultChainId:n});return nt.exports.jsx(re,{connectors:o,lookupENS:!1,children:nt.exports.jsx(vb,{...e})},i)}function wb(e){const t=function(e){for(var t=void 0===e?{}:e,r=t.mode,n=void 0===r?"light":r,o=t.lang,i=t.theme,a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];var c=$n(n,i,o);return bn(c=a.reduce((function(e,t){return s(e,t)}),c))}({mode:e.colorMode,theme:e.theme,lang:e.locale||"en-US"});return e.apikey||e.apiServices||console.error("apikey and apiServices must have a."),nt.exports.jsx(K,{store:jf,children:nt.exports.jsx(Iy,{locale:e.locale,children:nt.exports.jsxs(zn,{theme:t,children:[nt.exports.jsx(no,{container:".dodo-widget-container"}),nt.exports.jsx(Me,{client:bb,children:nt.exports.jsx(xb,{...e})})]})})})}function Eb({chainId:t,open:r,onClose:n}){var o,i;const s=Tn(),[a,l]=m(!1),{chainId:c}=Bf(),[d,u]=m("1"===localStorage.getItem("DODO_WIDGET_AUTO_SWITCH_NETWORK")),p=Oy(t),h=q(Kf).autoConnectLoading;v((()=>{h||(()=>{bl(this,void 0,void 0,(function*(){if(r)if(c&&t&&t!==c&&p){if(d)return yield p(),void n();l(!0)}else n();else a&&l(!1)}))})()}),[r,c,h]);const f=t&&null!==(i=null===(o=xy.get(t))||void 0===o?void 0:o.name)&&void 0!==i?i:"";return nt.exports.jsx(Fs,{open:a,onClose:n,container:document.querySelector(".dodo-widget-container"),disableEnforceFocus:!0,children:nt.exports.jsxs(Nn,{sx:{backgroundColor:"background.paper",display:"flex",width:"100%",flexDirection:"column",justifyContent:"center",alignItems:"center",p:s.spacing(20,16),gap:20,borderRadius:s.spacing(16,16,0,0),outline:0},children:[nt.exports.jsxs(Nn,{sx:{typography:"caption",textAlign:"center"},children:[nt.exports.jsx(e,{id:"7rpoXw",message:"This token is on"})," ",f,".",nt.exports.jsx("br",{}),nt.exports.jsx(e,{id:"EUBGvH",message:"Are you sure swapping to another chain?"})]}),nt.exports.jsxs(Nn,{component:"label",sx:{display:"flex",alignItems:"center",gap:8,typography:"h6",cursor:"pointer"},children:[nt.exports.jsx(js,{sx:{top:-1},checked:d,onChange:e=>{const{checked:t}=e.target;var r;r=t,localStorage.setItem("DODO_WIDGET_AUTO_SWITCH_NETWORK",r?"1":"0"),u(t)}}),nt.exports.jsx(e,{id:"dI46oG",message:"Auto switch network"})]}),nt.exports.jsxs(Nn,{sx:{display:"grid",width:"100%",gridTemplateColumns:"repeat(2, 1fr)",gap:8},children:[nt.exports.jsx(wo,{variant:wo.Variant.second,onClick:n,children:nt.exports.jsx(e,{id:"dEgA5A",message:"Cancel"})}),nt.exports.jsx(wo,{variant:wo.Variant.outlined,onClick:()=>bl(this,void 0,void 0,(function*(){p&&(yield p()),n()})),children:nt.exports.jsx(e,{id:"7VpPHA",message:"Confirm"})})]})]})})}function Ab({sx:e,amt:t,token:r,readOnly:n,showMaxBtn:o,onMaxClick:i,fiatPriceTxt:s,occupiedAddrs:a,occupiedChainId:l,onInputFocus:c,onTokenClick:d,onInputChange:u,onTokenChange:p,side:h,showChainLogo:f,onlyCurrentChain:g,defaultLoadBalance:y}){const[b,x]=m(!1),E=Tn(),A=Qf(),[C,k]=m(!1),T=r?A(r):null,[R,S]=w((()=>r?[[r],r.chainId]:[]),[r]);return dg({tokenList:R,chainId:S}),v((()=>{r&&g&&x(!0)}),[r,g]),nt.exports.jsxs(Nn,{sx:Object.assign({width:"100%",minHeight:133,padding:20,borderRadius:12,overflow:"hidden",display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:E.palette.background.input},e),children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[nt.exports.jsx(Ey,{token:r,showChainLogo:f,onClick:()=>k(!0)}),nt.exports.jsx(Ay,{balance:T,onClick:i,showMaxBtn:o,address:null==r?void 0:r.address,decimals:null==r?void 0:r.decimals})]}),nt.exports.jsx(Cy,{value:t,onFocus:c,onChange:u,readOnly:n,withClear:!0}),nt.exports.jsx(Nn,{sx:{mt:4,typography:"body2",color:E.palette.text.secondary},children:s}),nt.exports.jsx(Ny,{value:r,open:C,side:h,occupiedAddrs:a,occupiedChainId:l,defaultLoadBalance:y,onClose:()=>{k(!1),d&&d()},onTokenChange:(e,t)=>{k(!1),setTimeout((()=>{p(e,t)}),300)}}),nt.exports.jsx(Eb,{chainId:null==r?void 0:r.chainId,open:b,onClose:()=>x(!1)})]})}function Cb(e){const{width:t}=q(Kf),r=w((()=>{let e="";return"number"==typeof t?e=`${t}px`:t&&(e=t),e?`calc(${e} - 40px)`:"auto"}),[t]);return nt.exports.jsx(fs,{container:document.querySelector(".dodo-widget-container"),maxWidth:r,...e})}function kb({onClick:e,disabled:t}){const r=Tn();return nt.exports.jsx(Nn,{sx:{width:"100%",position:"relative"},children:nt.exports.jsx(Nn,{component:Ao,sx:Object.assign({width:36,height:36,borderRadius:"50%",backgroundColor:r.palette.background.input,border:`4px solid ${r.palette.background.paper}`,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%) rotate(-90deg)",color:"text.secondary"},t||!e?{}:{"&:hover":{color:"text.primary"},"&:focus-visible":{"&::before":{content:'""',position:"absolute",display:"block",left:"50%",top:"50%",transform:"translate(-50%, -50%)",borderRadius:"50%",width:28,height:28,border:"solid 1px",borderColor:"text.primary"}}}),disabled:t,onClick:()=>{t||e&&e()},children:nt.exports.jsx(Nn,{component:_,sx:{width:18,height:18}})})})}function Tb({open:t,execute:r,onClose:n,toToken:i,fromToken:s,fromAmount:a,toAmount:l,priceImpact:c,clearFromAmt:d,clearToAmt:u,baseFeeAmount:p,curToFiatPrice:h,curFromFiatPrice:f,pricePerFromToken:g,additionalFeeAmount:y,loading:b}){var x,E,A;const C=Tn(),{defaultSlippage:k}=mb(!1),T=null!==(x=q(pb))&&void 0!==x?x:k,R=Q(),{contractStatus:S}=q(Kf),M=w((()=>new o(c).gt(15)),[c]),[O,F]=m(!1),[j,L]=m(!1);return v((()=>{S!==Mf.Pending&&n(),S===Mf.TxSuccess&&(u(),d())}),[S]),v((()=>{F(!1)}),[h]),nt.exports.jsx(ky,{open:t,onClose:()=>{R(Vy({contractStatus:Mf.Initial})),n()},title:nt.exports.jsx(e,{id:"QR4/RH",message:"Swap summary"}),children:nt.exports.jsxs(Nn,{sx:{margin:20,display:"flex",height:"100%",flexDirection:"column",borderTop:`1px solid ${C.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{py:20,display:"flex",typography:"body2",alignItems:"center",justifyContent:"center",flexDirection:"column",borderBottom:`1px solid ${C.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsxs(Nn,{children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[nt.exports.jsx(wy,{width:16,height:16,url:null==s?void 0:s.logoURI,address:null!==(E=null==s?void 0:s.address)&&void 0!==E?E:"",marginRight:6}),nt.exports.jsx(Nn,{children:`${ha({input:a,decimals:null==s?void 0:s.decimals})} ${null==s?void 0:s.symbol}`})]}),nt.exports.jsx(Nn,{sx:{mt:4,typography:"h6",color:C.palette.text.secondary},children:f?`$${pa({input:f,showDecimals:1})}`:"-"})]}),nt.exports.jsx(Nn,{sx:{width:16,mx:16},component:W}),nt.exports.jsxs(Nn,{children:[nt.exports.jsxs(Nn,{sx:{display:"flex"},children:[nt.exports.jsx(wy,{width:16,height:16,marginRight:6,url:null==i?void 0:i.logoURI,address:null!==(A=null==i?void 0:i.address)&&void 0!==A?A:""}),nt.exports.jsx(Do,{loading:b,loadingProps:{width:30},children:`${ha({input:l,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),nt.exports.jsx(Do,{loading:b,loadingProps:{width:30},sx:{typography:"h6",mt:4,color:C.palette.text.secondary},children:h?`$${pa({input:h,showDecimals:1})}(${c}%)`:"-"})]})]}),nt.exports.jsxs(Nn,{sx:{mt:12,display:"flex",alignItems:"center",typography:"h6"},children:[`1 ${null==s?void 0:s.symbol} = `,nt.exports.jsx(Do,{loading:b,loadingProps:{width:30},children:ha({input:new o(l).dividedBy(new o(a)),decimals:null==i?void 0:i.decimals})})," ",`${null==i?void 0:i.symbol}`]})]}),nt.exports.jsxs(Nn,{sx:{py:15,typography:"body2",borderBottom:`1px solid ${C.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",color:C.palette.text.secondary},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(Nn,{sx:{width:16,mr:7},component:P}),nt.exports.jsx(e,{id:"XeovX3",message:"Swap Detail"})]}),nt.exports.jsx(Nn,{component:Ao,children:nt.exports.jsx(Nn,{onClick:()=>L(!j),sx:{width:10,color:"text.secondary",transform:j?"rotateX(0deg)":"rotateX(180deg)"},component:I})})]}),nt.exports.jsxs(Nn,{sx:{mt:16,display:j?"initial":"none"},children:[nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"93m8jT",message:"Basic Fee"}),nt.exports.jsx(Cb,{title:nt.exports.jsx(e,{id:"8Z29ZO",message:"Estimated service provider fees"}),ml:5})]}),nt.exports.jsx(Do,{loading:b,loadingProps:{width:30},children:p?`${ha({input:p,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`:"0"})]}),nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"J39pAJ",message:"Additional Fee"}),nt.exports.jsx(Cb,{title:nt.exports.jsx(e,{id:"ZXvy7b",message:"Additional routing fees set by the Widget user"}),ml:5})]}),nt.exports.jsx(Do,{loading:b,loadingProps:{width:30},children:y?`${ha({input:y,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`:"0"})]}),nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"T+qgFw",message:"Price Impact"}),nt.exports.jsx(Cb,{title:nt.exports.jsx(e,{id:"4kY4C4",message:"Due to the market condition, market price and estimated price may have a slight difference"}),ml:5})]}),nt.exports.jsx(Nn,{children:`${c}%`})]}),nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"CMHmbm",message:"Slippage"}),nt.exports.jsx(Cb,{title:nt.exports.jsx(e,{id:"GAypnX",message:"High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:5})]}),nt.exports.jsxs(Nn,{children:[T,"%"]})]})]})]}),nt.exports.jsx(Nn,{sx:{flex:1}}),M&&nt.exports.jsxs(Nn,{sx:{mb:14,display:"flex",cursor:"pointer",justifyContent:"center",alignItems:"center",typography:"h6"},onClick:()=>F(!O),children:[nt.exports.jsx(Nn,{sx:{mr:4,width:18,height:18,alignItems:"center"},children:O?nt.exports.jsx(Nn,{sx:{width:"100%",height:"100%",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"secondary.main"},children:nt.exports.jsx(Nn,{component:N,sx:{width:14,color:"#1a1a1b"}})}):nt.exports.jsx(Nn,{sx:{width:"100%",height:"100%",borderRadius:4,border:`1px solid ${C.palette.text.secondary}`}})}),nt.exports.jsx(Nn,{children:nt.exports.jsx(e,{components:{0:nt.exports.jsx(Nn,{component:"span",sx:{color:"error.main"}})},values:{priceImpact:c},id:"Price impact reaches <0>{priceImpact}</0>%, accept the quote"})})]}),nt.exports.jsx(wo,{isLoading:S==Mf.Pending,disabled:M&&!O,fullWidth:!0,onClick:()=>{r(),R(Vy({contractStatus:Mf.Pending}))},children:S==Mf.Pending?nt.exports.jsx(e,{id:"P+K/3O",message:"Confirming"}):nt.exports.jsx(e,{id:"lQ6r7x",message:"Confirm swap"})})]})})}function Rb(e){var{sx:t,maxVal:r,decimals:n=2,onInputChange:o}=e,s=yl(e,["sx","maxVal","decimals","onInputChange"]);return Tn(),nt.exports.jsx(jo,{...s,onChange:e=>{const t=0===e.target.value.length?null:ga(e.target.value,n),s=r&&t&&new i(t).gt(r)?r.toString():t;console.log("finalVal:",s),o&&o(s)}})}function Sb({open:t,onClose:r,isBridge:o}){const i=Tn(),s=Q(),a=q(pb),l=q(hb),c=w((()=>Number(a)>=50),[a]),{defaultSlippage:d}=mb(o);return nt.exports.jsx(ky,{open:t,onClose:r,title:nt.exports.jsx(e,{id:"Tz0i8g",message:"Settings"}),children:nt.exports.jsxs(Nn,{sx:{mx:20},children:[nt.exports.jsxs(Nn,{sx:{py:20,borderTop:`1px solid ${i.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{mb:16,display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"lqTDfd",message:"Slippage Tolerance"}),nt.exports.jsx(Cb,{title:nt.exports.jsx(e,{id:"KAmxpM",message:"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:7})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",flexDirection:"column"},children:[nt.exports.jsx(Rb,{fullWidth:!0,maxVal:100,value:null!=a?a:"",placeholder:d.toString(),onInputChange:e=>{!function(e,t){null===t?localStorage.removeItem(e?"DODO_WIDGET_SLIPPAGE_BRIDGE":"DODO_WIDGET_SLIPPAGE_SWAP"):localStorage.setItem(e?"DODO_WIDGET_SLIPPAGE_BRIDGE":"DODO_WIDGET_SLIPPAGE_SWAP",String(t))}(!!o,e),s(rb(e))},suffix:nt.exports.jsx(Nn,{sx:{color:"text.disabled"},children:"%"}),height:36}),c&&nt.exports.jsx(Nn,{sx:{typography:"h6",mt:6,color:"error.main"},children:nt.exports.jsx(e,{id:"Zm56FI",message:"Maximum slippage do not exceed 50%"})})]})]}),o?"":nt.exports.jsxs(Nn,{sx:{py:20,borderTop:`1px solid ${i.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{mb:16,display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"zSMRJ/",message:"Transaction Deadline"}),nt.exports.jsx(Cb,{title:nt.exports.jsx(e,{id:"rFbNvu",message:"If your transaction time exceeds the deadline, your transaction will be rescinded."}),ml:7})]}),nt.exports.jsx(Rb,{value:l,fullWidth:!0,height:36,placeholder:n._({id:"PC9Biq",message:"{DEFAULT_SWAP_DDL} minutes",values:{DEFAULT_SWAP_DDL:20}}),onInputChange:e=>{s((e=>t=>bl(void 0,void 0,void 0,(function*(){t({type:"SET_TRANSACTION_DDL",payload:e})})))(e?Math.max(Number(e),1):""))}})]})]})})}function Nb({toToken:t,fromToken:r,priceStatus:n,pricePerToToken:o,pricePerFromToken:i}){const[s,a]=m("-"),[l,c]=m(null),[d,u]=m("-"),[p,h]=m(null);v((()=>{a(null==r?void 0:r.symbol),u(null==t?void 0:t.symbol),c(o),h(i)}),[r,t,o,i]);const f=y((()=>{a(d),u(s),c(p),h(l)}),[s,l,d,p]);return nt.exports.jsx(Nn,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:{[gb.Initial]:"-",[gb.Loading]:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Wo,{sx:{mr:5}}),nt.exports.jsx(e,{id:"JdNn1Y",message:"Fetching best price..."})]}),[gb.Failed]:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{component:D,sx:{width:15,mr:5,color:"warning.main"}}),nt.exports.jsx(e,{id:"NVAuTg",message:"Quote not available"})]}),[gb.Success]:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{sx:{typography:"body2"},children:`1 ${s} = ${pa({input:p,showDecimals:4})} ${d}`}),nt.exports.jsx(Nn,{component:Ao,sx:{width:18,height:18,ml:6,borderRadius:"50%",backgroundColor:"border.main",display:"flex",justifyContent:"center",alignItems:"center"},children:nt.exports.jsx(Nn,{sx:{width:16,color:"text.secondary"},onClick:f,component:B})})]})}[n]})}function Mb({open:t,onClose:o,chainId:i}){r();const s=q(Lf),a=q(_f),l=w((()=>{var e;return null!==(e=null!=i?i:a)&&void 0!==e?e:s}),[i,a,s]),[c,d]=m(null),u=c?wf[c]:void 0,p=Oy(l),h=Bf();return nt.exports.jsx(ky,{title:nt.exports.jsx(e,{id:"h7LgzN",message:"Connect to your wallet"}),open:t,onClose:o,children:nt.exports.jsx(Nn,{sx:{mx:20,pb:20,border:"1px solid transparent",borderTopColor:"border.main",flex:1,display:"flex",flexDirection:"column"},children:u?nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",flex:1},children:[nt.exports.jsx(Nn,{component:u.icon,sx:{width:32,height:32}}),nt.exports.jsx(Nn,{sx:{mt:8,typography:"caption"},children:n._({id:"/Ak0Fw",message:"Opening {0}...",values:{0:u.name}})}),nt.exports.jsx(Nn,{sx:{mt:8,typography:"body2",color:"text.secondary"},children:nt.exports.jsx(Wo,{})})]}):nt.exports.jsx(nt.exports.Fragment,{children:Object.values(wf).map((t=>nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",flexDirection:"column",mt:20,p:20,backgroundColor:"background.tag",borderRadius:12,cursor:"pointer","&:hover":{backgroundColor:"hover.default"}},onClick:()=>bl(this,void 0,void 0,(function*(){try{if(d(t.type),h.chainId&&h.chainId!==l&&t.type===xf.METAMASK&&h.isMetamask&&p)return yield p(),void d(null);yield Cf(t.type,l,(e=>{console.error(e),d(null)}))}catch(e){console.error(e)}d(null)})),children:[nt.exports.jsx(Nn,{component:t.icon,sx:{width:32,height:32}}),nt.exports.jsx(Nn,{sx:{mt:8,typography:"caption"},children:t.name}),nt.exports.jsx(Nn,{sx:{mt:4,typography:"body2",color:"text.secondary"},children:nt.exports.jsx(e,{id:"Uzr1HF",message:"Connect to your {0} Wallet",values:{0:t.name}})})]},t.type)))})})})}function Ob({needSwitchChain:t,needEvmChainId:r,onConnectWalletClick:n}){const{chainId:o}=Bf(),i=Df((e=>{var t;return null===(t=e.connected)||void 0===t?void 0:t.chainId})),{chainId:s}=te(),[a,l]=m(!1),[c,d]=m(!1),[u,p]=m(!1);let h;return r?i?s&&r===s||(h=r):h=ll.TON:t!==o&&(h=t),nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(wo,{size:wo.Size.middle,fullWidth:!0,onClick:()=>bl(this,void 0,void 0,(function*(){if(n){if(!r&&o&&t&&o!==t)return void p(!0);d(!0);const e=yield n();if(d(!1),e)return}h!==ll.TON?l(!0):(d(!0),yield Df.getState().connect(),d(!1))})),"data-testid":"connect-wallet-btn",isLoading:c,children:c?nt.exports.jsx(e,{id:"J28zul",message:"Connecting..."}):h?nt.exports.jsx(e,{id:"s2dmVY",message:"Connect to a {0} wallet",values:{0:h===ll.TON?"Ton":"EVM"}}):nt.exports.jsx(e,{id:"r7ScnQ",message:"Connect to a wallet"})}),nt.exports.jsx(Mb,{open:a,onClose:()=>l(!1),chainId:h}),nt.exports.jsx(Eb,{chainId:t,open:u,onClose:()=>p(!1)})]})}var Ib,Fb;function jb({chainId:e,account:t,token:r,proxyContractAddress:n}){const[i,s]=m(!1),[a,l]=m(!1),[c,d]=m(null),u=q(Kf).jsonRpcUrlMap,p=q(Pf),h=y((()=>bl(this,void 0,void 0,(function*(){if(!t||!e||!r)return;s(!0);const i=Object.assign(Object.assign({},cl),u)[e],a=ig(null==i?void 0:i[0],e);try{const i=yield function({account:e,tokenAddress:t,tokenDecimals:r,chainId:n,approveAddress:i,provider:s}){return bl(this,void 0,void 0,(function*(){if(!e||!t)return;const a=rm[n],{DODO_APPROVE:l}=a,c=null!=i?i:l,d=new ke(t,gg,s),u=yield d.allowance(e,c),p=new o(10).pow(r);return new o(u.toString()).div(p)}))}({account:t,chainId:e,tokenAddress:r.address,tokenDecimals:r.decimals,approveAddress:n,provider:a});l(!1),d(null!=i?i:null)}catch(e){console.error(e),l(!0)}finally{s(!1)}}))),[e,r,u,n,t]);return v((()=>{h()}),[h,p]),{allowance:c,loading:i,error:a,refetch:h}}!function(e){e.All="all"}(Ib||(Ib={})),function(e){e.Loading="Loading",e.Insufficient="ApprovalInsufficient",e.Approving="Approving",e.Sufficient="Sufficient",e.Unchecked="Unchecked"}(Fb||(Fb={}));const Lb=({account:e,chainId:t,offset:r,contractAddress:i,skip:s})=>{var a;const l=q(Lf),c=w((()=>{var e;return rm[null!==(e=t)&&void 0!==e?e:l]}),[t]),{isETH:d}=w((()=>(e=>{const t={isMainnet:1===e,isRinkeby:4===e,isGor:5===e};return Object.assign(Object.assign({},t),{isETH:t.isMainnet||t.isRinkeby||t.isGor})})(t)),[t]),{DODO_APPROVE:u}=c||{},p=null!==(a=null!=i?i:u)&&void 0!==a?a:null,h=function(e){const{account:t,chainId:r}=Bf(),n=q(Lf),i=w((()=>null!=r?r:n),[r,n]),s=q(Yf),a=y((r=>{var n,a;if(!t||!e)return null;const l=null!==(n=r.chainId)&&void 0!==n?n:i,c=ul[l];if(r.symbol===c.symbol&&fl(r.address,c.address))return new o(cg);const{DODO_APPROVE:d}=rm[l]||{};if(e!==d)return null;const u=null===(a=null==s?void 0:s[r.address.toLowerCase()])||void 0===a?void 0:a.tokenAllowances;return null!=u?u:null}),[t,i,e,s]);return a}(p),[f,g]=m(),{allowance:b}=jb({chainId:t,account:e,token:f,proxyContractAddress:p}),v=Qf(),{runningRequests:x}=Yy(),E=q(qf),A=w((()=>{var e;return null===(e=ul[null!=t?t:l])||void 0===e?void 0:e.address}),[t]),C=y(((t,n,i)=>{if(!t)return Fb.Loading;if(s)return Fb.Sufficient;const a=!!(null==x?void 0:x.find((e=>e.spec.opcode===By.Approval&&e.spec.token.address===(null==t?void 0:t.address)))),l=null!=i?i:t?v(t):null;let c=t?h(t):null;const d=new o(null!=n?n:0);if(!e)return Fb.Unchecked;if(!l||d.minus(null!=r?r:0).gt(l))return Fb.Unchecked;if(d.isZero())return Fb.Unchecked;return t.address===A?Fb.Sufficient:a?Fb.Approving:((null==f?void 0:f.address)===t.address&&b&&(c=b),c?c&&d.minus(null!=r?r:0).gt(c)?Fb.Insufficient:Fb.Sufficient:(p===u||f&&f.address===t.address||g(t),Fb.Loading))}),[v,h,e,r,p,t,E,x,A,f,null==b?void 0:b.toString(),s]),k=y((e=>{const t=e?h(e):null;return("USDT"===(null==e?void 0:e.symbol)||(null==e?void 0:e.address.toLowerCase())==="0x6426e6017968377529487E0ef0aA4E7759724e05".toLowerCase())&&null!==t&&t.gt(0)}),[h]),T=Xy(),R=Q(),S=y(((t,r)=>bl(void 0,void 0,void 0,(function*(){if(!p||!e||!t)return;const i=(e=>{let t=e.symbol;return t.indexOf("DLP_")>-1&&(t=t.replace("DLP_","")),t.indexOf("DLP")>-1&&(t=t.replace("DLP","LP")),t})(t),s=r?new o(0):void 0,a=r?n._({id:"OfhWJH",message:"Reset"}):n._({id:"Z7ZXbT",message:"Approve"});var l;(yield T.execute(`${a} ${i}`,{opcode:By.Approval,token:t,contract:p,amt:s}))===jy.Success&&R((l=null!=s?s:cg,e=>bl(void 0,void 0,void 0,(function*(){e({type:"SET_ACCOUNT_ALLOWANCES",payload:l})}))))}))),[p,e,t,T,R]),N=y((e=>{const t=new o(0);if(!e)return t.toString();const r=v(e);if(!r)return t.toString();return r.toString()}),[t,v,d]);return{getApprovalState:C,getPendingRest:k,getMaxBalance:N,submitApprove:S}};const _b=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"transfer",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"transferToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"address[]",name:"tos",type:"address[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"transferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"tos",type:"address[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"transfers",outputs:[],stateMutability:"payable",type:"function"}];const Wb="https://api.layerswap.io/api/v2",Pb="gNiGVhOddxMmWk4LFCR/5tDsdTECWCRlQBcW6yV8l+paqSVJBUth0wDXqA0jC16cv+Pz54+YeeKo54ioiR4n9Q",Db=`${Wb}/networks`,Bb=`${Wb}/limits`,Ub=`${Wb}/quote`,Vb=`${Wb}/swaps`;function Zb(e){return bl(this,void 0,void 0,(function*(){const t=yield fetch(e,{headers:{"X-LS-APIKEY":Pb,"Content-Type":"application/json"}}),r=yield t.json();if(r.error)throw new Error(r.error);return r.data}))}function Hb(){return bl(this,void 0,void 0,(function*(){return Zb(Db)}))}function zb({fromAddress:e,toAddress:t,fromToken:r,toToken:n,fromNetworkName:o,toNetworkName:i,fromAmount:s,slippage:a,params:l}){var c,d,u,p,h;return bl(this,void 0,void 0,(function*(){if(!(r&&n&&o&&i&&e&&t))return;const f=yield fetch(Vb,{method:"POST",headers:{"X-LS-APIKEY":Pb,"Content-Type":"application/json"},body:JSON.stringify({destination_address:t,source_address:e,source_network:o,source_token:r.symbol,destination_network:i,destination_token:n.symbol,use_deposit_address:!1,amount:s,slippage:a})}),m=yield f.json();if(m.error)throw new Error(m.error);const{swap:g}=m.data,{id:y,source_token:b}=g,v=`${Vb}/${y}/deposit_actions`,x=yield Zb(v),w=null===(c=null==x?void 0:x.find((e=>!0)))||void 0===c?void 0:c.to_address,E=(null===(d=null==x?void 0:x.find((e=>!0)))||void 0===d?void 0:d.amount)||0,A=null===(u=null==x?void 0:x.find((e=>!0)))||void 0===u?void 0:u.call_data;if(!A||!w)throw new Error("No deposit action found in the swap response");const C=yield((e,t,r,n,o)=>bl(void 0,void 0,void 0,(function*(){const i=JSON.parse(o);if(t.contract){const e=ge.parse(r),o=ge.parse(n),s=ye().storeUint(0,32).storeStringTail(i.comment).endCell(),a=ye().storeUint(260734629,32).storeUint(0,64).storeCoins(i.amount).storeAddress(e).storeAddress(e).storeBit(0).storeCoins(xe("0.00002")).storeBit(1).storeRef(s).endCell(),l=ge.parse(t.contract),c=Df.getState().client;if(!c)throw new Error("No Ton Connect client available");const d=c.open(we.create(l)),u=yield d.getWalletAddress(o);return{validUntil:Math.floor(Date.now()/1e3)+360,messages:[{address:u.toString(),amount:xe("0.045").toString(),payload:a.toBoc().toString("base64")}]}}{const t=ye().storeUint(0,32).storeStringTail(i.comment).endCell();return{validUntil:Math.floor(Date.now()/1e3)+360,messages:[{address:r,amount:xe(e).toString(),payload:t.toBoc().toString("base64")}]}}})))(E,b,w,e,A),{tonConnectUI:k,client:T}=Df.getState();if(!k||!T)throw new Error("No tonConnectUI or client available");const R=yield k.sendTransaction(C),S=(N=R.boc,be.fromBase64(N).hash().toString("base64"));var N;l.onSubmit&&l.onSubmit(S);const M=yield((e,t)=>bl(void 0,void 0,void 0,(function*(){const{boc:r,refetchInterval:n=2e3,refetchLimit:o,address:i}=e;return new Promise((e=>{let s=0;const a=ge.parse(i),l=be.fromBase64(r).hash().toString("base64"),c=setInterval((()=>bl(void 0,void 0,void 0,(function*(){s+=1;const r=yield t.getContractState(a);if(!r||!r.lastTransaction)return clearInterval(c),void e(null);const n=r.lastTransaction.lt,i=r.lastTransaction.hash,d=yield t.getTransaction(a,n,i);d&&d.inMessage&&ye().store(ve(d.inMessage)).endCell().hash().toString("base64")===l&&(clearInterval(c),e(d)),o&&s>=o&&(clearInterval(c),e(null))}))),n)}))})))({boc:R.boc,address:e},T);return l.onSuccess&&l.onSuccess(null!==(h=null===(p=null==M?void 0:M.hash())||void 0===p?void 0:p.toString("base64"))&&void 0!==h?h:S,{tonTransaction:M}),M}))}function Yb({skip:e,data:{fromToken:t,toToken:r,fromAmount:n,evmAccount:i,tonAccount:s,slippage:a}}){var l,c,d,u,h,f;const m=Oe({queryKey:["layerSwap","networkQuery"],enabled:!e,queryFn:Hb});let g=null;t&&(g=t.chainId===ll.TON?null===(l=m.data)||void 0===l?void 0:l.find((e=>"TON_MAINNET"===e.name)):null===(c=m.data)||void 0===c?void 0:c.find((e=>e.chain_id===String(t.chainId)&&"evm"===e.type)));const y=null==g?void 0:g.name;let b=null;r&&(b=r.chainId===ll.TON?null===(d=m.data)||void 0===d?void 0:d.find((e=>"TON_MAINNET"===e.name)):null===(u=m.data)||void 0===u?void 0:u.find((e=>e.chain_id===String(r.chainId)&&"evm"===e.type)));const v=null==b?void 0:b.name,x=Oe({queryKey:["layerSwap","limitQuery",null==t?void 0:t.address,null==r?void 0:r.address,v],enabled:!e&&!!(t&&r&&v),queryFn:()=>function({fromToken:e,toToken:t,fromNetworkName:r,toNetworkName:n}){return bl(this,void 0,void 0,(function*(){if(e&&t&&r&&n)return yield Zb(`${Bb}?source_network=${r}&source_token=${e.symbol}&destination_network=${n}&destination_token=${t.symbol}`)}))}({fromToken:t,toToken:r,fromNetworkName:y,toNetworkName:v})}),w=Oe({queryKey:["layerSwap","quoteQuery",null==t?void 0:t.address,null==r?void 0:r.address,v,n],enabled:!e&&!!(t&&r&&v&&n),refetchInterval:15e3,queryFn:()=>bl(this,void 0,void 0,(function*(){var e;if(!t||!r||!v)return;const l=yield function({fromToken:e,toToken:t,fromNetworkName:r,toNetworkName:n,slippage:o,fromAmount:i}){return bl(this,void 0,void 0,(function*(){if(e&&t&&r&&n&&i)return yield Zb(`${Ub}?source_network=${r}&source_token=${e.symbol}&destination_network=${n}&destination_token=${t.symbol}&slippage=${o}&amount=${i}`)}))}({fromToken:t,toToken:r,fromNetworkName:y,toNetworkName:v,fromAmount:n,slippage:a});if(!l)throw new Error("Failed to get quote");const c=s,d=i,u="layerswap",{quote:p}=l,h=u.charAt(0).toUpperCase()+u.slice(1),f=function(e){const t=e.split(".")[0];return 60*parseInt(t.slice(0,2),10)*60+60*parseInt(t.slice(3,5),10)+parseInt(t.slice(6),10)}(p.avg_completion_time);return{key:`layerswap-${p.receive_amount}-${n}-${t.address}-${r.address}`,id:u,product:u,fromChainId:t.chainId,toChainId:r.chainId,fromAddress:c,toAddress:d,fromAmount:n,toTokenAmount:new o(p.receive_amount),fromToken:t,toToken:r,feeUSD:null!==(e=String(p.total_fee_in_usd))&&void 0!==e?e:"-",roundedRouteCostTime:f,executionDuration:f,productParams:null,spenderContractAddress:void 0,step:{type:"cross",tool:u,approvalAddress:void 0,toolDetails:{key:u,logoURI:"https://images.dodoex.io/PI0Kb_gccJbkOIpRNof2CUmeiyiPof28wrEH86RAlIE/rs:fit:160:160:0/g:no/aHR0cHM6Ly9zdG9yYWdlLmdvb2dsZWFwaXMuY29tL2RvZG8tbWVkaWEtc3RhZ2luZy91cGxvYWRfaW1nXzQwMTA2NzFfMjAyMzExMTYxMTE1MTM5ODAud2VicA.webp",name:h}},sendData:e=>zb({fromAddress:c,toAddress:d,fromToken:t,toToken:r,fromNetworkName:y,toNetworkName:v,fromAmount:n,params:e})}}))}),E=p.useMemo((()=>n?m.isLoading||x.isLoading||w.isLoading?Gb.Loading:m.isError||w.error?Gb.Failed:w.data?Gb.Success:Gb.Initial:Gb.Initial),[m,x,w,n]),A=p.useMemo((()=>{var e,t;return w.data?Object.assign(Object.assign({},w.data),{minAmt:null===(e=x.data)||void 0===e?void 0:e.min_amount,maxAmt:null===(t=x.data)||void 0===t?void 0:t.max_amount}):null}),[x.data,w.data]);return{status:E,router:A,limit:x.data?{minAmt:null===(h=x.data)||void 0===h?void 0:h.min_amount,maxAmt:null===(f=x.data)||void 0===f?void 0:f.max_amount}:null}}var Gb,Xb,Jb;function qb({toToken:e,fromToken:t,fromAmount:r,fromFiatPrice:n}){var i,s;const{account:a,provider:l}=Bf(),{defaultSlippage:c,loading:d}=mb(!0),u=q(pb)||c,{apikey:p}=q(Kf),h=te(),f=Df(),[g,b]=m(Gb.Initial),[v,x]=m([]),E=db(ib.bridgeRoutePrice),A=w((()=>(null==e?void 0:e.chainId)===ll.TON&&(null==t?void 0:t.chainId)!==(null==e?void 0:e.chainId)),[t,e]),C=w((()=>(null==t?void 0:t.chainId)===ll.TON&&(null==t?void 0:t.chainId)!==(null==e?void 0:e.chainId)||(null==e?void 0:e.chainId)===ll.TON&&(null==t?void 0:t.chainId)!==(null==e?void 0:e.chainId)),[t,e]),k=function({skip:e}={}){const t=Oe({queryKey:["orbiterRouters"],enabled:!e,queryFn:()=>bl(this,void 0,void 0,(function*(){const e=yield fetch("https://api.orbiter.finance/sdk/routers/v2"),t=yield e.json();if("success"!==t.status)throw new Error(t.message);const r=t.result,n=[],o=new Set,i="orbiter";return r.forEach((e=>{const t=e.line,[r,s]=t.split("-"),[a,l]=s.split("/"),c="TON"===e.srcChain.toLocaleUpperCase()?ll.TON:Number(e.srcChain),d="TON"===e.tgtChain.toLocaleUpperCase()?ll.TON:Number(e.tgtChain);if("available"!==e.state||!c||!d||c!==ll.TON&&d!==ll.TON)return;const u=`orbiter-${c}-${d}-${e.endpoint.toLocaleLowerCase()}-${a.toLocaleLowerCase()}-${l.toLocaleLowerCase()}`;if(o.has(u))return;o.add(u);const p=e.srcToken,h=e.tgtToken;n.push({key:u,id:i,fromChainId:c,toChainId:d,fromTokenAddress:p,toTokenAddress:h,product:i,endpoint:e.endpoint,minAmt:e.minAmt,maxAmt:e.maxAmt,withholdingFee:e.withholdingFee,tradeFee:e.tradeFee,spentTime:e.spentTime,vc:e.vc})})),n}))});return t}({skip:!A}),T=function({skip:e}={}){return Oe({queryKey:["orbiterContractList"],enabled:!e,queryFn:()=>bl(this,void 0,void 0,(function*(){const e=yield fetch("https://api.orbiter.finance/sdk/chains"),t=yield e.json();if("success"!==t.status)throw new Error(t.message);const r=t.result,n=new Map;return r.forEach((e=>{const t=Number(e.chainId),r=e.contracts.find((e=>"OrbiterRouterV3"===e.name));(null==r?void 0:r.address)&&n.set(t,r.address)})),{bridgeContractMap:n}}))})}({skip:!A}),R=Yb({skip:!C,data:{toToken:e,fromToken:t,fromAmount:r,evmAccount:h.account,tonAccount:null===(i=f.connected)||void 0===i?void 0:i.account,slippage:Number(u)}}),S=y((()=>bl(this,void 0,void 0,(function*(){var n;const i=null==t?void 0:t.chainId,s=null==e?void 0:e.chainId;if(A||C)return;if(!(i&&s&&i!==s&&t&&e&&r))return void b(Gb.Initial);if(b(Gb.Loading),d)return;const c=t.address,h=e.address,f=a||fb,m=a||fb,g=Number(u)/100,y={fromAddress:f,fromAmount:Ce(String(r||1),t.decimals).toString(),fromChainId:i,fromTokenAddress:c,toAddress:m,toChainId:s,toTokenAddress:h,options:{slippage:g},products:["lifi","hyphen","nabox","bungee","swft","stargate","connext","squid","across","layerswap","okx","symbiosis","scroll","manta","orbiter"]};try{const c=Date.now(),d=(yield Re.post(`${E}${p?`?apikey=${p}`:""}`,{data:y})).data.data,u=[];if((null===(n=null==d?void 0:d.routes)||void 0===n?void 0:n.length)&&d.routes.forEach(((n,a)=>{if(n){const{toAmount:l,feeUSD:d,executionDuration:p,product:h,step:y,fee:b,encodeParams:v,productParams:x}=n;if(y&&null!==l){const n=new o(l);if(!n.isNaN()&&n.gt(0)){const{tool:w,toolDetails:E,type:A,includedSteps:C,approvalAddress:k}=y;if(C&&C.length>0&&w&&E&&E.name&&E.logoURI&&A&&k){const y=[];if(C.forEach((e=>{e&&e.id&&e.type&&e.tool&&e.toolDetails&&e.toolDetails.name&&e.toolDetails.logoURI&&e.estimate&&e.estimate.fromAmount&&e.estimate.fromToken&&e.estimate.fromToken.decimals&&e.estimate.toAmount&&e.estimate.toToken&&e.estimate.toToken.decimals&&y.push({id:e.id,tool:e.tool,toolDetails:{name:e.toolDetails.name,logoURI:e.toolDetails.logoURI},type:e.type,estimate:{fromToken:e.estimate.fromToken,toToken:e.estimate.toToken,fromTokenAmount:new o(e.estimate.fromAmount).div(`1e${e.estimate.fromToken.decimals}`),toTokenAmount:new o(e.estimate.toAmount).div(`1e${e.estimate.toToken.decimals}`)}})})),y.length>0){const o={key:`${h}-${l}-${d}-${a}`,id:h,fromChainId:i,toChainId:s,fromToken:t,toToken:e,fromAmount:r,toTokenAmount:n.div(`1e${e.decimals}`),fromAddress:f,toAddress:m,product:h,slippage:g,roundedRouteCostTime:(Date.now()-c)/1e3,spenderContractAddress:null!=k?k:"0x",feeUSD:d,executionDuration:p,step:{tool:w,toolDetails:{name:E.name,logoURI:E.logoURI},type:A,includedSteps:y},encodeParams:v,productParams:x,sourceRoute:{toAmount:l,feeUSD:d,executionDuration:p,step:{tool:w,toolDetails:E,type:A,approvalAddress:k,includedSteps:C},fee:b}};u.push(o)}}}}}})),x(u),u.length?b(Gb.Success):b(Gb.Failed),!a||!l)return}catch(e){b(Gb.Failed),console.error(e)}}))),[a,e,u,t,l,r,p,E,d,A]);ob({refetch:S});const[N,M]=w((()=>{var i,s,a,l;let c=h.account,d=null===(i=f.connected)||void 0===i?void 0:i.account;if((null==t?void 0:t.chainId)===ll.TON&&(c=null===(s=f.connected)||void 0===s?void 0:s.account,d=h.account),!(A&&k.data&&t&&e&&r&&c&&d))return[Gb.Initial,null];if(k.isLoading||T.isLoading)return[Gb.Loading,null];const u=null===(l=null===(a=T.data)||void 0===a?void 0:a.bridgeContractMap)||void 0===l?void 0:l.get(t.chainId);if(k.error||T.error||!u)return[Gb.Failed,null];const p=k.data.find((r=>r.fromTokenAddress.toLocaleLowerCase()===t.address.toLocaleLowerCase()&&r.toTokenAddress.toLocaleLowerCase()===e.address.toLocaleLowerCase()));if(!p)return[Gb.Success,null];const m=new o(r),g=m.minus(p.withholdingFee||0),y=g.times(p.tradeFee||0),b=y.plus(p.withholdingFee||0),v=g.minus(y),x=p.product.charAt(0).toUpperCase()+p.product.slice(1),w=function({route:e,fromAddress:t,toAddress:r,fromAmount:n,fromToken:o,contractAddress:i}){const s=`c=${e.vc}&t=${r}`,a=n.times(10**o.decimals).toString(),l=al(e.endpoint);let c="",d="0x0";return ml(o.address)?(c=new tg(_b).encodeFunctionData("transfer",[l,Da(sc(s))]),d=a):c=new tg(_b).encodeFunctionData("transferToken",[o.address,l,a,Da(sc(s))]),{data:c,to:al(i),value:d,from:t,chainId:o.chainId}}({route:p,fromAddress:c,toAddress:d,fromAmount:m,fromToken:t,contractAddress:u}),E=Number(p.spentTime);return[Gb.Success,Object.assign(Object.assign({},p),{fromAddress:c,toAddress:d,fromAmount:r,toTokenAmount:v,fromToken:t,toToken:e,feeUSD:n?b.times(n).toString():"-",roundedRouteCostTime:E,executionDuration:E,encodeResultData:w,productParams:null,spenderContractAddress:u,step:{type:"cross",tool:p.product,approvalAddress:u,toolDetails:{key:p.product,logoURI:"https://storage.googleapis.com/dodo-media-staging/upload_img_679714_20240809095516856.svg",name:x}}})]}),[A,k,e,t,r,n,h.account,null===(s=f.connected)||void 0===s?void 0:s.account,T]),O=w((()=>r?R.router?[R.router]:M?[M]:v:[]),[g,r,v,M,R]);return{status:w((()=>M?N:C?R.status:A?N:g),[g,N,A,C,R,M]),refetch:S,bridgeRouteList:O,limit:w((()=>R.limit?R.limit:(null==M?void 0:M.minAmt)||(null==M?void 0:M.maxAmt)?{minAmt:M.minAmt?Number(M.minAmt):void 0,maxAmt:M.maxAmt?Number(M.maxAmt):void 0}:null),[g,r,v,M,R])}}function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qb.apply(this,arguments)}!function(e){e.Initial="Initial",e.Loading="Loading",e.Failed="Failed",e.Success="Success"}(Gb||(Gb={}));var Kb,$b;function ev(){return ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ev.apply(this,arguments)}var tv,rv;function nv(){return nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nv.apply(this,arguments)}var ov,iv,sv;function av(){return av=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},av.apply(this,arguments)}var lv,cv;function dv(){return dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dv.apply(this,arguments)}var uv,pv,hv,fv;function mv(){return mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mv.apply(this,arguments)}var gv,yv,bv;function vv(){return vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vv.apply(this,arguments)}var xv,wv,Ev,Av,Cv,kv;function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tv.apply(this,arguments)}var Rv,Sv;function Nv(){return Nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nv.apply(this,arguments)}var Mv,Ov,Iv,Fv,jv,Lv;function _v(){return _v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_v.apply(this,arguments)}var Wv,Pv,Dv;function Bv(){return Bv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bv.apply(this,arguments)}var Uv,Vv;function Zv(){return Zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zv.apply(this,arguments)}var Hv,zv;function Yv(){return Yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yv.apply(this,arguments)}var Gv,Xv;function Jv(){return Jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jv.apply(this,arguments)}var qv;function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qv.apply(this,arguments)}const Kv=[{id:"cBridge",logoURI:function(e){return u.createElement("svg",vv({width:34,height:34,viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),gv||(gv=u.createElement("rect",{x:1,y:1,width:32,height:32,rx:8,fill:"white",stroke:"#33363F"})),yv||(yv=u.createElement("g",{clipPath:"url(#clip0_37_1169)"},u.createElement("path",{d:"M10.9221 22C13.0882 22 14.8442 21.2006 14.8442 20.2144C14.8442 19.2283 13.0882 18.4288 10.9221 18.4288C8.75599 18.4288 7 19.2283 7 20.2144C7 21.2006 8.75599 22 10.9221 22Z",fill:"#444444"}),u.createElement("path",{d:"M23.5587 22C25.7248 22 27.4808 21.2006 27.4808 20.2144C27.4808 19.2283 25.7248 18.4288 23.5587 18.4288C21.3926 18.4288 19.6366 19.2283 19.6366 20.2144C19.6366 21.2006 21.3926 22 23.5587 22Z",fill:"#DDDDDD"}),u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.88456 20.2144C9.84901 20.2146 9.81379 20.2076 9.78098 20.1939C9.74818 20.1802 9.71844 20.1601 9.69353 20.1347C9.66862 20.1094 9.64903 20.0793 9.63593 20.0462C9.62283 20.0132 9.61648 19.9779 9.61725 19.9423C9.7509 15.5317 13.1124 12 17.2394 12C21.3663 12 24.7278 15.5317 24.8615 19.9423C24.8622 19.9779 24.8559 20.0132 24.8428 20.0462C24.8297 20.0793 24.8101 20.1094 24.7852 20.1347C24.7603 20.1601 24.7306 20.1802 24.6977 20.1939C24.6649 20.2076 24.6297 20.2146 24.5942 20.2144H22.0874C22.0152 20.2135 21.946 20.1848 21.8943 20.1344C21.8426 20.0839 21.8123 20.0155 21.8096 19.9433C21.6894 17.1106 19.6894 14.8567 17.2403 14.8567C14.7913 14.8567 12.7913 17.1106 12.6711 19.9433C12.6684 20.0155 12.638 20.0839 12.5863 20.1344C12.5346 20.1848 12.4655 20.2135 12.3932 20.2144H9.88456Z",fill:"#FF957E"}))),bv||(bv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_37_1169"},u.createElement("rect",{width:20.4808,height:10,fill:"white",transform:"translate(7 12)"})))))},name:"cBridge"},{id:"stargate",logoURI:function(e){return u.createElement("svg",_v({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Mv||(Mv=u.createElement("path",{d:"M0.5 8C0.5 3.85786 3.85786 0.5 8 0.5H24C28.1421 0.5 31.5 3.85786 31.5 8V24C31.5 28.1421 28.1421 31.5 24 31.5H8C3.85786 31.5 0.5 28.1421 0.5 24V8Z",fill:"black",stroke:"black"})),Ov||(Ov=u.createElement("path",{d:"M17.5867 8.63649L18.0125 9.63382C18.8482 11.592 20.4079 13.1518 22.3662 13.9875L23.3635 14.4133C23.6245 14.5246 23.8365 14.6842 24 14.8743C23.5033 11.3132 20.6868 8.49629 17.1257 8C17.3154 8.16317 17.4754 8.37546 17.5867 8.63649Z",fill:"#999999"})),Iv||(Iv=u.createElement("path",{d:"M8.63649 14.4133L9.63382 13.9875C11.592 13.1518 13.1518 11.592 13.9879 9.63382L14.4133 8.63649C14.525 8.37546 14.6846 8.16317 14.8743 8C11.3132 8.49629 8.49667 11.3132 8 14.8743C8.16357 14.6842 8.37548 14.5246 8.63649 14.4133Z",fill:"#999999"})),Fv||(Fv=u.createElement("path",{d:"M23.3635 17.5863L22.3662 18.0121C20.4079 18.8479 18.8482 20.408 18.0125 22.3662L17.5867 23.3632C17.4754 23.6242 17.3154 23.8365 17.1257 24C20.6868 23.5034 23.5033 20.6865 24 17.1253C23.8365 17.3154 23.6245 17.475 23.3635 17.5863Z",fill:"#999999"})),jv||(jv=u.createElement("path",{d:"M14.4133 23.3632L13.9879 22.3662C13.1518 20.408 11.592 18.8479 9.63382 18.0121L8.63649 17.5863C8.37548 17.475 8.16357 17.3154 8 17.1253C8.49667 20.6865 11.3132 23.5034 14.8743 24C14.6846 23.8365 14.525 23.6242 14.4133 23.3632Z",fill:"#999999"})),Lv||(Lv=u.createElement("path",{d:"M12.3715 15.2177L12.863 15.0078C13.8278 14.5959 14.5966 13.8275 15.0086 12.8626L15.2181 12.3711C15.512 11.6827 16.4879 11.6827 16.7818 12.3711L16.9913 12.8626C17.4032 13.8275 18.172 14.5959 19.1369 15.0078L19.6284 15.2177C20.3168 15.5116 20.3168 16.4872 19.6284 16.7811L19.1369 16.991C18.172 17.4029 17.4032 18.1713 16.9913 19.1366L16.7818 19.6276C16.4879 20.3161 15.512 20.3161 15.2181 19.6276L15.0086 19.1366C14.5966 18.1713 13.8278 17.4029 12.863 16.991L12.3715 16.7811C11.6831 16.4872 11.6831 15.5116 12.3715 15.2177Z",fill:"#F2F2F2"})))},name:"Stargate"},{id:"connext",logoURI:function(e){return u.createElement("svg",Tv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),xv||(xv=u.createElement("rect",{width:32,height:32,rx:8,fill:"black"})),wv||(wv=u.createElement("path",{d:"M13.0566 9.12524C13.0566 9.12524 12.31 9.87191 11.4353 10.7466L7.90996 14.2399C6.46996 15.7066 7.0353 17.1999 8.03796 18.2026L10.918 21.0826C11.174 21.3386 12.1766 22.3946 12.9766 21.5732C13.4406 21.1092 13.3393 20.3892 13.078 20.1066L9.76063 16.8159C9.16863 16.2239 9.4513 15.6852 10.0433 15.1199L12.8753 12.2879L14.6513 14.0639C15.27 14.6826 16.038 14.9119 16.6833 14.2719C17.3286 13.6266 16.9393 13.0132 16.3206 12.3946L14.3633 10.4372L13.0566 9.12524Z",fill:"url(#paint0_linear_5431_181414)"})),Ev||(Ev=u.createElement("path",{d:"M13.2112 9.25332C12.7472 8.78932 12.0805 8.53332 11.4352 9.17865C10.7898 9.82399 11.1258 10.544 11.5365 10.9547",fill:"url(#paint1_linear_5431_181414)"})),Av||(Av=u.createElement("path",{d:"M18.9218 22.8638C18.9218 22.8638 19.6685 22.1171 20.5432 21.2424L24.0685 17.7171C25.5352 16.2504 24.9698 14.7571 23.9405 13.7544L21.0605 10.9011C20.8045 10.6451 19.8018 9.5891 19.0018 10.4104C18.5378 10.8744 18.6392 11.5944 18.9005 11.8771L22.2178 15.1678C22.8098 15.7598 22.5272 16.2984 21.9352 16.8638L19.1032 19.6958L17.3272 17.9198C16.7085 17.3011 15.9405 17.0718 15.2952 17.7118C14.6498 18.3518 15.0392 18.9704 15.6578 19.5891L17.6152 21.5464L18.9218 22.8638Z",fill:"url(#paint2_linear_5431_181414)"})),Cv||(Cv=u.createElement("path",{d:"M18.7671 22.7306C19.2311 23.1946 19.8978 23.4772 20.5431 22.8319C21.1884 22.1866 20.8524 21.4666 20.4418 21.0559",fill:"url(#paint3_linear_5431_181414)"})),kv||(kv=u.createElement("defs",null,u.createElement("linearGradient",{id:"paint0_linear_5431_181414",x1:7.86029,y1:12.5047,x2:23.8117,y2:22.7959,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29C1FC"}),u.createElement("stop",{offset:.5022,stopColor:"#AB00FF"}),u.createElement("stop",{offset:.5082,stopColor:"#AC03FC"}),u.createElement("stop",{offset:.6406,stopColor:"#C840B8"}),u.createElement("stop",{offset:.7601,stopColor:"#DE7082"}),u.createElement("stop",{offset:.8629,stopColor:"#EE935B"}),u.createElement("stop",{offset:.9448,stopColor:"#F7A844"}),u.createElement("stop",{offset:.9956,stopColor:"#FBB03B"})),u.createElement("linearGradient",{id:"paint1_linear_5431_181414",x1:10.2949,y1:8.73084,x2:26.2463,y2:19.0221,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29C1FC"}),u.createElement("stop",{offset:.5022,stopColor:"#AB00FF"}),u.createElement("stop",{offset:.5082,stopColor:"#AC03FC"}),u.createElement("stop",{offset:.6406,stopColor:"#C840B8"}),u.createElement("stop",{offset:.7601,stopColor:"#DE7082"}),u.createElement("stop",{offset:.8629,stopColor:"#EE935B"}),u.createElement("stop",{offset:.9448,stopColor:"#F7A844"}),u.createElement("stop",{offset:.9956,stopColor:"#FBB03B"})),u.createElement("linearGradient",{id:"paint2_linear_5431_181414",x1:9.46092,y1:10.0213,x2:25.4123,y2:20.3125,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29C1FC"}),u.createElement("stop",{offset:.5022,stopColor:"#AB00FF"}),u.createElement("stop",{offset:.5082,stopColor:"#AC03FC"}),u.createElement("stop",{offset:.6406,stopColor:"#C840B8"}),u.createElement("stop",{offset:.7601,stopColor:"#DE7082"}),u.createElement("stop",{offset:.8629,stopColor:"#EE935B"}),u.createElement("stop",{offset:.9448,stopColor:"#F7A844"}),u.createElement("stop",{offset:.9956,stopColor:"#FBB03B"})),u.createElement("linearGradient",{id:"paint3_linear_5431_181414",x1:7.01942,y1:13.8057,x2:22.9708,y2:24.0969,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29C1FC"}),u.createElement("stop",{offset:.5022,stopColor:"#AB00FF"}),u.createElement("stop",{offset:.5082,stopColor:"#AC03FC"}),u.createElement("stop",{offset:.6406,stopColor:"#C840B8"}),u.createElement("stop",{offset:.7601,stopColor:"#DE7082"}),u.createElement("stop",{offset:.8629,stopColor:"#EE935B"}),u.createElement("stop",{offset:.9448,stopColor:"#F7A844"}),u.createElement("stop",{offset:.9956,stopColor:"#FBB03B"})))))},name:"Connext"},{id:"synapse",logoURI:function(e){return u.createElement("svg",Bv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),u.createElement("mask",{id:"mask0_419_48383",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:32,height:32},Wv||(Wv=u.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z",fill:"black"}))),Pv||(Pv=u.createElement("g",{mask:"url(#mask0_419_48383)"},u.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z",fill:"#121826"}),u.createElement("path",{d:"M15.9794 7C15.5251 7 15.1568 7.36058 15.1568 7.80538C15.1568 8.25017 15.5251 8.61075 15.9794 8.61075C16.4337 8.61075 16.802 8.25017 16.802 7.80538C16.802 7.36058 16.4337 7 15.9794 7Z",fill:"url(#paint0_radial_419_48383)"}),u.createElement("path",{d:"M15.9794 7.44297C16.1839 7.44297 16.3496 7.60522 16.3496 7.80537C16.3496 8.00551 16.1839 8.16776 15.9794 8.16776C15.775 8.16776 15.6093 8.00551 15.6093 7.80537C15.6093 7.60522 15.775 7.44293 15.9794 7.44293V7.44297ZM12.4422 9.13423C11.9879 9.13423 11.6196 9.49481 11.6196 9.93961C11.6196 10.3844 11.9878 10.7449 12.4422 10.7449C12.8965 10.7449 13.2648 10.3844 13.2648 9.93961C13.2648 9.49481 12.8965 9.13423 12.4422 9.13423ZM19.599 9.17448C19.1446 9.17448 18.7764 9.53506 18.7764 9.97986C18.7764 10.4247 19.1446 10.7852 19.599 10.7852C20.0533 10.7852 20.4216 10.4247 20.4216 9.97986C20.4216 9.53506 20.0533 9.17448 19.599 9.17448V9.17448Z",fill:"url(#paint1_radial_419_48383)"}),u.createElement("path",{d:"M12.4422 9.57715C12.6466 9.57715 12.8124 9.7394 12.8124 9.93958C12.8124 10.1397 12.6466 10.302 12.4422 10.302C12.2377 10.302 12.072 10.1397 12.072 9.93958C12.072 9.7394 12.2377 9.57715 12.4422 9.57715ZM19.599 9.6174C19.8034 9.6174 19.9691 9.77965 19.9691 9.97984C19.9691 10.18 19.8034 10.3422 19.599 10.3422C19.3945 10.3422 19.2288 10.18 19.2288 9.97984C19.2288 9.77969 19.3945 9.6174 19.599 9.6174V9.6174ZM15.9794 10.9866C15.457 10.9866 15.0334 11.4012 15.0334 11.9127C15.0334 12.4242 15.457 12.8389 15.9794 12.8389C16.5019 12.8389 16.9255 12.4242 16.9255 11.9127C16.9255 11.4012 16.5019 10.9866 15.9794 10.9866ZM8.8226 11.1074C8.3683 11.1074 8 11.4679 8 11.9127C8 12.3575 8.3683 12.7181 8.8226 12.7181C9.27695 12.7181 9.64525 12.3575 9.64525 11.9127C9.64525 11.4679 9.27695 11.1074 8.8226 11.1074ZM23.1774 11.1074C22.723 11.1074 22.3548 11.4679 22.3548 11.9127C22.3548 12.3575 22.723 12.7181 23.1774 12.7181C23.6317 12.7181 24 12.3575 24 11.9127C24 11.4679 23.6317 11.1074 23.1774 11.1074V11.1074Z",fill:"url(#paint2_radial_419_48383)"}),u.createElement("path",{d:"M15.9794 11.4295C16.252 11.4295 16.473 11.6458 16.473 11.9127C16.473 12.1796 16.252 12.3959 15.9794 12.3959C15.7068 12.3959 15.4859 12.1796 15.4859 11.9127C15.4859 11.6458 15.7068 11.4295 15.9794 11.4295V11.4295ZM8.82261 11.5503C9.02706 11.5503 9.19281 11.7126 9.19281 11.9127C9.19281 12.1129 9.02706 12.2751 8.82261 12.2751C8.61817 12.2751 8.45245 12.1129 8.45245 11.9127C8.45245 11.7126 8.61817 11.5503 8.82261 11.5503V11.5503ZM23.1774 11.5503C23.3818 11.5503 23.5476 11.7126 23.5476 11.9127C23.5476 12.1129 23.3818 12.2751 23.1774 12.2751C22.973 12.2751 22.8072 12.1129 22.8072 11.9127C22.8072 11.7126 22.973 11.5503 23.1774 11.5503ZM12.3188 13C11.7963 13 11.3727 13.4146 11.3727 13.9261C11.3727 14.4377 11.7963 14.8523 12.3188 14.8523C12.8412 14.8523 13.2648 14.4377 13.2648 13.9261C13.2648 13.4146 12.8412 13 12.3188 13ZM19.599 13C19.0765 13 18.653 13.4146 18.653 13.9261C18.653 14.4377 19.0765 14.8523 19.599 14.8523C20.1214 14.8523 20.545 14.4377 20.545 13.9261C20.545 13.4146 20.1214 13 19.599 13Z",fill:"url(#paint3_radial_419_48383)"}),u.createElement("path",{d:"M12.3187 13.443C12.5913 13.443 12.8123 13.6593 12.8123 13.9262C12.8123 14.1931 12.5913 14.4094 12.3187 14.4094C12.0461 14.4094 11.8252 14.1931 11.8252 13.9262C11.8252 13.6593 12.0461 13.443 12.3187 13.443ZM19.599 13.443C19.8715 13.443 20.0925 13.6593 20.0925 13.9262C20.0925 14.1931 19.8715 14.4094 19.599 14.4094C19.3264 14.4094 19.1054 14.1931 19.1054 13.9262C19.1054 13.6593 19.3264 13.443 19.599 13.443Z",fill:"url(#paint4_radial_419_48383)"}),u.createElement("path",{d:"M8.8226 15.1745C8.3683 15.1745 8 15.5351 8 15.9799C8 16.4247 8.3683 16.7853 8.8226 16.7853C9.27695 16.7853 9.64525 16.4247 9.64525 15.9799C9.64525 15.5351 9.27695 15.1745 8.8226 15.1745ZM23.1774 15.1745C22.723 15.1745 22.3548 15.5351 22.3548 15.9799C22.3548 16.4247 22.723 16.7853 23.1774 16.7853C23.6317 16.7853 24 16.4247 24 15.9799C24 15.5351 23.6317 15.1745 23.1774 15.1745ZM16.0206 15.2953C16.4067 15.2953 16.7198 15.6018 16.7198 15.9799C16.7198 16.358 16.4067 16.6645 16.0206 16.6645C15.6344 16.6645 15.3214 16.358 15.3214 15.9799C15.3214 15.6018 15.6344 15.2953 16.0206 15.2953Z",fill:"url(#paint5_radial_419_48383)"}),u.createElement("path",{d:"M8.82261 15.6174C9.02706 15.6174 9.19281 15.7797 9.19281 15.9798C9.19281 16.18 9.02706 16.3423 8.82261 16.3423C8.61817 16.3423 8.45245 16.18 8.45245 15.9798C8.45245 15.7797 8.61817 15.6174 8.82261 15.6174V15.6174ZM23.1774 15.6174C23.3818 15.6174 23.5476 15.7797 23.5476 15.9798C23.5476 16.18 23.3818 16.3423 23.1774 16.3423C22.973 16.3423 22.8072 16.18 22.8072 15.9798C22.8072 15.7797 22.973 15.6174 23.1774 15.6174ZM12.4422 17.0671C11.9197 17.0671 11.4961 17.4818 11.4961 17.9933C11.4961 18.5048 11.9197 18.9194 12.4422 18.9194C12.9646 18.9194 13.3882 18.5048 13.3882 17.9933C13.3882 17.4818 12.9646 17.0671 12.4422 17.0671V17.0671ZM19.599 17.0671C19.0765 17.0671 18.653 17.4818 18.653 17.9933C18.653 18.5048 19.0765 18.9194 19.599 18.9194C20.1214 18.9194 20.545 18.5048 20.545 17.9933C20.545 17.4818 20.1214 17.0671 19.599 17.0671V17.0671Z",fill:"url(#paint6_radial_419_48383)"}),u.createElement("path",{d:"M12.4422 17.5101C12.7148 17.5101 12.9357 17.7264 12.9357 17.9933C12.9357 18.2602 12.7148 18.4765 12.4422 18.4765C12.1696 18.4765 11.9486 18.2602 11.9486 17.9933C11.9486 17.7264 12.1696 17.5101 12.4422 17.5101V17.5101ZM19.599 17.5101C19.8716 17.5101 20.0925 17.7264 20.0925 17.9933C20.0925 18.2602 19.8716 18.4765 19.599 18.4765C19.3264 18.4765 19.1054 18.2602 19.1054 17.9933C19.1054 17.7264 19.3264 17.5101 19.599 17.5101V17.5101ZM15.9794 19.0805C15.457 19.0805 15.0334 19.4952 15.0334 20.0067C15.0334 20.5182 15.457 20.9329 15.9794 20.9329C16.5019 20.9329 16.9255 20.5182 16.9255 20.0067C16.9255 19.4952 16.5019 19.0805 15.9794 19.0805ZM8.8226 19.2416C8.3683 19.2416 8 19.6022 8 20.047C8 20.4918 8.3683 20.8524 8.8226 20.8524C9.27695 20.8524 9.64525 20.4918 9.64525 20.047C9.64525 19.6022 9.27695 19.2416 8.8226 19.2416ZM23.1774 19.2416C22.723 19.2416 22.3548 19.6022 22.3548 20.047C22.3548 20.4918 22.723 20.8524 23.1774 20.8524C23.6317 20.8524 24 20.4918 24 20.047C24 19.6022 23.6317 19.2416 23.1774 19.2416Z",fill:"url(#paint7_radial_419_48383)"}),u.createElement("path",{d:"M15.9794 19.5235C16.252 19.5235 16.473 19.7398 16.473 20.0067C16.473 20.2736 16.252 20.4899 15.9794 20.4899C15.7068 20.4899 15.4859 20.2736 15.4859 20.0067C15.4859 19.7398 15.7068 19.5235 15.9794 19.5235ZM8.82261 19.6845C9.02706 19.6845 9.19281 19.8468 9.19281 20.047C9.19281 20.2471 9.02706 20.4094 8.82261 20.4094C8.61817 20.4094 8.45245 20.2471 8.45245 20.047C8.45245 19.8468 8.61817 19.6845 8.82261 19.6845V19.6845ZM23.1774 19.6845C23.3818 19.6845 23.5476 19.8468 23.5476 20.047C23.5476 20.2471 23.3818 20.4094 23.1774 20.4094C22.973 20.4094 22.8072 20.2471 22.8072 20.047C22.8072 19.8468 22.973 19.6845 23.1774 19.6845ZM12.4422 21.255C11.9879 21.255 11.6196 21.6156 11.6196 22.0604C11.6196 22.5052 11.9878 22.8658 12.4422 22.8658C12.8965 22.8658 13.2648 22.5052 13.2648 22.0604C13.2648 21.6156 12.8965 21.255 12.4422 21.255ZM19.599 21.2953C19.1446 21.2953 18.7763 21.6559 18.7763 22.1007C18.7763 22.5455 19.1446 22.9061 19.599 22.9061C20.0533 22.9061 20.4216 22.5455 20.4216 22.1007C20.4216 21.6559 20.0533 21.2953 19.599 21.2953Z",fill:"url(#paint8_radial_419_48383)"}),u.createElement("path",{d:"M12.4422 21.698C12.6466 21.698 12.8124 21.8602 12.8124 22.0604C12.8124 22.2606 12.6466 22.4228 12.4422 22.4228C12.2377 22.4228 12.072 22.2606 12.072 22.0604C12.072 21.8602 12.2377 21.698 12.4422 21.698ZM19.599 21.7383C19.8035 21.7383 19.9692 21.9005 19.9692 22.1007C19.9692 22.3008 19.8035 22.4631 19.599 22.4631C19.3946 22.4631 19.2288 22.3008 19.2288 22.1007C19.2288 21.9005 19.3946 21.7383 19.599 21.7383ZM15.9795 23.3893C15.5251 23.3893 15.1568 23.7498 15.1568 24.1946C15.1568 24.6394 15.5251 25 15.9795 25C16.4338 25 16.8021 24.6394 16.8021 24.1946C16.8021 23.7498 16.4338 23.3893 15.9795 23.3893V23.3893Z",fill:"url(#paint9_radial_419_48383)"}),u.createElement("path",{d:"M15.9794 23.8322C16.1838 23.8322 16.3496 23.9945 16.3496 24.1946C16.3496 24.3948 16.1838 24.5571 15.9794 24.5571C15.775 24.5571 15.6092 24.3948 15.6092 24.1946C15.6092 23.9945 15.775 23.8322 15.9794 23.8322ZM19.2699 13.7972L16.3496 15.5288L16.5848 15.9075L19.5051 14.176L19.2699 13.7972V13.7972ZM12.6761 13.7576L12.4331 14.1313L15.3945 15.9837L15.6375 15.6099L12.6761 13.7576V13.7576ZM11.8843 13.9551L9.16962 15.6061L9.40873 15.9824L12.1234 14.3314L11.8843 13.9551ZM22.9113 15.8855L19.9909 17.617L20.2262 17.9958L23.1465 16.2643L22.9113 15.8855ZM15.5077 16.0466L12.5874 17.7781L12.8226 18.1569L15.7429 16.4254L15.5077 16.0466V16.0466ZM16.5437 15.9944L16.3007 16.3681L19.2622 18.2205L19.5051 17.8467L16.5437 15.9944V15.9944Z",fill:"url(#paint10_radial_419_48383)"}),u.createElement("path",{d:"M20.0758 13.8205L19.8328 14.1942L22.7943 16.0466L23.0373 15.6728L20.0758 13.8205ZM9.16191 15.9308L8.91895 16.3045L11.8804 18.1569L12.1234 17.7832L9.16191 15.9308V15.9308Z",fill:"url(#paint11_radial_419_48383)"}))),Dv||(Dv=u.createElement("defs",null,u.createElement("radialGradient",{id:"paint0_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15.9999 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint1_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint2_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint3_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint4_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15.9999 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint5_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint6_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint7_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint8_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint9_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint10_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15.9999 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint11_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15.9999 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})))))},name:"Synapse"},{id:"swft",logoURI:function(e){return u.createElement("svg",mv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),uv||(uv=u.createElement("path",{d:"M14.0802 2.71222C14.0802 2.71222 12.9826 1.61464 11.6884 1.51537C10.3941 1.4161 9.89405 1.81505 9.99332 2.214C10.0926 2.61295 10.5421 2.66165 11.1396 2.2627C11.7371 1.86375 13.0332 1.96489 14.0802 2.71222Z",fill:"#0999FF"})),pv||(pv=u.createElement("path",{d:"M13.5408 2.87517C13.5408 2.87517 12.668 2.33013 11.8176 2.45936C10.9673 2.5886 10.6938 2.92012 10.8268 3.16174C10.9598 3.40336 11.2482 3.36964 11.576 3.02314C11.9038 2.67663 12.7523 2.54927 13.5408 2.87517Z",fill:"#0999FF"})),hv||(hv=u.createElement("path",{d:"M12.2597 2.99879C12.6341 2.88498 13.0346 2.89022 13.4059 3.01377C12.8628 2.91825 12.3439 3.13364 12.1866 3.39399C12.0293 3.65434 11.8476 3.71615 11.7352 3.58129C11.6228 3.44644 11.7408 3.1992 12.2597 2.99879Z",fill:"#0999FF"})),fv||(fv=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.7592 6.10048C17.8075 5.65096 17.1089 5.82703 16.1218 6.25033C15.425 6.5575 15.6236 7.84238 16.0225 8.93996C16.4215 10.0375 17.2194 13.8248 15.425 15.8176C13.9914 17.4099 12.8137 17.6032 10.5679 17.972C10.0027 18.0648 9.36998 18.1687 8.6485 18.3087C5.05982 19.0055 4.86128 21.697 4.86128 21.697C3.17126 12.5314 7.83234 10.1212 10.1284 8.93399C10.4049 8.79097 10.6472 8.6657 10.8399 8.5485C11.9352 7.87375 12.0384 6.61486 12.0958 5.91511C12.1082 5.7641 12.1184 5.63913 12.136 5.55169C12.1467 5.49883 12.1573 5.4355 12.1694 5.36375C12.2698 4.76704 12.4681 3.58853 13.5783 3.01003C16.9703 1.41797 19.7592 6.10048 19.7592 6.10048ZM10.8009 15.8525C11.5854 15.8693 12.9238 15.898 13.6045 14.5964C14.3724 13.1261 13.5221 11.8075 12.3084 11.3917C11.0946 10.9759 9.25161 11.5509 8.04352 13.2366C6.83543 14.9223 6.68934 16.9826 6.68934 16.9826C6.7545 16.9197 6.81451 16.8522 6.87696 16.782C7.13404 16.4929 7.4325 16.1574 8.302 15.8982C8.96656 15.7001 9.67011 15.7718 10.1431 15.82C10.3006 15.836 10.4326 15.8495 10.529 15.8495C10.6088 15.8484 10.7003 15.8504 10.8009 15.8525ZM18.5642 5.503C18.5642 5.503 16.62 5.24639 15.8727 5.9956C15.8727 5.9956 16.472 4.30989 18.5642 5.503Z",fill:"#0999FF"})))},name:"Swft"},{id:"hyphen",logoURI:function(e){return u.createElement("svg",nv({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),tv||(tv=u.createElement("path",{d:"M10.2675 16.7858V15.0715C10.2675 14.5915 10.6618 14.2143 11.1247 14.2143H12.839C13.319 14.2143 13.6961 14.5915 13.6961 15.0715V20.2143C13.6961 20.6943 13.319 21.0715 12.839 21.0715H4.26755C3.78755 21.0715 3.4104 20.6943 3.4104 20.2143V8.21433C3.4104 7.73433 3.03326 7.35719 2.55326 7.35719H2.05612C1.30183 7.35719 0.907546 6.43148 1.45612 5.90005L4.52469 2.81433C4.60378 2.73295 4.69838 2.66825 4.80291 2.62407C4.90745 2.57989 5.01978 2.55713 5.13326 2.55713C5.24674 2.55713 5.35908 2.57989 5.46361 2.62407C5.56814 2.66825 5.66275 2.73295 5.74183 2.81433L8.79326 5.90005C9.34183 6.43148 8.96469 7.35719 8.19326 7.35719H7.69612C7.21612 7.35719 6.83897 7.73433 6.83897 8.21433V16.7858C6.83897 17.2658 7.21612 17.6429 7.69612 17.6429H9.4104C9.8904 17.6429 10.2675 17.2658 10.2675 16.7858Z",fill:"#615CCD"})),rv||(rv=u.createElement("path",{d:"M20.5533 16.7858C20.5533 17.2658 20.9304 17.6429 21.4104 17.6429H21.9247C22.679 17.6429 23.0561 18.5686 22.5247 19.1001L19.4561 22.1686C19.1133 22.5115 18.5818 22.5115 18.239 22.1686L15.1704 19.1001C14.6218 18.5686 14.999 17.6429 15.7704 17.6429H16.2676C16.7476 17.6429 17.1247 17.2658 17.1247 16.7858V8.21436C17.1247 7.73436 16.7476 7.35721 16.2676 7.35721H14.5533C14.0733 7.35721 13.6961 7.73436 13.6961 8.21436V9.92864C13.6961 10.4086 13.319 10.7858 12.839 10.7858H11.1247C10.6447 10.7858 10.2676 10.4086 10.2676 9.92864V4.78578C10.2676 4.30578 10.6447 3.92864 11.1247 3.92864H19.6961C20.1761 3.92864 20.5533 4.30578 20.5533 4.78578V16.7858Z",fill:"#615CCD"})))},name:"Hyphen"},{id:"lifi",logoURI:function(e){return u.createElement("svg",av({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),ov||(ov=u.createElement("rect",{y:.5,width:24,height:24,rx:4,fill:"white"})),iv||(iv=u.createElement("rect",{x:7.5,y:6.5,width:8.72727,height:12,fill:"url(#pattern0)"})),sv||(sv=u.createElement("defs",null,u.createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:1,height:1},u.createElement("use",{xlinkHref:"#image0_1105_25179",transform:"translate(-0.958333 -0.393939) scale(0.0208333 0.0151515)"})),u.createElement("image",{id:"image0_1105_25179",width:252,height:124,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAB8CAYAAABNG92/AAAMbGlDQ1BJQ0MgUHJvZmlsZQAASImVlwdcU0kTwPeVJCQkBAhEQEroTRDpRUoILYKAVMFGSAIJJcaEIGJHj1Pw7CKKFT0V8dDTE5BDRezlUOz9sKCinId6KIrKtymg533l901++94/s7Mzs/P2lQWA3seTSvNQXQDyJQWyhMhQ1vi0dBbpCSACBP7owIPHl0vZ8fExAMrg+e/y9jq0hHLFRenrn/3/VfQFQjkfAGQi5EyBnJ8PuQUAfANfKisAgKjUW08vkCp5HmQDGUwQ8molZ6t5l5Iz1dyssklK4EC+BIAWlceTZQOgcxfqWYX8bOhH5yNkN4lALAGAPgJyEF/EE0BW5j4iP3+qkishO0B7KWSYD/DN/Mpn9t/8Zw755/Gyh1g9L5VohYnl0jzejP+zNP9b8vMUgzHsYKOKZFEJyvnDGt7MnRqtZCrkbklmbJyy1pD7xAJ13QFAKSJFVLLaHjXlyzmwfoAJ2U3AC4uGbAo5QpIXG6PRZ2aJI7iQ4WpBi8QF3CTIRpAXCeXhiRqbLbKpCZpYaH2WjMPW6M/wZKq4ylj3FbnJbI3/1yIhV+Mf0ykWJaVCpkC2KRSnxELWgewqz02M1tiMLhZxYgdtZIoEZf42kBOEkshQtX+sMEsWkaCxL8uXD84X2yISc2M1vL9AlBSlrg92gs9T5Q/ngl0SStjJg36E8vExg3MRCMPC1XPHngklyYkaP33SgtAE9VicIs2L19jjVsK8SKXeCrKnvDBRMxZPKYCLU+0fz5IWxCep88SLc3hj4tX54MtBDOCAMMACCtgywVSQA8Rt3Q3d8J+6JwLwgAxkAyFw0WgGR6SqeiTwmAiKwR+QhEA+NC5U1SsEhVD/aUirPrqALFVvoWpELngCOR9Egzz4X6EaJRmKlgIeQ434H9F5sPFhvnmwKfv/vX5Q+0XDhpoYjUYxGJFFH7QkhhPDiFHECKIjboIH4QF4DDyGwOaO++J+g/P4Yk94QmgnPCRcI3QQbk0Rl8i+yXIs6ID+IzS1yPy6Frgd9OmFh+KB0Dv0jDNxE+CCe8I4bDwYRvaCWo4mb2VVWN/4/tsMvroaGjuyGxklDyOHkB2+HanjpOM15EVZ66/ro841c6jenKGeb+Nzvqq+AJ6jv7XEFmEHsNPYMews1ow1ABZ2FGvELmCHlTy0uh6rVtdgtARVPrnQj/gf8QavrLKScrdaty63j+q+AmFRgfLG40yVzpCJs0UFLDZ8OwhZXAnfdQTL3c3dHQDlu0b9+HrDVL1DEOa5L7oSOgCj3w8MDDR/0cXYAvBLKbz9n3zROVTDx8R8AM6U8xWyQrUOVx4I8ClBh3eaMTAH1sABzscdeIMAEALCwRgQB5JAGpgMsxfBdS4D08EsMB+UgnKwHKwB68FmsA3sAj+B/aABNINj4BQ4Dy6Ba+AOXD2d4AXoAW9BP4IgJISGMBBjxAKxRZwRd8QXCULCkRgkAUlDMpBsRIIokFnIAqQcWYmsR7YiNcjPyCHkGHIWaUduIQ+QLuQ18gHFUCpqgJqhduhI1Bdlo9FoEjoJzUanocXoQnQpWolWo3vQevQYeh69hnagL9BeDGDaGBOzxFwwX4yDxWHpWBYmw+ZgZVgFVo3VYU3wOl/BOrBu7D1OxBk4C3eBKzgKT8b5+DR8Dr4EX4/vwuvxE/gV/AHeg38m0AimBGeCP4FLGE/IJkwnlBIqCDsIBwkn4b3USXhLJBKZRHuiD7wX04g5xJnEJcSNxL3EFmI78RGxl0QiGZOcSYGkOBKPVEAqJa0j7SEdJV0mdZL6tLS1LLTctSK00rUkWiVaFVq7tY5oXdZ6qtVP1iXbkv3JcWQBeQZ5GXk7uYl8kdxJ7qfoUewpgZQkSg5lPqWSUkc5SblLeaOtrW2l7ac9TlusPU+7Unuf9hntB9rvqfpUJyqHOpGqoC6l7qS2UG9R39BoNDtaCC2dVkBbSquhHafdp/XpMHRcdbg6Ap25OlU69TqXdV7SyXRbOps+mV5Mr6AfoF+kd+uSde10Obo83Tm6VbqHdG/o9uox9Ebpxenl6y3R2613Vu+ZPknfTj9cX6C/UH+b/nH9RwyMYc3gMPiMBYztjJOMTgOigb0B1yDHoNzgJ4M2gx5DfUNPwxTDIsMqw8OGHUyMacfkMvOYy5j7mdeZH4aZDWMPEw5bPKxu2OVh74yGG4UYCY3KjPYaXTP6YMwyDjfONV5h3GB8zwQ3cTIZZzLdZJPJSZPu4QbDA4bzh5cN3z/8tilq6mSaYDrTdJvpBdNeM3OzSDOp2Tqz42bd5kzzEPMc89XmR8y7LBgWQRZii9UWRy2eswxZbFYeq5J1gtVjaWoZZamw3GrZZtlvZW+VbFVitdfqnjXF2tc6y3q1dat1j42FzVibWTa1Nrdtyba+tiLbtbanbd/Z2dul2n1v12D3zN7InmtfbF9rf9eB5hDsMM2h2uGqI9HR1zHXcaPjJSfUyctJ5FTldNEZdfZ2FjtvdG4fQRjhN0IyonrEDReqC9ul0KXW5YEr0zXGtcS1wfXlSJuR6SNXjDw98rObl1ue23a3O6P0R40ZVTKqadRrdyd3vnuV+1UPmkeEx1yPRo9Xns6eQs9Nnje9GF5jvb73avX65O3jLfOu8+7ysfHJ8Nngc8PXwDfed4nvGT+CX6jfXL9mv/f+3v4F/vv9/wxwCcgN2B3wbLT9aOHo7aMfBVoF8gK3BnYEsYIygrYEdQRbBvOCq4MfhliHCEJ2hDxlO7Jz2HvYL0PdQmWhB0Pfcfw5szktYVhYZFhZWFu4fnhy+Prw+xFWEdkRtRE9kV6RMyNboghR0VErom5wzbh8bg23Z4zPmNljTkRToxOj10c/jHGKkcU0jUXHjhm7auzdWNtYSWxDHIjjxq2KuxdvHz8t/tdxxHHx46rGPUkYlTAr4XQiI3FK4u7Et0mhScuS7iQ7JCuSW1PoKRNTalLepYalrkztGD9y/Ozx59NM0sRpjemk9JT0Hem9E8InrJnQOdFrYunE65PsJxVNOjvZZHLe5MNT6FN4Uw5kEDJSM3ZnfOTF8ap5vZnczA2ZPXwOfy3/hSBEsFrQJQwUrhQ+zQrMWpn1LDswe1V2lyhYVCHqFnPE68WvcqJyNue8y43L3Zk7kJeatzdfKz8j/5BEX5IrOTHVfGrR1Haps7RU2jHNf9qaaT2yaNkOOSKfJG8sMIAf9RcUDorvFA8KgwqrCvump0w/UKRXJCm6MMNpxuIZT4sjin+cic/kz2ydZTlr/qwHs9mzt85B5mTOaZ1rPXfh3M55kfN2zafMz53/W4lbycqSvxakLmhaaLZw3sJH30V+V1uqUyorvfF9wPebF+GLxIvaFnssXrf4c5mg7Fy5W3lF+ccl/CXnfhj1Q+UPA0uzlrYt8162aTlxuWT59RXBK3at1FtZvPLRqrGr6lezVpet/mvNlDVnKzwrNq+lrFWs7aiMqWxcZ7Nu+bqP60Xrr1WFVu3dYLph8YZ3GwUbL28K2VS32Wxz+eYPW8Rbbm6N3FpfbVddsY24rXDbk+0p20//6PtjzQ6THeU7Pu2U7OzYlbDrRI1PTc1u093LatFaRW3Xnol7Lv0U9lNjnUvd1r3MveX7wD7Fvuc/Z/x8fX/0/tYDvgfqfrH9ZcNBxsGyeqR+Rn1Pg6ihozGtsf3QmEOtTQFNB391/XVns2Vz1WHDw8uOUI4sPDJwtPhob4u0pftY9rFHrVNa7xwff/zqiXEn2k5GnzxzKuLU8dPs00fPBJ5pPut/9tA533MN573P11/wunDwN6/fDrZ5t9Vf9LnYeMnvUlP76PYjl4MvH7sSduXUVe7V89dir7VfT75+88bEGx03BTef3cq79ep24e3+O/PuEu6W3dO9V3Hf9H71746/7+3w7jj8IOzBhYeJD+884j968Vj++GPnwie0JxVPLZ7WPHN/1twV0XXp+YTnnS+kL/q7S//Q+2PDS4eXv/wZ8ueFnvE9na9krwZeL3lj/GbnX55/tfbG995/m/+2/11Zn3Hfrve+709/SP3wtH/6R9LHyk+On5o+R3++O5A/MCDlyXiqTwEMNjQrC4DXOwGgpQHAgPs2ygT1XlAliHr/qiLwn1i9X1SJNwB18KT8jOe0ALAPNnvItHkAKD/hk0IA6uEx1DQiz/JwV/uiwp0QoW9g4I0ZAKQmAD7JBgb6Nw4MfNoOk70FQMs09R5UKUS4Z9jiqaTLzKJ54BtR70+/muO3Z6DMQDX8b+d/AU/6jzXPsPu0AAAAbGVYSWZNTQAqAAAACAAEARoABQAAAAEAAAA+ARsABQAAAAEAAABGASgAAwAAAAEAAgAAh2kABAAAAAEAAABOAAAAAAAAAJAAAAABAAAAkAAAAAEAAqACAAQAAAABAAAA/KADAAQAAAABAAAAfAAAAABezPYPAAAACXBIWXMAABYlAAAWJQFJUiTwAAAH8UlEQVR4Ae2d0U3cQBRFTYT4hQ7gi19IBUkqIFQQ6AAaIKQCoAPSQVJBkg6ggkAH8IOEhJRwEZOMVsZrrz3GM/eMZO2ud3bsd967+7zjmdmlP4+lokAAAhYE3lhYiZEQgMATAQRPIEDAiACCN3I2pkIAwRMDEDAigOCNnI2pEEDwxAAEjAggeCNnYyoEEDwxAAEjAgjeyNmYCgEETwxAwIgAgjdyNqZCAMETAxAwIoDgjZyNqRBA8MQABIwIIHgjZ2MqBBA8MQABIwII3sjZmAoBBE8MQMCIAII3cjamQgDBEwMQMCKA4I2cjakQQPDEAASMCCB4I2djKgQQPDEAASMCCN7I2ZgKAQSfMAaurq6qr1+/Vvv7+9Xbt2+rpaWl6vz8POERaRoCzQSW+KupZkBd3r24uKguLy+rnz9/Pm0S/GzZ2Niofv/+Pbub1xAYhQCC74FZAv/169c/gd/c3LRqjb/za4WJSgkILCdos9gmY3FL7G0FXiwQDMuOAIJvcFkscF2mUyCQOwEE/+xBZetY4MrgFAiURsBW8OpQk8AlbGVvBF5aaGNPHQEbwQeBS9za6nrQ6wCxDwIlESha8LoH/u3btyeB08FWUthiy6IEihW8BrhowAsFAhD4T6DYkXZra2v/reQZBCDwRKDogTca1XZ9fT05VzPwZnIusTmhYjO8PHh8fGzjSAyFQBsCRWd4AZhilifDtwlN6qQgUHSGF7C9vb0U3BZuc3V1deHP8kEI9CVQvOAPDg6qKYlsal9AfQOIz+dFoHjBq7deon/N8u7du+rz58/Vjx8/qtPT06Snojn3L20acDR02dzcfPF4R0dHgxxOfTEv2TTE/rq+Ho3haGp7EMNeoZFi78PHLCV4Ce329jbeneS5ribev39fbW9vPz3qOQUCUyFgIfiQ5b98+TI49yBwCVubhE6BwFQJWAhe8IfK8uvr60/CDgLXXQAKBHIhYCP4RbP81tbWv8wtkSPwXEKb86wjYCN4Gf/x48dq3mV9EHjI4EMM0Q1z7TUF99OnT3xp1EUi+0YhYCX4OqLqQQ/i1uMQJZ6KK5HHc+01qYdFLIeg/L8N3QHpU4bye59zGOuzNoKX6OLZc8q06rkfIoOr7Xgxjaa59k3vjeX00o5Td1utNBuHsqdYwQcR6t6ztng+vMTeZ334WNyzbQ/lGNqBQAoCRQheYo7Xg5cIm0rXjBCvdTev7abj8h4EXptA1oKX0HWZrlVtupSmnvbQwSZha4t/f3c5BnUhMEUCWQte99a7ir3OCRK2hlJK3Ai8jhD7SiGQteAl0r5FXxi7u7t9m+HzEMiCQNaCH4Jw6sksQ5wjbTQT+PDhQ3OFhndPTk6shkPbC15j39UpR8mXgH6SLVriuzeLtpHT597kdLIpzvW1p86msIk2IfASAXvBq8de9+UpEHAgYC94ObnrfXmHwMDGMgkg+Ee/Ksvv7OyU6WGsgkBEwL7TLrDQb/nv37+Hl8kep7S+XjIjR264z+SZpkFYI5sxyuEQ/DNmzZjSzLnUPfaaoksZlgA/ydrztLukb8qwqQMnzNBr7x5qQmBYAnYZvmnu89BZPsViGsO6n9bcCFgJXuvRzRtZpyy/6MiteDENDegZYq69W0Bib1oCWQteGVTTYptKLMKm7B7aUB1d9s9b0lp14qWo27QdjuH+eHd39yKC5eXlamVl5cX3eaMfgawFr0UsJLQgTmXwWIR6vkjRHxDMFglcxwrbom3Ptjvm68PDw15XHUONOxfLh4eHWtPv7+9r97NzGAJZC16i01hojaXW7RVtfYu+ROLx1bo/r8v8HAU+y6Lv1N+Yy2zbvM6DQNaCD4iVdfuUsGSVpsrqyyMU/WQYYr59aI9HCLw2gSIE3wWislTb5bC4Z96FLHVzIFC84MOS0bqcVfbuclkbZ/scnMk5QmAegeIEL0GHRSf1vM+y0GpHnx+ib2CeI3gfAmMQyF7wQdzKxikysjrs+ixpPYYTOQYE2hJY+vNY2laeWj1NeDk7O0t+WvqnGLJ8cswcYAQCWQu+7n55CmZ9/7gixTnRJgQWIYDgW1Ijy7cERbVJE3gz6bOb0MnptzwFArkTIMN38CBZvgMsqk6SABm+g1vmzbTr0BRVIfAqBMjwHbBruquyPNNeO0Cj6qQIkOE7uEPDcsnyHYBRdXIEEHxHl6QY3NPxFKgOgYUJIPgO6DR7jgzfARhVJ0cg+6G1KYnGq+VoPjy/3VPSpu0xCCD4Z8olrGgzRsBwjLwJ2Apel+fK2mHJKsbK5x3InH07AjaCD5fnQeRcnrcLEGqVRSBrwesyPCxgGbslvjwPAo/f5zkEXAlkPfBGPeZaiZXLc9fwxe6uBLIWfFdjqQ8BdwLch3ePAOy3IoDgrdyNse4EELx7BGC/FQEEb+VujHUngODdIwD7rQggeCt3Y6w7AQTvHgHYb0UAwVu5G2PdCSB49wjAfisCCN7K3RjrTgDBu0cA9lsRQPBW7sZYdwII3j0CsN+KAIK3cjfGuhNA8O4RgP1WBBC8lbsx1p0AgnePAOy3IoDgrdyNse4EELx7BGC/FQEEb+VujHUngODdIwD7rQggeCt3Y6w7AQTvHgHYb0UAwVu5G2PdCSB49wjAfisCCN7K3RjrTgDBu0cA9lsRQPBW7sZYdwII3j0CsN+KAIK3cjfGuhNA8O4RgP1WBBC8lbsx1p0AgnePAOy3IvAXd0VRjJTy4H0AAAAASUVORK5CYII="}))))},name:"LIFI"},{id:"nabox",logoURI:function(e){return u.createElement("svg",dv({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),lv||(lv=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 7.23999V18.418L4.73651 20.2838V12.2876L7.96146 14.1503V22.1412L11.199 24.007V12.8279L1.5 7.23999Z",fill:"#2AC98B"})),cv||(cv=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.85179 6.21724L12.0946 4.31675L16.1237 6.67449L12.883 8.56657L8.85179 6.21724ZM12.0988 0.5L2.32306 6.21934L12.8651 12.4001V24.5L16.0627 22.6374V10.3966L19.294 8.50455V20.7348L22.5389 18.8248V6.60827L12.0988 0.5Z",fill:"#2AC98B"})))},name:"Nabox"},{id:"bungee",logoURI:function(e){return u.createElement("svg",ev({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Kb||(Kb=u.createElement("g",{clipPath:"url(#clip0_1106_26400)"},u.createElement("path",{d:"M24 4.5C24 2.29086 22.2091 0.5 20 0.5H4C1.79086 0.5 0 2.29086 0 4.5V20.5C0 22.7091 1.79086 24.5 4 24.5H20C22.2091 24.5 24 22.7091 24 20.5V4.5Z",fill:"#FEA700"}),u.createElement("path",{d:"M3.26157 14.6479C4.44801 14.6479 5.40958 13.6862 5.40958 12.4999C5.40958 11.3137 4.44779 10.3519 3.26157 10.3519C2.07824 10.3519 1.1189 11.3088 1.11401 12.491V12.509C1.1189 13.691 2.07824 14.6479 3.26157 14.6479Z",fill:"#ED1E7F"}),u.createElement("path",{d:"M20.7367 14.6477C21.923 14.6477 22.8847 13.686 22.8847 12.4997C22.8847 11.3134 21.923 10.3517 20.7367 10.3517C19.5504 10.3517 18.5887 11.3134 18.5887 12.4997C18.5887 13.686 19.5504 14.6477 20.7367 14.6477Z",fill:"#4CB85D"}),u.createElement("path",{d:"M9.59911 15.9941C10.2391 15.9941 10.8329 15.7967 11.3251 15.4612V15.9438H12.672V12.9378C12.672 12.9314 12.6726 12.9252 12.6726 12.9187V12.0794C12.6726 11.1272 13.4471 10.3527 14.3993 10.3527C15.3535 10.3527 16.126 11.1272 16.126 12.0794V15.9438H17.4747V12.0794C17.4747 10.3825 16.0982 9.00586 14.3993 9.00586C13.7591 9.00586 13.1646 9.20338 12.6722 9.53919V9.05539H11.3253V12.9307C11.3189 13.8792 10.5475 14.6454 9.5993 14.6454C8.6453 14.6454 7.87264 13.873 7.87264 12.9187V9.05607H6.52399V12.9187C6.52375 14.6176 7.90019 15.9941 9.59911 15.9941Z",fill:"black"}))),$b||($b=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_1106_26400"},u.createElement("rect",{width:24,height:24,fill:"white",transform:"translate(0 0.5)"})))))},name:"Bungee"},{id:"squid",logoURI:function(e){return u.createElement("svg",Nv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Rv||(Rv=u.createElement("g",{clipPath:"url(#clip0_6759_209574)"},u.createElement("path",{d:"M23.7182 11.278C23.2776 12.8519 22.2417 14.5477 20.9174 15.1962C16.7933 17.2151 14.6496 12.8533 14.9088 9.67381C15.0643 7.76437 15.6835 6.24613 15.2064 4.69333C15.0542 4.19797 14.7307 3.73957 14.2008 3.49141C12.7469 2.81029 11.3241 3.74677 10.6627 4.73893C9.94895 5.80885 9.61391 7.14757 9.70463 8.37109C9.79151 9.54997 10.1995 10.3228 10.8149 11.3783C11.6371 12.7885 12.5126 13.7044 12.8477 14.7872C13.0637 15.4852 13.1865 16.6117 12.1944 16.7063C11.1465 16.8066 11.1993 15.4328 11.1845 14.7436C11.1398 12.6488 9.80927 11.8943 8.80751 9.48133C8.22239 8.07205 7.99439 6.58165 8.33663 5.11045C8.81807 3.04021 9.99119 1.37125 12.1061 0.793809C13.7971 0.332049 15.7555 0.710769 16.8259 2.19157C18.0984 3.95221 17.8502 6.02917 17.3328 7.87477C16.3752 11.289 17.2305 12.9167 18.0288 13.3424C19.5403 14.1484 21.1262 13.2354 21.8299 12.2677C22.5921 11.2194 23.0467 9.30709 22.9747 8.08309C22.9473 7.61557 22.9061 7.21333 22.8432 6.85237",fill:"white"}),u.createElement("path",{d:"M0 12.0001C0 12.8756 0.09456 13.7291 0.27264 14.5513C0.2544 13.9316 0.31536 13.3182 0.47568 12.746C0.91632 11.1721 1.95216 9.47627 3.27648 8.82779C7.40064 6.80891 9.54432 11.1707 9.28512 14.3502C9.1296 16.2596 8.5104 17.7779 8.98752 19.3307C9.13968 19.826 9.4632 20.2844 9.99312 20.5326C11.447 21.2137 12.8698 20.2772 13.5312 19.2851C14.245 18.2151 14.58 16.8764 14.4893 15.6529C14.4024 14.474 13.9944 13.7012 13.3795 12.6457C12.5573 11.2355 11.6818 10.3196 11.3467 9.23675C11.1307 8.53883 11.0078 7.41227 12 7.31771C13.0478 7.21739 12.995 8.59115 13.0099 9.28043C13.0546 11.3751 14.3851 12.1297 15.3869 14.5427C15.972 15.9519 16.2 17.4423 15.8578 18.9135C15.3763 20.9838 14.2032 22.6527 12.0883 23.2302C10.3973 23.6919 8.43888 23.3132 7.36848 21.8324C6.096 20.0718 6.34416 17.9948 6.8616 16.1492C7.8192 12.735 6.96384 11.1073 6.1656 10.6815C4.65408 9.87611 3.06816 10.7886 2.36448 11.7563C1.60224 12.8046 1.14768 14.7169 1.21968 15.9409C1.26432 16.7003 1.34592 17.2878 1.49664 17.8062",fill:"white"}),u.createElement("path",{d:"M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",fill:"#E6FA36"}),u.createElement("path",{d:"M15.8578 18.914C16.2 17.4428 15.972 15.9524 15.3869 14.5432C14.3851 12.1302 13.0541 11.3752 13.0099 9.28092C12.9955 8.59164 13.0479 7.21788 12 7.3182C11.0079 7.41324 11.1307 8.5398 11.3467 9.23772C11.6818 10.3206 12.5578 11.2364 13.3795 12.6467C13.9949 13.7022 14.4024 14.475 14.4893 15.6539C14.5795 16.8774 14.245 18.2161 13.5312 19.286C12.8693 20.2782 11.4471 21.2147 9.99313 20.5336C9.46321 20.2854 9.13969 19.8265 8.98753 19.3316C8.51089 17.7784 9.12961 16.2606 9.28513 14.3512C9.54433 11.1716 7.40017 6.80988 3.27649 8.82876C1.95217 9.47724 0.916332 11.1726 0.475692 12.747C0.315372 13.3196 0.254412 13.9326 0.272652 14.5523C0.523212 15.7081 0.939852 16.802 1.49665 17.8076C1.34593 17.2888 1.26433 16.7017 1.21969 15.9424C1.14769 14.7188 1.60273 12.806 2.36449 11.7577C3.06769 10.79 4.65409 9.87708 6.16561 10.683C6.96385 11.1088 7.81921 12.7364 6.86161 16.1507C6.34369 17.9968 6.09553 20.0732 7.36849 21.8339C8.43889 23.3147 10.3973 23.6934 12.0883 23.2316C14.2032 22.6532 15.3768 20.9843 15.8578 18.914Z",fill:"black"}),u.createElement("path",{d:"M23.7182 11.2782C23.8008 10.984 23.8565 10.6787 23.8891 10.3676C23.8891 10.3691 23.8896 10.37 23.8896 10.371C23.7206 9.12732 23.3616 7.94412 22.8422 6.85164C22.9051 7.21308 22.9464 7.61484 22.9737 8.08236C23.0457 9.30588 22.5907 11.2187 21.8289 12.267C21.1257 13.2347 19.5393 14.1476 18.0278 13.3417C17.2296 12.916 16.3742 11.2883 17.3318 7.87404C17.8497 6.02796 18.0979 3.95148 16.8249 2.19084C15.7545 0.710036 13.7961 0.331317 12.1051 0.793076C9.99021 1.37052 8.81661 3.03948 8.33565 5.10972C7.99341 6.58092 8.22141 8.07132 8.80653 9.4806C9.80829 11.8936 11.1393 12.6486 11.1835 14.7428C11.1979 15.4321 11.1456 16.8059 12.1934 16.7056C13.1856 16.6105 13.0627 15.484 12.8467 14.7865C12.5117 13.7036 11.6356 12.7878 10.8139 11.3776C10.1985 10.322 9.79101 9.54924 9.70365 8.37036C9.61341 7.14684 9.94797 5.80812 10.6617 4.7382C11.3236 3.74604 12.7459 2.80956 14.1998 3.49068C14.7297 3.73884 15.0532 4.19772 15.2054 4.6926C15.682 6.24588 15.0633 7.76364 14.9078 9.67308C14.6486 12.8526 16.7928 17.2144 20.9165 15.1955C22.2413 14.548 23.2776 12.8521 23.7182 11.2782Z",fill:"black"}))),Sv||(Sv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_6759_209574"},u.createElement("rect",{width:24,height:24,fill:"white"})))))},name:"Squid"},{id:"across",logoURI:function(e){return u.createElement("svg",Qb({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Xb||(Xb=u.createElement("rect",{width:32,height:32,rx:16,fill:"#6CF9D8"})),Jb||(Jb=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.95021 8.41988L8.50949 6.8606L14.7408 13.0919C14.3626 13.253 14.0083 13.4879 13.6998 13.7964C13.4609 14.0353 13.2662 14.3017 13.1157 14.5853L6.95021 8.41988ZM12.9982 17.4399L6.85803 23.5801L8.41732 25.1394L14.495 19.0617C14.209 18.9107 13.9405 18.7149 13.6998 18.4742C13.3932 18.1675 13.1593 17.8156 12.9982 17.4399ZM17.5887 19.0584L23.5826 25.0522L25.1418 23.493L19.0822 17.4333C18.921 17.8114 18.6862 18.1657 18.3777 18.4742C18.1388 18.7131 17.8724 18.9079 17.5887 19.0584ZM18.9652 14.5916L25.0497 8.50706L23.4904 6.94778L17.3434 13.0947C17.7191 13.2558 18.071 13.4897 18.3777 13.7964C18.6184 14.037 18.8142 14.3055 18.9652 14.5916Z",fill:"#2D2E33"})))},name:"Across"},{id:"layerswap",logoURI:function(e){return u.createElement("svg",Zv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Uv||(Uv=u.createElement("g",{clipPath:"url(#clip0_8229_671)"},u.createElement("path",{opacity:.3,d:"M11.4062 12.7691C11.4062 12.0165 12.0163 11.4065 12.7688 11.4065H24.5209C25.2735 11.4065 25.8835 12.0165 25.8835 12.7691V24.5213C25.8835 25.2738 25.2735 25.8837 24.5209 25.8837H12.7688C12.0163 25.8837 11.4062 25.2738 11.4062 24.5213V12.7691Z",fill:"#FF0093"}),u.createElement("path",{opacity:.5,d:"M23.2097 21.847C23.2097 22.5995 22.5996 23.2094 21.8471 23.2094H10.095C9.34246 23.2094 8.73242 22.5995 8.73242 21.847V10.0947C8.73242 9.34222 9.34246 8.73218 10.095 8.73218H21.8471C22.5996 8.73218 23.2097 9.34222 23.2097 10.0947V21.847Z",fill:"#FF0093"}),u.createElement("path",{opacity:.9,d:"M20.5349 19.1718C20.5349 19.9244 19.9249 20.5344 19.1723 20.5344H7.42018C6.66766 20.5344 6.05762 19.9244 6.05762 19.1718V7.4197C6.05762 6.66717 6.66766 6.05713 7.42018 6.05713H19.1723C19.9249 6.05713 20.5349 6.66717 20.5349 7.4197V19.1718Z",fill:"#FF0093"}))),Vv||(Vv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_8229_671"},u.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(6 6)"})))))},name:"Layerswap"},{id:"okx",logoURI:function(e){return u.createElement("svg",Yv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Hv||(Hv=u.createElement("g",{clipPath:"url(#clip0_1443_44689)"},u.createElement("path",{d:"M21 0H11C4.92487 0 0 4.92487 0 11V21C0 27.0751 4.92487 32 11 32H21C27.0751 32 32 27.0751 32 21V11C32 4.92487 27.0751 0 21 0Z",fill:"black"}),u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.6063 6.99255H7.39351C7.17207 6.99255 6.99255 7.17207 6.99255 7.39351V12.6063C6.99255 12.8278 7.17207 13.0073 7.39351 13.0073H12.6063C12.8278 13.0073 13.0073 12.8278 13.0073 12.6063V7.39351C13.0073 7.17207 12.8278 6.99255 12.6063 6.99255ZM18.6237 13.0073H13.4109C13.1895 13.0073 13.0099 13.1869 13.0099 13.4083V18.6211C13.0099 18.8426 13.1895 19.0221 13.4109 19.0221H18.6237C18.8452 19.0221 19.0247 18.8426 19.0247 18.6211V13.4083C19.0247 13.1869 18.8452 13.0073 18.6237 13.0073ZM19.4231 6.99255H24.6359C24.8574 6.99255 25.0369 7.17207 25.0369 7.39351V12.6063C25.0369 12.8278 24.8574 13.0073 24.6359 13.0073H19.4231C19.2016 13.0073 19.0221 12.8278 19.0221 12.6063V7.39351C19.0221 7.17207 19.2016 6.99255 19.4231 6.99255ZM12.6063 19.0221H7.39351C7.17207 19.0221 6.99255 19.2016 6.99255 19.4231V24.6359C6.99255 24.8574 7.17207 25.0369 7.39351 25.0369H12.6063C12.8278 25.0369 13.0073 24.8574 13.0073 24.6359V19.4231C13.0073 19.2016 12.8278 19.0221 12.6063 19.0221ZM19.4231 19.0221H24.6359C24.8574 19.0221 25.0369 19.2016 25.0369 19.4231V24.6359C25.0369 24.8574 24.8574 25.0369 24.6359 25.0369H19.4231C19.2016 25.0369 19.0221 24.8574 19.0221 24.6359V19.4231C19.0221 19.2016 19.2016 19.0221 19.4231 19.0221Z",fill:"white"}))),zv||(zv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_1443_44689"},u.createElement("rect",{width:32,height:32,fill:"white"})))))},name:"okx"},{id:"symbiosis",logoURI:function(e){return u.createElement("svg",Jv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Gv||(Gv=u.createElement("g",{clipPath:"url(#clip0_8229_679)"},u.createElement("path",{d:"M13.8614 16.7844L14.4243 16.2215V14.2548L13.8614 13.6919H13.0938L12.5601 14.2548V16.2215L13.0938 16.7844H13.8614Z",fill:"#75FB6E"}),u.createElement("path",{d:"M18.9063 16.7625L19.44 16.1995V14.2548L18.9063 13.6919H18.1313L17.5757 14.2548V16.1995L18.1313 16.7625H18.9063Z",fill:"#75FB6E"}),u.createElement("path",{d:"M31.5175 12.332L30.7425 12.2296L27.9717 14.3571L27.862 15.1321L27.7377 15.2417H26.9847L26.4217 15.7973V16.5431L26.9335 17.0548V17.318L26.3998 17.881L26.4217 21.3683L26.9847 21.902L27.0139 22.1725L27.0286 22.1871L26.5022 22.7062V23.4812L26.2609 23.7151H22.3422L22.1083 23.4812V23.079V19.5552L21.9986 19.4528L21.5454 18.9995V18.729L21.5015 18.6925L22.0498 18.1442V17.3984L22.0133 17.3546L22.1083 17.3473L22.2618 17.1572L23.0368 17.0768L24.9011 14.6788L24.828 13.9331L25.0107 13.743L25.0034 13.6699L25.0107 13.6626L24.9888 13.4505L24.9815 13.3994L25.5444 12.8364L25.4933 8.36212L24.9303 7.82842V7.76993L24.9596 7.53598L24.7475 7.26548L24.8207 6.49052L22.9344 4.09253L22.1595 4.01211L22.0425 3.85858L22.0498 3.85127V3.10555L21.5161 2.54261H20.8289H20.7704L20.5072 2.33059V1.56294L19.915 1H16.0548H15.9452H12.0777L11.4928 1.56294V2.33059L11.2296 2.54261H11.1711H10.4766L9.94288 3.10555V3.85127L9.95019 3.85858L9.84053 4.01211L9.06557 4.09253L7.17204 6.49052L7.25246 7.26548L7.04044 7.53598L7.06968 7.76993V7.82842L6.50674 8.36212L6.45556 12.8364L7.01119 13.3994L6.98926 13.743L7.19397 13.955L7.12086 14.6788L8.98515 17.0768L9.76011 17.1572L9.92095 17.3473L9.98675 17.3546L9.94288 17.3984V18.1442L10.4766 18.7071L10.4546 18.729V18.9995L10.0014 19.4528L9.89171 19.5552V23.079V23.4812L9.65045 23.7151H5.73178L5.49052 23.4812V22.7062L4.95682 22.1725L4.98606 21.902L5.54901 21.3683L5.57094 17.881L5.03724 17.318L5.06648 17.0548L5.57094 16.5431V15.7973L5.01531 15.2417H4.25497L4.13068 15.1321L4.02833 14.3571L1.25017 12.2296L0.482522 12.332L0 12.9461L0.109664 13.721L2.88051 15.8485L3.65547 15.7462L3.71396 15.79L3.70665 15.7973V16.5431L4.24035 17.106H4.26959V17.2668L3.70665 17.8225L3.65547 21.3171L4.18917 21.8801V22.1432H4.15993L3.62623 22.7062V23.4812L4.15993 24.0148H4.93489L5.17615 24.2488V25.0238L5.70985 25.5575H9.62851L10.1841 25.0238V24.2488L10.4254 24.0148H11.2296L11.756 23.4812V23.2106V19.5552L11.2808 18.9995L11.2515 18.7071L11.8145 18.1442V17.3984L11.2515 16.8355H10.4985L10.3742 16.6747L10.4546 15.907L8.56111 13.509L7.78615 13.4286V13.4213V13.3994L8.3491 12.8657L8.37103 8.4133L7.83733 7.85035L7.84464 7.76993L7.86657 7.748L8.64153 7.66758L10.5058 5.26959L10.4254 4.49463L10.4912 4.41421H11.2515L11.8145 3.85127V3.15673V3.10555L12.0777 2.89353H15.9452H16.0548H19.915L20.1855 3.10555V3.15673V3.85127L20.7485 4.41421H21.5088L21.5746 4.49463L21.4942 5.26959L23.3585 7.66758L24.1334 7.748L24.148 7.76993L24.1554 7.85035L23.6217 8.4133L23.6509 12.8657L24.2138 13.3994V13.4286L23.4681 13.509L21.5746 15.907L21.6477 16.6747L21.5088 16.8574L21.4942 16.8355H20.7192L20.1855 17.3984V18.1442L20.7192 18.7071H20.7485L20.7192 18.9995L20.2659 19.5552V23.2106V23.4812L20.7996 24.0148H21.5746L21.8085 24.2488V25.0238L22.3715 25.5575H26.2902L26.8239 25.0238V24.2488L27.0651 24.0148H27.8401L28.3738 23.4812V22.7062L27.8401 22.1432H27.7816V21.8801L28.3153 21.3171L28.2641 17.8225L27.7012 17.2668V17.106H27.7597L28.2934 16.5431V15.7973L28.286 15.79L28.3445 15.7462L29.1195 15.8485L31.8903 13.721L32 12.9461L31.5175 12.332Z",fill:"#75FB6E"}),u.createElement("path",{d:"M13.5693 23.854L13.0137 24.4096V25.1846L12.7724 25.4259H11.9975L8.2689 29.074V29.827L8.02764 30.061H4.10897L3.86771 29.827V29.0521L3.30477 28.4891H2.53712L2.00342 29.0521V29.827L2.53712 30.3607H3.30477L3.54603 30.5947V31.3697L4.07973 31.9034H7.99839L8.56133 31.3697V30.5947L8.79528 30.3607L8.82453 30.3827H9.59949L13.3354 26.7345V25.9596L13.5474 25.7183H14.2931L14.9072 25.1846V24.4096L14.3443 23.854H13.5693Z",fill:"#75FB6E"}),u.createElement("path",{d:"M28.7465 28.4891L28.1836 29.0521V29.827L27.9423 30.061H24.0236L23.7824 29.827V29.074L20.0538 25.4259H19.2788L19.0376 25.1846V24.4096L18.4819 23.854H17.707L17.144 24.4096V25.1846L17.7582 25.7183H18.5039L18.7159 25.9596V26.7345L22.4518 30.3827H23.2267L23.2487 30.3607L23.4899 30.5947V31.3697L24.0529 31.9034H27.9716L28.5052 31.3697V30.5947L28.7465 30.3607H29.5142L30.0479 29.827V29.0521L29.5142 28.4891H28.7465Z",fill:"#75FB6E"}))),Xv||(Xv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_8229_679"},u.createElement("rect",{width:32,height:30.9034,fill:"white",transform:"translate(0 1)"})))))},name:"symbiosis"},{id:"scroll",logoURI:dy,name:"Scroll"},{id:"manta",logoURI:fy,name:"Manta"},{id:"orbiter",logoURI:function(e){return u.createElement("svg",Qv({xmlns:"http://www.w3.org/2000/svg",width:"32.000000pt",height:"32.000000pt",viewBox:"0 0 32.000000 32.000000",preserveAspectRatio:"xMidYMid meet"},e),qv||(qv=u.createElement("g",{transform:"translate(0.000000,32.000000) scale(0.100000,-0.100000)",fill:"#000000",stroke:"none"},u.createElement("path",{d:"M91 285 c-32 -28 -56 -85 -48 -115 3 -11 -5 -27 -19 -41 -32 -30 -30 -39 7 -39 32 0 34 -5 14 -53 -14 -33 11 -17 28 18 14 29 22 35 47 35 28 0 30 -2 30 -40 0 -51 18 -53 22 -2 3 32 7 37 31 40 23 3 30 -2 42 -32 9 -20 20 -36 26 -36 7 0 8 7 4 18 -20 47 -18 52 14 52 36 0 39 10 11 35 -13 11 -20 31 -20 53 0 107 -112 171 -189 107z m112 4 c12 -6 30 -21 39 -33 22 -26 24 -96 4 -96 -29 0 -46 13 -46 35 0 30 -26 56 -48 48 -22 -8 -32 -23 -32 -49 0 -21 -17 -34 -46 -34 -10 0 -14 12 -14 38 1 75 78 124 143 91z m-25 -82 c2 -10 -3 -17 -12 -17 -18 0 -29 16 -21 31 9 14 29 6 33 -14z m-88 -92 c0 -8 -4 -15 -9 -15 -13 0 -22 16 -14 24 11 11 23 6 23 -9z m80 0 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m82 0 c0 -5 -5 -11 -11 -13 -6 -2 -11 4 -11 13 0 9 5 15 11 13 6 -2 11 -8 11 -13z"}))))},name:"Orbiter"}];function $v({routeTagList:t}){const r=Tn(),n={typography:"h6",borderRadius:4,px:8,py:4,ml:8};return nt.exports.jsx(nt.exports.Fragment,{children:t.map((t=>"no-approve"===t.type?nt.exports.jsxs(Nn,{sx:Object.assign(Object.assign({},n),{color:r.palette.text.primary,backgroundColor:r.palette.background.paperContrast,display:"flex",alignItems:"center"}),children:[nt.exports.jsx(U,{style:{color:r.palette.text.primary,width:14,height:14}}),nt.exports.jsx("span",{style:{marginLeft:4},children:nt.exports.jsx(e,{id:"F+sxb9",message:"Unapproved"})})]},t.type):"best-price"===t.type?nt.exports.jsx(Nn,{sx:Object.assign(Object.assign({},n),{color:r.palette.success.main,backgroundColor:Zn(r.palette.success.main,.1)}),children:nt.exports.jsx(e,{id:"OgKD6h",message:"Best offer"})},t.type):null))})}function ex(e,t){let r=n._({id:"B0/2ea",message:"s"});return t||(r=e>=2?n._({id:"V+rJKF",message:"Seconds"}):n._({id:"ku//5b",message:"Second"})),r}function tx(e,t){let r="";return r=e>=2?t?n._({id:"TFOxRM",message:"Mins"}):n._({id:"agRWc1",message:"Minutes"}):t?n._({id:"eTUF28",message:"Min"}):n._({id:"6UYTy8",message:"Minute"}),r}function rx(e){return e>=2?n._({id:"yY8wAv",message:"Hours"}):n._({id:"6XgEPi",message:"Hour"})}function nx({start:e,end:t,showSecondUnit:r}){if(!e||!t)return null;const o=t-e,i=1e3,s=6e4,a=36e5,l=24*a;let c="",d="";if(o<s){const e=o/i;c=`${ba(e)} ${ex(e,r)}`}else if(o<a){const e=o/s;c=`${ba(e)} ${tx(e,r)}`;const t=o%s/i;d=`${ba(t)} ${ex(t,r)}`}else if(o<l){const e=o/a;c=`${ba(e)} ${rx(e)}`;const t=o%a/s;d=`${ba(t)} ${tx(t)}`}else{const e=o/l;c=`${ba(e)} ${function(e){return e>=2?n._({id:"HuVZMK",message:"Days"}):n._({id:"H7OUPr",message:"Day"})}(e)}`;const t=o%l/a;d=`${ba(t)} ${rx(t)}`}return r?`${c}${d}`.replaceAll(" ","").toLowerCase():c}function ox({chainId:t,token:r,amount:n}){var o;const i=Tn(),s=w((()=>xy.get(t)),[t]);return nt.exports.jsxs(Nn,{sx:{display:"flex",flexDirection:"column"},children:[nt.exports.jsxs(Nn,{sx:{mb:8,display:"flex",alignItems:"flex-end",alignSelf:"center"},children:[nt.exports.jsx(wy,{address:null!==(o=null==r?void 0:r.address)&&void 0!==o?o:"",marginRight:0,width:28,height:28,url:null==r?void 0:r.logoURI}),s?nt.exports.jsx(Nn,{component:s.logo,sx:{width:12,height:12,position:"relative",left:-6}}):""]}),nt.exports.jsxs(Nn,{sx:{color:i.palette.text.primary,typography:"body1",fontWeight:600,width:"100%",wordBreak:"break-word",textAlign:"center"},children:[ha({input:n,decimals:null==r?void 0:r.decimals})," ",null==r?void 0:r.symbol]}),nt.exports.jsxs(Nn,{sx:{color:i.palette.text.secondary,typography:"h6",alignSelf:"center"},children:[nt.exports.jsx(e,{id:"Fdp03t",message:"on"})," ",null==s?void 0:s.name]})]})}function ix({children:e}){const t=Tn();return nt.exports.jsxs(Nn,{sx:{position:"relative",width:"calc(100% - 16px)",mx:"auto"},children:[nt.exports.jsx(Nn,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",borderTopColor:t.palette.text.primary,borderTopWidth:1,borderTopStyle:"dashed","&:before":{content:'""',position:"absolute",left:0,top:-.5,backgroundColor:t.palette.text.primary,width:6,height:6,borderRadius:"50%",transform:"translate(-50%, -50%)"},"&:after":{display:{tablet:"block"},content:'""',position:"absolute",right:-1,top:-.5,width:0,height:0,transform:"translate(0, -50%)",borderTop:"4px solid transparent",borderBottom:"4px solid transparent",borderLeft:`6px solid ${t.palette.text.primary}`}}}),nt.exports.jsx(Nn,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:e})]})}function sx({size:e="medium",toolDetails:t,nameMarginLeft:r=4,logoMarginLeft:n=0,nameSx:o}){const i=Tn();if(!t||!t.logoURI||!t.name)return null;const{logoURI:s,name:a}=t;return nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{component:"img",src:s,alt:a,sx:{marginLeft:n,width:"large"===e?24:16,height:"large"===e?24:16}}),nt.exports.jsx(Nn,{sx:Object.assign({color:i.palette.text.primary,fontWeight:600,marginLeft:r,typography:{mobile:"small"===e?"h6":"medium"===e?"body2":"caption",tablet:"small"===e||"medium"===e?"body2":"caption"}},o),children:a})]})}function ax({fromToken:t,toToken:r,fromChainId:n,toChainId:o,fromAmount:i,fromTokenBalance:s,toTokenAmount:a,toolDetails:l,product:c,executionDuration:d,feeUSD:u,selected:p,setSelected:h,spenderContractAddress:f,isBestPrice:m}){const g=Tn(),{account:y}=Bf(),b=Kv.find((e=>e.id===c)),{getApprovalState:v}=Lb({account:y,chainId:n,contractAddress:f}),x=w((()=>t&&i&&s?v(t,i,s):Fb.Loading),[t,i,s,v]),E=w((()=>{const e=[];return m&&e.push({type:"best-price"}),x===Fb.Approving||x===Fb.Insufficient?[...e,{type:"no-approve"}]:e}),[x,m]);return nt.exports.jsxs(Nn,{sx:Object.assign({borderRadius:16,py:16,px:12,backgroundColor:g.palette.background.tag,cursor:"pointer","&:hover":{backgroundColor:"hover.default"},outline:0},p?{borderWidth:1,borderStyle:"solid",borderColor:g.palette.primary.main}:{}),onClick:h,children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[nt.exports.jsx(Nn,{component:null==b?void 0:b.logoURI,sx:{width:16,height:16}}),nt.exports.jsx(Nn,{sx:{marginLeft:4},children:null==b?void 0:b.name}),nt.exports.jsx($v,{routeTagList:E})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",mt:8,pb:8,borderStyle:"dashed",borderWidth:g.spacing(0,0,1,0),borderColor:g.palette.border.main},children:[nt.exports.jsx(hs,{onlyHover:!0,placement:"top",title:nt.exports.jsx(e,{id:"h5FVz1",message:"Estimated transaction time"}),children:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${g.palette.border.main}`,borderRadius:4,typography:"h6"},children:[nt.exports.jsx(V,{style:{color:g.palette.text.secondary,width:14,height:14}}),nt.exports.jsx(Nn,{sx:{ml:4,lineHeight:1},children:null!==d?nx({start:Date.now(),end:Date.now()+1e3*d}):"-"})]})}),nt.exports.jsx(hs,{onlyHover:!0,placement:"top",title:nt.exports.jsx(e,{id:"7IKPTP",message:"Fee includes: Cross Chain fees + Swap fees. Gas fee not included."}),children:nt.exports.jsxs(Nn,{sx:{ml:8,display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${g.palette.border.main}`,borderRadius:4,typography:"h6"},children:[nt.exports.jsx(Z,{style:{color:g.palette.text.secondary,width:14,height:14}}),nt.exports.jsx(Nn,{sx:{ml:4,lineHeight:1},children:null!==u?`$${ha({input:u,decimals:6})}`:"-"})]})})]}),nt.exports.jsxs(Nn,{sx:{display:"grid",gridTemplateColumns:"36% 28% 36%",mt:8},children:[nt.exports.jsx(ox,{token:t,chainId:n,amount:i}),nt.exports.jsx(ix,{children:nt.exports.jsx(Nn,{sx:{display:"flex",px:3,py:3,backgroundColor:g.palette.background.paperContrast,border:`1px solid ${g.palette.border.main}`,borderRadius:"50%",alignItems:"center",width:24,height:24,overflow:"hidden"},children:nt.exports.jsx(sx,{size:"medium",toolDetails:l,nameMarginLeft:8})})}),nt.exports.jsx(ox,{token:r,chainId:o,amount:a})]})]})}function lx({open:t,onClose:r,selectedRouteId:n,setSelectRouteId:o,bridgeRouteList:i}){const s=Tn(),a=Qf(),l=w((()=>{if(!(null==i?void 0:i.length))return null;const{fromToken:e}=i[0];return a(e)}),[i,a]);return nt.exports.jsx(ky,{open:t,onClose:r,title:nt.exports.jsx(e,{id:"K/PgcA",message:"Select Cross Chain"}),children:nt.exports.jsx(Nn,{sx:{position:"relative",display:"flex",flexDirection:"column",gap:12,py:20,px:16,flex:1,overflowY:"auto",overflowX:"hidden","&::before":{content:'""',position:"absolute",top:0,width:1,height:"1px",backgroundColor:s.palette.border.main}},children:null==i?void 0:i.map(((e,t)=>{var i;return nt.exports.jsx(ax,{fromChainId:e.fromChainId,toChainId:e.toChainId,fromToken:e.fromToken,toToken:e.toToken,fromAmount:e.fromAmount,fromTokenBalance:l,toTokenAmount:e.toTokenAmount,toolDetails:null===(i=e.step)||void 0===i?void 0:i.toolDetails,spenderContractAddress:e.spenderContractAddress,selected:n===e.id,setSelected:()=>{o(e.id),r()},isBestPrice:0===t,product:e.product,executionDuration:e.executionDuration,feeUSD:e.feeUSD},e.key)}))})})}function cx({route:t,onClick:r}){var n,o;const i=Tn();if(!t)return null;const{product:s,executionDuration:a,feeUSD:l,fromAmount:c,fromToken:d,fromChainId:u,toTokenAmount:p,toToken:h,toChainId:f}=t,m=Kv.find((e=>e.id===s)),g=xy.get(u),y=xy.get(f);return nt.exports.jsxs(Nn,{sx:{px:16,py:8,width:"100%",backgroundColor:"background.tag",borderRadius:12,cursor:"pointer","&:hover":{backgroundColor:"hover.default"}},onClick:r,children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[nt.exports.jsx(Nn,{component:null==m?void 0:m.logoURI,sx:{width:16,height:16}}),nt.exports.jsx(Nn,{sx:{marginLeft:4,typography:"body2",fontWeight:600},children:null==m?void 0:m.name}),nt.exports.jsx(Nn,{sx:{display:"block",mx:8,width:"1px",height:12,backgroundColor:i.palette.border.main}}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",typography:"body2",fontWeight:600},children:[ha({input:c,decimals:null==d?void 0:d.decimals}),nt.exports.jsxs(Nn,{sx:{ml:4,display:"flex",alignItems:"flex-end",alignSelf:"center",width:18,height:18},children:[nt.exports.jsx(wy,{address:null!==(n=null==d?void 0:d.address)&&void 0!==n?n:"",marginRight:0,width:18,height:18,url:null==d?void 0:d.logoURI}),g?nt.exports.jsx(Nn,{component:g.logo,sx:{position:"relative",left:-6,width:10,height:10,flexShrink:0}}):""]})]})," = ",nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",typography:"body2",fontWeight:600},children:[ha({input:p,decimals:null==h?void 0:h.decimals}),nt.exports.jsxs(Nn,{sx:{ml:4,display:"flex",alignItems:"flex-end",alignSelf:"center",width:18,height:18},children:[nt.exports.jsx(wy,{address:null!==(o=null==h?void 0:h.address)&&void 0!==o?o:"",marginRight:0,width:18,height:18,url:null==h?void 0:h.logoURI}),y?nt.exports.jsx(Nn,{component:y.logo,sx:{width:10,height:10,position:"relative",left:-6,flexShrink:0}}):""]})]})]}),nt.exports.jsx(Nn,{component:H,sx:{width:18,height:18}})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",mt:8},children:[nt.exports.jsx(hs,{onlyHover:!0,placement:"top",title:nt.exports.jsx(e,{id:"h5FVz1",message:"Estimated transaction time"}),children:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${i.palette.border.main}`,borderRadius:4,typography:"h6"},children:[nt.exports.jsx(V,{style:{color:i.palette.text.secondary,width:14,height:14}}),nt.exports.jsx(Nn,{sx:{ml:4,lineHeight:1},children:null!==a?nx({start:Date.now(),end:Date.now()+1e3*a}):"-"})]})}),nt.exports.jsx(hs,{onlyHover:!0,placement:"top",title:nt.exports.jsx(e,{id:"7IKPTP",message:"Fee includes: Cross Chain fees + Swap fees. Gas fee not included."}),children:nt.exports.jsxs(Nn,{sx:{ml:8,display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${i.palette.border.main}`,borderRadius:4,typography:"h6"},children:[nt.exports.jsx(Z,{style:{color:i.palette.text.secondary,width:14,height:14}}),nt.exports.jsx(Nn,{sx:{ml:4,lineHeight:1},children:null!==l?`$${ha({input:l,decimals:6})}`:"-"})]})})]})]})}function dx(){const{provider:e,account:t}=Bf(),[r,o]=m(),[s,a]=m(!1),[l,c]=m(""),{apikey:d}=q(Kf),u=db(ib.bridgeEncode),p=y((({selectedRoute:r,fromEtherTokenBalance:s,goNext:l})=>bl(this,void 0,void 0,(function*(){var p,h;if(!r||!t||!s)return;const{encodeParams:f}=r;if(f&&f.fromAddress===fb)throw new Error("fromAddress is not valid.");c(""),a(!0);try{const{fromToken:t,fromAmount:g,product:y}=r,b={product:y,encodeParams:f};let{encodeResultData:v,sendData:x}=r;if(f){v=(yield Re.post(`${u}${d?`?apikey=${d}`:""}`,{data:b})).data.data}if(!v){if(x)return a(!1),void l();throw new Error("encodeResultData is null")}const{data:w,to:E,value:A,from:C,chainId:k,encodeId:T}=v;if(!(w&&E&&A&&C&&k))throw new Error("cross_chain_swap_transactionEncode is null");const R=ul[k],S=(m=18,new i(A).div(new i(10).pow(m))),N=R&&t.address.toLowerCase()===R.address.toLowerCase(),M=S.minus(N?g:0);if(!S.isNaN()&&S.gt(0)&&s.lt(S))return c(n._({id:"F9xwHA",message:"Insufficient cross-chain fees, need at least {0} {1}",values:{0:ha({input:M,decimals:null!==(p=null==R?void 0:R.decimals)&&void 0!==p?p:18}),1:null!==(h=null==R?void 0:R.symbol)&&void 0!==h?h:"-"}})),void a(!1);if(e){if(!(yield Wy({from:C,to:E,value:A,data:w},e)))throw new Error("failed to estimate gas")}o({data:w,to:E,value:A,from:C,chainId:k,encodeId:T}),l()}catch(e){console.error("[failed to construct transaction request]: ",e);const{message:t}=e;c(t)}var m;a(!1)}))),[o,a,t,e,u]);return{apikey:d,sendRouteLoading:s,sendRouteError:l,setSendRouteError:c,bridgeOrderTxRequest:r,handleClickSend:p}}function ux({route:e,bridgeOrderTxRequest:t,sendData:r}){const{chainId:o,account:i}=Bf(),s=Xy(),{apikey:a}=q(Kf),l=db(ib.bridgeCreateRoute);return y((()=>{if(((null==e?void 0:e.sendData)||t)&&e)try{const{fromToken:o,toToken:i,fromAmount:c,toTokenAmount:d,fromChainId:u,toChainId:p,toAddress:h,slippage:f,roundedRouteCostTime:m}=e,g=ha({input:c,decimals:o.decimals}),y=ha({input:d,decimals:i.decimals}),b=nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(wy,{token:o,sx:{width:16,height:16,mr:6},chainId:o.chainId}),`${g} ${null==o?void 0:o.symbol}`,nt.exports.jsx(Nn,{component:W,sx:{width:12,height:12,mx:16}}),nt.exports.jsx(wy,{token:i,sx:{width:16,height:16,mr:6}}),`${y} ${null==i?void 0:i.symbol}`]}),v={fromChainId:u,toChainId:p,fromTokenAddress:o.address,toTokenAddress:i.address,fromTokenSymbol:o.symbol,toTokenSymbol:i.symbol,fromTokenAmount:c,toTokenAmount:d.toString(),slippage:f,sendAccount:h,roundedRouteCostTime:m};if(r)return s.executeCustom({brief:n._({id:"+uZnU3",message:"Cross Chain"}),subtitle:b,mixpanelProps:Object.assign({fromToken:o,toToken:i,pay:g,receive:y},v),handler:r});if(!t)return;const x=(r,n)=>bl(this,void 0,void 0,(function*(){if(t.encodeId){const o=yield function({apikey:e,tx:t,route:r,bridgeCreateRouteAPI:n,encodeId:o}){return bl(this,void 0,void 0,(function*(){const{fromChainId:i,toChainId:s,fromAmount:a,fromToken:l,toToken:c,fromAddress:d,toAddress:u,slippage:p,product:h,step:f,sourceRoute:m,productParams:g}=r;if(!m)throw new Error("sourceRoute is required");const{toAmount:y}=m,b={fromChainId:i,fromAmount:ya(a,l.decimals).toString(),fromTokenAddress:l.address,toChainId:s,toAmount:y,toTokenAddress:c.address,fromAddress:d,toAddress:u,slippage:p,hash:t,product:h,extend:{lifiBridge:f.tool,route:m,productParams:g,encodeId:o,source:"widget"}},v=(yield Re.post(`${n}${e?`?apikey=${e}`:""}`,{data:b})).data.data;return null==v?void 0:v.id}))}({apikey:a,tx:r,route:e,bridgeCreateRouteAPI:l,encodeId:t.encodeId});n&&n(r,{orderId:o})}}));return s.execute(n._({id:"+uZnU3",message:"Cross Chain"}),Object.assign({opcode:By.TX},t),b,!1,void 0,Object.assign(Object.assign(Object.assign({},t),{fromToken:o,toToken:i,pay:g,receive:y}),v),void 0,x)}catch(e){console.error(e)}}),[i,o,e,t,a,l,r])}function px({chainId:e,address:t,children:r}){const n=Tn();return nt.exports.jsxs(Nn,{component:"a",href:gl(`tx/${t}`,e),target:"_blank",rel:"noopener noreferrer",sx:{color:n.palette.text.secondary,"&:hover":{color:n.palette.text.primary},display:"flex",alignItems:"center",typography:"body2"},children:[r,nt.exports.jsx(Nn,{component:"svg",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",sx:{marginLeft:6,width:16,height:17},children:nt.exports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33333 3.83333V13.1667H12.6667V8.5H14V13.1667C14 13.9 13.4 14.5 12.6667 14.5H3.33333C2.59333 14.5 2 13.9 2 13.1667V3.83333C2 3.1 2.59333 2.5 3.33333 2.5H8V3.83333H3.33333ZM9.33333 3.83333V2.5H14V7.16667H12.6667V4.77333L6.11333 11.3267L5.17333 10.3867L11.7267 3.83333H9.33333Z",fill:"currentColor"})})]})}function hx({fromChainId:t,toChainId:r,fromTokenAmount:n,toTokenAmount:o,fromTokenDecimals:i,fromTokenSymbol:s,toTokenDecimals:a,toTokenSymbol:l,fromHash:c,toHash:d,toolDetails:u}){const p=Tn(),[h,f]=w((()=>[xy.get(t),xy.get(r)]),[t,r]);return nt.exports.jsxs(Nn,{sx:{borderLeft:`1px dashed ${p.palette.text.primary}`,opacity:d?1:.5,pb:24},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"flex-start",flexWrap:"wrap"},children:[nt.exports.jsx(Nn,{component:"img",src:u.logoURI,alt:u.name,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:{mobile:p.palette.background.paper,tablet:p.palette.background.paper},alignSelf:"flex-start"}}),nt.exports.jsx(Nn,{sx:{ml:8,typography:"body1"},children:u.name}),nt.exports.jsxs(Nn,{sx:{typography:"body2",marginLeft:"auto",display:"flex",alignItems:"center",justifyContent:"flex-end",width:{mobile:"100%",tablet:"auto"},mt:{mobile:8,tablet:0}},children:[ha({input:n,decimals:i})," ",s,nt.exports.jsx("span",{style:{marginLeft:4,color:p.palette.text.secondary},children:nt.exports.jsx(e,{id:"Z5HWHd",message:"On"})}),nt.exports.jsx(Nn,{component:null==h?void 0:h.logo,sx:{marginLeft:4,width:18,height:18}}),nt.exports.jsx("span",{style:{marginLeft:4,marginRight:4,color:p.palette.text.secondary},children:nt.exports.jsx(e,{id:"/jQctM",message:"To"})}),ha({input:o,decimals:a})," ",l,nt.exports.jsx("span",{style:{marginLeft:4,color:p.palette.text.secondary},children:nt.exports.jsx(e,{id:"Z5HWHd",message:"On"})}),nt.exports.jsx(Nn,{component:null==f?void 0:f.logo,sx:{marginLeft:4,width:18,height:18}})]})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",mt:{mobile:8,tablet:5}},children:[nt.exports.jsx(px,{chainId:t,address:c,children:nt.exports.jsx(e,{id:"wdxz7K",message:"Source"})}),nt.exports.jsx(Nn,{sx:{width:16}}),nt.exports.jsx(px,{chainId:r,address:d,children:nt.exports.jsx(e,{id:"Enslfm",message:"Destination"})})]})]})}function fx({chainId:t,fromTokenAmount:r,toTokenAmount:n,fromTokenDecimals:o,fromTokenSymbol:i,toTokenDecimals:s,toTokenSymbol:a,hash:l,toolDetails:c}){const d=Tn(),u=w((()=>xy.get(t)),[t]);return nt.exports.jsxs(Nn,{sx:{borderLeft:`1px dashed ${d.palette.text.primary}`,opacity:l?1:.5,pb:24},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"flex-start",flexWrap:"wrap"},children:[nt.exports.jsx(Nn,{component:"img",src:c.logoURI,alt:c.name,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:d.palette.background.paper,alignSelf:"flex-start"}}),nt.exports.jsx(Nn,{sx:{ml:8,typography:"body1"},children:c.name}),nt.exports.jsxs(Nn,{sx:{typography:"body2",marginLeft:"auto",display:"flex",alignItems:"center",justifyContent:"flex-end",width:{mobile:"100%",tablet:"auto"},mt:{mobile:8,tablet:0}},children:[ha({input:r,decimals:o})," ",i,nt.exports.jsx("span",{style:{marginLeft:4,marginRight:4,color:d.palette.text.secondary},children:nt.exports.jsx(e,{id:"YHpbe1",message:"For"})}),ha({input:n,decimals:s})," ",a,nt.exports.jsxs(Nn,{sx:{alignItems:"center",display:{mobile:"none",tablet:"flex"}},children:[nt.exports.jsx("span",{style:{marginLeft:4,color:d.palette.text.secondary},children:nt.exports.jsx(e,{id:"Fdp03t",message:"on"})}),nt.exports.jsx(Nn,{component:null==u?void 0:u.logo,sx:{marginLeft:4,width:18,height:18}}),nt.exports.jsx(Nn,{component:"span",sx:{ml:4},children:null==u?void 0:u.name})]})]})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",typography:"body2",mt:{mobile:8,tablet:5}},children:[nt.exports.jsxs(Nn,{sx:{alignItems:"center",display:{mobile:"flex",tablet:"none"}},children:[nt.exports.jsx("span",{style:{color:d.palette.text.secondary},children:nt.exports.jsx(e,{id:"Fdp03t",message:"on"})}),nt.exports.jsx(Nn,{component:null==u?void 0:u.logo,sx:{marginLeft:4,width:18,height:18}}),nt.exports.jsx(Nn,{component:"span",sx:{ml:4,mr:8},children:null==u?void 0:u.name})]}),nt.exports.jsx(px,{chainId:t,address:l,children:nt.exports.jsx(e,{id:"S3piC2",message:"Tx"})})]})]})}function mx({marginTop:e=20,route:t}){const r=Tn(),{fromChainId:n,toChainId:o}=t,{step:{includedSteps:i}}=t,[s,a]=w((()=>[xy.get(n),xy.get(o)]),[n,o]);return nt.exports.jsxs(Nn,{sx:{mt:e,pl:10},children:[nt.exports.jsx(Nn,{sx:{borderLeft:`1px dashed ${r.palette.text.primary}`,opacity:1,pb:24},children:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"flex-start"},children:[nt.exports.jsx(Nn,{component:null==s?void 0:s.logo,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:r.palette.background.paper}}),nt.exports.jsx(Nn,{sx:{ml:8,typography:"body1"},children:null==s?void 0:s.name})]})}),null==i?void 0:i.map(((e,t)=>{const{toolDetails:r,type:n,estimate:o}=e;return"swap"===n?nt.exports.jsx(fx,{chainId:o.fromToken.chainId,fromTokenAmount:o.fromTokenAmount,toTokenAmount:o.toTokenAmount,fromTokenDecimals:o.fromToken.decimals,fromTokenSymbol:o.fromToken.symbol,toTokenDecimals:o.toToken.decimals,toTokenSymbol:o.toToken.symbol,hash:null,toolDetails:r},t):"cross"===n?nt.exports.jsx(hx,{fromChainId:o.fromToken.chainId,toChainId:o.toToken.chainId,fromTokenAmount:o.fromTokenAmount,toTokenAmount:o.toTokenAmount,fromTokenDecimals:o.fromToken.decimals,fromTokenSymbol:o.fromToken.symbol,toTokenDecimals:o.toToken.decimals,toTokenSymbol:o.toToken.symbol,fromHash:null,toHash:null,toolDetails:r},t):null})),nt.exports.jsx(Nn,{sx:{opacity:.5,pb:0},children:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"flex-start"},children:[nt.exports.jsx(Nn,{component:null==a?void 0:a.logo,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:r.palette.background.paper}}),nt.exports.jsx(Nn,{sx:{ml:8,typography:"body1"},children:null==a?void 0:a.name})]})})]})}function gx({route:t}){const r=Tn(),n=xy.get(t.fromChainId),o=w((()=>gl(`address/${t.fromAddress}`,t.fromChainId)),[t.fromAddress,t.fromChainId]);return nt.exports.jsxs(Nn,{children:[nt.exports.jsx(Nn,{sx:{py:12,borderStyle:"solid",borderWidth:r.spacing(1,0,0),borderColor:r.palette.border.main},children:nt.exports.jsx(ea,{children:nt.exports.jsx(ua,{initialEntered:!0,sx:{"& button.active svg":{transform:"rotate(0)"}},header:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(Nn,{component:P,sx:{mr:6,width:18,height:18}}),nt.exports.jsx(e,{id:"rRDi3Y",message:"Detail"})]}),nt.exports.jsx(Nn,{component:I,sx:{width:12,height:12,color:"text.secondary",transform:"rotate(180deg)",transition:"transform 0.2s linear"}})]}),children:nt.exports.jsxs(Nn,{sx:{mt:16},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsx(Nn,{sx:{typography:"body2",color:"text.secondary",flexShrink:0},children:nt.exports.jsx(e,{id:"lt8yMa",message:"Send to:"})}),nt.exports.jsxs(Nn,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:[n?nt.exports.jsx(Nn,{component:n.logo,sx:{width:18,height:18}}):"",nt.exports.jsx(Nn,{sx:{display:"inline-block",mx:6,width:"1px",height:12,backgroundColor:"border.main"}}),nt.exports.jsx(Nn,{sx:{typography:"body2",fontWeight:600},children:(i=t.fromAddress,i.length<=10?i:`${i.slice(0,6)}...${i.slice(i.length-4,i.length)}`)}),nt.exports.jsx(Lo,{component:"a",href:o,target:"_blank",rel:"noopener noreferrer",sx:{ml:6,width:18,height:18,color:"text.secondary"},children:nt.exports.jsx(Nn,{component:L,sx:{width:18,height:18}})})]})]}),t.feeUSD?nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsx(Nn,{sx:{display:"flex",alignItems:"center",typography:"body2",color:"text.secondary",flexShrink:0},children:nt.exports.jsx(e,{id:"PLUB/s",message:"Fee"})}),nt.exports.jsxs(Nn,{sx:{typography:"body2"},children:["$",pa({input:t.feeUSD})]})]}):"",!!t.slippage&&nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",typography:"body2",color:"text.secondary",flexShrink:0},children:[nt.exports.jsx(e,{id:"CMHmbm",message:"Slippage"}),nt.exports.jsx(Cb,{onlyHover:!0,title:nt.exports.jsx(e,{id:"KAmxpM",message:"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:6})]}),nt.exports.jsxs(Nn,{sx:{typography:"body2"},children:[100*t.slippage,"%"]})]})]})})})}),nt.exports.jsx(Nn,{sx:{py:12,borderStyle:"solid",borderWidth:r.spacing(1,0,0),borderColor:r.palette.border.main},children:nt.exports.jsx(ea,{children:nt.exports.jsx(ua,{initialEntered:!0,sx:{"& button.active svg":{transform:"rotate(0)"}},header:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(Nn,{component:P,sx:{mr:6,width:18,height:18}}),nt.exports.jsx(e,{id:"QNWt8A",message:"Estimated Time"})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[t.executionDuration?nx({start:Date.now(),end:Date.now()+1e3*t.executionDuration}):"-",nt.exports.jsx(Nn,{component:I,sx:{ml:6,width:12,height:12,color:"text.secondary",transform:"rotate(180deg)",transition:"transform 0.2s linear"}})]})]}),children:nt.exports.jsx(mx,{route:t})})})})]});var i}function yx({open:t,onClose:r,route:n,bridgeOrderTxRequest:o,clearToAmt:i,clearFromAmt:s}){const a=Tn(),{contractStatus:l}=q(Kf),c=Q(),d=ux({route:n,bridgeOrderTxRequest:o,sendData:null==n?void 0:n.sendData});return v((()=>{l!==Mf.Pending&&r(),l===Mf.TxSuccess&&(i(),s())}),[l]),nt.exports.jsx(ky,{title:nt.exports.jsx(e,{id:"tKE4Ak",message:"Cross Chain Summary"}),open:t,onClose:()=>{c(Vy({contractStatus:Mf.Initial})),r()},children:nt.exports.jsxs(nt.exports.Fragment,{children:[n?nt.exports.jsxs(Nn,{sx:{px:16,pb:20,flex:1,overflowY:"auto"},children:[nt.exports.jsxs(Nn,{sx:{display:"grid",gridTemplateColumns:"36% 28% 36%",py:20,borderStyle:"solid",borderWidth:a.spacing(1,0,0),borderColor:a.palette.border.main},children:[nt.exports.jsx(ox,{token:n.fromToken,chainId:n.fromChainId,amount:n.fromAmount}),!!n.step&&nt.exports.jsx(ix,{children:nt.exports.jsx(Nn,{sx:{display:"flex",px:3,py:3,backgroundColor:a.palette.background.paperContrast,border:`1px solid ${a.palette.border.main}`,borderRadius:"50%",alignItems:"center",width:24,height:24,overflow:"hidden"},children:nt.exports.jsx(sx,{size:"medium",toolDetails:n.step.toolDetails,nameMarginLeft:8})})}),nt.exports.jsx(ox,{token:n.toToken,chainId:n.toChainId,amount:n.toTokenAmount})]}),nt.exports.jsx(gx,{route:n})]}):"",nt.exports.jsx(Nn,{sx:{px:16,py:20},children:nt.exports.jsx(wo,{fullWidth:!0,isLoading:l==Mf.Pending,disabled:!n,onClick:()=>bl(this,void 0,void 0,(function*(){d(),c(Vy({contractStatus:Mf.Pending}))})),children:l==Mf.Pending?nt.exports.jsx(e,{id:"P+K/3O",message:"Confirming"}):nt.exports.jsx(e,{id:"PZqJog",message:"Confirm Cross Chain"})})})]})})}function bx({message:t,onClose:r}){return nt.exports.jsx(ky,{open:!!t,onClose:r,children:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsxs(Nn,{sx:{flex:1,textAlign:"center"},children:[nt.exports.jsx(Nn,{component:F,sx:{mt:60,width:64,height:64,color:"error.main"}}),t?nt.exports.jsxs(Nn,{sx:{textAlign:"center",mt:60},children:[nt.exports.jsx(Nn,{children:nt.exports.jsx(e,{id:"kf83Ld",message:"Something went wrong."})}),nt.exports.jsx(Nn,{sx:{color:"text.secondary",mt:12,typography:"body2",wordBreak:"break-all"},children:t})]}):""]}),nt.exports.jsx(Nn,{sx:{px:16,py:20},children:nt.exports.jsx(wo,{onClick:r,fullWidth:!0,children:nt.exports.jsx(e,{id:"1QfxQT",message:"Dismiss"})})})]})})}function vx(e){const t=g(!1),[r,n]=m(!1),o=Q();return v((()=>{if(void 0===e)return;const r=function(e){const t=localStorage.getItem(e?"DODO_WIDGET_SLIPPAGE_BRIDGE":"DODO_WIDGET_SLIPPAGE_SWAP");return t?Number(t):null}(e);if(!t.current)return o(rb(r?r.toString():null)),void(t.current=!0);o(rb(r?r.toString():null)),n(!0);const i=setTimeout((()=>{n(!1)}),3e3);return()=>{clearTimeout(i)}}),[e]),r}function xx({side:e,defaultToken:t,tokenList:r,occupyToken:n,chainId:o}){var i,s;let a,l=null;const c=r.filter((t=>!(t.side&&t.side!==e||o&&t.chainId!==o)));if(c.length){let r=function(e){const t=localStorage.getItem("from"===e?"DODO_WIDGET_LAST_FROM_TOKEN":"DODO_WIDGET_LAST_TO_TOKEN");if(!t)return null;try{return JSON.parse(t)}catch(e){return console.error(e),null}}(e);!r&&t&&(r=Object.assign({},t),a=t.amount),r&&(l=null!==(i=c.find((e=>e.address===(null==r?void 0:r.address)&&e.chainId===r.chainId)))&&void 0!==i?i:null),l||(n?l=null!==(s=c.find((e=>e.address!==n.address)))&&void 0!==s?s:null:[l]=c)}return{findToken:l,setDefaultAmount:a}}function wx({fromToken:e,toToken:t,setFromToken:r,setToToken:n,updateFromAmt:o,updateToAmt:i}){const s=q(Hf),a=q(Xf),l=q(Jf),c=q(Kf),d=Q(),{chainId:u}=Bf();v((()=>{(()=>{let p,h=null;if(c.crossChain||!c.autoConnectLoading){if(!e){const e=xx({side:"from",defaultToken:a,tokenList:s,chainId:c.crossChain?void 0:u});h=e.findToken,p=e.setDefaultAmount,h&&(r(h),void 0!==p&&(d(Vy({isReverseRouting:!1})),o(p)))}if(!t){const{findToken:e,setDefaultAmount:t}=xx({side:"to",defaultToken:l,tokenList:s,occupyToken:h,chainId:c.crossChain?void 0:u});e&&(n(e),void 0===p&&void 0!==t&&(d(Vy({isReverseRouting:!0})),i(t)))}}})()}),[s,a,l,c.crossChain,c.autoConnectLoading,u])}function Ex({fromToken:e,toToken:t,getAutoSlippage:r}){const n=Q();v((()=>{(()=>{bl(this,void 0,void 0,(function*(){if(!r)return;const o=r({fromToken:e,toToken:t});if(void 0!==o&&"number"!=typeof o){var i;n((i=!0,e=>bl(void 0,void 0,void 0,(function*(){e({type:"SET_AUTO_SLIPPAGE_LOADING",payload:i})}))));try{const e=yield o;n(Hy({loading:!1,value:null!=e?e:null}))}catch(e){console.error(e),n(Hy({loading:!1,value:null}))}}else n(Hy({loading:!1,value:null}))}))})()}),[e,t])}function Ax({getAutoSlippage:t,onConnectWalletClick:r}={}){var i,s,a;const l=Tn(),{isInflight:c}=Yy(),{chainId:u,account:p}=Bf(),h=Q(),{isReverseRouting:f,noPowerBy:g}=q(Kf),b=q(Lf),x=w((()=>{var e;return null===(e=ul[null!=u?u:b])||void 0===e?void 0:e.address}),[u]),E=te(),A=Df(),[C,k]=m(""),[T,R]=m(""),[S,N]=m(""),[M,O]=m(""),I=w((()=>d((e=>N(e)),1e3)),[]),F=w((()=>d((e=>O(e)),1e3)),[]),[j,L]=m(null),[_,P]=m(null),[B,U]=m(!1),[V,Z]=m(!1),H=w((()=>{if(j&&_)return!(!(null==j?void 0:j.chainId)||!(null==_?void 0:_.chainId)||j.chainId===_.chainId)}),[j,_]),{toFiatPrice:G,fromFiatPrice:X}=ub({chainId:u,toToken:_,fromToken:j}),{marginAmount:J}=function({token:e,fiatPrice:t}){return{marginAmount:w((()=>{var r;const n=null!==(r=null==e?void 0:e.decimals)&&void 0!==r?r:6,i=null!=t?new o(500).div(t):new o(0),s=ya(i,n);return(s.lt(new o(1).times(new o(10).pow(n-3)))?new o(0):s).toString(10)}),[null==e?void 0:e.decimals,t])}}({token:f?_:j,fiatPrice:f?G:X});Ex({fromToken:j,toToken:_,getAutoSlippage:t});const K=Qf(),$=w((()=>{const e=null==j?void 0:j.chainId;if(!H||!e)return null;const t=ul[e];return t?K(Object.assign(Object.assign({},t),{chainId:e})):null}),[H,null==j?void 0:j.chainId,K]),ee=w((()=>{const e=f?_:j;return new o(e&&K(e)||0).lt(f?null!=M?M:0:S)}),[f,j,_,S,M,K]),{bridgeRouteList:re,status:ne,limit:oe}=qb({toToken:_,fromToken:j,fromAmount:S,fromFiatPrice:X}),[ie,se]=m(!1),[ae,le]=m(""),ce=w((()=>!ae&&re.length?re[0].id:ae),[ae,re]),de=w((()=>re.find((e=>e.id===ce&&e.fromAddress===p))),[re,ce,p]);v((()=>{!de&&ae&&le("")}),[de]);const{getApprovalState:ue,submitApprove:pe,getPendingRest:he,getMaxBalance:fe}=Lb({account:p,chainId:null!==(i=null==j?void 0:j.chainId)&&void 0!==i?i:u,contractAddress:null==de?void 0:de.spenderContractAddress,skip:!(null==de?void 0:de.spenderContractAddress)}),me=w((()=>he(f?_:j)),[null==j?void 0:j.address,null==_?void 0:_.address,he,f]),[ge,ye,be]=w((()=>{const e=ue(j,f?M||0:S);return[e===Fb.Approving,e===Fb.Loading,e===Fb.Insufficient&&!me]}),[ue,j,f,M,S,me]),ve=w((()=>!(!p||ee||ge||ye||be)),[p,ee,ge,ye,be]),{status:xe,rawBrief:we,executeSwap:Ee,reset:Ae}=yb({toToken:_,fromToken:j,marginAmount:J,fromAmount:S,toAmount:M,estimateGas:ve}),{resAmount:Ce,priceImpact:ke,baseFeeAmount:Te,additionalFeeAmount:Re,resPricePerToToken:Se,resPricePerFromToken:Ne}=w((()=>we||{resAmount:null,priceImpact:null,baseFeeAmount:null,additionalFeeAmount:null,resPricePerToToken:null,resPricePerFromToken:null}),[we]),{sendRouteLoading:Me,sendRouteError:Oe,setSendRouteError:Ie,bridgeOrderTxRequest:Fe,handleClickSend:je}=dx(),[Le,_e]=m(!1),We=vx(H),Pe=y((e=>{const t=e.toString();k(t),I(t),Ae()}),[k,I,Ae]),De=y((e=>{const t=e.toString();R(t),F(t),Ae()}),[R,F,Ae]),Be=y((e=>{var t;return"function"==typeof e?L((t=>{var r;const n=e(t);return h(pg(null!==(r=null==n?void 0:n.chainId)&&void 0!==r?r:void 0)),n})):(h(pg(null!==(t=null==e?void 0:e.chainId)&&void 0!==t?t:void 0)),L(e))}),[h,pg]),Ue=y((e=>{var t;return"function"==typeof e?P((t=>{var r;const n=e(t);return h(hg(null!==(r=null==n?void 0:n.chainId)&&void 0!==r?r:void 0)),n})):(h(hg(null!==(t=null==e?void 0:e.chainId)&&void 0!==t?t:void 0)),P(e))}),[h,pg]);wx({fromToken:j,toToken:_,setFromToken:Be,setToToken:Ue,updateFromAmt:Pe,updateToAmt:De});const Ve=y((()=>{Pe(""),De(""),Be(_),Ue(j),My("from",_),My("to",j),le("")}),[Be,_,Ue,j,Pe,De,le]),Ze=y((e=>f?De(fe(_)):Pe(fe(j))),[Pe,De,fe,j,_,f]),He=(e=>{const{defaultSlippage:t}=mb(e),r=q(pb)||t;return w((()=>Number(r)>5),[r])})(H),ze=w((()=>(100*Number(ke)).toFixed(2)),[ke]),Ye=w((()=>{const e=f?Ce:S;return e&&X?new o(X).multipliedBy(e):null}),[X,S,f,Ce]),Ge=w((()=>{var e;if(!G||void 0===H)return null;if(H)return(null===(e=null==de?void 0:de.toTokenAmount)||void 0===e?void 0:e.gt(0))?de.toTokenAmount.multipliedBy(G):null;const t=f?M:Ce;return t?new o(G).multipliedBy(t):null}),[G,M,f,Ce,de,H]),Xe=w((()=>nt.exports.jsxs(Nn,{sx:{display:"flex",fontWeight:600,typography:"body2",alignItems:"center",justifyContent:"center"},children:[nt.exports.jsx(Cb,{title:nt.exports.jsx(e,{id:"4kY4C4",message:"Due to the market condition, market price and estimated price may have a slight difference"}),mr:8}),nt.exports.jsxs(Nn,{sx:{display:"flex"},children:[nt.exports.jsx(e,{id:"6+mYrD",message:"Current price impact"}),nt.exports.jsxs(Nn,{sx:{color:l.palette.error.main,ml:4},children:[ze,"%"]})]})]})),[ze]),Je=w((()=>nt.exports.jsx(Nb,{toToken:_,fromToken:j,priceStatus:xe,pricePerToToken:Se,pricePerFromToken:Ne})),[_,j,xe,Se,Ne]),qe=w((()=>!ll[u||1]),[u]),Qe=w((()=>!!u&&!!(null==j?void 0:j.chainId)&&(null==j?void 0:j.chainId)!==u),[u,null==j?void 0:j.chainId]),Ke=function({fromToken:e,toToken:t}){const r=q(zf);return w((()=>!(!e||r.some((t=>t.chainId===e.chainId&&t.address===e.address&&(!t.side||"to"===t.side))))||!(!t||r.some((e=>e.chainId===t.chainId&&e.address===t.address&&(!e.side||"from"===e.side))))),[e,t,r])}({fromToken:j,toToken:_}),$e=w((()=>He&&new o(f?M:S).gt(0)&&!ee&&(H?ne===gb.Success:xe===gb.Success)?nt.exports.jsxs(Nn,{sx:{textAlign:"center",mb:8},children:[nt.exports.jsx(Nn,{component:D,sx:{position:"relative",top:2,mr:6,width:16,height:16,color:"warning.main"}}),n._({id:"//95jS",message:"The current slippage protection coefficient set exceeds {maxSlippageWarning}%, which may result in losses.",values:{maxSlippageWarning:5}})]}):null),[He,f,S,M,H,ne,xe]),et=w((()=>Qe?nt.exports.jsxs(Nn,{sx:{textAlign:"center"},children:[nt.exports.jsx(Nn,{component:D,sx:{position:"relative",top:2,mr:6,width:16,height:16,color:"warning.main"}}),nt.exports.jsx(e,{id:"54ffaC",message:"The current network is inconsistent with the wallet - please switch in wallet"})]}):xe===gb.Loading||H&&ne===gb.Loading?nt.exports.jsx(Nn,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Wo,{sx:{mr:5}}),nt.exports.jsx(e,{id:"JdNn1Y",message:"Fetching best price..."})]})}):qe?nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{component:D,sx:{mr:6,width:16,color:"warning.main"}}),nt.exports.jsx(e,{id:"udsWDJ",message:"Unsupported network - switch to trade"})]}):!H&&C&&new o(ze).gt(15)?Xe:H&&re.length?nt.exports.jsxs(nt.exports.Fragment,{children:[$e,nt.exports.jsx(cx,{route:de,onClick:()=>se(!0)})]}):H&&(ne===gb.Success&&!re.length||ne===gb.Failed)&&C?nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{component:D,sx:{width:15,mr:5,color:"warning.main"}}),nt.exports.jsx(e,{id:"NVAuTg",message:"Quote not available"})]}):nt.exports.jsxs(nt.exports.Fragment,{children:[$e,Je]})),[xe,Je,C,Xe,ze,qe,H,ne,re,de,Qe,$e]),tt=w((()=>f?new o(T).gt(0)?ha({input:Ce,decimals:null==j?void 0:j.decimals}):"-":C),[C,T,Ce,j,f]),rt=w((()=>{var e;return f?T:H?(null===(e=null==de?void 0:de.toTokenAmount)||void 0===e?void 0:e.gt(0))&&ne!==gb.Loading?ha({input:de.toTokenAmount,decimals:null==_?void 0:_.decimals}):"-":new o(C).gt(0)?ha({input:Ce,decimals:null==_?void 0:_.decimals}):"-"}),[C,T,Ce,_,f,de,H,ne]),ot=w((()=>{var t,n;let i;const s=(null==j?void 0:j.chainId)===ll.TON,a=(null==_?void 0:_.chainId)===ll.TON;if(s&&a||!s&&!a||(i=s?null==_?void 0:_.chainId:null==j?void 0:j.chainId),!p||(null==j?void 0:j.chainId)&&u!==j.chainId||i&&!A.connected||!E.account)return nt.exports.jsx(Ob,{needSwitchChain:null==j?void 0:j.chainId,onConnectWalletClick:r,needEvmChainId:i});if(c)return nt.exports.jsx(wo,{fullWidth:!0,isLoading:!0,disabled:!0,children:nt.exports.jsx(e,{id:"FRBvjQ",message:"Transaction Pending"})});if(!j||!_)return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-select-token-btn",children:nt.exports.jsx(e,{id:"KlvBGJ",message:"Select Tokens"})});if(be)return nt.exports.jsx(wo,{fullWidth:!0,disabled:ge,onClick:()=>pe(j),children:ge?nt.exports.jsx(e,{id:"j2Uisd",message:"Approving"}):nt.exports.jsx(e,{id:"Z7ZXbT",message:"Approve"})});if(!new o(f?M:S).gt(0))return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-enter-amount-btn",children:nt.exports.jsx(e,{id:"iPMIoT",message:"Enter an amount"})});if(ee)return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-insufficient-balance-btn",children:nt.exports.jsx(e,{id:"znqB4T",message:"Insufficient balance"})});if(H){const r=null!==(t=null==oe?void 0:oe.minAmt)&&void 0!==t?t:null==de?void 0:de.minAmt,o=null!==(n=null==oe?void 0:oe.maxAmt)&&void 0!==n?n:null==de?void 0:de.maxAmt,i=!!r&&!!S&&Number(S)<Number(r),s=!!o&&!!S&&Number(S)>Number(o);if(i||s)return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,children:i?nt.exports.jsx(e,{id:"ipI/1x",message:"cannot be lower than {minAmt}",values:{minAmt:r}}):nt.exports.jsx(e,{id:"f341rK",message:"cannot be greater than {maxAmt}",values:{maxAmt:o}})})}if(H?ne===gb.Loading||ye:xe===gb.Loading)return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-fetch-price-btn",children:nt.exports.jsx(e,{id:"OauUE6",message:"Fetching Price..."})});let l=!1;return l=H?!re.length||ne===gb.Failed:!Ce||xe===gb.Failed,l?nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,children:nt.exports.jsx(e,{id:"NVAuTg",message:"Quote not available"})}):H?nt.exports.jsx(wo,{fullWidth:!0,onClick:()=>je({selectedRoute:de,fromEtherTokenBalance:$,goNext:()=>_e(!0)}),"data-testid":"swap-review-btn",disabled:!de,isLoading:Me,children:nt.exports.jsx(e,{id:"SXnevP",message:"Review Cross Chain"})}):nt.exports.jsx(wo,{fullWidth:!0,onClick:()=>U(!0),"data-testid":"swap-review-btn",children:nt.exports.jsx(e,{id:"K/Ay/d",message:"Review Swap"})})}),[p,M,S,_,Ce,j,c,Ee,pe,xe,x,f,H,ne,re,Me,$,ee,ge,ye,be,A,E,de]),it=w((()=>j&&_?nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(wy,{token:j,sx:{width:16,height:16,mr:6},chainId:j.chainId}),`${ha({input:f?Ce:S,decimals:null==j?void 0:j.decimals})} ${null==j?void 0:j.symbol}`,nt.exports.jsx(Nn,{component:W,sx:{width:12,height:12,mx:16}}),nt.exports.jsx(wy,{token:_,sx:{width:16,height:16,mr:6},chainId:_.chainId}),`${ha({input:f?M:Ce,decimals:null==_?void 0:_.decimals})} ${null==_?void 0:_.symbol}`]}):nt.exports.jsx(Nn,{})),[j,_,S,M,Ce,f]);return nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsxs(Nn,{sx:{display:"flex",justifyContent:"space-between",typography:"caption",margin:20},children:[nt.exports.jsx(e,{id:"vH2C/2",message:"Swap"}),nt.exports.jsx(hs,{open:We,title:H?nt.exports.jsx(e,{id:"qLkska",message:"The setting has been switched to cross chain mode"}):nt.exports.jsx(e,{id:"NSCBTb",message:"The setting has been switched to swap mode"}),placement:"bottom-end",children:nt.exports.jsx(Nn,{component:Ao,children:nt.exports.jsx(Nn,{component:z,onClick:()=>Z(!0),sx:{width:19,height:19,color:"text.primary",cursor:"pointer"}})})})]}),nt.exports.jsxs(Nn,{sx:{flex:1,padding:"0 20px 20px",overflowY:"auto"},children:[nt.exports.jsxs(Nn,{children:[nt.exports.jsx(Ab,{sx:{mb:4},token:j,side:"from",amt:tt,defaultLoadBalance:!0,onlyCurrentChain:!0,onMaxClick:Ze,onInputChange:Pe,onInputFocus:()=>{f&&Pe(""),h(Vy({isReverseRouting:!1}))},showMaxBtn:!f&&!C,occupiedAddrs:[null!==(s=null==_?void 0:_.address)&&void 0!==s?s:""],occupiedChainId:null==_?void 0:_.chainId,fiatPriceTxt:Ye?`$${pa({input:Ye,showDecimals:1})}`:"-",onTokenChange:(e,t)=>{if(t)return Ve();Pe(""),De(""),Be(e),le(""),My("from",e)},readOnly:f,showChainLogo:!0}),nt.exports.jsx(kb,{onClick:Ve,disabled:Ke}),nt.exports.jsx(Ab,{token:_,side:"to",amt:rt,onInputChange:De,onInputFocus:()=>{f||De(""),h(Vy({isReverseRouting:!0}))},occupiedAddrs:[null!==(a=null==j?void 0:j.address)&&void 0!==a?a:""],occupiedChainId:null==j?void 0:j.chainId,fiatPriceTxt:Ge?`$${pa({input:Ge,showDecimals:1})}(${ze}%)`:"-",onTokenChange:(e,t)=>{if(t)return Ve();Pe(""),De(""),Ue(e),le(""),My("to",e)},readOnly:H||!f,showChainLogo:!0}),nt.exports.jsx(Nn,{sx:{py:12,display:"flex",typography:"body2",alignItems:"center",justifyContent:"center",flexWrap:"wrap"},children:et})]}),ot,g?"":nt.exports.jsxs(Nn,{sx:{mt:13,display:"flex",typography:"h6",cursor:"pointer",justifyContent:"center",alignItems:"center",color:l.palette.text.disabled},onClick:()=>window.open("https://app.dodoex.io"),children:[nt.exports.jsx(Nn,{sx:{width:24,typography:"body2",transform:"translate(1px, 2px)","& path":{fill:l.palette.text.disabled}},component:Y}),nt.exports.jsx(e,{id:"7X+IbB",message:"Powered by DODO protocol"})]})]}),nt.exports.jsx(Tb,{toToken:_,fromToken:j,fromAmount:f?Ce:S,toAmount:f?M:Ce,open:B,baseFeeAmount:Te,priceImpact:ze,additionalFeeAmount:Re,curToFiatPrice:Ge,execute:()=>Ee(it),clearFromAmt:()=>Pe(""),clearToAmt:()=>De(""),curFromFiatPrice:Ye,pricePerFromToken:Ne,onClose:()=>U(!1),loading:xe===gb.Loading}),nt.exports.jsx(Sb,{open:V,onClose:()=>Z(!1),isBridge:H}),nt.exports.jsx(lx,{open:ie,onClose:()=>se(!1),selectedRouteId:ce,setSelectRouteId:le,bridgeRouteList:re}),nt.exports.jsx(yx,{open:Le,onClose:()=>_e(!1),route:de,bridgeOrderTxRequest:Fe,clearFromAmt:()=>Pe(""),clearToAmt:()=>De("")}),nt.exports.jsx(bx,{message:Oe,onClose:()=>Ie("")})]})}var Cx,kx=J;if("production"===process.env.NODE_ENV)Cx=kx.createRoot,kx.hydrateRoot;else{var Tx=kx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Cx=function(e,t){Tx.usingClientEntryPoint=!0;try{return kx.createRoot(e,t)}finally{Tx.usingClientEntryPoint=!1}}}function Rx(e){return nt.exports.jsx(wb,{...e,children:nt.exports.jsx(Ax,{getAutoSlippage:e.getAutoSlippage,onConnectWalletClick:e.onConnectWalletClick})})}function Sx(e){const t=document.getElementById("dodo-swap-widget");Cx(t).render(nt.exports.jsx(wb,{...e,children:nt.exports.jsx(Ax,{getAutoSlippage:e.getAutoSlippage,onConnectWalletClick:e.onConnectWalletClick})}))}export{Sx as InitSwapWidget,Rx as SwapWidget};
45
+ */!function(e){!function(){var t="input is invalid type",r="object"==typeof window,n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var o=!r&&"object"==typeof self;!n.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?n=Fe:o&&(n=self);var i=!n.JS_SHA3_NO_COMMON_JS&&e.exports,s=!n.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,a="0123456789abcdef".split(""),l=[4,1024,262144,67108864],c=[0,8,16,24],d=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],p=[128,256],h=["hex","buffer","arrayBuffer","array","digest"],f={128:168,256:136};!n.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!s||!n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var m=function(e,t,r){return function(n){return new M(e,t,e).update(n)[r]()}},g=function(e,t,r){return function(n,o){return new M(e,t,o).update(n)[r]()}},y=function(e,t,r){return function(t,n,o,i){return E["cshake"+e].update(t,n,o,i)[r]()}},b=function(e,t,r){return function(t,n,o,i){return E["kmac"+e].update(t,n,o,i)[r]()}},v=function(e,t,r,n){for(var o=0;o<h.length;++o){var i=h[o];e[i]=t(r,n,i)}return e},x=function(e,t){var r=m(e,t,"hex");return r.create=function(){return new M(e,t,e)},r.update=function(e){return r.create().update(e)},v(r,m,e,t)},w=[{name:"keccak",padding:[1,256,65536,16777216],bits:u,createMethod:x},{name:"sha3",padding:[6,1536,393216,100663296],bits:u,createMethod:x},{name:"shake",padding:[31,7936,2031616,520093696],bits:p,createMethod:function(e,t){var r=g(e,t,"hex");return r.create=function(r){return new M(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},v(r,g,e,t)}},{name:"cshake",padding:l,bits:p,createMethod:function(e,t){var r=f[e],n=y(e,0,"hex");return n.create=function(n,o,i){return o||i?new M(e,t,n).bytepad([o,i],r):E["shake"+e].create(n)},n.update=function(e,t,r,o){return n.create(t,r,o).update(e)},v(n,y,e,t)}},{name:"kmac",padding:l,bits:p,createMethod:function(e,t){var r=f[e],n=b(e,0,"hex");return n.create=function(n,o,i){return new O(e,t,o).bytepad(["KMAC",i],r).bytepad([n],r)},n.update=function(e,t,r,o){return n.create(e,r,o).update(t)},v(n,b,e,t)}}],E={},A=[],C=0;C<w.length;++C)for(var k=w[C],T=k.bits,R=0;R<T.length;++R){var S=k.name+"_"+T[R];if(A.push(S),E[S]=k.createMethod(T[R],k.padding),"sha3"!==k.name){var N=k.name+T[R];A.push(N),E[N]=E[S]}}function M(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function O(e,t,r){M.call(this,e,t,r)}M.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var o,i,a=this.blocks,l=this.byteCount,d=e.length,u=this.blockCount,p=0,h=this.s;p<d;){if(this.reset)for(this.reset=!1,a[0]=this.block,o=1;o<u+1;++o)a[o]=0;if(r)for(o=this.start;p<d&&o<l;++p)a[o>>2]|=e[p]<<c[3&o++];else for(o=this.start;p<d&&o<l;++p)(i=e.charCodeAt(p))<128?a[o>>2]|=i<<c[3&o++]:i<2048?(a[o>>2]|=(192|i>>6)<<c[3&o++],a[o>>2]|=(128|63&i)<<c[3&o++]):i<55296||i>=57344?(a[o>>2]|=(224|i>>12)<<c[3&o++],a[o>>2]|=(128|i>>6&63)<<c[3&o++],a[o>>2]|=(128|63&i)<<c[3&o++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++p)),a[o>>2]|=(240|i>>18)<<c[3&o++],a[o>>2]|=(128|i>>12&63)<<c[3&o++],a[o>>2]|=(128|i>>6&63)<<c[3&o++],a[o>>2]|=(128|63&i)<<c[3&o++]);if(this.lastByteIndex=o,o>=l){for(this.start=o-l,this.block=a[u],o=0;o<u;++o)h[o]^=a[o];I(h),this.reset=!0}else this.start=o}return this},M.prototype.encode=function(e,t){var r=255&e,n=1,o=[r];for(r=255&(e>>=8);r>0;)o.unshift(r),r=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length},M.prototype.encodeString=function(e){var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}var o=0,i=e.length;if(r)o=i;else for(var a=0;a<e.length;++a){var l=e.charCodeAt(a);l<128?o+=1:l<2048?o+=2:l<55296||l>=57344?o+=3:(l=65536+((1023&l)<<10|1023&e.charCodeAt(++a)),o+=4)}return o+=this.encode(8*o),this.update(e),o},M.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var o=t-r%t,i=[];return i.length=o,this.update(i),this},M.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];I(n)}},M.prototype.toString=M.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,l="";s<n;){for(i=0;i<t&&s<n;++i,++s)e=r[i],l+=a[e>>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(I(r),i=0)}return o&&(e=r[i],l+=a[e>>4&15]+a[15&e],o>1&&(l+=a[e>>12&15]+a[e>>8&15]),o>2&&(l+=a[e>>20&15]+a[e>>16&15])),l},M.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,a=this.outputBits>>3;e=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var l=new Uint32Array(e);s<n;){for(i=0;i<t&&s<n;++i,++s)l[s]=r[i];s%t==0&&I(r)}return o&&(l[i]=r[i],e=e.slice(0,a)),e},M.prototype.buffer=M.prototype.arrayBuffer,M.prototype.digest=M.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,o=this.outputBlocks,i=this.extraBytes,s=0,a=0,l=[];a<o;){for(s=0;s<r&&a<o;++s,++a)e=a<<2,t=n[s],l[e]=255&t,l[e+1]=t>>8&255,l[e+2]=t>>16&255,l[e+3]=t>>24&255;a%r==0&&I(n)}return i&&(e=a<<2,t=n[s],l[e]=255&t,i>1&&(l[e+1]=t>>8&255),i>2&&(l[e+2]=t>>16&255)),l},O.prototype=new M,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var I=function(e){var t,r,n,o,i,s,a,l,c,u,p,h,f,m,g,y,b,v,x,w,E,A,C,k,T,R,S,N,M,O,I,F,j,L,_,W,P,D,B,U,V,Z,H,z,Y,G,X,J,q,Q,K,$,ee,te,re,ne,oe,ie,se,ae,le,ce,de;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(f=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(l<<1|c>>>31),r=i^(c<<1|l>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(u<<1|p>>>31),r=a^(p<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=l^(h<<1|f>>>31),r=c^(f<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(o<<1|i>>>31),r=p^(i<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],g=e[1],G=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,le=e[30]<<9|e[31]>>>23,Z=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,_=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,q=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,de=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,W=e[14]<<6|e[15]>>>26,P=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,x=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,K=e[35]<<15|e[34]>>>17,F=e[45]<<29|e[44]>>>3,j=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,T=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,B=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,Y=e[9]<<27|e[8]>>>5,R=e[18]<<20|e[19]>>>12,S=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,U=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,A=e[48]<<14|e[49]>>>18,C=e[49]<<14|e[48]>>>18,e[0]=m^~y&v,e[1]=g^~b&x,e[10]=k^~R&N,e[11]=T^~S&M,e[20]=L^~W&D,e[21]=_^~P&B,e[30]=z^~G&J,e[31]=Y^~X&q,e[40]=te^~ne&ie,e[41]=re^~oe&se,e[2]=y^~v&w,e[3]=b^~x&E,e[12]=R^~N&O,e[13]=S^~M&I,e[22]=W^~D&U,e[23]=P^~B&V,e[32]=G^~J&Q,e[33]=X^~q&K,e[42]=ne^~ie&ae,e[43]=oe^~se&le,e[4]=v^~w&A,e[5]=x^~E&C,e[14]=N^~O&F,e[15]=M^~I&j,e[24]=D^~U&Z,e[25]=B^~V&H,e[34]=J^~Q&$,e[35]=q^~K&ee,e[44]=ie^~ae&ce,e[45]=se^~le&de,e[6]=w^~A&m,e[7]=E^~C&g,e[16]=O^~F&k,e[17]=I^~j&T,e[26]=U^~Z&L,e[27]=V^~H&_,e[36]=Q^~$&z,e[37]=K^~ee&Y,e[46]=ae^~ce&te,e[47]=le^~de&re,e[8]=A^~m&y,e[9]=C^~g&b,e[18]=F^~k&R,e[19]=j^~T&S,e[28]=Z^~L&W,e[29]=H^~_&P,e[38]=$^~z&G,e[39]=ee^~Y&X,e[48]=ce^~te&ne,e[49]=de^~re&oe,e[0]^=d[n],e[1]^=d[n+1]};if(i)e.exports=E;else for(C=0;C<A.length;++C)n[A[C]]=E[A[C]]}()}(Ya);var Ga=Ya.exports;function Xa(e){return"0x"+Ga.keccak_256(La(e))}const Ja=new Sa("rlp/5.7.0");function qa(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function Qa(e,t,r){let n=0;for(let o=0;o<r;o++)n=256*n+e[t+o];return n}function Ka(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(Ka(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=qa(t.length);return r.unshift(247+r.length),r.concat(t)}Ia(e)||Ja.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call(La(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=qa(t.length);return r.unshift(183+r.length),r.concat(t)}function $a(e){return Da(Ka(e))}function el(e,t,r,n){const o=[];for(;r<t+1+n;){const i=tl(e,r);o.push(i.result),(r+=i.consumed)>t+1+n&&Ja.throwError("child data too short",Sa.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function tl(e,t){if(0===e.length&&Ja.throwError("data too short",Sa.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&Ja.throwError("data short segment too short",Sa.errors.BUFFER_OVERRUN,{});const n=Qa(e,t+1,r);return t+1+r+n>e.length&&Ja.throwError("data long segment too short",Sa.errors.BUFFER_OVERRUN,{}),el(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&Ja.throwError("data array too short",Sa.errors.BUFFER_OVERRUN,{}),el(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&Ja.throwError("data array too short",Sa.errors.BUFFER_OVERRUN,{});const n=Qa(e,t+1,r);t+1+r+n>e.length&&Ja.throwError("data array too short",Sa.errors.BUFFER_OVERRUN,{});return{consumed:1+r+n,result:Da(e.slice(t+1+r,t+1+r+n))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&Ja.throwError("data too short",Sa.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:Da(e.slice(t+1,t+1+r))}}return{consumed:1,result:Da(e[t])}}function rl(e){const t=La(e),r=tl(t,0);return r.consumed!==t.length&&Ja.throwArgumentError("invalid rlp data","data",e),r.result}const nl=new Sa("address/5.7.0");function ol(e){Pa(e,20)||nl.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=La(Xa(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const il={};for(let e=0;e<10;e++)il[String(e)]=String(e);for(let e=0;e<26;e++)il[String.fromCharCode(65+e)]=String(10+e);const sl=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function al(e){let t=null;if("string"!=typeof e&&nl.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=ol(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&nl.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>il[e])).join("");for(;t.length>=sl;){let e=t.substring(0,sl);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}(e)&&nl.throwArgumentError("bad icap checksum","address",e),t=q(e.substring(4));t.length<40;)t="0"+t;t=ol("0x"+t)}else nl.throwArgumentError("invalid address","address",e);return t}var ll;!function(e){e[e.MAINNET=1]="MAINNET",e[e.GOERLI=5]="GOERLI",e[e.BSC=56]="BSC",e[e.POLYGON=137]="POLYGON",e[e.ARBITRUM_ONE=42161]="ARBITRUM_ONE",e[e.AURORA=1313161554]="AURORA",e[e.OKCHAIN=66]="OKCHAIN",e[e.OPTIMISM=10]="OPTIMISM",e[e.AVALANCHE=43114]="AVALANCHE",e[e.CONFLUX=1030]="CONFLUX",e[e.BASE=8453]="BASE",e[e.LINEA=59144]="LINEA",e[e.SCROLL=534352]="SCROLL",e[e.MANTA=169]="MANTA",e[e.MANTLE=5e3]="MANTLE",e[e.TON=-239]="TON"}(ll||(ll={}));const cl={[ll.MAINNET]:["https://rpc.ankr.com/eth"],[ll.GOERLI]:["https://goerli.optimism.io/"],[ll.BSC]:["https://bsc-dataseed1.binance.org","https://bsc-dataseed2.binance.org","https://bsc-dataseed3.binance.org"],[ll.POLYGON]:["https://polygon-rpc.com","https://rpc-mainnet.matic.quiknode.pro","https://rpc.ankr.com/polygon"],[ll.ARBITRUM_ONE]:["https://arb1.arbitrum.io/rpc","https://rpc.ankr.com/arbitrum"],[ll.AURORA]:["https://mainnet.aurora.dev/"],[ll.OKCHAIN]:["https://exchainrpc.okex.org"],[ll.OPTIMISM]:["https://optimism-mainnet.public.blastapi.io"],[ll.AVALANCHE]:["https://api.avax.network/ext/bc/C/rpc","https://rpc.ankr.com/avalanche"],[ll.CONFLUX]:["https://evm.confluxrpc.com"],[ll.BASE]:["https://mainnet.base.org"],[ll.LINEA]:["https://rpc.linea.build"],[ll.SCROLL]:["https://rpc.scroll.io"],[ll.MANTA]:["https://pacific-rpc.manta.network/http"],[ll.MANTLE]:["https://rpc.mantle.xyz"],[ll.TON]:[]},dl={symbol:"ETH",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,showDecimals:4,wrappedTokenSymbol:"WETH"},ul={[ll.MAINNET]:Object.assign(Object.assign({},dl),{wrappedTokenAddress:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}),[ll.GOERLI]:Object.assign(Object.assign({},dl),{wrappedTokenAddress:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"}),[ll.OPTIMISM]:Object.assign(Object.assign({},dl),{wrappedTokenAddress:"0x4200000000000000000000000000000000000006"}),[ll.CONFLUX]:Object.assign(Object.assign({},dl),{symbol:"CFX",name:"CFX",wrappedTokenSymbol:"WCFX",wrappedTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b"}),[ll.BSC]:Object.assign(Object.assign({},dl),{symbol:"BNB",name:"BNB",wrappedTokenSymbol:"WBNB",wrappedTokenAddress:"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}),[ll.OKCHAIN]:Object.assign(Object.assign({},dl),{symbol:"OKT",name:"OKT",wrappedTokenSymbol:"WOKT",wrappedTokenAddress:"0x8F8526dbfd6E38E3D8307702cA8469Bae6C56C15"}),[ll.POLYGON]:Object.assign(Object.assign({},dl),{symbol:"MATIC",name:"MATIC",showDecimals:6,wrappedTokenSymbol:"WMATIC",wrappedTokenAddress:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"}),[ll.ARBITRUM_ONE]:Object.assign(Object.assign({},dl),{name:"Ethereum",showDecimals:6,wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}),[ll.AURORA]:Object.assign(Object.assign({},dl),{name:"Ethereum",showDecimals:6,wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB"}),[ll.AVALANCHE]:Object.assign(Object.assign({},dl),{symbol:"AVAX",name:"Avalanche",showDecimals:6,wrappedTokenSymbol:"WAVAX",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7"}),[ll.BASE]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WETH",wrappedTokenAddress:"0x4200000000000000000000000000000000000006"}),[ll.LINEA]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WETH",wrappedTokenAddress:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f"}),[ll.SCROLL]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WETH",wrappedTokenAddress:"0x5300000000000000000000000000000000000004"}),[ll.MANTA]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WETH",wrappedTokenAddress:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746"}),[ll.MANTLE]:Object.assign(Object.assign({},dl),{wrappedTokenSymbol:"WMNT",wrappedTokenAddress:"0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8"}),[ll.TON]:Object.assign(Object.assign({},dl),{symbol:"TON",name:"TON",decimals:9,wrappedTokenSymbol:"TON",wrappedTokenAddress:""})},pl={[ll.MAINNET]:"ethereum",[ll.GOERLI]:"goerli",[ll.OPTIMISM]:"optimism",[ll.CONFLUX]:"cfx",[ll.BSC]:"bsc",[ll.OKCHAIN]:"okex-chain",[ll.POLYGON]:"polygon",[ll.ARBITRUM_ONE]:"arbitrum",[ll.AURORA]:"aurora",[ll.AVALANCHE]:"avalanche",[ll.BASE]:"base",[ll.LINEA]:"linea",[ll.SCROLL]:"scr",[ll.MANTA]:"manta",[ll.MANTLE]:"mantle",[ll.TON]:""},hl={[ll.MAINNET]:"etherscan.io",[ll.GOERLI]:"goerli.etherscan.io",[ll.OPTIMISM]:"optimistic.etherscan.io",[ll.CONFLUX]:"snowtrace.io",[ll.BSC]:"bscscan.com",[ll.OKCHAIN]:"www.oklink.com/okexchain",[ll.POLYGON]:"polygonscan.com",[ll.ARBITRUM_ONE]:"arbiscan.io",[ll.AURORA]:"aurorascan.dev",[ll.AVALANCHE]:"snowtrace.io",[ll.BASE]:"basescan.org",[ll.LINEA]:"lineascan.build",[ll.SCROLL]:"scrollscan.com",[ll.MANTA]:"pacific-explorer.manta.network",[ll.MANTLE]:"explorer.mantle.xyz",[ll.TON]:"tonviewer.com"},fl=(e,t)=>{if(0===e.length||0===t.length)return!1;if(t.length===e.length)return e.toLowerCase()===t.toLowerCase();const r=e.substring(2,e.length).toLowerCase(),n=t.substring(2,t.length).toLowerCase();return r.length>n.length?r.endsWith(n):n.endsWith(r)};function ml(e){try{return al(e)}catch(e){return!1}}function gl(e){return e.toLocaleLowerCase()==="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE".toLocaleLowerCase()}function yl(e,t){return`https://${hl[t||1]}${e?`/${e}`:""}`}function bl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function vl(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}const xl=e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_POPULAR_TOKEN_LIST",payload:e})})),wl=(e,t)=>r=>vl(void 0,void 0,void 0,(function*(){r({type:"SET_ETH_BALANCE",payload:{[e]:t}})})),El=e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_ACCOUNT_BALANCES",payload:e})})),Al=e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_BALANCE_LOADINGS",payload:e})}));var Cl=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const kl=new Sa("properties/5.7.0");function Tl(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function Rl(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function Sl(e){return Cl(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function Nl(e){const t={};for(const r in e)t[r]=e[r];return t}const Ml={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Ol(e){if(null==e||Ml[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;r<t.length;r++){let n=null;try{n=e[t[r]]}catch(e){continue}if(!Ol(n))return!1}return!0}return kl.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function Il(e){if(Ol(e))return e;if(Array.isArray(e))return Object.freeze(e.map((e=>Fl(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&Tl(t,r,Fl(n))}return t}return kl.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function Fl(e){return Il(e)}class jl{constructor(e){for(const t in e)this[t]=Fl(e[t])}}var Ll=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const _l=new Sa("abstract-provider/5.7.0");class Wl extends jl{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class Pl{constructor(){_l.checkAbstract(new.target,Pl),Tl(this,"_isProvider",!0)}getFeeData(){return Ll(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield Sl({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,n=null,o=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,o=Q.from("1500000000"),n=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:r,maxFeePerGas:n,maxPriorityFeePerGas:o,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}const Dl=new Sa("networks/5.7.1");function Bl(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new t.PocketProvider(e,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const o=["ropsten"],i=new t.AnkrProvider(e,r.ankr);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let o=1;return null!=r.quorum?o=r.quorum:"homestead"===e&&(o=2),new t.FallbackProvider(n,o)}return n[0]};return t.renetwork=function(e){return Bl(e)},t}function Ul(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return Ul(e,t)},r}const Vl={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Bl("homestead")},Zl={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Bl("ropsten")},Hl={chainId:63,name:"classicMordor",_defaultProvider:Ul("https://www.ethercluster.com/mordor","classicMordor")},zl={unspecified:{chainId:0,name:"unspecified"},homestead:Vl,mainnet:Vl,morden:{chainId:2,name:"morden"},ropsten:Zl,testnet:Zl,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Bl("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Bl("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Bl("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Bl("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Ul("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Hl,classicTestnet:Hl,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Ul("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Bl("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Bl("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function Yl(e){e=atob(e);const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return La(t)}function Gl(e){e=La(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}class Xl{constructor(e){Tl(this,"alphabet",e),Tl(this,"base",e.length),Tl(this,"_alphabetMap",{}),Tl(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=La(e);if(0===t.length)return"";let r=[0];for(let e=0;e<t.length;++e){let n=t[e];for(let e=0;e<r.length;++e)n+=r[e]<<8,r[e]=n%this.base,n=n/this.base|0;for(;n>0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e<t.length-1;++e)n+=this._leader;for(let e=r.length-1;e>=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let n=this._alphabetMap[e[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let o=n;for(let e=0;e<t.length;++e)o+=t[e]*this.base,t[e]=255&o,o>>=8;for(;o>0;)t.push(255&o),o>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return La(new Uint8Array(t.reverse()))}}new Xl("abcdefghijklmnopqrstuvwxyz234567");const Jl=new Xl("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),ql="0x0000000000000000000000000000000000000000",Ql=Q.from(-1),Kl=Q.from(0),$l=Q.from(1),ec=Q.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),tc=new Sa("strings/5.7.0");var rc,nc;function oc(e,t,r,n,o){if(e===nc.BAD_PREFIX||e===nc.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return e===nc.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(rc||(rc={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(nc||(nc={}));const ic=Object.freeze({error:function(e,t,r,n,o){return tc.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:oc,replace:function(e,t,r,n,o){return e===nc.OVERLONG?(n.push(o),0):(n.push(65533),oc(e,t,r))}});function sc(e,t){null==t&&(t=ic.error),e=La(e);const r=[];let n=0;for(;n<e.length;){const o=e[n++];if(o>>7==0){r.push(o);continue}let i=null,s=null;if(192==(224&o))i=1,s=127;else if(224==(240&o))i=2,s=2047;else{if(240!=(248&o)){n+=t(128==(192&o)?nc.UNEXPECTED_CONTINUE:nc.BAD_PREFIX,n-1,e,r);continue}i=3,s=65535}if(n-1+i>=e.length){n+=t(nc.OVERRUN,n-1,e,r);continue}let a=o&(1<<8-i-1)-1;for(let o=0;o<i;o++){let o=e[n];if(128!=(192&o)){n+=t(nc.MISSING_CONTINUE,n,e,r),a=null;break}a=a<<6|63&o,n++}null!==a&&(a>1114111?n+=t(nc.OUT_OF_RANGE,n-1-i,e,r,a):a>=55296&&a<=57343?n+=t(nc.UTF16_SURROGATE,n-1-i,e,r,a):a<=s?n+=t(nc.OVERLONG,n-1-i,e,r,a):r.push(a))}return r}function ac(e,t=rc.current){t!=rc.current&&(tc.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);if(t>=e.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const i=65536+((1023&n)<<10)+(1023&o);r.push(i>>18|240),r.push(i>>12&63|128),r.push(i>>6&63|128),r.push(63&i|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return La(r)}function lc(e,t){return sc(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function cc(e){return Xa(ac(e))}function dc(e,t){null==t&&(t=1);const r=[],n=r.forEach,o=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?o(e,t-1):r.push(e)}))};return o(e,t),r}function uc(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),o=1,i=[0,1];for(let e=1;e<n;e++)i.push(o+=r());let s=r(),a=t;t+=s;let l=0,c=0;function d(){return 0==l&&(c=c<<8|e[t++],l=8),c>>--l&1}const u=Math.pow(2,31),p=u>>>1,h=p>>1,f=u-1;let m=0;for(let e=0;e<31;e++)m=m<<1|d();let g=[],y=0,b=u;for(;;){let e=Math.floor(((m-y+1)*o-1)/b),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<i[n]?r=n:t=n}if(0==t)break;g.push(t);let s=y+Math.floor(b*i[t]/o),a=y+Math.floor(b*i[t+1]/o)-1;for(;0==((s^a)&p);)m=m<<1&f|d(),s=s<<1&f,a=a<<1&f|1;for(;s&~a&h;)m=m&p|m<<1&f>>>1|d(),s=s<<1^p,a=(a^p)<<1|p|1;y=s,b=1+a-s}let v=n-4;return g.map((t=>{switch(t-v){case 3:return v+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return v+256+(e[a++]<<8|e[a++]);case 1:return v+e[a++];default:return t-1}}))}(e))}function pc(e){return 1&e?~e>>1:e>>1}function hc(e,t){let r=Array(e);for(let n=0,o=-1;n<e;n++)r[n]=o+=1+t();return r}function fc(e,t){let r=Array(e);for(let n=0,o=0;n<e;n++)r[n]=o+=pc(t());return r}function mc(e,t){let r=hc(e(),e),n=e(),o=hc(n,e),i=function(e,t){let r=Array(e);for(let n=0;n<e;n++)r[n]=1+t();return r}(n,e);for(let e=0;e<n;e++)for(let t=0;t<i[e];t++)r.push(o[e]+t);return t?r.map((e=>t[e])):r}function gc(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let o=0;o<t;o++)fc(e,r).forEach(((e,t)=>n[t].push(e)));return n}function yc(e,t){let r=1+t(),n=t(),o=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return dc(gc(o.length,1+e,t).map(((e,t)=>{const i=e[0],s=e.slice(1);return Array(o[t]).fill(void 0).map(((e,t)=>{let o=t*n;return[i+t*r,s.map((e=>e+o))]}))})))}function bc(e,t){return gc(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const vc=uc(Yl("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),xc=new Set(mc(vc)),wc=new Set(mc(vc)),Ec=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(yc(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(bc(r,e))}return function(e){const t={};for(let r=0;r<e.length;r++){const n=e[r];t[n[0]]=n[1]}return t}(dc(t))}(vc),Ac=function(e){let t=mc(e).sort(((e,t)=>e-t));return function r(){let n=[];for(;;){let o=mc(e,t);if(0==o.length)break;n.push({set:new Set(o),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let o=e(),i=o%3;o=o/3|0;let s=!!(1&o);return o>>=1,{branches:n,valid:i,fe0f:s,save:1==o,check:2==o}}()}(vc);function Cc(e){return function(e,t=rc.current){return sc(ac(e,t))}(e)}function kc(e){return e.filter((e=>65039!=e))}function Tc(e){for(let t of e.split(".")){let e=Cc(t);try{for(let t=e.lastIndexOf(95)-1;t>=0;t--)if(95!==e[t])throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&45===e[2]&&45===e[3])throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function Rc(e){return Tc(function(e,t){let r=Cc(e).reverse(),n=[];for(;r.length;){let e=Sc(r);if(e){n.push(...t(e));continue}let o=r.pop();if(xc.has(o)){n.push(o);continue}if(wc.has(o))continue;let i=Ec[o];if(!i)throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`);n.push(...i)}return Tc(function(e){return e.normalize("NFC")}(String.fromCodePoint(...n)))}(e,kc))}function Sc(e,t){var r;let n,o,i=Ac,s=[],a=e.length;for(t&&(t.length=0);a;){let l=e[--a];if(i=null===(r=i.branches.find((e=>e.set.has(l))))||void 0===r?void 0:r.node,!i)break;if(i.save)o=l;else if(i.check&&l===o)break;s.push(l),i.fe0f&&(s.push(65039),a>0&&65039==e[a-1]&&a--),i.valid&&(n=s.slice(),2==i.valid&&n.splice(1,1),t&&t.push(...e.slice(a).reverse()),e.length=a)}return n}const Nc=new Sa("hash/5.7.0"),Mc=new Uint8Array(32);function Oc(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function Ic(e){const t=ac(Rc(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++){46===t[e]&&(r.push(Oc(t.slice(n,e))),n=e+1)}if(n>=t.length)throw new Error("invalid ENS name; empty component");return r.push(Oc(t.slice(n))),r}function Fc(e){"string"!=typeof e&&Nc.throwArgumentError("invalid ENS name; not a string","name",e);let t=Mc;const r=Ic(e);for(;r.length;)t=Xa(_a([t,Xa(r.pop())]));return Da(t)}Mc.fill(0);var jc=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const Lc=new Sa("hash/5.7.0"),_c=new Uint8Array(32);_c.fill(0);const Wc=Q.from(-1),Pc=Q.from(0),Dc=Q.from(1),Bc=Q.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const Uc=Ha(Dc.toHexString(),32),Vc=Ha(Pc.toHexString(),32),Zc={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Hc=["name","version","chainId","verifyingContract","salt"];function zc(e){return function(t){return"string"!=typeof t&&Lc.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const Yc={name:zc("name"),version:zc("version"),chainId:function(e){try{return Q.from(e).toString()}catch(e){}return Lc.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return al(e).toLowerCase()}catch(e){}return Lc.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=La(e);if(32!==t.length)throw new Error("bad length");return Da(t)}catch(e){}return Lc.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function Gc(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&Lc.throwArgumentError("invalid numeric width","type",e);const o=Bc.mask(r?n-1:n),i=r?o.add(Dc).mul(Wc):Pc;return function(t){const r=Q.from(t);return(r.lt(i)||r.gt(o))&&Lc.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),Ha(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&Lc.throwArgumentError("invalid bytes width","type",e),function(t){return La(t).length!==r&&Lc.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=La(e),r=t.length%32;return r?Va([t,_c.slice(r)]):Da(t)}(t)}}}switch(e){case"address":return function(e){return Ha(al(e),32)};case"bool":return function(e){return e?Uc:Vc};case"bytes":return function(e){return Xa(e)};case"string":return function(e){return cc(e)}}return null}function Xc(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class Jc{constructor(e){Tl(this,"types",Object.freeze(Fl(e))),Tl(this,"_encoderCache",{}),Tl(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const o={};e[n].forEach((i=>{o[i.name]&&Lc.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(n)}`,"types",e),o[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===n&&Lc.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e);Gc(s)||(r[s]||Lc.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",e),r[s].push(n),t[n][s]=!0)}))}const o=Object.keys(r).filter((e=>0===r[e].length));0===o.length?Lc.throwArgumentError("missing primary type","types",e):o.length>1&&Lc.throwArgumentError(`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),Tl(this,"primaryType",o[0]),function o(i,s){s[i]&&Lc.throwArgumentError(`circular type reference to ${JSON.stringify(i)}`,"types",e),s[i]=!0,Object.keys(t[i]).forEach((e=>{r[e]&&(o(e,s),Object.keys(s).forEach((t=>{n[t][e]=!0})))})),delete s[i]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=Xc(t,e[t])+r.map((t=>Xc(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=Gc(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&Lc.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let o=t.map(r);return this._types[e]&&(o=o.map(Xa)),Xa(Va(o))}}const r=this.types[e];if(r){const t=cc(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?Xa(n):n}));return n.unshift(t),Va(n)}}return Lc.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||Lc.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Xa(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(Gc(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],o=parseInt(n[3]);return o>=0&&t.length!==o&&Lc.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const o=this.types[e];return o?o.reduce(((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e)),{}):Lc.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Jc(e)}static getPrimaryType(e){return Jc.from(e).primaryType}static hashStruct(e,t,r){return Jc.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=Zc[r];n||Lc.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>Hc.indexOf(e.name)-Hc.indexOf(t.name))),Jc.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return Va(["0x1901",Jc.hashDomain(e),Jc.from(t).hash(r)])}static hash(e,t,r){return Xa(Jc.encode(e,t,r))}static resolveNames(e,t,r,n){return jc(this,void 0,void 0,(function*(){e=Nl(e);const o={};e.verifyingContract&&!Pa(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const i=Jc.from(t);i.visit(r,((e,t)=>("address"!==e||Pa(t,20)||(o[t]="0x"),t)));for(const e in o)o[e]=yield n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=i.visit(r,((e,t)=>"address"===e&&o[t]?o[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){Jc.hashDomain(e);const n={},o=[];Hc.forEach((t=>{const r=e[t];null!=r&&(n[t]=Yc[t](r),o.push({name:t,type:Zc[t]}))}));const i=Jc.from(t),s=Nl(t);return s.EIP712Domain?Lc.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):s.EIP712Domain=o,i.encode(r),{types:s,domain:n,primaryType:i.primaryType,message:i.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return Da(La(t));if(e.match(/^u?int/))return Q.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&Lc.throwArgumentError("invalid string","value",t),t}return Lc.throwArgumentError("unsupported type","type",e)}))}}}var qc={},Qc={},Kc=$c;function $c(e,t){if(!e)throw new Error(t||"Assertion failed")}$c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var ed,td={exports:{}},rd={exports:{}};!function(e){try{var t=require("util");if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=(ed||(ed=1,"function"==typeof Object.create?rd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:rd.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),rd.exports)}}(td);var nd=Kc,od=td.exports;function id(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function sd(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function ad(e){return 1===e.length?"0"+e:e}function ld(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}Qc.inherits=od,Qc.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)r.push(parseInt(e[o]+e[o+1],16))}else for(var n=0,o=0;o<e.length;o++){var i=e.charCodeAt(o);i<128?r[n++]=i:i<2048?(r[n++]=i>>6|192,r[n++]=63&i|128):id(e,o)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++o)),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=63&i|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=63&i|128)}else for(o=0;o<e.length;o++)r[o]=0|e[o];return r},Qc.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=ad(e[r].toString(16));return t},Qc.htonl=sd,Qc.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var o=e[n];"little"===t&&(o=sd(o)),r+=ld(o.toString(16))}return r},Qc.zero2=ad,Qc.zero8=ld,Qc.join32=function(e,t,r,n){var o=r-t;nd(o%4==0);for(var i=new Array(o/4),s=0,a=t;s<i.length;s++,a+=4){var l;l="big"===n?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],i[s]=l>>>0}return i},Qc.split32=function(e,t){for(var r=new Array(4*e.length),n=0,o=0;n<e.length;n++,o+=4){var i=e[n];"big"===t?(r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=255&i):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=255&i)}return r},Qc.rotr32=function(e,t){return e>>>t|e<<32-t},Qc.rotl32=function(e,t){return e<<t|e>>>32-t},Qc.sum32=function(e,t){return e+t>>>0},Qc.sum32_3=function(e,t,r){return e+t+r>>>0},Qc.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},Qc.sum32_5=function(e,t,r,n,o){return e+t+r+n+o>>>0},Qc.sum64=function(e,t,r,n){var o=e[t],i=n+e[t+1]>>>0,s=(i<n?1:0)+r+o;e[t]=s>>>0,e[t+1]=i},Qc.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},Qc.sum64_lo=function(e,t,r,n){return t+n>>>0},Qc.sum64_4_hi=function(e,t,r,n,o,i,s,a){var l=0,c=t;return l+=(c=c+n>>>0)<t?1:0,l+=(c=c+i>>>0)<i?1:0,e+r+o+s+(l+=(c=c+a>>>0)<a?1:0)>>>0},Qc.sum64_4_lo=function(e,t,r,n,o,i,s,a){return t+n+i+a>>>0},Qc.sum64_5_hi=function(e,t,r,n,o,i,s,a,l,c){var d=0,u=t;return d+=(u=u+n>>>0)<t?1:0,d+=(u=u+i>>>0)<i?1:0,d+=(u=u+a>>>0)<a?1:0,e+r+o+s+l+(d+=(u=u+c>>>0)<c?1:0)>>>0},Qc.sum64_5_lo=function(e,t,r,n,o,i,s,a,l,c){return t+n+i+a+c>>>0},Qc.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},Qc.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},Qc.shr64_hi=function(e,t,r){return e>>>r},Qc.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var cd={},dd=Qc,ud=Kc;function pd(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}cd.BlockHash=pd,pd.prototype.update=function(e,t){if(e=dd.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=dd.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},pd.prototype.digest=function(e){return this.update(this._pad()),ud(null===this.pending),this._digest(e)},pd.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var o=1;o<r;o++)n[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=e>>>24&255,n[o++]=e>>>16&255,n[o++]=e>>>8&255,n[o++]=255&e}else for(n[o++]=255&e,n[o++]=e>>>8&255,n[o++]=e>>>16&255,n[o++]=e>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,i=8;i<this.padLength;i++)n[o++]=0;return n};var hd={},fd={},md=Qc.rotr32;function gd(e,t,r){return e&t^~e&r}function yd(e,t,r){return e&t^e&r^t&r}function bd(e,t,r){return e^t^r}fd.ft_1=function(e,t,r,n){return 0===e?gd(t,r,n):1===e||3===e?bd(t,r,n):2===e?yd(t,r,n):void 0},fd.ch32=gd,fd.maj32=yd,fd.p32=bd,fd.s0_256=function(e){return md(e,2)^md(e,13)^md(e,22)},fd.s1_256=function(e){return md(e,6)^md(e,11)^md(e,25)},fd.g0_256=function(e){return md(e,7)^md(e,18)^e>>>3},fd.g1_256=function(e){return md(e,17)^md(e,19)^e>>>10};var vd=Qc,xd=cd,wd=fd,Ed=vd.rotl32,Ad=vd.sum32,Cd=vd.sum32_5,kd=wd.ft_1,Td=xd.BlockHash,Rd=[1518500249,1859775393,2400959708,3395469782];function Sd(){if(!(this instanceof Sd))return new Sd;Td.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}vd.inherits(Sd,Td);var Nd=Sd;Sd.blockSize=512,Sd.outSize=160,Sd.hmacStrength=80,Sd.padLength=64,Sd.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=Ed(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var o=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4];for(n=0;n<r.length;n++){var c=~~(n/20),d=Cd(Ed(o,5),kd(c,i,s,a),l,r[n],Rd[c]);l=a,a=s,s=Ed(i,30),i=o,o=d}this.h[0]=Ad(this.h[0],o),this.h[1]=Ad(this.h[1],i),this.h[2]=Ad(this.h[2],s),this.h[3]=Ad(this.h[3],a),this.h[4]=Ad(this.h[4],l)},Sd.prototype._digest=function(e){return"hex"===e?vd.toHex32(this.h,"big"):vd.split32(this.h,"big")};var Md=Qc,Od=cd,Id=fd,Fd=Kc,jd=Md.sum32,Ld=Md.sum32_4,_d=Md.sum32_5,Wd=Id.ch32,Pd=Id.maj32,Dd=Id.s0_256,Bd=Id.s1_256,Ud=Id.g0_256,Vd=Id.g1_256,Zd=Od.BlockHash,Hd=[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];function zd(){if(!(this instanceof zd))return new zd;Zd.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Hd,this.W=new Array(64)}Md.inherits(zd,Zd);var Yd=zd;zd.blockSize=512,zd.outSize=256,zd.hmacStrength=192,zd.padLength=64,zd.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=Ld(Vd(r[n-2]),r[n-7],Ud(r[n-15]),r[n-16]);var o=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4],c=this.h[5],d=this.h[6],u=this.h[7];for(Fd(this.k.length===r.length),n=0;n<r.length;n++){var p=_d(u,Bd(l),Wd(l,c,d),this.k[n],r[n]),h=jd(Dd(o),Pd(o,i,s));u=d,d=c,c=l,l=jd(a,p),a=s,s=i,i=o,o=jd(p,h)}this.h[0]=jd(this.h[0],o),this.h[1]=jd(this.h[1],i),this.h[2]=jd(this.h[2],s),this.h[3]=jd(this.h[3],a),this.h[4]=jd(this.h[4],l),this.h[5]=jd(this.h[5],c),this.h[6]=jd(this.h[6],d),this.h[7]=jd(this.h[7],u)},zd.prototype._digest=function(e){return"hex"===e?Md.toHex32(this.h,"big"):Md.split32(this.h,"big")};var Gd=Qc,Xd=Yd;function Jd(){if(!(this instanceof Jd))return new Jd;Xd.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Gd.inherits(Jd,Xd);var qd=Jd;Jd.blockSize=512,Jd.outSize=224,Jd.hmacStrength=192,Jd.padLength=64,Jd.prototype._digest=function(e){return"hex"===e?Gd.toHex32(this.h.slice(0,7),"big"):Gd.split32(this.h.slice(0,7),"big")};var Qd=Qc,Kd=cd,$d=Kc,eu=Qd.rotr64_hi,tu=Qd.rotr64_lo,ru=Qd.shr64_hi,nu=Qd.shr64_lo,ou=Qd.sum64,iu=Qd.sum64_hi,su=Qd.sum64_lo,au=Qd.sum64_4_hi,lu=Qd.sum64_4_lo,cu=Qd.sum64_5_hi,du=Qd.sum64_5_lo,uu=Kd.BlockHash,pu=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function hu(){if(!(this instanceof hu))return new hu;uu.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=pu,this.W=new Array(160)}Qd.inherits(hu,uu);var fu=hu;function mu(e,t,r,n,o){var i=e&r^~e&o;return i<0&&(i+=4294967296),i}function gu(e,t,r,n,o,i){var s=t&n^~t&i;return s<0&&(s+=4294967296),s}function yu(e,t,r,n,o){var i=e&r^e&o^r&o;return i<0&&(i+=4294967296),i}function bu(e,t,r,n,o,i){var s=t&n^t&i^n&i;return s<0&&(s+=4294967296),s}function vu(e,t){var r=eu(e,t,28)^eu(t,e,2)^eu(t,e,7);return r<0&&(r+=4294967296),r}function xu(e,t){var r=tu(e,t,28)^tu(t,e,2)^tu(t,e,7);return r<0&&(r+=4294967296),r}function wu(e,t){var r=eu(e,t,14)^eu(e,t,18)^eu(t,e,9);return r<0&&(r+=4294967296),r}function Eu(e,t){var r=tu(e,t,14)^tu(e,t,18)^tu(t,e,9);return r<0&&(r+=4294967296),r}function Au(e,t){var r=eu(e,t,1)^eu(e,t,8)^ru(e,t,7);return r<0&&(r+=4294967296),r}function Cu(e,t){var r=tu(e,t,1)^tu(e,t,8)^nu(e,t,7);return r<0&&(r+=4294967296),r}function ku(e,t){var r=eu(e,t,19)^eu(t,e,29)^ru(e,t,6);return r<0&&(r+=4294967296),r}function Tu(e,t){var r=tu(e,t,19)^tu(t,e,29)^nu(e,t,6);return r<0&&(r+=4294967296),r}hu.blockSize=1024,hu.outSize=512,hu.hmacStrength=192,hu.padLength=128,hu.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var o=ku(r[n-4],r[n-3]),i=Tu(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],l=Au(r[n-30],r[n-29]),c=Cu(r[n-30],r[n-29]),d=r[n-32],u=r[n-31];r[n]=au(o,i,s,a,l,c,d,u),r[n+1]=lu(o,i,s,a,l,c,d,u)}},hu.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],o=this.h[1],i=this.h[2],s=this.h[3],a=this.h[4],l=this.h[5],c=this.h[6],d=this.h[7],u=this.h[8],p=this.h[9],h=this.h[10],f=this.h[11],m=this.h[12],g=this.h[13],y=this.h[14],b=this.h[15];$d(this.k.length===r.length);for(var v=0;v<r.length;v+=2){var x=y,w=b,E=wu(u,p),A=Eu(u,p),C=mu(u,p,h,f,m),k=gu(u,p,h,f,m,g),T=this.k[v],R=this.k[v+1],S=r[v],N=r[v+1],M=cu(x,w,E,A,C,k,T,R,S,N),O=du(x,w,E,A,C,k,T,R,S,N);x=vu(n,o),w=xu(n,o),E=yu(n,o,i,s,a),A=bu(n,o,i,s,a,l);var I=iu(x,w,E,A),F=su(x,w,E,A);y=m,b=g,m=h,g=f,h=u,f=p,u=iu(c,d,M,O),p=su(d,d,M,O),c=a,d=l,a=i,l=s,i=n,s=o,n=iu(M,O,I,F),o=su(M,O,I,F)}ou(this.h,0,n,o),ou(this.h,2,i,s),ou(this.h,4,a,l),ou(this.h,6,c,d),ou(this.h,8,u,p),ou(this.h,10,h,f),ou(this.h,12,m,g),ou(this.h,14,y,b)},hu.prototype._digest=function(e){return"hex"===e?Qd.toHex32(this.h,"big"):Qd.split32(this.h,"big")};var Ru=Qc,Su=fu;function Nu(){if(!(this instanceof Nu))return new Nu;Su.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Ru.inherits(Nu,Su);var Mu=Nu;Nu.blockSize=1024,Nu.outSize=384,Nu.hmacStrength=192,Nu.padLength=128,Nu.prototype._digest=function(e){return"hex"===e?Ru.toHex32(this.h.slice(0,12),"big"):Ru.split32(this.h.slice(0,12),"big")},hd.sha1=Nd,hd.sha224=qd,hd.sha256=Yd,hd.sha384=Mu,hd.sha512=fu;var Ou={},Iu=Qc,Fu=cd,ju=Iu.rotl32,Lu=Iu.sum32,_u=Iu.sum32_3,Wu=Iu.sum32_4,Pu=Fu.BlockHash;function Du(){if(!(this instanceof Du))return new Du;Pu.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Bu(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function Uu(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function Vu(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}Iu.inherits(Du,Pu),Ou.ripemd160=Du,Du.blockSize=512,Du.outSize=160,Du.hmacStrength=192,Du.padLength=64,Du.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],o=this.h[2],i=this.h[3],s=this.h[4],a=r,l=n,c=o,d=i,u=s,p=0;p<80;p++){var h=Lu(ju(Wu(r,Bu(p,n,o,i),e[Zu[p]+t],Uu(p)),zu[p]),s);r=s,s=i,i=ju(o,10),o=n,n=h,h=Lu(ju(Wu(a,Bu(79-p,l,c,d),e[Hu[p]+t],Vu(p)),Yu[p]),u),a=u,u=d,d=ju(c,10),c=l,l=h}h=_u(this.h[1],o,d),this.h[1]=_u(this.h[2],i,u),this.h[2]=_u(this.h[3],s,a),this.h[3]=_u(this.h[4],r,l),this.h[4]=_u(this.h[0],n,c),this.h[0]=h},Du.prototype._digest=function(e){return"hex"===e?Iu.toHex32(this.h,"little"):Iu.split32(this.h,"little")};var Zu=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Hu=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],zu=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Yu=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Gu=Qc,Xu=Kc;function Ju(e,t,r){if(!(this instanceof Ju))return new Ju(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(Gu.toArray(t,r))}var qu=Ju;Ju.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),Xu(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},Ju.prototype.update=function(e,t){return this.inner.update(e,t),this},Ju.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=qc;t.utils=Qc,t.common=cd,t.sha=hd,t.ripemd=Ou,t.hmac=qu,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}();var Qu=qc;function Ku(e){return"0x"+Qu.sha256().update(La(e)).digest("hex")}new Sa("sha2/5.7.0");var $u=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function ep(e,t){return $u(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),o=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach(((e,t)=>{i[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{i[e.toLowerCase()]=n.headers.get(e)})),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:La(new Uint8Array(o))}}))}var tp=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const rp=new Sa("web/5.7.1");function np(e){return new Promise((t=>{setTimeout(t,e)}))}function op(e,t){if(null==e)return null;if("string"==typeof e)return e;if(Ia(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return lc(e)}catch(e){}return Da(e)}return e}function ip(e,t,r){let n=null;if(null!=t){n=ac(t);const r="string"==typeof e?{url:e}:Nl(e);if(r.headers){0!==Object.keys(r.headers).filter((e=>"content-type"===e.toLowerCase())).length||(r.headers=Nl(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return function(e,t,r){const n="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;rp.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);const o="object"==typeof e?e.throttleCallback:null,i="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;rp.assertArgument(i>0&&i%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const s="object"==typeof e&&!!e.errorPassThrough,a={};let l=null;const c={method:"GET"};let d=!1,u=12e4;if("string"==typeof e)l=e;else if("object"==typeof e){if(null!=e&&null!=e.url||rp.throwArgumentError("missing URL","connection.url",e),l=e.url,"number"==typeof e.timeout&&e.timeout>0&&(u=e.timeout),e.headers)for(const t in e.headers)a[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(d=!0);if(c.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==l.substring(0,6)&&!0!==e.allowInsecureAuthentication&&rp.throwError("basic authentication requires a secure https url",Sa.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;a.authorization={key:"Authorization",value:"Basic "+Gl(ac(t))}}null!=e.skipFetchSetup&&(c.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(c.fetchOptions=Nl(e.fetchOptions))}const p=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=l?l.match(p):null;if(h)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?Yl(h[3]):(f=h[3],ac(f.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){rp.throwError("processing response error",Sa.errors.SERVER_ERROR,{body:op(h[1],h[2]),error:e,requestBody:null,requestMethod:"GET",url:l})}var f;t&&(c.method="POST",c.body=t,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(t.length)}));const m={};Object.keys(a).forEach((e=>{const t=a[e];m[t.key]=t.value})),c.headers=m;const g=function(){let e=null;return{promise:new Promise((function(t,r){u&&(e=setTimeout((()=>{null!=e&&(e=null,r(rp.makeError("timeout",Sa.errors.TIMEOUT,{requestBody:op(c.body,m["content-type"]),requestMethod:c.method,timeout:u,url:l})))}),u))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),y=function(){return tp(this,void 0,void 0,(function*(){for(let e=0;e<n;e++){let t=null;try{if(t=yield ep(l,c),e<n)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===c.method&&e.match(/^https:/)){l=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(o&&(r=yield o(e,l)),r){let r=0;const n=t.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):i*parseInt(String(Math.random()*Math.pow(2,e))),yield np(r);continue}}}catch(e){t=e.response,null==t&&(g.cancel(),rp.throwError("missing response",Sa.errors.SERVER_ERROR,{requestBody:op(c.body,m["content-type"]),requestMethod:c.method,serverError:e,url:l}))}let a=t.body;if(d&&304===t.statusCode?a=null:!s&&(t.statusCode<200||t.statusCode>=300)&&(g.cancel(),rp.throwError("bad response",Sa.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:op(a,t.headers?t.headers["content-type"]:null),requestBody:op(c.body,m["content-type"]),requestMethod:c.method,url:l})),r)try{const e=yield r(a,t);return g.cancel(),e}catch(r){if(r.throttleRetry&&e<n){let t=!0;if(o&&(t=yield o(e,l)),t){const t=i*parseInt(String(Math.random()*Math.pow(2,e)));yield np(t);continue}}g.cancel(),rp.throwError("processing response error",Sa.errors.SERVER_ERROR,{body:op(a,t.headers?t.headers["content-type"]:null),error:r,requestBody:op(c.body,m["content-type"]),requestMethod:c.method,url:l})}return g.cancel(),a}return rp.throwError("failed response",Sa.errors.SERVER_ERROR,{requestBody:op(c.body,m["content-type"]),requestMethod:c.method,url:l})}))}();return Promise.race([g.promise,y])}(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse(lc(e))}catch(t){rp.throwError("invalid JSON",Sa.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function sp(e,t){return t||(t={}),null==(t=Nl(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let o=null,i=!1;const s=()=>!i&&(i=!0,o&&clearTimeout(o),!0);t.timeout&&(o=setTimeout((()=>{s()&&n(new Error("timeout"))}),t.timeout));const a=t.retryLimit;let l=0;!function o(){return e().then((function(e){if(void 0!==e)s()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",o);else if(t.onceBlock)t.onceBlock.once("block",o);else if(!i){if(l++,l>a)return void(s()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,l)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(o,e)}return null}),(function(e){s()&&n(e)}))}()}))}for(var ap="qpzry9x8gf2tvdw0s3jn54khce6mua7l",lp={},cp=0;cp<ap.length;cp++){var dp=ap.charAt(cp);if(void 0!==lp[dp])throw new TypeError(dp+" is ambiguous");lp[dp]=cp}function up(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function pp(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=up(t)^n>>5}for(t=up(t),r=0;r<e.length;++r){var o=e.charCodeAt(r);t=up(t)^31&o}return t}function hp(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var o=(e=r).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var i=e.slice(0,o),s=e.slice(o+1);if(s.length<6)return"Data too short";var a=pp(i);if("string"==typeof a)return a;for(var l=[],c=0;c<s.length;++c){var d=s.charAt(c),u=lp[d];if(void 0===u)return"Unknown character "+d;a=up(a)^u,c+6>=s.length||l.push(u)}return 1!==a?"Invalid checksum for "+e:{prefix:i,words:l}}function fp(e,t,r,n){for(var o=0,i=0,s=(1<<r)-1,a=[],l=0;l<e.length;++l)for(o=o<<t|e[l],i+=t;i>=r;)i-=r,a.push(o>>i&s);if(n)i>0&&a.push(o<<r-i&s);else{if(i>=t)return"Excess padding";if(o<<r-i&s)return"Non-zero padding"}return a}var mp={decodeUnsafe:function(){var e=hp.apply(null,arguments);if("object"==typeof e)return e},decode:function(e){var t=hp.apply(null,arguments);if("object"==typeof t)return t;throw new Error(t)},encode:function(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");var n=pp(e=e.toLowerCase());if("string"==typeof n)throw new Error(n);for(var o=e+"1",i=0;i<t.length;++i){var s=t[i];if(s>>5!=0)throw new Error("Non 5-bit word");n=up(n)^s,o+=ap.charAt(s)}for(i=0;i<6;++i)n=up(n);for(n^=1,i=0;i<6;++i){o+=ap.charAt(n>>5*(5-i)&31)}return o},toWordsUnsafe:function(e){var t=fp(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=fp(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=fp(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=fp(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}};const gp="providers/5.7.2";var yp={exports:{}};!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var i;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function a(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,n,o){for(var i=0,s=0,a=Math.min(e.length,n),l=t;l<a;l++){var c=e.charCodeAt(l)-48;i*=o,s=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&s<o,"Invalid character"),i+=s}return i}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this._parseHex(e,o,n):(this._parseBase(e,t,o),"le"===n&&this._initArray(this.toArray(),t,n)))},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,s,a=0;if("be"===n)for(o=e.length-1,i=0;o>=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===n)for(o=0,i=0;o<e.length;o+=3)s=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,i=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)o=a(e,t,n)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)o=a(e,t,n)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,o=1;o<=67108863;o*=t)n++;n--,o=o/t|0;for(var i=e.length-r,s=i%n,a=Math.min(i,i-s)+r,c=0,d=r;d<a;d+=n)c=l(e,d,d+n,t),this.imuln(o),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var u=1;for(c=l(e,d,e.length,t),d=0;d<s;d++)u*=t;this.imuln(u),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var o=0|e.words[0],i=0|t.words[0],s=o*i,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var d=l>>>26,u=67108863&l,p=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=p;h++){var f=c-h|0;d+=(s=(o=0|e.words[f])*(i=0|t.words[h])+u)/67108864|0,u=67108863&s}r.words[c]=0|u,l=0|d}return 0!==l?r.words[c]=0|l:r.length--,r._strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<o|i)).toString(16);i=a>>>24-o&16777215,(o+=2)>=26&&(o-=26,s--),n=0!==i||s!==this.length-1?u[6-l.length]+l+n:l+n}for(0!==i&&(n=i.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=p[e],d=h[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(d).toString(e);n=(f=f.idivn(d)).isZero()?m+n:u[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},i&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,o),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===i?(r<e.length&&(e[r++]=s>>24&255),n=0,i=0):(n=s>>>24,i+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===i?(r>=0&&(e[r--]=s>>24&255),n=0,i=0):(n=s>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return n>0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<o:this.words[n]&~(1<<o),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var o=0,i=0;i<n.length;i++)t=(0|r.words[i])+(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<r.length;i++)t=(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;i<r.length;i++)this.words[i]=r.words[i];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s<n.length;s++)i=(t=(0|r.words[s])-(0|n.words[s])+i)>>26,this.words[s]=67108863&t;for(;0!==i&&s<r.length;s++)i=(t=(0|r.words[s])+i)>>26,this.words[s]=67108863&t;if(0===i&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,o,i,s=e.words,a=t.words,l=r.words,c=0,d=0|s[0],u=8191&d,p=d>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],x=8191&v,w=v>>>13,E=0|s[4],A=8191&E,C=E>>>13,k=0|s[5],T=8191&k,R=k>>>13,S=0|s[6],N=8191&S,M=S>>>13,O=0|s[7],I=8191&O,F=O>>>13,j=0|s[8],L=8191&j,_=j>>>13,W=0|s[9],P=8191&W,D=W>>>13,B=0|a[0],U=8191&B,V=B>>>13,Z=0|a[1],H=8191&Z,z=Z>>>13,Y=0|a[2],G=8191&Y,X=Y>>>13,J=0|a[3],q=8191&J,Q=J>>>13,K=0|a[4],$=8191&K,ee=K>>>13,te=0|a[5],re=8191&te,ne=te>>>13,oe=0|a[6],ie=8191&oe,se=oe>>>13,ae=0|a[7],le=8191&ae,ce=ae>>>13,de=0|a[8],ue=8191&de,pe=de>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(u,U))|0)+((8191&(o=(o=Math.imul(u,V))+Math.imul(p,U)|0))<<13)|0;c=((i=Math.imul(p,V))+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(f,U),o=(o=Math.imul(f,V))+Math.imul(m,U)|0,i=Math.imul(m,V);var ye=(c+(n=n+Math.imul(u,H)|0)|0)+((8191&(o=(o=o+Math.imul(u,z)|0)+Math.imul(p,H)|0))<<13)|0;c=((i=i+Math.imul(p,z)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,U),o=(o=Math.imul(y,V))+Math.imul(b,U)|0,i=Math.imul(b,V),n=n+Math.imul(f,H)|0,o=(o=o+Math.imul(f,z)|0)+Math.imul(m,H)|0,i=i+Math.imul(m,z)|0;var be=(c+(n=n+Math.imul(u,G)|0)|0)+((8191&(o=(o=o+Math.imul(u,X)|0)+Math.imul(p,G)|0))<<13)|0;c=((i=i+Math.imul(p,X)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(x,U),o=(o=Math.imul(x,V))+Math.imul(w,U)|0,i=Math.imul(w,V),n=n+Math.imul(y,H)|0,o=(o=o+Math.imul(y,z)|0)+Math.imul(b,H)|0,i=i+Math.imul(b,z)|0,n=n+Math.imul(f,G)|0,o=(o=o+Math.imul(f,X)|0)+Math.imul(m,G)|0,i=i+Math.imul(m,X)|0;var ve=(c+(n=n+Math.imul(u,q)|0)|0)+((8191&(o=(o=o+Math.imul(u,Q)|0)+Math.imul(p,q)|0))<<13)|0;c=((i=i+Math.imul(p,Q)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,U),o=(o=Math.imul(A,V))+Math.imul(C,U)|0,i=Math.imul(C,V),n=n+Math.imul(x,H)|0,o=(o=o+Math.imul(x,z)|0)+Math.imul(w,H)|0,i=i+Math.imul(w,z)|0,n=n+Math.imul(y,G)|0,o=(o=o+Math.imul(y,X)|0)+Math.imul(b,G)|0,i=i+Math.imul(b,X)|0,n=n+Math.imul(f,q)|0,o=(o=o+Math.imul(f,Q)|0)+Math.imul(m,q)|0,i=i+Math.imul(m,Q)|0;var xe=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(o=(o=o+Math.imul(u,ee)|0)+Math.imul(p,$)|0))<<13)|0;c=((i=i+Math.imul(p,ee)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),o=(o=Math.imul(T,V))+Math.imul(R,U)|0,i=Math.imul(R,V),n=n+Math.imul(A,H)|0,o=(o=o+Math.imul(A,z)|0)+Math.imul(C,H)|0,i=i+Math.imul(C,z)|0,n=n+Math.imul(x,G)|0,o=(o=o+Math.imul(x,X)|0)+Math.imul(w,G)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(y,q)|0,o=(o=o+Math.imul(y,Q)|0)+Math.imul(b,q)|0,i=i+Math.imul(b,Q)|0,n=n+Math.imul(f,$)|0,o=(o=o+Math.imul(f,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0;var we=(c+(n=n+Math.imul(u,re)|0)|0)+((8191&(o=(o=o+Math.imul(u,ne)|0)+Math.imul(p,re)|0))<<13)|0;c=((i=i+Math.imul(p,ne)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(N,U),o=(o=Math.imul(N,V))+Math.imul(M,U)|0,i=Math.imul(M,V),n=n+Math.imul(T,H)|0,o=(o=o+Math.imul(T,z)|0)+Math.imul(R,H)|0,i=i+Math.imul(R,z)|0,n=n+Math.imul(A,G)|0,o=(o=o+Math.imul(A,X)|0)+Math.imul(C,G)|0,i=i+Math.imul(C,X)|0,n=n+Math.imul(x,q)|0,o=(o=o+Math.imul(x,Q)|0)+Math.imul(w,q)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,o=(o=o+Math.imul(y,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0,n=n+Math.imul(f,re)|0,o=(o=o+Math.imul(f,ne)|0)+Math.imul(m,re)|0,i=i+Math.imul(m,ne)|0;var Ee=(c+(n=n+Math.imul(u,ie)|0)|0)+((8191&(o=(o=o+Math.imul(u,se)|0)+Math.imul(p,ie)|0))<<13)|0;c=((i=i+Math.imul(p,se)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(I,U),o=(o=Math.imul(I,V))+Math.imul(F,U)|0,i=Math.imul(F,V),n=n+Math.imul(N,H)|0,o=(o=o+Math.imul(N,z)|0)+Math.imul(M,H)|0,i=i+Math.imul(M,z)|0,n=n+Math.imul(T,G)|0,o=(o=o+Math.imul(T,X)|0)+Math.imul(R,G)|0,i=i+Math.imul(R,X)|0,n=n+Math.imul(A,q)|0,o=(o=o+Math.imul(A,Q)|0)+Math.imul(C,q)|0,i=i+Math.imul(C,Q)|0,n=n+Math.imul(x,$)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,o=(o=o+Math.imul(y,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0,n=n+Math.imul(f,ie)|0,o=(o=o+Math.imul(f,se)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,se)|0;var Ae=(c+(n=n+Math.imul(u,le)|0)|0)+((8191&(o=(o=o+Math.imul(u,ce)|0)+Math.imul(p,le)|0))<<13)|0;c=((i=i+Math.imul(p,ce)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,U),o=(o=Math.imul(L,V))+Math.imul(_,U)|0,i=Math.imul(_,V),n=n+Math.imul(I,H)|0,o=(o=o+Math.imul(I,z)|0)+Math.imul(F,H)|0,i=i+Math.imul(F,z)|0,n=n+Math.imul(N,G)|0,o=(o=o+Math.imul(N,X)|0)+Math.imul(M,G)|0,i=i+Math.imul(M,X)|0,n=n+Math.imul(T,q)|0,o=(o=o+Math.imul(T,Q)|0)+Math.imul(R,q)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,n=n+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,o=(o=o+Math.imul(y,se)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,se)|0,n=n+Math.imul(f,le)|0,o=(o=o+Math.imul(f,ce)|0)+Math.imul(m,le)|0,i=i+Math.imul(m,ce)|0;var Ce=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(o=(o=o+Math.imul(u,pe)|0)+Math.imul(p,ue)|0))<<13)|0;c=((i=i+Math.imul(p,pe)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(P,U),o=(o=Math.imul(P,V))+Math.imul(D,U)|0,i=Math.imul(D,V),n=n+Math.imul(L,H)|0,o=(o=o+Math.imul(L,z)|0)+Math.imul(_,H)|0,i=i+Math.imul(_,z)|0,n=n+Math.imul(I,G)|0,o=(o=o+Math.imul(I,X)|0)+Math.imul(F,G)|0,i=i+Math.imul(F,X)|0,n=n+Math.imul(N,q)|0,o=(o=o+Math.imul(N,Q)|0)+Math.imul(M,q)|0,i=i+Math.imul(M,Q)|0,n=n+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(C,re)|0,i=i+Math.imul(C,ne)|0,n=n+Math.imul(x,ie)|0,o=(o=o+Math.imul(x,se)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,se)|0,n=n+Math.imul(y,le)|0,o=(o=o+Math.imul(y,ce)|0)+Math.imul(b,le)|0,i=i+Math.imul(b,ce)|0,n=n+Math.imul(f,ue)|0,o=(o=o+Math.imul(f,pe)|0)+Math.imul(m,ue)|0,i=i+Math.imul(m,pe)|0;var ke=(c+(n=n+Math.imul(u,fe)|0)|0)+((8191&(o=(o=o+Math.imul(u,me)|0)+Math.imul(p,fe)|0))<<13)|0;c=((i=i+Math.imul(p,me)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(P,H),o=(o=Math.imul(P,z))+Math.imul(D,H)|0,i=Math.imul(D,z),n=n+Math.imul(L,G)|0,o=(o=o+Math.imul(L,X)|0)+Math.imul(_,G)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(I,q)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(F,q)|0,i=i+Math.imul(F,Q)|0,n=n+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(M,$)|0,i=i+Math.imul(M,ee)|0,n=n+Math.imul(T,re)|0,o=(o=o+Math.imul(T,ne)|0)+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(A,ie)|0,o=(o=o+Math.imul(A,se)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,se)|0,n=n+Math.imul(x,le)|0,o=(o=o+Math.imul(x,ce)|0)+Math.imul(w,le)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(y,ue)|0,o=(o=o+Math.imul(y,pe)|0)+Math.imul(b,ue)|0,i=i+Math.imul(b,pe)|0;var Te=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(o=(o=o+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;c=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(P,G),o=(o=Math.imul(P,X))+Math.imul(D,G)|0,i=Math.imul(D,X),n=n+Math.imul(L,q)|0,o=(o=o+Math.imul(L,Q)|0)+Math.imul(_,q)|0,i=i+Math.imul(_,Q)|0,n=n+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(F,$)|0,i=i+Math.imul(F,ee)|0,n=n+Math.imul(N,re)|0,o=(o=o+Math.imul(N,ne)|0)+Math.imul(M,re)|0,i=i+Math.imul(M,ne)|0,n=n+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,se)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,se)|0,n=n+Math.imul(A,le)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(C,le)|0,i=i+Math.imul(C,ce)|0,n=n+Math.imul(x,ue)|0,o=(o=o+Math.imul(x,pe)|0)+Math.imul(w,ue)|0,i=i+Math.imul(w,pe)|0;var Re=(c+(n=n+Math.imul(y,fe)|0)|0)+((8191&(o=(o=o+Math.imul(y,me)|0)+Math.imul(b,fe)|0))<<13)|0;c=((i=i+Math.imul(b,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(P,q),o=(o=Math.imul(P,Q))+Math.imul(D,q)|0,i=Math.imul(D,Q),n=n+Math.imul(L,$)|0,o=(o=o+Math.imul(L,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(I,re)|0,o=(o=o+Math.imul(I,ne)|0)+Math.imul(F,re)|0,i=i+Math.imul(F,ne)|0,n=n+Math.imul(N,ie)|0,o=(o=o+Math.imul(N,se)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,se)|0,n=n+Math.imul(T,le)|0,o=(o=o+Math.imul(T,ce)|0)+Math.imul(R,le)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(A,ue)|0,o=(o=o+Math.imul(A,pe)|0)+Math.imul(C,ue)|0,i=i+Math.imul(C,pe)|0;var Se=(c+(n=n+Math.imul(x,fe)|0)|0)+((8191&(o=(o=o+Math.imul(x,me)|0)+Math.imul(w,fe)|0))<<13)|0;c=((i=i+Math.imul(w,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,$),o=(o=Math.imul(P,ee))+Math.imul(D,$)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,o=(o=o+Math.imul(L,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(I,ie)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(F,ie)|0,i=i+Math.imul(F,se)|0,n=n+Math.imul(N,le)|0,o=(o=o+Math.imul(N,ce)|0)+Math.imul(M,le)|0,i=i+Math.imul(M,ce)|0,n=n+Math.imul(T,ue)|0,o=(o=o+Math.imul(T,pe)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,pe)|0;var Ne=(c+(n=n+Math.imul(A,fe)|0)|0)+((8191&(o=(o=o+Math.imul(A,me)|0)+Math.imul(C,fe)|0))<<13)|0;c=((i=i+Math.imul(C,me)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(P,re),o=(o=Math.imul(P,ne))+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,o=(o=o+Math.imul(L,se)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,se)|0,n=n+Math.imul(I,le)|0,o=(o=o+Math.imul(I,ce)|0)+Math.imul(F,le)|0,i=i+Math.imul(F,ce)|0,n=n+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,pe)|0)+Math.imul(M,ue)|0,i=i+Math.imul(M,pe)|0;var Me=(c+(n=n+Math.imul(T,fe)|0)|0)+((8191&(o=(o=o+Math.imul(T,me)|0)+Math.imul(R,fe)|0))<<13)|0;c=((i=i+Math.imul(R,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(P,ie),o=(o=Math.imul(P,se))+Math.imul(D,ie)|0,i=Math.imul(D,se),n=n+Math.imul(L,le)|0,o=(o=o+Math.imul(L,ce)|0)+Math.imul(_,le)|0,i=i+Math.imul(_,ce)|0,n=n+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,pe)|0)+Math.imul(F,ue)|0,i=i+Math.imul(F,pe)|0;var Oe=(c+(n=n+Math.imul(N,fe)|0)|0)+((8191&(o=(o=o+Math.imul(N,me)|0)+Math.imul(M,fe)|0))<<13)|0;c=((i=i+Math.imul(M,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(P,le),o=(o=Math.imul(P,ce))+Math.imul(D,le)|0,i=Math.imul(D,ce),n=n+Math.imul(L,ue)|0,o=(o=o+Math.imul(L,pe)|0)+Math.imul(_,ue)|0,i=i+Math.imul(_,pe)|0;var Ie=(c+(n=n+Math.imul(I,fe)|0)|0)+((8191&(o=(o=o+Math.imul(I,me)|0)+Math.imul(F,fe)|0))<<13)|0;c=((i=i+Math.imul(F,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(P,ue),o=(o=Math.imul(P,pe))+Math.imul(D,ue)|0,i=Math.imul(D,pe);var Fe=(c+(n=n+Math.imul(L,fe)|0)|0)+((8191&(o=(o=o+Math.imul(L,me)|0)+Math.imul(_,fe)|0))<<13)|0;c=((i=i+Math.imul(_,me)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863;var je=(c+(n=Math.imul(P,fe))|0)+((8191&(o=(o=Math.imul(P,me))+Math.imul(D,fe)|0))<<13)|0;return c=((i=Math.imul(D,me))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,l[0]=ge,l[1]=ye,l[2]=be,l[3]=ve,l[4]=xe,l[5]=we,l[6]=Ee,l[7]=Ae,l[8]=Ce,l[9]=ke,l[10]=Te,l[11]=Re,l[12]=Se,l[13]=Ne,l[14]=Me,l[15]=Oe,l[16]=Ie,l[17]=Fe,l[18]=je,0!==c&&(l[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,i=0;i<r.length-1;i++){var s=o;o=0;for(var a=67108863&n,l=Math.min(i,t.length-1),c=Math.max(0,i-e.length+1);c<=l;c++){var d=i-c,u=(0|e.words[d])*(0|t.words[c]),p=67108863&u;a=67108863&(p=p+a|0),o+=(s=(s=s+(u/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[i]=a,n=s,s=o}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}Math.imul||(m=f),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?f(this,e,t):r<1024?g(this,e,t):y(this,e,t)},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,o=0;o<this.length;o++){var i=(0|this.words[o])*e,s=(67108863&i)+(67108863&n);n>>=26,n+=i/67108864|0,n+=s>>>26,this.words[o]=67108863&s}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,o=r%26;t[r]=e.words[n]>>>o&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&i,l=(0|this.words[t])-a<<n;this.words[t]=l|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var o;r("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,s=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<<i,l=n;if(o-=s,o=Math.max(0,o),l){for(var c=0;c<s;c++)l.words[c]=this.words[c];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var d=0;for(c=this.length-1;c>=0&&(0!==d||c>=o);c--){var u=0|this.words[c];this.words[c]=d<<26-i|u>>>i,d=u&a}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<<t;return!(this.length<=n||!(this.words[n]&o))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var o,i,s=e.length+n;this._expand(s);var a=0;for(o=0;o<e.length;o++){i=(0|this.words[o+n])+a;var l=(0|e.words[o])*t;a=((i-=67108863&l)>>26)-(l/67108864|0),this.words[o+n]=67108863&i}for(;o<this.length-n;o++)a=(i=(0|this.words[o+n])+a)>>26,this.words[o+n]=67108863&i;if(0===a)return this._strip();for(r(-1===a),a=0,o=0;o<this.length;o++)a=(i=-(0|this.words[o])+a)>>26,this.words[o]=67108863&i;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,l=n.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var d=n.clone()._ishlnsubmul(i,1,l);0===d.negative&&(n=d,a&&(a.words[l]=1));for(var u=l-1;u>=0;u--){var p=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]);for(p=Math.min(p/s|0,67108863),n._ishlnsubmul(i,p,u);0!==n.negative;)p--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=p)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),i=r.cmp(n);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,o=0,i=this.length-1;i>=0;i--)o=(n*o+(0|this.words[i]))%e;return t?-o:o},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*n;this.words[o]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var d=n.clone(),u=t.clone();!t.isZero();){for(var p=0,h=1;0==(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(d),s.isub(u)),i.iushrn(1),s.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(d),l.isub(u)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(l)):(n.isub(t),a.isub(i),l.isub(s))}return{a:a,b:l,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,d=1;0==(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var u=0,p=1;0==(n.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(n.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var o=t.cmp(r);if(o<0){var i=t;t=r,r=i}else if(0===o||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=o,this;for(var i=o,s=n;0!==i&&s<this.length;s++){var a=0|this.words[s];i=(a+=i)>>>26,a&=67108863,this.words[s]=a}return 0!==i&&(this.words[s]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],o=0|e.words[r];if(n!==o){n<o?t=-1:n>o&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new C(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(x,v),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),o=0;o<n;o++)t.words[o]=e.words[o];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&r,o=10;o<e.length;o++){var s=0|e.words[o];e.words[o-10]=(s&r)<<4|i>>>22,i=s}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,v),n(E,v),n(A,v),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,o=67108863&n;n>>>=26,e.words[r]=o,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new w;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return b[e]=t,t},C.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},C.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,c).cmp(l);)d.redIAdd(l);for(var u=this.pow(d,i),p=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<f);var y=this.pow(u,new o(1).iushln(f-g-1));p=p.redMul(y),u=y.redSqr(),h=h.redMul(u),f=g}return p},C.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},C.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],d=l-1;d>=0;d--){var u=c>>d&1;i!==r[0]&&(i=this.sqr(i)),0!==u||0!==s?(s<<=1,s|=u,(4==++a||0===n&&0===d)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}l=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},n(k,C),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(yp,Fe);var bp=yp.exports;function vp(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var xp=wp;function wp(e,t){if(!e)throw new Error(t||"Assertion failed")}wp.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Ep=vp((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var o=e.charCodeAt(n),i=o>>8,s=255&o;i?r.push(i,s):r.push(s)}return r},r.zero2=n,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e}})),Ap=vp((function(e,t){var r=t;r.assert=xp,r.toArray=Ep.toArray,r.zero2=Ep.zero2,r.toHex=Ep.toHex,r.encode=Ep.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var o=1<<t+1,i=e.clone(),s=0;s<n.length;s++){var a,l=i.andln(o-1);i.isOdd()?(a=l>(o>>1)-1?(o>>1)-l:l,i.isubn(a)):a=0,n[s]=a,i.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,o=0,i=0;e.cmpn(-o)>0||t.cmpn(-i)>0;){var s,a,l=e.andln(3)+o&3,c=t.andln(3)+i&3;3===l&&(l=-1),3===c&&(c=-1),s=0==(1&l)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==c?l:-l,r[0].push(s),a=0==(1&c)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==l?c:-c,r[1].push(a),2*o===s+1&&(o=1-o),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new bp(e,"hex","le")}})),Cp=Ap.getNAF,kp=Ap.getJSF,Tp=Ap.assert;function Rp(e,t){this.type=e,this.p=new bp(t.p,16),this.red=t.prime?bp.red(t.prime):bp.mont(this.p),this.zero=new bp(0).toRed(this.red),this.one=new bp(1).toRed(this.red),this.two=new bp(2).toRed(this.red),this.n=t.n&&new bp(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Sp=Rp;function Np(e,t){this.curve=e,this.type=t,this.precomputed=null}Rp.prototype.point=function(){throw new Error("Not implemented")},Rp.prototype.validate=function(){throw new Error("Not implemented")},Rp.prototype._fixedNafMul=function(e,t){Tp(e.precomputed);var r=e._getDoubles(),n=Cp(t,1,this._bitLength),o=(1<<r.step+1)-(r.step%2==0?2:1);o/=3;var i,s,a=[];for(i=0;i<n.length;i+=r.step){s=0;for(var l=i+r.step-1;l>=i;l--)s=(s<<1)+n[l];a.push(s)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),u=o;u>0;u--){for(i=0;i<a.length;i++)(s=a[i])===u?d=d.mixedAdd(r.points[i]):s===-u&&(d=d.mixedAdd(r.points[i].neg()));c=c.add(d)}return c.toP()},Rp.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var o=n.points,i=Cp(t,r,this._bitLength),s=this.jpoint(null,null,null),a=i.length-1;a>=0;a--){for(var l=0;a>=0&&0===i[a];a--)l++;if(a>=0&&l++,s=s.dblp(l),a<0)break;var c=i[a];Tp(0!==c),s="affine"===e.type?c>0?s.mixedAdd(o[c-1>>1]):s.mixedAdd(o[-c-1>>1].neg()):c>0?s.add(o[c-1>>1]):s.add(o[-c-1>>1].neg())}return"affine"===e.type?s.toP():s},Rp.prototype._wnafMulAdd=function(e,t,r,n,o){var i,s,a,l=this._wnafT1,c=this._wnafT2,d=this._wnafT3,u=0;for(i=0;i<n;i++){var p=(a=t[i])._getNAFPoints(e);l[i]=p.wnd,c[i]=p.points}for(i=n-1;i>=1;i-=2){var h=i-1,f=i;if(1===l[h]&&1===l[f]){var m=[t[h],null,null,t[f]];0===t[h].y.cmp(t[f].y)?(m[1]=t[h].add(t[f]),m[2]=t[h].toJ().mixedAdd(t[f].neg())):0===t[h].y.cmp(t[f].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[f]),m[2]=t[h].add(t[f].neg())):(m[1]=t[h].toJ().mixedAdd(t[f]),m[2]=t[h].toJ().mixedAdd(t[f].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=kp(r[h],r[f]);for(u=Math.max(y[0].length,u),d[h]=new Array(u),d[f]=new Array(u),s=0;s<u;s++){var b=0|y[0][s],v=0|y[1][s];d[h][s]=g[3*(b+1)+(v+1)],d[f][s]=0,c[h]=m}}else d[h]=Cp(r[h],l[h],this._bitLength),d[f]=Cp(r[f],l[f],this._bitLength),u=Math.max(d[h].length,u),u=Math.max(d[f].length,u)}var x=this.jpoint(null,null,null),w=this._wnafT4;for(i=u;i>=0;i--){for(var E=0;i>=0;){var A=!0;for(s=0;s<n;s++)w[s]=0|d[s][i],0!==w[s]&&(A=!1);if(!A)break;E++,i--}if(i>=0&&E++,x=x.dblp(E),i<0)break;for(s=0;s<n;s++){var C=w[s];0!==C&&(C>0?a=c[s][C-1>>1]:C<0&&(a=c[s][-C-1>>1].neg()),x="affine"===a.type?x.mixedAdd(a):x.add(a))}}for(i=0;i<n;i++)c[i]=null;return o?x:x.toP()},Rp.BasePoint=Np,Np.prototype.eq=function(){throw new Error("Not implemented")},Np.prototype.validate=function(){return this.curve.validate(this)},Rp.prototype.decodePoint=function(e,t){e=Ap.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?Tp(e[e.length-1]%2==0):7===e[0]&&Tp(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},Np.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Np.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},Np.prototype.encode=function(e,t){return Ap.encode(this._encode(t),e)},Np.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Np.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Np.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,o=0;o<t;o+=e){for(var i=0;i<e;i++)n=n.dbl();r.push(n)}return{step:e,points:r}},Np.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),o=1;o<r;o++)t[o]=t[o-1].add(n);return{wnd:e,points:t}},Np.prototype._getBeta=function(){return null},Np.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var Mp=vp((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),Op=Ap.assert;function Ip(e){Sp.call(this,"short",e),this.a=new bp(e.a,16).toRed(this.red),this.b=new bp(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Mp(Ip,Sp);var Fp=Ip;function jp(e,t,r,n){Sp.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new bp(t,16),this.y=new bp(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Lp(e,t,r,n){Sp.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new bp(0)):(this.x=new bp(t,16),this.y=new bp(r,16),this.z=new bp(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Ip.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new bp(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new bp(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],Op(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new bp(e.a,16),b:new bp(e.b,16)}})):this._getEndoBasis(r)}}},Ip.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:bp.mont(e),r=new bp(2).toRed(t).redInvm(),n=r.redNeg(),o=new bp(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},Ip.prototype._getEndoBasis=function(e){for(var t,r,n,o,i,s,a,l,c,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=e,p=this.n.clone(),h=new bp(1),f=new bp(0),m=new bp(0),g=new bp(1),y=0;0!==u.cmpn(0);){var b=p.div(u);l=p.sub(b.mul(u)),c=m.sub(b.mul(h));var v=g.sub(b.mul(f));if(!n&&l.cmp(d)<0)t=a.neg(),r=h,n=l.neg(),o=c;else if(n&&2==++y)break;a=l,p=u,u=l,m=h,h=c,g=f,f=v}i=l.neg(),s=c;var x=n.sqr().add(o.sqr());return i.sqr().add(s.sqr()).cmp(x)>=0&&(i=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),i.negative&&(i=i.neg(),s=s.neg()),[{a:n,b:o},{a:i,b:s}]},Ip.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],o=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),s=o.mul(r.a),a=i.mul(n.a),l=o.mul(r.b),c=i.mul(n.b);return{k1:e.sub(s).sub(a),k2:l.add(c).neg()}},Ip.prototype.pointFromX=function(e,t){(e=new bp(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},Ip.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},Ip.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,i=0;i<e.length;i++){var s=this._endoSplit(t[i]),a=e[i],l=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),l=l.neg(!0)),n[2*i]=a,n[2*i+1]=l,o[2*i]=s.k1,o[2*i+1]=s.k2}for(var c=this._wnafMulAdd(1,n,o,2*i,r),d=0;d<2*i;d++)n[d]=null,o[d]=null;return c},Mp(jp,Sp.BasePoint),Ip.prototype.point=function(e,t,r){return new jp(this,e,t,r)},Ip.prototype.pointFromJSON=function(e,t){return jp.fromJSON(this,e,t)},jp.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},jp.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},jp.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function o(t){return e.point(t[0],t[1],r)}var i=t[2];return n.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[n].concat(i.doubles.points.map(o))},naf:i.naf&&{wnd:i.naf.wnd,points:[n].concat(i.naf.points.map(o))}},n},jp.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},jp.prototype.isInfinity=function(){return this.inf},jp.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},jp.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,s)},jp.prototype.getX=function(){return this.x.fromRed()},jp.prototype.getY=function(){return this.y.fromRed()},jp.prototype.mul=function(e){return e=new bp(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},jp.prototype.mulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2)},jp.prototype.jmulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0)},jp.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},jp.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},jp.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Mp(Lp,Sp.BasePoint),Ip.prototype.jpoint=function(e,t,r){return new Lp(this,e,t,r)},Lp.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},Lp.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Lp.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),o=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(o),l=i.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),d=c.redMul(a),u=n.redMul(c),p=l.redSqr().redIAdd(d).redISub(u).redISub(u),h=l.redMul(u.redISub(p)).redISub(i.redMul(d)),f=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(p,h,f)},Lp.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),o=this.y,i=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=o.redSub(i);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),c=l.redMul(s),d=r.redMul(l),u=a.redSqr().redIAdd(c).redISub(d).redISub(d),p=a.redMul(d.redISub(u)).redISub(o.redMul(c)),h=this.z.redMul(s);return this.curve.jpoint(u,p,h)},Lp.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,o=this.curve.tinv,i=this.x,s=this.y,a=this.z,l=a.redSqr().redSqr(),c=s.redAdd(s);for(t=0;t<e;t++){var d=i.redSqr(),u=c.redSqr(),p=u.redSqr(),h=d.redAdd(d).redIAdd(d).redIAdd(n.redMul(l)),f=i.redMul(u),m=h.redSqr().redISub(f.redAdd(f)),g=f.redISub(m),y=h.redMul(g);y=y.redIAdd(y).redISub(p);var b=c.redMul(a);t+1<e&&(l=l.redMul(p)),i=m,a=b,c=y}return this.curve.jpoint(i,c.redMul(o),a)},Lp.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Lp.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(n).redISub(i);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),l=a.redSqr().redISub(s).redISub(s),c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),e=l,t=a.redMul(s.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var d=this.x.redSqr(),u=this.y.redSqr(),p=u.redSqr(),h=this.x.redAdd(u).redSqr().redISub(d).redISub(p);h=h.redIAdd(h);var f=d.redAdd(d).redIAdd(d),m=f.redSqr(),g=p.redIAdd(p);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=f.redMul(h.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},Lp.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(n).redISub(i);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),l=a.redSqr().redISub(s).redISub(s);e=l;var c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(s.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var d=this.z.redSqr(),u=this.y.redSqr(),p=this.x.redMul(u),h=this.x.redSub(d).redMul(this.x.redAdd(d));h=h.redAdd(h).redIAdd(h);var f=p.redIAdd(p),m=(f=f.redIAdd(f)).redAdd(f);e=h.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(u).redISub(d);var g=u.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(f.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},Lp.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,o=n.redSqr().redSqr(),i=t.redSqr(),s=r.redSqr(),a=i.redAdd(i).redIAdd(i).redIAdd(e.redMul(o)),l=t.redAdd(t),c=(l=l.redIAdd(l)).redMul(s),d=a.redSqr().redISub(c.redAdd(c)),u=c.redISub(d),p=s.redSqr();p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var h=a.redMul(u).redISub(p),f=r.redAdd(r).redMul(n);return this.curve.jpoint(d,h,f)},Lp.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),o=e.redAdd(e).redIAdd(e),i=o.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(i)).redSqr(),l=n.redIAdd(n);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var c=o.redIAdd(s).redSqr().redISub(i).redISub(a).redISub(l),d=t.redMul(c);d=(d=d.redIAdd(d)).redIAdd(d);var u=this.x.redMul(a).redISub(d);u=(u=u.redIAdd(u)).redIAdd(u);var p=this.y.redMul(c.redMul(l.redISub(c)).redISub(s.redMul(a)));p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var h=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(u,p,h)},Lp.prototype.mul=function(e,t){return e=new bp(e,t),this.curve._wnafMul(this,e)},Lp.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),o=r.redMul(e.z);return 0===this.y.redMul(o).redISub(e.y.redMul(n)).cmpn(0)},Lp.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),o=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0}},Lp.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Lp.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var _p=vp((function(e,t){var r=t;r.base=Sp,r.short=Fp,r.mont=null,r.edwards=null})),Wp=vp((function(e,t){var r,n=t,o=Ap.assert;function i(e){"short"===e.type?this.curve=new _p.short(e):"edwards"===e.type?this.curve=new _p.edwards(e):this.curve=new _p.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Qu.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Qu.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Qu.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Qu.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Qu.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Qu.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Qu.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Qu.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function Pp(e){if(!(this instanceof Pp))return new Pp(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Ep.toArray(e.entropy,e.entropyEnc||"hex"),r=Ep.toArray(e.nonce,e.nonceEnc||"hex"),n=Ep.toArray(e.pers,e.persEnc||"hex");xp(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var Dp=Pp;Pp.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},Pp.prototype._hmac=function(){return new Qu.hmac(this.hash,this.K)},Pp.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},Pp.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=Ep.toArray(e,t),r=Ep.toArray(r,n),xp(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},Pp.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=Ep.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var i=o.slice(0,e);return this._update(r),this._reseed++,Ep.encode(i,t)};var Bp=Ap.assert;function Up(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var Vp=Up;Up.fromPublic=function(e,t,r){return t instanceof Up?t:new Up(e,{pub:t,pubEnc:r})},Up.fromPrivate=function(e,t,r){return t instanceof Up?t:new Up(e,{priv:t,privEnc:r})},Up.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Up.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},Up.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},Up.prototype._importPrivate=function(e,t){this.priv=new bp(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},Up.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?Bp(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Bp(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},Up.prototype.derive=function(e){return e.validate()||Bp(e.validate(),"public point not validated"),e.mul(this.priv).getX()},Up.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},Up.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},Up.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Zp=Ap.assert;function Hp(e,t){if(e instanceof Hp)return e;this._importDER(e,t)||(Zp(e.r&&e.s,"Signature without r or s"),this.r=new bp(e.r,16),this.s=new bp(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var zp=Hp;function Yp(){this.place=0}function Gp(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var o=0,i=0,s=t.place;i<n;i++,s++)o<<=8,o|=e[s],o>>>=0;return!(o<=127)&&(t.place=s,o)}function Xp(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function Jp(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}Hp.prototype._importDER=function(e,t){e=Ap.toArray(e,t);var r=new Yp;if(48!==e[r.place++])return!1;var n=Gp(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=Gp(e,r);if(!1===o)return!1;var i=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var s=Gp(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var a=e.slice(r.place,s+r.place);if(0===i[0]){if(!(128&i[1]))return!1;i=i.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new bp(i),this.s=new bp(a),this.recoveryParam=null,!0},Hp.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=Xp(t),r=Xp(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Jp(n,t.length),(n=n.concat(t)).push(2),Jp(n,r.length);var o=n.concat(r),i=[48];return Jp(i,o.length),i=i.concat(o),Ap.encode(i,e)};var qp=function(){throw new Error("unsupported")},Qp=Ap.assert;function Kp(e){if(!(this instanceof Kp))return new Kp(e);"string"==typeof e&&(Qp(Object.prototype.hasOwnProperty.call(Wp,e),"Unknown curve "+e),e=Wp[e]),e instanceof Wp.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var $p=Kp;Kp.prototype.keyPair=function(e){return new Vp(this,e)},Kp.prototype.keyFromPrivate=function(e,t){return Vp.fromPrivate(this,e,t)},Kp.prototype.keyFromPublic=function(e,t){return Vp.fromPublic(this,e,t)},Kp.prototype.genKeyPair=function(e){e||(e={});for(var t=new Dp({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||qp(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new bp(2));;){var o=new bp(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},Kp.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Kp.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new bp(e,16));for(var o=this.n.byteLength(),i=t.getPrivate().toArray("be",o),s=e.toArray("be",o),a=new Dp({hash:this.hash,entropy:i,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new bp(1)),c=0;;c++){var d=n.k?n.k(c):new bp(a.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var u=this.g.mul(d);if(!u.isInfinity()){var p=u.getX(),h=p.umod(this.n);if(0!==h.cmpn(0)){var f=d.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(f=f.umod(this.n)).cmpn(0)){var m=(u.getY().isOdd()?1:0)|(0!==p.cmp(h)?2:0);return n.canonical&&f.cmp(this.nh)>0&&(f=this.n.sub(f),m^=1),new zp({r:h,s:f,recoveryParam:m})}}}}}},Kp.prototype.verify=function(e,t,r,n){e=this._truncateToN(new bp(e,16)),r=this.keyFromPublic(r,n);var o=(t=new zp(t,"hex")).r,i=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var s,a=i.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(l,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},Kp.prototype.recoverPubKey=function(e,t,r,n){Qp((3&r)===r,"The recovery param is more than two bits"),t=new zp(t,n);var o=this.n,i=new bp(e),s=t.r,a=t.s,l=1&r,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");s=c?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=t.r.invm(o),u=o.sub(i).mul(d).umod(o),p=a.mul(d).umod(o);return this.g.mulAdd(u,s,p)},Kp.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new zp(t,n)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var eh=vp((function(e,t){var r=t;r.version="6.5.4",r.utils=Ap,r.rand=function(){throw new Error("unsupported")},r.curve=_p,r.curves=Wp,r.ec=$p,r.eddsa=null})).ec;const th=new Sa("signing-key/5.7.0");let rh=null;function nh(){return rh||(rh=new eh("secp256k1")),rh}class oh{constructor(e){Tl(this,"curve","secp256k1"),Tl(this,"privateKey",Da(e)),32!==Ba(this.privateKey)&&th.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=nh().keyFromPrivate(La(this.privateKey));Tl(this,"publicKey","0x"+t.getPublic(!1,"hex")),Tl(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),Tl(this,"_isSigningKey",!0)}_addPoint(e){const t=nh().keyFromPublic(La(this.publicKey)),r=nh().keyFromPublic(La(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=nh().keyFromPrivate(La(this.privateKey)),r=La(e);32!==r.length&&th.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return za({recoveryParam:n.recoveryParam,r:Ha("0x"+n.r.toString(16),32),s:Ha("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=nh().keyFromPrivate(La(this.privateKey)),r=nh().keyFromPublic(La(ih(e)));return Ha("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function ih(e,t){const r=La(e);if(32===r.length){const e=new oh(r);return t?"0x"+nh().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?Da(r):"0x"+nh().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+nh().keyFromPublic(r).getPublic(!0,"hex"):Da(r):th.throwArgumentError("invalid public or private key","key","[REDACTED]")}const sh=new Sa("transactions/5.7.0");var ah;function lh(e){return"0x"===e?null:al(e)}function ch(e){return"0x"===e?Kl:Q.from(e)}function dh(e,t){return function(e){return al(Ua(Xa(Ua(ih(e),1)),12))}(function(e,t){const r=za(t),n={r:La(r.r),s:La(r.s)};return"0x"+nh().recoverPubKey(La(e),n,r.recoveryParam).encode("hex",!1)}(La(e),t))}function uh(e,t){const r=Wa(Q.from(e).toHexString());return r.length>32&&sh.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function ph(e,t){return{address:al(e),storageKeys:(t||[]).map(((t,r)=>(32!==Ba(t)&&sh.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function hh(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&sh.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),ph(e[0],e[1])):ph(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return ph(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function fh(e){return hh(e).map((e=>[e.address,e.storageKeys]))}function mh(e,t){if(null!=e.gasPrice){const t=Q.from(e.gasPrice),r=Q.from(e.maxFeePerGas||0);t.eq(r)||sh.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[uh(e.chainId||0,"chainId"),uh(e.nonce||0,"nonce"),uh(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),uh(e.maxFeePerGas||0,"maxFeePerGas"),uh(e.gasLimit||0,"gasLimit"),null!=e.to?al(e.to):"0x",uh(e.value||0,"value"),e.data||"0x",fh(e.accessList||[])];if(t){const e=za(t);r.push(uh(e.recoveryParam,"recoveryParam")),r.push(Wa(e.r)),r.push(Wa(e.s))}return Va(["0x02",$a(r)])}function gh(e,t){const r=[uh(e.chainId||0,"chainId"),uh(e.nonce||0,"nonce"),uh(e.gasPrice||0,"gasPrice"),uh(e.gasLimit||0,"gasLimit"),null!=e.to?al(e.to):"0x",uh(e.value||0,"value"),e.data||"0x",fh(e.accessList||[])];if(t){const e=za(t);r.push(uh(e.recoveryParam,"recoveryParam")),r.push(Wa(e.r)),r.push(Wa(e.s))}return Va(["0x01",$a(r)])}function yh(e,t,r){try{const r=ch(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){sh.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=Ha(t[1],32),e.s=Ha(t[2],32);try{const t=Xa(r(e));e.from=dh(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function bh(e){const t=La(e);if(t[0]>127)return function(e){const t=rl(e);9!==t.length&&6!==t.length&&sh.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:ch(t[0]).toNumber(),gasPrice:ch(t[1]),gasLimit:ch(t[2]),to:lh(t[3]),value:ch(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=Q.from(t[6]).toNumber()}catch(e){return r}if(r.r=Ha(t[7],32),r.s=Ha(t[8],32),Q.from(r.r).isZero()&&Q.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const o=t.slice(0,6);0!==r.chainId&&(o.push(Da(r.chainId)),o.push("0x"),o.push("0x"),n-=2*r.chainId+8);const i=Xa($a(o));try{r.from=dh(i,{r:Da(r.r),s:Da(r.s),recoveryParam:n})}catch(e){}r.hash=Xa(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=rl(e.slice(1));8!==t.length&&11!==t.length&&sh.throwArgumentError("invalid component count for transaction type: 1","payload",Da(e));const r={type:1,chainId:ch(t[0]).toNumber(),nonce:ch(t[1]).toNumber(),gasPrice:ch(t[2]),gasLimit:ch(t[3]),to:lh(t[4]),value:ch(t[5]),data:t[6],accessList:hh(t[7])};return 8===t.length||(r.hash=Xa(e),yh(r,t.slice(8),gh)),r}(t);case 2:return function(e){const t=rl(e.slice(1));9!==t.length&&12!==t.length&&sh.throwArgumentError("invalid component count for transaction type: 2","payload",Da(e));const r=ch(t[2]),n=ch(t[3]),o={type:2,chainId:ch(t[0]).toNumber(),nonce:ch(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:ch(t[4]),to:lh(t[5]),value:ch(t[6]),data:t[7],accessList:hh(t[8])};return 9===t.length||(o.hash=Xa(e),yh(o,t.slice(9),mh)),o}(t)}return sh.throwError(`unsupported transaction type: ${t[0]}`,Sa.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(ah||(ah={}));const vh=new Sa(gp);class xh{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),o=this.data.bind(this),i=this.hash.bind(this),s=this.hex.bind(this),a=this.number.bind(this),l=this.type.bind(this);return e.transaction={hash:i,type:l,accessList:xh.allowNull(this.accessList.bind(this),null),blockHash:xh.allowNull(i,null),blockNumber:xh.allowNull(a,null),transactionIndex:xh.allowNull(a,null),confirmations:xh.allowNull(a,null),from:t,gasPrice:xh.allowNull(r),maxPriorityFeePerGas:xh.allowNull(r),maxFeePerGas:xh.allowNull(r),gasLimit:r,to:xh.allowNull(t,null),value:r,nonce:a,data:o,r:xh.allowNull(this.uint256),s:xh.allowNull(this.uint256),v:xh.allowNull(a),creates:xh.allowNull(t,null),raw:xh.allowNull(o)},e.transactionRequest={from:xh.allowNull(t),nonce:xh.allowNull(a),gasLimit:xh.allowNull(r),gasPrice:xh.allowNull(r),maxPriorityFeePerGas:xh.allowNull(r),maxFeePerGas:xh.allowNull(r),to:xh.allowNull(t),value:xh.allowNull(r),data:xh.allowNull((e=>this.data(e,!0))),type:xh.allowNull(a),accessList:xh.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:i,address:t,topics:xh.arrayOf(i),data:o,logIndex:a,blockHash:i},e.receipt={to:xh.allowNull(this.address,null),from:xh.allowNull(this.address,null),contractAddress:xh.allowNull(t,null),transactionIndex:a,root:xh.allowNull(s),gasUsed:r,logsBloom:xh.allowNull(o),blockHash:i,transactionHash:i,logs:xh.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:xh.allowNull(a,null),cumulativeGasUsed:r,effectiveGasPrice:xh.allowNull(r),status:xh.allowNull(a),type:l},e.block={hash:xh.allowNull(i),parentHash:i,number:a,timestamp:a,nonce:xh.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:xh.allowNull(t),extraData:o,transactions:xh.allowNull(xh.arrayOf(i)),baseFeePerGas:xh.allowNull(r)},e.blockWithTransactions=Nl(e.block),e.blockWithTransactions.transactions=xh.allowNull(xh.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:xh.allowNull(n,void 0),toBlock:xh.allowNull(n,void 0),blockHash:xh.allowNull(i,void 0),address:xh.allowNull(t,void 0),topics:xh.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:xh.allowNull(a),blockHash:xh.allowNull(i),transactionIndex:a,removed:xh.allowNull(this.boolean.bind(this)),address:t,data:xh.allowFalsish(o,"0x"),topics:xh.arrayOf(i),transactionHash:i,logIndex:a},e}accessList(e){return hh(e||[])}number(e){return"0x"===e?0:Q.from(e).toNumber()}type(e){return"0x"===e||null==e?0:Q.from(e).toNumber()}bigNumber(e){return Q.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),Pa(e))?e.toLowerCase():vh.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return al(e)}callAddress(e){if(!Pa(e,32))return null;const t=al(Ua(e,12));return t===ql?null:t}contractAddress(e){return function(e){let t=null;try{t=al(e.from)}catch(t){nl.throwArgumentError("missing from address","transaction",e)}return al(Ua(Xa($a([t,Wa(La(Q.from(e.nonce).toHexString()))])),12))}(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||Pa(e))return Za(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==Ba(r)?vh.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=Q.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!Pa(e))throw new Error("invalid uint256");return Ha(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=xh.check(t,e);return n._difficulty=null==r?null:Q.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return xh.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&Q.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=xh.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;Pa(r)&&(r=Q.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),Pa(r)&&(r=Q.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return bh(e)}receiptLog(e){return xh.check(this.formats.receiptLog,e)}receipt(e){const t=xh.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=Q.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&vh.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):vh.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&vh.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return xh.check(this.formats.filter,e)}filterLog(e){return xh.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const o=e[n](t[n]);void 0!==o&&(r[n]=o)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}var wh=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const Eh=new Sa(gp);function Ah(e){return null==e?"null":(32!==Ba(e)&&Eh.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function Ch(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[Ah(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return Ah(e)})).join("&")}function kh(e){if("string"==typeof e){if(32===Ba(e=e.toLowerCase()))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+Ch(e);if(Wl.isForkEvent(e))throw Eh.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+Ch(e.topics||[])}throw new Error("invalid event - "+e)}function Th(){return(new Date).getTime()}function Rh(e){return new Promise((t=>{setTimeout(t,e)}))}const Sh=["block","network","pending","poll"];class Nh{constructor(e,t,r){Tl(this,"tag",e),Tl(this,"listener",t),Tl(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const o={};return r.length>0&&(o.topics=r),t&&"*"!==t&&(o.address=t),o}pollable(){return this.tag.indexOf(":")>=0||Sh.indexOf(this.tag)>=0}}const Mh={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Oh(e){return Ha(Q.from(e).toHexString(),32)}function Ih(e){return Jl.encode(_a([e,Ua(Ku(Ku(e)),0,4)]))}const Fh=new RegExp("^(ipfs)://(.*)$","i"),jh=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Fh,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Lh(e,t){try{return lc(_h(e,t))}catch(e){}return null}function _h(e,t){if("0x"===e)return null;const r=Q.from(Ua(e,t,t+32)).toNumber(),n=Q.from(Ua(e,r,r+32)).toNumber();return Ua(e,r+32,r+32+n)}function Wh(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):Eh.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function Ph(e){const t=La(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function Dh(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function Bh(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(null),r+=32;for(let n=0;n<e.length;n++){const o=La(e[n]);t[n]=Ph(r),t.push(Ph(o.length)),t.push(Dh(o)),r+=32+32*Math.ceil(o.length/32)}return Va(t)}class Uh{constructor(e,t,r,n){Tl(this,"provider",e),Tl(this,"name",r),Tl(this,"address",e.formatter.address(t)),Tl(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((e=>Q.from(e).eq(1))).catch((e=>{if(e.code===Sa.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return wh(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:Va([e,Fc(this.name),t||"0x"])};let n=!1;var o;(yield this.supportsWildcard())&&(n=!0,r.data=Va(["0x9061b923",Bh([(o=this.name,Da(_a(Ic(o).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"),r.data])]));try{let e=yield this.provider.call(r);return La(e).length%32==4&&Eh.throwError("resolver threw error",Sa.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=_h(e,0)),e}catch(e){if(e.code===Sa.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return wh(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?_h(r,0):null}))}_getAddress(e,t){const r=Mh[String(e)];if(null==r&&Eh.throwError(`unsupported coin type: ${e}`,Sa.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=La(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Ih(_a([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Ih(_a([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=mp.toWords(n.slice(2));return e.unshift(t),mp.encode(r.prefix,e)}}return null}getAddress(e){return wh(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||"0x0000000000000000000000000000000000000000000000000000000000000000"===e?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===Sa.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",Oh(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&Eh.throwError("invalid or unsupported coin data",Sa.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return wh(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<jh.length;r++){const n=t.match(jh[r]);if(null==n)continue;const o=n[1].toLowerCase();switch(o){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:Wh(t)};case"erc721":case"erc1155":{const r="erc721"===o?"0xc87b56dd":"0x0e89341c";e.push({type:o,content:t});const i=this._resolvedAddress||(yield this.getAddress()),s=(n[2]||"").split("/");if(2!==s.length)return null;const a=yield this.provider.formatter.address(s[0]),l=Ha(Q.from(s[1]).toHexString(),32);if("erc721"===o){const t=this.provider.formatter.callAddress(yield this.provider.call({to:a,data:Va(["0x6352211e",l])}));if(i!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===o){const t=Q.from(yield this.provider.call({to:a,data:Va(["0x00fdd58e",Ha(i,32),l])}));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}const c={to:this.provider.formatter.address(s[0]),data:Va([r,l])};let d=Lh(yield this.provider.call(c),0);if(null==d)return null;e.push({type:"metadata-url-base",content:d}),"erc1155"===o&&(d=d.replace("{id}",l.substring(2)),e.push({type:"metadata-url-expanded",content:d})),d.match(/^ipfs:/i)&&(d=Wh(d)),e.push({type:"metadata-url",content:d});const u=yield ip(d);if(!u)return null;e.push({type:"metadata",content:JSON.stringify(u)});let p=u.image;if("string"!=typeof p)return null;if(p.match(/^(https:\/\/|data:)/i));else{if(null==p.match(Fh))return null;e.push({type:"url-ipfs",content:p}),p=Wh(p)}return e.push({type:"url",content:p}),{linkage:e,url:p}}}}}catch(e){}return null}))}getContentHash(){return wh(this,void 0,void 0,(function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+Jl.encode("0x"+t[1])}const r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+Jl.encode("0x"+r[1])}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const o=e.match(/^0x90b2c605([0-9a-f]*)$/);if(o&&68===o[1].length){const e={"=":"","+":"-","/":"_"};return"sia://"+Gl("0x"+o[1]).replace(/[=+\/]/g,(t=>e[t]))}return Eh.throwError("invalid or unsupported content hash data",Sa.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return wh(this,void 0,void 0,(function*(){let t=ac(e);t=_a([Oh(64),Oh(t.length),t]),t.length%32!=0&&(t=_a([t,Ha("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",Da(t));return null==r||"0x"===r?null:lc(r)}))}}let Vh=null,Zh=1;class Hh extends Pl{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),Tl(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=Rl(new.target,"getNetwork")(e);t?(Tl(this,"_network",t),this.emit("network",t,null)):Eh.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return wh(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||Eh.throwError("no network detected",Sa.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:Tl(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return sp((()=>this._ready().then((e=>e),(e=>{if(e.code!==Sa.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==Vh&&(Vh=new xh),Vh}static getNetwork(e){return function(e){if(null==e)return null;if("number"==typeof e){for(const t in zl){const r=zl[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=zl[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=zl[e.name];if(!t)return"number"!=typeof e.chainId&&Dl.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&Dl.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var n;return null==r&&t._defaultProvider&&(r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}(null==e?"homestead":e)}ccipReadFetch(e,t,r){return wh(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),o=t.toLowerCase(),i=[];for(let e=0;e<r.length;e++){const t=r[e],s=t.replace("{sender}",n).replace("{data}",o),a=t.indexOf("{data}")>=0?null:JSON.stringify({data:o,sender:n}),l=yield ip({url:s,errorPassThrough:!0},a,((e,t)=>(e.status=t.statusCode,e)));if(l.data)return l.data;const c=l.message||"unknown error";if(l.status>=400&&l.status<500)return Eh.throwError(`response not found during CCIP fetch: ${c}`,Sa.errors.SERVER_ERROR,{url:t,errorMessage:c});i.push(c)}return Eh.throwError(`error encountered during CCIP fetch: ${i.map((e=>JSON.stringify(e))).join(", ")}`,Sa.errors.SERVER_ERROR,{urls:r,errorMessages:i})}))}_getInternalBlockNumber(e){return wh(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(Th()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=Th(),r=Sl({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const o=Th();return(e=Q.from(e).toNumber())<this._maxInternalBlockNumber&&(e=this._maxInternalBlockNumber),this._maxInternalBlockNumber=e,this._setFastBlockNumber(e),{blockNumber:e,reqTime:t,respTime:o}}));return this._internalBlockNumber=r,r.catch((e=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return wh(this,void 0,void 0,(function*(){const e=Zh++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)Eh.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",Eh.makeError("network block skew detected",Sa.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const o=n.toBlock-this._maxFilterBlockRange;o>n.fromBlock&&(n.fromBlock=o),n.fromBlock<0&&(n.fromBlock=0);const i=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(i)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return wh(this,void 0,void 0,(function*(){return Eh.throwError("provider does not support network detection",Sa.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return wh(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Rh(0),this._network;const r=Eh.makeError("underlying network changed",Sa.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=Th();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=Th(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return wh(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return wh(this,void 0,void 0,(function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=t?o:new Promise(((o,i)=>{const s=[];let a=!1;const l=function(){return!!a||(a=!0,s.forEach((e=>{e()})),!1)},c=e=>{e.confirmations<t||l()||o(e)};if(this.on(e,c),s.push((()=>{this.removeListener(e,c)})),n){let r=n.startBlock,o=null;const c=s=>wh(this,void 0,void 0,(function*(){a||(yield Rh(1e3),this.getTransactionCount(n.from).then((d=>wh(this,void 0,void 0,(function*(){if(!a){if(d<=n.nonce)r=s;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==o&&(o=r-3,o<n.startBlock&&(o=n.startBlock));o<=s;){if(a)return;const r=yield this.getBlockWithTransactions(o);for(let o=0;o<r.transactions.length;o++){const s=r.transactions[o];if(s.hash===e)return;if(s.from===n.from&&s.nonce===n.nonce){if(a)return;const r=yield this.waitForTransaction(s.hash,t);if(l())return;let o="replaced";return s.data===n.data&&s.to===n.to&&s.value.eq(n.value)?o="repriced":"0x"===s.data&&s.from===s.to&&s.value.isZero()&&(o="cancelled"),void i(Eh.makeError("transaction was replaced",Sa.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===o||"cancelled"===o,reason:o,replacement:this._wrapTransaction(s),hash:e,receipt:r}))}}o++}}a||this.once("block",c)}}))),(e=>{a||this.once("block",c)})))}));if(a)return;this.once("block",c),s.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{l()||i(Eh.makeError("timeout exceeded",Sa.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),s.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return wh(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return wh(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Q.from(e)}catch(t){return Eh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return wh(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield Sl({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return Q.from(n)}catch(e){return Eh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return wh(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield Sl({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return Q.from(n).toNumber()}catch(e){return Eh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return wh(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield Sl({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return Da(n)}catch(e){return Eh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return wh(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield Sl({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>Za(e)))}),o=yield this.perform("getStorageAt",n);try{return Da(o)}catch(e){return Eh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:o,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==Ba(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&Eh.throwError("Transaction hash mismatch from Provider.sendTransaction.",Sa.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>wh(this,void 0,void 0,(function*(){let o;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const i=yield this._waitForTransaction(e.hash,t,n,o);return null==i&&0===t?null:(this._emitted["t:"+e.hash]=i.blockNumber,0===i.status&&Eh.throwError("transaction failed",Sa.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:i}),i)})),n}sendTransaction(e){return wh(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>Da(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return wh(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?Q.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?Da(e):null)))})),this.formatter.transactionRequest(yield Sl(r))}))}_getFilter(e){return wh(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield Sl(t))}))}_call(e,t,r){return wh(this,void 0,void 0,(function*(){r>=10&&Eh.throwError("CCIP read exceeded maximum redirections",Sa.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,o=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===o.substring(0,10)&&Ba(o)%32==4)try{const i=Ua(o,4),s=Ua(i,0,32);Q.from(s).eq(n)||Eh.throwError("CCIP Read sender did not match",Sa.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const a=[],l=Q.from(Ua(i,32,64)).toNumber(),c=Q.from(Ua(i,l,l+32)).toNumber(),d=Ua(i,l+32);for(let t=0;t<c;t++){const r=Lh(d,32*t);null==r&&Eh.throwError("CCIP Read contained corrupt URL string",Sa.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),a.push(r)}const u=_h(i,64);Q.from(Ua(i,100,128)).isZero()||Eh.throwError("CCIP Read callback selector included junk",Sa.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const p=Ua(i,96,100),h=_h(i,128),f=yield this.ccipReadFetch(e,u,a);null==f&&Eh.throwError("CCIP Read disabled or provided no URLs",Sa.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const m={to:n,data:Va([p,Bh([f,h])])};return this._call(m,t,r+1)}catch(e){if(e.code===Sa.errors.SERVER_ERROR)throw e}try{return Da(o)}catch(r){return Eh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:o,error:r})}}))}call(e,t){return wh(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield Sl({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)}))}estimateGas(e){return wh(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Sl({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return Q.from(r)}catch(e){return Eh.throwError("bad result from backend",Sa.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:e})}}))}_getAddress(e){return wh(this,void 0,void 0,(function*(){"string"!=typeof(e=yield e)&&Eh.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return null==t&&Eh.throwError("ENS name not configured",Sa.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t}))}_getBlock(e,t){return wh(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;let r=-128;const n={includeTransactions:!!t};if(Pa(e,32))n.blockHash=e;else try{n.blockTag=yield this._getBlockTag(e),Pa(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(t){Eh.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return sp((()=>wh(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;r<e.transactions.length;r++){const n=e.transactions[r];if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){null==t&&(t=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let e=t-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}}const r=this.formatter.blockWithTransactions(e);return r.transactions=r.transactions.map((e=>this._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return wh(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return sp((()=>wh(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return wh(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return sp((()=>wh(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return wh(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Sl({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),xh.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return wh(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return wh(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&Eh.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return wh(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new Uh(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return wh(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||Eh.throwError("network does not support ENS",Sa.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+Fc(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return wh(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if(Pa(e))throw t}"string"!=typeof e&&Eh.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return wh(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=Lh(yield this.call({to:r,data:"0x691f3431"+Fc(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return wh(this,void 0,void 0,(function*(){let t=null;if(Pa(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new Uh(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==Sa.errors.CALL_EXCEPTION)throw e}try{const e=Lh(yield this.call({to:n,data:"0x691f3431"+Fc(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==Sa.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return Eh.throwError(e+" not implemented",Sa.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new Nh(kh(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],o=kh(e);return this._events=this._events.filter((e=>e.tag!==o||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=kh(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=kh(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,o=kh(e);return this._events=this._events.filter((e=>e.tag!==o||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=kh(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var zh=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const Yh=new Sa("abstract-signer/5.7.0"),Gh=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Xh=[Sa.errors.INSUFFICIENT_FUNDS,Sa.errors.NONCE_EXPIRED,Sa.errors.REPLACEMENT_UNDERPRICED];class Jh{constructor(){Yh.checkAbstract(new.target,Jh),Tl(this,"_isSigner",!0)}getBalance(e){return zh(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return zh(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return zh(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield Sl(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return zh(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield Sl(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return zh(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return zh(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return zh(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return zh(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return zh(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===Gh.indexOf(t)&&Yh.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=Nl(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&Yh.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return zh(this,void 0,void 0,(function*(){const t=yield Sl(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>zh(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&Yh.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||Yh.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):Yh.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&Yh.throwError("network does not support EIP-1559",Sa.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):Yh.throwError("failed to get consistent fee data",Sa.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(Xh.indexOf(e.code)>=0)throw e;return Yh.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Sa.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&Yh.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield Sl(t)}))}_checkProvider(e){this.provider||Yh.throwError("missing provider",Sa.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}var qh=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const Qh=new Sa(gp),Kh=["call","estimateGas"];function $h(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=Pa(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=$h(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return $h(JSON.parse(e),t)}catch(e){}return null}function ef(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=$h(t,!0);if(e)return e.data;Qh.throwError("missing revert data in call exception; Transaction reverted without a reason string",Sa.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=$h(t.body,!1);null==r&&(r=$h(t,!1)),r&&Qh.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Sa.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let o=t.message;throw t.code===Sa.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?o=t.error.message:"string"==typeof t.body?o=t.body:"string"==typeof t.responseText&&(o=t.responseText),o=(o||"").toLowerCase(),o.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Qh.throwError("insufficient funds for intrinsic transaction cost",Sa.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),o.match(/nonce (is )?too low/i)&&Qh.throwError("nonce has already been used",Sa.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),o.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Qh.throwError("replacement fee too low",Sa.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),o.match(/only replay-protected/i)&&Qh.throwError("legacy pre-eip-155 transactions not supported",Sa.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),Kh.indexOf(e)>=0&&o.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Qh.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Sa.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function tf(e){return new Promise((function(t){setTimeout(t,e)}))}function rf(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function nf(e){return e?e.toLowerCase():e}const of={};class sf extends Jh{constructor(e,t,r){if(super(),e!==of)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");Tl(this,"provider",t),null==r&&(r=0),"string"==typeof r?(Tl(this,"_address",this.provider.formatter.address(r)),Tl(this,"_index",null)):"number"==typeof r?(Tl(this,"_index",r),Tl(this,"_address",null)):Qh.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return Qh.throwError("cannot alter JSON-RPC Signer connection",Sa.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new af(of,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&Qh.throwError("unknown account #"+this._index,Sa.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=Nl(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=Nl(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>qh(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&Qh.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),Sl({tx:Sl(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&Qh.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&Qh.throwError("user rejected transaction",Sa.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),ef("sendTransaction",e,n))))}))}signTransaction(e){return Qh.throwError("signing transactions is unsupported",Sa.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return qh(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield sp((()=>qh(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return qh(this,void 0,void 0,(function*(){const t="string"==typeof e?ac(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Da(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&Qh.throwError("user rejected signing",Sa.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return qh(this,void 0,void 0,(function*(){const t="string"==typeof e?ac(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),Da(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&Qh.throwError("user rejected signing",Sa.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return qh(this,void 0,void 0,(function*(){const n=yield Jc.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(Jc.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&Qh.throwError("user rejected signing",Sa.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return qh(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class af extends sf{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const lf={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class cf extends Hh{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=Rl(this.constructor,"defaultUrl")()),Tl(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(Nl(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return qh(this,void 0,void 0,(function*(){yield tf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=Rl(this.constructor,"getNetwork");try{return t(Q.from(e).toNumber())}catch(t){return Qh.throwError("could not detect network",Sa.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return Qh.throwError("could not detect network",Sa.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new sf(of,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Fl(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const o=ip(this.connection,JSON.stringify(r),rf).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=o,setTimeout((()=>{this._cache[e]=null}),0)),o}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[nf(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[nf(t.address),t.blockTag]];case"getCode":return["eth_getCode",[nf(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[nf(t.address),Ha(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[Rl(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[Rl(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=nf(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return qh(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&Q.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=Nl(t)).transaction=Nl(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&Qh.throwError(e+" not implemented",Sa.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return ef(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return tf(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=Nl(lf);if(t)for(const e in t)t[e]&&(r[e]=!0);var n,o;o=r,(n=e)&&"object"==typeof n||kl.throwArgumentError("invalid object","object",n),Object.keys(n).forEach((e=>{o[e]||kl.throwArgumentError("invalid object key - "+e,"transaction:"+e,n)}));const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=Za(Q.from(e[t]));"gasLimit"===t&&(t="gas"),i[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=Da(e[t]))})),e.accessList&&(i.accessList=hh(e.accessList)),i}}var df=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const uf=new Sa(gp);class pf extends cf{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return df(this,void 0,void 0,(function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||uf.throwError("no network detected",Sa.errors.UNKNOWN_ERROR,{}),null==this._network&&(Tl(this,"_network",t),this.emit("network",t,null))),t}))}}function hf(e){return Number.parseInt(e,16)}new Sa(gp);class ff extends ce{constructor(e,t,r){super(e,r),this.customProvider=t;const n=null==t?void 0:t.provider;n&&(this.provider=n);(null!=n?n:t).on("connect",(({chainId:e})=>{setTimeout((()=>{this.actions.update({chainId:hf(e)})}))})).on("disconnect",(e=>{setTimeout((()=>{var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.actions.resetState()}))})).on("chainChanged",(e=>{setTimeout((()=>{this.actions.update({chainId:hf(e)})}))})).on("accountsChanged",(e=>{setTimeout((()=>{this.actions.update({accounts:e})}))}))}activateAccounts(){return vl(this,void 0,void 0,(function*(){const e=this.actions.startActivation();try{const e=yield this.customProvider.listAccounts(),{chainId:t}=yield this.customProvider.getNetwork();this.actions.update({chainId:t,accounts:e})}catch(t){throw e(),t}}))}connectEagerly(){return vl(this,void 0,void 0,(function*(){return this.activateAccounts()}))}activate(){return vl(this,void 0,void 0,(function*(){return this.activateAccounts()}))}}function mf([e,t]){return[e,t]}var gf;function yf(){return yf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yf.apply(this,arguments)}var bf,vf;function xf(){return xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xf.apply(this,arguments)}var wf;!function(e){e.INTEGRATOR="integrator",e.METAMASK="metamask",e.WALLET_CONNECT="walletConnect"}(wf||(wf={}));const Ef={[wf.METAMASK]:{name:"MetaMask",type:wf.METAMASK,icon:function(e){return u.createElement("svg",yf({height:355,viewBox:"0 0 397 355",width:397,xmlns:"http://www.w3.org/2000/svg"},e),gf||(gf=u.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(-1 -1)"},u.createElement("path",{d:"m114.622644 327.195472 52.004717 13.810198v-18.05949l4.245283-4.249292h29.716982v21.246459 14.872523h-31.839624l-39.268868-16.997169z",fill:"#cdbdb2"}),u.createElement("path",{d:"m199.528305 327.195472 50.943397 13.810198v-18.05949l4.245283-4.249292h29.716981v21.246459 14.872523h-31.839623l-39.268868-16.997169z",fill:"#cdbdb2",transform:"matrix(-1 0 0 1 483.96227 0)"}),u.createElement("path",{d:"m170.872644 287.889523-4.245283 35.056657 5.306604-4.249292h55.18868l6.367925 4.249292-4.245284-35.056657-8.490565-5.311615-42.452832 1.062323z",fill:"#393939"}),u.createElement("path",{d:"m142.216984 50.9915022 25.471698 59.4900858 11.674528 173.158643h41.391511l12.735849-173.158643 23.349056-59.4900858z",fill:"#f89c35"}),u.createElement("path",{d:"m30.7783023 181.657226-29.71698153 86.048161 74.29245393-4.249293h47.7594343v-37.181303l-2.122641-76.487253-10.613208 8.498583z",fill:"#f89d35"}),u.createElement("path",{d:"m87.0283032 191.218134 87.0283028 2.124646-9.551886 44.617563-41.391511-10.623229z",fill:"#d87c30"}),u.createElement("path",{d:"m87.0283032 192.280457 36.0849058 33.994334v33.994334z",fill:"#ea8d3a"}),u.createElement("path",{d:"m123.113209 227.337114 42.452831 10.623229 13.79717 45.679888-9.551886 5.311615-46.698115-27.620398z",fill:"#f89d35"}),u.createElement("path",{d:"m123.113209 261.331448-8.490565 65.864024 56.25-39.305949z",fill:"#eb8f35"}),u.createElement("path",{d:"m174.056606 193.34278 5.306604 90.297451-15.919812-46.211049z",fill:"#ea8e3a"}),u.createElement("path",{d:"m74.2924539 262.393771 48.8207551-1.062323-8.490565 65.864024z",fill:"#d87c30"}),u.createElement("path",{d:"m24.4103777 355.878193 90.2122663-28.682721-40.3301901-64.801701-73.23113313 5.311616z",fill:"#eb8f35"}),u.createElement("path",{d:"m167.688682 110.481588-45.636793 38.243627-35.0235858 42.492919 87.0283028 3.186969z",fill:"#e8821e"}),u.createElement("path",{d:"m114.622644 327.195472 56.25-39.305949-4.245283 33.994334v19.121813l-38.207548-7.43626z",fill:"#dfcec3"}),u.createElement("path",{d:"m229.245286 327.195472 55.18868-39.305949-4.245283 33.994334v19.121813l-38.207548-7.43626z",fill:"#dfcec3",transform:"matrix(-1 0 0 1 513.679252 0)"}),u.createElement("path",{d:"m132.665096 212.464593-11.674528 24.433427 41.39151-10.623229z",fill:"#393939",transform:"matrix(-1 0 0 1 283.372646 0)"}),u.createElement("path",{d:"m23.349057 1.06232296 144.339625 109.41926504-24.410378-59.4900858z",fill:"#e88f35"}),u.createElement("path",{d:"m23.349057 1.06232296-19.10377392 58.42776294 10.61320772 63.7393781-7.42924541 4.249292 10.61320771 9.560906-8.49056617 7.436261 11.67452847 10.623229-7.4292454 6.373938 16.9811323 21.246459 79.5990577-24.433428c38.915096-31.161473 58.018869-47.096318 57.311322-47.804533-.707548-.708215-48.820756-37.1813036-144.339625-109.41926504z",fill:"#8e5a30"}),u.createElement("g",{transform:"matrix(-1 0 0 1 399.056611 0)"},u.createElement("path",{d:"m30.7783023 181.657226-29.71698153 86.048161 74.29245393-4.249293h47.7594343v-37.181303l-2.122641-76.487253-10.613208 8.498583z",fill:"#f89d35"}),u.createElement("path",{d:"m87.0283032 191.218134 87.0283028 2.124646-9.551886 44.617563-41.391511-10.623229z",fill:"#d87c30"}),u.createElement("path",{d:"m87.0283032 192.280457 36.0849058 33.994334v33.994334z",fill:"#ea8d3a"}),u.createElement("path",{d:"m123.113209 227.337114 42.452831 10.623229 13.79717 45.679888-9.551886 5.311615-46.698115-27.620398z",fill:"#f89d35"}),u.createElement("path",{d:"m123.113209 261.331448-8.490565 65.864024 55.18868-38.243626z",fill:"#eb8f35"}),u.createElement("path",{d:"m174.056606 193.34278 5.306604 90.297451-15.919812-46.211049z",fill:"#ea8e3a"}),u.createElement("path",{d:"m74.2924539 262.393771 48.8207551-1.062323-8.490565 65.864024z",fill:"#d87c30"}),u.createElement("path",{d:"m24.4103777 355.878193 90.2122663-28.682721-40.3301901-64.801701-73.23113313 5.311616z",fill:"#eb8f35"}),u.createElement("path",{d:"m167.688682 110.481588-45.636793 38.243627-35.0235858 42.492919 87.0283028 3.186969z",fill:"#e8821e"}),u.createElement("path",{d:"m132.665096 212.464593-11.674528 24.433427 41.39151-10.623229z",fill:"#393939",transform:"matrix(-1 0 0 1 283.372646 0)"}),u.createElement("path",{d:"m23.349057 1.06232296 144.339625 109.41926504-24.410378-59.4900858z",fill:"#e88f35"}),u.createElement("path",{d:"m23.349057 1.06232296-19.10377392 58.42776294 10.61320772 63.7393781-7.42924541 4.249292 10.61320771 9.560906-8.49056617 7.436261 11.67452847 10.623229-7.4292454 6.373938 16.9811323 21.246459 79.5990577-24.433428c38.915096-31.161473 58.018869-47.096318 57.311322-47.804533-.707548-.708215-48.820756-37.1813036-144.339625-109.41926504z",fill:"#8e5a30"})))))},link:"https://metamask.io"},[wf.WALLET_CONNECT]:{name:"WalletConnect",type:wf.WALLET_CONNECT,icon:function(e){return u.createElement("svg",xf({height:512,viewBox:"0 0 512 512",width:512,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),bf||(bf=u.createElement("radialGradient",{id:"walletConnect",cx:"0%",cy:"50%",r:"100%"},u.createElement("stop",{offset:0,stopColor:"#5d9df6"}),u.createElement("stop",{offset:1,stopColor:"#006fff"}))),vf||(vf=u.createElement("g",{fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"m256 0c141.384896 0 256 114.615104 256 256s-114.615104 256-256 256-256-114.615104-256-256 114.615104-256 256-256z",fill:"url(#walletConnect)"}),u.createElement("path",{d:"m64.6917558 37.7088298c51.5328072-50.2784397 135.0839942-50.2784397 186.6167992 0l6.202057 6.0510906c2.57664 2.5139218 2.57664 6.5897948 0 9.1037177l-21.215998 20.6995759c-1.288321 1.2569619-3.3771 1.2569619-4.665421 0l-8.534766-8.3270205c-35.950573-35.0754962-94.237969-35.0754962-130.188544 0l-9.1400282 8.9175519c-1.2883217 1.2569609-3.3771016 1.2569609-4.6654208 0l-21.2159973-20.6995759c-2.5766403-2.5139229-2.5766403-6.5897958 0-9.1037177zm230.4934852 42.8089117 18.882279 18.4227262c2.576627 2.5139103 2.576642 6.5897593.000032 9.1036863l-85.141498 83.070358c-2.576623 2.513941-6.754182 2.513969-9.33084.000066-.00001-.00001-.000023-.000023-.000033-.000034l-60.428256-58.957451c-.64416-.628481-1.68855-.628481-2.33271 0-.000004.000004-.000008.000007-.000012.000011l-60.4269683 58.957408c-2.5766141 2.513947-6.7541746 2.51399-9.3308408.000092-.0000151-.000014-.0000309-.000029-.0000467-.000046l-85.14386774-83.071463c-2.57663928-2.513921-2.57663928-6.589795 0-9.1037163l18.88231264-18.4226955c2.5766393-2.5139222 6.7541993-2.5139222 9.3308397 0l60.4291347 58.9582758c.6441608.62848 1.6885495.62848 2.3327103 0 .0000095-.000009.0000182-.000018.0000277-.000025l60.4261065-58.9582508c2.576581-2.51398 6.754142-2.5140743 9.33084-.0002103.000037.0000354.000072.0000709.000107.0001063l60.429056 58.9583548c.644159.628479 1.688549.628479 2.332709 0l60.428079-58.9571925c2.57664-2.5139231 6.754199-2.5139231 9.330839 0z",fill:"#fff",fillRule:"nonzero",transform:"translate(98 160)"}))))}}},Af={};function Cf({provider:e,jsonRpcUrlMap:t,defaultChainId:r}){const n=E((()=>console.error),[]),o=E((()=>function(e,t){if(t){if(cf.isProvider(t))return mf(ne((r=>new ff(r,t,e))));if(cf.isProvider(t.provider))throw new Error("Eip1193Bridge is experimental: pass your ethers Provider directly");return mf(ne((r=>new se({actions:r,provider:t,onError:e}))))}}(n,e)),[n,e]),i=E((()=>function(e){return mf(ne((t=>new le({actions:t,onError:e}))))}(n)),[n]),s=E((()=>t?Object.assign(Object.assign({},cl),t):cl),[JSON.stringify(t)]),a=E((()=>function(e,t,r,n){return mf(ne((o=>new ae({actions:o,options:{rpcMap:r?{[r]:t[r]}:t,projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:r?[r]:[],showQrModal:e,qrModalOptions:{desktopWallets:[]}},onError:n,defaultChainId:r}))))}(!0,s,r,n)),[s,r,n]),l=g(0),c=E((()=>(o&&(Af[wf.INTEGRATOR]=o),Af[wf.METAMASK]=i,Af[wf.WALLET_CONNECT]=a,l.current+=1,Object.values(Af))),[o,i,a]);return y((()=>{e&&o&&kf(wf.INTEGRATOR,void 0,(e=>{console.error(e)}))}),[e]),{connectors:c,key:l.current}}function kf(e,t,r){var n,o,i,s,a,l;return vl(this,void 0,void 0,(function*(){const c=Af[e];if(!c)throw new Error(`Unknown wallet type: ${e}`);const[d]=c;try{d.connectEagerly&&(yield d.connectEagerly(t)),e===wf.WALLET_CONNECT&&(null===(n=d.provider)||void 0===n?void 0:n.chainId)&&!(null===(o=d.chains)||void 0===o?void 0:o.includes(null===(i=d.provider)||void 0===i?void 0:i.chainId))&&d.deactivate&&((null===(s=d.provider)||void 0===s?void 0:s.disconnect)&&(yield null===(a=d.provider)||void 0===a?void 0:a.disconnect()),yield d.deactivate())}catch(e){console.error(e)}yield null===(l=d.activate(t))||void 0===l?void 0:l.catch((e=>{4001!==e.code?r(e):d.connectEagerly?d.connectEagerly(t):d.activate(t)}))}))}const Tf={colorMode:"dark",slippage:null,ddl:20};var Rf=(e=Tf,t)=>{switch(t.type){case"SET_COLOR_MODE":return Object.assign(Object.assign({},e),{colorMode:t.payload});case"SET_SLIPPAGE":return Object.assign(Object.assign({},e),{slippage:t.payload});case"SET_TRANSACTION_DDL":return Object.assign(Object.assign({},e),{ddl:t.payload});default:return e}};const Sf={chainId:ll.MAINNET,latestBlockNumber:0};var Nf=(e=Sf,t)=>{switch(t.type){case"SET_CHAIN_ID":return Object.assign(Object.assign({},e),{chainId:t.payload});case"SET_FROM_TOKEN_CHAIN_ID":return Object.assign(Object.assign({},e),{fromTokenChainId:t.payload});case"SET_TO_TOKEN_CHAIN_ID":return Object.assign(Object.assign({},e),{toTokenChainId:t.payload});case"SET_BLOCK_NUMBER":return Object.assign(Object.assign({},e),{latestBlockNumber:t.payload});default:return e}};const Mf={tokenList:[],popularTokenList:[],ethBalance:{},accountBalances:{},balanceLoadings:{},slippageWithTokens:[]};var Of,If=(e=Mf,t)=>{switch(t.type){case"SET_TOKEN_LIST":return Object.assign(Object.assign({},e),{tokenList:t.payload});case"SET_POPULAR_TOKEN_LIST":return Object.assign(Object.assign({},e),{popularTokenList:t.payload});case"SET_SLIPPAGE_WITH_TOKENS":return Object.assign(Object.assign({},e),{slippageWithTokens:t.payload});case"SET_ETH_BALANCE":return Object.assign(Object.assign({},e),{ethBalance:Object.assign(Object.assign({},e.ethBalance),t.payload)});case"SET_DEFAULT_FROM_TOKEN":return Object.assign(Object.assign({},e),{defaultFromToken:t.payload});case"SET_DEFAULT_TO_TOKEN":return Object.assign(Object.assign({},e),{defaultToToken:t.payload});case"SET_ACCOUNT_BALANCES":return Object.assign(Object.assign({},e),{accountBalances:Object.assign(Object.assign({},e.accountBalances),t.payload)});case"SET_ACCOUNT_ALLOWANCES":const r=Object.assign({},e.accountBalances);return Object.keys(r).map((e=>{r[e].tokenAllowances=t.payload})),Object.assign(Object.assign({},e),{accountBalances:r});case"SET_BALANCE_LOADINGS":return Object.assign(Object.assign({},e),{balanceLoadings:Object.assign(Object.assign({},e.balanceLoadings),t.payload)});default:return e}};!function(e){e.Initial="Initial",e.Pending="Pending",e.ApproveSuccess="ApproveSuccess",e.TxSuccess="TxSuccess",e.Failed="Failed"}(Of||(Of={}));const Ff={height:void 0,width:void 0,apikey:"",feeRate:0,rebateTo:"",isReverseRouting:!1,contractStatus:Of.Initial,autoConnectLoading:void 0,autoSlippage:void 0};var jf=(e=Ff,t)=>{var r,n;switch(t.type){case"SET_GLOBAL_PROPS":return Object.assign(Object.assign({},e),t.payload);case"SET_AUTO_CONNECT_LOADING":return Object.assign(Object.assign({},e),{autoConnectLoading:t.payload});case"SET_AUTO_SLIPPAGE":return Object.assign(Object.assign({},e),{autoSlippage:t.payload});case"SET_AUTO_SLIPPAGE_LOADING":return Object.assign(Object.assign({},e),{autoSlippage:{loading:t.payload,value:null!==(n=null===(r=e.autoSlippage)||void 0===r?void 0:r.value)&&void 0!==n?n:null}});default:return e}};const Lf={settings:Tf,wallet:Sf,globals:Ff,token:Mf},_f=de({reducer:ue({settings:Rf,wallet:Nf,token:If,globals:jf}),middleware:e=>e({serializableCheck:{ignoredActions:["SET_ACCOUNT_BALANCES","SET_ETH_BALANCE"],ignoredPaths:["token.accountBalances","token.ethBalance"]}}),preloadedState:Lf}),Wf=e=>(null!=e?e:_f.getState()).wallet.chainId,Pf=e=>(null!=e?e:_f.getState()).wallet.fromTokenChainId,Df=e=>(null!=e?e:_f.getState()).wallet.toTokenChainId,Bf=e=>(null!=e?e:_f.getState()).wallet.latestBlockNumber,Uf=pe(((e,t)=>({enabled:!1,initialize:()=>vl(void 0,void 0,void 0,(function*(){const t=yield me(),r=new ye({endpoint:t}),n=yield ge(),o=new be({endpoint:n});const i=new class{dispatchEvent(t,r){return vl(this,void 0,void 0,(function*(){if("ton-connect-connection-completed"===t)if("connection-completed"===r.type&&r.is_success){if(!r.wallet_address)throw new Error("wallet_address not found");e({connected:{chainId:Number(r.custom_data.chain_id),account:ve.parseRaw(r.wallet_address).toString({bounceable:!1})}})}}))}addEventListener(e,t,r){throw new Error("Method not implemented.")}},s=new he({eventDispatcher:i}),a=new fe({connector:s});e({tonConnectUI:a,client:r,clientV4:o})})),connect:()=>vl(void 0,void 0,void 0,(function*(){var e,r;const{initialize:n}=t();t().tonConnectUI||(yield n());const{tonConnectUI:o}=t();if(!o)throw new Error("tonConnectUI not initialized");(null===(e=o.account)||void 0===e?void 0:e.address)||(yield o.connector.restoreConnection(),(null===(r=o.account)||void 0===r?void 0:r.address)||(yield o.openModal()))})),getBlockNumber:()=>vl(void 0,void 0,void 0,(function*(){const{initialize:e}=t();t().clientV4||(yield e());const{clientV4:r}=t();if(!r)throw new Error("clientV4 not initialized");return(yield r.getLastBlock()).last.seqno})),getJettonWallet:e=>vl(void 0,void 0,void 0,(function*(){const{initialize:r}=t();t().client||(yield r());const{client:n,tonConnectUI:o,connected:i}=t();if(!n||!o)throw new Error("tonConnect not initialized");if(!i)throw new Error("account not found");const s=ve.parseFriendly(i.account).address;return(yield n.runMethod(ve.parseFriendly(e).address,"get_wallet_address",[{type:"slice",cell:xe().storeAddress(s).endCell()}])).stack.readAddress().toString()})),getBalance:e=>vl(void 0,void 0,void 0,(function*(){const{initialize:r}=t();t().client||(yield r());const{client:n}=t();if(!n)throw new Error("tonConnect not initialized");const i=ve.parseFriendly(e).address,s=yield n.getBalance(i);return new o(s.toString()).div(10**9)})),getTokenBalance:(e,r)=>vl(void 0,void 0,void 0,(function*(){const{getJettonWallet:n}=t(),i=yield n(e),{initialize:s}=t();t().client||(yield s());const{client:a}=t();if(!a)throw new Error("client not initialized");let l=new o(0);try{const e=yield a.runMethod(ve.parseFriendly(i).address,"get_wallet_data");l=new o(e.stack.readBigNumber().toString()).div(10**r)}catch(e){if(!(yield t().getBalance(i)).isEqualTo(0))throw e}return l}))})));function Vf({isTon:e}={}){const t=oe(),r=Uf(),n=$(Pf),i=p.useCallback((n=>vl(this,void 0,void 0,(function*(){var o;e&&(r.tonConnectUI||(yield r.initialize()),r.tonConnectUI&&r.tonConnectUI.connector.restoreConnection()),(null===(o=t.connector)||void 0===o?void 0:o.connectEagerly)?yield t.connector.connectEagerly(n):yield t.connector.activate(n)}))),[e,t,r]);return p.useMemo((()=>{var s,a,l,c,d,u;return n===ll.TON||e?{isTon:!0,chainId:null===(s=r.connected)||void 0===s?void 0:s.chainId,account:null===(a=r.connected)||void 0===a?void 0:a.account,tonAccount:null===(l=r.connected)||void 0===l?void 0:l.account,evmAccount:t.account,isMetamask:!1,autoConnect:i,connect:r.connect,getLastBlockNumber:()=>vl(this,void 0,void 0,(function*(){return yield r.getBlockNumber()})),getBalance:e=>vl(this,void 0,void 0,(function*(){return yield r.getBalance(e)}))}:{isTon:!1,chainId:t.chainId,account:t.account,tonAccount:null===(c=r.connected)||void 0===c?void 0:c.account,evmAccount:t.account,isMetamask:null===(u=null===(d=t.provider)||void 0===d?void 0:d.provider)||void 0===u?void 0:u.isMetaMask,autoConnect:i,connect:()=>t.connector.deactivate?t.connector.deactivate():t.connector.resetState(),provider:t.provider,getLastBlockNumber:()=>vl(this,void 0,void 0,(function*(){var e;return yield null===(e=t.provider)||void 0===e?void 0:e.getBlockNumber()})),getBalance:t.provider?e=>vl(this,void 0,void 0,(function*(){var r;const n=yield null===(r=t.provider)||void 0===r?void 0:r.getBalance(e);return n?new o(n.toString()).div(1e18):n})):void 0}}),[i,e,n,t,r])}function Zf(){const{chainId:e}=Vf(),t=$(Wf);return E((()=>e||t||1),[e,t])}var Hf=[{chainId:1,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/prKmKP8yDTuPMHTCZ_DcxG8BqsuHNO8w5KDmJWmPodg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOUVaWU1ER2ZVN3g2N3ZBZThqWkUxZzA0RExUaFhaV0JIb09wZFhpeXhHRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNNeVgyTnZhVzV0WVhKclpYUmpZWEJmWTI5dFgzTjBZWFJwWTE5cGJXZGZZMjlwYm5OZk5qUjROalJmTVRBeU4xOHhNekkyTjJGbE5EY3dMbkJ1WncucG5n.webp"},{chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:1,address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",name:"Binance USD",decimals:18,symbol:"BUSD",logoURI:"https://images.dodoex.io/xZmadzpVOnpuq2jNG_5EGKeqMET0LU_gmfnp4VxkcxI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSHQwWXZKMGNnU0lGTFM0aHExTV9jOXVITV9fMHpXaHBKSGVOQU5neTBuby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMkoxYzJSZk4ySTJOalJpWWpReVpDOWlkWE5rWHpkaU5qWTBZbUkwTW1RdWNHNW4ucG5n.webp"},{chainId:1,address:"0x6b175474e89094c44da98b954eedeac495271d0f",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/h2lbKBfBJ2LNSTNCuwjsBkshT4eXzDDmAV0lhWS0llA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUnVJNWt2eHBwalI4TTZsenFZZVAyTTB4eVFMUGJ0S1hONDdWVTN1dUszZy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWmpBNU5qUmpPVFUxT1M1d2JtYy5wbmc.webp"},{chainId:1,address:"0x43dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/PGIGjN4ix9pInoESO_mCmajbMpygApWZyGKaE6vyJFk/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8veFJDQ0hnQXBuaENRTFZNUXAwdTdwd0pSQzIxRHJ4cFY0b2Z0bndaYnRmMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5UaGxZelEyTlRFelpTOUVUMFJQWHpVNFpXTTBOalV4TTJVdWMzWm4uc3Zn.webp"},{chainId:1,address:"0xdac17f958d2ee523a2206206994597c13d831ec7",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:1,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://images.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:1,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:"https://images.dodoex.io/mI69kq-S-tNT1W57qYizPd5r2WNFzpAq5y6NhOcrTkY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVEZhSVNLVVZIWThLTVhyTkVmZDRXRUJmMGJoSHRweHY3Q1hDT0dKbGY2by9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmT0dVeFpEaG1PVEEyWlM1d2JtYy5wbmc.webp"},{chainId:5,symbol:"USDC",address:"0xC4106029d03c33731Ca01Ba59b5A6368c660E596",name:"USDC",decimals:6,logoURI:""},{chainId:5,symbol:"USDT",address:"0xed8a325D87D3b6edED04FB992A1482231647EE5e",name:"USDT Token",decimals:6,logoURI:""},{chainId:5,symbol:"WETH",address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",name:"Wrapped Ether",decimals:18,logoURI:""},{chainId:5,symbol:"ETH",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ether",decimals:18,logoURI:""},{chainId:56,address:"0xe9e7cea3dedca5984780bafc599bd69add087d56",name:"BUSD Token",decimals:18,symbol:"BUSD",logoURI:"https://images.dodoex.io/BvxyffA5gsLB4bLmlOVkfu7AVami78-VcW_6_i8I6kc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vbC1Sa25meFB3ZXlCOGVYSWJ2b04wdHczLTlzckZOckxfRHdTTnRLSHVRRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDJOa2JsOXRaV1JwWVY5a2IyUnZaWGhmYVc5ZlluVnpaRjgyTXpsbFlqZzNZV0V4WDJKMWMyUmZOak01WldJNE4yRmhNVjlsT1dVMVlXRTBOemxtTG5OMlp3LnN2Zw.webp"},{chainId:56,address:"0x55d398326f99059ff775485246999027b3197955",name:"Tether USD",decimals:18,symbol:"USDT",logoURI:"https://images.dodoex.io/QOl7CvP_WSmTUOMthbxQsNKjDj0s5kSjup69dW_-UeA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTjdQU3RXV2ZGaGNTVzM1QlE2TEJIaF9keVROUEJqa1RLTXRwTll5cEhSWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDJOa2JsOXRaV1JwWVY5a2IyUnZaWGhmYVc5ZmRYTmtkRjh4TlRZME1XWmpaRFF3WDNWelpIUmZNVFUyTkRGbVkyUTBNRjlqWmpJMVpUYzVZVE5qTG5OMlp3LnN2Zw.webp",canBridgeToTon:!0},{chainId:56,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"BNB",decimals:18,symbol:"BNB",logoURI:"https://images.dodoex.io/BWNSMMqu68bSFJsr9vsiCV09IonH3yuAkR9gQxaipBw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDhvazF4akd3bU9GUXUtMVdzNEVRLVBNRnJYMW9DLXlmYTc3OGJUUkx0US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpPUWw5alpEUTVNalE0TXpJMkwwSk9RbDlqWkRRNU1qUTRNekkyTG5CdVp3LnBuZw.webp"},{chainId:56,address:"0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c",name:"BTCB Token",decimals:18,symbol:"BTCB",logoURI:"https://images.dodoex.io/fZG0z_RZ1U73_LuuC3RGrrZvNR-bgrCUjkwvaro-PCY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZ1NXN0RuYWNkMnc2YWxSQnFmcENqTHNDZWJhc2VtQTc0dDJlTEdDZjhfNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWmpJNVlXRmpZamxoTVM1d2JtYy5wbmc.webp"},{chainId:56,address:"0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",name:"Dai Token",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/bhz9Vtma8hPb_-GnhwqQkhfTQ5PwKcR1Qbzn7aBKlfs/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZW04OHB4YXNDdEg0Nl9BcjhVandzZWR2SFBFUUtjVWVkc0FmV2lvenB2Yy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmWVRoaFptSmxaRFppWkM1d2JtYy5wbmc.webp"},{chainId:56,address:"0x67ee3Cb086F8a16f34beE3ca72FAD36F7Db929e2",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/PGIGjN4ix9pInoESO_mCmajbMpygApWZyGKaE6vyJFk/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8veFJDQ0hnQXBuaENRTFZNUXAwdTdwd0pSQzIxRHJ4cFY0b2Z0bndaYnRmMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5UaGxZelEyTlRFelpTOUVUMFJQWHpVNFpXTTBOalV4TTJVdWMzWm4uc3Zn.webp"},{chainId:56,address:"0x2170ed0880ac9a755fd29b2688956bd959f933f8",name:"Ethereum Token",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:56,address:"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",name:"Binance-Peg USD Coin",decimals:18,symbol:"USDC",logoURI:"https://images.dodoex.io/sQ5dF3FkjjQUsmfqFFE5cKq-cthh4u0wUooBE5Epf-k/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTDlEVElLa2dONG5mRkNTSF9GMUdXU3JiZkJDa2JZRTkwbmFDS0dIWnRsby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMM1Z6WkdOZlpXVTFNbUV4WldReVlpOTFjMlJqWDJWbE5USmhNV1ZrTW1JdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:56,address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",name:"Wrapped BNB",decimals:18,symbol:"WBNB",logoURI:"https://images.dodoex.io/-Pua5rc9k9iW4yuF5ajLVKzMkRhBq06D8HiEZ5gjezA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMDZOWTdBTmdOYWdFOHpXYUMtX2IzYXVPOUxsTEp6QlpLTUR3VlM5eW9DQS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyeHZaMjlmT1dRellXTmtZMlEzTnk1d2JtYy5wbmc.webp"},{chainId:137,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"MATIC",decimals:18,symbol:"MATIC",logoURI:"https://images.dodoex.io/cQFrEB6yGIqMkh_6Pie8VR3kIStL58IS-y8FbroHVwA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vc2VNUUk2dkpoaXljeldrczJaWWdGdk8zSEoxSWFIa053LXZYeXFneER4US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMekZmTWpkbE56TXlNRE13TWk4eFh6STNaVGN6TWpBek1ESXVjRzVuLnBuZw.webp"},{chainId:137,address:"0xe4bf2864ebec7b7fdf6eeca9bacae7cdfdaffe78",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/KEPetVp3nQkB6BZ_cb05trEfBbGxFEg92UnF8NZsEzM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVE5wTlRseEJGbFRDalM1ZFh3SWJ3Mm1hZ3NPUFFkZ3Z1UEhuZDZrNWdyMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk4yUTBaamxtTldOaU15OUVUMFJQWHpka05HWTVaalZqWWpNdWNHNW4ucG5n.webp"},{chainId:137,address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/hdRkGay_hj0t1OzN5C3c30cmch26tJhHUSroffg7ciY/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOHd3UndQOG9DTTdBcF9NOW11bGVOQWRqYjhBOXpvX2FYUE5pVTNBYUtzYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhnMlgwSXhOelUwTnpSZlJUZzVNRGswWDBNME5GOUVZVGs0WWprMU5GOUZaV1JsWDBGRFh6UTVOVEkzTVdRd1gwWmZiRzluYjE4MFpXSXdNVE0zTVRZeExuQnVady5wbmc.webp"},{chainId:137,address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",name:"Ether",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/WAobi4MZtLSxB59wgpyNlXLI44ZwlBh55qiGS2wLSGU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSUVnUUx3TjRMU2dKRDJTM3RmSFlHcmxZbFZQNGlJeFcxeEZVOUwwUExRNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlF6QXlZV0ZmUVRNNVlqSXlNMTlHUlY4NFgwUXdYMEV3WlRWZlF6UmZSakkzWlY5QlJGODVNRGd6WDBNM05UWmZRMk15WDJ4dloyOWZZelk0WXprelpHRXlNQzV3Ym1jLnBuZw.webp"},{chainId:137,address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/er3iAGv39hCC7F8AydW_AteD3hnZj9HI2XcAaruHeqA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVE9WUWtzN3JQWU5OZWdmNTRuNC1Za1NGTFYyLXVGZmlJRFVYem85aVMzOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlFUQmlPRFk1T1RGak5qSXhPR0l6Tm1NeFpERTVYMFEwWVRKbE9WOUZZakJqWDBVek5qQTJaVjlDTkRoZmJHOW5iMTlpTmpGbE5EVmtNbVF6TG5CdVp3LnBuZw.webp",canBridgeToTon:!0},{chainId:137,address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/WeK6L9_RjWUfAsnMuOAdyXIZVE3JK_H3lZU5vk2m7Tg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTFJ0aEt6X2VrSXdmTEh6NnAycW5rSkRFeUk1RXZrODlXQ0J2VW43MUJLNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoa1gwRkRYekUzWDBZNU5UaGZSREpsWlRVeU0yRXlNakEyTWpBMk9UazBOVGszWDBNeE0xOUVPRE14WldNM1gyeHZaMjlmWXpCbU9XVTFaamxoTmk1d2JtYy5wbmc.webp",canBridgeToTon:!0},{chainId:137,address:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://images.dodoex.io/_KjvB9pCVqbIIv_UnQvRWpjySBHiFnuHNSXUm_52UZM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDQ4OVYzTW1NMi1qaFJueEQ2Y3MyY1gydXdGS2tkRHpiRGZsbkZhTTJxOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhneU1qWXdYMFpCUTE4MVgwVTFOVFF5WVRjM00xOUJZVFEwWmw5Q1gwTm1aVjlFWmpkZlF6RTVNMkpqTWw5RE5UazVYMnh2WjI5Zk5HTmpORE0zTlRneFppNXdibWMucG5n.webp"},{chainId:137,address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",name:"Wrapped MATIC",decimals:18,symbol:"WMATIC",logoURI:"https://images.dodoex.io/HfZVSaAES3QRplSybW2uoKmYf6pVTRaxufn95_Qto_A/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMERhZEZTUUVFX0d4YlBoMHY3Wk1Hb1FwaWtOQm1vaWFyZTFlaFdJbU44dy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjFoZEdsalgyVmlOekZtTkdFMU9XRXZiV0YwYVdOZlpXSTNNV1kwWVRVNVlTNTNaV0p3LndlYnA.webp"},{chainId:42161,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"ETH",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:42161,address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",name:"Wrapped Ether",decimals:18,symbol:"WETH",logoURI:"https://images.dodoex.io/6VmZGvbENd4TM1VK0rsYrfznRtG-GwxP-zCy2qyc9bM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWnJZUDB0ZHVTLUdDNE5FTThmRmV1RHhVWklPNUZpWnpqdkdBc0lfNlBQMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh5TW1GbU4yVTVOVFJpTDFkRlZFaGZhV052Ymw4eU1tRm1OMlU1TlRSaUxuQnVady5wbmc.webp"},{chainId:42161,address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:42161,address:"0x69Eb4FA4a2fbd498C257C57Ea8b7655a2559A581",name:"DODO bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/6U51l5aajoRrCaO6cpbrclQ2olWNDzuShggOCfoktCA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8va3RkSlhwQ3dsQVZtZXNPb1dvQV95SG9IazBnV3UxUExienBKa1AxYnlJdy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJQUkU5Zk5tTmtPVEV4WXprNE15OUVUMFJQWHpaalpEa3hNV001T0RNdWNHNW4ucG5n.webp"},{chainId:42161,address:"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",name:"USD Coin (Arb1)",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/EaCi6KUTS-dinU-wGdG2IcundJ0fJfsOw97FRI2vaB8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdEVMaUx0Y1FaTVlBb3hkeExLdnRrZ2ltdVB5dmZRdUQ5U1BxU1c1bDZsMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZmFXTnZibDh5WlRFeU5tSTRaRFV5TDFWVFJFTmZhV052Ymw4eVpURXlObUk0WkRVeUxuQnVady5wbmc.webp",canBridgeToTon:!0},{chainId:42161,address:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:42161,address:"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://images.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:66,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"OKT",decimals:18,symbol:"OKT",logoURI:"https://images.dodoex.io/pcltGNcIp7DP33nj3YxxBpuFEekNcOW3pwq9tjSrpY4/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vTzJHSDJYTndRancwbXMzQXNidG5xNzRkVEROVld3QWFOU1dXU2ZnU01QTS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RTVOalF5T1RCZk1qQXlNakExTWpBd056STNORFl3TWpJdWMzWm4uc3Zn.webp"},{chainId:66,address:"0x382bB369d343125BfB2117af9c149795C6C65C50",name:"USDT",decimals:18,symbol:"USDT",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:66,address:"0x218c3c3D49d0E7B37aff0D8bB079de36Ae61A4c0",name:"BNB",decimals:18,symbol:"BNB",logoURI:"https://images.dodoex.io/BWNSMMqu68bSFJsr9vsiCV09IonH3yuAkR9gQxaipBw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZDhvazF4akd3bU9GUXUtMVdzNEVRLVBNRnJYMW9DLXlmYTc3OGJUUkx0US9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpPUWw5alpEUTVNalE0TXpJMkwwSk9RbDlqWkRRNU1qUTRNekkyTG5CdVp3LnBuZw.webp"},{chainId:66,address:"0x54e4622DC504176b3BB432dCCAf504569699a7fF",name:"BTCK",decimals:18,symbol:"BTCK",logoURI:"https://images.dodoex.io/L3kcNUKg94qnX8OPFlEvHKqWybnJD8SA9HTne3PW-Rg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vNU1MQTB3Q3V6eEs4Q3ZMV0RqempuOVhzalBTWE1zbUpWZ0RRN1RPMG9FWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpVUTB0Zk1HWmlaRGRsTWpnNU5pOUNWRU5MWHpCbVltUTNaVEk0T1RZdWNHNW4ucG5n.webp"},{chainId:66,address:"0x332730a4F6E03D9C55829435f10360E13cfA41Ff",name:"BUSD",decimals:18,symbol:"BUSD",logoURI:"https://images.dodoex.io/-aEkA13gC6lOFoRyGeSy2BotE5YY3WUmcSlPa9Rpddc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaXVmSjhaNHFJYzlMMDgtNHpxRUMxWl94WVlqRkEtT3BqS1FJbmQyeHpHUS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpWVTBSZk1XTTJNRFpqTjJZeE55OUNWVk5FWHpGak5qQTJZemRtTVRjdWNHNW4ucG5n.webp"},{chainId:66,address:"0x21cDE7E32a6CAF4742d00d44B07279e7596d26B9",name:"DAIK",decimals:18,symbol:"DAIK",logoURI:"https://images.dodoex.io/LOb-sXupURNN9HA0zBSfLfpZlx52N9qRSDUyzk3cg0A/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vck5pZzMtWU5TOUl4T3ZHX19taTFRSU9WYTZsczdZNXViRVhGcTJJVGplby9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFJCU1V0Zk5ESTVNV1l4WlRoa1pTOUVRVWxMWHpReU9URm1NV1U0WkdVdWNHNW4ucG5n.webp"},{chainId:66,address:"0xEF71CA2EE68F45B9Ad6F72fbdb33d707b872315C",name:"ETHK",decimals:18,symbol:"ETHK",logoURI:"https://images.dodoex.io/IwBclhMMQLOo79RdRo6-HnUiXxshO_hSi02YK3L6MFI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcFBSd192aEx2MHh3WkRHU2k3eGYyYVJiQjlocVhfU2tacUdGc3RJR0pYRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMFZVU0V0Zk1UQTVNamMzTW1VMU9DOUZWRWhMWHpFd09USTNOekpsTlRndWNHNW4ucG5n.webp"},{chainId:66,address:"0xc946DAf81b08146B1C7A8Da2A851Ddf2B3EAaf85",name:"USDC",decimals:18,symbol:"USDC",logoURI:"https://images.dodoex.io/bXLFjIP5_obFZS9jvWA1bZc2b2Vsw4-tqcvj10aPUpU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcXhZT0hTcDYzemNTaDVHRVV1SFlya3JGS2s1MW9zLVUycG42bjNXV2pYay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZk1UTTFZak13TkRkaVpDOVZVMFJEWHpFek5XSXpNRFEzWW1RdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:66,address:"0xdCAC52E001f5bd413aa6ea83956438F29098166b",name:"USDK",decimals:18,symbol:"USDK",logoURI:"https://images.dodoex.io/X-_D75ZOpI-yC70WjdgC8wiqcssfRIALEv0eUfD3HiE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vd290dHEzaWdkTDVzQlhSR2VFZkhQLTNpZHhDZzV0V3VGQmE3YjNrNUZITS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkV0Zk56aGpZekV6TW1OaVpDOVZVMFJMWHpjNFkyTXhNekpqWW1RdWNHNW4ucG5n.webp"},{chainId:66,address:"0x506f731F7656e2FB34b587B912808f2a7aB640BD",name:"WBTCK",decimals:18,symbol:"WBTCK",logoURI:"https://images.dodoex.io/7Gb1gYkvjWESf9ungWe4YKOrr5GY5UILmTwU_U95kCA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOTQ4NWZpU2NmUzBNc2V1YVZXWXo2Z1RuNVVidXJvZkxmN1VGSWhMdndjTS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOTFgyVXlZamRpWVRJNU16TXZWMEpVUTB0ZlpUSmlOMkpoTWprek15NXdibWMucG5n.webp"},{chainId:1313161554,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Ethereum",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/WAobi4MZtLSxB59wgpyNlXLI44ZwlBh55qiGS2wLSGU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vSUVnUUx3TjRMU2dKRDJTM3RmSFlHcmxZbFZQNGlJeFcxeEZVOUwwUExRNC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmZEhKMWMzUjNZV3hzWlhSZllYTnpaWFJ6WDIxaGMzUmxjbDlpYkc5amEyTm9ZV2x1YzE5bGRHaGxjbVYxYlY5aGMzTmxkSE5mTUhoZlF6QXlZV0ZmUVRNNVlqSXlNMTlHUlY4NFgwUXdYMEV3WlRWZlF6UmZSakkzWlY5QlJGODVNRGd6WDBNM05UWmZRMk15WDJ4dloyOWZZelk0WXprelpHRXlNQzV3Ym1jLnBuZw.webp"},{chainId:1313161554,address:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",name:"Wrapped Ethereum",decimals:18,symbol:"WETH",logoURI:"https://images.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0x8BEc47865aDe3B172A928df8f990Bc7f2A3b9f79",name:"Aurora",decimals:18,symbol:"Aurora",logoURI:"https://images.dodoex.io/2C2jfpO2-VYuwlga3SdtP5I6eJNJXIYq3LvPU4aFuiU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcHFWVWlJOEQ4VU5iUEZYRElvUnA3cFhEZFc4dmx4dWEtTmxubmxlam1PMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMkYxY205eVlWOHlOVEprWlRFeE56YzBMMkYxY205eVlWOHlOVEprWlRFeE56YzBMbmRsWW5BLndlYnA.webp"},{chainId:1313161554,address:"0xe3520349F477A5F6EB06107066048508498A291b",name:"Dai Stablecoin",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:1313161554,address:"0xe301eD8C7630C9678c39E4E45193D1e7Dfb914f7",name:"DODO Bird",decimals:18,symbol:"DODO",logoURI:"https://images.dodoex.io/SEcMDWMmtHb3GFW5l7fTKYurpTqALHdZI3D6qzad1rs/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vQXRNMzllUjhRQzhYTl8tem5HU0pSLS1lV0tPUW91V3p2ci0zQ014WlJTSS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMekl3TUhneU1EQmZNVjh3WWpReFl6VTJZV1UxTHpJd01IZ3lNREJmTVY4d1lqUXhZelUyWVdVMUxuQnVady5wbmc.webp"},{chainId:1313161554,address:"0xB12BFcA5A55806AaF64E99521918A4bf0fC40802",name:"USD Coin",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/EaCi6KUTS-dinU-wGdG2IcundJ0fJfsOw97FRI2vaB8/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdEVMaUx0Y1FaTVlBb3hkeExLdnRrZ2ltdVB5dmZRdUQ5U1BxU1c1bDZsMC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZmFXTnZibDh5WlRFeU5tSTRaRFV5TDFWVFJFTmZhV052Ymw4eVpURXlObUk0WkRVeUxuQnVady5wbmc.webp",canBridgeToTon:!0},{chainId:1313161554,address:"0x4988a896b1227218e4A686fdE5EabdcAbd91571f",name:"Tether USD",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp"},{chainId:1313161554,address:"0xF4eB217Ba2454613b15dBdea6e5f22276410e89e",name:"Wrapped BTC",decimals:8,symbol:"WBTC",logoURI:"https://images.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:43114,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"Avalanche",decimals:18,symbol:"AVAX",logoURI:"https://images.dodoex.io/yBkeC0v6hqQP-wNBxAq_C_D6JTYUc4Q86Wh6WIciESI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcmpNamFFdHJ5WUZxNks3TkpxYkRWczlEZF80aHp4ZUo3YnB0eGgtVERDYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjEzWDI1ZlRqaHRNRjgwTURCNE5EQXdYems0WlRKaU5EQm1PRGN2YlhkZmJsOU9PRzB3WHpRd01IZzBNREJmT1RobE1tSTBNR1k0Tnk1cWNHYy5qcGc.webp"},{chainId:43114,address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",name:"Wrapped AVAX",decimals:18,symbol:"WAVAX",logoURI:"https://images.dodoex.io/yBkeC0v6hqQP-wNBxAq_C_D6JTYUc4Q86Wh6WIciESI/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcmpNamFFdHJ5WUZxNks3TkpxYkRWczlEZF80aHp4ZUo3YnB0eGgtVERDYy9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMjEzWDI1ZlRqaHRNRjgwTURCNE5EQXdYems0WlRKaU5EQm1PRGN2YlhkZmJsOU9PRzB3WHpRd01IZzBNREJmT1RobE1tSTBNR1k0Tnk1cWNHYy5qcGc.webp"},{chainId:43114,address:"0x19860CCB0A68fd4213aB9D8266F7bBf05A8dDe98",name:"Binance USD",decimals:18,symbol:"BUSD.e",logoURI:"https://images.dodoex.io/-aEkA13gC6lOFoRyGeSy2BotE5YY3WUmcSlPa9Rpddc/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaXVmSjhaNHFJYzlMMDgtNHpxRUMxWl94WVlqRkEtT3BqS1FJbmQyeHpHUS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMEpWVTBSZk1XTTJNRFpqTjJZeE55OUNWVk5FWHpGak5qQTJZemRtTVRjdWNHNW4ucG5n.webp"},{chainId:43114,address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",name:"Dai Stablecoin",decimals:18,symbol:"DAI.e",logoURI:"https://images.dodoex.io/XNbyKKzPthXfYOku9oXt5xzqM1JOWzxmbTLq2kkSvaU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWHprMUxKSzJ2V1BYVmN3TmVvVDRfR3NNdnBOVXFmTmliXzgybFZSVUNkWS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMlZ5WXpJd0wyaDBkSEJ6WDNKaGQxOW5hWFJvZFdKMWMyVnlZMjl1ZEdWdWRGOWpiMjFmYzNWemFHbHpkMkZ3WDJsamIyNXpYMjFoYzNSbGNsOTBiMnRsYmw5a1lXbGZPRGhrT0dNeE5HRTBZaTVxY0djLmpwZw.webp"},{chainId:43114,address:"0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664",name:"USD Coin",decimals:6,symbol:"USDC.e",logoURI:"https://images.dodoex.io/bXLFjIP5_obFZS9jvWA1bZc2b2Vsw4-tqcvj10aPUpU/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vcXhZT0hTcDYzemNTaDVHRVV1SFlya3JGS2s1MW9zLVUycG42bjNXV2pYay9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkVOZk1UTTFZak13TkRkaVpDOVZVMFJEWHpFek5XSXpNRFEzWW1RdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:43114,address:"0xc7198437980c041c805A1EDcbA50c1Ce5db95118",name:"Tether USD",decimals:6,symbol:"USDT.e ",logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:43114,address:"0x50b7545627a5162F82A992c33b87aDc75187B218",name:"Wrapped BTC",decimals:8,symbol:"WBTC.e",logoURI:"https://images.dodoex.io/n4n7ccBom2tgcZNN0jBv9YiTq5qGMjX6PHO0YGlpzZo/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vMElrSkQzVEc2SkFQdG1DV24tNnhfa0ozS3lXYXlVVHRhZ19PQmF0TFEwRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRDVkVOZmFXTnZibDgzWW1JelpUQTRaak14TDFkQ1ZFTmZhV052Ymw4M1ltSXpaVEE0WmpNeExuQnVady5wbmc.webp"},{chainId:43114,address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",name:"Wrapped Ether",decimals:18,symbol:"WETH.e",logoURI:"https://images.dodoex.io/KWYmKxU_OCS1PmzuEO0xjdr1Yn08SjGBkyqSI8hxlpE/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vdkkyZF9rdFdyUzQyM0FqZlBLbkxRYloyRGVzTkpacmNTSlZNb1dYRnkyOC9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMWRGVkVoZmFXTnZibDh6TVRjd1pqTTBORGcxTDFkRlZFaGZhV052Ymw4ek1UY3daak0wTkRnMUxuQnVady5wbmc.webp"},{chainId:10,address:"0x4200000000000000000000000000000000000006",name:"WETH",decimals:18,symbol:"WETH",logoURI:"https://images.dodoex.io/f9SbZq39ynUZS5ueKvAwzLmKUfcZvYpKDaysT3dkcvM/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vc2NkVzJUWjladmRiX3BVSjZ3b2YzeHRvYk94YUw3bEV5RmhhemhJUFhlMC9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RXdNamd3TkRaZk1qQXlNakEwTWpJd01UQXpORGc1TURVdWNHNW4ucG5n.webp"},{chainId:10,address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",name:"DAI",decimals:18,symbol:"DAI",logoURI:"https://images.dodoex.io/04gwZiu2K_9fdb2zLwzsX1nONCbBWrZOvTyOoEFhx3g/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaDJCcmdhUmZxUzBLZDBEOVpZbEUteEtNMVdzeFFtRzBEWVpKOGJCaWN4US9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6SXlNRFUwTVRsZk1qQXlNakEwTWpJd01UQTBNak00TlRVdWFuQm4uanBn.webp"},{chainId:10,address:"0x7F5c764cBc14f9669B88837ca1490cCa17c31607",name:"USDC",decimals:6,symbol:"USDC",logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",canBridgeToTon:!0},{chainId:10,address:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",name:"USDT",decimals:6,symbol:"USDT",logoURI:"https://images.dodoex.io/iD2HcQfBC7tC1Eb0ERs67UIyUo0G-S77OaYuzCArFC0/rs:fit:32:32:0/g:no/aHR0cHM6Ly90b2tlbi1pbWcuZG9kb2V4LmlvLzEwLzB4OTRiMDA4YWEwMDU3OWMxMzA3YjBlZjJjNDk5YWQ5OGE4Y2U1OGU1OA.webp",canBridgeToTon:!0},{chainId:10,address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",name:"ETH",decimals:18,symbol:"ETH",logoURI:"https://images.dodoex.io/bcyoORJ04NyP1HhYUZ9RrTZ-MEOFeNnMcrr__JZ6Ruw/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vV1lHaU9IVFVnVWs4Q3Z3WmNyN0hWX2w4SlNrQjRVQUh1UXpzaWd4U3Nmay9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6VTVPREk0T1Y4eU1ESXlNRFF5TWpBeU1qTTBNelk0TlM1d2JtYy5wbmc.webp"},{decimals:18,logoURI:"https://images.dodoex.io/Gbch2fMVm-itKQ-wYdO0BE9s_LVK-8fr2eoJxyjM_pY/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vOXZDZEdXMV9BQnM2VTA3RzNIcDd1VnRURnppdWJvQlJObVJyVEZLaXhEcy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6RTVORFV4TXpoZk1qQXlNekEzTURNd056RTRNalkyT0RjdWFuQm4uanBn.webp",name:"Wrapped Conflux",address:"0x14b2D3bC65e74DAE1030EAFd8ac30c533c976A9b",symbol:"WCFX",chainId:1030},{decimals:18,logoURI:"https://images.dodoex.io/74nSnlgHYl303M6PsFI2ItXIpPdEaN5W62bJk0xrm6g/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vRUw0TjJvclJYb2pibEZwa2pTZy1mVlZuVDhhMWZ6amloek43eGlSZFdmWS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6ZzNNRGN4TXpOZk1qQXlNekEzTURNd056TTJNVGM0TXpndWNHNW4ucG5n.webp",name:"BNB",address:"0x94bd7A37d2cE24cC597E158fACaa8d601083ffeC",symbol:"BNB",chainId:1030},{decimals:18,logoURI:"https://images.dodoex.io/Tzga6cVcC2NZzIAvdf812Bcl5zSn5mNomHQRJhkjaiI/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVG5iZnNQSUVGWmFEeGkxSm9GUUd3blZSUUtrREkza3h2ekhuUnllTmUwYy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6STNNVEkwTTE4eU1ESXpNRGN3TXpBM01qa3lOVEl6TVM1d2JtYy5wbmc.webp",name:"Ethereum Token",address:"0xa47f43DE2f9623aCb395CA4905746496D2014d57",symbol:"ETH",chainId:1030},{chainId:1030,address:"0xfe97e85d13abd9c1c33384e796f10b73905637ce",name:"Tether USD",decimals:18,symbol:"USDT",logoURI:"https://images.dodoex.io/n_bg2q8GR4MlobGgr4RYo4r2gS6om7hmtGABi6qoulQ/rs:fit:96:96:0/g:no/aHR0cHM6Ly9jbXAuZG9kb2V4LmlvL2lnTHA5WW1zMnY4em9jOEVEcHRBOWRFTi0xZHZ0V2RkRGVMWjZaVjh1OGMvcnM6Zml0OjE2MDoxNjA6MC9nOm5vL2FIUjBjSE02THk5cGJXRm5aUzF3Y205NGVTNWtiMlJ2WlhndWFXOHZhQzFxVkRnMVZWVTRUalpUT1dsVlZuSkpMVnBCU0hjd1dXaDBTSFJPUjNoNWJUZHVZa2QyVUZobmR5OWhTRkl3WTBoTk5reDVPWHBrUnpsNVdWZGtiRXh0WkhaaU1tUnpXbGRHZDJGWVRYVlpNamwwVERKU2RscEhPSFJpVjFacllWZEZkR016VW1oYU1teDFXbms1TVdOSGVIWlpWMUptWVZjeGJsaDZhekpPYWtVMVRsWTRlVTFFU1hwTlJHTjNUWHBCTTAxcVdYZFBSR2N5VDFNMWQySnRZeTV3Ym1jLndlYnA.webp",canBridgeToTon:!0},{chainId:1030,address:"0x1F545487c62e5ACfEa45dcAdd9c627361d1616D8",name:"Wrapped BTC",decimals:18,symbol:"WBTC",logoURI:"https://images.dodoex.io/1e_VT8Ppoj0-PDkhFC58pxdegwGCdWBOa5JTPU-Ol2U/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vVU92VExkR1I4SzNHWnhISnA0aEVSN09teVdjdWdsNDBlU1hEbmJKWlJ2RS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6a3hNVGd3TWpaZk1qQXlNekEzTURNd056TXhOVEUzT1RVdWNHNW4ucG5n.webp",canBridgeToTon:!0},{decimals:18,logoURI:"https://images.dodoex.io/Wr2Rsy3ec2m0qdAHY95E-niUfibhSvMC9j6I9a2jW0w/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vWWNqMXJhUEVTYTYxeVpfeDdNNktWOGdabmxpVjdELTRCaWRpcVNYRExCZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6TXlOVGs1TWpGZk1qQXlNekE0TURRd05ETTJNamM0TXpJdWFuQm4uanBn.webp",name:"Bald",address:"0x27D2DECb4bFC9C76F0309b8E88dec3a601Fe25a8",symbol:"BALD",chainId:8453},{decimals:18,logoURI:"https://images.dodoex.io/20ZPKcy3KFBFeRhzXhM17Jn_ECPETHKMulANNxeUovo/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vZHV4b2JTNm03dzQyUWdfd09rZDBqV1JCWm5TNW5GQjRHM1A5Yk5wWDc3MC9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6SXhNVFk1TnpkZk1qQXlNekE0TURRd05ESTNNVEkyTmprdWMzWm4uc3Zn.webp",name:"Wrapped Ether",address:"0x4200000000000000000000000000000000000006",symbol:"WETH",chainId:8453},{decimals:6,logoURI:"https://images.dodoex.io/XZ0_CC_Hy6CLGuNpjsfkgdGp67czyMKPcq8HcsabhyQ/rs:fit:160:160:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vbm93dE5BTjlkNEYzeDQwVEtlWFVwRTJtTEo4OEd1ZWo1RHplUFVLeWRQUS9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6WXdOemM0TkRaZk1qQXlNekE0TURRd05ETTRORGszTnprdWMzWm4uc3Zn.webp",name:"Axelar Wrapped USDC",address:"0xEB466342C4d449BC9f53A865D5Cb90586f405215",symbol:"axlUSDC",chainId:8453},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ethereum",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",symbol:"ETH",chainId:8453},{decimals:6,logoURI:"https://images.dodoex.io/UzsHCVfq_wYVDFVhkYthXWfHdldQUNx7LH3-3uXCs_U/rs:fit:96:96:0/g:no/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3RydXN0d2FsbGV0L2Fzc2V0cy9tYXN0ZXIvYmxvY2tjaGFpbnMvZXRoZXJldW0vYXNzZXRzLzB4QTBiODY5OTFjNjIxOGIzNmMxZDE5RDRhMmU5RWIwY0UzNjA2ZUI0OC9sb2dvLnBuZw.webp",name:"USD Base Coin",address:"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",symbol:"USDbC",chainId:8453},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",symbol:"ETH",chainId:59144},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",symbol:"WETH",chainId:59144},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0x5300000000000000000000000000000000000004",symbol:"WETH",chainId:534352},{decimals:6,logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",name:"USD Coin",address:"0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",symbol:"USDC",chainId:534352,canBridgeToTon:!0},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",symbol:"WETH",chainId:169},{decimals:6,logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",name:"USD Coin",address:"0xb73603c5d87fa094b7314c74ace2e64d165016fb",symbol:"USDC",chainId:169,canBridgeToTon:!0},{decimals:18,logoURI:"https://maticnetwork.github.io/polygon-token-assets/assets/eth.svg",name:"Ether",address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",symbol:"ETH",chainId:169},{decimals:6,logoURI:"https://images.dodoex.io/MGklrG5AImwUllGWDPMAHY0qLfdJQn4bj3iPFWSeohA/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vUEM3a3JPb252bWl4U3VRaFEwY29pVy1sczFYN25WS1lLNVluekQ2R2lxRS9hSFIwY0hNNkx5OWpaRzR0YldWa2FXRXVaRzlrYjJWNExtbHZMMVZUUkZSZlpUaGlOekZpTldZeU9TOVZVMFJVWDJVNFlqY3hZalZtTWprdWNHNW4ucG5n.webp",name:"Tether USD",address:"0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE",symbol:"USDT",chainId:5e3,canBridgeToTon:!0},{decimals:6,logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",name:"USD Coin",address:"0x09bc4e0d864854c6afb6eb9a9cdf58ac190d0df9",symbol:"USDC",chainId:5e3,canBridgeToTon:!0},{decimals:6,logoURI:"https://tether.to/images/logoCircle.png",name:"Tether USD",address:"EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA",symbol:"jUSDT",chainId:-239},{decimals:6,logoURI:"https://tether.to/images/logoCircle.png",name:"Tether USD",address:"EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",symbol:"USDT",chainId:-239},{decimals:6,logoURI:"https://images.dodoex.io/XbtxsPIscM6p5ClHbLO0JumFHA9U23eON8-MDh-Plkg/rs:fit:96:96:0/g:no/aHR0cHM6Ly9pbWFnZS1wcm94eS5kb2RvZXguaW8vaG1nM3hRa1BUTUtkcUNFVnd0LXU4S2lwTW5od1JCdGhLYWxENW9vSWlTZy9hSFIwY0hNNkx5OXpkRzl5WVdkbExtZHZiMmRzWldGd2FYTXVZMjl0TDJSdlpHOHRiV1ZrYVdFdGMzUmhaMmx1Wnk5MWNHeHZZV1JmYVcxblh6UXlNRFEyTkRaZk1qQXlNakEwTWpJd01UQTFNekF4TmpVdWNHNW4ucG5n.webp",name:"USD Coin",address:"EQB-MPwrd1G6WKNkLz_VnV6WqBDd142KMQv-g1O-8QUA3728",symbol:"jUSDC",chainId:-239}];function zf({tokenList:e,popularTokenList:t,isTon:r}){const n=ee(),{account:o}=Vf(),i=Zf();y((()=>{(()=>{vl(this,void 0,void 0,(function*(){let o=[];o=a(e)?e:l(t,Hf,(e=>e.address.toLowerCase()+e.chainId+e.side)),r&&(o=o.filter((e=>e.chainId===ll.TON||e.canBridgeToTon))),n((e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_TOKEN_LIST",payload:e})})))(o))}))})()}),[e,n,t,r]),y((()=>{n(El({}))}),[o,i]),y((()=>{var e;n(xl(r?null!==(e=null==t?void 0:t.filter((e=>e.chainId===ll.TON||e.canBridgeToTon)))&&void 0!==e?e:[]:null!=t?t:[]))}),[t,n,r])}const Yf=e=>(null!=e?e:_f.getState()).token.tokenList,Gf=e=>{const{tokenList:t,popularTokenList:r}=(null!=e?e:_f.getState()).token;return l(r,t,(e=>e.address.toLowerCase()+e.chainId+e.side))},Xf=e=>(null!=e?e:_f.getState()).token.accountBalances,Jf=e=>(null!=e?e:_f.getState()).token.ethBalance,qf=e=>(null!=e?e:_f.getState()).token.defaultFromToken,Qf=e=>(null!=e?e:_f.getState()).token.defaultToToken,Kf=e=>(null!=e?e:_f.getState()).token.balanceLoadings;function $f(){const{account:e,chainId:t}=Vf(),r=$(Xf),n=$(Jf),o=v((o=>{var i,s,a;if(!e||!o)return null;if(fl(o.address,"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE")){const e=n[null!==(s=null!==(i=o.chainId)&&void 0!==i?i:t)&&void 0!==s?s:1];return!e||(null==e?void 0:e.isNaN())?null:e}const l=null===(a=r[o.address.toLocaleLowerCase()])||void 0===a?void 0:a.tokenBalances;return!l||(null==l?void 0:l.isNaN())?null:l}),[r,n,e]);return o}const em=e=>(null!=e?e:_f.getState()).globals,tm=e=>(null!=e?e:_f.getState()).globals.autoConnectLoading,rm=e=>(null!=e?e:_f.getState()).globals.autoSlippage;var nm=[{constant:!0,inputs:[],name:"getCurrentBlockTimestamp",outputs:[{name:"timestamp",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{components:[{name:"target",type:"address"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{name:"blockNumber",type:"uint256"},{name:"returnData",type:"bytes[]"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getLastBlockHash",outputs:[{name:"blockHash",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockDifficulty",outputs:[{name:"difficulty",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockGasLimit",outputs:[{name:"gaslimit",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getCurrentBlockCoinbase",outputs:[{name:"coinbase",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{name:"blockHash",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"}];const om={[ll.MAINNET]:{MULTI_CALL:"0xeefba1e63905ef1d7acba5a8513c70307c1ce441",DODO_APPROVE:"0xCB859eA579b28e02B87A1FDE08d087ab9dbE5149",ERC20_HELPER:"0xD9ef2d1583e8Aa196123e773BE38B539a4d149df"},[ll.GOERLI]:{MULTI_CALL:"0x696E25A5e2AEd1C55E6d6Cfa0532Bbda9020165d",DODO_APPROVE:"0xC9143e54021f4a6d33b9b89DBB9F458AaEdd56FB",ERC20_HELPER:"0x24549FC74B3076A962624A26370ed556c467F74C"},[ll.BSC]:{MULTI_CALL:"0x1Ee38d535d541c55C9dae27B12edf090C608E6Fb",DODO_APPROVE:"0xa128Ba44B2738A558A1fdC06d6303d52D3Cef8c1",ERC20_HELPER:"0x566651Ad34f6306872FaC5fB95bbF4C9beE8D8F2"},[ll.POLYGON]:{MULTI_CALL:"0xc9eD9B18e447e600238fe50e944B9062B664DEa4",DODO_APPROVE:"0x6D310348d5c12009854DFCf72e0DF9027e8cb4f4",ERC20_HELPER:"0xfd24312Ec7871A6D1a31e454D5AbB16c6c25a9b3"},[ll.ARBITRUM_ONE]:{MULTI_CALL:"0xF718F2bd590E5621e53f7b89398e52f7Acced8ca",DODO_APPROVE:"0xA867241cDC8d3b0C07C85cC06F25a0cD3b5474d8",ERC20_HELPER:"0x7C062B9C584fA6eC2504270790D38240A2c5fE72"},[ll.AURORA]:{MULTI_CALL:"0x989DcAA95801C527C5B73AA65d3962dF9aCe1b0C",DODO_APPROVE:"0x335aC99bb3E51BDbF22025f092Ebc1Cf2c5cC619",ERC20_HELPER:"0xE8C9A78725D0451FA19878D5f8A3dC0D55FECF25"},[ll.OKCHAIN]:{MULTI_CALL:"0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01",DODO_APPROVE:"0x7737fd30535c69545deeEa54AB8Dd590ccaEBD3c",ERC20_HELPER:"0x4775b1858f1e417C9609D455C3Ad8751ec01daC4"},[ll.OPTIMISM]:{MULTI_CALL:"0xb98Ac2fEFc8b73aeAE33D02BB00c26E12afCa9Df",DODO_APPROVE:"0xa492d6eABcdc3E204676f15B950bBdD448080364",ERC20_HELPER:"0x42E456ea0dd7538ea103fBb1d0388D14C97bB5b2"},[ll.AVALANCHE]:{MULTI_CALL:"0x97f0153E7F5749640aDF3Ff9CFC518b79D6Fe53b",DODO_APPROVE:"0xCFea63e3DE31De53D68780Dd65675F169439e470",ERC20_HELPER:"0xC3528D128CC227fd60793007b5e3FdF7c2945282"},[ll.CONFLUX]:{MULTI_CALL:"0x696e25a5e2aed1c55e6d6cfa0532bbda9020165d",DODO_APPROVE:"0x5BaF16d57620Cb361F622232F3cb4090e35F3da2",ERC20_HELPER:"0x24549FC74B3076A962624A26370ed556c467F74C"},[ll.BASE]:{MULTI_CALL:"0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",DODO_APPROVE:"0x89872650fA1A391f58B4E144222bB02e44db7e3B",ERC20_HELPER:"0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780"},[ll.LINEA]:{MULTI_CALL:"0xa7b9C3a116b20bEDDdBE4d90ff97157f67F0bD97",DODO_APPROVE:"0x6de4d882a84A98f4CCD5D33ea6b3C99A07BAbeB1",ERC20_HELPER:"0xbcd2FDC3B884Cf0dfD932f55Ec2Fe1fB7e8c62Da"},[ll.SCROLL]:{MULTI_CALL:"0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",DODO_APPROVE:"0x20E77aD760eC9E922Fd2dA8847ABFbB2471B92CD",ERC20_HELPER:"0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780"},[ll.MANTA]:{MULTI_CALL:"0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",DODO_APPROVE:"0x0226fCE8c969604C3A0AD19c37d1FAFac73e13c2",ERC20_HELPER:"0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780"},[ll.MANTLE]:{MULTI_CALL:"0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",DODO_APPROVE:"0xa71415675F68f29259ddD63215E5518d2735bf0a",ERC20_HELPER:"0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780"},[ll.TON]:{MULTI_CALL:"",DODO_APPROVE:"",ERC20_HELPER:""}},im=new Sa("abi/5.7.0"),sm={};let am={calldata:!0,memory:!0,storage:!0},lm={calldata:!0,memory:!0};function cm(e,t){if("bytes"===e||"string"===e){if(am[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&lm[t])return!0;return(am[t]||"payable"===t)&&im.throwArgumentError("invalid modifier","name",t),!1}function dm(e,t){for(let r in t)Tl(e,r,t[r])}const um=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),pm=new RegExp(/^(.*)\[([0-9]*)\]$/);class hm{constructor(e,t){e!==sm&&im.throwError("use fromString",Sa.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),dm(this,t);let r=this.type.match(pm);dm(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:hm.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=um.sighash),um[e]||im.throwArgumentError("invalid format type","format",e),e===um.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==um.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===um.full?", ":",")+")"):t+=this.type,e!==um.sighash&&(!0===this.indexed&&(t+=" indexed"),e===um.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?hm.fromString(e,t):hm.fromObject(e)}static fromObject(e){return hm.isParamType(e)?e:new hm(sm,{name:e.name||null,type:Cm(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(hm.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){im.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function o(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let i={type:"",name:"",state:{allowType:!0}},s=i;for(let r=0;r<e.length;r++){let i=e[r];switch(i){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||n(r),s.state.allowType=!1,s.type=Cm(s.type),s.components=[o(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),cm(s.type,s.name)&&(s.name=""),s.type=Cm(s.type);let e=s;s=s.parent,s||n(r),delete e.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),cm(s.type,s.name)&&(s.name=""),s.type=Cm(s.type);let a=o(s.parent);s.parent.components.push(a),delete s.parent,s=a;break;case" ":s.state.allowType&&""!==s.type&&(s.type=Cm(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(t||n(r),s.indexed&&n(r),s.indexed=!0,s.name=""):cm(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||n(r),s.type+=i,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||n(r),s.type+=i,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=i,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=i,delete s.state.allowArray):s.state.readArray?s.type+=i:n(r)}}return s.parent&&im.throwArgumentError("unexpected eof","param",e),delete i.state,"indexed"===s.name?(t||n(r.length-7),s.indexed&&n(r.length-7),s.indexed=!0,s.name=""):cm(s.type,s.name)&&(s.name=""),i.type=Cm(i.type),i}(e,!!t),hm.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(e){return!(null==e||!e._isParamType)}}function fm(e,t){return function(e){e=e.trim();let t=[],r="",n=0;for(let o=0;o<e.length;o++){let i=e[o];","===i&&0===n?(t.push(r),r=""):(r+=i,"("===i?n++:")"===i&&(n--,-1===n&&im.throwArgumentError("unbalanced parenthesis","value",e)))}r&&t.push(r);return t}(e).map((e=>hm.fromString(e,t)))}class mm{constructor(e,t){e!==sm&&im.throwError("use a static from method",Sa.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),dm(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return mm.isFragment(e)?e:"string"==typeof e?mm.fromString(e):mm.fromObject(e)}static fromObject(e){if(mm.isFragment(e))return e;switch(e.type){case"function":return wm.fromObject(e);case"event":return gm.fromObject(e);case"constructor":return xm.fromObject(e);case"error":return Am.fromObject(e);case"fallback":case"receive":return null}return im.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?gm.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?wm.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?xm.fromString(e.trim()):"error"===e.split(" ")[0]?Am.fromString(e.substring(5).trim()):im.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class gm extends mm{format(e){if(e||(e=um.sighash),um[e]||im.throwArgumentError("invalid format type","format",e),e===um.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==um.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===um.full?", ":",")+") ",e!==um.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?gm.fromString(e):gm.fromObject(e)}static fromObject(e){if(gm.isEventFragment(e))return e;"event"!==e.type&&im.throwArgumentError("invalid event object","value",e);const t={name:Tm(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(hm.fromObject):[],type:"event"};return new gm(sm,t)}static fromString(e){let t=e.match(Rm);t||im.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:im.warn("unknown modifier: "+e)}})),gm.fromObject({name:t[1].trim(),anonymous:r,inputs:fm(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function ym(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&im.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||im.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=Q.from(r[1]),r[0]):e}function bm(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function vm(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&im.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&im.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||im.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&im.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&im.throwArgumentError("unable to determine stateMutability","value",e),t}class xm extends mm{format(e){if(e||(e=um.sighash),um[e]||im.throwArgumentError("invalid format type","format",e),e===um.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===um.sighash&&im.throwError("cannot format a constructor for sighash",Sa.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===um.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?xm.fromString(e):xm.fromObject(e)}static fromObject(e){if(xm.isConstructorFragment(e))return e;"constructor"!==e.type&&im.throwArgumentError("invalid constructor object","value",e);let t=vm(e);t.constant&&im.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(hm.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?Q.from(e.gas):null};return new xm(sm,r)}static fromString(e){let t={type:"constructor"},r=(e=ym(e,t)).match(Rm);return r&&"constructor"===r[1].trim()||im.throwArgumentError("invalid constructor string","value",e),t.inputs=fm(r[2].trim(),!1),bm(r[3].trim(),t),xm.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class wm extends xm{format(e){if(e||(e=um.sighash),um[e]||im.throwArgumentError("invalid format type","format",e),e===um.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==um.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===um.full?", ":",")+") ",e!==um.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?wm.fromString(e):wm.fromObject(e)}static fromObject(e){if(wm.isFunctionFragment(e))return e;"function"!==e.type&&im.throwArgumentError("invalid function object","value",e);let t=vm(e);const r={type:e.type,name:Tm(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(hm.fromObject):[],outputs:e.outputs?e.outputs.map(hm.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?Q.from(e.gas):null};return new wm(sm,r)}static fromString(e){let t={type:"function"},r=(e=ym(e,t)).split(" returns ");r.length>2&&im.throwArgumentError("invalid function string","value",e);let n=r[0].match(Rm);if(n||im.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&Tm(t.name),t.inputs=fm(n[2],!1),bm(n[3].trim(),t),r.length>1){let n=r[1].match(Rm);""==n[1].trim()&&""==n[3].trim()||im.throwArgumentError("unexpected tokens","value",e),t.outputs=fm(n[2],!1)}else t.outputs=[];return wm.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function Em(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||im.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class Am extends mm{format(e){if(e||(e=um.sighash),um[e]||im.throwArgumentError("invalid format type","format",e),e===um.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==um.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===um.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?Am.fromString(e):Am.fromObject(e)}static fromObject(e){if(Am.isErrorFragment(e))return e;"error"!==e.type&&im.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:Tm(e.name),inputs:e.inputs?e.inputs.map(hm.fromObject):[]};return Em(new Am(sm,t))}static fromString(e){let t={type:"error"},r=e.match(Rm);return r||im.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&Tm(t.name),t.inputs=fm(r[2],!1),Em(Am.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function Cm(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const km=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Tm(e){return e&&e.match(km)||im.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const Rm=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const Sm=new Sa("abi/5.7.0");class Nm{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){Sm.throwArgumentError(e,this.localName,t)}}class Mm{constructor(e){Tl(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return Va(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(_a(e._data))}writeBytes(e){let t=La(e);const r=t.length%this.wordSize;return r&&(t=_a([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=La(Q.from(e));return t.length>this.wordSize&&Sm.throwError("value out-of-bounds",Sa.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=_a([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class Om{constructor(e,t,r,n){Tl(this,"_data",La(e)),Tl(this,"wordSize",t||32),Tl(this,"_coerceFunc",r),Tl(this,"allowLoose",n),this._offset=0}get data(){return Da(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):Om.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:Sm.throwError("data out-of-bounds",Sa.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new Om(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return Q.from(this.readBytes(this.wordSize))}}class Im extends Nm{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=al(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return al(Ha(e.readValue().toHexString(),20))}}class Fm extends Nm{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const jm=new Sa("abi/5.7.0");function Lm(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||jm.throwError("cannot encode object for signature with missing names",Sa.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&jm.throwError("cannot encode object for signature with duplicate names",Sa.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else jm.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&jm.throwArgumentError("types/value length mismatch","tuple",r);let o=new Mm(e.wordSize),i=new Mm(e.wordSize),s=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=i.length;e.encode(i,r);let n=o.writeUpdatableValue();s.push((e=>{n(e+t)}))}else e.encode(o,r)})),s.forEach((e=>{e(o.length)}));let a=e.appendWriter(o);return a+=e.appendWriter(i),a}function _m(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readValue(),i=n.subReader(r.toNumber());try{o=t.decode(i)}catch(e){if(e.code===Sa.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if(e.code===Sa.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}null!=o&&r.push(o)}));const o=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const i=r[t];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw i}}):r[n]=i}));for(let e=0;e<r.length;e++){const t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class Wm extends Nm{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),jm.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let e=0;e<t.length;e++)n.push(this.coder);return Lm(e,n,t)}decode(e){let t=this.length;-1===t&&(t=e.readValue().toNumber(),32*t>e._data.length&&jm.throwError("insufficient data length",Sa.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e<t;e++)r.push(new Fm(this.coder));return e.coerce(this.name,_m(e,r))}}class Pm extends Nm{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){return e.writeValue(t?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class Dm extends Nm{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=La(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class Bm extends Dm{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,Da(super.decode(e)))}}class Um extends Nm{constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=La(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return e.coerce(this.name,Da(e.readBytes(this.size)))}}class Vm extends Nm{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}class Zm extends Nm{constructor(e,t,r){const n=(t?"int":"uint")+8*e;super(n,n,r,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let r=Q.from(t),n=ec.mask(8*e.wordSize);if(this.signed){let e=n.mask(8*this.size-1);(r.gt(e)||r.lt(e.add($l).mul(Ql)))&&this._throwError("value out-of-bounds",t)}else(r.lt(Kl)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}decode(e){let t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}class Hm extends Dm{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ac(t))}decode(e){return lc(super.decode(e))}}class zm extends Nm{constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]))})),Object.freeze(e)}encode(e,t){return Lm(e,this.coders,t)}decode(e){return e.coerce(this.name,_m(e,this.coders))}}const Ym=new Sa("abi/5.7.0"),Gm=new RegExp(/^bytes([0-9]*)$/),Xm=new RegExp(/^(u?int)([0-9]*)$/);const Jm=new class{constructor(e){Tl(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Im(e.name);case"bool":return new Pm(e.name);case"string":return new Hm(e.name);case"bytes":return new Bm(e.name);case"array":return new Wm(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new zm((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new Vm(e.name)}let t=e.type.match(Xm);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&Ym.throwArgumentError("invalid "+t[1]+" bit length","param",e),new Zm(r/8,"int"===t[1],e.name)}if(t=e.type.match(Gm),t){let r=parseInt(t[1]);return(0===r||r>32)&&Ym.throwArgumentError("invalid bytes length","param",e),new Um(r,e.name)}return Ym.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new Om(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new Mm(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(hm.from(e))));return new zm(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&Ym.throwError("types/values length mismatch",Sa.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(hm.from(e)))),n=new zm(r,"_"),o=this._getWriter();return n.encode(o,t),o.data}decode(e,t,r){const n=e.map((e=>this._getCoder(hm.from(e))));return new zm(n,"_").decode(this._getReader(La(t),r))}},qm=new Sa("abi/5.7.0");class Qm extends jl{}class Km extends jl{}class $m extends jl{}class eg extends jl{static isIndexed(e){return!(!e||!e._isIndexed)}}const tg={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function rg(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class ng{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,Tl(this,"fragments",t.map((e=>mm.from(e))).filter((e=>null!=e))),Tl(this,"_abiCoder",Rl(new.target,"getAbiCoder")()),Tl(this,"functions",{}),Tl(this,"errors",{}),Tl(this,"events",{}),Tl(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void qm.warn("duplicate definition - constructor"):void Tl(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?qm.warn("duplicate definition - "+r):t[r]=e})),this.deploy||Tl(this,"deploy",xm.from({payable:!1,type:"constructor"})),Tl(this,"_isInterface",!0)}format(e){e||(e=um.full),e===um.sighash&&qm.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===um.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return Jm}static getAddress(e){return al(e)}static getSighash(e){return Ua(cc(e.format()),0,4)}static getEventTopic(e){return cc(e.format())}getFunction(e){if(Pa(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];qm.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?qm.throwArgumentError("no matching function","name",t):r.length>1&&qm.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[wm.fromString(e).format()];return t||qm.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(Pa(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];qm.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?qm.throwArgumentError("no matching event","name",t):r.length>1&&qm.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[gm.fromString(e).format()];return t||qm.throwArgumentError("no matching event","signature",e),t}getError(e){if(Pa(e)){const t=Rl(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}qm.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?qm.throwArgumentError("no matching error","name",t):r.length>1&&qm.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[wm.fromString(e).format()];return t||qm.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return Rl(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),Rl(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=La(t);return Da(r.slice(0,4))!==this.getSighash(e)&&qm.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Da(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),Da(_a([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=La(t);return Da(r.slice(0,4))!==this.getSighash(e)&&qm.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Da(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Da(_a([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=La(t),n=null,o="",i=null,s=null,a=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=Da(r.slice(0,4)),t=tg[e];if(t)i=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.signature,t.reason&&(n=i[0]),"Error"===s?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(i[0])}`:"Panic"===s&&(o=`; VM Exception while processing transaction: reverted with panic code ${i[0]}`);else try{const t=this.getError(e);i=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.format()}catch(e){}break}}return qm.throwError("call revert exception"+o,Sa.errors.CALL_EXCEPTION,{method:e.format(),data:Da(t),errorArgs:i,errorName:s,errorSignature:a,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Da(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&qm.throwError("too many arguments for "+e.format(),Sa.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?cc(t):"bytes"===e.type?Xa(Da(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=Q.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),Ha(Da(t),32));for(t.forEach(((t,o)=>{let i=e.inputs[o];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?qm.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>n(i,e)))):r.push(n(i,t)):null!=t&&qm.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&qm.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,i)=>{const s=t[i];if(e.indexed)if("string"===e.type)r.push(cc(s));else if("bytes"===e.type)r.push(Xa(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[s]))}else n.push(e),o.push(s)})),{data:this._abiCoder.encode(n,o),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);Pa(r[0],32)&&r[0].toLowerCase()===t||qm.throwError("fragment/topic mismatch",Sa.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],o=[],i=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(hm.fromObject({type:"bytes32",name:e.name})),i.push(!0)):(n.push(e),i.push(!1)):(o.push(e),i.push(!1))}));let s=null!=r?this._abiCoder.decode(n,_a(r)):null,a=this._abiCoder.decode(o,t,!0),l=[],c=0,d=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)l[t]=new eg({_isIndexed:!0,hash:null});else if(i[t])l[t]=new eg({_isIndexed:!0,hash:s[d++]});else try{l[t]=s[d++]}catch(e){l[t]=e}else try{l[t]=a[c++]}catch(e){l[t]=e}if(e.name&&null==l[e.name]){const r=l[t];r instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw rg(`property ${JSON.stringify(e.name)}`,r)}}):l[e.name]=r}}));for(let e=0;e<l.length;e++){const t=l[e];t instanceof Error&&Object.defineProperty(l,e,{enumerable:!0,get:()=>{throw rg(`index ${e}`,t)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Km({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:Q.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Qm({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=Da(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new $m({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}function og(e,t,...r){return vl(this,void 0,void 0,(function*(){const n=[];for(const e of r)for(const t of e)t.callData&&n.push(t.callData);const o=yield function(e,t,r){return vl(this,void 0,void 0,(function*(){const n=yield ig(e,t,r),o=new Map;for(const{req:e,resp:t}of n)o.set(e,t);return e.map((e=>({req:e,resp:o.get(e)})))}))}(n,e,t),i=new Map;for(const{req:e,resp:t}of o)i.set(e,null==t?void 0:t.result);return r.map((e=>e.filter((e=>!e.callData||i.get(e.callData))).map(((e,t)=>e.processor(e.callData?i.get(e.callData):null,t)))))}))}function ig(e,t,r){return vl(this,void 0,void 0,(function*(){let n=[e];e.length>800&&(n=c(e,800));let o=[];const i=n.map((e=>vl(this,void 0,void 0,(function*(){const n=e.map((e=>[e.to,e.data])),i={data:t.interface.encodeFunctionData("aggregate",[n]),to:r};let s;try{s=yield t.provider.call(i)}catch(n){const i=e.length;if(i>20){const n=Math.floor(i/2),[s,a]=yield Promise.all([ig(e.slice(0,n),t,r),ig(e.slice(n,i),t,r)]);o=[...o,...s,...a]}else{const e="[sendCallReqs] error";console.error(e,n)}}if(void 0===s)throw new Error("Unexpected batch result");const[a,l]=Jm.decode(["uint256","bytes[]"],s);if(e.length!==l.length)throw new Error("Unexpected length mismatch");return l.map(((t,r)=>({resp:{result:t},req:e[r]})))}))));return(yield Promise.allSettled(i)).filter((e=>"fulfilled"===e.status)).forEach((({value:e})=>{o=[...o,...e]})),o}))}const sg=new Map;function ag(e,t){if(sg.has(e))return sg.get(e);const r=new pf(e,t);return sg.set(e,r),r}function lg(e,t,r,n){if(!ml(e)||e===ql)throw Error(`Invalid 'address' parameter '${e}'.`);return new ke(e,t,function(e,t){return t?function(e,t){return e.getSigner(t).connectUnchecked()}(e,t):e}(r,n))}function cg(e){const{provider:t,account:r,chainId:n}=oe(),[o,i]=m(!1),s=E((()=>om[null!=e?e:n]),[n,e]),a=$(em).jsonRpcUrlMap,l=v(((o,i)=>{if(e&&e!==n){const t=Object.assign(Object.assign({},cl),a)[e],r=ag(null==t?void 0:t[0],e);return new ke(o,i,r)}if(t)return lg(o,i,t,r)}),[t,r,e,a]),c=v((e=>{if(!s)return;const{MULTI_CALL:t}=s;if(!t)return;const r=l(t,nm);return(()=>vl(this,void 0,void 0,(function*(){if(r){i(!0);try{const[n]=yield og(r,t,e);return n}catch(e){console.error("Contract: useMultiContract is error",e)}i(!1)}})))()}),[s,l]);return{getContract:l,contractConfig:s,call:c,loading:o}}var dg=[{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"isERC20",outputs:[{internalType:"bool",name:"isOk",type:"bool"},{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"decimals",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"allownance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"judgeERC20",outputs:[{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"decimals",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"allownance",type:"uint256"}],stateMutability:"view",type:"function"}];const ug=new o(2).pow(256).minus(1);function pg({tokenList:e,blockNumber:t,chainId:r,skip:n}){var i;const{account:s}=oe(),a=Uf(),l=ee(),[c,d]=E((()=>{const t=[],r=[];return null==e||e.forEach((e=>vl(this,void 0,void 0,(function*(){e.chainId===ll.TON?gl(e.address)||r.push(e):t.push(e)})))),[t.map((e=>e.address.toLocaleLowerCase())),r]}),[e]),{getContract:u,contractConfig:p,call:h}=cg(r),[f,g]=m(),b=E((()=>{if(!s||!c.length||!p)return;const{DODO_APPROVE:e,ERC20_HELPER:t}=p,r=u(t,dg);if(!r)return;return c.map((n=>({callData:{data:r.interface.encodeFunctionData("isERC20",[n,s,e]),to:t},processor:e=>{const t=new ng(dg).decodeFunctionResult("isERC20",e),{balance:r,isOk:i}=t,s=parseInt(t.decimals),a=new o(10).pow(s),l=new o(t.allownance.toString()).div(a);return i?{address:n,decimals:s,symbol:t.symbol,name:t.name,balance:new o(r.toString()).div(a),allowance:l}:{address:n,balance:new o(0),allowance:new o(0)}}})))}),[s,u,JSON.stringify(c)]);return y((()=>{(()=>{vl(this,void 0,void 0,(function*(){if(!b||n)return;let e={};c.forEach((t=>{e[t]=!0})),l(Al(e));const t=yield h(b),r={};t&&(t.forEach((e=>{gl(e.address)||(r[e.address.toLocaleLowerCase()]={tokenBalances:e.balance,tokenAllowances:e.allowance})})),l(El(r))),g(t),c.forEach((t=>{e[t]=!1})),l(Al(e))}))})()}),[b,t,n]),y((()=>{var e;const t=()=>vl(this,void 0,void 0,(function*(){if(n)return;let e={};const{getTokenBalance:t}=Uf.getState(),r={},o=[],i=null==d?void 0:d.map((n=>vl(this,void 0,void 0,(function*(){const i=n.address.toLocaleLowerCase();e[i]=!0;const s=yield t(n.address,n.decimals);return o.push({address:i,decimals:n.decimals,symbol:n.symbol,name:n.name,balance:s,allowance:ug}),r[i]={tokenBalances:s,tokenAllowances:ug},Promise.resolve(!0)}))));i&&(l(Al(e)),yield Promise.all(i),d.forEach((t=>{const r=t.address.toLocaleLowerCase();e[r]=!1})),l(Al(e)),l(El(r)),g(o))}));d.length&&(null===(e=a.connected)||void 0===e?void 0:e.account)&&t()}),[JSON.stringify(d),t,n,null===(i=a.connected)||void 0===i?void 0:i.account]),{data:f}}function hg(e){const{getBalance:t,account:r,chainId:n,evmAccount:i}=Vf(),s=ee(),a=$(Bf),l=$(em).jsonRpcUrlMap;y((()=>{(()=>{vl(this,void 0,void 0,(function*(){if(t&&r)if(e&&e!==n){if(e!==ll.TON&&i){const t=Object.assign(Object.assign({},cl),l)[e],r=ag(null==t?void 0:t[0],e),n=yield r.getBalance(i);n&&s(wl(e,new o(n.toString()).div(1e18)))}}else{const e=yield t(r);e&&s(wl(null!=n?n:1,e))}}))})()}),[t,r,s,a,e,i])}const fg=e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_FROM_TOKEN_CHAIN_ID",payload:e})})),mg=e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_TO_TOKEN_CHAIN_ID",payload:e})}));function gg(){const{getLastBlockNumber:e,chainId:t}=Vf(),r=ee(),n=v((()=>vl(this,void 0,void 0,(function*(){if(!e||!t)return;const n=yield e();r((e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_BLOCK_NUMBER",payload:e})})))(null!=n?n:0))}))),[e,t]);return{updateBlockNumber:n}}var yg,bg=[{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];function vg(e,t,r,n=0){if(r&&(e=e.toLocaleLowerCase(),t=t.toLocaleLowerCase()),e===t)return yg.fully+n;const o=e.indexOf(t);return 0===o?yg.prefix+n:o>0?yg.other+n:yg.none}!function(e){e[e.fully=1]="fully",e[e.prefix=2]="prefix",e[e.other=3]="other",e[e.none=0]="none"}(yg||(yg={}));function xg({value:e,onChange:t,occupiedAddrs:r,occupiedChainId:n,hiddenAddrs:i,showAddrs:s,side:a,chainId:l,visible:c,defaultLoadBalance:d}){const[u,p]=m(""),h=$(Yf),f=Zf(),g=E((()=>null!=l?l:f),[l,f]),y=$f(),b=E((()=>{const e=h.filter((e=>e.chainId===g));return e}),[h,g]),x=$((e=>((e,t)=>(null!=t?t:_f.getState()).token.popularTokenList.filter((({chainId:t})=>e===t)))(g,e))),w=E((()=>(null==Hf?void 0:Hf.filter((e=>e.chainId===g)))||[]),[Hf,g]),A=E((()=>new Set(i?i.map((e=>e.toLowerCase())):void 0)),[i]),C=E((()=>s?new Set(s.map((e=>e.toLowerCase()))):void 0),[s]),k=v((e=>e.filter((e=>{if(e.chainId!==g)return!1;let t=!0;return t=C?C.has(e.address.toLowerCase()):!A.has(e.address.toLowerCase()),t&&a&&(t=!e.side||e.side===a),t}))),[C,g,A]),T=E((()=>k(x)),[x,k]),R=v((t=>{if(null===t)return null;const n=[];u?t.forEach((e=>{const t=((e,t,{matchAddress:r}={})=>{if(!t)return 0;const n=t.toLocaleLowerCase();let o=0;r&&e.address.toLocaleLowerCase()===n&&(o=1),o||(o=vg(e.symbol.toLocaleLowerCase(),n,!1,1));if(o)e.name.toLocaleLowerCase()===n&&(o=yg.fully+1);else{let t=vg(e.name.toLocaleLowerCase(),n,!1,10);t=t===yg.fully+10?yg.fully+1:t,o=t}return o})(e,u,{matchAddress:!0});t&&n.push({sort:t,token:e})})):t.forEach((e=>{n.push({sort:0,token:e})}));const i=[];return n.sort(((t,n)=>{const i=t.token,s=n.token;if(e){if(i.address===e.address)return-1;if(s.address===e.address)return 1}if(null==r?void 0:r.includes(i.address))return-1;if(null==r?void 0:r.includes(s.address))return 1;const a=y&&y(i)||new o(0),l=y&&y(s)||new o(0),c=T.map((e=>e.address));if(null==c?void 0:c.includes(i.address))return-1;if(null==c?void 0:c.includes(s.address))return 1;if(!a.eq(l))return a.gt(l)?-1:1;if(t.sort!==n.sort)return t.sort>n.sort?1:-1;const d=w.map((e=>e.address));return(null==d?void 0:d.includes(i.address))?-1:(null==d?void 0:d.includes(s.address))?1:i.symbol.localeCompare(s.symbol)})).some((e=>!!(u&&i.length>21)||(i.push(e.token),!1))),i}),[u,y,r,e,T,w]),S=v((e=>{const o=e.address.toLowerCase();t(e,!!(null==r?void 0:r.some((t=>t.toLowerCase()===o&&(!n||e.chainId===n)))))}),[t,r,n]),N=E((()=>{const e=k(b),t=new Set;return e.forEach((e=>{t.add(e.address)})),T.forEach((r=>{t.has(r.address)||e.push(r)})),R(e)||[]}),[b,k,R,T]);return function({chainId:e,value:t,tokenList:r,popularTokenList:n,visible:o,defaultLoadBalance:i}){const s=$(tm),a=$(Bf),l=E((()=>{if(void 0===s||s)return[];const t=new Set,o=[];return r.forEach((r=>{r.chainId===e&&(t.add(r.address),o.push(r))})),null==n||n.forEach((r=>{r.chainId!==e||t.has(r.address)||(t.add(r.address),o.push(r))})),o}),[r,n,e,s]),[c,d]=E((()=>t?[[t],t.chainId]:[]),[t]);pg({tokenList:l,chainId:e,skip:!1===o&&!i}),hg(e),pg({tokenList:c,chainId:d,blockNumber:a})}({chainId:g,tokenList:N,popularTokenList:T,value:e,visible:c,defaultLoadBalance:d}),{filter:u,setFilter:p,showTokenList:N,onSelectToken:S,popularTokenList:T}}var wg,Eg;function Ag(){return Ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ag.apply(this,arguments)}var Cg,kg,Tg,Rg,Sg,Ng=function(e){return u.createElement("svg",Ag({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),wg||(wg=u.createElement("g",{clipPath:"url(#clip0_5431_179637)"},u.createElement("path",{d:"M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",fill:"#F2F4F7"}),u.createElement("path",{d:"M12.3735 3V9.6525L17.9963 12.165L12.3735 3Z",fill:"#343434"}),u.createElement("path",{d:"M12.3735 3L6.75 12.165L12.3735 9.6525V3Z",fill:"#8C8C8C"}),u.createElement("path",{d:"M12.3735 16.4759V20.9962L18 13.2119L12.3735 16.4759Z",fill:"#3C3C3B"}),u.createElement("path",{d:"M12.3735 20.9962V16.4752L6.75 13.2119L12.3735 20.9962Z",fill:"#8C8C8C"}),u.createElement("path",{d:"M12.3735 15.4298L17.9963 12.1651L12.3735 9.65405V15.4298Z",fill:"#141414"}),u.createElement("path",{d:"M6.75 12.1651L12.3735 15.4298V9.65405L6.75 12.1651Z",fill:"#393939"}))),Eg||(Eg=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_5431_179637"},u.createElement("rect",{width:24,height:24,fill:"white"})))))};function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mg.apply(this,arguments)}var Og,Ig;function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fg.apply(this,arguments)}var jg,Lg,_g;function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wg.apply(this,arguments)}var Pg,Dg;function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bg.apply(this,arguments)}var Ug,Vg;function Zg(){return Zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zg.apply(this,arguments)}var Hg;function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zg.apply(this,arguments)}var Yg,Gg;function Xg(){return Xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xg.apply(this,arguments)}var Jg;function qg(){return qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qg.apply(this,arguments)}var Qg,Kg;function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$g.apply(this,arguments)}var ey,ty,ry;function ny(){return ny=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ny.apply(this,arguments)}var oy,iy,sy,ay,ly;function cy(){return cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cy.apply(this,arguments)}var dy,uy,py=function(e){return u.createElement("svg",cy({width:24,height:24,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),oy||(oy=u.createElement("path",{d:"m22.289 16.217.002-13.915C22.27 1.137 21.348.2 20.18.2H5.657A5.758 5.758 0 0 0 0 5.96c0 1.063.284 1.969.721 2.763.365.662.944 1.286 1.518 1.756.157.128.083.08.576.383.68.417 1.46.624 1.46.624l-.006 8.322c.016.393.06.771.158 1.123a3.721 3.721 0 0 0 2.243 2.51 4.29 4.29 0 0 0 1.541.31l11.6.043A4.192 4.192 0 0 0 24 19.599a4.191 4.191 0 0 0-1.709-3.38l-.002-.002z",fill:"#FFEEDA"})),iy||(iy=u.createElement("path",{d:"M22.57 19.688a2.764 2.764 0 0 1-2.761 2.675l-7.985-.031a4.165 4.165 0 0 0 1.022-2.736c0-1.639-.977-2.766-.977-2.766h7.94a2.764 2.764 0 0 1 2.762 2.767v.09h-.001z",fill:"#EBC28E"})),sy||(sy=u.createElement("path",{d:"M2.992 9.295C2.076 8.427 1.426 7.3 1.426 5.959l.002-.142c.074-2.28 1.951-4.114 4.228-4.186h14.523c.38.012.686.286.686.671v12.285c.336.061.496.102.818.22.252.09.61.293.61.293V2.302C22.27 1.137 21.349.2 20.18.2H5.657A5.758 5.758 0 0 0 0 5.96c0 1.828.832 3.386 2.198 4.484.091.073.181.168.426.167.428 0 .728-.337.71-.71-.015-.306-.144-.42-.342-.607z",fill:"#190602"})),ay||(ay=u.createElement("path",{d:"M19.809 15.403H8.417a1.396 1.396 0 0 0-1.383 1.395v1.633c.021.757.666 1.406 1.428 1.406h.847V18.43h-.847v-1.599h.461c1.438 0 2.496 1.339 2.496 2.767 0 1.264-1.152 2.887-3.086 2.756-1.718-.115-2.64-1.64-2.639-2.756V5.714c0-.628-.509-1.137-1.136-1.137H3.422v1.417h.845v13.603c-.043 2.766 1.97 4.16 4.067 4.16l11.474.034a4.192 4.192 0 0 0 4.189-4.195 4.192 4.192 0 0 0-4.19-4.195l.002.002zm2.76 4.286a2.764 2.764 0 0 1-2.76 2.675l-7.985-.03a4.165 4.165 0 0 0 1.022-2.736c0-1.64-.977-2.767-.977-2.767h7.94a2.764 2.764 0 0 1 2.762 2.767v.091h-.001zM16.743 4.833H8.157V6.25h8.587a.709.709 0 0 0 0-1.417z",fill:"#190602"})),ly||(ly=u.createElement("path",{d:"M16.743 11.52H8.157v1.416h8.587a.709.709 0 0 0 0-1.416zM18.255 8.177H8.157v1.417h10.098a.709.709 0 0 0 0-1.417z",fill:"#190602"})))};function hy(){return hy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hy.apply(this,arguments)}var fy,my,gy=function(e){return u.createElement("svg",hy({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),dy||(dy=u.createElement("g",{clipPath:"url(#a)"},u.createElement("rect",{width:24,height:24,rx:12,fill:"#fff"}),u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.58 20.606A10.72 10.72 0 0 1 1.262 12C1.263 6.07 6.07 1.263 12 1.263c4.894 0 10.238 2.925 11.53 7.404C22.087 3.662 17.473 0 12 0 5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12v-.632h-.747a21.577 21.577 0 0 1-1.449-.075c-.9-.08-1.927-.232-2.626-.512-1.125-.449-1.76-1.045-2.486-1.742L16.65 9c-.727-.699-1.544-1.483-2.96-2.15-1.395-.656-2.937-.55-4.07-.317a10.319 10.319 0 0 0-1.832.562c-.57.24-1.124.524-1.684.788a73.87 73.87 0 0 0 1.732.499 6.356 6.356 0 0 1 1.375.657c.586.376 1.072.85 1.27 1.432-1.243.163-2.41.71-3.281 1.223a13.438 13.438 0 0 0-1.639 1.139c-.07.058-1.194 1.048-1.194 1.048s1.449.154 2.164.298c.475.096 1.117.25 1.785.483.672.235 1.35.542 1.914.935.564.394.978.85 1.182 1.371.594 1.518.011 2.997-1.16 3.83-1.156.821-2.914 1.017-4.673-.19zm4.094 1.878c.468-.152.91-.374 1.31-.658 1.593-1.132 2.431-3.206 1.604-5.32-.325-.83-.945-1.464-1.635-1.946-.69-.482-1.485-.835-2.22-1.091-.484-.169-.951-.3-1.36-.398.153-.1.309-.197.467-.29.972-.572 2.196-1.097 3.37-1.097 1.77 0 3.088.543 4.347 1.126l.344.16c1.125.528 2.306 1.083 3.678 1.083 1.33 0 2.367-.377 3.081-.766-.636 5.323-5.166 9.45-10.66 9.45-.799 0-1.577-.087-2.326-.253zm11.622-9.973a5.289 5.289 0 0 1-1.717.279c-1.076 0-2.001-.432-3.175-.98l-.317-.146c-1.175-.545-2.535-1.122-4.306-1.226-.237-1.172-1.126-1.973-1.887-2.463a6.731 6.731 0 0 0-.253-.155c.076-.017.154-.035.233-.051 1.023-.21 2.244-.263 3.278.223 1.227.578 1.92 1.243 2.64 1.935l.025.023c.74.712 1.525 1.458 2.892 2.004.76.304 1.743.467 2.587.557z",fill:"url(#b)"}))),uy||(uy=u.createElement("defs",null,u.createElement("linearGradient",{id:"b",x1:0,y1:24,x2:24.43,y2:23.554,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29CCB9"}),u.createElement("stop",{offset:.495,stopColor:"#0091FF"}),u.createElement("stop",{offset:1,stopColor:"#FF66B7"})),u.createElement("clipPath",{id:"a"},u.createElement("rect",{width:24,height:24,rx:12,fill:"#fff"})))))};function yy(){return yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yy.apply(this,arguments)}var by,vy,xy;function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wy.apply(this,arguments)}const Ey=new Map([[ll.MAINNET,{chainId:ll.MAINNET,logo:Ng,name:"Ethereum"}],[ll.GOERLI,{chainId:ll.GOERLI,logo:Ng,name:"Goerli",mainnet:ll.MAINNET}],[ll.ARBITRUM_ONE,{chainId:ll.ARBITRUM_ONE,logo:function(e){return u.createElement("svg",Mg({height:"692pt",viewBox:"0 0 619 692",width:"619pt",xmlns:"http://www.w3.org/2000/svg"},e),Cg||(Cg=u.createElement("path",{d:"m280.46 17.3c18.85-10.03 43.1-9.37 61.23 1.99 78.77 45.29 157.52 90.59 236.28 135.88 17.98 10.27 30.16 30.12 30.76 50.87v275.89c.49 19.03-8.56 38.11-23.76 49.6-83.95 48.66-167.91 97.29-251.9 145.88-14.93 5.88-32.32 5.81-47.05-.66-10.1-5.39-19.93-11.25-29.88-16.91-25.72-14.85-51.49-29.62-77.2-44.49 7.13-11.82 13.88-23.88 21.17-35.61 34.11 19.55 68.15 39.21 102.24 58.77 5.43 2.44 12.28 2.51 17.36-.81 28.11-16.31 56.23-32.61 84.36-48.89 28.58-16.52 57.15-33.07 85.69-49.67 7.92-4.6 15.84-9.2 23.78-13.77 14.97-8.59 29.86-17.33 44.83-25.93 5.77-3.22 8.74-10.05 8.75-16.47-.04-14.36.09-28.73-.07-43.09.18-76.95.01-153.9.09-230.85.24-7.26-3.78-14.44-10.07-18.06-79.37-45.64-158.72-91.3-238.08-136.94-6.26-3.47-14.38-3.15-20.42.66-78.73 45.56-157.48 91.1-236.15 136.78-6.59 3.53-10.68 11.06-10.31 18.5.21 73.45.1 146.9.48 220.34-12.68 20.02-25.84 39.75-38.67 59.68-.95 1.49-1.95 2.96-3.1 4.31-.23-95.74-.02-191.5-.1-287.25.31-22.52 14.44-43.97 34.72-53.61 78.35-45.36 156.61-90.87 235.02-136.14z",fill:"#8cbfdf"})),kg||(kg=u.createElement("path",{d:"m298.57 54.69c6.04-3.81 14.16-4.13 20.42-.66 79.36 45.64 158.71 91.3 238.08 136.94 6.29 3.62 10.31 10.8 10.07 18.06-.08 76.95.09 153.9-.09 230.85-6.25-8.84-11.77-18.21-17.74-27.25-38.11-59.38-76.26-118.73-114.34-178.12l-.71.13c-16.14 27.89-32.81 55.48-48.94 83.38 42.77 69.1 85.49 138.23 128.22 207.35-7.94 4.57-15.86 9.17-23.78 13.77-40.35-63.61-80.71-127.22-121.07-190.83l-.73-.41c-19.01 31.61-37.43 63.61-56.36 95.28 4.29 7.87 9.61 15.25 14.3 22.94 26.05 40.9 52.13 81.79 78.17 122.69-28.13 16.28-56.25 32.58-84.36 48.89-5.08 3.32-11.93 3.25-17.36.81-34.09-19.56-68.13-39.22-102.24-58.77 73.38-124.27 146.6-248.63 219.92-372.94l-.41-.3c-25.22.18-50.45.2-75.67.29-7.21.39-14.55-.37-21.69.39-73.43 121.29-146.88 242.57-220.46 363.77-8.47-4.83-16.92-9.69-25.34-14.61 19.61-32.21 39.88-64.05 59.74-96.12 51.98-83.37 103.96-166.73 155.94-250.1.66-1.19 1.78-2.22 1.79-3.66-13.31-.19-26.61-.72-39.92-.97-20.59.3-41.98 3.68-59.65 14.9-6.98 4.5-13.13 10.36-17.61 17.37-41.35 64.21-82.86 128.31-124.16 192.55-.38-73.44-.27-146.89-.48-220.34-.37-7.44 3.72-14.97 10.31-18.5 78.67-45.68 157.42-91.22 236.15-136.78z",fill:"#2b374d"})),Tg||(Tg=u.createElement("path",{d:"m194.36 220.39c17.67-11.22 39.06-14.6 59.65-14.9 13.31.25 26.61.78 39.92.97-.01 1.44-1.13 2.47-1.79 3.66-51.98 83.37-103.96 166.73-155.94 250.1-19.86 32.07-40.13 63.91-59.74 96.12-13.05-7.52-26.09-15.05-39.14-22.57-9.44-4.83-16.23-13.58-21.12-22.76-2.5-5.29-4.79-10.85-5.38-16.71 1.15-1.35 2.15-2.82 3.1-4.31 12.83-19.93 25.99-39.66 38.67-59.68 41.3-64.24 82.81-128.34 124.16-192.55 4.48-7.01 10.63-12.87 17.61-17.37z",fill:"#fff"})),Rg||(Rg=u.createElement("path",{d:"m343.95 206.79c25.22-.09 50.45-.11 75.67-.29l.41.3c-73.32 124.31-146.54 248.67-219.92 372.94-7.29 11.73-14.04 23.79-21.17 35.61-25.73-14.78-51.42-29.61-77.14-44.4 73.58-121.2 147.03-242.48 220.46-363.77 7.14-.76 14.48 0 21.69-.39z",fill:"#fff"})),Sg||(Sg=u.createElement("g",{fill:"#00a2f7"},u.createElement("path",{d:"m434.26 234.64.71-.13c38.08 59.39 76.23 118.74 114.34 178.12 5.97 9.04 11.49 18.41 17.74 27.25.16 14.36.03 28.73.07 43.09-.01 6.42-2.98 13.25-8.75 16.47-14.97 8.6-29.86 17.34-44.83 25.93-42.73-69.12-85.45-138.25-128.22-207.35 16.13-27.9 32.8-55.49 48.94-83.38z"}),u.createElement("path",{d:"m311.6 443.18c18.93-31.67 37.35-63.67 56.36-95.28l.73.41c40.36 63.61 80.72 127.22 121.07 190.83-28.54 16.6-57.11 33.15-85.69 49.67-26.04-40.9-52.12-81.79-78.17-122.69-4.69-7.69-10.01-15.07-14.3-22.94z"}))))},name:"Arbitrum"}],[ll.POLYGON,{chainId:ll.POLYGON,logo:function(e){return u.createElement("svg",Fg({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Og||(Og=u.createElement("defs",null,u.createElement("circle",{id:"path-1",cx:12,cy:12,r:12}))),Ig||(Ig=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{transform:"translate(-223.000000, -266.000000)"},u.createElement("g",{transform:"translate(18.000000, 132.000000)"},u.createElement("g",{transform:"translate(20.000000, 41.000000)"},u.createElement("g",{transform:"translate(156.000000, 82.000000)"},u.createElement("g",{transform:"translate(29.000000, 11.000000)"},u.createElement("mask",{id:"mask-2",fill:"white"},u.createElement("use",{xlinkHref:"#path-1"})),u.createElement("g",null),u.createElement("g",{mask:"url(#mask-2)"},u.createElement("circle",{fill:"#8247E5",fillRule:"nonzero",cx:12,cy:12,r:12}),u.createElement("path",{d:"M8.01148,5.30068 C8.25312,5.16644 8.54688,5.16644 8.78852,5.30068 L12.38852,7.30068 C12.64248,7.44176 12.8,7.70948 12.8,8 L12.8,9.30068 L11.2,10.2 L11.2,8.47072 L8.4,6.91516 L5.6,8.47072 L5.6,11.52928 L8.4,13.08484 L15.21148,9.30068 C15.45312,9.16644 15.74688,9.16644 15.98852,9.30068 L19.58852,11.30068 C19.84248,11.44176 20,11.70948 20,12 L20,16 C20,16.29052 19.84248,16.55824 19.58852,16.69932 L15.98852,18.69932 C15.74688,18.83356 15.45312,18.83356 15.21148,18.69932 L11.61148,16.69932 C11.35752,16.55824 11.2,16.29052 11.2,16 L11.2,14.69932 L12.8,13.8 L12.8,15.52928 L15.6,17.08484 L18.4,15.52928 L18.4,12.47072 L15.6,10.91516 L8.78852,14.69932 C8.54688,14.83356 8.25312,14.83356 8.01148,14.69932 L4.41148,12.69932 C4.15752,12.55824 4,12.29052 4,12 L4,8 C4,7.70948 4.15752,7.44176 4.41148,7.30068 L8.01148,5.30068 Z",fill:"#FFFFFF"}))))))))))},name:"Polygon"}],[ll.BSC,{chainId:ll.BSC,logo:function(e){return u.createElement("svg",Wg({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"7.5in",height:"7.5in",style:{shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"optimizeQuality",fillRule:"evenodd",clipRule:"evenodd"},viewBox:"0 0 7500 7500"},e),jg||(jg=u.createElement("defs",null,u.createElement("style",{type:"text/css"},".fil0 {fill:none}\n .fil1 {fill:#f0b90b}\n .fil2 {fill:#fff}"))),Lg||(Lg=u.createElement("g",{id:"Layer_x0020_1"},u.createElement("metadata",{id:"CorelCorpID_0Corel-Layer"}),u.createElement("rect",{className:"fil0",width:7500,height:7500}),u.createElement("g",{id:"_2419820813232"},u.createElement("circle",{className:"fil1",cx:3750,cy:3750,r:3500}),u.createElement("g",null,u.createElement("path",{className:"fil2",d:"M2779 3351l971 -971 971 972 565 -565 -1536 -1537 -1536 1536 565 565 0 0zm-1529 399l565 -565 565 565 -565 565 -565 -565zm1529 399l971 971 971 -972 566 565 0 0 -1537 1537 -1536 -1536 -1 -1 566 -564 0 0zm2341 -399l565 -565 565 565 -565 565 -565 -565z"})),u.createElement("g",null,u.createElement("path",{className:"fil2",d:"M4380 3750l0 0 -630 -632 -466 467 0 0 -54 54 -111 111 -1 1 1 1 630 630 631 -631 0 0 0 0 0 -1zm0 0l0 0 0 0z"}))))),_g||(_g=u.createElement("style",{xmlns:""},"#yddContainer{display:block;font-family:Microsoft YaHei;position:relative;width:100%;height:100%;top:-4px;left:-4px;font-size:12px;border:1px solid}#yddTop{display:block;height:22px}#yddTopBorderlr{display:block;position:static;height:17px;padding:2px 28px;line-height:17px;font-size:12px;color:#5079bb;font-weight:bold;border-style:none solid;border-width:1px}#yddTopBorderlr .ydd-sp{position:absolute;top:2px;height:0;overflow:hidden}.ydd-icon{left:5px;width:17px;padding:0px 0px 0px 0px;padding-top:17px;background-position:-16px -44px}.ydd-close{right:5px;width:16px;padding-top:16px;background-position:left -44px}#yddKeyTitle{float:left;text-decoration:none}#yddMiddle{display:block;margin-bottom:10px}.ydd-tabs{display:block;margin:5px 0;padding:0 5px;height:18px;border-bottom:1px solid}.ydd-tab{display:block;float:left;height:18px;margin:0 5px -1px 0;padding:0 4px;line-height:18px;border:1px solid;border-bottom:none}.ydd-trans-container{display:block;line-height:160%}.ydd-trans-container a{text-decoration:none;}#yddBottom{position:absolute;bottom:0;left:0;width:100%;height:22px;line-height:22px;overflow:hidden;background-position:left -22px}.ydd-padding010{padding:0 10px}#yddWrapper{color:#252525;z-index:10001;background:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ab20.png);}#yddContainer{background:#fff;border-color:#4b7598}#yddTopBorderlr{border-color:#f0f8fc}#yddWrapper .ydd-sp{background-image:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ydd-sprite.png)}#yddWrapper a,#yddWrapper a:hover,#yddWrapper a:visited{color:#50799b}#yddWrapper .ydd-tabs{color:#959595}.ydd-tabs,.ydd-tab{background:#fff;border-color:#d5e7f3}#yddBottom{color:#363636}#yddWrapper{min-width:250px;max-width:400px;}")))},name:"BNBChain"}],[ll.OPTIMISM,{chainId:ll.OPTIMISM,logo:function(e){return u.createElement("svg",Bg({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Pg||(Pg=u.createElement("defs",null,u.createElement("circle",{id:"path-1",cx:12,cy:12,r:12}))),Dg||(Dg=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{transform:"translate(-223.000000, -266.000000)"},u.createElement("g",{transform:"translate(18.000000, 132.000000)"},u.createElement("g",{transform:"translate(20.000000, 41.000000)"},u.createElement("g",{transform:"translate(156.000000, 82.000000)"},u.createElement("g",{transform:"translate(29.000000, 11.000000)"},u.createElement("mask",{id:"mask-2",fill:"white"},u.createElement("use",{xlinkHref:"#path-1"})),u.createElement("g",null),u.createElement("g",{id:"optimism.caeb9392",mask:"url(#mask-2)",fillRule:"nonzero"},u.createElement("circle",{fill:"#FF0420",cx:12,cy:12,r:12}),u.createElement("path",{d:"M7.85495544,16 C7.01608475,16 6.32880363,15.7925669 5.7930557,15.37776 C5.2643519,14.9555511 5,14.3555763 5,13.5777763 C5,13.4148143 5.01763849,13.2147832 5.05285911,12.9777422 C5.14454543,12.4444444 5.27494626,11.8036699 5.44411795,11.0555371 C5.92345653,9.01851235 7.16063019,8 9.15558257,8 C9.69837462,8 10.1847573,8.09628495 10.614787,8.28885484 C11.0448167,8.47402275 11.3831601,8.75553483 11.6298735,9.13333185 C11.8765869,9.50366768 12,9.94814173 12,10.4666356 C12,10.6221956 11.9823615,10.8184961 11.9470845,11.0555371 C11.8413663,11.7147869 11.7144594,12.3555615 11.5664201,12.9777422 C11.3197066,13.9925832 10.8932272,14.7518486 10.2869817,15.2555385 C9.68073613,15.7518264 8.8700983,16 7.85495544,16 Z M8.00299476,14.3999882 C8.39780384,14.3999882 8.73259699,14.2777667 9.00754325,14.0333237 C9.28953364,13.7888807 9.49043207,13.4148143 9.61023853,12.9111244 C9.7723661,12.2148054 9.89577916,11.6073694 9.98036501,11.0888756 C10.0085415,10.9333156 10.0226298,10.7740842 10.0226298,10.611063 C10.0226298,9.93700916 9.68778026,9.59995263 9.01813761,9.59995263 C8.62332853,9.59995263 8.28498515,9.72217411 8.00299476,9.96661707 C7.72810485,10.2111193 7.53070031,10.5851857 7.41089384,11.0888756 C7.28398689,11.5851635 7.15707995,12.1925995 7.03022936,12.9111244 C7.00199651,13.0592232 6.98790826,13.2147832 6.98790826,13.3777452 C6.98790826,14.0592602 7.32630799,14.3999882 8.00299476,14.3999882 Z",fill:"#FFFFFF"}),u.createElement("path",{d:"M12.2418282,16 C12.1556269,16 12.0889713,15.9733226 12.0419867,15.9199677 C12.0027701,15.8589994 11.9910553,15.7904787 12.0067168,15.7142835 L13.6288783,8.28571646 C13.6445399,8.20190792 13.6876405,8.13332623 13.7581802,8.07997137 C13.8287198,8.02667743 13.9031435,8 13.981514,8 L17.1083126,8 C17.9781556,8 18.675596,8.1752305 19.2006341,8.52569149 C19.7335656,8.87621339 20,9.38284087 20,10.0456958 C20,10.2361531 19.9765077,10.4342848 19.9294603,10.6399689 C19.7335656,11.5161823 19.3378293,12.1638104 18.7422516,12.5828531 C18.1545047,13.0018957 17.347308,13.2114171 16.3207242,13.2114171 L14.7338326,13.2114171 L14.1931329,15.7142835 C14.1774087,15.7980921 14.1343081,15.8666129 14.0638311,15.9199677 C13.9932915,15.9733226 13.9188051,16 13.8404973,16 L12.2418282,16 Z M16.4030414,11.6342817 C16.732122,11.6342817 17.0181647,11.546636 17.2611068,11.3714055 C17.5118797,11.196175 17.6764513,10.9447494 17.7548217,10.6171287 C17.7783141,10.4875787 17.7900916,10.3733165 17.7900916,10.2742811 C17.7900916,10.0533092 17.7234986,9.8856921 17.5902501,9.77142988 C17.4570016,9.64949333 17.2297837,9.58858596 16.9084712,9.58858596 L15.497866,9.58858596 L15.0511984,11.6342817 L16.4030414,11.6342817 Z",fill:"#FFFFFF"}))))))))))},name:"Optimism"}],[ll.AVALANCHE,{chainId:ll.AVALANCHE,logo:function(e){return u.createElement("svg",Zg({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Ug||(Ug=u.createElement("defs",null,u.createElement("circle",{id:"path-1",cx:12,cy:12,r:12}))),Vg||(Vg=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",null,u.createElement("mask",{fill:"white"},u.createElement("use",{xlinkHref:"#path-1"})),u.createElement("use",{fill:"#E84142",xlinkHref:"#path-1"}),u.createElement("g",{mask:"url(#mask-2)",fill:"#FFFFFF",fillRule:"nonzero"},u.createElement("g",{transform:"translate(5.000000, 5.000000)"},u.createElement("path",{d:"M3.51363108,13 L1.15960067,13 C0.664946832,13 0.420612287,13 0.271614013,12.9001615 C0.110719232,12.7911601 0.0123723422,12.6101909 0.000457589205,12.410743 C-0.00848303711,12.226815 0.113693358,12.0023407 0.358027903,11.5534302 L6.1704203,0.83471072 C6.41774722,0.379558003 6.54289774,0.1519721 6.70083664,0.0678061674 C6.87067205,-0.0226020558 7.07329583,-0.0226020558 7.24314949,0.0678061674 C7.40108839,0.1519721 7.52623891,0.379558003 7.77354758,0.83471072 L8.96845316,3.01699266 C9.23960959,3.51267254 9.37667486,3.76207783 9.43628512,4.0239486 C9.50182538,4.30763877 9.50182538,4.60692511 9.43628512,4.89061527 C9.37667486,5.15248605 9.24258371,5.40189134 8.97142729,5.89757122 L5.91831288,11.5440764 C5.64418233,12.0459985 5.50711706,12.2985154 5.31640802,12.4885903 C5.11079187,12.6943759 4.86348319,12.8440382 4.59230852,12.9282232 C4.34499985,13 4.06787693,13 3.51363108,13 Z"}),u.createElement("path",{d:"M12.8314423,13 L9.45829001,13 C8.96066205,13 8.710361,13 8.5643551,12.9003524 C8.40344207,12.7911601 8.30511343,12.6071366 8.29319868,12.4077078 C8.28425805,12.2237606 8.40940857,11.9993054 8.65970962,11.5472643 L10.3432113,8.52326579 C10.5906295,8.07746696 10.7157982,7.85612335 10.8707083,7.77193833 C11.0405802,7.6815301 11.2401933,7.6815301 11.4100652,7.77193833 C11.5680771,7.85612335 11.690144,8.07746696 11.9404816,8.52015419 L13.6300775,11.5441527 C13.8802326,11.9961938 14.0085032,12.220649 13.9995625,12.4045771 C13.9906219,12.6040822 13.8891732,12.7881057 13.7284244,12.8971072 C13.5793531,13 13.3290156,13 12.8314423,13 Z"})))))))},name:"Avalanche"}],[ll.AURORA,{chainId:ll.AURORA,logo:function(e){return u.createElement("svg",zg({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Hg||(Hg=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"aurora-avatar-grn",fillRule:"nonzero"},u.createElement("path",{d:"M12,0 L12,0 C18.625,0 24,5.375 24,12 L24,12 C24,18.625 18.625,24 12,24 L12,24 C5.375,24 0,18.625 0,12 L0,12 C0,5.375 5.375,0 12,0 Z",id:"\\u8DEF\\u5F84",fill:"#70D44B"}),u.createElement("path",{d:"M12,4.9 C12.6333333,4.9 13.2083333,5.25833333 13.4916667,5.825 L18.175,15.2 C18.5833333,16.025 18.25,17.025 17.425,17.4333333 C17.1916667,17.55 16.9416667,17.6083333 16.6833333,17.6083333 L7.31666667,17.6083333 C6.4,17.6083333 5.65,16.8583333 5.65,15.9416667 C5.65,15.6833333 5.70833333,15.425 5.825,15.2 L10.5083333,5.825 C10.7916667,5.25 11.3666667,4.89166667 12,4.9 M12,3.75 C10.9333333,3.75 9.95833333,4.35 9.48333333,5.30833333 L4.8,14.6833333 C4.10833333,16.075 4.66666667,17.7583333 6.05833333,18.4583333 C6.45,18.65 6.88333333,18.7583333 7.31666667,18.7583333 L16.6916667,18.7583333 C18.2416667,18.7583333 19.5083333,17.5 19.5083333,15.95 C19.5083333,15.5166667 19.4083333,15.0833333 19.2083333,14.6916667 L14.5166667,5.30833333 C14.0416667,4.35 13.0666667,3.75 12,3.75 Z",id:"\\u5F62\\u72B6",fill:"#FFFFFF"})))))},name:"Aurora"}],[ll.OKCHAIN,{chainId:ll.OKCHAIN,logo:function(e){return u.createElement("svg",Xg({width:72,height:72,viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Yg||(Yg=u.createElement("circle",{cx:36,cy:36,r:36,fill:"black"})),Gg||(Gg=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.2 18H18.8C18.3582 18 18 18.3582 18 18.8V29.2C18 29.6418 18.3582 30 18.8 30H29.2C29.6418 30 30 29.6418 30 29.2V18.8C30 18.3582 29.6418 18 29.2 18ZM41.2052 30H30.8052C30.3633 30 30.0051 30.3582 30.0051 30.8V41.2C30.0051 41.6418 30.3633 41.9999 30.8052 41.9999H41.2052C41.647 41.9999 42.0051 41.6418 42.0051 41.2V30.8C42.0051 30.3582 41.647 30 41.2052 30ZM42.8 18H53.2C53.6418 18 54 18.3582 54 18.8V29.2C54 29.6418 53.6418 30 53.2 30H42.8C42.3582 30 42 29.6418 42 29.2V18.8C42 18.3582 42.3582 18 42.8 18ZM29.2 42H18.8C18.3582 42 18 42.3582 18 42.8V53.2C18 53.6418 18.3582 54 18.8 54H29.2C29.6418 54 30 53.6418 30 53.2V42.8C30 42.3582 29.6418 42 29.2 42ZM42.8 42H53.2C53.6418 42 54 42.3582 54 42.8V53.2C54 53.6418 53.6418 54 53.2 54H42.8C42.3582 54 42 53.6418 42 53.2V42.8C42 42.3582 42.3582 42 42.8 42Z",fill:"white"})))},name:"OKTC"}],[ll.CONFLUX,{chainId:ll.CONFLUX,logo:function(e){return u.createElement("svg",qg({width:"199px",height:"245px",viewBox:"0 0 199 245",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Jg||(Jg=u.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Conflux_Logo_Mark_Color",transform:"translate(0.000000, -0.000000)",fillRule:"nonzero"},u.createElement("polygon",{id:"Path",fill:"#1A1A1A",points:"151.057838 145.949662 98.7961863 198.210803 69.7103803 169.125338 121.972032 116.863685 98.7291726 93.6209957 22.9712333 169.376384 98.5203077 244.923077 174.276376 169.167689"}),u.createElement("polygon",{id:"Path",fill:"#38A1DB",points:"197.693744 98.7101231 98.9858316 9.56888949e-05 0 98.9860017 0.31563441 145.252991 98.5658906 47.0051607 197.528761 145.971262"})))))},name:"Conflux eSpace"}],[ll.BASE,{chainId:ll.BASE,logo:function(e){return u.createElement("svg",$g({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Qg||(Qg=u.createElement("path",{d:"M16 32C19.1645 32 22.2579 31.0616 24.8891 29.3035C27.5203 27.5454 29.5711 25.0466 30.7821 22.1229C31.9931 19.1993 32.3099 15.9823 31.6926 12.8786C31.0752 9.77486 29.5513 6.92394 27.3137 4.6863C25.0761 2.44866 22.2251 0.924806 19.1214 0.307443C16.0177 -0.309921 12.8007 0.00693265 9.87706 1.21793C6.95345 2.42894 4.45459 4.4797 2.69649 7.11088C0.938384 9.74207 0 12.8355 0 16C0 20.2435 1.68571 24.3131 4.68629 27.3137C7.68687 30.3143 11.7565 32 16 32Z",fill:"#0052FF"})),Kg||(Kg=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9624 27.2676C22.1853 27.2676 27.23 22.223 27.23 16C27.23 9.7771 22.1853 4.73242 15.9624 4.73242C10.0588 4.73242 5.21562 9.27262 4.73409 15.0518H21.4544V16.9281H4.73242C5.20435 22.7169 10.0519 27.2676 15.9624 27.2676Z",fill:"white"})))},name:"Base"}],[ll.LINEA,{chainId:ll.LINEA,logo:function(e){return u.createElement("svg",ny({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ey||(ey=u.createElement("path",{d:"M0 12C0 18.6274 5.37258 24 12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12Z",fill:"#121212"})),ty||(ty=u.createElement("path",{d:"M15.5387 17.9973H6V7.94678H8.18247V16.0495H15.5387V17.9963V17.9973Z",fill:"white"})),ry||(ry=u.createElement("path",{d:"M15.5386 9.89355C16.6137 9.89355 17.4853 9.02195 17.4853 7.94678C17.4853 6.8716 16.6137 6 15.5386 6C14.4633 6 13.5918 6.8716 13.5918 7.94678C13.5918 9.02195 14.4633 9.89355 15.5386 9.89355Z",fill:"white"})))},name:"Linea"}],[ll.SCROLL,{chainId:ll.SCROLL,logo:py,name:"Scroll"}],[ll.MANTA,{chainId:ll.MANTA,logo:gy,name:"Manta"}],[ll.MANTLE,{chainId:ll.MANTLE,logo:function(e){return u.createElement("svg",yy({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),fy||(fy=u.createElement("g",{clipPath:"url(#a)"},u.createElement("path",{d:"M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12z",fill:"#000"}),u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.958 5.9.477-3.071A9.405 9.405 0 0 0 12 2.719h-.008v6.265H12c.264 0 .525.034.777.1l.81-3.052a6.247 6.247 0 0 0-.629-.132zM10.49 9.388 8.93 6.702a6.22 6.22 0 0 0-.535.348L6.533 4.499a9.34 9.34 0 0 1 1.24-.764L9.19 6.501c.287-.146.586-.27.892-.371l-.964-2.955a9.27 9.27 0 0 1 1.417-.341l.496 3.119c-.21.033-.418.08-.624.134l.807 3c-.253.067-.497.17-.724.301zM3.724 7.794 6.54 9.227a6.12 6.12 0 0 0-.366.887l-3.006-.972c.15-.461.337-.915.557-1.348zm13.572 1.133-2.685 1.56c.132.228.233.472.301.725l3-.808c.055.206.1.414.134.623l3.119-.496a9.215 9.215 0 0 0-.342-1.417l-2.954.965a6.14 6.14 0 0 0-.372-.892l2.765-1.42a9.269 9.269 0 0 0-.764-1.238l-2.55 1.863c.125.171.24.35.347.535zM16.2 3.722zm-1.348-.556c.462.149.915.335 1.348.556l-1.43 2.815a6.087 6.087 0 0 0-.888-.366l.97-3.006zm.227 3.481-1.577 2.737c.229.132.439.293.627.48l4.422-4.438a9.305 9.305 0 0 0-1.107-.944L15.62 6.997a6.054 6.054 0 0 0-.54-.35zm-5.694 3.849L6.65 8.917c.107-.185.224-.365.35-.54L4.485 6.554c.284-.392.602-.765.944-1.107L9.865 9.87a3.04 3.04 0 0 0-.48.626zm-3.352-.087 3.052.813c-.067.252-.101.513-.101.778H2.719a9.4 9.4 0 0 1 .111-1.44l3.071.479c.033-.212.077-.422.132-.63zm11.428 4.364 2.815 1.433a9.23 9.23 0 0 0 .557-1.348l-3.006-.972a6.135 6.135 0 0 1-.366.887zm-3.95-.161 1.559 2.686c.184-.107.363-.222.535-.347l1.862 2.55a9.334 9.334 0 0 1-1.24.764L14.81 17.5a6.215 6.215 0 0 1-.893.37l.965 2.955c-.461.15-.938.266-1.418.342l-.495-3.12c.21-.033.418-.08.624-.134l-.807-3a3.01 3.01 0 0 0 .724-.301zm-6.807.46 2.685-1.56a2.982 2.982 0 0 1-.301-.724l-3 .808a6.182 6.182 0 0 1-.134-.623l-3.12.496c.077.48.192.957.343 1.418l2.954-.966c.1.306.224.605.371.892l-2.765 1.42c.221.43.478.846.764 1.238l2.55-1.863a6.076 6.076 0 0 1-.347-.535zM7.8 20.279zm0 0c.434.22.887.407 1.349.556l.97-3.005a6.087 6.087 0 0 1-.888-.366L7.8 20.278zm1.121-2.925h.001zm0 0 1.578-2.737a3.036 3.036 0 0 1-.627-.48L5.45 18.575c.343.342.716.66 1.108.944l1.824-2.515c.174.126.354.242.54.35zm5.695-3.849 2.737 1.579a6.248 6.248 0 0 1-.351.54l2.514 1.825a9.353 9.353 0 0 1-.944 1.107l-4.436-4.425c.187-.187.349-.398.48-.626zm-3.392 1.412zm0 0-.81 3.052c.207.055.417.099.628.132l-.476 3.071c.471.073.954.11 1.434.11h.008v-6.265h-.008a3.03 3.03 0 0 1-.776-.1zm3.692-2.138c.067-.251.101-.513.101-.777h6.265c0 .482-.037.966-.111 1.44l-3.07-.48a6.072 6.072 0 0 1-.132.63l-3.053-.813z",fill:"#fff"}))),my||(my=u.createElement("defs",null,u.createElement("clipPath",{id:"a"},u.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))))},name:"Mantle"}],[ll.TON,{chainId:ll.TON,logo:function(e){return u.createElement("svg",wy({xmlns:"http://www.w3.org/2000/svg",width:56,height:56,viewBox:"0 0 56 56",fill:"none"},e),by||(by=u.createElement("path",{d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"#0098EA"})),vy||(vy=u.createElement("path",{d:"M37.5603 15.6277H18.4386C14.9228 15.6277 12.6944 19.4202 14.4632 22.4861L26.2644 42.9409C27.0345 44.2765 28.9644 44.2765 29.7345 42.9409L41.5381 22.4861C43.3045 19.4251 41.0761 15.6277 37.5627 15.6277H37.5603ZM26.2548 36.8068L23.6847 31.8327L17.4833 20.7414C17.0742 20.0315 17.5795 19.1218 18.4362 19.1218H26.2524V36.8092L26.2548 36.8068ZM38.5108 20.739L32.3118 31.8351L29.7417 36.8068V19.1194H37.5579C38.4146 19.1194 38.9199 20.0291 38.5108 20.739Z",fill:"white"})),xy||(xy=u.createElement("script",{xmlns:""})))},name:"Ton"}]]);function Ay({width:e=24,height:t=24,marginRight:r=8,url:n,zIndex:o,cross:i,address:s,token:a,sx:l,chainId:c}){var d;const[u,p]=m(!1),[h,f]=m(""),[g,b]=m(""),[x,w]=m(!1),A=v((()=>p(!0)),[]);let C=function(e){const t=$(Yf),{chainId:r}=Vf();return E((()=>{if(!e)return;let n=t.find((({address:t,chainId:n})=>n===r&&t===e));return n||(n=t.find((({address:t})=>t===e))),n}),[e,t,r])}(s);a&&(C=a);const k=s||(null==C?void 0:C.address),T=null==C?void 0:C.symbol,R=null==T?void 0:T.charAt(0).toUpperCase(),S=E((()=>{const e=null==C?void 0:C.logoURI;return n||e||""}),[n,C]);return y((()=>{w(!1)}),[k,S]),y((()=>{i&&(S?function(e,t){const r=new XMLHttpRequest;let n;r.onload=function(){const e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(r.response)},r.onerror=function(){t()};try{n=new URL(e)}catch(e){}finally{r.open("GET",n||e),r.responseType="blob",r.send()}}(S,(e=>{f(e)})):f(""))}),[S,i]),y((()=>{try{let t=k;if(t&&t.length<15&&(t=t.padEnd(15,"0")),t){const r=new re(t,{size:e,format:"svg",margin:.2,background:[255,234,4,255]}).toString();b(`data:image/svg+xml;base64,${r}`)}}catch(e){console.error("generate Identicon error: ",e)}}),[k,e]),nt.exports.jsxs(Nn,{sx:Object.assign({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",minWidth:e,width:e,height:t,marginRight:r,zIndex:o,border:"solid 1px",borderColor:"border.main",borderRadius:"50%"},l||{}),style:{width:e,height:t},children:[!u&&nt.exports.jsx(Nn,{sx:{typography:"ht",height:"100%",width:"100%",borderRadius:"50%",border:"transparent 2px solid",borderColor:"text.primary",color:"text.primary",display:"flex",alignItems:"center",justifyContent:"center"},children:R}),nt.exports.jsx(Nn,{component:"img",src:!(i?h:S)||x?g:i?h:S,onLoad:A,onError:e=>{const t=e.target;k&&g&&w(!0),t.onerror=null},sx:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",borderRadius:"50%",overflow:"hidden",width:"100%",height:"100%"}}),c&&Ey.has(c)?nt.exports.jsx(Nn,{sx:{position:"absolute",right:0,bottom:-1,width:12,height:12,transform:"translateX(50%)",border:"solid 1px",borderColor:"border.main",borderRadius:"50%"},children:nt.exports.jsx(Nn,{component:null===(d=Ey.get(c))||void 0===d?void 0:d.logo,sx:{display:"block",width:"100%",height:"100%"}})}):""]})}function Cy({token:t,onClick:r,showChainLogo:n}){var o,i;const s=Tn();return nt.exports.jsxs(Nn,{component:Ao,sx:{display:"flex",alignItems:"center",color:s.palette.text.primary,typography:"h5",fontWeight:600,"&:focus-visible":{opacity:.5}},onClick:e=>{r&&r(e)},"data-testid":"swap-select-token-btn",children:[(null==t?void 0:t.address)?nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Ay,{url:null==t?void 0:t.logoURI,address:null!==(o=null==t?void 0:t.address)&&void 0!==o?o:"",marginRight:6,chainId:n?null==t?void 0:t.chainId:void 0}),nt.exports.jsx(Nn,{children:null!==(i=null==t?void 0:t.symbol)&&void 0!==i?i:"-"})]}):nt.exports.jsx(e,{id:"sIPJGT",message:"SELECT TOKEN"}),nt.exports.jsx(Nn,{sx:{ml:7,width:12,transform:"rotateX(180deg)"},component:I})]})}function ky({onClick:t,balance:r,decimals:n,address:o,showMaxBtn:i}){const{palette:s}=Tn();return nt.exports.jsxs(Nn,{sx:{display:"flex",typography:"body2",color:s.text.secondary},children:[nt.exports.jsx(e,{id:"0QDjxt",message:"Balance:"})," ",o?ha({input:r,decimals:Math.min(n||4,4)}):"-",i&&r&&r.gt(0)&&nt.exports.jsx(Nn,{component:Ao,sx:{ml:6,color:(null==r?void 0:r.gt(0))?s.primary.main:s.text.disabled,cursor:o&&t?"pointer":"unset"},onClick:()=>t&&t(r?r.toString():""),children:nt.exports.jsx(e,{id:"CK1KXz",message:"Max"})})]})}function Ty({readOnly:e,sx:t,value:r,decimals:n,onChange:o,suffix:i,withClear:s,onFocus:a,placeholder:l}){const c=Tn(),d=E((()=>i||(s&&r&&o?nt.exports.jsx(Nn,{component:Ao,sx:{ml:5,width:18,height:18,borderRadius:"50%",backgroundColor:"border.main",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0,color:"text.secondary","&:focus-visible":{border:"solid 1px",borderColor:"text.primary"}},onClick:()=>{o&&o("")},children:nt.exports.jsx(Nn,{component:O,sx:{width:12}})}):void 0)),[o,i,c.palette.text.primary,r,s]);return nt.exports.jsxs(Nn,{sx:Object.assign({mt:12,display:"flex",justifyContent:"space-between",alignItems:"center"},t),"data-testid":"number-input-wrapper",children:[nt.exports.jsx(jo,{fullWidth:!0,value:r,readOnly:e,placeholder:l||"0.00",onFocus:a,onChange:e=>{const t=e.target.value,r=0===t.length?"":ga(t,n);o&&o(r)},sx:{width:"inherit",border:"none","& .MuiInput-input":{fontSize:24,border:"none",outline:"none",padding:0,color:"text.primary","&::placeholder":{fontSize:24,color:"text.disabled"}}}}),!e&&r&&d]})}function Ry({open:e,onClose:t,afterClose:r,title:n,rightSlot:o,canBack:i=!0,children:s,height:a,testId:l}){return nt.exports.jsxs(Nn,{sx:{position:"absolute",top:e?0:"100%",transition:"all 300ms",zIndex:1,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",borderRadius:16,height:a},"data-testid":l,"data-active":e?"1":"0",children:[n?nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:20},children:[nt.exports.jsx(Nn,{sx:{display:"flex",alignItems:"center",typography:"caption"},children:n}),o,!o&&i&&nt.exports.jsx(Nn,{component:O,sx:{color:"text.secondary",cursor:"pointer"},onClick:()=>{t&&t(),setTimeout((()=>r&&r()),300)}})]}):"",e?s:""]})}function Sy({token:e,disabled:t,style:r,onClick:n}){const o=Tn(),i=$f(),{account:s}=oe(),a=i(e),l=a?pa({input:a}):"";return nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2",px:6,py:5,borderRadius:8,cursor:t?"auto":"pointer",opacity:t?.5:1,"&:hover":{backgroundColor:"hover.default"}},style:r,onClick:()=>{t||n()},"data-testid":"token-picker-item",children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(Ay,{token:e}),nt.exports.jsxs(Nn,{children:[nt.exports.jsx(Nn,{sx:{fontWeight:600,textAlign:"left"},children:e.symbol}),s&&nt.exports.jsx(Nn,{sx:{mt:4,textAlign:"left"},children:(null==a?void 0:a.gte(0))?l:nt.exports.jsx(Nn,{component:R,width:18,sx:{"& path":{fill:o.palette.text.disabled},animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}}})})]})]}),nt.exports.jsx(Nn,{sx:{color:"text.secondary",textAlign:"right"},children:e.name})]})}function Ny({chain:t,active:r,onClick:n}){return nt.exports.jsx(hs,{title:t.name,placement:"top",onlyHover:!0,children:nt.exports.jsxs(Nn,{sx:Object.assign({display:"flex",alignItems:"center",p:8,borderRadius:8,cursor:"pointer"},r?{backgroundColor:"secondary.main",color:"secondary.contrastText"}:{border:"1px solid",borderColor:"border.main","&:hover":{backgroundColor:"hover.default"}}),onClick:n,children:[nt.exports.jsx(Nn,{component:t.logo,sx:{width:24,height:24}}),r?nt.exports.jsxs(Nn,{sx:{ml:8},children:[nt.exports.jsx(e,{id:"Fdp03t",message:"on"}),` ${t.name}`]}):""]})},t.chainId)}function My({value:e,onChange:t,occupiedAddrs:r,occupiedChainId:o,hiddenAddrs:i,showAddrs:s,visible:a,side:l,defaultLoadBalance:c}){const{chainList:d,selectChainId:u,setSelectChainId:p}=function(e){const{chainId:t}=Vf(),r=$(Gf),n=$(em).crossChain,o=E((()=>{const t=new Set;return r.forEach((r=>{r.side&&e&&r.side!==e||t.add(r.chainId)})),t}),[r,e]),i=E((()=>{if(!n)return[];const e=new Map;let r;return Ey.forEach(((n,i)=>{if(o.has(n.chainId)){if(n.mainnet){if(t!==n.chainId)return;r=n.mainnet}e.set(i,Object.assign({},n))}})),void 0!==r&&e.delete(r),Array.from(e.values())}),[t,r,n]),s=E((()=>!i.length||t&&o.has(t)?t:i[0].chainId),[t,o]),[a,l]=m(s);y((()=>{void 0===a&&l(s)}),[s]);const c=E((()=>null!=a?a:s),[a,s]);return{chainList:i,selectChainId:c,setSelectChainId:l}}(l),{showTokenList:h,filter:f,setFilter:b,onSelectToken:x,popularTokenList:w}=xg({value:e,onChange:t,occupiedAddrs:r,occupiedChainId:o,hiddenAddrs:i,showAddrs:s,side:l,chainId:u,visible:a,defaultLoadBalance:c}),A=g(null),[C,k]=m(0);y((()=>{a&&(null==e?void 0:e.chainId)&&(null==e?void 0:e.chainId)!==u&&p(e.chainId)}),[e,a]),y((()=>{a&&A.current&&k(A.current.offsetHeight-16)}),[A,a,u]);const T=v((({index:t,style:r})=>{const n=h[t];return n?nt.exports.jsx(Sy,{token:n,disabled:!!e&&e.address===n.address&&e.chainId===n.chainId,style:r,onClick:()=>x(n)},n.address+n.chainId):null}),[h,w,e]);return nt.exports.jsxs(Nn,{sx:{display:"flex",flexDirection:"column",px:20,flex:1,overflow:"hidden"},children:[nt.exports.jsx(_o,{fullWidth:!0,height:48,value:f,onChange:e=>b(e.target.value),clearValue:()=>b(""),placeholder:n._({id:"72/M0o",message:"Enter the token symbol or address"}),sx:{mb:16}}),d.length?nt.exports.jsx(Nn,{sx:{position:"relative",display:"flex",gap:8,flexWrap:"wrap",pb:32,"&::after":{content:'""',position:"absolute",bottom:16,left:0,right:0,height:"1px",backgroundColor:"border.main"}},children:d.map((e=>nt.exports.jsx(Ny,{chain:e,active:e.chainId===u,onClick:()=>{p(e.chainId)}},e.chainId)))}):"",nt.exports.jsx(Nn,{sx:{pb:16,flex:1,minHeight:64},ref:A,children:nt.exports.jsx(Te,{height:C,itemCount:h.length,itemSize:52,width:"100%",className:"token-list",children:T})})]})}function Oy({open:t,value:r,onClose:n,occupiedAddrs:o,occupiedChainId:i,onTokenChange:s,side:a,defaultLoadBalance:l}){const{height:c}=$(em);return nt.exports.jsx(Ry,{height:c,open:t,onClose:n,title:nt.exports.jsx(e,{id:"T0Y2+3",message:"Select a token"}),testId:"token-picker-wrapper",children:nt.exports.jsx(My,{value:r,visible:t,onChange:s,occupiedAddrs:o,occupiedChainId:i,side:a,defaultLoadBalance:l})})}function Iy(e,t){localStorage.setItem("from"===e?"DODO_WIDGET_LAST_FROM_TOKEN":"DODO_WIDGET_LAST_TO_TOKEN",t?JSON.stringify(t):"")}function Fy(e){const{provider:t}=Vf(),r=E((()=>{var r;if(e&&(null===(r=null==t?void 0:t.provider)||void 0===r?void 0:r.isMetaMask))return()=>function({chainId:e,provider:t}){var r,n,o;return vl(this,void 0,void 0,(function*(){if(!t)return!1;const i=`0x${e.toString(16)}`;try{return yield t.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]}),!0}catch(s){const{code:a}=s,l=ul[e];if(!l)throw new Error(`Chain ${e} does not exist`);const c={chainId:i,chainName:null===(r=Ey.get(e))||void 0===r?void 0:r.name,rpcUrls:[...cl[e],...null!==(o=null===(n=_f.getState().globals.jsonRpcUrlMap)||void 0===n?void 0:n[e])&&void 0!==o?o:[]],nativeCurrency:{name:l.name,symbol:l.symbol,decimals:l.decimals},blockExplorerUrls:[`https://${hl[e]}/`]};if(4902===a||-32603===a)try{return yield t.request({method:"wallet_addEthereumChain",params:[c]}),!0}catch(t){console.error(`[failed to add ${e}]: `,c,t)}console.error(`[failed to switch ${e}]: `,c,s)}return!1}))}({chainId:e,provider:null==t?void 0:t.provider})}),[e]);return r}function jy({locale:e,children:r}){return y((()=>{(()=>{vl(this,void 0,void 0,(function*(){yield function(e="en-US"){return vl(this,void 0,void 0,(function*(){try{const t=yield import(`./locales/${e}.js`);n.load(e,t.messages||t.default.messages)}catch(e){}n.activate(e)}))}(e)}))})()}),[e]),nt.exports.jsx(t,{i18n:n,children:r})}var Ly,_y,Wy,Py;!function(e){e[e.Running=0]="Running",e[e.Success=1]="Success",e[e.Failed=2]="Failed",e[e.Warning=3]="Warning"}(Ly||(Ly={})),function(e){e.Canceled="canceled",e.Failed="failed",e.Success="success",e.Submitted="submitted"}(_y||(_y={})),function(e){e[e.Failed=0]="Failed",e[e.Success=1]="Success"}(Wy||(Wy={})),function(e){e[e.Failed=0]="Failed",e[e.Success=1]="Success",e[e.Warning=2]="Warning"}(Py||(Py={}));const Dy=(e,t)=>vl(void 0,void 0,void 0,(function*(){const{value:r,from:n,to:o,data:i}=e,s={from:n,to:o,value:r,data:i};r&&!/^0x0*$/.test(r)||delete s.value;try{return(yield t.estimateGas(s)).add(5e4)}catch(e){console.error(e);try{if(yield t.call(s),"test"!==process.env.NODE_ENV)throw new Error("Unexpected issue with estimating the gas. Please try again.")}catch(e){if("test"!==process.env.NODE_ENV)throw e}}return null})),By=(e,t)=>vl(void 0,void 0,void 0,(function*(){try{return yield t.getSigner().sendTransaction(e)}catch(e){throw 4001===(null==e?void 0:e.code)?new Error(n._({id:"em6LzM",message:"Transaction rejected."})):e}}));function Uy(e,t){var r;const o=null===(r=ul[e])||void 0===r?void 0:r.symbol,i=[{error:"insufficient",msg:n._({id:"CkfzUf",message:"Insufficient funds - Please retry after depositing more {EtherTokenSymbol} into your wallet",values:{EtherTokenSymbol:o}})},{error:["External Swap execution Failed","Return amount is not enough"],msg:n._({id:"AghcDJ",message:"Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance."})},{error:"SafeERC20: low-level call failed",msg:n._({id:"tMVAXL",message:"SafeERC20: low-level call failed. Please contact the DODO team."})},{error:["User denied","cancel","User rejected","user rejected"],msg:n._({id:"xEbi+8",message:"User denied transaction signature."})},{error:["Cannot set properties of undefined (setting 'loadingDefauIts'){\"originalError\":{",'[ethjs-query]while formatting outputs from RPC\'["value":["code":-32000,"message":"header not found"))'],msg:n._({id:"h4RLFN",message:"RPC node data exception"})},{error:['execution reverted:FORCESTOP ["originalError"'],msg:n._({id:"yM82Jw",message:"ForceStop exception"})},{error:["replacement transaction underpriced","Gasprice too low","transaction underprice"],msg:n._({id:"gz+9Rb",message:"Gas price is too low, please adjust in your wallet and try again"})},{error:["MINT_INVALID"],msg:n._({id:"Xpkm7d",message:"No ForceStop access"})},{error:["NOT_PHASE_EXE"],msg:n._({id:"qK7wuW",message:"Unable to SETTLE during the cooling-off period"})},{error:["params specify an EIP-1559transaction but the currentnetwork does not support"],msg:n._({id:"TizaRy",message:"Wallet incompatibility"})},{error:["ALREADY_SETTLED"],msg:n._({id:"C1mcuF",message:"This CP has been settled by other addrs"})},{error:["create RFQ order failed]:LESS_THAN_FEE_LIMIT"],msg:n._({id:"g3x+cF",message:"Service update, please wait and try again"})}];let s="";return i.some((e=>Array.isArray(e.error)?e.error.some((r=>t.indexOf(r)>-1&&(s=e.msg,!0))):t.indexOf(e.error)>-1&&(s=e.msg,!0))),s||t}var Vy,Zy;!function(e){e.Approval="APPROVAL",e.TX="TX",e.TypedSign="TypedSign"}(Vy||(Vy={})),function(e){e.Normal="Normal",e.Privacy="Privacy",e.LimitOrder="LimitOrder",e.RFQ="RFQ"}(Zy||(Zy={}));const Hy=e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_GLOBAL_PROPS",payload:e})})),zy=e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_AUTO_CONNECT_LOADING",payload:e})})),Yy=e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_AUTO_SLIPPAGE",payload:e})}));function Gy({onTxFail:e,onTxSubmit:t,onTxSuccess:r}={}){const{account:n,provider:i}=Vf(),s=Zf(),[a,l]=m(!1),[c,d]=m(new Map),u=ee(),[p,h]=m(null),[f,g]=m(""),[y,b]=m(null),[x,w]=m(!1),[A,C]=m(),{updateBlockNumber:k}=gg(),T=v(((a,c,p,f=!1,m,y,v,x)=>vl(this,void 0,void 0,(function*(){if(g(""),h(""),!n||!i)throw new Error("Submission: Cannot execute step when the wallet is disconnected");let E,A,T;C((()=>v)),l(!1);try{if(l(!0),c.opcode===Vy.Approval)T=yield((e,t,r,n,i,s)=>vl(void 0,void 0,void 0,(function*(){const a=lg(e,bg,i,s).interface.encodeFunctionData("approve",[r,n.toFixed()]),l={from:t,to:e,data:a,value:`0x${new o("0").toString(16)}`,gasLimit:void 0},c=yield Dy(l,i);return c&&(l.gasLimit=c),yield By(l,i)})))(c.token.address,n,c.contract,c.amt||ug,i,n),E=T.hash,g(E);else{if(c.opcode!==Vy.TX)throw new Error(`Op ${c.opcode} not implemented!`);if(""===c.to)throw new Error("Submission: malformed to");if(0===c.data.length)throw new Error("Submission: malformed data");if(0===c.data.indexOf("0x")&&c.data.length<=2)throw new Error("Submission: malformed data");if(A={value:c.value,data:c.data,to:c.to,gasLimit:c.gasLimit,from:n,chainId:s},!A.gasLimit)try{const e=yield Dy(A,i);e&&(A.gasLimit=e)}catch(e){console.debug(e)}if(T=yield By(A,i),E=T.hash,g(E),!E)throw new Error(`Unexpected tx: ${E}`)}}catch(t){if(l(!1),b({spec:c,brief:a,subtitle:p}),console.error(t),t.message){u(Hy({contractStatus:Of.Failed}));const r={error:t.message,brief:a};y&&Object.assign(r,y),e&&e(t,y),h(Uy(s,t.message))}return _y.Failed}b({spec:c,brief:a,subtitle:p}),w(!1),l(!1);const R=Object.assign(Object.assign(Object.assign(Object.assign({brief:a},c),A),{tx:E,subtitle:p}),y);u(Hy({contractStatus:Of.Pending})),t&&t(E,R),m&&m();const S={brief:a,spec:c,tx:E,subtitle:p};if(d((e=>e.set(E,[S,Ly.Running]))),f)return _y.Submitted;if(m&&m(),null==T?void 0:T.wait){const e=yield T.wait(1);if(w(!0),e.status===Wy.Success)return"TX"===R.opcode&&u(Hy({contractStatus:Of.TxSuccess})),"APPROVAL"===R.opcode&&u(Hy({contractStatus:Of.ApproveSuccess})),x&&x(E,r),r&&r(E,R),yield k(),d((e=>e.set(E,[S,Ly.Success]))),_y.Success}return yield k(),w(!0),d((e=>e.set(E,[S,Ly.Failed]))),_y.Failed}))),[n,s,l,i,k]),R=v((({brief:n,subtitle:o,early:i,mixpanelProps:a,submittedBack:c,submittedConfirmBack:d,successBack:p,handler:f})=>vl(this,void 0,void 0,(function*(){C((()=>d)),g(""),h(""),l(!1);const m=Object.assign({brief:n,subtitle:o},a);return new Promise((d=>vl(this,void 0,void 0,(function*(){const y={opcode:Vy.TX,value:"",to:"",data:""},v=(e,r)=>{g(e),b({spec:y,brief:n,subtitle:o}),w(!1),l(!1),u(Hy({contractStatus:Of.Pending})),t&&t(e,Object.assign(Object.assign({tx:e},m),r)),c&&c(),i&&d(_y.Submitted)},x=(e,t)=>vl(this,void 0,void 0,(function*(){g(e),u(Hy({contractStatus:Of.TxSuccess})),p&&p(e,r),r&&r(e,Object.assign(Object.assign({tx:e},m),t)),yield k(),w(!0)})),E=t=>{if(l(!1),b({spec:y,brief:n,subtitle:o}),console.error(t),t.message){u(Hy({contractStatus:Of.Failed}));const r={error:t.message,brief:n};a&&Object.assign(r,a),e&&e(t,a),h(Uy(s,t.message))}d(_y.Failed)};try{l(!0),yield f({onSubmit:v,onSuccess:x,onError:E})}catch(e){return void E(e)}}))))}))),[s,l,k]),S=E((()=>({execute:T,executeCustom:R,requests:c,setShowing:b,waitingSubmit:a})),[T,R,c,b]),N=v((()=>{b(null),A&&(A(),C(void 0))}),[A]);return{showing:y,showingDone:x,transactionTx:f,errorMessage:p,setErrorMessage:h,closeShowing:N,ctxVal:S,requests:c}}function Xy(){const{requests:e}=qy(),t=[];return null==e||e.forEach((function([e,r]){r===Ly.Running&&t.push(e)})),{runningRequests:t,isInflight:t.length>0}}const Jy=A({execute:()=>Promise.resolve(_y.Canceled),executeCustom:()=>Promise.resolve(_y.Canceled),requests:void 0,waitingSubmit:!1});function qy(){return C(Jy)}var Qy;function Ky(){return Ky=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ky.apply(this,arguments)}var $y=function(e){return u.createElement("svg",Ky({width:"33px",height:"33px",viewBox:"0 0 33 33",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Qy||(Qy=u.createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},u.createElement("g",{transform:"translate(-186.000000, -375.000000)",stroke:"currentColor",strokeWidth:4},u.createElement("g",{transform:"translate(18.000000, 291.000000)"},u.createElement("g",{transform:"translate(40.000000, 83.000000)"},u.createElement("path",{d:"M159,32 C159,15.9837423 146.016258,3 130,3"})))))))};function eb({showingDone:e,errorMessage:t}){return t?nt.exports.jsx(Nn,{component:F,sx:{width:64,height:64,color:"error.main"}}):e?nt.exports.jsx(Nn,{component:j,sx:{width:64,height:64,color:"success.main"}}):nt.exports.jsx(Nn,{sx:{mx:"auto",border:e=>{var t;return`6px solid ${null===(t=e.palette)||void 0===t?void 0:t.background.input}`},borderRadius:"50%",width:"64px",height:"64px",position:"relative",animation:"loadingRotate 1.1s infinite linear","@keyframes loadingRotate":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(359deg)"}}},children:nt.exports.jsx(Nn,{component:$y,sx:{position:"absolute",top:"-6px",right:"-6px",color:"primary.main"}})})}function tb({showingDone:e,showing:t}){return nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[nt.exports.jsx(Nn,{sx:{mt:60},children:e?n._({id:"4xbbt/",message:"{0} confirmed",values:{0:null==t?void 0:t.brief}}):n._({id:"/nzjSF",message:"{0} pending",values:{0:null==t?void 0:t.brief}})}),(null==t?void 0:t.subtitle)?nt.exports.jsx(Nn,{sx:{mt:20,typography:"body2"},children:null==t?void 0:t.subtitle}):""]})}function rb({isStarted:t,isEnded:r,tx:n}){const[o,i]=m(0),{chainId:s}=Vf(),a=E((()=>{const e=hl[s||1];let t="tx";return s===ll.TON&&(t="transaction"),`https://${e}/${t}/${n}`}),[n,s]),l=E((()=>{const e=Math.floor(o/60),t=o%60;return e?`${e}m ${t}s`:`${t}s`}),[o]),c=g();return y((()=>(t&&(i(0),clearInterval(c.current),c.current=setInterval((()=>{i((e=>e+1))}),1e3)),()=>{clearInterval(c.current)})),[t]),y((()=>{clearInterval(c.current)}),[r]),nt.exports.jsxs(Nn,{sx:{mt:20,pt:20,display:"flex",justifyContent:"space-between",alignItems:"center",typography:"body2",color:"text.secondary",border:"solid 1px transparent",borderTopColor:"border.main"},children:[nt.exports.jsxs(Nn,{children:[nt.exports.jsx(e,{id:"+Jkdiu",message:"Transaction Time:"}),l]}),nt.exports.jsxs(Lo,{sx:{display:"flex",alignItems:"center",cursor:"pointer"},component:"a",href:a,target:"_blank",rel:"noopener noreferrer",children:[nt.exports.jsx(e,{id:"S3piC2",message:"Tx"}),nt.exports.jsx(Nn,{component:L,sx:{width:16,height:16,ml:6}})]})]})}function nb(t){var{children:r,executionStatus:n}=t;const o=Gy(bl(t,["children","executionStatus"])),{ctxVal:i,showing:s,closeShowing:a,showingDone:l,errorMessage:c,transactionTx:d}=Object.assign(Object.assign({},o),n),u=ee();return nt.exports.jsxs(Jy.Provider,{value:i,children:[r,nt.exports.jsx(Ry,{open:!!s,onClose:a,children:nt.exports.jsxs(Nn,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",px:20,pb:20,flex:1,overflowY:"auto"},children:[nt.exports.jsxs(Nn,{children:[nt.exports.jsx(Nn,{sx:{textAlign:"center",pt:60},children:nt.exports.jsx(eb,{showingDone:l,errorMessage:c})}),c?nt.exports.jsxs(Nn,{sx:{textAlign:"center",mt:60},children:[nt.exports.jsx(Nn,{children:nt.exports.jsx(e,{id:"kf83Ld",message:"Something went wrong."})}),nt.exports.jsx(Nn,{sx:{color:"text.secondary",mt:12,typography:"body2",wordBreak:"break-all"},children:c})]}):nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(tb,{showingDone:l,showing:s}),nt.exports.jsx(rb,{isStarted:!!s,isEnded:l,tx:d})]})]}),nt.exports.jsx(wo,{fullWidth:!0,size:wo.Size.big,onClick:()=>{u(Hy({contractStatus:Of.Initial})),a()},sx:{mt:20},children:c?nt.exports.jsx(e,{id:"1QfxQT",message:"Dismiss"}):nt.exports.jsx(e,{id:"yz7wBu",message:"Close"})})]})})]})}const ob=e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_SLIPPAGE",payload:e})}));function ib({width:e,height:t,feeRate:r,rebateTo:n,colorMode:o,apikey:i,defaultChainId:s,defaultToToken:a,defaultFromToken:l,jsonRpcUrlMap:c,swapSlippage:d,bridgeSlippage:u,apiServices:p,crossChain:h,noPowerBy:f,tonConnect:m}){const g=ee();y((()=>{o&&g((e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_COLOR_MODE",payload:e})})))(o))}),[o]),y((()=>{var e;s&&g((e=s,t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_CHAIN_ID",payload:e})}))))}),[s]),y((()=>{g(Hy({height:t}))}),[t]),y((()=>{g(Hy({width:e}))}),[e]),y((()=>{i&&g(Hy({apikey:i}))}),[i]),y((()=>{r&&g(Hy({feeRate:r}))}),[r]),y((()=>{n&&g(Hy({rebateTo:n}))}),[n]),y((()=>{d&&g(Hy({swapSlippage:d}))}),[d]),y((()=>{u&&g(Hy({bridgeSlippage:u}))}),[u]),y((()=>{p&&g(Hy({apiServices:p}))}),[p]),y((()=>{l&&g((e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_DEFAULT_FROM_TOKEN",payload:e})})))(l))}),[l]),y((()=>{a&&g((e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_DEFAULT_TO_TOKEN",payload:e})})))(a))}),[a]),y((()=>{c&&g(Hy({jsonRpcUrlMap:c}))}),[c]),y((()=>{void 0!==h&&g(Hy({crossChain:h}))}),[h]),y((()=>{void 0!==f&&g(Hy({noPowerBy:f}))}),[f]),y((()=>{void 0!==m&&Uf.setState({enabled:!!m})}),[m])}function sb({refetch:e,interval:t}){let r;y((()=>(e(),clearTimeout(r),r=setInterval((()=>{e()}),null!=t?t:15e3),()=>clearTimeout(r))),[e])}var ab;!function(e){e.routePrice="routePrice",e.fiatPrice="fiatPrice",e.bridgeRoutePrice="bridgeRoutePrice",e.bridgeEncode="bridgeEncode",e.bridgeCreateRoute="bridgeCreateRoute"}(ab||(ab={}));const lb="https://api.dodoex.io/cross-chain/widget",cb=`${lb}/routes`,db=`${lb}/transaction/encode`,ub=`${lb}/order/create`;function pb(e){const t=$(em);return E((()=>function(e,t={}){var r,n,o,i,s;switch(e){case ab.routePrice:return null!==(r=t.routePrice)&&void 0!==r?r:"https://api.dodoex.io/route-service/v2/widget/getdodoroute";case ab.fiatPrice:return null!==(n=t.fiatPrice)&&void 0!==n?n:"https://api.dodoex.io/frontend-price-api/current/batch";case ab.bridgeRoutePrice:return null!==(o=t.bridgeRoutePrice)&&void 0!==o?o:cb;case ab.bridgeEncode:return null!==(i=t.bridgeEncode)&&void 0!==i?i:db;case ab.bridgeCreateRoute:return null!==(s=t.bridgeCreateRoute)&&void 0!==s?s:ub;default:throw new Error(`Invalid key = ${e}`)}}(e,t.apiServices)),[t.apiServices,e])}function hb({fromToken:e,toToken:t,chainId:r}){const[n,o]=m(!1),{apikey:i}=$(em),[s,a]=m(""),[l,c]=m(""),d=pb(ab.fiatPrice),u=v((()=>{if(!e||!t)return;const n=[];e.chainId!==ll.TON&&n.push(e),t.chainId!==ll.TON&&n.push(t),n.length&&(o(!0),Re.post(d,{networks:n.map((e=>{var t;return(e=>pl[e]||pl[ll.MAINNET])(null!==(t=e.chainId)&&void 0!==t?t:r)})),addresses:n.map((e=>e.address)),symbols:n.map((e=>e.symbol)),isCache:!0},i?{headers:{apikey:i}}:void 0).then((r=>{var n,i,s;o(!1);const l=null===(n=r.data)||void 0===n?void 0:n.data;l&&(a(null===(i=l.find((t=>t.address===e.address)))||void 0===i?void 0:i.price),c(null===(s=l.find((e=>e.address===t.address)))||void 0===s?void 0:s.price))})).catch((e=>{o(!1),console.error(e)})))}),[r,e,t,i,d]);return sb({refetch:u}),{loading:n,refetch:u,toFiatPrice:l,fromFiatPrice:s}}const fb=e=>(null!=e?e:_f.getState()).settings.slippage,mb=e=>(null!=e?e:_f.getState()).settings.ddl,gb="0x0000000000000000000000000000000000000000";function yb(e){const t=$(em),r=$(rm),n=E((()=>{var n,o;return!(null==r?void 0:r.loading)&&(null==r?void 0:r.value)?r.value:e?null!==(n=t.bridgeSlippage)&&void 0!==n?n:.5:null!==(o=t.swapSlippage)&&void 0!==o?o:.2}),[t.swapSlippage,t.bridgeSlippage,e,r]);return{defaultSlippage:n,loading:null==r?void 0:r.loading}}var bb;function vb({toToken:e,fromToken:t,fromAmount:r,toAmount:o,marginAmount:i,estimateGas:s}){const{account:a,chainId:l,provider:c}=Vf(),d=$(Wf),u=E((()=>(null==t?void 0:t.chainId)||l||d),[l,t,d]),{defaultSlippage:p,loading:h}=yb(!1),f=$(fb)||p,b=$(mb)||20,x=g(0),{feeRate:w,rebateTo:A,apikey:C,isReverseRouting:k}=$(em),T=E((()=>Math.floor(Date.now()/1e3)+60*b),[b]),[R,S]=m(bb.Initial),[N,M]=m(null),O=pb(ab.routePrice),I=v((()=>{M(null)}),[N]);y((()=>{I()}),[t,e]);const F=v((()=>vl(this,void 0,void 0,(function*(){if(!u||!t||!e||t.chainId!==e.chainId||!k&&!r||k&&!o)return void S(bb.Initial);x.current=x.current+1;const n=x.current;if(S(bb.Loading),h)return;const i={chainId:u,deadLine:T,apikey:C,slippage:f,source:"dodoV2AndMixWasm",toTokenAddress:e.address,fromTokenAddress:t.address,userAddr:a||gb,estimateGas:s};k?i.toAmount=K(String(o||1),e.decimals).toString():i.fromAmount=K(String(r||1),t.decimals).toString(),A&&w&&(i.rebateTo=A,i.fee=w);try{const e=yield Re.get(O,{params:i});if(n<x.current)return;const t=e.data.data;(null==t?void 0:t.resAmount)?(S(bb.Success),M(t)):(S(bb.Failed),M(null))}catch(e){S(bb.Failed),M(null),console.error(e)}}))),[T,a,u,e,w,f,A,t,c,r,o,C,k,O,h,s]);sb({refetch:F});const j=E((()=>{const e=k?o:r;return N&&R!==bb.Loading&&e?N:null}),[N,R,k,o,r]),L=function(){const{chainId:e,account:t}=Vf(),r=qy(),o=v((({to:e,data:o,useSource:i,duration:s,ddl:a,gasLimit:l,subtitle:c,value:d})=>{const u=60*a,p=d;i&&"weth"!==i.toLowerCase()&&l&&l.lt(3e4)&&console.debug("Warning: GasLimit less than the minimum!");const h={from:t,to:e,data:o,value:p,route:i,duration:s,ddlSecRel:u,gasLimit:l};r.execute(n._({id:"vH2C/2",message:"Swap"}),Object.assign({opcode:Vy.TX},h),c)}),[t,e]);return o}(),_=v((e=>{if(!j)return;const{resAmount:n,to:o,data:i,useSource:s,duration:a,value:l}=j;t&&(k?n:r)&&L({to:o,data:i,useSource:s,duration:a,ddl:b,value:l,subtitle:e})}),[b,t,r,k,j]);return{status:R,rawBrief:j,refetch:F,executeSwap:_,reset:I}}!function(e){e.Initial="Initial",e.Loading="Loading",e.Failed="Failed",e.Success="Success"}(bb||(bb={}));const xb=new Ne;function wb(e){zf(Object.assign(Object.assign({},e),{isTon:!!e.tonConnect})),hg(),gg();const{provider:t,autoConnect:r}=Vf({isTon:!!e.tonConnect}),n=ee(),o=$(tm);y((()=>{if(void 0===o){n(zy(!0));(()=>vl(this,void 0,void 0,(function*(){const t=e.defaultChainId;try{yield r(t)}finally{n(zy(!1))}})))()}}),[r]),y((()=>{e.onProviderChanged&&e.onProviderChanged(t);const o=null==t?void 0:t.provider,i=()=>vl(this,void 0,void 0,(function*(){n(zy(!0));try{yield r()}finally{n(zy(!1))}}));return(null==o?void 0:o.on)&&o.on("chainChanged",i),()=>{(null==o?void 0:o.removeListener)&&o.removeListener("chainChanged",i)}}),[t]),y((()=>{e.tonConnect&&Se.ready()}),[e.tonConnect]);const i=e.width||375,s=e.height||494;return ib(Object.assign(Object.assign({},e),{width:i,height:s})),nt.exports.jsx(Nn,{sx:{width:i,height:s,overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",minWidth:335,minHeight:494,borderRadius:16,backgroundColor:"background.paper"},className:"dodo-widget-container",children:nt.exports.jsx(nb,{...e,children:e.children})})}function Eb(e){const t=$(Pf),r=$(Df),n=E((()=>{var n;if(t){if(t!==ll.TON)return t;if(r&&r!==ll.TON)return r}return null!==(n=e.defaultChainId)&&void 0!==n?n:1}),[e.defaultChainId,t]),{connectors:o,key:i}=Cf({provider:e.provider,jsonRpcUrlMap:e.jsonRpcUrlMap,defaultChainId:n});return nt.exports.jsx(ie,{connectors:o,lookupENS:!1,children:nt.exports.jsx(wb,{...e})},i)}function Ab(e){const t=function(e){for(var t=void 0===e?{}:e,r=t.mode,n=void 0===r?"light":r,o=t.lang,i=t.theme,a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];var c=$n(n,i,o);return bn(c=a.reduce((function(e,t){return s(e,t)}),c))}({mode:e.colorMode,theme:e.theme,lang:e.locale||"en-US"});return e.apikey||e.apiServices||console.error("apikey and apiServices must have a."),nt.exports.jsx(te,{store:_f,children:nt.exports.jsx(jy,{locale:e.locale,children:nt.exports.jsxs(zn,{theme:t,children:[nt.exports.jsx(no,{container:".dodo-widget-container"}),nt.exports.jsx(Me,{client:xb,children:nt.exports.jsx(Eb,{...e})})]})})})}function Cb({chainId:t,open:r,onClose:n}){var o,i;const s=Tn(),[a,l]=m(!1),{chainId:c}=Vf(),[d,u]=m("1"===localStorage.getItem("DODO_WIDGET_AUTO_SWITCH_NETWORK")),p=Fy(t),h=$(em).autoConnectLoading;y((()=>{h||(()=>{vl(this,void 0,void 0,(function*(){if(r)if(c&&t&&t!==c&&p){if(d)return yield p(),void n();l(!0)}else n();else a&&l(!1)}))})()}),[r,c,h]);const f=t&&null!==(i=null===(o=Ey.get(t))||void 0===o?void 0:o.name)&&void 0!==i?i:"";return nt.exports.jsx(Fs,{open:a,onClose:n,container:document.querySelector(".dodo-widget-container"),disableEnforceFocus:!0,children:nt.exports.jsxs(Nn,{sx:{backgroundColor:"background.paper",display:"flex",width:"100%",flexDirection:"column",justifyContent:"center",alignItems:"center",p:s.spacing(20,16),gap:20,borderRadius:s.spacing(16,16,0,0),outline:0},children:[nt.exports.jsxs(Nn,{sx:{typography:"caption",textAlign:"center"},children:[nt.exports.jsx(e,{id:"7rpoXw",message:"This token is on"})," ",f,".",nt.exports.jsx("br",{}),nt.exports.jsx(e,{id:"EUBGvH",message:"Are you sure swapping to another chain?"})]}),nt.exports.jsxs(Nn,{component:"label",sx:{display:"flex",alignItems:"center",gap:8,typography:"h6",cursor:"pointer"},children:[nt.exports.jsx(js,{sx:{top:-1},checked:d,onChange:e=>{const{checked:t}=e.target;var r;r=t,localStorage.setItem("DODO_WIDGET_AUTO_SWITCH_NETWORK",r?"1":"0"),u(t)}}),nt.exports.jsx(e,{id:"dI46oG",message:"Auto switch network"})]}),nt.exports.jsxs(Nn,{sx:{display:"grid",width:"100%",gridTemplateColumns:"repeat(2, 1fr)",gap:8},children:[nt.exports.jsx(wo,{variant:wo.Variant.second,onClick:n,children:nt.exports.jsx(e,{id:"dEgA5A",message:"Cancel"})}),nt.exports.jsx(wo,{variant:wo.Variant.outlined,onClick:()=>vl(this,void 0,void 0,(function*(){p&&(yield p()),n()})),children:nt.exports.jsx(e,{id:"7VpPHA",message:"Confirm"})})]})]})})}function kb({sx:e,amt:t,token:r,readOnly:n,showMaxBtn:o,onMaxClick:i,fiatPriceTxt:s,occupiedAddrs:a,occupiedChainId:l,onInputFocus:c,onTokenClick:d,onInputChange:u,onTokenChange:p,side:h,showChainLogo:f,onlyCurrentChain:g,defaultLoadBalance:b}){const[v,x]=m(!1),w=Tn(),A=$f(),[C,k]=m(!1),T=r?A(r):null,[R,S]=E((()=>r?[[r],r.chainId]:[]),[r]);return pg({tokenList:R,chainId:S}),y((()=>{r&&g&&x(!0)}),[r,g]),nt.exports.jsxs(Nn,{sx:Object.assign({width:"100%",minHeight:133,padding:20,borderRadius:12,overflow:"hidden",display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:w.palette.background.input},e),children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[nt.exports.jsx(Cy,{token:r,showChainLogo:f,onClick:()=>k(!0)}),nt.exports.jsx(ky,{balance:T,onClick:i,showMaxBtn:o,address:null==r?void 0:r.address,decimals:null==r?void 0:r.decimals})]}),nt.exports.jsx(Ty,{value:t,onFocus:c,onChange:u,readOnly:n,withClear:!0}),nt.exports.jsx(Nn,{sx:{mt:4,typography:"body2",color:w.palette.text.secondary},children:s}),nt.exports.jsx(Oy,{value:r,open:C,side:h,occupiedAddrs:a,occupiedChainId:l,defaultLoadBalance:b,onClose:()=>{k(!1),d&&d()},onTokenChange:(e,t)=>{k(!1),setTimeout((()=>{p(e,t)}),300)}}),nt.exports.jsx(Cb,{chainId:null==r?void 0:r.chainId,open:v,onClose:()=>x(!1)})]})}function Tb(e){const{width:t}=$(em),r=E((()=>{let e="";return"number"==typeof t?e=`${t}px`:t&&(e=t),e?`calc(${e} - 40px)`:"auto"}),[t]);return nt.exports.jsx(fs,{container:document.querySelector(".dodo-widget-container"),maxWidth:r,...e})}function Rb({onClick:e,disabled:t}){const r=Tn();return nt.exports.jsx(Nn,{sx:{width:"100%",position:"relative"},children:nt.exports.jsx(Nn,{component:Ao,sx:Object.assign({width:36,height:36,borderRadius:"50%",backgroundColor:r.palette.background.input,border:`4px solid ${r.palette.background.paper}`,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%) rotate(-90deg)",color:"text.secondary"},t||!e?{}:{"&:hover":{color:"text.primary"},"&:focus-visible":{"&::before":{content:'""',position:"absolute",display:"block",left:"50%",top:"50%",transform:"translate(-50%, -50%)",borderRadius:"50%",width:28,height:28,border:"solid 1px",borderColor:"text.primary"}}}),disabled:t,onClick:()=>{t||e&&e()},children:nt.exports.jsx(Nn,{component:_,sx:{width:18,height:18}})})})}function Sb({open:t,execute:r,onClose:n,toToken:i,fromToken:s,fromAmount:a,toAmount:l,priceImpact:c,clearFromAmt:d,clearToAmt:u,baseFeeAmount:p,curToFiatPrice:h,curFromFiatPrice:f,pricePerFromToken:g,additionalFeeAmount:b,loading:v}){var x,w,A;const C=Tn(),{defaultSlippage:k}=yb(!1),T=null!==(x=$(fb))&&void 0!==x?x:k,R=ee(),{contractStatus:S}=$(em),M=E((()=>new o(c).gt(15)),[c]),[O,F]=m(!1),[j,L]=m(!1);return y((()=>{S!==Of.Pending&&n(),S===Of.TxSuccess&&(u(),d())}),[S]),y((()=>{F(!1)}),[h]),nt.exports.jsx(Ry,{open:t,onClose:()=>{R(Hy({contractStatus:Of.Initial})),n()},title:nt.exports.jsx(e,{id:"QR4/RH",message:"Swap summary"}),children:nt.exports.jsxs(Nn,{sx:{margin:20,display:"flex",height:"100%",flexDirection:"column",borderTop:`1px solid ${C.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{py:20,display:"flex",typography:"body2",alignItems:"center",justifyContent:"center",flexDirection:"column",borderBottom:`1px solid ${C.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsxs(Nn,{children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[nt.exports.jsx(Ay,{width:16,height:16,url:null==s?void 0:s.logoURI,address:null!==(w=null==s?void 0:s.address)&&void 0!==w?w:"",marginRight:6}),nt.exports.jsx(Nn,{children:`${ha({input:a,decimals:null==s?void 0:s.decimals})} ${null==s?void 0:s.symbol}`})]}),nt.exports.jsx(Nn,{sx:{mt:4,typography:"h6",color:C.palette.text.secondary},children:f?`$${pa({input:f,showDecimals:1})}`:"-"})]}),nt.exports.jsx(Nn,{sx:{width:16,mx:16},component:W}),nt.exports.jsxs(Nn,{children:[nt.exports.jsxs(Nn,{sx:{display:"flex"},children:[nt.exports.jsx(Ay,{width:16,height:16,marginRight:6,url:null==i?void 0:i.logoURI,address:null!==(A=null==i?void 0:i.address)&&void 0!==A?A:""}),nt.exports.jsx(Do,{loading:v,loadingProps:{width:30},children:`${ha({input:l,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`})]}),nt.exports.jsx(Do,{loading:v,loadingProps:{width:30},sx:{typography:"h6",mt:4,color:C.palette.text.secondary},children:h?`$${pa({input:h,showDecimals:1})}(${c}%)`:"-"})]})]}),nt.exports.jsxs(Nn,{sx:{mt:12,display:"flex",alignItems:"center",typography:"h6"},children:[`1 ${null==s?void 0:s.symbol} = `,nt.exports.jsx(Do,{loading:v,loadingProps:{width:30},children:ha({input:new o(l).dividedBy(new o(a)),decimals:null==i?void 0:i.decimals})})," ",`${null==i?void 0:i.symbol}`]})]}),nt.exports.jsxs(Nn,{sx:{py:15,typography:"body2",borderBottom:`1px solid ${C.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",color:C.palette.text.secondary},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(Nn,{sx:{width:16,mr:7},component:P}),nt.exports.jsx(e,{id:"XeovX3",message:"Swap Detail"})]}),nt.exports.jsx(Nn,{component:Ao,children:nt.exports.jsx(Nn,{onClick:()=>L(!j),sx:{width:10,color:"text.secondary",transform:j?"rotateX(0deg)":"rotateX(180deg)"},component:I})})]}),nt.exports.jsxs(Nn,{sx:{mt:16,display:j?"initial":"none"},children:[nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"93m8jT",message:"Basic Fee"}),nt.exports.jsx(Tb,{title:nt.exports.jsx(e,{id:"8Z29ZO",message:"Estimated service provider fees"}),ml:5})]}),nt.exports.jsx(Do,{loading:v,loadingProps:{width:30},children:p?`${ha({input:p,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`:"0"})]}),nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"J39pAJ",message:"Additional Fee"}),nt.exports.jsx(Tb,{title:nt.exports.jsx(e,{id:"ZXvy7b",message:"Additional routing fees set by the Widget user"}),ml:5})]}),nt.exports.jsx(Do,{loading:v,loadingProps:{width:30},children:b?`${ha({input:b,decimals:null==i?void 0:i.decimals})} ${null==i?void 0:i.symbol}`:"0"})]}),nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"T+qgFw",message:"Price Impact"}),nt.exports.jsx(Tb,{title:nt.exports.jsx(e,{id:"4kY4C4",message:"Due to the market condition, market price and estimated price may have a slight difference"}),ml:5})]}),nt.exports.jsx(Nn,{children:`${c}%`})]}),nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"CMHmbm",message:"Slippage"}),nt.exports.jsx(Tb,{title:nt.exports.jsx(e,{id:"GAypnX",message:"High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:5})]}),nt.exports.jsxs(Nn,{children:[T,"%"]})]})]})]}),nt.exports.jsx(Nn,{sx:{flex:1}}),M&&nt.exports.jsxs(Nn,{sx:{mb:14,display:"flex",cursor:"pointer",justifyContent:"center",alignItems:"center",typography:"h6"},onClick:()=>F(!O),children:[nt.exports.jsx(Nn,{sx:{mr:4,width:18,height:18,alignItems:"center"},children:O?nt.exports.jsx(Nn,{sx:{width:"100%",height:"100%",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"secondary.main"},children:nt.exports.jsx(Nn,{component:N,sx:{width:14,color:"#1a1a1b"}})}):nt.exports.jsx(Nn,{sx:{width:"100%",height:"100%",borderRadius:4,border:`1px solid ${C.palette.text.secondary}`}})}),nt.exports.jsx(Nn,{children:nt.exports.jsx(e,{components:{0:nt.exports.jsx(Nn,{component:"span",sx:{color:"error.main"}})},values:{priceImpact:c},id:"Price impact reaches <0>{priceImpact}</0>%, accept the quote"})})]}),nt.exports.jsx(wo,{isLoading:S==Of.Pending,disabled:M&&!O,fullWidth:!0,onClick:()=>{r(),R(Hy({contractStatus:Of.Pending}))},children:S==Of.Pending?nt.exports.jsx(e,{id:"P+K/3O",message:"Confirming"}):nt.exports.jsx(e,{id:"lQ6r7x",message:"Confirm swap"})})]})})}function Nb(e){var{sx:t,maxVal:r,decimals:n=2,onInputChange:o}=e,s=bl(e,["sx","maxVal","decimals","onInputChange"]);return Tn(),nt.exports.jsx(jo,{...s,onChange:e=>{const t=0===e.target.value.length?null:ga(e.target.value,n),s=r&&t&&new i(t).gt(r)?r.toString():t;console.log("finalVal:",s),o&&o(s)}})}function Mb({open:t,onClose:r,isBridge:o}){const i=Tn(),s=ee(),a=$(fb),l=$(mb),c=E((()=>Number(a)>=50),[a]),{defaultSlippage:d}=yb(o);return nt.exports.jsx(Ry,{open:t,onClose:r,title:nt.exports.jsx(e,{id:"Tz0i8g",message:"Settings"}),children:nt.exports.jsxs(Nn,{sx:{mx:20},children:[nt.exports.jsxs(Nn,{sx:{py:20,borderTop:`1px solid ${i.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{mb:16,display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"lqTDfd",message:"Slippage Tolerance"}),nt.exports.jsx(Tb,{title:nt.exports.jsx(e,{id:"KAmxpM",message:"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:7})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",flexDirection:"column"},children:[nt.exports.jsx(Nb,{fullWidth:!0,maxVal:100,value:null!=a?a:"",placeholder:d.toString(),onInputChange:e=>{!function(e,t){null===t?localStorage.removeItem(e?"DODO_WIDGET_SLIPPAGE_BRIDGE":"DODO_WIDGET_SLIPPAGE_SWAP"):localStorage.setItem(e?"DODO_WIDGET_SLIPPAGE_BRIDGE":"DODO_WIDGET_SLIPPAGE_SWAP",String(t))}(!!o,e),s(ob(e))},suffix:nt.exports.jsx(Nn,{sx:{color:"text.disabled"},children:"%"}),height:36}),c&&nt.exports.jsx(Nn,{sx:{typography:"h6",mt:6,color:"error.main"},children:nt.exports.jsx(e,{id:"Zm56FI",message:"Maximum slippage do not exceed 50%"})})]})]}),o?"":nt.exports.jsxs(Nn,{sx:{py:20,borderTop:`1px solid ${i.palette.border.main}`},children:[nt.exports.jsxs(Nn,{sx:{mb:16,display:"flex",alignItems:"center"},children:[nt.exports.jsx(e,{id:"zSMRJ/",message:"Transaction Deadline"}),nt.exports.jsx(Tb,{title:nt.exports.jsx(e,{id:"rFbNvu",message:"If your transaction time exceeds the deadline, your transaction will be rescinded."}),ml:7})]}),nt.exports.jsx(Nb,{value:l,fullWidth:!0,height:36,placeholder:n._({id:"PC9Biq",message:"{DEFAULT_SWAP_DDL} minutes",values:{DEFAULT_SWAP_DDL:20}}),onInputChange:e=>{s((e=>t=>vl(void 0,void 0,void 0,(function*(){t({type:"SET_TRANSACTION_DDL",payload:e})})))(e?Math.max(Number(e),1):""))}})]})]})})}function Ob({toToken:t,fromToken:r,priceStatus:n,pricePerToToken:o,pricePerFromToken:i}){const[s,a]=m("-"),[l,c]=m(null),[d,u]=m("-"),[p,h]=m(null);y((()=>{a(null==r?void 0:r.symbol),u(null==t?void 0:t.symbol),c(o),h(i)}),[r,t,o,i]);const f=v((()=>{a(d),u(s),c(p),h(l)}),[s,l,d,p]);return nt.exports.jsx(Nn,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:{[bb.Initial]:"-",[bb.Loading]:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Wo,{sx:{mr:5}}),nt.exports.jsx(e,{id:"JdNn1Y",message:"Fetching best price..."})]}),[bb.Failed]:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{component:D,sx:{width:15,mr:5,color:"warning.main"}}),nt.exports.jsx(e,{id:"NVAuTg",message:"Quote not available"})]}),[bb.Success]:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{sx:{typography:"body2"},children:`1 ${s} = ${pa({input:p,showDecimals:4})} ${d}`}),nt.exports.jsx(Nn,{component:Ao,sx:{width:18,height:18,ml:6,borderRadius:"50%",backgroundColor:"border.main",display:"flex",justifyContent:"center",alignItems:"center"},children:nt.exports.jsx(Nn,{sx:{width:16,color:"text.secondary"},onClick:f,component:B})})]})}[n]})}function Ib({open:t,onClose:o,chainId:i}){r();const s=$(Wf),a=$(Pf),l=E((()=>{var e;return null!==(e=null!=i?i:a)&&void 0!==e?e:s}),[i,a,s]),[c,d]=m(null),u=c?Ef[c]:void 0,p=Fy(l),h=Vf();return nt.exports.jsx(Ry,{title:nt.exports.jsx(e,{id:"h7LgzN",message:"Connect to your wallet"}),open:t,onClose:o,children:nt.exports.jsx(Nn,{sx:{mx:20,pb:20,border:"1px solid transparent",borderTopColor:"border.main",flex:1,display:"flex",flexDirection:"column"},children:u?nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",flex:1},children:[nt.exports.jsx(Nn,{component:u.icon,sx:{width:32,height:32}}),nt.exports.jsx(Nn,{sx:{mt:8,typography:"caption"},children:n._({id:"/Ak0Fw",message:"Opening {0}...",values:{0:u.name}})}),nt.exports.jsx(Nn,{sx:{mt:8,typography:"body2",color:"text.secondary"},children:nt.exports.jsx(Wo,{})})]}):nt.exports.jsx(nt.exports.Fragment,{children:Object.values(Ef).map((t=>nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",flexDirection:"column",mt:20,p:20,backgroundColor:"background.tag",borderRadius:12,cursor:"pointer","&:hover":{backgroundColor:"hover.default"}},onClick:()=>vl(this,void 0,void 0,(function*(){try{if(d(t.type),h.chainId&&h.chainId!==l&&t.type===wf.METAMASK&&h.isMetamask&&p)return yield p(),void d(null);yield kf(t.type,l,(e=>{console.error(e),d(null)}))}catch(e){console.error(e)}d(null)})),children:[nt.exports.jsx(Nn,{component:t.icon,sx:{width:32,height:32}}),nt.exports.jsx(Nn,{sx:{mt:8,typography:"caption"},children:t.name}),nt.exports.jsx(Nn,{sx:{mt:4,typography:"body2",color:"text.secondary"},children:nt.exports.jsx(e,{id:"Uzr1HF",message:"Connect to your {0} Wallet",values:{0:t.name}})})]},t.type)))})})})}function Fb({needSwitchChain:t,needEvmChainId:r,onConnectWalletClick:n}){const{chainId:o}=Vf(),i=Uf((e=>{var t;return null===(t=e.connected)||void 0===t?void 0:t.chainId})),{chainId:s}=oe(),[a,l]=m(!1),[c,d]=m(!1),[u,p]=m(!1);let h;return r?i?s&&r===s||(h=r):h=ll.TON:t!==o&&(h=t),nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(wo,{size:wo.Size.middle,fullWidth:!0,onClick:()=>vl(this,void 0,void 0,(function*(){if(n&&h!==ll.TON){if(!r&&o&&t&&o!==t)return void p(!0);d(!0);const e=yield n();if(d(!1),e)return}h!==ll.TON?l(!0):(d(!0),yield Uf.getState().connect(),d(!1))})),"data-testid":"connect-wallet-btn",isLoading:c,children:c?nt.exports.jsx(e,{id:"J28zul",message:"Connecting..."}):h?nt.exports.jsx(e,{id:"s2dmVY",message:"Connect to a {0} wallet",values:{0:h===ll.TON?"Ton":"EVM"}}):nt.exports.jsx(e,{id:"r7ScnQ",message:"Connect to a wallet"})}),nt.exports.jsx(Ib,{open:a,onClose:()=>l(!1),chainId:h}),nt.exports.jsx(Cb,{chainId:t,open:u,onClose:()=>p(!1)})]})}var jb,Lb;function _b({chainId:e,account:t,token:r,proxyContractAddress:n}){const[i,s]=m(!1),[a,l]=m(!1),[c,d]=m(null),u=$(em).jsonRpcUrlMap,p=$(Bf),h=v((()=>vl(this,void 0,void 0,(function*(){if(!t||!e||!r)return;s(!0);const i=Object.assign(Object.assign({},cl),u)[e],a=ag(null==i?void 0:i[0],e);try{const i=yield function({account:e,tokenAddress:t,tokenDecimals:r,chainId:n,approveAddress:i,provider:s}){return vl(this,void 0,void 0,(function*(){if(!e||!t)return;const a=om[n],{DODO_APPROVE:l}=a,c=null!=i?i:l,d=new ke(t,bg,s),u=yield d.allowance(e,c),p=new o(10).pow(r);return new o(u.toString()).div(p)}))}({account:t,chainId:e,tokenAddress:r.address,tokenDecimals:r.decimals,approveAddress:n,provider:a});l(!1),d(null!=i?i:null)}catch(e){console.error(e),l(!0)}finally{s(!1)}}))),[e,r,u,n,t]);return y((()=>{h()}),[h,p]),{allowance:c,loading:i,error:a,refetch:h}}!function(e){e.All="all"}(jb||(jb={})),function(e){e.Loading="Loading",e.Insufficient="ApprovalInsufficient",e.Approving="Approving",e.Sufficient="Sufficient",e.Unchecked="Unchecked"}(Lb||(Lb={}));const Wb=({account:e,chainId:t,offset:r,contractAddress:i,skip:s})=>{var a;const l=$(Wf),c=E((()=>{var e;return om[null!==(e=t)&&void 0!==e?e:l]}),[t]),{isETH:d}=E((()=>(e=>{const t={isMainnet:1===e,isRinkeby:4===e,isGor:5===e};return Object.assign(Object.assign({},t),{isETH:t.isMainnet||t.isRinkeby||t.isGor})})(t)),[t]),{DODO_APPROVE:u}=c||{},p=null!==(a=null!=i?i:u)&&void 0!==a?a:null,h=function(e){const{account:t,chainId:r}=Vf(),n=$(Wf),i=E((()=>null!=r?r:n),[r,n]),s=$(Xf),a=v((r=>{var n,a;if(!t||!e)return null;const l=null!==(n=r.chainId)&&void 0!==n?n:i,c=ul[l];if(r.symbol===c.symbol&&fl(r.address,c.address))return new o(ug);const{DODO_APPROVE:d}=om[l]||{};if(e!==d)return null;const u=null===(a=null==s?void 0:s[r.address.toLowerCase()])||void 0===a?void 0:a.tokenAllowances;return null!=u?u:null}),[t,i,e,s]);return a}(p),[f,g]=m(),{allowance:y}=_b({chainId:t,account:e,token:f,proxyContractAddress:p}),b=$f(),{runningRequests:x}=Xy(),w=$(Kf),A=E((()=>{var e;return null===(e=ul[null!=t?t:l])||void 0===e?void 0:e.address}),[t]),C=v(((t,n,i)=>{if(!t)return Lb.Loading;if(s)return Lb.Sufficient;const a=!!(null==x?void 0:x.find((e=>e.spec.opcode===Vy.Approval&&e.spec.token.address===(null==t?void 0:t.address)))),l=null!=i?i:t?b(t):null;let c=t?h(t):null;const d=new o(null!=n?n:0);if(!e)return Lb.Unchecked;if(!l||d.minus(null!=r?r:0).gt(l))return Lb.Unchecked;if(d.isZero())return Lb.Unchecked;return t.address===A?Lb.Sufficient:a?Lb.Approving:((null==f?void 0:f.address)===t.address&&y&&(c=y),c?c&&d.minus(null!=r?r:0).gt(c)?Lb.Insufficient:Lb.Sufficient:(p===u||f&&f.address===t.address||g(t),Lb.Loading))}),[b,h,e,r,p,t,w,x,A,f,null==y?void 0:y.toString(),s]),k=v((e=>{const t=e?h(e):null;return("USDT"===(null==e?void 0:e.symbol)||(null==e?void 0:e.address.toLowerCase())==="0x6426e6017968377529487E0ef0aA4E7759724e05".toLowerCase())&&null!==t&&t.gt(0)}),[h]),T=qy(),R=ee(),S=v(((t,r)=>vl(void 0,void 0,void 0,(function*(){if(!p||!e||!t)return;const i=(e=>{let t=e.symbol;return t.indexOf("DLP_")>-1&&(t=t.replace("DLP_","")),t.indexOf("DLP")>-1&&(t=t.replace("DLP","LP")),t})(t),s=r?new o(0):void 0,a=r?n._({id:"OfhWJH",message:"Reset"}):n._({id:"Z7ZXbT",message:"Approve"});var l;(yield T.execute(`${a} ${i}`,{opcode:Vy.Approval,token:t,contract:p,amt:s}))===_y.Success&&R((l=null!=s?s:ug,e=>vl(void 0,void 0,void 0,(function*(){e({type:"SET_ACCOUNT_ALLOWANCES",payload:l})}))))}))),[p,e,t,T,R]),N=v((e=>{const t=new o(0);if(!e)return t.toString();const r=b(e);if(!r)return t.toString();return r.toString()}),[t,b,d]);return{getApprovalState:C,getPendingRest:k,getMaxBalance:N,submitApprove:S}};const Pb=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"transfer",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"transferToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"address[]",name:"tos",type:"address[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"transferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"tos",type:"address[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"transfers",outputs:[],stateMutability:"payable",type:"function"}];const Db="https://api.layerswap.io/api/v2",Bb="gNiGVhOddxMmWk4LFCR/5tDsdTECWCRlQBcW6yV8l+paqSVJBUth0wDXqA0jC16cv+Pz54+YeeKo54ioiR4n9Q",Ub=`${Db}/networks`,Vb=`${Db}/limits`,Zb=`${Db}/quote`,Hb=`${Db}/swaps`;function zb(e){return vl(this,void 0,void 0,(function*(){const t=yield fetch(e,{headers:{"X-LS-APIKEY":Bb,"Content-Type":"application/json"}}),r=yield t.json();if(r.error)throw new Error(r.error);return r.data}))}function Yb(){return vl(this,void 0,void 0,(function*(){return zb(Ub)}))}function Gb({fromAddress:e,toAddress:t,fromToken:r,toToken:n,fromNetworkName:i,toNetworkName:s,fromAmount:a,slippage:l,provider:c,params:d}){var u,p,h,f,m;return vl(this,void 0,void 0,(function*(){if(!(r&&n&&i&&s&&e&&t))return;const g=yield fetch(Hb,{method:"POST",headers:{"X-LS-APIKEY":Bb,"Content-Type":"application/json"},body:JSON.stringify({destination_address:t,source_address:e,source_network:i,source_token:r.symbol,destination_network:s,destination_token:n.symbol,use_deposit_address:!1,amount:a,slippage:l})}),y=yield g.json();if(y.error)throw new Error(y.error);const{swap:b}=y.data,{id:v,source_token:x}=b,w=`${Hb}/${v}/deposit_actions`,E=yield zb(w),A=null===(u=null==E?void 0:E.find((e=>!0)))||void 0===u?void 0:u.to_address,C=(null===(p=null==E?void 0:E.find((e=>!0)))||void 0===p?void 0:p.amount)||0,k=null===(h=null==E?void 0:E.find((e=>!0)))||void 0===h?void 0:h.call_data;if(!k||!A)throw new Error("No deposit action found in the swap response");if(r.chainId===ll.TON){const t=yield((e,t,r,n,o)=>vl(void 0,void 0,void 0,(function*(){const i=JSON.parse(o);if(t.contract){const e=ve.parse(r),o=ve.parse(n),s=xe().storeUint(0,32).storeStringTail(i.comment).endCell(),a=xe().storeUint(260734629,32).storeUint(0,64).storeCoins(i.amount).storeAddress(e).storeAddress(e).storeBit(0).storeCoins(Ae("0.00002")).storeBit(1).storeRef(s).endCell(),l=ve.parse(t.contract),c=Uf.getState().client;if(!c)throw new Error("No Ton Connect client available");const d=c.open(Ce.create(l)),u=yield d.getWalletAddress(o);return{validUntil:Math.floor(Date.now()/1e3)+360,messages:[{address:u.toString(),amount:Ae("0.045").toString(),payload:a.toBoc().toString("base64")}]}}{const t=xe().storeUint(0,32).storeStringTail(i.comment).endCell();return{validUntil:Math.floor(Date.now()/1e3)+360,messages:[{address:r,amount:Ae(e).toString(),payload:t.toBoc().toString("base64")}]}}})))(C,x,A,e,k),{tonConnectUI:r,client:n}=Uf.getState();if(!r||!n)throw new Error("No tonConnectUI or client available");const o=yield r.sendTransaction(t),i=(T=o.boc,we.fromBase64(T).hash().toString("base64"));d.onSubmit&&d.onSubmit(i);const s=yield((e,t)=>vl(void 0,void 0,void 0,(function*(){const{boc:r,refetchInterval:n=2e3,refetchLimit:o,address:i}=e;return new Promise((e=>{let s=0;const a=ve.parse(i),l=we.fromBase64(r).hash().toString("base64"),c=setInterval((()=>vl(void 0,void 0,void 0,(function*(){s+=1;const r=yield t.getContractState(a);if(!r||!r.lastTransaction)return clearInterval(c),void e(null);const n=r.lastTransaction.lt,i=r.lastTransaction.hash,d=yield t.getTransaction(a,n,i);d&&d.inMessage&&xe().store(Ee(d.inMessage)).endCell().hash().toString("base64")===l&&(clearInterval(c),e(d)),o&&s>=o&&(clearInterval(c),e(null))}))),n)}))})))({boc:o.boc,address:e},n);return d.onSuccess&&d.onSuccess(null!==(m=null===(f=null==s?void 0:s.hash())||void 0===f?void 0:f.toString("base64"))&&void 0!==m?m:i,{tonTransaction:s}),s}{if(!c)throw new Error("Invalid provider");const t=new o(C).times(10**r.decimals).toString();let n="0x0",i="0x";gl(r.address)?n=t:i=k;const s={value:n,data:i,to:r.address,from:e,chainId:r.chainId};try{const e=yield By(s,c),t=e.hash;d.onSubmit&&d.onSubmit(t);const r=yield e.wait(1);return r.status===Wy.Success?d.onSuccess&&d.onSuccess(t,{receipt:r}):r.status===Wy.Failed&&d.onError&&d.onError(new Error("Transaction failed")),r}catch(e){if(d.onError)return d.onError(e),null}}var T}))}function Xb({skip:e,data:{fromToken:t,toToken:r,fromAmount:n,fromAddress:i,toAddress:s,slippage:a}}){var l,c,d,u,h,f;const{provider:m}=oe(),g=Oe({queryKey:["layerSwap","networkQuery"],enabled:!e,queryFn:Yb});let y=null;t&&(y=t.chainId===ll.TON?null===(l=g.data)||void 0===l?void 0:l.find((e=>"TON_MAINNET"===e.name)):null===(c=g.data)||void 0===c?void 0:c.find((e=>e.chain_id===String(t.chainId)&&"evm"===e.type)));const b=null==y?void 0:y.name;let v=null;r&&(v=r.chainId===ll.TON?null===(d=g.data)||void 0===d?void 0:d.find((e=>"TON_MAINNET"===e.name)):null===(u=g.data)||void 0===u?void 0:u.find((e=>e.chain_id===String(r.chainId)&&"evm"===e.type)));const x=null==v?void 0:v.name,w=Oe({queryKey:["layerSwap","limitQuery",null==t?void 0:t.address,null==r?void 0:r.address,x],enabled:!e&&!!(t&&r&&x),queryFn:()=>function({fromToken:e,toToken:t,fromNetworkName:r,toNetworkName:n}){return vl(this,void 0,void 0,(function*(){if(e&&t&&r&&n)return yield zb(`${Vb}?source_network=${r}&source_token=${e.symbol}&destination_network=${n}&destination_token=${t.symbol}`)}))}({fromToken:t,toToken:r,fromNetworkName:b,toNetworkName:x})}),E=Oe({queryKey:["layerSwap","quoteQuery",null==t?void 0:t.address,null==r?void 0:r.address,x,n],enabled:!e&&!!(t&&r&&x&&n),refetchInterval:15e3,queryFn:()=>vl(this,void 0,void 0,(function*(){var e;if(!t||!r||!x)return;const l=yield function({fromToken:e,toToken:t,fromNetworkName:r,toNetworkName:n,slippage:o,fromAmount:i}){return vl(this,void 0,void 0,(function*(){if(e&&t&&r&&n&&i)return yield zb(`${Zb}?source_network=${r}&source_token=${e.symbol}&destination_network=${n}&destination_token=${t.symbol}&slippage=${o}&amount=${i}`)}))}({fromToken:t,toToken:r,fromNetworkName:b,toNetworkName:x,fromAmount:n,slippage:a});if(!l)throw new Error("Failed to get quote");const{quote:c}=l,d="layerswap",u=d.charAt(0).toUpperCase()+d.slice(1),p=function(e){const t=e.split(".")[0];return 60*parseInt(t.slice(0,2),10)*60+60*parseInt(t.slice(3,5),10)+parseInt(t.slice(6),10)}(c.avg_completion_time);return{key:`layerswap-${c.receive_amount}-${n}-${t.address}-${r.address}`,id:d,product:d,fromChainId:t.chainId,toChainId:r.chainId,fromAddress:i,toAddress:s,fromAmount:n,toTokenAmount:new o(c.receive_amount),fromToken:t,toToken:r,feeUSD:null!==(e=String(c.total_fee_in_usd))&&void 0!==e?e:"-",roundedRouteCostTime:p,executionDuration:p,productParams:null,spenderContractAddress:void 0,step:{type:"cross",tool:d,approvalAddress:void 0,toolDetails:{key:d,logoURI:"https://images.dodoex.io/PI0Kb_gccJbkOIpRNof2CUmeiyiPof28wrEH86RAlIE/rs:fit:160:160:0/g:no/aHR0cHM6Ly9zdG9yYWdlLmdvb2dsZWFwaXMuY29tL2RvZG8tbWVkaWEtc3RhZ2luZy91cGxvYWRfaW1nXzQwMTA2NzFfMjAyMzExMTYxMTE1MTM5ODAud2VicA.webp",name:u}}}}))}),A=p.useMemo((()=>n?g.isLoading||w.isLoading||E.isLoading?Jb.Loading:g.isError||E.error?Jb.Failed:E.data?Jb.Success:Jb.Initial:Jb.Initial),[g,w,E,n]),C=p.useMemo((()=>{var e,o;return E.data?Object.assign(Object.assign({},E.data),{sendData:e=>Gb({fromAddress:i,toAddress:s,fromToken:t,toToken:r,fromNetworkName:b,toNetworkName:x,fromAmount:n,provider:m,params:e}),minAmt:null===(e=w.data)||void 0===e?void 0:e.min_amount,maxAmt:null===(o=w.data)||void 0===o?void 0:o.max_amount}):null}),[w.data,E.data,i,s,t,r,b,x,n,m]);return{status:A,router:C,limit:w.data?{minAmt:null===(h=w.data)||void 0===h?void 0:h.min_amount,maxAmt:null===(f=w.data)||void 0===f?void 0:f.max_amount}:null}}var Jb,qb,Qb;function Kb({toToken:e,fromToken:t,fromAmount:r,fromFiatPrice:n,fromAddress:i,toAddress:s}){var a,l,c;const{account:d,provider:u}=Vf(),{defaultSlippage:p,loading:h}=yb(!0),f=$(fb)||p,{apikey:g}=$(em),y=oe(),b=Uf(),[x,w]=m(Jb.Initial),[A,C]=m([]),k=pb(ab.bridgeRoutePrice),T=E((()=>(null==e?void 0:e.chainId)===ll.TON&&(null==t?void 0:t.chainId)!==(null==e?void 0:e.chainId)),[t,e]),R=E((()=>(null==t?void 0:t.chainId)===ll.TON&&(null==t?void 0:t.chainId)!==(null==e?void 0:e.chainId)||(null==e?void 0:e.chainId)===ll.TON&&(null==t?void 0:t.chainId)!==(null==e?void 0:e.chainId)),[t,e]),S=function({skip:e}={}){const t=Oe({queryKey:["orbiterRouters"],enabled:!e,queryFn:()=>vl(this,void 0,void 0,(function*(){const e=yield fetch("https://api.orbiter.finance/sdk/routers/v2"),t=yield e.json();if("success"!==t.status)throw new Error(t.message);const r=t.result,n=[],o=new Set,i="orbiter";return r.forEach((e=>{const t=e.line,[r,s]=t.split("-"),[a,l]=s.split("/"),c="TON"===e.srcChain.toLocaleUpperCase()?ll.TON:Number(e.srcChain),d="TON"===e.tgtChain.toLocaleUpperCase()?ll.TON:Number(e.tgtChain);if("available"!==e.state||!c||!d||c!==ll.TON&&d!==ll.TON)return;const u=`orbiter-${c}-${d}-${e.endpoint.toLocaleLowerCase()}-${a.toLocaleLowerCase()}-${l.toLocaleLowerCase()}`;if(o.has(u))return;o.add(u);const p=e.srcToken,h=e.tgtToken;n.push({key:u,id:i,fromChainId:c,toChainId:d,fromTokenAddress:p,toTokenAddress:h,product:i,endpoint:e.endpoint,minAmt:e.minAmt,maxAmt:e.maxAmt,withholdingFee:e.withholdingFee,tradeFee:e.tradeFee,spentTime:e.spentTime,vc:e.vc})})),n}))});return t}({skip:!T}),N=function({skip:e}={}){return Oe({queryKey:["orbiterContractList"],enabled:!e,queryFn:()=>vl(this,void 0,void 0,(function*(){const e=yield fetch("https://api.orbiter.finance/sdk/chains"),t=yield e.json();if("success"!==t.status)throw new Error(t.message);const r=t.result,n=new Map;return r.forEach((e=>{const t=Number(e.chainId),r=e.contracts.find((e=>"OrbiterRouterV3"===e.name));(null==r?void 0:r.address)&&n.set(t,r.address)})),{bridgeContractMap:n}}))})}({skip:!T}),M=Xb({skip:!R,data:{toToken:e,fromToken:t,fromAmount:r,fromAddress:null!=i?i:(null==t?void 0:t.chainId)===ll.TON?null===(a=b.connected)||void 0===a?void 0:a.account:y.account,toAddress:null!=s?s:(null==e?void 0:e.chainId)===ll.TON?null===(l=b.connected)||void 0===l?void 0:l.account:y.account,slippage:Number(f)}}),O=v((()=>vl(this,void 0,void 0,(function*(){var n;const a=null==t?void 0:t.chainId,l=null==e?void 0:e.chainId;if(T||R)return;if(!(a&&l&&a!==l&&t&&e&&r))return void w(Jb.Initial);if(w(Jb.Loading),h)return;const c=t.address,p=e.address,m=null!=i?i:d||gb,y=null!=s?s:d||gb,b=Number(f)/100,v={fromAddress:m,fromAmount:K(String(r||1),t.decimals).toString(),fromChainId:a,fromTokenAddress:c,toAddress:y,toChainId:l,toTokenAddress:p,options:{slippage:b},products:["lifi","hyphen","nabox","bungee","swft","stargate","connext","squid","across","layerswap","okx","symbiosis","scroll","manta","orbiter"]};try{const i=Date.now(),s=(yield Re.post(`${k}${g?`?apikey=${g}`:""}`,{data:v})).data.data,c=[];if((null===(n=null==s?void 0:s.routes)||void 0===n?void 0:n.length)&&s.routes.forEach(((n,s)=>{if(n){const{toAmount:d,feeUSD:u,executionDuration:p,product:h,step:f,fee:g,encodeParams:v,productParams:x}=n;if(f&&null!==d){const n=new o(d);if(!n.isNaN()&&n.gt(0)){const{tool:w,toolDetails:E,type:A,includedSteps:C,approvalAddress:k}=f;if(C&&C.length>0&&w&&E&&E.name&&E.logoURI&&A&&k){const f=[];if(C.forEach((e=>{e&&e.id&&e.type&&e.tool&&e.toolDetails&&e.toolDetails.name&&e.toolDetails.logoURI&&e.estimate&&e.estimate.fromAmount&&e.estimate.fromToken&&e.estimate.fromToken.decimals&&e.estimate.toAmount&&e.estimate.toToken&&e.estimate.toToken.decimals&&f.push({id:e.id,tool:e.tool,toolDetails:{name:e.toolDetails.name,logoURI:e.toolDetails.logoURI},type:e.type,estimate:{fromToken:e.estimate.fromToken,toToken:e.estimate.toToken,fromTokenAmount:new o(e.estimate.fromAmount).div(`1e${e.estimate.fromToken.decimals}`),toTokenAmount:new o(e.estimate.toAmount).div(`1e${e.estimate.toToken.decimals}`)}})})),f.length>0){const o={key:`${h}-${d}-${u}-${s}`,id:h,fromChainId:a,toChainId:l,fromToken:t,toToken:e,fromAmount:r,toTokenAmount:n.div(`1e${e.decimals}`),fromAddress:m,toAddress:y,product:h,slippage:b,roundedRouteCostTime:(Date.now()-i)/1e3,spenderContractAddress:null!=k?k:"0x",feeUSD:u,executionDuration:p,step:{tool:w,toolDetails:{name:E.name,logoURI:E.logoURI},type:A,includedSteps:f},encodeParams:v,productParams:x,sourceRoute:{toAmount:d,feeUSD:u,executionDuration:p,step:{tool:w,toolDetails:E,type:A,approvalAddress:k,includedSteps:C},fee:g}};c.push(o)}}}}}})),C(c),c.length?w(Jb.Success):w(Jb.Failed),!d||!u)return}catch(e){w(Jb.Failed),console.error(e)}}))),[d,e,f,t,u,r,g,k,h,T,i,s]);sb({refetch:O});const[I,F]=E((()=>{var a,l,c,d;let u=y.account,p=null===(a=b.connected)||void 0===a?void 0:a.account;if((null==t?void 0:t.chainId)===ll.TON&&(u=null===(l=b.connected)||void 0===l?void 0:l.account,p=y.account),void 0!==i&&(u=i),void 0!==s&&(p=s),!(T&&S.data&&t&&e&&r&&u&&p))return[Jb.Initial,null];if(S.isLoading||N.isLoading)return[Jb.Loading,null];const h=null===(d=null===(c=N.data)||void 0===c?void 0:c.bridgeContractMap)||void 0===d?void 0:d.get(t.chainId);if(S.error||N.error||!h)return[Jb.Failed,null];const f=S.data.find((r=>r.fromTokenAddress.toLocaleLowerCase()===t.address.toLocaleLowerCase()&&r.toTokenAddress.toLocaleLowerCase()===e.address.toLocaleLowerCase()));if(!f)return[Jb.Success,null];const m=new o(r),g=m.minus(f.withholdingFee||0),v=g.times(f.tradeFee||0),x=v.plus(f.withholdingFee||0),w=g.minus(v),E=f.product.charAt(0).toUpperCase()+f.product.slice(1),A=function({route:e,fromAddress:t,toAddress:r,fromAmount:n,fromToken:o,contractAddress:i}){const s=`c=${e.vc}&t=${r}`,a=n.times(10**o.decimals).toString(),l=al(e.endpoint);let c="",d="0x0";return gl(o.address)?(c=new ng(Pb).encodeFunctionData("transfer",[l,Da(ac(s))]),d=a):c=new ng(Pb).encodeFunctionData("transferToken",[o.address,l,a,Da(ac(s))]),{data:c,to:al(i),value:d,from:t,chainId:o.chainId}}({route:f,fromAddress:u,toAddress:p,fromAmount:m,fromToken:t,contractAddress:h}),C=Number(f.spentTime);return[Jb.Success,Object.assign(Object.assign({},f),{fromAddress:u,toAddress:p,fromAmount:r,toTokenAmount:w,fromToken:t,toToken:e,feeUSD:n?x.times(n).toString():"-",roundedRouteCostTime:C,executionDuration:C,encodeResultData:A,productParams:null,spenderContractAddress:h,step:{type:"cross",tool:f.product,approvalAddress:h,toolDetails:{key:f.product,logoURI:"https://storage.googleapis.com/dodo-media-staging/upload_img_679714_20240809095516856.svg",name:E}}})]}),[T,S,e,t,r,n,y.account,null===(c=b.connected)||void 0===c?void 0:c.account,N,i,s]),j=E((()=>r?M.router?[M.router]:F?[F]:A:[]),[x,r,A,F,M]);return{status:E((()=>F?I:R?M.status:T?I:x),[x,I,T,R,M,F]),refetch:O,bridgeRouteList:j,limit:E((()=>M.limit?M.limit:(null==F?void 0:F.minAmt)||(null==F?void 0:F.maxAmt)?{minAmt:F.minAmt?Number(F.minAmt):void 0,maxAmt:F.maxAmt?Number(F.maxAmt):void 0}:null),[x,r,A,F,M])}}function $b(){return $b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$b.apply(this,arguments)}!function(e){e.Initial="Initial",e.Loading="Loading",e.Failed="Failed",e.Success="Success"}(Jb||(Jb={}));var ev,tv;function rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rv.apply(this,arguments)}var nv,ov;function iv(){return iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iv.apply(this,arguments)}var sv,av,lv;function cv(){return cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cv.apply(this,arguments)}var dv,uv;function pv(){return pv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pv.apply(this,arguments)}var hv,fv,mv,gv;function yv(){return yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yv.apply(this,arguments)}var bv,vv,xv;function wv(){return wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wv.apply(this,arguments)}var Ev,Av,Cv,kv,Tv,Rv;function Sv(){return Sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sv.apply(this,arguments)}var Nv,Mv;function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ov.apply(this,arguments)}var Iv,Fv,jv,Lv,_v,Wv;function Pv(){return Pv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pv.apply(this,arguments)}var Dv,Bv,Uv;function Vv(){return Vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vv.apply(this,arguments)}var Zv,Hv;function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zv.apply(this,arguments)}var Yv,Gv;function Xv(){return Xv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xv.apply(this,arguments)}var Jv,qv;function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qv.apply(this,arguments)}var Kv;function $v(){return $v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$v.apply(this,arguments)}const ex=[{id:"cBridge",logoURI:function(e){return u.createElement("svg",wv({width:34,height:34,viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),bv||(bv=u.createElement("rect",{x:1,y:1,width:32,height:32,rx:8,fill:"white",stroke:"#33363F"})),vv||(vv=u.createElement("g",{clipPath:"url(#clip0_37_1169)"},u.createElement("path",{d:"M10.9221 22C13.0882 22 14.8442 21.2006 14.8442 20.2144C14.8442 19.2283 13.0882 18.4288 10.9221 18.4288C8.75599 18.4288 7 19.2283 7 20.2144C7 21.2006 8.75599 22 10.9221 22Z",fill:"#444444"}),u.createElement("path",{d:"M23.5587 22C25.7248 22 27.4808 21.2006 27.4808 20.2144C27.4808 19.2283 25.7248 18.4288 23.5587 18.4288C21.3926 18.4288 19.6366 19.2283 19.6366 20.2144C19.6366 21.2006 21.3926 22 23.5587 22Z",fill:"#DDDDDD"}),u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.88456 20.2144C9.84901 20.2146 9.81379 20.2076 9.78098 20.1939C9.74818 20.1802 9.71844 20.1601 9.69353 20.1347C9.66862 20.1094 9.64903 20.0793 9.63593 20.0462C9.62283 20.0132 9.61648 19.9779 9.61725 19.9423C9.7509 15.5317 13.1124 12 17.2394 12C21.3663 12 24.7278 15.5317 24.8615 19.9423C24.8622 19.9779 24.8559 20.0132 24.8428 20.0462C24.8297 20.0793 24.8101 20.1094 24.7852 20.1347C24.7603 20.1601 24.7306 20.1802 24.6977 20.1939C24.6649 20.2076 24.6297 20.2146 24.5942 20.2144H22.0874C22.0152 20.2135 21.946 20.1848 21.8943 20.1344C21.8426 20.0839 21.8123 20.0155 21.8096 19.9433C21.6894 17.1106 19.6894 14.8567 17.2403 14.8567C14.7913 14.8567 12.7913 17.1106 12.6711 19.9433C12.6684 20.0155 12.638 20.0839 12.5863 20.1344C12.5346 20.1848 12.4655 20.2135 12.3932 20.2144H9.88456Z",fill:"#FF957E"}))),xv||(xv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_37_1169"},u.createElement("rect",{width:20.4808,height:10,fill:"white",transform:"translate(7 12)"})))))},name:"cBridge"},{id:"stargate",logoURI:function(e){return u.createElement("svg",Pv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Iv||(Iv=u.createElement("path",{d:"M0.5 8C0.5 3.85786 3.85786 0.5 8 0.5H24C28.1421 0.5 31.5 3.85786 31.5 8V24C31.5 28.1421 28.1421 31.5 24 31.5H8C3.85786 31.5 0.5 28.1421 0.5 24V8Z",fill:"black",stroke:"black"})),Fv||(Fv=u.createElement("path",{d:"M17.5867 8.63649L18.0125 9.63382C18.8482 11.592 20.4079 13.1518 22.3662 13.9875L23.3635 14.4133C23.6245 14.5246 23.8365 14.6842 24 14.8743C23.5033 11.3132 20.6868 8.49629 17.1257 8C17.3154 8.16317 17.4754 8.37546 17.5867 8.63649Z",fill:"#999999"})),jv||(jv=u.createElement("path",{d:"M8.63649 14.4133L9.63382 13.9875C11.592 13.1518 13.1518 11.592 13.9879 9.63382L14.4133 8.63649C14.525 8.37546 14.6846 8.16317 14.8743 8C11.3132 8.49629 8.49667 11.3132 8 14.8743C8.16357 14.6842 8.37548 14.5246 8.63649 14.4133Z",fill:"#999999"})),Lv||(Lv=u.createElement("path",{d:"M23.3635 17.5863L22.3662 18.0121C20.4079 18.8479 18.8482 20.408 18.0125 22.3662L17.5867 23.3632C17.4754 23.6242 17.3154 23.8365 17.1257 24C20.6868 23.5034 23.5033 20.6865 24 17.1253C23.8365 17.3154 23.6245 17.475 23.3635 17.5863Z",fill:"#999999"})),_v||(_v=u.createElement("path",{d:"M14.4133 23.3632L13.9879 22.3662C13.1518 20.408 11.592 18.8479 9.63382 18.0121L8.63649 17.5863C8.37548 17.475 8.16357 17.3154 8 17.1253C8.49667 20.6865 11.3132 23.5034 14.8743 24C14.6846 23.8365 14.525 23.6242 14.4133 23.3632Z",fill:"#999999"})),Wv||(Wv=u.createElement("path",{d:"M12.3715 15.2177L12.863 15.0078C13.8278 14.5959 14.5966 13.8275 15.0086 12.8626L15.2181 12.3711C15.512 11.6827 16.4879 11.6827 16.7818 12.3711L16.9913 12.8626C17.4032 13.8275 18.172 14.5959 19.1369 15.0078L19.6284 15.2177C20.3168 15.5116 20.3168 16.4872 19.6284 16.7811L19.1369 16.991C18.172 17.4029 17.4032 18.1713 16.9913 19.1366L16.7818 19.6276C16.4879 20.3161 15.512 20.3161 15.2181 19.6276L15.0086 19.1366C14.5966 18.1713 13.8278 17.4029 12.863 16.991L12.3715 16.7811C11.6831 16.4872 11.6831 15.5116 12.3715 15.2177Z",fill:"#F2F2F2"})))},name:"Stargate"},{id:"connext",logoURI:function(e){return u.createElement("svg",Sv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ev||(Ev=u.createElement("rect",{width:32,height:32,rx:8,fill:"black"})),Av||(Av=u.createElement("path",{d:"M13.0566 9.12524C13.0566 9.12524 12.31 9.87191 11.4353 10.7466L7.90996 14.2399C6.46996 15.7066 7.0353 17.1999 8.03796 18.2026L10.918 21.0826C11.174 21.3386 12.1766 22.3946 12.9766 21.5732C13.4406 21.1092 13.3393 20.3892 13.078 20.1066L9.76063 16.8159C9.16863 16.2239 9.4513 15.6852 10.0433 15.1199L12.8753 12.2879L14.6513 14.0639C15.27 14.6826 16.038 14.9119 16.6833 14.2719C17.3286 13.6266 16.9393 13.0132 16.3206 12.3946L14.3633 10.4372L13.0566 9.12524Z",fill:"url(#paint0_linear_5431_181414)"})),Cv||(Cv=u.createElement("path",{d:"M13.2112 9.25332C12.7472 8.78932 12.0805 8.53332 11.4352 9.17865C10.7898 9.82399 11.1258 10.544 11.5365 10.9547",fill:"url(#paint1_linear_5431_181414)"})),kv||(kv=u.createElement("path",{d:"M18.9218 22.8638C18.9218 22.8638 19.6685 22.1171 20.5432 21.2424L24.0685 17.7171C25.5352 16.2504 24.9698 14.7571 23.9405 13.7544L21.0605 10.9011C20.8045 10.6451 19.8018 9.5891 19.0018 10.4104C18.5378 10.8744 18.6392 11.5944 18.9005 11.8771L22.2178 15.1678C22.8098 15.7598 22.5272 16.2984 21.9352 16.8638L19.1032 19.6958L17.3272 17.9198C16.7085 17.3011 15.9405 17.0718 15.2952 17.7118C14.6498 18.3518 15.0392 18.9704 15.6578 19.5891L17.6152 21.5464L18.9218 22.8638Z",fill:"url(#paint2_linear_5431_181414)"})),Tv||(Tv=u.createElement("path",{d:"M18.7671 22.7306C19.2311 23.1946 19.8978 23.4772 20.5431 22.8319C21.1884 22.1866 20.8524 21.4666 20.4418 21.0559",fill:"url(#paint3_linear_5431_181414)"})),Rv||(Rv=u.createElement("defs",null,u.createElement("linearGradient",{id:"paint0_linear_5431_181414",x1:7.86029,y1:12.5047,x2:23.8117,y2:22.7959,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29C1FC"}),u.createElement("stop",{offset:.5022,stopColor:"#AB00FF"}),u.createElement("stop",{offset:.5082,stopColor:"#AC03FC"}),u.createElement("stop",{offset:.6406,stopColor:"#C840B8"}),u.createElement("stop",{offset:.7601,stopColor:"#DE7082"}),u.createElement("stop",{offset:.8629,stopColor:"#EE935B"}),u.createElement("stop",{offset:.9448,stopColor:"#F7A844"}),u.createElement("stop",{offset:.9956,stopColor:"#FBB03B"})),u.createElement("linearGradient",{id:"paint1_linear_5431_181414",x1:10.2949,y1:8.73084,x2:26.2463,y2:19.0221,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29C1FC"}),u.createElement("stop",{offset:.5022,stopColor:"#AB00FF"}),u.createElement("stop",{offset:.5082,stopColor:"#AC03FC"}),u.createElement("stop",{offset:.6406,stopColor:"#C840B8"}),u.createElement("stop",{offset:.7601,stopColor:"#DE7082"}),u.createElement("stop",{offset:.8629,stopColor:"#EE935B"}),u.createElement("stop",{offset:.9448,stopColor:"#F7A844"}),u.createElement("stop",{offset:.9956,stopColor:"#FBB03B"})),u.createElement("linearGradient",{id:"paint2_linear_5431_181414",x1:9.46092,y1:10.0213,x2:25.4123,y2:20.3125,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29C1FC"}),u.createElement("stop",{offset:.5022,stopColor:"#AB00FF"}),u.createElement("stop",{offset:.5082,stopColor:"#AC03FC"}),u.createElement("stop",{offset:.6406,stopColor:"#C840B8"}),u.createElement("stop",{offset:.7601,stopColor:"#DE7082"}),u.createElement("stop",{offset:.8629,stopColor:"#EE935B"}),u.createElement("stop",{offset:.9448,stopColor:"#F7A844"}),u.createElement("stop",{offset:.9956,stopColor:"#FBB03B"})),u.createElement("linearGradient",{id:"paint3_linear_5431_181414",x1:7.01942,y1:13.8057,x2:22.9708,y2:24.0969,gradientUnits:"userSpaceOnUse"},u.createElement("stop",{stopColor:"#29C1FC"}),u.createElement("stop",{offset:.5022,stopColor:"#AB00FF"}),u.createElement("stop",{offset:.5082,stopColor:"#AC03FC"}),u.createElement("stop",{offset:.6406,stopColor:"#C840B8"}),u.createElement("stop",{offset:.7601,stopColor:"#DE7082"}),u.createElement("stop",{offset:.8629,stopColor:"#EE935B"}),u.createElement("stop",{offset:.9448,stopColor:"#F7A844"}),u.createElement("stop",{offset:.9956,stopColor:"#FBB03B"})))))},name:"Connext"},{id:"synapse",logoURI:function(e){return u.createElement("svg",Vv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),u.createElement("mask",{id:"mask0_419_48383",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:32,height:32},Dv||(Dv=u.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z",fill:"black"}))),Bv||(Bv=u.createElement("g",{mask:"url(#mask0_419_48383)"},u.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z",fill:"#121826"}),u.createElement("path",{d:"M15.9794 7C15.5251 7 15.1568 7.36058 15.1568 7.80538C15.1568 8.25017 15.5251 8.61075 15.9794 8.61075C16.4337 8.61075 16.802 8.25017 16.802 7.80538C16.802 7.36058 16.4337 7 15.9794 7Z",fill:"url(#paint0_radial_419_48383)"}),u.createElement("path",{d:"M15.9794 7.44297C16.1839 7.44297 16.3496 7.60522 16.3496 7.80537C16.3496 8.00551 16.1839 8.16776 15.9794 8.16776C15.775 8.16776 15.6093 8.00551 15.6093 7.80537C15.6093 7.60522 15.775 7.44293 15.9794 7.44293V7.44297ZM12.4422 9.13423C11.9879 9.13423 11.6196 9.49481 11.6196 9.93961C11.6196 10.3844 11.9878 10.7449 12.4422 10.7449C12.8965 10.7449 13.2648 10.3844 13.2648 9.93961C13.2648 9.49481 12.8965 9.13423 12.4422 9.13423ZM19.599 9.17448C19.1446 9.17448 18.7764 9.53506 18.7764 9.97986C18.7764 10.4247 19.1446 10.7852 19.599 10.7852C20.0533 10.7852 20.4216 10.4247 20.4216 9.97986C20.4216 9.53506 20.0533 9.17448 19.599 9.17448V9.17448Z",fill:"url(#paint1_radial_419_48383)"}),u.createElement("path",{d:"M12.4422 9.57715C12.6466 9.57715 12.8124 9.7394 12.8124 9.93958C12.8124 10.1397 12.6466 10.302 12.4422 10.302C12.2377 10.302 12.072 10.1397 12.072 9.93958C12.072 9.7394 12.2377 9.57715 12.4422 9.57715ZM19.599 9.6174C19.8034 9.6174 19.9691 9.77965 19.9691 9.97984C19.9691 10.18 19.8034 10.3422 19.599 10.3422C19.3945 10.3422 19.2288 10.18 19.2288 9.97984C19.2288 9.77969 19.3945 9.6174 19.599 9.6174V9.6174ZM15.9794 10.9866C15.457 10.9866 15.0334 11.4012 15.0334 11.9127C15.0334 12.4242 15.457 12.8389 15.9794 12.8389C16.5019 12.8389 16.9255 12.4242 16.9255 11.9127C16.9255 11.4012 16.5019 10.9866 15.9794 10.9866ZM8.8226 11.1074C8.3683 11.1074 8 11.4679 8 11.9127C8 12.3575 8.3683 12.7181 8.8226 12.7181C9.27695 12.7181 9.64525 12.3575 9.64525 11.9127C9.64525 11.4679 9.27695 11.1074 8.8226 11.1074ZM23.1774 11.1074C22.723 11.1074 22.3548 11.4679 22.3548 11.9127C22.3548 12.3575 22.723 12.7181 23.1774 12.7181C23.6317 12.7181 24 12.3575 24 11.9127C24 11.4679 23.6317 11.1074 23.1774 11.1074V11.1074Z",fill:"url(#paint2_radial_419_48383)"}),u.createElement("path",{d:"M15.9794 11.4295C16.252 11.4295 16.473 11.6458 16.473 11.9127C16.473 12.1796 16.252 12.3959 15.9794 12.3959C15.7068 12.3959 15.4859 12.1796 15.4859 11.9127C15.4859 11.6458 15.7068 11.4295 15.9794 11.4295V11.4295ZM8.82261 11.5503C9.02706 11.5503 9.19281 11.7126 9.19281 11.9127C9.19281 12.1129 9.02706 12.2751 8.82261 12.2751C8.61817 12.2751 8.45245 12.1129 8.45245 11.9127C8.45245 11.7126 8.61817 11.5503 8.82261 11.5503V11.5503ZM23.1774 11.5503C23.3818 11.5503 23.5476 11.7126 23.5476 11.9127C23.5476 12.1129 23.3818 12.2751 23.1774 12.2751C22.973 12.2751 22.8072 12.1129 22.8072 11.9127C22.8072 11.7126 22.973 11.5503 23.1774 11.5503ZM12.3188 13C11.7963 13 11.3727 13.4146 11.3727 13.9261C11.3727 14.4377 11.7963 14.8523 12.3188 14.8523C12.8412 14.8523 13.2648 14.4377 13.2648 13.9261C13.2648 13.4146 12.8412 13 12.3188 13ZM19.599 13C19.0765 13 18.653 13.4146 18.653 13.9261C18.653 14.4377 19.0765 14.8523 19.599 14.8523C20.1214 14.8523 20.545 14.4377 20.545 13.9261C20.545 13.4146 20.1214 13 19.599 13Z",fill:"url(#paint3_radial_419_48383)"}),u.createElement("path",{d:"M12.3187 13.443C12.5913 13.443 12.8123 13.6593 12.8123 13.9262C12.8123 14.1931 12.5913 14.4094 12.3187 14.4094C12.0461 14.4094 11.8252 14.1931 11.8252 13.9262C11.8252 13.6593 12.0461 13.443 12.3187 13.443ZM19.599 13.443C19.8715 13.443 20.0925 13.6593 20.0925 13.9262C20.0925 14.1931 19.8715 14.4094 19.599 14.4094C19.3264 14.4094 19.1054 14.1931 19.1054 13.9262C19.1054 13.6593 19.3264 13.443 19.599 13.443Z",fill:"url(#paint4_radial_419_48383)"}),u.createElement("path",{d:"M8.8226 15.1745C8.3683 15.1745 8 15.5351 8 15.9799C8 16.4247 8.3683 16.7853 8.8226 16.7853C9.27695 16.7853 9.64525 16.4247 9.64525 15.9799C9.64525 15.5351 9.27695 15.1745 8.8226 15.1745ZM23.1774 15.1745C22.723 15.1745 22.3548 15.5351 22.3548 15.9799C22.3548 16.4247 22.723 16.7853 23.1774 16.7853C23.6317 16.7853 24 16.4247 24 15.9799C24 15.5351 23.6317 15.1745 23.1774 15.1745ZM16.0206 15.2953C16.4067 15.2953 16.7198 15.6018 16.7198 15.9799C16.7198 16.358 16.4067 16.6645 16.0206 16.6645C15.6344 16.6645 15.3214 16.358 15.3214 15.9799C15.3214 15.6018 15.6344 15.2953 16.0206 15.2953Z",fill:"url(#paint5_radial_419_48383)"}),u.createElement("path",{d:"M8.82261 15.6174C9.02706 15.6174 9.19281 15.7797 9.19281 15.9798C9.19281 16.18 9.02706 16.3423 8.82261 16.3423C8.61817 16.3423 8.45245 16.18 8.45245 15.9798C8.45245 15.7797 8.61817 15.6174 8.82261 15.6174V15.6174ZM23.1774 15.6174C23.3818 15.6174 23.5476 15.7797 23.5476 15.9798C23.5476 16.18 23.3818 16.3423 23.1774 16.3423C22.973 16.3423 22.8072 16.18 22.8072 15.9798C22.8072 15.7797 22.973 15.6174 23.1774 15.6174ZM12.4422 17.0671C11.9197 17.0671 11.4961 17.4818 11.4961 17.9933C11.4961 18.5048 11.9197 18.9194 12.4422 18.9194C12.9646 18.9194 13.3882 18.5048 13.3882 17.9933C13.3882 17.4818 12.9646 17.0671 12.4422 17.0671V17.0671ZM19.599 17.0671C19.0765 17.0671 18.653 17.4818 18.653 17.9933C18.653 18.5048 19.0765 18.9194 19.599 18.9194C20.1214 18.9194 20.545 18.5048 20.545 17.9933C20.545 17.4818 20.1214 17.0671 19.599 17.0671V17.0671Z",fill:"url(#paint6_radial_419_48383)"}),u.createElement("path",{d:"M12.4422 17.5101C12.7148 17.5101 12.9357 17.7264 12.9357 17.9933C12.9357 18.2602 12.7148 18.4765 12.4422 18.4765C12.1696 18.4765 11.9486 18.2602 11.9486 17.9933C11.9486 17.7264 12.1696 17.5101 12.4422 17.5101V17.5101ZM19.599 17.5101C19.8716 17.5101 20.0925 17.7264 20.0925 17.9933C20.0925 18.2602 19.8716 18.4765 19.599 18.4765C19.3264 18.4765 19.1054 18.2602 19.1054 17.9933C19.1054 17.7264 19.3264 17.5101 19.599 17.5101V17.5101ZM15.9794 19.0805C15.457 19.0805 15.0334 19.4952 15.0334 20.0067C15.0334 20.5182 15.457 20.9329 15.9794 20.9329C16.5019 20.9329 16.9255 20.5182 16.9255 20.0067C16.9255 19.4952 16.5019 19.0805 15.9794 19.0805ZM8.8226 19.2416C8.3683 19.2416 8 19.6022 8 20.047C8 20.4918 8.3683 20.8524 8.8226 20.8524C9.27695 20.8524 9.64525 20.4918 9.64525 20.047C9.64525 19.6022 9.27695 19.2416 8.8226 19.2416ZM23.1774 19.2416C22.723 19.2416 22.3548 19.6022 22.3548 20.047C22.3548 20.4918 22.723 20.8524 23.1774 20.8524C23.6317 20.8524 24 20.4918 24 20.047C24 19.6022 23.6317 19.2416 23.1774 19.2416Z",fill:"url(#paint7_radial_419_48383)"}),u.createElement("path",{d:"M15.9794 19.5235C16.252 19.5235 16.473 19.7398 16.473 20.0067C16.473 20.2736 16.252 20.4899 15.9794 20.4899C15.7068 20.4899 15.4859 20.2736 15.4859 20.0067C15.4859 19.7398 15.7068 19.5235 15.9794 19.5235ZM8.82261 19.6845C9.02706 19.6845 9.19281 19.8468 9.19281 20.047C9.19281 20.2471 9.02706 20.4094 8.82261 20.4094C8.61817 20.4094 8.45245 20.2471 8.45245 20.047C8.45245 19.8468 8.61817 19.6845 8.82261 19.6845V19.6845ZM23.1774 19.6845C23.3818 19.6845 23.5476 19.8468 23.5476 20.047C23.5476 20.2471 23.3818 20.4094 23.1774 20.4094C22.973 20.4094 22.8072 20.2471 22.8072 20.047C22.8072 19.8468 22.973 19.6845 23.1774 19.6845ZM12.4422 21.255C11.9879 21.255 11.6196 21.6156 11.6196 22.0604C11.6196 22.5052 11.9878 22.8658 12.4422 22.8658C12.8965 22.8658 13.2648 22.5052 13.2648 22.0604C13.2648 21.6156 12.8965 21.255 12.4422 21.255ZM19.599 21.2953C19.1446 21.2953 18.7763 21.6559 18.7763 22.1007C18.7763 22.5455 19.1446 22.9061 19.599 22.9061C20.0533 22.9061 20.4216 22.5455 20.4216 22.1007C20.4216 21.6559 20.0533 21.2953 19.599 21.2953Z",fill:"url(#paint8_radial_419_48383)"}),u.createElement("path",{d:"M12.4422 21.698C12.6466 21.698 12.8124 21.8602 12.8124 22.0604C12.8124 22.2606 12.6466 22.4228 12.4422 22.4228C12.2377 22.4228 12.072 22.2606 12.072 22.0604C12.072 21.8602 12.2377 21.698 12.4422 21.698ZM19.599 21.7383C19.8035 21.7383 19.9692 21.9005 19.9692 22.1007C19.9692 22.3008 19.8035 22.4631 19.599 22.4631C19.3946 22.4631 19.2288 22.3008 19.2288 22.1007C19.2288 21.9005 19.3946 21.7383 19.599 21.7383ZM15.9795 23.3893C15.5251 23.3893 15.1568 23.7498 15.1568 24.1946C15.1568 24.6394 15.5251 25 15.9795 25C16.4338 25 16.8021 24.6394 16.8021 24.1946C16.8021 23.7498 16.4338 23.3893 15.9795 23.3893V23.3893Z",fill:"url(#paint9_radial_419_48383)"}),u.createElement("path",{d:"M15.9794 23.8322C16.1838 23.8322 16.3496 23.9945 16.3496 24.1946C16.3496 24.3948 16.1838 24.5571 15.9794 24.5571C15.775 24.5571 15.6092 24.3948 15.6092 24.1946C15.6092 23.9945 15.775 23.8322 15.9794 23.8322ZM19.2699 13.7972L16.3496 15.5288L16.5848 15.9075L19.5051 14.176L19.2699 13.7972V13.7972ZM12.6761 13.7576L12.4331 14.1313L15.3945 15.9837L15.6375 15.6099L12.6761 13.7576V13.7576ZM11.8843 13.9551L9.16962 15.6061L9.40873 15.9824L12.1234 14.3314L11.8843 13.9551ZM22.9113 15.8855L19.9909 17.617L20.2262 17.9958L23.1465 16.2643L22.9113 15.8855ZM15.5077 16.0466L12.5874 17.7781L12.8226 18.1569L15.7429 16.4254L15.5077 16.0466V16.0466ZM16.5437 15.9944L16.3007 16.3681L19.2622 18.2205L19.5051 17.8467L16.5437 15.9944V15.9944Z",fill:"url(#paint10_radial_419_48383)"}),u.createElement("path",{d:"M20.0758 13.8205L19.8328 14.1942L22.7943 16.0466L23.0373 15.6728L20.0758 13.8205ZM9.16191 15.9308L8.91895 16.3045L11.8804 18.1569L12.1234 17.7832L9.16191 15.9308V15.9308Z",fill:"url(#paint11_radial_419_48383)"}))),Uv||(Uv=u.createElement("defs",null,u.createElement("radialGradient",{id:"paint0_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15.9999 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint1_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint2_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint3_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint4_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15.9999 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint5_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint6_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint7_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint8_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint9_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(16 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint10_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15.9999 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})),u.createElement("radialGradient",{id:"paint11_radial_419_48383",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15.9999 16.0001) scale(7.99998 7.83228)"},u.createElement("stop",{stopColor:"#FF00FF"}),u.createElement("stop",{offset:1,stopColor:"#734CE2"})))))},name:"Synapse"},{id:"swft",logoURI:function(e){return u.createElement("svg",yv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),hv||(hv=u.createElement("path",{d:"M14.0802 2.71222C14.0802 2.71222 12.9826 1.61464 11.6884 1.51537C10.3941 1.4161 9.89405 1.81505 9.99332 2.214C10.0926 2.61295 10.5421 2.66165 11.1396 2.2627C11.7371 1.86375 13.0332 1.96489 14.0802 2.71222Z",fill:"#0999FF"})),fv||(fv=u.createElement("path",{d:"M13.5408 2.87517C13.5408 2.87517 12.668 2.33013 11.8176 2.45936C10.9673 2.5886 10.6938 2.92012 10.8268 3.16174C10.9598 3.40336 11.2482 3.36964 11.576 3.02314C11.9038 2.67663 12.7523 2.54927 13.5408 2.87517Z",fill:"#0999FF"})),mv||(mv=u.createElement("path",{d:"M12.2597 2.99879C12.6341 2.88498 13.0346 2.89022 13.4059 3.01377C12.8628 2.91825 12.3439 3.13364 12.1866 3.39399C12.0293 3.65434 11.8476 3.71615 11.7352 3.58129C11.6228 3.44644 11.7408 3.1992 12.2597 2.99879Z",fill:"#0999FF"})),gv||(gv=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.7592 6.10048C17.8075 5.65096 17.1089 5.82703 16.1218 6.25033C15.425 6.5575 15.6236 7.84238 16.0225 8.93996C16.4215 10.0375 17.2194 13.8248 15.425 15.8176C13.9914 17.4099 12.8137 17.6032 10.5679 17.972C10.0027 18.0648 9.36998 18.1687 8.6485 18.3087C5.05982 19.0055 4.86128 21.697 4.86128 21.697C3.17126 12.5314 7.83234 10.1212 10.1284 8.93399C10.4049 8.79097 10.6472 8.6657 10.8399 8.5485C11.9352 7.87375 12.0384 6.61486 12.0958 5.91511C12.1082 5.7641 12.1184 5.63913 12.136 5.55169C12.1467 5.49883 12.1573 5.4355 12.1694 5.36375C12.2698 4.76704 12.4681 3.58853 13.5783 3.01003C16.9703 1.41797 19.7592 6.10048 19.7592 6.10048ZM10.8009 15.8525C11.5854 15.8693 12.9238 15.898 13.6045 14.5964C14.3724 13.1261 13.5221 11.8075 12.3084 11.3917C11.0946 10.9759 9.25161 11.5509 8.04352 13.2366C6.83543 14.9223 6.68934 16.9826 6.68934 16.9826C6.7545 16.9197 6.81451 16.8522 6.87696 16.782C7.13404 16.4929 7.4325 16.1574 8.302 15.8982C8.96656 15.7001 9.67011 15.7718 10.1431 15.82C10.3006 15.836 10.4326 15.8495 10.529 15.8495C10.6088 15.8484 10.7003 15.8504 10.8009 15.8525ZM18.5642 5.503C18.5642 5.503 16.62 5.24639 15.8727 5.9956C15.8727 5.9956 16.472 4.30989 18.5642 5.503Z",fill:"#0999FF"})))},name:"Swft"},{id:"hyphen",logoURI:function(e){return u.createElement("svg",iv({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),nv||(nv=u.createElement("path",{d:"M10.2675 16.7858V15.0715C10.2675 14.5915 10.6618 14.2143 11.1247 14.2143H12.839C13.319 14.2143 13.6961 14.5915 13.6961 15.0715V20.2143C13.6961 20.6943 13.319 21.0715 12.839 21.0715H4.26755C3.78755 21.0715 3.4104 20.6943 3.4104 20.2143V8.21433C3.4104 7.73433 3.03326 7.35719 2.55326 7.35719H2.05612C1.30183 7.35719 0.907546 6.43148 1.45612 5.90005L4.52469 2.81433C4.60378 2.73295 4.69838 2.66825 4.80291 2.62407C4.90745 2.57989 5.01978 2.55713 5.13326 2.55713C5.24674 2.55713 5.35908 2.57989 5.46361 2.62407C5.56814 2.66825 5.66275 2.73295 5.74183 2.81433L8.79326 5.90005C9.34183 6.43148 8.96469 7.35719 8.19326 7.35719H7.69612C7.21612 7.35719 6.83897 7.73433 6.83897 8.21433V16.7858C6.83897 17.2658 7.21612 17.6429 7.69612 17.6429H9.4104C9.8904 17.6429 10.2675 17.2658 10.2675 16.7858Z",fill:"#615CCD"})),ov||(ov=u.createElement("path",{d:"M20.5533 16.7858C20.5533 17.2658 20.9304 17.6429 21.4104 17.6429H21.9247C22.679 17.6429 23.0561 18.5686 22.5247 19.1001L19.4561 22.1686C19.1133 22.5115 18.5818 22.5115 18.239 22.1686L15.1704 19.1001C14.6218 18.5686 14.999 17.6429 15.7704 17.6429H16.2676C16.7476 17.6429 17.1247 17.2658 17.1247 16.7858V8.21436C17.1247 7.73436 16.7476 7.35721 16.2676 7.35721H14.5533C14.0733 7.35721 13.6961 7.73436 13.6961 8.21436V9.92864C13.6961 10.4086 13.319 10.7858 12.839 10.7858H11.1247C10.6447 10.7858 10.2676 10.4086 10.2676 9.92864V4.78578C10.2676 4.30578 10.6447 3.92864 11.1247 3.92864H19.6961C20.1761 3.92864 20.5533 4.30578 20.5533 4.78578V16.7858Z",fill:"#615CCD"})))},name:"Hyphen"},{id:"lifi",logoURI:function(e){return u.createElement("svg",cv({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),sv||(sv=u.createElement("rect",{y:.5,width:24,height:24,rx:4,fill:"white"})),av||(av=u.createElement("rect",{x:7.5,y:6.5,width:8.72727,height:12,fill:"url(#pattern0)"})),lv||(lv=u.createElement("defs",null,u.createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:1,height:1},u.createElement("use",{xlinkHref:"#image0_1105_25179",transform:"translate(-0.958333 -0.393939) scale(0.0208333 0.0151515)"})),u.createElement("image",{id:"image0_1105_25179",width:252,height:124,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAB8CAYAAABNG92/AAAMbGlDQ1BJQ0MgUHJvZmlsZQAASImVlwdcU0kTwPeVJCQkBAhEQEroTRDpRUoILYKAVMFGSAIJJcaEIGJHj1Pw7CKKFT0V8dDTE5BDRezlUOz9sKCinId6KIrKtymg533l901++94/s7Mzs/P2lQWA3seTSvNQXQDyJQWyhMhQ1vi0dBbpCSACBP7owIPHl0vZ8fExAMrg+e/y9jq0hHLFRenrn/3/VfQFQjkfAGQi5EyBnJ8PuQUAfANfKisAgKjUW08vkCp5HmQDGUwQ8molZ6t5l5Iz1dyssklK4EC+BIAWlceTZQOgcxfqWYX8bOhH5yNkN4lALAGAPgJyEF/EE0BW5j4iP3+qkishO0B7KWSYD/DN/Mpn9t/8Zw755/Gyh1g9L5VohYnl0jzejP+zNP9b8vMUgzHsYKOKZFEJyvnDGt7MnRqtZCrkbklmbJyy1pD7xAJ13QFAKSJFVLLaHjXlyzmwfoAJ2U3AC4uGbAo5QpIXG6PRZ2aJI7iQ4WpBi8QF3CTIRpAXCeXhiRqbLbKpCZpYaH2WjMPW6M/wZKq4ylj3FbnJbI3/1yIhV+Mf0ykWJaVCpkC2KRSnxELWgewqz02M1tiMLhZxYgdtZIoEZf42kBOEkshQtX+sMEsWkaCxL8uXD84X2yISc2M1vL9AlBSlrg92gs9T5Q/ngl0SStjJg36E8vExg3MRCMPC1XPHngklyYkaP33SgtAE9VicIs2L19jjVsK8SKXeCrKnvDBRMxZPKYCLU+0fz5IWxCep88SLc3hj4tX54MtBDOCAMMACCtgywVSQA8Rt3Q3d8J+6JwLwgAxkAyFw0WgGR6SqeiTwmAiKwR+QhEA+NC5U1SsEhVD/aUirPrqALFVvoWpELngCOR9Egzz4X6EaJRmKlgIeQ434H9F5sPFhvnmwKfv/vX5Q+0XDhpoYjUYxGJFFH7QkhhPDiFHECKIjboIH4QF4DDyGwOaO++J+g/P4Yk94QmgnPCRcI3QQbk0Rl8i+yXIs6ID+IzS1yPy6Frgd9OmFh+KB0Dv0jDNxE+CCe8I4bDwYRvaCWo4mb2VVWN/4/tsMvroaGjuyGxklDyOHkB2+HanjpOM15EVZ66/ro841c6jenKGeb+Nzvqq+AJ6jv7XEFmEHsNPYMews1ow1ABZ2FGvELmCHlTy0uh6rVtdgtARVPrnQj/gf8QavrLKScrdaty63j+q+AmFRgfLG40yVzpCJs0UFLDZ8OwhZXAnfdQTL3c3dHQDlu0b9+HrDVL1DEOa5L7oSOgCj3w8MDDR/0cXYAvBLKbz9n3zROVTDx8R8AM6U8xWyQrUOVx4I8ClBh3eaMTAH1sABzscdeIMAEALCwRgQB5JAGpgMsxfBdS4D08EsMB+UgnKwHKwB68FmsA3sAj+B/aABNINj4BQ4Dy6Ba+AOXD2d4AXoAW9BP4IgJISGMBBjxAKxRZwRd8QXCULCkRgkAUlDMpBsRIIokFnIAqQcWYmsR7YiNcjPyCHkGHIWaUduIQ+QLuQ18gHFUCpqgJqhduhI1Bdlo9FoEjoJzUanocXoQnQpWolWo3vQevQYeh69hnagL9BeDGDaGBOzxFwwX4yDxWHpWBYmw+ZgZVgFVo3VYU3wOl/BOrBu7D1OxBk4C3eBKzgKT8b5+DR8Dr4EX4/vwuvxE/gV/AHeg38m0AimBGeCP4FLGE/IJkwnlBIqCDsIBwkn4b3USXhLJBKZRHuiD7wX04g5xJnEJcSNxL3EFmI78RGxl0QiGZOcSYGkOBKPVEAqJa0j7SEdJV0mdZL6tLS1LLTctSK00rUkWiVaFVq7tY5oXdZ6qtVP1iXbkv3JcWQBeQZ5GXk7uYl8kdxJ7qfoUewpgZQkSg5lPqWSUkc5SblLeaOtrW2l7ac9TlusPU+7Unuf9hntB9rvqfpUJyqHOpGqoC6l7qS2UG9R39BoNDtaCC2dVkBbSquhHafdp/XpMHRcdbg6Ap25OlU69TqXdV7SyXRbOps+mV5Mr6AfoF+kd+uSde10Obo83Tm6VbqHdG/o9uox9Ebpxenl6y3R2613Vu+ZPknfTj9cX6C/UH+b/nH9RwyMYc3gMPiMBYztjJOMTgOigb0B1yDHoNzgJ4M2gx5DfUNPwxTDIsMqw8OGHUyMacfkMvOYy5j7mdeZH4aZDWMPEw5bPKxu2OVh74yGG4UYCY3KjPYaXTP6YMwyDjfONV5h3GB8zwQ3cTIZZzLdZJPJSZPu4QbDA4bzh5cN3z/8tilq6mSaYDrTdJvpBdNeM3OzSDOp2Tqz42bd5kzzEPMc89XmR8y7LBgWQRZii9UWRy2eswxZbFYeq5J1gtVjaWoZZamw3GrZZtlvZW+VbFVitdfqnjXF2tc6y3q1dat1j42FzVibWTa1Nrdtyba+tiLbtbanbd/Z2dul2n1v12D3zN7InmtfbF9rf9eB5hDsMM2h2uGqI9HR1zHXcaPjJSfUyctJ5FTldNEZdfZ2FjtvdG4fQRjhN0IyonrEDReqC9ul0KXW5YEr0zXGtcS1wfXlSJuR6SNXjDw98rObl1ue23a3O6P0R40ZVTKqadRrdyd3vnuV+1UPmkeEx1yPRo9Xns6eQs9Nnje9GF5jvb73avX65O3jLfOu8+7ysfHJ8Nngc8PXwDfed4nvGT+CX6jfXL9mv/f+3v4F/vv9/wxwCcgN2B3wbLT9aOHo7aMfBVoF8gK3BnYEsYIygrYEdQRbBvOCq4MfhliHCEJ2hDxlO7Jz2HvYL0PdQmWhB0Pfcfw5szktYVhYZFhZWFu4fnhy+Prw+xFWEdkRtRE9kV6RMyNboghR0VErom5wzbh8bg23Z4zPmNljTkRToxOj10c/jHGKkcU0jUXHjhm7auzdWNtYSWxDHIjjxq2KuxdvHz8t/tdxxHHx46rGPUkYlTAr4XQiI3FK4u7Et0mhScuS7iQ7JCuSW1PoKRNTalLepYalrkztGD9y/Ozx59NM0sRpjemk9JT0Hem9E8InrJnQOdFrYunE65PsJxVNOjvZZHLe5MNT6FN4Uw5kEDJSM3ZnfOTF8ap5vZnczA2ZPXwOfy3/hSBEsFrQJQwUrhQ+zQrMWpn1LDswe1V2lyhYVCHqFnPE68WvcqJyNue8y43L3Zk7kJeatzdfKz8j/5BEX5IrOTHVfGrR1Haps7RU2jHNf9qaaT2yaNkOOSKfJG8sMIAf9RcUDorvFA8KgwqrCvump0w/UKRXJCm6MMNpxuIZT4sjin+cic/kz2ydZTlr/qwHs9mzt85B5mTOaZ1rPXfh3M55kfN2zafMz53/W4lbycqSvxakLmhaaLZw3sJH30V+V1uqUyorvfF9wPebF+GLxIvaFnssXrf4c5mg7Fy5W3lF+ccl/CXnfhj1Q+UPA0uzlrYt8162aTlxuWT59RXBK3at1FtZvPLRqrGr6lezVpet/mvNlDVnKzwrNq+lrFWs7aiMqWxcZ7Nu+bqP60Xrr1WFVu3dYLph8YZ3GwUbL28K2VS32Wxz+eYPW8Rbbm6N3FpfbVddsY24rXDbk+0p20//6PtjzQ6THeU7Pu2U7OzYlbDrRI1PTc1u093LatFaRW3Xnol7Lv0U9lNjnUvd1r3MveX7wD7Fvuc/Z/x8fX/0/tYDvgfqfrH9ZcNBxsGyeqR+Rn1Pg6ihozGtsf3QmEOtTQFNB391/XVns2Vz1WHDw8uOUI4sPDJwtPhob4u0pftY9rFHrVNa7xwff/zqiXEn2k5GnzxzKuLU8dPs00fPBJ5pPut/9tA533MN573P11/wunDwN6/fDrZ5t9Vf9LnYeMnvUlP76PYjl4MvH7sSduXUVe7V89dir7VfT75+88bEGx03BTef3cq79ep24e3+O/PuEu6W3dO9V3Hf9H71746/7+3w7jj8IOzBhYeJD+884j968Vj++GPnwie0JxVPLZ7WPHN/1twV0XXp+YTnnS+kL/q7S//Q+2PDS4eXv/wZ8ueFnvE9na9krwZeL3lj/GbnX55/tfbG995/m/+2/11Zn3Hfrve+709/SP3wtH/6R9LHyk+On5o+R3++O5A/MCDlyXiqTwEMNjQrC4DXOwGgpQHAgPs2ygT1XlAliHr/qiLwn1i9X1SJNwB18KT8jOe0ALAPNnvItHkAKD/hk0IA6uEx1DQiz/JwV/uiwp0QoW9g4I0ZAKQmAD7JBgb6Nw4MfNoOk70FQMs09R5UKUS4Z9jiqaTLzKJ54BtR70+/muO3Z6DMQDX8b+d/AU/6jzXPsPu0AAAAbGVYSWZNTQAqAAAACAAEARoABQAAAAEAAAA+ARsABQAAAAEAAABGASgAAwAAAAEAAgAAh2kABAAAAAEAAABOAAAAAAAAAJAAAAABAAAAkAAAAAEAAqACAAQAAAABAAAA/KADAAQAAAABAAAAfAAAAABezPYPAAAACXBIWXMAABYlAAAWJQFJUiTwAAAH8UlEQVR4Ae2d0U3cQBRFTYT4hQ7gi19IBUkqIFQQ6AAaIKQCoAPSQVJBkg6ggkAH8IOEhJRwEZOMVsZrrz3GM/eMZO2ud3bsd967+7zjmdmlP4+lokAAAhYE3lhYiZEQgMATAQRPIEDAiACCN3I2pkIAwRMDEDAigOCNnI2pEEDwxAAEjAggeCNnYyoEEDwxAAEjAgjeyNmYCgEETwxAwIgAgjdyNqZCAMETAxAwIoDgjZyNqRBA8MQABIwIIHgjZ2MqBBA8MQABIwII3sjZmAoBBE8MQMCIAII3cjamQgDBEwMQMCKA4I2cjakQQPDEAASMCCB4I2djKgQQPDEAASMCCN7I2ZgKAQSfMAaurq6qr1+/Vvv7+9Xbt2+rpaWl6vz8POERaRoCzQSW+KupZkBd3r24uKguLy+rnz9/Pm0S/GzZ2Niofv/+Pbub1xAYhQCC74FZAv/169c/gd/c3LRqjb/za4WJSgkILCdos9gmY3FL7G0FXiwQDMuOAIJvcFkscF2mUyCQOwEE/+xBZetY4MrgFAiURsBW8OpQk8AlbGVvBF5aaGNPHQEbwQeBS9za6nrQ6wCxDwIlESha8LoH/u3btyeB08FWUthiy6IEihW8BrhowAsFAhD4T6DYkXZra2v/reQZBCDwRKDogTca1XZ9fT05VzPwZnIusTmhYjO8PHh8fGzjSAyFQBsCRWd4AZhilifDtwlN6qQgUHSGF7C9vb0U3BZuc3V1deHP8kEI9CVQvOAPDg6qKYlsal9AfQOIz+dFoHjBq7deon/N8u7du+rz58/Vjx8/qtPT06Snojn3L20acDR02dzcfPF4R0dHgxxOfTEv2TTE/rq+Ho3haGp7EMNeoZFi78PHLCV4Ce329jbeneS5ribev39fbW9vPz3qOQUCUyFgIfiQ5b98+TI49yBwCVubhE6BwFQJWAhe8IfK8uvr60/CDgLXXQAKBHIhYCP4RbP81tbWv8wtkSPwXEKb86wjYCN4Gf/x48dq3mV9EHjI4EMM0Q1z7TUF99OnT3xp1EUi+0YhYCX4OqLqQQ/i1uMQJZ6KK5HHc+01qYdFLIeg/L8N3QHpU4bye59zGOuzNoKX6OLZc8q06rkfIoOr7Xgxjaa59k3vjeX00o5Td1utNBuHsqdYwQcR6t6ztng+vMTeZ334WNyzbQ/lGNqBQAoCRQheYo7Xg5cIm0rXjBCvdTev7abj8h4EXptA1oKX0HWZrlVtupSmnvbQwSZha4t/f3c5BnUhMEUCWQte99a7ir3OCRK2hlJK3Ai8jhD7SiGQteAl0r5FXxi7u7t9m+HzEMiCQNaCH4Jw6sksQ5wjbTQT+PDhQ3OFhndPTk6shkPbC15j39UpR8mXgH6SLVriuzeLtpHT597kdLIpzvW1p86msIk2IfASAXvBq8de9+UpEHAgYC94ObnrfXmHwMDGMgkg+Ee/Ksvv7OyU6WGsgkBEwL7TLrDQb/nv37+Hl8kep7S+XjIjR264z+SZpkFYI5sxyuEQ/DNmzZjSzLnUPfaaoksZlgA/ydrztLukb8qwqQMnzNBr7x5qQmBYAnYZvmnu89BZPsViGsO6n9bcCFgJXuvRzRtZpyy/6MiteDENDegZYq69W0Bib1oCWQteGVTTYptKLMKm7B7aUB1d9s9b0lp14qWo27QdjuH+eHd39yKC5eXlamVl5cX3eaMfgawFr0UsJLQgTmXwWIR6vkjRHxDMFglcxwrbom3Ptjvm68PDw15XHUONOxfLh4eHWtPv7+9r97NzGAJZC16i01hojaXW7RVtfYu+ROLx1bo/r8v8HAU+y6Lv1N+Yy2zbvM6DQNaCD4iVdfuUsGSVpsrqyyMU/WQYYr59aI9HCLw2gSIE3wWislTb5bC4Z96FLHVzIFC84MOS0bqcVfbuclkbZ/scnMk5QmAegeIEL0GHRSf1vM+y0GpHnx+ib2CeI3gfAmMQyF7wQdzKxikysjrs+ixpPYYTOQYE2hJY+vNY2laeWj1NeDk7O0t+WvqnGLJ8cswcYAQCWQu+7n55CmZ9/7gixTnRJgQWIYDgW1Ijy7cERbVJE3gz6bOb0MnptzwFArkTIMN38CBZvgMsqk6SABm+g1vmzbTr0BRVIfAqBMjwHbBruquyPNNeO0Cj6qQIkOE7uEPDcsnyHYBRdXIEEHxHl6QY3NPxFKgOgYUJIPgO6DR7jgzfARhVJ0cg+6G1KYnGq+VoPjy/3VPSpu0xCCD4Z8olrGgzRsBwjLwJ2Apel+fK2mHJKsbK5x3InH07AjaCD5fnQeRcnrcLEGqVRSBrwesyPCxgGbslvjwPAo/f5zkEXAlkPfBGPeZaiZXLc9fwxe6uBLIWfFdjqQ8BdwLch3ePAOy3IoDgrdyNse4EELx7BGC/FQEEb+VujHUngODdIwD7rQggeCt3Y6w7AQTvHgHYb0UAwVu5G2PdCSB49wjAfisCCN7K3RjrTgDBu0cA9lsRQPBW7sZYdwII3j0CsN+KAIK3cjfGuhNA8O4RgP1WBBC8lbsx1p0AgnePAOy3IoDgrdyNse4EELx7BGC/FQEEb+VujHUngODdIwD7rQggeCt3Y6w7AQTvHgHYb0UAwVu5G2PdCSB49wjAfisCCN7K3RjrTgDBu0cA9lsRQPBW7sZYdwII3j0CsN+KAIK3cjfGuhNA8O4RgP1WBBC8lbsx1p0AgnePAOy3IvAXd0VRjJTy4H0AAAAASUVORK5CYII="}))))},name:"LIFI"},{id:"nabox",logoURI:function(e){return u.createElement("svg",pv({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),dv||(dv=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 7.23999V18.418L4.73651 20.2838V12.2876L7.96146 14.1503V22.1412L11.199 24.007V12.8279L1.5 7.23999Z",fill:"#2AC98B"})),uv||(uv=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.85179 6.21724L12.0946 4.31675L16.1237 6.67449L12.883 8.56657L8.85179 6.21724ZM12.0988 0.5L2.32306 6.21934L12.8651 12.4001V24.5L16.0627 22.6374V10.3966L19.294 8.50455V20.7348L22.5389 18.8248V6.60827L12.0988 0.5Z",fill:"#2AC98B"})))},name:"Nabox"},{id:"bungee",logoURI:function(e){return u.createElement("svg",rv({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ev||(ev=u.createElement("g",{clipPath:"url(#clip0_1106_26400)"},u.createElement("path",{d:"M24 4.5C24 2.29086 22.2091 0.5 20 0.5H4C1.79086 0.5 0 2.29086 0 4.5V20.5C0 22.7091 1.79086 24.5 4 24.5H20C22.2091 24.5 24 22.7091 24 20.5V4.5Z",fill:"#FEA700"}),u.createElement("path",{d:"M3.26157 14.6479C4.44801 14.6479 5.40958 13.6862 5.40958 12.4999C5.40958 11.3137 4.44779 10.3519 3.26157 10.3519C2.07824 10.3519 1.1189 11.3088 1.11401 12.491V12.509C1.1189 13.691 2.07824 14.6479 3.26157 14.6479Z",fill:"#ED1E7F"}),u.createElement("path",{d:"M20.7367 14.6477C21.923 14.6477 22.8847 13.686 22.8847 12.4997C22.8847 11.3134 21.923 10.3517 20.7367 10.3517C19.5504 10.3517 18.5887 11.3134 18.5887 12.4997C18.5887 13.686 19.5504 14.6477 20.7367 14.6477Z",fill:"#4CB85D"}),u.createElement("path",{d:"M9.59911 15.9941C10.2391 15.9941 10.8329 15.7967 11.3251 15.4612V15.9438H12.672V12.9378C12.672 12.9314 12.6726 12.9252 12.6726 12.9187V12.0794C12.6726 11.1272 13.4471 10.3527 14.3993 10.3527C15.3535 10.3527 16.126 11.1272 16.126 12.0794V15.9438H17.4747V12.0794C17.4747 10.3825 16.0982 9.00586 14.3993 9.00586C13.7591 9.00586 13.1646 9.20338 12.6722 9.53919V9.05539H11.3253V12.9307C11.3189 13.8792 10.5475 14.6454 9.5993 14.6454C8.6453 14.6454 7.87264 13.873 7.87264 12.9187V9.05607H6.52399V12.9187C6.52375 14.6176 7.90019 15.9941 9.59911 15.9941Z",fill:"black"}))),tv||(tv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_1106_26400"},u.createElement("rect",{width:24,height:24,fill:"white",transform:"translate(0 0.5)"})))))},name:"Bungee"},{id:"squid",logoURI:function(e){return u.createElement("svg",Ov({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Nv||(Nv=u.createElement("g",{clipPath:"url(#clip0_6759_209574)"},u.createElement("path",{d:"M23.7182 11.278C23.2776 12.8519 22.2417 14.5477 20.9174 15.1962C16.7933 17.2151 14.6496 12.8533 14.9088 9.67381C15.0643 7.76437 15.6835 6.24613 15.2064 4.69333C15.0542 4.19797 14.7307 3.73957 14.2008 3.49141C12.7469 2.81029 11.3241 3.74677 10.6627 4.73893C9.94895 5.80885 9.61391 7.14757 9.70463 8.37109C9.79151 9.54997 10.1995 10.3228 10.8149 11.3783C11.6371 12.7885 12.5126 13.7044 12.8477 14.7872C13.0637 15.4852 13.1865 16.6117 12.1944 16.7063C11.1465 16.8066 11.1993 15.4328 11.1845 14.7436C11.1398 12.6488 9.80927 11.8943 8.80751 9.48133C8.22239 8.07205 7.99439 6.58165 8.33663 5.11045C8.81807 3.04021 9.99119 1.37125 12.1061 0.793809C13.7971 0.332049 15.7555 0.710769 16.8259 2.19157C18.0984 3.95221 17.8502 6.02917 17.3328 7.87477C16.3752 11.289 17.2305 12.9167 18.0288 13.3424C19.5403 14.1484 21.1262 13.2354 21.8299 12.2677C22.5921 11.2194 23.0467 9.30709 22.9747 8.08309C22.9473 7.61557 22.9061 7.21333 22.8432 6.85237",fill:"white"}),u.createElement("path",{d:"M0 12.0001C0 12.8756 0.09456 13.7291 0.27264 14.5513C0.2544 13.9316 0.31536 13.3182 0.47568 12.746C0.91632 11.1721 1.95216 9.47627 3.27648 8.82779C7.40064 6.80891 9.54432 11.1707 9.28512 14.3502C9.1296 16.2596 8.5104 17.7779 8.98752 19.3307C9.13968 19.826 9.4632 20.2844 9.99312 20.5326C11.447 21.2137 12.8698 20.2772 13.5312 19.2851C14.245 18.2151 14.58 16.8764 14.4893 15.6529C14.4024 14.474 13.9944 13.7012 13.3795 12.6457C12.5573 11.2355 11.6818 10.3196 11.3467 9.23675C11.1307 8.53883 11.0078 7.41227 12 7.31771C13.0478 7.21739 12.995 8.59115 13.0099 9.28043C13.0546 11.3751 14.3851 12.1297 15.3869 14.5427C15.972 15.9519 16.2 17.4423 15.8578 18.9135C15.3763 20.9838 14.2032 22.6527 12.0883 23.2302C10.3973 23.6919 8.43888 23.3132 7.36848 21.8324C6.096 20.0718 6.34416 17.9948 6.8616 16.1492C7.8192 12.735 6.96384 11.1073 6.1656 10.6815C4.65408 9.87611 3.06816 10.7886 2.36448 11.7563C1.60224 12.8046 1.14768 14.7169 1.21968 15.9409C1.26432 16.7003 1.34592 17.2878 1.49664 17.8062",fill:"white"}),u.createElement("path",{d:"M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",fill:"#E6FA36"}),u.createElement("path",{d:"M15.8578 18.914C16.2 17.4428 15.972 15.9524 15.3869 14.5432C14.3851 12.1302 13.0541 11.3752 13.0099 9.28092C12.9955 8.59164 13.0479 7.21788 12 7.3182C11.0079 7.41324 11.1307 8.5398 11.3467 9.23772C11.6818 10.3206 12.5578 11.2364 13.3795 12.6467C13.9949 13.7022 14.4024 14.475 14.4893 15.6539C14.5795 16.8774 14.245 18.2161 13.5312 19.286C12.8693 20.2782 11.4471 21.2147 9.99313 20.5336C9.46321 20.2854 9.13969 19.8265 8.98753 19.3316C8.51089 17.7784 9.12961 16.2606 9.28513 14.3512C9.54433 11.1716 7.40017 6.80988 3.27649 8.82876C1.95217 9.47724 0.916332 11.1726 0.475692 12.747C0.315372 13.3196 0.254412 13.9326 0.272652 14.5523C0.523212 15.7081 0.939852 16.802 1.49665 17.8076C1.34593 17.2888 1.26433 16.7017 1.21969 15.9424C1.14769 14.7188 1.60273 12.806 2.36449 11.7577C3.06769 10.79 4.65409 9.87708 6.16561 10.683C6.96385 11.1088 7.81921 12.7364 6.86161 16.1507C6.34369 17.9968 6.09553 20.0732 7.36849 21.8339C8.43889 23.3147 10.3973 23.6934 12.0883 23.2316C14.2032 22.6532 15.3768 20.9843 15.8578 18.914Z",fill:"black"}),u.createElement("path",{d:"M23.7182 11.2782C23.8008 10.984 23.8565 10.6787 23.8891 10.3676C23.8891 10.3691 23.8896 10.37 23.8896 10.371C23.7206 9.12732 23.3616 7.94412 22.8422 6.85164C22.9051 7.21308 22.9464 7.61484 22.9737 8.08236C23.0457 9.30588 22.5907 11.2187 21.8289 12.267C21.1257 13.2347 19.5393 14.1476 18.0278 13.3417C17.2296 12.916 16.3742 11.2883 17.3318 7.87404C17.8497 6.02796 18.0979 3.95148 16.8249 2.19084C15.7545 0.710036 13.7961 0.331317 12.1051 0.793076C9.99021 1.37052 8.81661 3.03948 8.33565 5.10972C7.99341 6.58092 8.22141 8.07132 8.80653 9.4806C9.80829 11.8936 11.1393 12.6486 11.1835 14.7428C11.1979 15.4321 11.1456 16.8059 12.1934 16.7056C13.1856 16.6105 13.0627 15.484 12.8467 14.7865C12.5117 13.7036 11.6356 12.7878 10.8139 11.3776C10.1985 10.322 9.79101 9.54924 9.70365 8.37036C9.61341 7.14684 9.94797 5.80812 10.6617 4.7382C11.3236 3.74604 12.7459 2.80956 14.1998 3.49068C14.7297 3.73884 15.0532 4.19772 15.2054 4.6926C15.682 6.24588 15.0633 7.76364 14.9078 9.67308C14.6486 12.8526 16.7928 17.2144 20.9165 15.1955C22.2413 14.548 23.2776 12.8521 23.7182 11.2782Z",fill:"black"}))),Mv||(Mv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_6759_209574"},u.createElement("rect",{width:24,height:24,fill:"white"})))))},name:"Squid"},{id:"across",logoURI:function(e){return u.createElement("svg",$b({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),qb||(qb=u.createElement("rect",{width:32,height:32,rx:16,fill:"#6CF9D8"})),Qb||(Qb=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.95021 8.41988L8.50949 6.8606L14.7408 13.0919C14.3626 13.253 14.0083 13.4879 13.6998 13.7964C13.4609 14.0353 13.2662 14.3017 13.1157 14.5853L6.95021 8.41988ZM12.9982 17.4399L6.85803 23.5801L8.41732 25.1394L14.495 19.0617C14.209 18.9107 13.9405 18.7149 13.6998 18.4742C13.3932 18.1675 13.1593 17.8156 12.9982 17.4399ZM17.5887 19.0584L23.5826 25.0522L25.1418 23.493L19.0822 17.4333C18.921 17.8114 18.6862 18.1657 18.3777 18.4742C18.1388 18.7131 17.8724 18.9079 17.5887 19.0584ZM18.9652 14.5916L25.0497 8.50706L23.4904 6.94778L17.3434 13.0947C17.7191 13.2558 18.071 13.4897 18.3777 13.7964C18.6184 14.037 18.8142 14.3055 18.9652 14.5916Z",fill:"#2D2E33"})))},name:"Across"},{id:"layerswap",logoURI:function(e){return u.createElement("svg",zv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Zv||(Zv=u.createElement("g",{clipPath:"url(#clip0_8229_671)"},u.createElement("path",{opacity:.3,d:"M11.4062 12.7691C11.4062 12.0165 12.0163 11.4065 12.7688 11.4065H24.5209C25.2735 11.4065 25.8835 12.0165 25.8835 12.7691V24.5213C25.8835 25.2738 25.2735 25.8837 24.5209 25.8837H12.7688C12.0163 25.8837 11.4062 25.2738 11.4062 24.5213V12.7691Z",fill:"#FF0093"}),u.createElement("path",{opacity:.5,d:"M23.2097 21.847C23.2097 22.5995 22.5996 23.2094 21.8471 23.2094H10.095C9.34246 23.2094 8.73242 22.5995 8.73242 21.847V10.0947C8.73242 9.34222 9.34246 8.73218 10.095 8.73218H21.8471C22.5996 8.73218 23.2097 9.34222 23.2097 10.0947V21.847Z",fill:"#FF0093"}),u.createElement("path",{opacity:.9,d:"M20.5349 19.1718C20.5349 19.9244 19.9249 20.5344 19.1723 20.5344H7.42018C6.66766 20.5344 6.05762 19.9244 6.05762 19.1718V7.4197C6.05762 6.66717 6.66766 6.05713 7.42018 6.05713H19.1723C19.9249 6.05713 20.5349 6.66717 20.5349 7.4197V19.1718Z",fill:"#FF0093"}))),Hv||(Hv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_8229_671"},u.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(6 6)"})))))},name:"Layerswap"},{id:"okx",logoURI:function(e){return u.createElement("svg",Xv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Yv||(Yv=u.createElement("g",{clipPath:"url(#clip0_1443_44689)"},u.createElement("path",{d:"M21 0H11C4.92487 0 0 4.92487 0 11V21C0 27.0751 4.92487 32 11 32H21C27.0751 32 32 27.0751 32 21V11C32 4.92487 27.0751 0 21 0Z",fill:"black"}),u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.6063 6.99255H7.39351C7.17207 6.99255 6.99255 7.17207 6.99255 7.39351V12.6063C6.99255 12.8278 7.17207 13.0073 7.39351 13.0073H12.6063C12.8278 13.0073 13.0073 12.8278 13.0073 12.6063V7.39351C13.0073 7.17207 12.8278 6.99255 12.6063 6.99255ZM18.6237 13.0073H13.4109C13.1895 13.0073 13.0099 13.1869 13.0099 13.4083V18.6211C13.0099 18.8426 13.1895 19.0221 13.4109 19.0221H18.6237C18.8452 19.0221 19.0247 18.8426 19.0247 18.6211V13.4083C19.0247 13.1869 18.8452 13.0073 18.6237 13.0073ZM19.4231 6.99255H24.6359C24.8574 6.99255 25.0369 7.17207 25.0369 7.39351V12.6063C25.0369 12.8278 24.8574 13.0073 24.6359 13.0073H19.4231C19.2016 13.0073 19.0221 12.8278 19.0221 12.6063V7.39351C19.0221 7.17207 19.2016 6.99255 19.4231 6.99255ZM12.6063 19.0221H7.39351C7.17207 19.0221 6.99255 19.2016 6.99255 19.4231V24.6359C6.99255 24.8574 7.17207 25.0369 7.39351 25.0369H12.6063C12.8278 25.0369 13.0073 24.8574 13.0073 24.6359V19.4231C13.0073 19.2016 12.8278 19.0221 12.6063 19.0221ZM19.4231 19.0221H24.6359C24.8574 19.0221 25.0369 19.2016 25.0369 19.4231V24.6359C25.0369 24.8574 24.8574 25.0369 24.6359 25.0369H19.4231C19.2016 25.0369 19.0221 24.8574 19.0221 24.6359V19.4231C19.0221 19.2016 19.2016 19.0221 19.4231 19.0221Z",fill:"white"}))),Gv||(Gv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_1443_44689"},u.createElement("rect",{width:32,height:32,fill:"white"})))))},name:"okx"},{id:"symbiosis",logoURI:function(e){return u.createElement("svg",Qv({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Jv||(Jv=u.createElement("g",{clipPath:"url(#clip0_8229_679)"},u.createElement("path",{d:"M13.8614 16.7844L14.4243 16.2215V14.2548L13.8614 13.6919H13.0938L12.5601 14.2548V16.2215L13.0938 16.7844H13.8614Z",fill:"#75FB6E"}),u.createElement("path",{d:"M18.9063 16.7625L19.44 16.1995V14.2548L18.9063 13.6919H18.1313L17.5757 14.2548V16.1995L18.1313 16.7625H18.9063Z",fill:"#75FB6E"}),u.createElement("path",{d:"M31.5175 12.332L30.7425 12.2296L27.9717 14.3571L27.862 15.1321L27.7377 15.2417H26.9847L26.4217 15.7973V16.5431L26.9335 17.0548V17.318L26.3998 17.881L26.4217 21.3683L26.9847 21.902L27.0139 22.1725L27.0286 22.1871L26.5022 22.7062V23.4812L26.2609 23.7151H22.3422L22.1083 23.4812V23.079V19.5552L21.9986 19.4528L21.5454 18.9995V18.729L21.5015 18.6925L22.0498 18.1442V17.3984L22.0133 17.3546L22.1083 17.3473L22.2618 17.1572L23.0368 17.0768L24.9011 14.6788L24.828 13.9331L25.0107 13.743L25.0034 13.6699L25.0107 13.6626L24.9888 13.4505L24.9815 13.3994L25.5444 12.8364L25.4933 8.36212L24.9303 7.82842V7.76993L24.9596 7.53598L24.7475 7.26548L24.8207 6.49052L22.9344 4.09253L22.1595 4.01211L22.0425 3.85858L22.0498 3.85127V3.10555L21.5161 2.54261H20.8289H20.7704L20.5072 2.33059V1.56294L19.915 1H16.0548H15.9452H12.0777L11.4928 1.56294V2.33059L11.2296 2.54261H11.1711H10.4766L9.94288 3.10555V3.85127L9.95019 3.85858L9.84053 4.01211L9.06557 4.09253L7.17204 6.49052L7.25246 7.26548L7.04044 7.53598L7.06968 7.76993V7.82842L6.50674 8.36212L6.45556 12.8364L7.01119 13.3994L6.98926 13.743L7.19397 13.955L7.12086 14.6788L8.98515 17.0768L9.76011 17.1572L9.92095 17.3473L9.98675 17.3546L9.94288 17.3984V18.1442L10.4766 18.7071L10.4546 18.729V18.9995L10.0014 19.4528L9.89171 19.5552V23.079V23.4812L9.65045 23.7151H5.73178L5.49052 23.4812V22.7062L4.95682 22.1725L4.98606 21.902L5.54901 21.3683L5.57094 17.881L5.03724 17.318L5.06648 17.0548L5.57094 16.5431V15.7973L5.01531 15.2417H4.25497L4.13068 15.1321L4.02833 14.3571L1.25017 12.2296L0.482522 12.332L0 12.9461L0.109664 13.721L2.88051 15.8485L3.65547 15.7462L3.71396 15.79L3.70665 15.7973V16.5431L4.24035 17.106H4.26959V17.2668L3.70665 17.8225L3.65547 21.3171L4.18917 21.8801V22.1432H4.15993L3.62623 22.7062V23.4812L4.15993 24.0148H4.93489L5.17615 24.2488V25.0238L5.70985 25.5575H9.62851L10.1841 25.0238V24.2488L10.4254 24.0148H11.2296L11.756 23.4812V23.2106V19.5552L11.2808 18.9995L11.2515 18.7071L11.8145 18.1442V17.3984L11.2515 16.8355H10.4985L10.3742 16.6747L10.4546 15.907L8.56111 13.509L7.78615 13.4286V13.4213V13.3994L8.3491 12.8657L8.37103 8.4133L7.83733 7.85035L7.84464 7.76993L7.86657 7.748L8.64153 7.66758L10.5058 5.26959L10.4254 4.49463L10.4912 4.41421H11.2515L11.8145 3.85127V3.15673V3.10555L12.0777 2.89353H15.9452H16.0548H19.915L20.1855 3.10555V3.15673V3.85127L20.7485 4.41421H21.5088L21.5746 4.49463L21.4942 5.26959L23.3585 7.66758L24.1334 7.748L24.148 7.76993L24.1554 7.85035L23.6217 8.4133L23.6509 12.8657L24.2138 13.3994V13.4286L23.4681 13.509L21.5746 15.907L21.6477 16.6747L21.5088 16.8574L21.4942 16.8355H20.7192L20.1855 17.3984V18.1442L20.7192 18.7071H20.7485L20.7192 18.9995L20.2659 19.5552V23.2106V23.4812L20.7996 24.0148H21.5746L21.8085 24.2488V25.0238L22.3715 25.5575H26.2902L26.8239 25.0238V24.2488L27.0651 24.0148H27.8401L28.3738 23.4812V22.7062L27.8401 22.1432H27.7816V21.8801L28.3153 21.3171L28.2641 17.8225L27.7012 17.2668V17.106H27.7597L28.2934 16.5431V15.7973L28.286 15.79L28.3445 15.7462L29.1195 15.8485L31.8903 13.721L32 12.9461L31.5175 12.332Z",fill:"#75FB6E"}),u.createElement("path",{d:"M13.5693 23.854L13.0137 24.4096V25.1846L12.7724 25.4259H11.9975L8.2689 29.074V29.827L8.02764 30.061H4.10897L3.86771 29.827V29.0521L3.30477 28.4891H2.53712L2.00342 29.0521V29.827L2.53712 30.3607H3.30477L3.54603 30.5947V31.3697L4.07973 31.9034H7.99839L8.56133 31.3697V30.5947L8.79528 30.3607L8.82453 30.3827H9.59949L13.3354 26.7345V25.9596L13.5474 25.7183H14.2931L14.9072 25.1846V24.4096L14.3443 23.854H13.5693Z",fill:"#75FB6E"}),u.createElement("path",{d:"M28.7465 28.4891L28.1836 29.0521V29.827L27.9423 30.061H24.0236L23.7824 29.827V29.074L20.0538 25.4259H19.2788L19.0376 25.1846V24.4096L18.4819 23.854H17.707L17.144 24.4096V25.1846L17.7582 25.7183H18.5039L18.7159 25.9596V26.7345L22.4518 30.3827H23.2267L23.2487 30.3607L23.4899 30.5947V31.3697L24.0529 31.9034H27.9716L28.5052 31.3697V30.5947L28.7465 30.3607H29.5142L30.0479 29.827V29.0521L29.5142 28.4891H28.7465Z",fill:"#75FB6E"}))),qv||(qv=u.createElement("defs",null,u.createElement("clipPath",{id:"clip0_8229_679"},u.createElement("rect",{width:32,height:30.9034,fill:"white",transform:"translate(0 1)"})))))},name:"symbiosis"},{id:"scroll",logoURI:py,name:"Scroll"},{id:"manta",logoURI:gy,name:"Manta"},{id:"orbiter",logoURI:function(e){return u.createElement("svg",$v({xmlns:"http://www.w3.org/2000/svg",width:"32.000000pt",height:"32.000000pt",viewBox:"0 0 32.000000 32.000000",preserveAspectRatio:"xMidYMid meet"},e),Kv||(Kv=u.createElement("g",{transform:"translate(0.000000,32.000000) scale(0.100000,-0.100000)",fill:"#000000",stroke:"none"},u.createElement("path",{d:"M91 285 c-32 -28 -56 -85 -48 -115 3 -11 -5 -27 -19 -41 -32 -30 -30 -39 7 -39 32 0 34 -5 14 -53 -14 -33 11 -17 28 18 14 29 22 35 47 35 28 0 30 -2 30 -40 0 -51 18 -53 22 -2 3 32 7 37 31 40 23 3 30 -2 42 -32 9 -20 20 -36 26 -36 7 0 8 7 4 18 -20 47 -18 52 14 52 36 0 39 10 11 35 -13 11 -20 31 -20 53 0 107 -112 171 -189 107z m112 4 c12 -6 30 -21 39 -33 22 -26 24 -96 4 -96 -29 0 -46 13 -46 35 0 30 -26 56 -48 48 -22 -8 -32 -23 -32 -49 0 -21 -17 -34 -46 -34 -10 0 -14 12 -14 38 1 75 78 124 143 91z m-25 -82 c2 -10 -3 -17 -12 -17 -18 0 -29 16 -21 31 9 14 29 6 33 -14z m-88 -92 c0 -8 -4 -15 -9 -15 -13 0 -22 16 -14 24 11 11 23 6 23 -9z m80 0 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m82 0 c0 -5 -5 -11 -11 -13 -6 -2 -11 4 -11 13 0 9 5 15 11 13 6 -2 11 -8 11 -13z"}))))},name:"Orbiter"}];function tx({routeTagList:t}){const r=Tn(),n={typography:"h6",borderRadius:4,px:8,py:4,ml:8};return nt.exports.jsx(nt.exports.Fragment,{children:t.map((t=>"no-approve"===t.type?nt.exports.jsxs(Nn,{sx:Object.assign(Object.assign({},n),{color:r.palette.text.primary,backgroundColor:r.palette.background.paperContrast,display:"flex",alignItems:"center"}),children:[nt.exports.jsx(U,{style:{color:r.palette.text.primary,width:14,height:14}}),nt.exports.jsx("span",{style:{marginLeft:4},children:nt.exports.jsx(e,{id:"F+sxb9",message:"Unapproved"})})]},t.type):"best-price"===t.type?nt.exports.jsx(Nn,{sx:Object.assign(Object.assign({},n),{color:r.palette.success.main,backgroundColor:Zn(r.palette.success.main,.1)}),children:nt.exports.jsx(e,{id:"OgKD6h",message:"Best offer"})},t.type):null))})}function rx(e,t){let r=n._({id:"B0/2ea",message:"s"});return t||(r=e>=2?n._({id:"V+rJKF",message:"Seconds"}):n._({id:"ku//5b",message:"Second"})),r}function nx(e,t){let r="";return r=e>=2?t?n._({id:"TFOxRM",message:"Mins"}):n._({id:"agRWc1",message:"Minutes"}):t?n._({id:"eTUF28",message:"Min"}):n._({id:"6UYTy8",message:"Minute"}),r}function ox(e){return e>=2?n._({id:"yY8wAv",message:"Hours"}):n._({id:"6XgEPi",message:"Hour"})}function ix({start:e,end:t,showSecondUnit:r}){if(!e||!t)return null;const o=t-e,i=1e3,s=6e4,a=36e5,l=24*a;let c="",d="";if(o<s){const e=o/i;c=`${ba(e)} ${rx(e,r)}`}else if(o<a){const e=o/s;c=`${ba(e)} ${nx(e,r)}`;const t=o%s/i;d=`${ba(t)} ${rx(t,r)}`}else if(o<l){const e=o/a;c=`${ba(e)} ${ox(e)}`;const t=o%a/s;d=`${ba(t)} ${nx(t)}`}else{const e=o/l;c=`${ba(e)} ${function(e){return e>=2?n._({id:"HuVZMK",message:"Days"}):n._({id:"H7OUPr",message:"Day"})}(e)}`;const t=o%l/a;d=`${ba(t)} ${ox(t)}`}return r?`${c}${d}`.replaceAll(" ","").toLowerCase():c}function sx({chainId:t,token:r,amount:n}){var o;const i=Tn(),s=E((()=>Ey.get(t)),[t]);return nt.exports.jsxs(Nn,{sx:{display:"flex",flexDirection:"column"},children:[nt.exports.jsxs(Nn,{sx:{mb:8,display:"flex",alignItems:"flex-end",alignSelf:"center"},children:[nt.exports.jsx(Ay,{address:null!==(o=null==r?void 0:r.address)&&void 0!==o?o:"",marginRight:0,width:28,height:28,url:null==r?void 0:r.logoURI}),s?nt.exports.jsx(Nn,{component:s.logo,sx:{width:12,height:12,position:"relative",left:-6}}):""]}),nt.exports.jsxs(Nn,{sx:{color:i.palette.text.primary,typography:"body1",fontWeight:600,width:"100%",wordBreak:"break-word",textAlign:"center"},children:[ha({input:n,decimals:null==r?void 0:r.decimals})," ",null==r?void 0:r.symbol]}),nt.exports.jsxs(Nn,{sx:{color:i.palette.text.secondary,typography:"h6",alignSelf:"center"},children:[nt.exports.jsx(e,{id:"Fdp03t",message:"on"})," ",null==s?void 0:s.name]})]})}function ax({children:e}){const t=Tn();return nt.exports.jsxs(Nn,{sx:{position:"relative",width:"calc(100% - 16px)",mx:"auto"},children:[nt.exports.jsx(Nn,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",borderTopColor:t.palette.text.primary,borderTopWidth:1,borderTopStyle:"dashed","&:before":{content:'""',position:"absolute",left:0,top:-.5,backgroundColor:t.palette.text.primary,width:6,height:6,borderRadius:"50%",transform:"translate(-50%, -50%)"},"&:after":{display:{tablet:"block"},content:'""',position:"absolute",right:-1,top:-.5,width:0,height:0,transform:"translate(0, -50%)",borderTop:"4px solid transparent",borderBottom:"4px solid transparent",borderLeft:`6px solid ${t.palette.text.primary}`}}}),nt.exports.jsx(Nn,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:e})]})}function lx({size:e="medium",toolDetails:t,nameMarginLeft:r=4,logoMarginLeft:n=0,nameSx:o}){const i=Tn();if(!t||!t.logoURI||!t.name)return null;const{logoURI:s,name:a}=t;return nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{component:"img",src:s,alt:a,sx:{marginLeft:n,width:"large"===e?24:16,height:"large"===e?24:16}}),nt.exports.jsx(Nn,{sx:Object.assign({color:i.palette.text.primary,fontWeight:600,marginLeft:r,typography:{mobile:"small"===e?"h6":"medium"===e?"body2":"caption",tablet:"small"===e||"medium"===e?"body2":"caption"}},o),children:a})]})}function cx({fromToken:t,toToken:r,fromChainId:n,toChainId:o,fromAmount:i,fromTokenBalance:s,toTokenAmount:a,toolDetails:l,product:c,executionDuration:d,feeUSD:u,selected:p,setSelected:h,spenderContractAddress:f,isBestPrice:m}){const g=Tn(),{account:y}=Vf(),b=ex.find((e=>e.id===c)),{getApprovalState:v}=Wb({account:y,chainId:n,contractAddress:f}),x=E((()=>t&&i&&s?v(t,i,s):Lb.Loading),[t,i,s,v]),w=E((()=>{const e=[];return m&&e.push({type:"best-price"}),x===Lb.Approving||x===Lb.Insufficient?[...e,{type:"no-approve"}]:e}),[x,m]);return nt.exports.jsxs(Nn,{sx:Object.assign({borderRadius:16,py:16,px:12,backgroundColor:g.palette.background.tag,cursor:"pointer","&:hover":{backgroundColor:"hover.default"},outline:0},p?{borderWidth:1,borderStyle:"solid",borderColor:g.palette.primary.main}:{}),onClick:h,children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[nt.exports.jsx(Nn,{component:null==b?void 0:b.logoURI,sx:{width:16,height:16}}),nt.exports.jsx(Nn,{sx:{marginLeft:4},children:null==b?void 0:b.name}),nt.exports.jsx(tx,{routeTagList:w})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",mt:8,pb:8,borderStyle:"dashed",borderWidth:g.spacing(0,0,1,0),borderColor:g.palette.border.main},children:[nt.exports.jsx(hs,{onlyHover:!0,placement:"top",title:nt.exports.jsx(e,{id:"h5FVz1",message:"Estimated transaction time"}),children:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${g.palette.border.main}`,borderRadius:4,typography:"h6"},children:[nt.exports.jsx(V,{style:{color:g.palette.text.secondary,width:14,height:14}}),nt.exports.jsx(Nn,{sx:{ml:4,lineHeight:1},children:null!==d?ix({start:Date.now(),end:Date.now()+1e3*d}):"-"})]})}),nt.exports.jsx(hs,{onlyHover:!0,placement:"top",title:nt.exports.jsx(e,{id:"7IKPTP",message:"Fee includes: Cross Chain fees + Swap fees. Gas fee not included."}),children:nt.exports.jsxs(Nn,{sx:{ml:8,display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${g.palette.border.main}`,borderRadius:4,typography:"h6"},children:[nt.exports.jsx(Z,{style:{color:g.palette.text.secondary,width:14,height:14}}),nt.exports.jsx(Nn,{sx:{ml:4,lineHeight:1},children:null!==u?`$${ha({input:u,decimals:6})}`:"-"})]})})]}),nt.exports.jsxs(Nn,{sx:{display:"grid",gridTemplateColumns:"36% 28% 36%",mt:8},children:[nt.exports.jsx(sx,{token:t,chainId:n,amount:i}),nt.exports.jsx(ax,{children:nt.exports.jsx(Nn,{sx:{display:"flex",px:3,py:3,backgroundColor:g.palette.background.paperContrast,border:`1px solid ${g.palette.border.main}`,borderRadius:"50%",alignItems:"center",width:24,height:24,overflow:"hidden"},children:nt.exports.jsx(lx,{size:"medium",toolDetails:l,nameMarginLeft:8})})}),nt.exports.jsx(sx,{token:r,chainId:o,amount:a})]})]})}function dx({open:t,onClose:r,selectedRouteId:n,setSelectRouteId:o,bridgeRouteList:i}){const s=Tn(),a=$f(),l=E((()=>{if(!(null==i?void 0:i.length))return null;const{fromToken:e}=i[0];return a(e)}),[i,a]);return nt.exports.jsx(Ry,{open:t,onClose:r,title:nt.exports.jsx(e,{id:"K/PgcA",message:"Select Cross Chain"}),children:nt.exports.jsx(Nn,{sx:{position:"relative",display:"flex",flexDirection:"column",gap:12,py:20,px:16,flex:1,overflowY:"auto",overflowX:"hidden","&::before":{content:'""',position:"absolute",top:0,width:1,height:"1px",backgroundColor:s.palette.border.main}},children:null==i?void 0:i.map(((e,t)=>{var i;return nt.exports.jsx(cx,{fromChainId:e.fromChainId,toChainId:e.toChainId,fromToken:e.fromToken,toToken:e.toToken,fromAmount:e.fromAmount,fromTokenBalance:l,toTokenAmount:e.toTokenAmount,toolDetails:null===(i=e.step)||void 0===i?void 0:i.toolDetails,spenderContractAddress:e.spenderContractAddress,selected:n===e.id,setSelected:()=>{o(e.id),r()},isBestPrice:0===t,product:e.product,executionDuration:e.executionDuration,feeUSD:e.feeUSD},e.key)}))})})}function ux({route:t,onClick:r}){var n,o;const i=Tn();if(!t)return null;const{product:s,executionDuration:a,feeUSD:l,fromAmount:c,fromToken:d,fromChainId:u,toTokenAmount:p,toToken:h,toChainId:f}=t,m=ex.find((e=>e.id===s)),g=Ey.get(u),y=Ey.get(f);return nt.exports.jsxs(Nn,{sx:{px:16,py:8,width:"100%",backgroundColor:"background.tag",borderRadius:12,cursor:"pointer","&:hover":{backgroundColor:"hover.default"}},onClick:r,children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[nt.exports.jsx(Nn,{component:null==m?void 0:m.logoURI,sx:{width:16,height:16}}),nt.exports.jsx(Nn,{sx:{marginLeft:4,typography:"body2",fontWeight:600},children:null==m?void 0:m.name}),nt.exports.jsx(Nn,{sx:{display:"block",mx:8,width:"1px",height:12,backgroundColor:i.palette.border.main}}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",typography:"body2",fontWeight:600},children:[ha({input:c,decimals:null==d?void 0:d.decimals}),nt.exports.jsxs(Nn,{sx:{ml:4,display:"flex",alignItems:"flex-end",alignSelf:"center",width:18,height:18},children:[nt.exports.jsx(Ay,{address:null!==(n=null==d?void 0:d.address)&&void 0!==n?n:"",marginRight:0,width:18,height:18,url:null==d?void 0:d.logoURI}),g?nt.exports.jsx(Nn,{component:g.logo,sx:{position:"relative",left:-6,width:10,height:10,flexShrink:0}}):""]})]})," = ",nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",typography:"body2",fontWeight:600},children:[ha({input:p,decimals:null==h?void 0:h.decimals}),nt.exports.jsxs(Nn,{sx:{ml:4,display:"flex",alignItems:"flex-end",alignSelf:"center",width:18,height:18},children:[nt.exports.jsx(Ay,{address:null!==(o=null==h?void 0:h.address)&&void 0!==o?o:"",marginRight:0,width:18,height:18,url:null==h?void 0:h.logoURI}),y?nt.exports.jsx(Nn,{component:y.logo,sx:{width:10,height:10,position:"relative",left:-6,flexShrink:0}}):""]})]})]}),nt.exports.jsx(Nn,{component:H,sx:{width:18,height:18}})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",mt:8},children:[nt.exports.jsx(hs,{onlyHover:!0,placement:"top",title:nt.exports.jsx(e,{id:"h5FVz1",message:"Estimated transaction time"}),children:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${i.palette.border.main}`,borderRadius:4,typography:"h6"},children:[nt.exports.jsx(V,{style:{color:i.palette.text.secondary,width:14,height:14}}),nt.exports.jsx(Nn,{sx:{ml:4,lineHeight:1},children:null!==a?ix({start:Date.now(),end:Date.now()+1e3*a}):"-"})]})}),nt.exports.jsx(hs,{onlyHover:!0,placement:"top",title:nt.exports.jsx(e,{id:"7IKPTP",message:"Fee includes: Cross Chain fees + Swap fees. Gas fee not included."}),children:nt.exports.jsxs(Nn,{sx:{ml:8,display:"flex",alignItems:"center",px:8,py:4,border:`solid 1px ${i.palette.border.main}`,borderRadius:4,typography:"h6"},children:[nt.exports.jsx(Z,{style:{color:i.palette.text.secondary,width:14,height:14}}),nt.exports.jsx(Nn,{sx:{ml:4,lineHeight:1},children:null!==l?`$${ha({input:l,decimals:6})}`:"-"})]})})]})]})}function px(){const{provider:e,account:t}=Vf(),[r,o]=m(),[s,a]=m(!1),[l,c]=m(""),{apikey:d}=$(em),u=pb(ab.bridgeEncode),p=v((({selectedRoute:r,fromEtherTokenBalance:s,goNext:l})=>vl(this,void 0,void 0,(function*(){var p,h;if(!r||!t||!s)return;const{encodeParams:f}=r;if(f&&f.fromAddress===gb)throw new Error("fromAddress is not valid.");c(""),a(!0);try{const{fromToken:t,fromAmount:g,product:y}=r,b={product:y,encodeParams:f};let{encodeResultData:v,sendData:x}=r;if(f){v=(yield Re.post(`${u}${d?`?apikey=${d}`:""}`,{data:b})).data.data}if(!v){if(x)return a(!1),void l();throw new Error("encodeResultData is null")}const{data:w,to:E,value:A,from:C,chainId:k,encodeId:T}=v;if(!(w&&E&&A&&C&&k))throw new Error("cross_chain_swap_transactionEncode is null");const R=ul[k],S=(m=18,new i(A).div(new i(10).pow(m))),N=R&&t.address.toLowerCase()===R.address.toLowerCase(),M=S.minus(N?g:0);if(!S.isNaN()&&S.gt(0)&&s.lt(S))return c(n._({id:"F9xwHA",message:"Insufficient cross-chain fees, need at least {0} {1}",values:{0:ha({input:M,decimals:null!==(p=null==R?void 0:R.decimals)&&void 0!==p?p:18}),1:null!==(h=null==R?void 0:R.symbol)&&void 0!==h?h:"-"}})),void a(!1);if(e){if(!(yield Dy({from:C,to:E,value:A,data:w},e)))throw new Error("failed to estimate gas")}o({data:w,to:E,value:A,from:C,chainId:k,encodeId:T}),l()}catch(e){console.error("[failed to construct transaction request]: ",e);const{message:t}=e;c(t)}var m;a(!1)}))),[o,a,t,e,u]);return{apikey:d,sendRouteLoading:s,sendRouteError:l,setSendRouteError:c,bridgeOrderTxRequest:r,handleClickSend:p}}function hx({route:e,bridgeOrderTxRequest:t,sendData:r}){const{chainId:o,account:i}=Vf(),s=qy(),{apikey:a}=$(em),l=pb(ab.bridgeCreateRoute);return v((()=>{if(((null==e?void 0:e.sendData)||t)&&e)try{const{fromToken:o,toToken:i,fromAmount:c,toTokenAmount:d,fromChainId:u,toChainId:p,toAddress:h,slippage:f,roundedRouteCostTime:m}=e,g=ha({input:c,decimals:o.decimals}),y=ha({input:d,decimals:i.decimals}),b=nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(Ay,{token:o,sx:{width:16,height:16,mr:6},chainId:o.chainId}),`${g} ${null==o?void 0:o.symbol}`,nt.exports.jsx(Nn,{component:W,sx:{width:12,height:12,mx:16}}),nt.exports.jsx(Ay,{token:i,sx:{width:16,height:16,mr:6}}),`${y} ${null==i?void 0:i.symbol}`]}),v={fromChainId:u,toChainId:p,fromTokenAddress:o.address,toTokenAddress:i.address,fromTokenSymbol:o.symbol,toTokenSymbol:i.symbol,fromTokenAmount:c,toTokenAmount:d.toString(),slippage:f,sendAccount:h,roundedRouteCostTime:m};if(r)return s.executeCustom({brief:n._({id:"+uZnU3",message:"Cross Chain"}),subtitle:b,mixpanelProps:Object.assign({fromToken:o,toToken:i,pay:g,receive:y},v),handler:r});if(!t)return;const x=(r,n)=>vl(this,void 0,void 0,(function*(){if(t.encodeId){const o=yield function({apikey:e,tx:t,route:r,bridgeCreateRouteAPI:n,encodeId:o}){return vl(this,void 0,void 0,(function*(){const{fromChainId:i,toChainId:s,fromAmount:a,fromToken:l,toToken:c,fromAddress:d,toAddress:u,slippage:p,product:h,step:f,sourceRoute:m,productParams:g}=r;if(!m)throw new Error("sourceRoute is required");const{toAmount:y}=m,b={fromChainId:i,fromAmount:ya(a,l.decimals).toString(),fromTokenAddress:l.address,toChainId:s,toAmount:y,toTokenAddress:c.address,fromAddress:d,toAddress:u,slippage:p,hash:t,product:h,extend:{lifiBridge:f.tool,route:m,productParams:g,encodeId:o,source:"widget"}},v=(yield Re.post(`${n}${e?`?apikey=${e}`:""}`,{data:b})).data.data;return null==v?void 0:v.id}))}({apikey:a,tx:r,route:e,bridgeCreateRouteAPI:l,encodeId:t.encodeId});n&&n(r,{orderId:o})}}));return s.execute(n._({id:"+uZnU3",message:"Cross Chain"}),Object.assign({opcode:Vy.TX},t),b,!1,void 0,Object.assign(Object.assign(Object.assign({},t),{fromToken:o,toToken:i,pay:g,receive:y}),v),void 0,x)}catch(e){console.error(e)}}),[i,o,e,t,a,l,r])}function fx({chainId:e,address:t,children:r}){const n=Tn();return nt.exports.jsxs(Nn,{component:"a",href:yl(`tx/${t}`,e),target:"_blank",rel:"noopener noreferrer",sx:{color:n.palette.text.secondary,"&:hover":{color:n.palette.text.primary},display:"flex",alignItems:"center",typography:"body2"},children:[r,nt.exports.jsx(Nn,{component:"svg",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",sx:{marginLeft:6,width:16,height:17},children:nt.exports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33333 3.83333V13.1667H12.6667V8.5H14V13.1667C14 13.9 13.4 14.5 12.6667 14.5H3.33333C2.59333 14.5 2 13.9 2 13.1667V3.83333C2 3.1 2.59333 2.5 3.33333 2.5H8V3.83333H3.33333ZM9.33333 3.83333V2.5H14V7.16667H12.6667V4.77333L6.11333 11.3267L5.17333 10.3867L11.7267 3.83333H9.33333Z",fill:"currentColor"})})]})}function mx({fromChainId:t,toChainId:r,fromTokenAmount:n,toTokenAmount:o,fromTokenDecimals:i,fromTokenSymbol:s,toTokenDecimals:a,toTokenSymbol:l,fromHash:c,toHash:d,toolDetails:u}){const p=Tn(),[h,f]=E((()=>[Ey.get(t),Ey.get(r)]),[t,r]);return nt.exports.jsxs(Nn,{sx:{borderLeft:`1px dashed ${p.palette.text.primary}`,opacity:d?1:.5,pb:24},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"flex-start",flexWrap:"wrap"},children:[nt.exports.jsx(Nn,{component:"img",src:u.logoURI,alt:u.name,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:{mobile:p.palette.background.paper,tablet:p.palette.background.paper},alignSelf:"flex-start"}}),nt.exports.jsx(Nn,{sx:{ml:8,typography:"body1"},children:u.name}),nt.exports.jsxs(Nn,{sx:{typography:"body2",marginLeft:"auto",display:"flex",alignItems:"center",justifyContent:"flex-end",width:{mobile:"100%",tablet:"auto"},mt:{mobile:8,tablet:0}},children:[ha({input:n,decimals:i})," ",s,nt.exports.jsx("span",{style:{marginLeft:4,color:p.palette.text.secondary},children:nt.exports.jsx(e,{id:"Z5HWHd",message:"On"})}),nt.exports.jsx(Nn,{component:null==h?void 0:h.logo,sx:{marginLeft:4,width:18,height:18}}),nt.exports.jsx("span",{style:{marginLeft:4,marginRight:4,color:p.palette.text.secondary},children:nt.exports.jsx(e,{id:"/jQctM",message:"To"})}),ha({input:o,decimals:a})," ",l,nt.exports.jsx("span",{style:{marginLeft:4,color:p.palette.text.secondary},children:nt.exports.jsx(e,{id:"Z5HWHd",message:"On"})}),nt.exports.jsx(Nn,{component:null==f?void 0:f.logo,sx:{marginLeft:4,width:18,height:18}})]})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",mt:{mobile:8,tablet:5}},children:[nt.exports.jsx(fx,{chainId:t,address:c,children:nt.exports.jsx(e,{id:"wdxz7K",message:"Source"})}),nt.exports.jsx(Nn,{sx:{width:16}}),nt.exports.jsx(fx,{chainId:r,address:d,children:nt.exports.jsx(e,{id:"Enslfm",message:"Destination"})})]})]})}function gx({chainId:t,fromTokenAmount:r,toTokenAmount:n,fromTokenDecimals:o,fromTokenSymbol:i,toTokenDecimals:s,toTokenSymbol:a,hash:l,toolDetails:c}){const d=Tn(),u=E((()=>Ey.get(t)),[t]);return nt.exports.jsxs(Nn,{sx:{borderLeft:`1px dashed ${d.palette.text.primary}`,opacity:l?1:.5,pb:24},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"flex-start",flexWrap:"wrap"},children:[nt.exports.jsx(Nn,{component:"img",src:c.logoURI,alt:c.name,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:d.palette.background.paper,alignSelf:"flex-start"}}),nt.exports.jsx(Nn,{sx:{ml:8,typography:"body1"},children:c.name}),nt.exports.jsxs(Nn,{sx:{typography:"body2",marginLeft:"auto",display:"flex",alignItems:"center",justifyContent:"flex-end",width:{mobile:"100%",tablet:"auto"},mt:{mobile:8,tablet:0}},children:[ha({input:r,decimals:o})," ",i,nt.exports.jsx("span",{style:{marginLeft:4,marginRight:4,color:d.palette.text.secondary},children:nt.exports.jsx(e,{id:"YHpbe1",message:"For"})}),ha({input:n,decimals:s})," ",a,nt.exports.jsxs(Nn,{sx:{alignItems:"center",display:{mobile:"none",tablet:"flex"}},children:[nt.exports.jsx("span",{style:{marginLeft:4,color:d.palette.text.secondary},children:nt.exports.jsx(e,{id:"Fdp03t",message:"on"})}),nt.exports.jsx(Nn,{component:null==u?void 0:u.logo,sx:{marginLeft:4,width:18,height:18}}),nt.exports.jsx(Nn,{component:"span",sx:{ml:4},children:null==u?void 0:u.name})]})]})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",typography:"body2",mt:{mobile:8,tablet:5}},children:[nt.exports.jsxs(Nn,{sx:{alignItems:"center",display:{mobile:"flex",tablet:"none"}},children:[nt.exports.jsx("span",{style:{color:d.palette.text.secondary},children:nt.exports.jsx(e,{id:"Fdp03t",message:"on"})}),nt.exports.jsx(Nn,{component:null==u?void 0:u.logo,sx:{marginLeft:4,width:18,height:18}}),nt.exports.jsx(Nn,{component:"span",sx:{ml:4,mr:8},children:null==u?void 0:u.name})]}),nt.exports.jsx(fx,{chainId:t,address:l,children:nt.exports.jsx(e,{id:"S3piC2",message:"Tx"})})]})]})}function yx({marginTop:e=20,route:t}){const r=Tn(),{fromChainId:n,toChainId:o}=t,{step:{includedSteps:i}}=t,[s,a]=E((()=>[Ey.get(n),Ey.get(o)]),[n,o]);return nt.exports.jsxs(Nn,{sx:{mt:e,pl:10},children:[nt.exports.jsx(Nn,{sx:{borderLeft:`1px dashed ${r.palette.text.primary}`,opacity:1,pb:24},children:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"flex-start"},children:[nt.exports.jsx(Nn,{component:null==s?void 0:s.logo,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:r.palette.background.paper}}),nt.exports.jsx(Nn,{sx:{ml:8,typography:"body1"},children:null==s?void 0:s.name})]})}),null==i?void 0:i.map(((e,t)=>{const{toolDetails:r,type:n,estimate:o}=e;return"swap"===n?nt.exports.jsx(gx,{chainId:o.fromToken.chainId,fromTokenAmount:o.fromTokenAmount,toTokenAmount:o.toTokenAmount,fromTokenDecimals:o.fromToken.decimals,fromTokenSymbol:o.fromToken.symbol,toTokenDecimals:o.toToken.decimals,toTokenSymbol:o.toToken.symbol,hash:null,toolDetails:r},t):"cross"===n?nt.exports.jsx(mx,{fromChainId:o.fromToken.chainId,toChainId:o.toToken.chainId,fromTokenAmount:o.fromTokenAmount,toTokenAmount:o.toTokenAmount,fromTokenDecimals:o.fromToken.decimals,fromTokenSymbol:o.fromToken.symbol,toTokenDecimals:o.toToken.decimals,toTokenSymbol:o.toToken.symbol,fromHash:null,toHash:null,toolDetails:r},t):null})),nt.exports.jsx(Nn,{sx:{opacity:.5,pb:0},children:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"flex-start"},children:[nt.exports.jsx(Nn,{component:null==a?void 0:a.logo,sx:{width:20,height:20,marginLeft:-10.5,pt:1,backgroundColor:r.palette.background.paper}}),nt.exports.jsx(Nn,{sx:{ml:8,typography:"body1"},children:null==a?void 0:a.name})]})})]})}function bx({route:t}){const r=Tn(),n=Ey.get(t.fromChainId),o=E((()=>yl(`address/${t.fromAddress}`,t.fromChainId)),[t.fromAddress,t.fromChainId]);return nt.exports.jsxs(Nn,{children:[nt.exports.jsx(Nn,{sx:{py:12,borderStyle:"solid",borderWidth:r.spacing(1,0,0),borderColor:r.palette.border.main},children:nt.exports.jsx(ea,{children:nt.exports.jsx(ua,{initialEntered:!0,sx:{"& button.active svg":{transform:"rotate(0)"}},header:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(Nn,{component:P,sx:{mr:6,width:18,height:18}}),nt.exports.jsx(e,{id:"rRDi3Y",message:"Detail"})]}),nt.exports.jsx(Nn,{component:I,sx:{width:12,height:12,color:"text.secondary",transform:"rotate(180deg)",transition:"transform 0.2s linear"}})]}),children:nt.exports.jsxs(Nn,{sx:{mt:16},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsx(Nn,{sx:{typography:"body2",color:"text.secondary",flexShrink:0},children:nt.exports.jsx(e,{id:"lt8yMa",message:"Send to:"})}),nt.exports.jsxs(Nn,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:[n?nt.exports.jsx(Nn,{component:n.logo,sx:{width:18,height:18}}):"",nt.exports.jsx(Nn,{sx:{display:"inline-block",mx:6,width:"1px",height:12,backgroundColor:"border.main"}}),t.fromAddress?nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{sx:{typography:"body2",fontWeight:600},children:(i=t.fromAddress,!i||i.length<=10?i:`${i.slice(0,6)}...${i.slice(i.length-4,i.length)}`)}),nt.exports.jsx(Lo,{component:"a",href:o,target:"_blank",rel:"noopener noreferrer",sx:{ml:6,width:18,height:18,color:"text.secondary"},children:nt.exports.jsx(Nn,{component:L,sx:{width:18,height:18}})})]}):"-"]})]}),t.feeUSD?nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsx(Nn,{sx:{display:"flex",alignItems:"center",typography:"body2",color:"text.secondary",flexShrink:0},children:nt.exports.jsx(e,{id:"PLUB/s",message:"Fee"})}),nt.exports.jsxs(Nn,{sx:{typography:"body2"},children:["$",pa({input:t.feeUSD})]})]}):"",!!t.slippage&&nt.exports.jsxs(Nn,{sx:{mt:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",typography:"body2",color:"text.secondary",flexShrink:0},children:[nt.exports.jsx(e,{id:"CMHmbm",message:"Slippage"}),nt.exports.jsx(Tb,{onlyHover:!0,title:nt.exports.jsx(e,{id:"KAmxpM",message:"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote."}),ml:6})]}),nt.exports.jsxs(Nn,{sx:{typography:"body2"},children:[100*t.slippage,"%"]})]})]})})})}),nt.exports.jsx(Nn,{sx:{py:12,borderStyle:"solid",borderWidth:r.spacing(1,0,0),borderColor:r.palette.border.main},children:nt.exports.jsx(ea,{children:nt.exports.jsx(ua,{initialEntered:!0,sx:{"& button.active svg":{transform:"rotate(0)"}},header:nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",typography:"body2"},children:[nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(Nn,{component:P,sx:{mr:6,width:18,height:18}}),nt.exports.jsx(e,{id:"QNWt8A",message:"Estimated Time"})]}),nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[t.executionDuration?ix({start:Date.now(),end:Date.now()+1e3*t.executionDuration}):"-",nt.exports.jsx(Nn,{component:I,sx:{ml:6,width:12,height:12,color:"text.secondary",transform:"rotate(180deg)",transition:"transform 0.2s linear"}})]})]}),children:nt.exports.jsx(yx,{route:t})})})})]});var i}function vx({open:t,onClose:r,route:n,bridgeOrderTxRequest:o,clearToAmt:i,clearFromAmt:s}){const a=Tn(),{contractStatus:l}=$(em),c=ee(),d=hx({route:n,bridgeOrderTxRequest:o,sendData:null==n?void 0:n.sendData});return y((()=>{l!==Of.Pending&&r(),l===Of.TxSuccess&&(i(),s())}),[l]),nt.exports.jsx(Ry,{title:nt.exports.jsx(e,{id:"tKE4Ak",message:"Cross Chain Summary"}),open:t,onClose:()=>{c(Hy({contractStatus:Of.Initial})),r()},children:nt.exports.jsxs(nt.exports.Fragment,{children:[n?nt.exports.jsxs(Nn,{sx:{px:16,pb:20,flex:1,overflowY:"auto"},children:[nt.exports.jsxs(Nn,{sx:{display:"grid",gridTemplateColumns:"36% 28% 36%",py:20,borderStyle:"solid",borderWidth:a.spacing(1,0,0),borderColor:a.palette.border.main},children:[nt.exports.jsx(sx,{token:n.fromToken,chainId:n.fromChainId,amount:n.fromAmount}),!!n.step&&nt.exports.jsx(ax,{children:nt.exports.jsx(Nn,{sx:{display:"flex",px:3,py:3,backgroundColor:a.palette.background.paperContrast,border:`1px solid ${a.palette.border.main}`,borderRadius:"50%",alignItems:"center",width:24,height:24,overflow:"hidden"},children:nt.exports.jsx(lx,{size:"medium",toolDetails:n.step.toolDetails,nameMarginLeft:8})})}),nt.exports.jsx(sx,{token:n.toToken,chainId:n.toChainId,amount:n.toTokenAmount})]}),nt.exports.jsx(bx,{route:n})]}):"",nt.exports.jsx(Nn,{sx:{px:16,py:20},children:nt.exports.jsx(wo,{fullWidth:!0,isLoading:l==Of.Pending,disabled:!n,onClick:()=>vl(this,void 0,void 0,(function*(){d(),c(Hy({contractStatus:Of.Pending}))})),children:l==Of.Pending?nt.exports.jsx(e,{id:"P+K/3O",message:"Confirming"}):nt.exports.jsx(e,{id:"PZqJog",message:"Confirm Cross Chain"})})})]})})}function xx({message:t,onClose:r}){return nt.exports.jsx(Ry,{open:!!t,onClose:r,children:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsxs(Nn,{sx:{flex:1,textAlign:"center"},children:[nt.exports.jsx(Nn,{component:F,sx:{mt:60,width:64,height:64,color:"error.main"}}),t?nt.exports.jsxs(Nn,{sx:{textAlign:"center",mt:60},children:[nt.exports.jsx(Nn,{children:nt.exports.jsx(e,{id:"kf83Ld",message:"Something went wrong."})}),nt.exports.jsx(Nn,{sx:{color:"text.secondary",mt:12,typography:"body2",wordBreak:"break-all"},children:t})]}):""]}),nt.exports.jsx(Nn,{sx:{px:16,py:20},children:nt.exports.jsx(wo,{onClick:r,fullWidth:!0,children:nt.exports.jsx(e,{id:"1QfxQT",message:"Dismiss"})})})]})})}function wx(e){const t=g(!1),[r,n]=m(!1),o=ee();return y((()=>{if(void 0===e)return;const r=function(e){const t=localStorage.getItem(e?"DODO_WIDGET_SLIPPAGE_BRIDGE":"DODO_WIDGET_SLIPPAGE_SWAP");return t?Number(t):null}(e);if(!t.current)return o(ob(r?r.toString():null)),void(t.current=!0);o(ob(r?r.toString():null)),n(!0);const i=setTimeout((()=>{n(!1)}),3e3);return()=>{clearTimeout(i)}}),[e]),r}function Ex({side:e,defaultToken:t,tokenList:r,occupyToken:n,chainId:o}){var i,s;let a,l=null;const c=r.filter((t=>!(t.side&&t.side!==e||o&&t.chainId!==o)));if(c.length){let r=function(e){const t=localStorage.getItem("from"===e?"DODO_WIDGET_LAST_FROM_TOKEN":"DODO_WIDGET_LAST_TO_TOKEN");if(!t)return null;try{return JSON.parse(t)}catch(e){return console.error(e),null}}(e);!r&&t&&(r=Object.assign({},t),a=t.amount),r&&(l=null!==(i=c.find((e=>e.address===(null==r?void 0:r.address)&&e.chainId===r.chainId)))&&void 0!==i?i:null),l||(n?l=null!==(s=c.find((e=>e.address!==n.address)))&&void 0!==s?s:null:[l]=c)}return{findToken:l,setDefaultAmount:a}}function Ax({fromToken:e,toToken:t,setFromToken:r,setToToken:n,updateFromAmt:o,updateToAmt:i}){const s=$(Yf),a=$(qf),l=$(Qf),c=$(em),d=ee(),{chainId:u}=Vf();y((()=>{(()=>{let p,h=null;if(c.crossChain||!c.autoConnectLoading){if(!e){const e=Ex({side:"from",defaultToken:a,tokenList:s,chainId:c.crossChain?void 0:u});h=e.findToken,p=e.setDefaultAmount,h&&(r(h),void 0!==p&&(d(Hy({isReverseRouting:!1})),o(p)))}if(!t){const{findToken:e,setDefaultAmount:t}=Ex({side:"to",defaultToken:l,tokenList:s,occupyToken:h,chainId:c.crossChain?void 0:u});e&&(n(e),void 0===p&&void 0!==t&&(d(Hy({isReverseRouting:!0})),i(t)))}}})()}),[s,a,l,c.crossChain,c.autoConnectLoading,u])}function Cx({fromToken:e,toToken:t,getAutoSlippage:r}){const n=ee();y((()=>{(()=>{vl(this,void 0,void 0,(function*(){if(!r)return;const o=r({fromToken:e,toToken:t});if(void 0!==o&&"number"!=typeof o){var i;n((i=!0,e=>vl(void 0,void 0,void 0,(function*(){e({type:"SET_AUTO_SLIPPAGE_LOADING",payload:i})}))));try{const e=yield o;n(Yy({loading:!1,value:null!=e?e:null}))}catch(e){console.error(e),n(Yy({loading:!1,value:null}))}}else n(Yy({loading:!1,value:null}))}))})()}),[e,t])}var kx;const Tx="undefined"!=typeof document,Rx=Tx&&(null===(kx=window.navigator)||void 0===kx?void 0:kx.userAgent)&&/(Android)/i.test(navigator.userAgent),Sx=!!Tx&&/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent);function Nx({getAutoSlippage:t,onConnectWalletClick:r,bridgeToTonUrl:i}={}){var s,a,l;const c=Tn(),{isInflight:u}=Xy(),{chainId:p,account:h}=Vf(),f=ee(),{isReverseRouting:g,noPowerBy:b}=$(em),x=$(Wf),w=E((()=>{var e;return null===(e=ul[null!=p?p:x])||void 0===e?void 0:e.address}),[p]),A=oe(),C=Uf(),[k,T]=m(""),[R,S]=m(""),[N,M]=m(""),[O,I]=m(""),F=E((()=>d((e=>M(e)),1e3)),[]),j=E((()=>d((e=>I(e)),1e3)),[]),[L,_]=m(null),[P,B]=m(null),[U,V]=m(!1),[Z,H]=m(!1),G=E((()=>{if(L&&P)return!(!(null==L?void 0:L.chainId)||!(null==P?void 0:P.chainId)||L.chainId===P.chainId)}),[L,P]),{toFiatPrice:X,fromFiatPrice:J}=hb({chainId:p,toToken:P,fromToken:L}),{marginAmount:q}=function({token:e,fiatPrice:t}){const r=E((()=>{var r;const n=null!==(r=null==e?void 0:e.decimals)&&void 0!==r?r:6,i=null!=t?new o(500).div(t):new o(0),s=ya(i,n);return(s.lt(new o(1).times(new o(10).pow(n-3)))?new o(0):s).toString(10)}),[null==e?void 0:e.decimals,t]);return{marginAmount:r}}({token:g?P:L,fiatPrice:g?X:J});Cx({fromToken:L,toToken:P,getAutoSlippage:t});const Q=$f(),K=E((()=>{const e=null==L?void 0:L.chainId;if(!G||!e)return null;const t=ul[e];return t?Q(Object.assign(Object.assign({},t),{chainId:e})):null}),[G,null==L?void 0:L.chainId,Q]),te=E((()=>{const e=g?P:L,t=new o(e&&Q(e)||0);return!!(e&&Q(e)||(null==L?void 0:L.chainId)===ll.TON||(null==P?void 0:P.chainId)!==ll.TON)&&t.lt(g?null!=O?O:0:N)}),[g,L,P,N,O,Q]),[re,ne]=m(""),{bridgeRouteList:ie,status:se,limit:ae}=Kb({toToken:P,fromToken:L,fromAmount:N,fromFiatPrice:J,toAddress:re||void 0}),[le,ce]=m(!1),[de,ue]=m(""),pe=E((()=>!de&&ie.length?ie[0].id:de),[de,ie]),he=E((()=>ie.find((e=>e.id===pe&&(e.fromAddress===h||!h)))),[ie,pe,h]);y((()=>{!he&&de&&ue("")}),[he]);const{getApprovalState:fe,submitApprove:me,getPendingRest:ge,getMaxBalance:ye}=Wb({account:h,chainId:null!==(s=null==L?void 0:L.chainId)&&void 0!==s?s:p,contractAddress:null==he?void 0:he.spenderContractAddress,skip:!(null==he?void 0:he.spenderContractAddress)}),be=E((()=>ge(g?P:L)),[null==L?void 0:L.address,null==P?void 0:P.address,ge,g]),[ve,xe,we]=E((()=>{const e=fe(L,g?O||0:N);return[e===Lb.Approving,e===Lb.Loading,e===Lb.Insufficient&&!be]}),[fe,L,g,O,N,be]),Ee=E((()=>!(!h||te||ve||xe||we)),[h,te,ve,xe,we]),{status:Ae,rawBrief:Ce,executeSwap:ke,reset:Te}=vb({toToken:P,fromToken:L,marginAmount:q,fromAmount:N,toAmount:O,estimateGas:Ee}),{resAmount:Re,priceImpact:Ne,baseFeeAmount:Me,additionalFeeAmount:Oe,resPricePerToToken:Ie,resPricePerFromToken:Fe}=E((()=>Ce||{resAmount:null,priceImpact:null,baseFeeAmount:null,additionalFeeAmount:null,resPricePerToToken:null,resPricePerFromToken:null}),[Ce]),{sendRouteLoading:je,sendRouteError:Le,setSendRouteError:_e,bridgeOrderTxRequest:We,handleClickSend:Pe}=px(),[De,Be]=m(!1),Ue=wx(G),Ve=v((e=>{const t=e.toString();T(t),F(t),Te()}),[T,F,Te]),Ze=v((e=>{const t=e.toString();S(t),j(t),Te()}),[S,j,Te]),He=v((e=>{var t;return"function"==typeof e?_((t=>{var r;const n=e(t);return f(fg(null!==(r=null==n?void 0:n.chainId)&&void 0!==r?r:void 0)),n})):(f(fg(null!==(t=null==e?void 0:e.chainId)&&void 0!==t?t:void 0)),_(e))}),[f,fg]),ze=v((e=>{var t;return"function"==typeof e?B((t=>{var r;const n=e(t);return f(mg(null!==(r=null==n?void 0:n.chainId)&&void 0!==r?r:void 0)),n})):(f(mg(null!==(t=null==e?void 0:e.chainId)&&void 0!==t?t:void 0)),B(e))}),[f,fg]);Ax({fromToken:L,toToken:P,setFromToken:He,setToToken:ze,updateFromAmt:Ve,updateToAmt:Ze});const Ye=v((()=>{Ve(""),Ze(""),He(P),ze(L),Iy("from",P),Iy("to",L),ue("")}),[He,P,ze,L,Ve,Ze,ue]),Ge=v((e=>g?Ze(ye(P)):Ve(ye(L))),[Ve,Ze,ye,L,P,g]),Xe=(e=>{const{defaultSlippage:t}=yb(e),r=$(fb)||t;return E((()=>Number(r)>5),[r])})(G),Je=E((()=>(100*Number(Ne)).toFixed(2)),[Ne]),qe=E((()=>{const e=g?Re:N;return e&&J?new o(J).multipliedBy(e):null}),[J,N,g,Re]),Qe=E((()=>{var e;if(!X||void 0===G)return null;if(G)return(null===(e=null==he?void 0:he.toTokenAmount)||void 0===e?void 0:e.gt(0))?he.toTokenAmount.multipliedBy(X):null;const t=g?O:Re;return t?new o(X).multipliedBy(t):null}),[X,O,g,Re,he,G]),Ke=E((()=>nt.exports.jsxs(Nn,{sx:{display:"flex",fontWeight:600,typography:"body2",alignItems:"center",justifyContent:"center"},children:[nt.exports.jsx(Tb,{title:nt.exports.jsx(e,{id:"4kY4C4",message:"Due to the market condition, market price and estimated price may have a slight difference"}),mr:8}),nt.exports.jsxs(Nn,{sx:{display:"flex"},children:[nt.exports.jsx(e,{id:"6+mYrD",message:"Current price impact"}),nt.exports.jsxs(Nn,{sx:{color:c.palette.error.main,ml:4},children:[Je,"%"]})]})]})),[Je]),$e=E((()=>nt.exports.jsx(Ob,{toToken:P,fromToken:L,priceStatus:Ae,pricePerToToken:Ie,pricePerFromToken:Fe})),[P,L,Ae,Ie,Fe]),et=E((()=>!ll[p||1]),[p]),tt=E((()=>!!p&&!!(null==L?void 0:L.chainId)&&(null==L?void 0:L.chainId)!==p),[p,null==L?void 0:L.chainId]),rt=function({fromToken:e,toToken:t}){const r=$(Gf);return E((()=>!(!e||r.some((t=>t.chainId===e.chainId&&t.address===e.address&&(!t.side||"to"===t.side))))||!(!t||r.some((e=>e.chainId===t.chainId&&e.address===t.address&&(!e.side||"from"===e.side))))),[e,t,r])}({fromToken:L,toToken:P}),ot=E((()=>Xe&&new o(g?O:N).gt(0)&&!te&&(G?se===bb.Success:Ae===bb.Success)?nt.exports.jsxs(Nn,{sx:{textAlign:"center",mb:8},children:[nt.exports.jsx(Nn,{component:D,sx:{position:"relative",top:2,mr:6,width:16,height:16,color:"warning.main"}}),n._({id:"//95jS",message:"The current slippage protection coefficient set exceeds {maxSlippageWarning}%, which may result in losses.",values:{maxSlippageWarning:5}})]}):null),[Xe,g,N,O,G,se,Ae]),it=E((()=>tt?nt.exports.jsxs(Nn,{sx:{textAlign:"center"},children:[nt.exports.jsx(Nn,{component:D,sx:{position:"relative",top:2,mr:6,width:16,height:16,color:"warning.main"}}),nt.exports.jsx(e,{id:"54ffaC",message:"The current network is inconsistent with the wallet - please switch in wallet"})]}):Ae===bb.Loading||G&&se===bb.Loading?nt.exports.jsx(Nn,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Wo,{sx:{mr:5}}),nt.exports.jsx(e,{id:"JdNn1Y",message:"Fetching best price..."})]})}):et?nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{component:D,sx:{mr:6,width:16,color:"warning.main"}}),nt.exports.jsx(e,{id:"udsWDJ",message:"Unsupported network - switch to trade"})]}):!G&&k&&new o(Je).gt(15)?Ke:G&&ie.length?nt.exports.jsxs(nt.exports.Fragment,{children:[ot,nt.exports.jsx(ux,{route:he,onClick:()=>ce(!0)})]}):G&&(se===bb.Success&&!ie.length||se===bb.Failed)&&k?nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsx(Nn,{component:D,sx:{width:15,mr:5,color:"warning.main"}}),nt.exports.jsx(e,{id:"NVAuTg",message:"Quote not available"})]}):nt.exports.jsxs(nt.exports.Fragment,{children:[ot,$e]})),[Ae,$e,k,Ke,Je,et,G,se,ie,he,tt,ot]),st=E((()=>g?new o(R).gt(0)?ha({input:Re,decimals:null==L?void 0:L.decimals}):"-":k),[k,R,Re,L,g]),at=E((()=>{var e;return g?R:G?(null===(e=null==he?void 0:he.toTokenAmount)||void 0===e?void 0:e.gt(0))&&se!==bb.Loading?ha({input:he.toTokenAmount,decimals:null==P?void 0:P.decimals}):"-":new o(k).gt(0)?ha({input:Re,decimals:null==P?void 0:P.decimals}):"-"}),[k,R,Re,P,g,he,G,se]),lt=E((()=>{var t,n;let s;const a=(null==L?void 0:L.chainId)===ll.TON,l=(null==P?void 0:P.chainId)===ll.TON;let c=!1,d=null==L?void 0:L.chainId;if(a||l?(d=ll.TON,c=!C.connected):c=!h||!!(null==L?void 0:L.chainId)&&p!==L.chainId,c)return nt.exports.jsx(Fb,{needSwitchChain:d,onConnectWalletClick:r,needEvmChainId:s});if(u)return nt.exports.jsx(wo,{fullWidth:!0,isLoading:!0,disabled:!0,children:nt.exports.jsx(e,{id:"FRBvjQ",message:"Transaction Pending"})});if(!L||!P)return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-select-token-btn",children:nt.exports.jsx(e,{id:"KlvBGJ",message:"Select Tokens"})});if(we)return nt.exports.jsx(wo,{fullWidth:!0,disabled:ve,onClick:()=>me(L),children:ve?nt.exports.jsx(e,{id:"j2Uisd",message:"Approving"}):nt.exports.jsx(e,{id:"Z7ZXbT",message:"Approve"})});if(!new o(g?O:N).gt(0))return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-enter-amount-btn",children:nt.exports.jsx(e,{id:"iPMIoT",message:"Enter an amount"})});if(te)return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-insufficient-balance-btn",children:nt.exports.jsx(e,{id:"znqB4T",message:"Insufficient balance"})});if(G){const r=null!==(t=null==ae?void 0:ae.minAmt)&&void 0!==t?t:null==he?void 0:he.minAmt,o=null!==(n=null==ae?void 0:ae.maxAmt)&&void 0!==n?n:null==he?void 0:he.maxAmt,i=!!r&&!!N&&Number(N)<Number(r),s=!!o&&!!N&&Number(N)>Number(o);if(i||s)return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,children:i?nt.exports.jsx(e,{id:"ipI/1x",message:"cannot be lower than {minAmt}",values:{minAmt:r}}):nt.exports.jsx(e,{id:"f341rK",message:"cannot be greater than {maxAmt}",values:{maxAmt:o}})})}if(G?se===bb.Loading||xe:Ae===bb.Loading)return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,"data-testid":"swap-alert-fetch-price-btn",children:nt.exports.jsx(e,{id:"OauUE6",message:"Fetching Price..."})});let f=!1;if(f=G?!ie.length||se===bb.Failed:!Re||Ae===bb.Failed,f)return nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,children:nt.exports.jsx(e,{id:"NVAuTg",message:"Quote not available"})});if(G){const t=!A.account&&L.chainId===ll.TON&&P.chainId!==ll.TON;return nt.exports.jsxs(nt.exports.Fragment,{children:[t&&nt.exports.jsx(jo,{fullWidth:!0,value:re,onChange:e=>ne(e.target.value),errorMsg:!re||ml(re)?void 0:"Invalid address",sx:{height:48,border:"none"},placeholder:"Receive address"}),nt.exports.jsx(wo,{fullWidth:!0,onClick:()=>{L.chainId!==ll.TON&&P.chainId===ll.TON&&i?Rx||Sx?Se.openLink(`https://metamask.app.link/dapp/${i.replace("https://","")}`):Se.openLink(i):Pe({selectedRoute:he,fromEtherTokenBalance:K,goNext:()=>Be(!0)})},"data-testid":"swap-review-btn",disabled:!he||t&&!ml(re),isLoading:je,sx:t?{mt:12}:void 0,children:nt.exports.jsx(e,{id:"SXnevP",message:"Review Cross Chain"})})]})}return nt.exports.jsx(wo,{fullWidth:!0,onClick:()=>V(!0),"data-testid":"swap-review-btn",children:nt.exports.jsx(e,{id:"K/Ay/d",message:"Review Swap"})})}),[h,O,N,P,Re,L,u,ke,me,Ae,w,g,G,se,ie,je,K,te,ve,xe,we,C,A,he]),ct=E((()=>L&&P?nt.exports.jsxs(Nn,{sx:{display:"flex",alignItems:"center"},children:[nt.exports.jsx(Ay,{token:L,sx:{width:16,height:16,mr:6},chainId:L.chainId}),`${ha({input:g?Re:N,decimals:null==L?void 0:L.decimals})} ${null==L?void 0:L.symbol}`,nt.exports.jsx(Nn,{component:W,sx:{width:12,height:12,mx:16}}),nt.exports.jsx(Ay,{token:P,sx:{width:16,height:16,mr:6},chainId:P.chainId}),`${ha({input:g?O:Re,decimals:null==P?void 0:P.decimals})} ${null==P?void 0:P.symbol}`]}):nt.exports.jsx(Nn,{})),[L,P,N,O,Re,g]);return nt.exports.jsxs(nt.exports.Fragment,{children:[nt.exports.jsxs(Nn,{sx:{display:"flex",justifyContent:"space-between",typography:"caption",margin:20},children:[nt.exports.jsx(e,{id:"vH2C/2",message:"Swap"}),nt.exports.jsx(hs,{open:Ue,title:G?nt.exports.jsx(e,{id:"qLkska",message:"The setting has been switched to cross chain mode"}):nt.exports.jsx(e,{id:"NSCBTb",message:"The setting has been switched to swap mode"}),placement:"bottom-end",children:nt.exports.jsx(Nn,{component:Ao,children:nt.exports.jsx(Nn,{component:z,onClick:()=>H(!0),sx:{width:19,height:19,color:"text.primary",cursor:"pointer"}})})})]}),nt.exports.jsxs(Nn,{sx:{flex:1,padding:"0 20px 20px",overflowY:"auto"},children:[nt.exports.jsxs(Nn,{children:[nt.exports.jsx(kb,{sx:{mb:4},token:L,side:"from",amt:st,defaultLoadBalance:!0,onlyCurrentChain:!0,onMaxClick:Ge,onInputChange:Ve,onInputFocus:()=>{g&&Ve(""),f(Hy({isReverseRouting:!1}))},showMaxBtn:!g&&!k,occupiedAddrs:[null!==(a=null==P?void 0:P.address)&&void 0!==a?a:""],occupiedChainId:null==P?void 0:P.chainId,fiatPriceTxt:qe?`$${pa({input:qe,showDecimals:1})}`:"-",onTokenChange:(e,t)=>{if(t)return Ye();Ve(""),Ze(""),He(e),ue(""),Iy("from",e)},readOnly:g,showChainLogo:!0}),nt.exports.jsx(Rb,{onClick:Ye,disabled:rt}),nt.exports.jsx(kb,{token:P,side:"to",amt:at,onInputChange:Ze,onInputFocus:()=>{g||Ze(""),f(Hy({isReverseRouting:!0}))},occupiedAddrs:[null!==(l=null==L?void 0:L.address)&&void 0!==l?l:""],occupiedChainId:null==L?void 0:L.chainId,fiatPriceTxt:Qe?`$${pa({input:Qe,showDecimals:1})}(${Je}%)`:"-",onTokenChange:(e,t)=>{if(t)return Ye();Ve(""),Ze(""),ze(e),ue(""),Iy("to",e)},readOnly:G||!g,showChainLogo:!0}),nt.exports.jsx(Nn,{sx:{py:12,display:"flex",typography:"body2",alignItems:"center",justifyContent:"center",flexWrap:"wrap"},children:it})]}),lt,b?"":nt.exports.jsxs(Nn,{sx:{mt:13,display:"flex",typography:"h6",cursor:"pointer",justifyContent:"center",alignItems:"center",color:c.palette.text.disabled},onClick:()=>window.open("https://app.dodoex.io"),children:[nt.exports.jsx(Nn,{sx:{width:24,typography:"body2",transform:"translate(1px, 2px)","& path":{fill:c.palette.text.disabled}},component:Y}),nt.exports.jsx(e,{id:"7X+IbB",message:"Powered by DODO protocol"})]})]}),nt.exports.jsx(Sb,{toToken:P,fromToken:L,fromAmount:g?Re:N,toAmount:g?O:Re,open:U,baseFeeAmount:Me,priceImpact:Je,additionalFeeAmount:Oe,curToFiatPrice:Qe,execute:()=>ke(ct),clearFromAmt:()=>Ve(""),clearToAmt:()=>Ze(""),curFromFiatPrice:qe,pricePerFromToken:Fe,onClose:()=>V(!1),loading:Ae===bb.Loading}),nt.exports.jsx(Mb,{open:Z,onClose:()=>H(!1),isBridge:G}),nt.exports.jsx(dx,{open:le,onClose:()=>ce(!1),selectedRouteId:pe,setSelectRouteId:ue,bridgeRouteList:ie}),nt.exports.jsx(vx,{open:De,onClose:()=>Be(!1),route:he,bridgeOrderTxRequest:We,clearFromAmt:()=>Ve(""),clearToAmt:()=>Ze("")}),nt.exports.jsx(xx,{message:Le,onClose:()=>_e("")})]})}var Mx,Ox=J;if("production"===process.env.NODE_ENV)Mx=Ox.createRoot,Ox.hydrateRoot;else{var Ix=Ox.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Mx=function(e,t){Ix.usingClientEntryPoint=!0;try{return Ox.createRoot(e,t)}finally{Ix.usingClientEntryPoint=!1}}}function Fx({tonAccount:t,fromTokenAddress:r,fromChainId:n,toTokenAddress:o,toChainId:i,fromAmt:s,slippage:a,redirectLink:l}){var c,d;const u=Tn(),h=ee(),f=$(Yf),m=p.useMemo((()=>{const e=[...Hf,...f].find((e=>e.chainId===n&&e.address===r));if(!e)throw new Error("Could not find from token");return e}),[f,r,n]),g=p.useMemo((()=>{const e=[...Hf,...f].find((e=>e.chainId===i&&e.address===o));if(!e)throw new Error("Could not find from token");return e}),[f,o,i]),{fromFiatPrice:y}=hb({toToken:g,fromToken:m}),{account:b,chainId:v}=Vf(),x=$(Kf),w=!b||x[m.address.toLocaleLowerCase()],E=null===(d=null===(c=pg({tokenList:[m]}).data)||void 0===c?void 0:c[0])||void 0===d?void 0:d.balance;let A=!1;E&&(A=E.lt(s)),p.useEffect((()=>{a&&h(ob(String(a)))}),[a]);const{bridgeRouteList:C}=Kb({toToken:g,fromToken:m,fromAmount:s,fromFiatPrice:y,fromAddress:b,toAddress:t}),k=p.useMemo((()=>{if(null==C?void 0:C.length)return Object.assign(Object.assign({},C[0]),{fromAddress:null!=b?b:""})}),[C,b]),{contractStatus:T}=$(em),{bridgeOrderTxRequest:R}=px(),S=hx({route:k,bridgeOrderTxRequest:R,sendData:null==k?void 0:k.sendData});return nt.exports.jsx(Ry,{title:nt.exports.jsx(e,{id:"tKE4Ak",message:"Cross Chain Summary"}),open:!0,onClose:()=>{window.open(l)},children:nt.exports.jsxs(nt.exports.Fragment,{children:[k?nt.exports.jsxs(Nn,{sx:{px:16,pb:20,flex:1,overflowY:"auto"},children:[nt.exports.jsxs(Nn,{sx:{display:"grid",gridTemplateColumns:"36% 28% 36%",py:20,borderStyle:"solid",borderWidth:u.spacing(1,0,0),borderColor:u.palette.border.main},children:[nt.exports.jsx(sx,{token:k.fromToken,chainId:k.fromChainId,amount:k.fromAmount}),!!k.step&&nt.exports.jsx(ax,{children:nt.exports.jsx(Nn,{sx:{display:"flex",px:3,py:3,backgroundColor:u.palette.background.paperContrast,border:`1px solid ${u.palette.border.main}`,borderRadius:"50%",alignItems:"center",width:24,height:24,overflow:"hidden"},children:nt.exports.jsx(lx,{size:"medium",toolDetails:k.step.toolDetails,nameMarginLeft:8})})}),nt.exports.jsx(sx,{token:k.toToken,chainId:k.toChainId,amount:k.toTokenAmount})]}),nt.exports.jsx(bx,{route:k})]}):nt.exports.jsxs(Nn,{sx:{display:"flex",flexDirection:"column",gap:12,px:16,pb:20,flex:1},children:[nt.exports.jsx(Po,{height:28}),nt.exports.jsx(Po,{height:28}),nt.exports.jsx(Po,{height:28})]}),nt.exports.jsx(Nn,{sx:{px:16,py:20},children:A?nt.exports.jsx(wo,{fullWidth:!0,disabled:!0,children:nt.exports.jsx(e,{id:"znqB4T",message:"Insufficient balance"})}):b&&v===m.chainId?nt.exports.jsx(wo,{fullWidth:!0,isLoading:T==Of.Pending,disabled:!k||w,onClick:()=>vl(this,void 0,void 0,(function*(){S(),h(Hy({contractStatus:Of.Pending}))})),children:T==Of.Pending?nt.exports.jsx(e,{id:"P+K/3O",message:"Confirming"}):nt.exports.jsx(e,{id:"PZqJog",message:"Confirm Cross Chain"})}):nt.exports.jsx(Fb,{needSwitchChain:m.chainId})})]})})}function jx(e){return nt.exports.jsx(Ab,{...e,children:nt.exports.jsx(Nx,{getAutoSlippage:e.getAutoSlippage,onConnectWalletClick:e.onConnectWalletClick,bridgeToTonUrl:e.bridgeToTonUrl})})}function Lx(e){const t=document.getElementById("dodo-swap-widget");Mx(t).render(nt.exports.jsx(Ab,{...e,children:nt.exports.jsx(Nx,{getAutoSlippage:e.getAutoSlippage,onConnectWalletClick:e.onConnectWalletClick,bridgeToTonUrl:e.bridgeToTonUrl})}))}export{Fx as BridgeTonSummaryDialog,Lx as InitSwapWidget,jx as SwapWidget,Ab as Widget};