/**
 * Minified by jsDelivr using Terser v5.37.0.
 * Original file: /npm/@ledgerhq/connect-kit@1.1.12/dist/umd/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ledgerConnectKit={})}(this,(function(e){"use strict";let t=!1;const n=e=>(n,...r)=>{t&&console.debug(`[${e}] ${n}`,...r)},r=e=>(t,...n)=>{console.error(`[${e}] ${t}`,...n)};class i extends Error{constructor(){super(),this.name=this.constructor.name,this.message="The Ledger Extension was not found."}}class o extends Error{constructor(){super(),this.name=this.constructor.name,this.message="The specified provider is not supported."}}class s extends Error{constructor(){super(),this.name=this.constructor.name,this.code=4001,this.message="User rejected request"}}class a extends Error{constructor(){super(),this.message="Connect Kit does not support server side."}}function c(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function f(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var h={exports:{}};!function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=63)}([function(e,t,n){(function(e){n.d(t,"f",(function(){return a})),n.d(t,"g",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"e",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"o",(function(){return g})),n.d(t,"n",(function(){return y})),n.d(t,"q",(function(){return m})),n.d(t,"p",(function(){return v})),n.d(t,"D",(function(){return _})),n.d(t,"C",(function(){return b})),n.d(t,"E",(function(){return w})),n.d(t,"F",(function(){return E})),n.d(t,"w",(function(){return S})),n.d(t,"v",(function(){return O})),n.d(t,"x",(function(){return R})),n.d(t,"y",(function(){return I})),n.d(t,"t",(function(){return P})),n.d(t,"s",(function(){return k})),n.d(t,"u",(function(){return N})),n.d(t,"r",(function(){return A})),n.d(t,"m",(function(){return T})),n.d(t,"l",(function(){return M})),n.d(t,"k",(function(){return L})),n.d(t,"j",(function(){return U})),n.d(t,"A",(function(){return D})),n.d(t,"a",(function(){return z})),n.d(t,"B",(function(){return B})),n.d(t,"z",(function(){return F}));var r=n(22),i=n.n(r),o=n(58),s=n.n(o);function a(e){return new Uint8Array(e)}function c(e,t=!1){const n=e.toString("hex");return t?z(n):n}function u(e){return e.toString("utf8")}function l(e){return e.readUIntBE(0,e.length)}function f(e){return s()(e)}function h(e,t=!1){return c(f(e),t)}function d(e){return u(f(e))}function p(e){return l(f(e))}function g(t){return e.from(D(t),"hex")}function y(e){return a(g(e))}function m(e){return u(g(e))}function v(e){return p(y(e))}function _(t){return e.from(t,"utf8")}function b(e){return a(_(e))}function w(e,t=!1){return c(_(e),t)}function E(e){const t=parseInt(e,10);return function(e){if(!e)throw new Error("Number can only safely store up to 53 bits")}(!function(e){return void 0===e}(t)),t}function S(e){return f(C(x(e)))}function O(e){return C(x(e))}function R(e,t){return function(e,t){return h(C(e),t)}(x(e),t)}function I(e){return""+e}function x(e){return j((e>>>0).toString(2))}function C(e){return new Uint8Array(function(e,t=8){const n=j(e).match(new RegExp(`.{${t}}`,"gi"));return Array.from(n||[])}(e).map((e=>parseInt(e,2))))}function P(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}function k(t){return e.isBuffer(t)}function N(e){return i.a.strict(e)&&!k(e)}function A(e){return!N(e)&&!k(e)&&void 0!==e.byteLength}function T(e){return k(e)?"buffer":N(e)?"typed-array":A(e)?"array-buffer":Array.isArray(e)?"array":typeof e}function M(e){return function(e){return!("string"!=typeof e||!new RegExp(/^[01]+$/).test(e))&&e.length%8==0}(e)?"binary":P(e)?"hex":"utf8"}function L(...t){return e.concat(t)}function U(...e){let t=[];return e.forEach((e=>t=t.concat(Array.from(e)))),new Uint8Array([...t])}function j(e,t=8,n="0"){return function(e,t,n="0"){return function(e,t,n,r="0"){const i=t-e.length;let o=e;if(i>0){const t=r.repeat(i);o=n?t+e:e+t}return o}(e,t,!0,n)}(e,function(e,t=8){const n=e%t;return n?(e-n)/t*t+t:e}(e.length,t),n)}function D(e){return e.replace(/^0x/,"")}function z(e){return e.startsWith("0x")?e:"0x"+e}function B(e){return(e=j(e=D(e),2))&&(e=z(e)),e}function F(e){const t=e.startsWith("0x");return e=(e=D(e)).startsWith("0")?e.substring(1):e,t?z(e):e}}).call(this,n(44).Buffer)},function(e,t,n){n.r(t),n.d(t,"convertArrayBufferToBuffer",(function(){return i})),n.d(t,"convertArrayBufferToUtf8",(function(){return o})),n.d(t,"convertArrayBufferToHex",(function(){return s})),n.d(t,"convertArrayBufferToNumber",(function(){return a})),n.d(t,"concatArrayBuffers",(function(){return c})),n.d(t,"convertBufferToArrayBuffer",(function(){return u})),n.d(t,"convertBufferToUtf8",(function(){return l})),n.d(t,"convertBufferToHex",(function(){return f})),n.d(t,"convertBufferToNumber",(function(){return h})),n.d(t,"concatBuffers",(function(){return d})),n.d(t,"convertUtf8ToArrayBuffer",(function(){return p})),n.d(t,"convertUtf8ToBuffer",(function(){return g})),n.d(t,"convertUtf8ToHex",(function(){return y})),n.d(t,"convertUtf8ToNumber",(function(){return m})),n.d(t,"convertHexToBuffer",(function(){return v})),n.d(t,"convertHexToArrayBuffer",(function(){return _})),n.d(t,"convertHexToUtf8",(function(){return b})),n.d(t,"convertHexToNumber",(function(){return w})),n.d(t,"convertNumberToBuffer",(function(){return E})),n.d(t,"convertNumberToArrayBuffer",(function(){return S})),n.d(t,"convertNumberToUtf8",(function(){return O})),n.d(t,"convertNumberToHex",(function(){return R})),n.d(t,"detectEnv",(function(){return B})),n.d(t,"detectOS",(function(){return F})),n.d(t,"isAndroid",(function(){return H})),n.d(t,"isIOS",(function(){return q})),n.d(t,"isMobile",(function(){return $})),n.d(t,"isNode",(function(){return V})),n.d(t,"isBrowser",(function(){return W})),n.d(t,"safeJsonParse",(function(){return G})),n.d(t,"safeJsonStringify",(function(){return Y})),n.d(t,"setLocal",(function(){return Q})),n.d(t,"getLocal",(function(){return J})),n.d(t,"removeLocal",(function(){return X})),n.d(t,"getClientMeta",(function(){return ee})),n.d(t,"sanitizeHex",(function(){return re})),n.d(t,"addHexPrefix",(function(){return ie})),n.d(t,"removeHexPrefix",(function(){return oe})),n.d(t,"removeHexLeadingZeros",(function(){return se})),n.d(t,"payloadId",(function(){return ae})),n.d(t,"uuid",(function(){return ce})),n.d(t,"logDeprecationWarning",(function(){return ue})),n.d(t,"getInfuraRpcUrl",(function(){return le})),n.d(t,"getRpcUrl",(function(){return fe})),n.d(t,"formatIOSMobile",(function(){return he})),n.d(t,"saveMobileLinkInfo",(function(){return de})),n.d(t,"getMobileRegistryEntry",(function(){return pe})),n.d(t,"getMobileLinkRegistry",(function(){return ge})),n.d(t,"promisify",(function(){return ye})),n.d(t,"formatRpcError",(function(){return me})),n.d(t,"getWalletRegistryUrl",(function(){return _e})),n.d(t,"getDappRegistryUrl",(function(){return be})),n.d(t,"formatMobileRegistryEntry",(function(){return we})),n.d(t,"formatMobileRegistry",(function(){return Ee})),n.d(t,"isWalletConnectSession",(function(){return Ce})),n.d(t,"parseWalletConnectUri",(function(){return Pe})),n.d(t,"getQueryString",(function(){return Oe})),n.d(t,"appendToQueryString",(function(){return Re})),n.d(t,"parseQueryString",(function(){return Ie})),n.d(t,"formatQueryString",(function(){return xe})),n.d(t,"isEmptyString",(function(){return ke})),n.d(t,"isEmptyArray",(function(){return Ne})),n.d(t,"isBuffer",(function(){return Ae})),n.d(t,"isTypedArray",(function(){return Te})),n.d(t,"isArrayBuffer",(function(){return Me})),n.d(t,"getType",(function(){return Le})),n.d(t,"getEncoding",(function(){return Ue})),n.d(t,"isHexString",(function(){return je})),n.d(t,"isJsonRpcSubscription",(function(){return De})),n.d(t,"isJsonRpcRequest",(function(){return ze})),n.d(t,"isJsonRpcResponseSuccess",(function(){return Be})),n.d(t,"isJsonRpcResponseError",(function(){return Fe})),n.d(t,"isInternalEvent",(function(){return He})),n.d(t,"isReservedEvent",(function(){return qe})),n.d(t,"isSilentPayload",(function(){return $e})),n.d(t,"getFromWindow",(function(){return C})),n.d(t,"getFromWindowOrThrow",(function(){return P})),n.d(t,"getDocumentOrThrow",(function(){return k})),n.d(t,"getDocument",(function(){return N})),n.d(t,"getNavigatorOrThrow",(function(){return A})),n.d(t,"getNavigator",(function(){return T})),n.d(t,"getLocationOrThrow",(function(){return M})),n.d(t,"getLocation",(function(){return L})),n.d(t,"getCryptoOrThrow",(function(){return U})),n.d(t,"getCrypto",(function(){return j})),n.d(t,"getLocalStorageOrThrow",(function(){return D})),n.d(t,"getLocalStorage",(function(){return z}));var r=n(0);function i(e){return r.b(new Uint8Array(e))}function o(e){return r.e(new Uint8Array(e))}function s(e,t){return r.c(new Uint8Array(e),!t)}function a(e){return r.d(new Uint8Array(e))}function c(...e){return r.n(e.map((e=>r.c(new Uint8Array(e)))).join("")).buffer}function u(e){return r.f(e).buffer}function l(e){return r.i(e)}function f(e,t){return r.g(e,!t)}function h(e){return r.h(e)}function d(...e){return r.k(...e)}function p(e){return r.C(e).buffer}function g(e){return r.D(e)}function y(e,t){return r.E(e,!t)}function m(e){return r.F(e)}function v(e){return r.o(e)}function _(e){return r.n(e).buffer}function b(e){return r.q(e)}function w(e){return r.p(e)}function E(e){return r.w(e)}function S(e){return r.v(e).buffer}function O(e){return r.y(e)}function R(e,t){return r.x(Number(e),!t)}var I=n(59),x=n(6);const C=x.getFromWindow,P=x.getFromWindowOrThrow,k=x.getDocumentOrThrow,N=x.getDocument,A=x.getNavigatorOrThrow,T=x.getNavigator,M=x.getLocationOrThrow,L=x.getLocation,U=x.getCryptoOrThrow,j=x.getCrypto,D=x.getLocalStorageOrThrow,z=x.getLocalStorage;function B(e){return Object(I.a)(e)}function F(){const e=B();return e&&e.os?e.os:void 0}function H(){const e=F();return!!e&&e.toLowerCase().includes("android")}function q(){const e=F();return!!e&&(e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function $(){return!!F()&&(H()||q())}function V(){const e=B();return!(!e||!e.name)&&"node"===e.name.toLowerCase()}function W(){return!V()&&!!T()}var K=n(12);const G=K.a,Y=K.b;function Q(e,t){const n=Y(t),r=z();r&&r.setItem(e,n)}function J(e){let t=null,n=null;const r=z();return r&&(n=r.getItem(e)),t=n?G(n):n,t}function X(e){const t=z();t&&t.removeItem(e)}var Z=n(60);function ee(){return Z.getWindowMetadata()}var te=n(7),ne=n(2);function re(e){return r.B(e)}function ie(e){return r.a(e)}function oe(e){return r.A(e)}function se(e){return r.z(r.a(e))}const ae=te.payloadId;function ce(){return((e,t)=>{for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t})()}function ue(){console.warn("DEPRECATION WARNING: This WalletConnect client library will be deprecated in favor of @walletconnect/client. Please check docs.walletconnect.org to learn more about this migration!")}function le(e,t){let n;const r=ne.INFURA_NETWORKS[e];return r&&(n=`https://${r}.infura.io/v3/${t}`),n}function fe(e,t){let n;const r=le(e,t.infuraId);return t.custom&&t.custom[e]?n=t.custom[e]:r&&(n=r),n}function he(e,t){const n=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${n}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function de(e){const t=e.href.split("?")[0];Q(ne.MOBILE_LINK_CHOICE_KEY,Object.assign(Object.assign({},e),{href:t}))}function pe(e,t){return e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase())))[0]}function ge(e,t){let n=e;return t&&(n=t.map((t=>pe(e,t))).filter(Boolean)),n}function ye(e,t){return async(...n)=>new Promise(((r,i)=>{e.apply(t,[...n,(e,t)=>{null==e&&i(e),r(t)}])}))}function me(e){const t=e.message||"Failed or Rejected Request";let n=-32e3;if(e&&!e.code)switch(t){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3}const r={code:n,message:t};return e.data&&(r.data=e.data),r}const ve="https://registry.walletconnect.com";function _e(){return ve+"/api/v2/wallets"}function be(){return ve+"/api/v2/dapps"}function we(e,t="mobile"){var n;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:null!==(n=e.image_url.sm)&&void 0!==n?n:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function Ee(e,t="mobile"){return Object.values(e).filter((e=>!!e[t].universal||!!e[t].native)).map((e=>we(e,t)))}var Se=n(24);function Oe(e){const t=-1!==e.indexOf("?")?e.indexOf("?"):void 0;return void 0!==t?e.substr(t):""}function Re(e,t){let n=Ie(e);return n=Object.assign(Object.assign({},n),t),xe(n)}function Ie(e){return Se.parse(e)}function xe(e){return Se.stringify(e)}function Ce(e){return void 0!==e.bridge}function Pe(e){const t=e.indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),i=function(e){const t=e.split("@");return{handshakeTopic:t[0],version:parseInt(t[1],10)}}(e.substring(t+1,n)),o=function(e){const t=Ie(e);return{key:t.key||"",bridge:t.bridge||""}}(void 0!==n?e.substr(n):"");return Object.assign(Object.assign({protocol:r},i),o)}function ke(e){return""===e||"string"==typeof e&&""===e.trim()}function Ne(e){return!(e&&e.length)}function Ae(e){return r.s(e)}function Te(e){return r.u(e)}function Me(e){return r.r(e)}function Le(e){return r.m(e)}function Ue(e){return r.l(e)}function je(e,t){return r.t(e,t)}function De(e){return"object"==typeof e.params}function ze(e){return void 0!==e.method}function Be(e){return void 0!==e.result}function Fe(e){return void 0!==e.error}function He(e){return void 0!==e.event}function qe(e){return ne.RESERVED_EVENTS.includes(e)||e.startsWith("wc_")}function $e(e){return!!e.method.startsWith("wc_")||!ne.SIGNING_METHODS.includes(e.method)}},function(e,t,n){n.r(t);var r=n(34);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);var o=n(57);n.d(t,"ERROR_SESSION_CONNECTED",(function(){return o.k})),n.d(t,"ERROR_SESSION_DISCONNECTED",(function(){return o.l})),n.d(t,"ERROR_SESSION_REJECTED",(function(){return o.m})),n.d(t,"ERROR_MISSING_JSON_RPC",(function(){return o.e})),n.d(t,"ERROR_MISSING_RESULT",(function(){return o.h})),n.d(t,"ERROR_MISSING_ERROR",(function(){return o.c})),n.d(t,"ERROR_MISSING_METHOD",(function(){return o.f})),n.d(t,"ERROR_MISSING_ID",(function(){return o.d})),n.d(t,"ERROR_MISSING_REQUIRED",(function(){return o.g})),n.d(t,"ERROR_INVALID_RESPONSE",(function(){return o.a})),n.d(t,"ERROR_INVALID_URI",(function(){return o.b})),n.d(t,"ERROR_QRCODE_MODAL_NOT_PROVIDED",(function(){return o.i})),n.d(t,"ERROR_QRCODE_MODAL_USER_CLOSED",(function(){return o.j})),n.d(t,"RESERVED_EVENTS",(function(){return o.p})),n.d(t,"reservedEvents",(function(){return o.v})),n.d(t,"WALLET_METHODS",(function(){return o.s})),n.d(t,"SIGNING_METHODS",(function(){return o.q})),n.d(t,"STATE_METHODS",(function(){return o.r})),n.d(t,"signingMethods",(function(){return o.w})),n.d(t,"stateMethods",(function(){return o.x})),n.d(t,"MOBILE_LINK_CHOICE_KEY",(function(){return o.o})),n.d(t,"mobileLinkChoiceKey",(function(){return o.u})),n.d(t,"INFURA_NETWORKS",(function(){return o.n})),n.d(t,"infuraNetworks",(function(){return o.t}));var s=n(35);for(var i in s)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(i);var a=n(36);n.d(t,"IEvents",(function(){return a.a}));var c=n(37);for(var i in c)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return c[e]}))}(i);var u=n(38);for(var i in u)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return u[e]}))}(i);var l=n(39);for(var i in l)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return l[e]}))}(i);var f=n(40);for(var i in f)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return f[e]}))}(i);var h=n(41);for(var i in h)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return h[e]}))}(i);var d=n(42);for(var i in d)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return d[e]}))}(i);var p=n(43);for(var i in p)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return p[e]}))}(i)},function(e,t,n){n.d(t,"b",(function(){return i})),n.d(t,"g",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"e",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"j",(function(){return l})),n.d(t,"h",(function(){return r})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"k",(function(){return d})),n.d(t,"l",(function(){return p}));const r=512,i=256,o=256,s="AES-CBC",a="SHA-"+i,c="HMAC",u="SHA-256",l="SHA-512",f="encrypt",h="decrypt",d="sign",p="verify"},function(e,t,n){n.d(t,"f",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"h",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"i",(function(){return l})),n.d(t,"j",(function(){return f})),n.d(t,"a",(function(){return h}));const r="PARSE_ERROR",i="INVALID_REQUEST",o="METHOD_NOT_FOUND",s="INVALID_PARAMS",a="INTERNAL_ERROR",c="SERVER_ERROR",u=[-32700,-32600,-32601,-32602,-32603],l=[-32e3,-32099],f={[r]:{code:-32700,message:"Parse error"},[i]:{code:-32600,message:"Invalid Request"},[o]:{code:-32601,message:"Method not found"},[s]:{code:-32602,message:"Invalid params"},[a]:{code:-32603,message:"Internal error"},[c]:{code:-32e3,message:"Server error"}},h=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(17);r.__exportStar(n(64),t),r.__exportStar(n(65),t)},function(e,t,n){function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function i(e){const t=r(e);if(!t)throw new Error(e+" is not defined in Window");return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=i,t.getDocumentOrThrow=function(){return i("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return i("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return i("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return i("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return i("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},function(e,t,n){n.r(t);var r=n(4);n.d(t,"PARSE_ERROR",(function(){return r.f})),n.d(t,"INVALID_REQUEST",(function(){return r.d})),n.d(t,"METHOD_NOT_FOUND",(function(){return r.e})),n.d(t,"INVALID_PARAMS",(function(){return r.c})),n.d(t,"INTERNAL_ERROR",(function(){return r.b})),n.d(t,"SERVER_ERROR",(function(){return r.h})),n.d(t,"RESERVED_ERROR_CODES",(function(){return r.g})),n.d(t,"SERVER_ERROR_CODE_RANGE",(function(){return r.i})),n.d(t,"STANDARD_ERROR_MAP",(function(){return r.j})),n.d(t,"DEFAULT_ERROR",(function(){return r.a}));var i=n(11);n.d(t,"isServerErrorCode",(function(){return i.d})),n.d(t,"isReservedErrorCode",(function(){return i.c})),n.d(t,"isValidErrorCode",(function(){return i.e})),n.d(t,"getError",(function(){return i.a})),n.d(t,"getErrorByCode",(function(){return i.b})),n.d(t,"validateJsonRpcError",(function(){return i.g})),n.d(t,"parseConnectionError",(function(){return i.f}));var o=n(25);for(var s in o)["default","PARSE_ERROR","INVALID_REQUEST","METHOD_NOT_FOUND","INVALID_PARAMS","INTERNAL_ERROR","SERVER_ERROR","RESERVED_ERROR_CODES","SERVER_ERROR_CODE_RANGE","STANDARD_ERROR_MAP","DEFAULT_ERROR","isServerErrorCode","isReservedErrorCode","isValidErrorCode","getError","getErrorByCode","validateJsonRpcError","parseConnectionError"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(s);var a=n(26);n.d(t,"payloadId",(function(){return a.e})),n.d(t,"formatJsonRpcRequest",(function(){return a.c})),n.d(t,"formatJsonRpcResult",(function(){return a.d})),n.d(t,"formatJsonRpcError",(function(){return a.b})),n.d(t,"formatErrorMessage",(function(){return a.a}));var c=n(27);n.d(t,"isValidRoute",(function(){return c.c})),n.d(t,"isValidDefaultRoute",(function(){return c.a})),n.d(t,"isValidWildcardRoute",(function(){return c.e})),n.d(t,"isValidLeadingWildcardRoute",(function(){return c.b})),n.d(t,"isValidTrailingWildcardRoute",(function(){return c.d}));var u=n(28);for(var s in u)["default","PARSE_ERROR","INVALID_REQUEST","METHOD_NOT_FOUND","INVALID_PARAMS","INTERNAL_ERROR","SERVER_ERROR","RESERVED_ERROR_CODES","SERVER_ERROR_CODE_RANGE","STANDARD_ERROR_MAP","DEFAULT_ERROR","isServerErrorCode","isReservedErrorCode","isValidErrorCode","getError","getErrorByCode","validateJsonRpcError","parseConnectionError","payloadId","formatJsonRpcRequest","formatJsonRpcResult","formatJsonRpcError","formatErrorMessage","isValidRoute","isValidDefaultRoute","isValidWildcardRoute","isValidLeadingWildcardRoute","isValidTrailingWildcardRoute"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return u[e]}))}(s);var l=n(32);n.d(t,"isHttpUrl",(function(){return l.a})),n.d(t,"isWsUrl",(function(){return l.c})),n.d(t,"isLocalhostUrl",(function(){return l.b}));var f=n(33);n.d(t,"isJsonRpcPayload",(function(){return f.b})),n.d(t,"isJsonRpcRequest",(function(){return f.c})),n.d(t,"isJsonRpcResponse",(function(){return f.d})),n.d(t,"isJsonRpcResult",(function(){return f.e})),n.d(t,"isJsonRpcError",(function(){return f.a})),n.d(t,"isJsonRpcValidationInvalid",(function(){return f.f}))},function(e,t,n){n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return f}));var r=n(5),i=n(3);async function o(e,t=i.a){return r.getSubtleCrypto().importKey("raw",e,function(e){return e===i.a?{length:i.b,name:i.a}:{hash:{name:i.f},name:i.e}}(t),!0,function(e){return e===i.a?[i.d,i.c]:[i.k,i.l]}(t))}async function s(e,t,n){const s=r.getSubtleCrypto(),a=await o(t,i.a),c=await s.encrypt({iv:e,name:i.a},a,n);return new Uint8Array(c)}async function a(e,t,n){const s=r.getSubtleCrypto(),a=await o(t,i.a),c=await s.decrypt({iv:e,name:i.a},a,n);return new Uint8Array(c)}async function c(e,t){const n=r.getSubtleCrypto(),s=await o(e,i.e),a=await n.sign({length:i.g,name:i.e},s,t);return new Uint8Array(a)}async function u(e,t){const n=r.getSubtleCrypto(),s=await o(e,i.e),a=await n.sign({length:i.h,name:i.e},s,t);return new Uint8Array(a)}async function l(e){const t=r.getSubtleCrypto(),n=await t.digest({name:i.i},e);return new Uint8Array(n)}async function f(e){const t=r.getSubtleCrypto(),n=await t.digest({name:i.j},e);return new Uint8Array(n)}},function(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},function(e,t,n){const r=n(54),i=n(55);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},function(e,t,n){n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"f",(function(){return l}));var r=n(4);function i(e){return e<=r.i[0]&&e>=r.i[1]}function o(e){return r.g.includes(e)}function s(e){return"number"==typeof e}function a(e){return Object.keys(r.j).includes(e)?r.j[e]:r.j[r.a]}function c(e){return Object.values(r.j).find((t=>t.code===e))||r.j[r.a]}function u(e){if(void 0===e.error.code)return{valid:!1,error:"Missing code for JSON-RPC error"};if(void 0===e.error.message)return{valid:!1,error:"Missing message for JSON-RPC error"};if(!s(e.error.code))return{valid:!1,error:"Invalid error code type for JSON-RPC: "+e.error.code};if(o(e.error.code)){const t=c(e.error.code);if(t.message!==r.j[r.a].message&&e.error.message===t.message)return{valid:!1,error:"Invalid error code message for JSON-RPC: "+e.error.code}}return{valid:!0}}function l(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}},function(e,t,n){function r(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}}function i(e){return"string"==typeof e?e:JSON.stringify(e)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}))},function(e,t,n){var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,s,a;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):y(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,l=y(c,u);for(n=0;n<u;++n)o(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return f(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return f(this,e,t,!0)},a.prototype.once=function(e,t){return u(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,o,s;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(45);n.d(t,"randomBytes",(function(){return r.a}));var i=n(46);n.d(t,"aesCbcDecrypt",(function(){return i.a})),n.d(t,"aesCbcEncrypt",(function(){return i.b}));var o=n(47);n.d(t,"hmacSha256Sign",(function(){return o.a})),n(52),n(16),n(3)},function(e,t,n){n.d(t,"a",(function(){return r}));class r{}},function(e,t,n){var r=n(48);n.o(r,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return r.isConstantTime})),n(49);var i=n(50);n.o(i,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return i.isConstantTime}));var o=n(51);n.d(t,"isConstantTime",(function(){return o.a}))},function(e,t,n){n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return s})),n.d(t,"__decorate",(function(){return a})),n.d(t,"__param",(function(){return c})),n.d(t,"__metadata",(function(){return u})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return h})),n.d(t,"__exportStar",(function(){return d})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return g})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return v})),n.d(t,"__asyncGenerator",(function(){return _})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return w})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return S})),n.d(t,"__importDefault",(function(){return O})),n.d(t,"__classPrivateFieldGet",(function(){return R})),n.d(t,"__classPrivateFieldSet",(function(){return I}));
/*! *****************************************************************************
	Copyright (c) Microsoft Corporation.

	Permission to use, copy, modify, and/or distribute this software for any
	purpose with or without fee is hereby granted.

	THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
	REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
	AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
	INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
	LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
	OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
	PERFORMANCE OF THIS SOFTWARE.
	***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function h(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function d(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function _(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function R(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function I(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c,u=[],l=!1,f=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&d())}function d(){if(!l){var e=a(h);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){n.r(t);var r=n(29);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);var o=n(15);n.d(t,"IEvents",(function(){return o.a}));var s=n(30);n.d(t,"IJsonRpcConnection",(function(){return s.b})),n.d(t,"IBaseJsonRpcProvider",(function(){return s.a})),n.d(t,"IJsonRpcProvider",(function(){return s.c}));var a=n(31);for(var i in a)["default","IEvents","IJsonRpcConnection","IBaseJsonRpcProvider","IJsonRpcProvider"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i)},function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},function(e,t){e.exports=i,i.strict=o,i.loose=s;var n=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(e){return o(e)||s(e)}function o(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function s(e){return r[n.call(e)]}},function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=p(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[u(e)]},h.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},h.prototype.set=function(e,t){this.map[u(e)]=l(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(e,t){var n,r,i=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),v.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},m.call(_.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];w.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,n){return new Promise((function(r,o){var s=new _(e,n);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new w(i,n))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=h,e.Request=_,e.Response=w),t.Headers=h,t.Request=_,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},function(e,t,n){const r=n(69),i=n(70),o=n(71),s=n(72);function a(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function u(e,t){return t.decode?i(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function f(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function d(e,t){a((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&u(n,e).includes(e.arrayFormatSeparator);n=o?u(n,e):n;const s=i||o?n.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===n?n:u(n,e);r[t]=s};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;let[e,s]=o(t.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator"].includes(t.arrayFormat)?s:u(s,t),n(u(e,t),s,r)}for(const e of Object.keys(r)){const n=r[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=h(n[e],t);else r[e]=h(n,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort(((e,t)=>Number(e)-Number(t))).map((e=>t[e])):t}(n):e[t]=n,e}),Object.create(null))}t.extract=f,t.parse=d,t.stringify=(e,t)=>{if(!e)return"";a((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[c(t,e),"[",i,"]"].join("")]:[...n,[c(t,e),"[",c(i,e),"]=",c(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[c(t,e),"[]"].join("")]:[...n,[c(t,e),"[]=",c(r,e)].join("")];case"comma":case"separator":return t=>(n,r)=>null==r||0===r.length?n:0===n.length?[[c(t,e),"=",c(r,e)].join("")]:[[n,c(r,e)].join(e.arrayFormatSeparator)];default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,c(t,e)]:[...n,[c(t,e),"=",c(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((n=>{const i=e[n];return void 0===i?"":null===i?c(n,t):Array.isArray(i)?i.reduce(r(n),[]).join("&"):c(n,t)+"="+c(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=o(e,"#");return Object.assign({url:n.split("?")[0]||"",query:d(f(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:u(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=l(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),s=Object.assign(o,e.query);let a=t.stringify(s,n);a&&(a="?"+a);let u=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u="#"+c(e.fragmentIdentifier,n)),`${r}${a}${u}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:i,query:o,fragmentIdentifier:a}=t.parseUrl(e,r);return t.stringifyUrl({url:i,query:s(o,n),fragmentIdentifier:a},r)},t.exclude=(e,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,i,r)}},function(e,t,n){n.r(t),n.d(t,"isNodeJs",(function(){return o}));var r=n(5);for(var i in r)["default","isNodeJs"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);const o=r.isNode},function(e,t,n){n.d(t,"e",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=n(11),i=n(4);function o(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}function s(e,t,n){return{id:n||o(),jsonrpc:"2.0",method:e,params:t}}function a(e,t){return{id:e,jsonrpc:"2.0",result:t}}function c(e,t,n){return{id:e,jsonrpc:"2.0",error:u(t,n)}}function u(e,t){return void 0===e?Object(r.a)(i.b):("string"==typeof e&&(e=Object.assign(Object.assign({},Object(r.a)(i.h)),{message:e})),void 0!==t&&(e.data=t),Object(r.c)(e.code)&&(e=Object(r.b)(e.code)),e)}},function(e,t,n){function r(e){return e.includes("*")?o(e):!/\W/g.test(e)}function i(e){return"*"===e}function o(e){return!!i(e)||!!e.includes("*")&&2===e.split("*").length&&1===e.split("*").filter((e=>""===e.trim())).length}function s(e){return!i(e)&&o(e)&&!e.split("*")[0].trim()}function a(e){return!i(e)&&o(e)&&!e.split("*")[1].trim()}n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return a}))},function(e,t,n){n.r(t);var r=n(20);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i)},function(e,t){},function(e,t,n){n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s}));var r=n(15);class i extends r.a{constructor(e){super()}}class o extends r.a{constructor(){super()}}class s extends o{constructor(e){super()}}},function(e,t){},function(e,t,n){function r(e,t){const n=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==n&&new RegExp(t).test(n)}function i(e){return r(e,"^https?:")}function o(e){return r(e,"^wss?:")}function s(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}))},function(e,t,n){function r(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function i(e){return r(e)&&"method"in e}function o(e){return r(e)&&(s(e)||a(e))}function s(e){return"result"in e}function a(e){return"error"in e}function c(e){return"error"in e&&!1===e.valid}n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"f",(function(){return c}))},function(e,t){},function(e,t){},function(e,t,n){n.d(t,"a",(function(){return r}));class r{}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){(function(e){
/*!
	 * The buffer module from node.js, for the browser.
	 *
	 * @author   Feross Aboukhadijeh <http://feross.org>
	 * @license  MIT
	 */
var r=n(66),i=n(67),o=n(68);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=a(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|d(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|d(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|d(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=n;o<a;o++)if(u(e,o)===u(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var f=!0,h=0;h<c;h++)if(u(e,o+h)!==u(t,h)){f=!1;break}if(f)return o}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function b(e,t,n,r){return H(B(t,e.length-n),e,n,r)}function w(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return w(e,t,n,r)}function S(e,t,n,r){return H(F(t),e,n,r)}function O(e,t,n,r){return H(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function R(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,c,u=e[i],l=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=z(e[o]);return i}function k(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function N(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,o){return o||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,o){return o||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):g.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(r,i),l=e.slice(t,n),f=0;f<a;++f)if(u[f]!==l[f]){o=u[f],s=l[f];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var i=t-e;n=new c(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=c.isBuffer(e)?e:B(new c(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function z(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(18))},function(e,t,n){n.d(t,"a",(function(){return i}));var r=n(5);function i(e){return r.getBrowerCrypto().getRandomValues(new Uint8Array(e))}},function(e,t,n){n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(8);function i(e,t,n){return Object(r.b)(e,t,n)}function o(e,t,n){return Object(r.a)(e,t,n)}},function(e,t,n){n.d(t,"a",(function(){return i}));var r=n(8);async function i(e,t){return await Object(r.c)(e,t)}n(16)},function(e,t,n){var r=n(5);n.o(r,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return r.isConstantTime}))},function(e,t,n){},function(e,t){},function(e,t,n){function r(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n}n.d(t,"a",(function(){return r}))},function(e,t,n){n(8)},function(e,t,n){const r=n(21),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}}},function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},function(e,t){let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(r,"g"),t.NUMERIC=new RegExp("[0-9]+","g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+n+"$"),o=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return o.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},function(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const i=n.modules.size,o=n.modules.data,s=t.getScale(i,r),a=Math.floor((i+2*r.margin)*s),c=r.margin*s,u=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let l=4*(t*a+n),f=r.color.light;t>=c&&n>=c&&t<a-c&&n<a-c&&(f=u[o[Math.floor((t-c)/s)*i+Math.floor((n-c)/s)]?1:0]),e[l++]=f.r,e[l++]=f.g,e[l++]=f.b,e[l]=f.a}}},function(e,t,n){n.d(t,"k",(function(){return r})),n.d(t,"l",(function(){return i})),n.d(t,"m",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"h",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"f",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"g",(function(){return f})),n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return d})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return g})),n.d(t,"p",(function(){return y})),n.d(t,"v",(function(){return m})),n.d(t,"s",(function(){return v})),n.d(t,"q",(function(){return _})),n.d(t,"r",(function(){return b})),n.d(t,"w",(function(){return w})),n.d(t,"x",(function(){return E})),n.d(t,"o",(function(){return S})),n.d(t,"u",(function(){return O})),n.d(t,"n",(function(){return R})),n.d(t,"t",(function(){return I}));const r="Session currently connected",i="Session currently disconnected",o="Session Rejected",s="Missing JSON RPC response",a='JSON-RPC success response must include "result" field',c='JSON-RPC error response must include "error" field',u='JSON RPC request must have valid "method" value',l='JSON RPC request must have valid "id" value',f="Missing one of the required parameters: bridge / uri / session",h="JSON RPC response format is invalid",d="URI format is invalid",p="QRCode Modal not provided",g="User close QRCode Modal",y=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],m=y,v=["wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],_=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign",...v],b=["eth_accounts","eth_chainId","net_version"],w=_,E=b,S="WALLETCONNECT_DEEPLINK_CHOICE",O=S,R={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"},I=R},function(e,t,n){(function(t){var r=n(22).strict;e.exports=function(e){if(r(e)){var n=t.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(n=n.slice(e.byteOffset,e.byteOffset+e.byteLength)),n}return t.from(e)}}).call(this,n(44).Buffer)},function(e,t,n){(function(e){n.d(t,"a",(function(){return h}));var r=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},i=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},o=function(t){this.version=t,this.type="node",this.name="node",this.os=e.platform},s=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},a=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},c=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},u=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],f=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function h(t){return t?p(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new c:"undefined"!=typeof navigator?p(navigator.userAgent):void 0!==e&&e.version?new o(e.version.slice(1)):null}function d(e){return""!==e&&l.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]}),!1)}function p(e){var t=d(e);if(!t)return null;var n=t[0],o=t[1];if("searchbot"===n)return new a;var c=o[1]&&o[1].split(".").join("_").split("_").slice(0,3);c?c.length<3&&(c=r(r([],c,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-c.length),!0)):c=[];var l=c.join("."),h=function(e){for(var t=0,n=f.length;t<n;t++){var r=f[t],i=r[0];if(r[1].exec(e))return i}return null}(e),p=u.exec(e);return p&&p[1]?new s(n,l,h,p[1]):new i(n,l,h)}}).call(this,n(19))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowMetadata=void 0;const r=n(6);t.getWindowMetadata=function(){let e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const i=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop(),n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:i}}},function(e,t,n){(function(e){var r=n(1),i=n(62);const o=void 0!==e.WebSocket?e.WebSocket:n(74);t.a=class{constructor(e){if(this.opts=e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=e.protocol,this._version=e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=e.subscriptions||[],this._netMonitor=e.netMonitor||new i.a,!e.url||"string"!=typeof e.url)throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",(()=>this._socketCreate()))}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return 0===this.readyState}set connected(e){}get connected(){return 1===this.readyState}set closing(e){}get closing(){return 2===this.readyState}set closed(e){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(e,t,n){if(!t||"string"!=typeof t)throw new Error("Missing or invalid topic field");this._socketSend({topic:t,type:"pub",payload:e,silent:!!n})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,t){this._events.push({event:e,callback:t})}_socketCreate(){if(this._nextSocket)return;const e=function(e,t,n){var i,o;const s=(e.startsWith("https")?e.replace("https","wss"):e.startsWith("http")?e.replace("http","ws"):e).split("?"),a=Object(r.isBrowser)()?{protocol:t,version:n,env:"browser",host:(null===(i=Object(r.getLocation)())||void 0===i?void 0:i.host)||""}:{protocol:t,version:n,env:(null===(o=Object(r.detectEnv)())||void 0===o?void 0:o.name)||""},c=Object(r.appendToQueryString)(Object(r.getQueryString)(s[1]||""),a);return s[0]+"?"+c}(this._url,this._protocol,this._version);if(this._nextSocket=new o(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=e=>this._socketReceive(e),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=e=>this._socketError(e),this._nextSocket.onclose=()=>{setTimeout((()=>{this._nextSocket=null,this._socketCreate()}),1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(e){const t=JSON.stringify(e);this._socket&&1===this._socket.readyState?this._socket.send(t):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let t;try{t=JSON.parse(e.data)}catch(e){return}if(this._socketSend({topic:t.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const e=this._events.filter((e=>"message"===e.event));e&&e.length&&e.forEach((e=>e.callback(t)))}}_socketError(e){const t=this._events.filter((e=>"error"===e.event));t&&t.length&&t.forEach((t=>t.callback(e)))}_queueSubscriptions(){this._subscriptions.forEach((e=>this._queue.push({topic:e,type:"sub",payload:"",silent:!0}))),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){this._queue.forEach((e=>this._socketSend(e))),this._queue=[]}}}).call(this,n(18))},function(e,t,n){t.a=class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",(()=>this.trigger("online"))),window.addEventListener("offline",(()=>this.trigger("offline"))))}on(e,t){this._eventEmitters.push({event:e,callback:t})}trigger(e){let t=[];e&&(t=this._eventEmitters.filter((t=>t.event===e))),t.forEach((e=>{e.callback()}))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(17),i=r.__importDefault(n(13)),o=n(102),s=n(103),a=n(2),c=n(1),u=n(73);t.default=class{constructor(e){this.events=new i.default,this.rpc={infuraId:null==e?void 0:e.infuraId,custom:null==e?void 0:e.rpc},this.signer=new o.JsonRpcProvider(new u.SignerConnection(e));const t=this.signer.connection.chainId||(null==e?void 0:e.chainId)||1;this.http=this.setHttpProvider(t),this.registerEventListeners()}get connected(){return this.signer.connection.connected}get connector(){return this.signer.connection.connector}get accounts(){return this.signer.connection.accounts}get chainId(){return this.signer.connection.chainId}get rpcUrl(){var e;return(null===(e=this.http)||void 0===e?void 0:e.connection).url||""}request(e){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.method){case"eth_requestAccounts":return yield this.connect(),this.signer.connection.accounts;case"eth_accounts":return this.signer.connection.accounts;case"eth_chainId":return this.signer.connection.chainId}if(a.SIGNING_METHODS.includes(e.method))return this.signer.request(e);if(void 0===this.http)throw new Error(`Cannot request JSON-RPC method (${e.method}) without provided rpc url`);return this.http.request(e)}))}sendAsync(e,t){this.request(e).then((e=>t(null,e))).catch((e=>t(e,void 0)))}enable(){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.request({method:"eth_requestAccounts"})}))}connect(){return r.__awaiter(this,void 0,void 0,(function*(){this.signer.connection.connected||(yield this.signer.connect())}))}disconnect(){return r.__awaiter(this,void 0,void 0,(function*(){this.signer.connection.connected&&(yield this.signer.disconnect())}))}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}registerEventListeners(){this.signer.connection.on("accountsChanged",(e=>{this.events.emit("accountsChanged",e)})),this.signer.connection.on("chainChanged",(e=>{this.http=this.setHttpProvider(e),this.events.emit("chainChanged",e)})),this.signer.on("disconnect",(()=>{this.events.emit("disconnect")}))}setHttpProvider(e){const t=c.getRpcUrl(e,this.rpc);if(void 0!==t)return new o.JsonRpcProvider(new s.HttpConnection(t))}}},function(e,t,n){(function(e){function n(){return(null==e?void 0:e.crypto)||(null==e?void 0:e.msCrypto)||{}}function r(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=r,t.isBrowserCryptoAvailable=function(){return!!n()&&!!r()}}).call(this,n(18))},function(e,t,n){(function(e){function n(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function r(){return void 0!==e&&void 0!==e.versions&&void 0!==e.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=n,t.isNode=r,t.isBrowser=function(){return!n()&&!r()}}).call(this,n(19))},function(e,t,n){t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,f=a>0?s-4:s;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(u(e,s,s+16383>a?a:s+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,u=c>>1,l=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=u}return(d?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+d]=255&s,d+=p,s/=256,u-=8);e[n+d-p]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()))},function(e,t,n){var r=new RegExp("(%[a-f0-9]{2})|([^%]+?)","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function s(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=s(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),a=0;a<o.length;a++){var c=o[a];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}},function(e,t,n){e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SignerConnection=void 0;const r=n(17),i=r.__importDefault(n(13)),o=r.__importDefault(n(100)),s=r.__importDefault(n(75)),a=n(20),c=n(7);class u extends a.IJsonRpcConnection{constructor(e){super(),this.events=new i.default,this.accounts=[],this.chainId=1,this.pending=!1,this.bridge="https://bridge.walletconnect.org",this.qrcode=!0,this.qrcodeModalOptions=void 0,this.opts=e,this.chainId=(null==e?void 0:e.chainId)||this.chainId,this.wc=this.register(e)}get connected(){return void 0!==this.wc&&this.wc.connected}get connecting(){return this.pending}get connector(){return this.wc=this.register(this.opts),this.wc}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}open(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.connected)return new Promise(((t,n)=>{this.on("error",(e=>{n(e)})),this.on("open",(()=>{t()})),this.create(e)}));this.onOpen()}))}close(){return r.__awaiter(this,void 0,void 0,(function*(){void 0!==this.wc&&(this.wc.connected&&this.wc.killSession(),this.onClose())}))}send(e){return r.__awaiter(this,void 0,void 0,(function*(){this.wc=this.register(this.opts),this.connected||(yield this.open()),this.sendPayload(e).then((e=>this.events.emit("payload",e))).catch((t=>this.events.emit("payload",c.formatJsonRpcError(e.id,t.message))))}))}register(e){if(this.wc)return this.wc;this.opts=e||this.opts,this.bridge=(null==e?void 0:e.connector)?e.connector.bridge:(null==e?void 0:e.bridge)||"https://bridge.walletconnect.org",this.qrcode=void 0===(null==e?void 0:e.qrcode)||!1!==e.qrcode,this.chainId=void 0!==(null==e?void 0:e.chainId)?e.chainId:this.chainId,this.qrcodeModalOptions=null==e?void 0:e.qrcodeModalOptions;const t={bridge:this.bridge,qrcodeModal:this.qrcode?s.default:void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:null==e?void 0:e.storageId,signingMethods:null==e?void 0:e.signingMethods,clientMeta:null==e?void 0:e.clientMeta};if(this.wc=void 0!==(null==e?void 0:e.connector)?e.connector:new o.default(t),void 0===this.wc)throw new Error("Failed to register WalletConnect connector");return this.wc.accounts.length&&(this.accounts=this.wc.accounts),this.wc.chainId&&(this.chainId=this.wc.chainId),this.registerConnectorEvents(),this.wc}onOpen(e){this.pending=!1,e&&(this.wc=e),this.events.emit("open")}onClose(){this.pending=!1,this.wc&&(this.wc=void 0),this.events.emit("close")}onError(e,t="Failed or Rejected Request",n=-32e3){const r={id:e.id,jsonrpc:e.jsonrpc,error:{code:n,message:t}};return this.events.emit("payload",r),r}create(e){this.wc=this.register(this.opts),this.chainId=e||this.chainId,this.connected||this.pending||(this.pending=!0,this.registerConnectorEvents(),this.wc.createSession({chainId:this.chainId}).then((()=>this.events.emit("created"))).catch((e=>this.events.emit("error",e))))}registerConnectorEvents(){this.wc=this.register(this.opts),this.wc.on("connect",(e=>{var t,n;e?this.events.emit("error",e):(this.accounts=(null===(t=this.wc)||void 0===t?void 0:t.accounts)||[],this.chainId=(null===(n=this.wc)||void 0===n?void 0:n.chainId)||this.chainId,this.onOpen())})),this.wc.on("disconnect",(e=>{e?this.events.emit("error",e):this.onClose()})),this.wc.on("modal_closed",(()=>{this.events.emit("error",new Error("User closed modal"))})),this.wc.on("session_update",((e,t)=>{const{accounts:n,chainId:r}=t.params[0];(!this.accounts||n&&this.accounts!==n)&&(this.accounts=n,this.events.emit("accountsChanged",n)),(!this.chainId||r&&this.chainId!==r)&&(this.chainId=r,this.events.emit("chainChanged",r))}))}sendPayload(e){return r.__awaiter(this,void 0,void 0,(function*(){this.wc=this.register(this.opts);try{const t=yield this.wc.unsafeSend(e);return this.sanitizeResponse(t)}catch(t){return this.onError(e,t.message)}}))}sanitizeResponse(e){return void 0!==e.error&&void 0===e.error.code?c.formatJsonRpcError(e.id,e.error.message,e.error.data):e}}t.SignerConnection=u,t.default=u},function(e,t,n){e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(e,t,n){(function(t){function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(1),o=r(n(76)),s=r(n(98)),a=n(101);function c(e){return a.createElement("div",{className:"walletconnect-modal__header"},a.createElement("img",{src:"data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='300px' height='185px' viewBox='0 0 300 185' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch --%3E %3Ctitle%3EWalletConnect%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cdefs%3E%3C/defs%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='walletconnect-logo-alt' fill='%233B99FC' fill-rule='nonzero'%3E %3Cpath d='M61.4385429,36.2562612 C110.349767,-11.6319051 189.65053,-11.6319051 238.561752,36.2562612 L244.448297,42.0196786 C246.893858,44.4140867 246.893858,48.2961898 244.448297,50.690599 L224.311602,70.406102 C223.088821,71.6033071 221.106302,71.6033071 219.883521,70.406102 L211.782937,62.4749541 C177.661245,29.0669724 122.339051,29.0669724 88.2173582,62.4749541 L79.542302,70.9685592 C78.3195204,72.1657633 76.337001,72.1657633 75.1142214,70.9685592 L54.9775265,51.2530561 C52.5319653,48.8586469 52.5319653,44.9765439 54.9775265,42.5821357 L61.4385429,36.2562612 Z M280.206339,77.0300061 L298.128036,94.5769031 C300.573585,96.9713 300.573599,100.85338 298.128067,103.247793 L217.317896,182.368927 C214.872352,184.763353 210.907314,184.76338 208.461736,182.368989 C208.461726,182.368979 208.461714,182.368967 208.461704,182.368957 L151.107561,126.214385 C150.496171,125.615783 149.504911,125.615783 148.893521,126.214385 C148.893517,126.214389 148.893514,126.214393 148.89351,126.214396 L91.5405888,182.368927 C89.095052,184.763359 85.1300133,184.763399 82.6844276,182.369014 C82.6844133,182.369 82.684398,182.368986 82.6843827,182.36897 L1.87196327,103.246785 C-0.573596939,100.852377 -0.573596939,96.9702735 1.87196327,94.5758653 L19.7936929,77.028998 C22.2392531,74.6345898 26.2042918,74.6345898 28.6498531,77.028998 L86.0048306,133.184355 C86.6162214,133.782957 87.6074796,133.782957 88.2188704,133.184355 C88.2188796,133.184346 88.2188878,133.184338 88.2188969,133.184331 L145.571,77.028998 C148.016505,74.6345347 151.981544,74.6344449 154.427161,77.028798 C154.427195,77.0288316 154.427229,77.0288653 154.427262,77.028899 L211.782164,133.184331 C212.393554,133.782932 213.384814,133.782932 213.996204,133.184331 L271.350179,77.0300061 C273.79574,74.6355969 277.760778,74.6355969 280.206339,77.0300061 Z' id='WalletConnect'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E",className:"walletconnect-modal__headerLogo"}),a.createElement("p",null,"WalletConnect"),a.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:e.onClose},a.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},a.createElement("div",{className:"walletconnect-modal__close__line1"}),a.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function u(e){return a.createElement("a",{className:"walletconnect-connect__button",href:e.href,id:"walletconnect-connect-button-"+e.name,onClick:e.onClick,rel:"noopener noreferrer",style:{backgroundColor:e.color},target:"_blank"},e.name)}function l(e){var t=e.color,n=e.href,r=e.name,i=e.logo,o=e.onClick;return a.createElement("a",{className:"walletconnect-modal__base__row",href:n,onClick:o,rel:"noopener noreferrer",target:"_blank"},a.createElement("h3",{className:"walletconnect-modal__base__row__h3"},r),a.createElement("div",{className:"walletconnect-modal__base__row__right"},a.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+i+"') "+t,backgroundSize:"100%"}}),a.createElement("img",{src:"data:image/svg+xml,%3Csvg width='8' height='18' viewBox='0 0 8 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.586301 0.213898C0.150354 0.552968 0.0718197 1.18124 0.41089 1.61719L5.2892 7.88931C5.57007 8.25042 5.57007 8.75608 5.2892 9.11719L0.410889 15.3893C0.071819 15.8253 0.150353 16.4535 0.586301 16.7926C1.02225 17.1317 1.65052 17.0531 1.98959 16.6172L6.86791 10.3451C7.7105 9.26174 7.7105 7.74476 6.86791 6.66143L1.98959 0.38931C1.65052 -0.0466374 1.02225 -0.125172 0.586301 0.213898Z' fill='%233C4252'/%3E %3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function f(e){var t=e.color,n=e.href,r=e.name,i=e.logo,o=e.onClick,s=window.innerWidth<768?(r.length>8?2.5:2.7)+"vw":"inherit";return a.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n,onClick:o,rel:"noopener noreferrer",target:"_blank"},a.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+i+"') "+t,backgroundSize:"100%"}}),a.createElement("div",{style:{fontSize:s},className:"walletconnect-connect__button__text"},r))}function h(e){var t=i.isAndroid(),n=a.useState(""),r=n[0],o=n[1],s=a.useState(""),c=s[0],h=s[1],d=a.useState(1),p=d[0],g=d[1],y=c?e.links.filter((function(e){return e.name.toLowerCase().includes(c.toLowerCase())})):e.links,m=e.errorMessage,v=c||y.length>5,_=Math.ceil(y.length/12),b=[12*(p-1)+1,12*p],w=y.length?y.filter((function(e,t){return t+1>=b[0]&&t+1<=b[1]})):[],E=!(t||!(_>1)),S=void 0;return a.createElement("div",null,a.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),!t&&a.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:r,onChange:function(e){o(e.target.value),clearTimeout(S),e.target.value?S=setTimeout((function(){h(e.target.value),g(1)}),1e3):(o(""),h(""),g(1))}}),a.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":v&&y.length?"__wrap":"")},t?a.createElement(u,{name:e.text.connect,color:"rgb(64, 153, 255)",href:e.uri,onClick:a.useCallback((function(){i.saveMobileLinkInfo({name:"Unknown",href:e.uri})}),[])}):w.length?w.map((function(t){var n=t.color,r=t.name,o=t.shortName,s=t.logo,c=i.formatIOSMobile(e.uri,t),u=a.useCallback((function(){i.saveMobileLinkInfo({name:r,href:c})}),[w]);return v?a.createElement(f,{color:n,href:c,name:o||r,logo:s,onClick:u}):a.createElement(l,{color:n,href:c,name:r,logo:s,onClick:u})})):a.createElement(a.Fragment,null,a.createElement("p",null,m.length?e.errorMessage:e.links.length&&!y.length?e.text.no_wallets_found:e.text.loading))),E&&a.createElement("div",{className:"walletconnect-modal__footer"},Array(_).fill(0).map((function(e,t){var n=t+1,r=p===n;return a.createElement("a",{style:{margin:"auto 10px",fontWeight:r?"bold":"normal"},onClick:function(){return g(n)}},n)}))))}function d(e){var t=!!e.message.trim();return a.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}function p(e){var t=a.useState(""),n=t[0],r=t[1],i=a.useState(""),c=i[0],u=i[1];return a.useEffect((function(){try{return Promise.resolve(function(e){try{var t="";return Promise.resolve(o.toString(e,{margin:0,type:"svg"})).then((function(e){return"string"==typeof e&&(t=e.replace("<svg",'<svg class="walletconnect-qrcode__image"')),t}))}catch(e){return Promise.reject(e)}}(e.uri)).then((function(e){u(e)}))}catch(e){Promise.reject(e)}}),[]),a.createElement("div",null,a.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},e.text.scan_qrcode_with_wallet),a.createElement("div",{dangerouslySetInnerHTML:{__html:c}}),a.createElement("div",{className:"walletconnect-modal__footer"},a.createElement("a",{onClick:function(){s(e.uri)?(r(e.text.copied_to_clipboard),setInterval((function(){return r("")}),1200)):(r("Error"),setInterval((function(){return r("")}),1200))}},e.text.copy_to_clipboard)),a.createElement(d,{message:n}))}function g(e){var t=i.isAndroid(),n=i.isMobile(),r=n?e.qrcodeModalOptions&&e.qrcodeModalOptions.mobileLinks?e.qrcodeModalOptions.mobileLinks:void 0:e.qrcodeModalOptions&&e.qrcodeModalOptions.desktopLinks?e.qrcodeModalOptions.desktopLinks:void 0,o=a.useState(!1),s=o[0],u=o[1],l=a.useState(!1),f=l[0],d=l[1],g=a.useState(!n),y=g[0],m=g[1],v={mobile:n,text:e.text,uri:e.uri,qrcodeModalOptions:e.qrcodeModalOptions},_=a.useState(""),b=_[0],w=_[1],E=a.useState(!1),S=E[0],O=E[1],R=a.useState([]),I=R[0],x=R[1],C=a.useState(""),P=C[0],k=C[1],N=function(){f||s||r&&!r.length||I.length>0||a.useEffect((function(){!function(){try{if(t)return Promise.resolve();u(!0);var o=function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){var t=e.qrcodeModalOptions&&e.qrcodeModalOptions.registryUrl?e.qrcodeModalOptions.registryUrl:i.getWalletRegistryUrl();return Promise.resolve(fetch(t)).then((function(t){return Promise.resolve(t.json()).then((function(t){var o=t.listings,s=n?"mobile":"desktop",a=i.getMobileLinkRegistry(i.formatMobileRegistry(o,s),r);u(!1),d(!0),k(a.length?"":e.text.no_supported_wallets),x(a);var c=1===a.length;c&&(w(i.formatIOSMobile(e.uri,a[0])),m(!0)),O(c)}))}))}),(function(t){u(!1),d(!0),k(e.text.something_went_wrong),console.error(t)}));Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(e){return Promise.reject(e)}}()}))};N();var A=n?y:!y;return a.createElement("div",{id:"walletconnect-qrcode-modal",className:"walletconnect-qrcode__base animated fadeIn"},a.createElement("div",{className:"walletconnect-modal__base"},a.createElement(c,{onClose:e.onClose}),S&&y?a.createElement("div",{className:"walletconnect-modal__single_wallet"},a.createElement("a",{onClick:function(){return i.saveMobileLinkInfo({name:I[0].name,href:b})},href:b,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(S?I[0].name:"")+" ›")):t||s||!s&&I.length?a.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(A?" right__selected":"")},a.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),n?a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return m(!1),N()}},e.text.mobile),a.createElement("a",{onClick:function(){return m(!0)}},e.text.qrcode)):a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return m(!0)}},e.text.qrcode),a.createElement("a",{onClick:function(){return m(!1),N()}},e.text.desktop))):null,a.createElement("div",null,y||!t&&!s&&!I.length?a.createElement(p,Object.assign({},v)):a.createElement(h,Object.assign({},v,{links:I,errorMessage:P})))))}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var y={de:{choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},ko:{choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功！",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},fa:{choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"}};function m(){var e=i.getDocumentOrThrow(),t=e.getElementById("walletconnect-qrcode-modal");t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout((function(){var t=e.getElementById("walletconnect-wrapper");t&&e.body.removeChild(t)}),300))}function v(e){return function(){m(),e&&e()}}var _=function(){return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node},b={open:function(e,t,n){console.log(e),_()?function(e){o.toString(e,{type:"terminal"}).then(console.log)}(e):function(e,t,n){!function(){var e=i.getDocumentOrThrow(),t=e.getElementById("walletconnect-style-sheet");t&&e.head.removeChild(t);var n=e.createElement("style");n.setAttribute("id","walletconnect-style-sheet"),n.innerText=':root {\n  --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n  }\n}\n\n@keyframes fadeOut {\n  from {\n    opacity: 1;\n  }\n  to {\n    opacity: 0;\n  }\n}\n\n.animated {\n  animation-duration: var(--animation-duration);\n  animation-fill-mode: both;\n}\n\n.fadeIn {\n  animation-name: fadeIn;\n}\n\n.fadeOut {\n  animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n  -webkit-user-select: none;\n  align-items: center;\n  display: flex;\n  height: 100%;\n  justify-content: center;\n  left: 0;\n  pointer-events: none;\n  position: fixed;\n  top: 0;\n  user-select: none;\n  width: 100%;\n  z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n  height: 21px;\n}\n\n.walletconnect-modal__header p {\n  color: #ffffff;\n  font-size: 20px;\n  font-weight: 600;\n  margin: 0;\n  align-items: flex-start;\n  display: flex;\n  flex: 1;\n  margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n  position: absolute;\n  top: 0px;\n  right: 0px;\n  z-index: 10000;\n  background: white;\n  border-radius: 26px;\n  padding: 6px;\n  box-sizing: border-box;\n  width: 26px;\n  height: 26px;\n  cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n  position: relative;\n  top: 7px;\n  right: 0;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n  position: absolute;\n  width: 100%;\n  border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n  position: absolute;\n  width: 100%;\n  border: 1px solid rgb(48, 52, 59);\n  transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n  background: rgba(37, 41, 46, 0.95);\n  height: 100%;\n  left: 0;\n  pointer-events: auto;\n  position: fixed;\n  top: 0;\n  transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n  width: 100%;\n  will-change: opacity;\n  padding: 40px;\n  box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n  color: rgba(60, 66, 82, 0.6);\n  font-size: 16px;\n  font-weight: 600;\n  letter-spacing: 0;\n  line-height: 1.1875em;\n  margin: 10px 0 20px 0;\n  text-align: center;\n  width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n  .walletconnect-qrcode__text {\n    font-size: 4vw;\n  }\n}\n\n@media only screen and (max-width: 320px) {\n  .walletconnect-qrcode__text {\n    font-size: 14px;\n  }\n}\n\n.walletconnect-qrcode__image {\n  width: calc(100% - 30px);\n  box-sizing: border-box;\n  cursor: none;\n  margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  font-size: 16px;\n  padding: 16px 20px;\n  border-radius: 16px;\n  text-align: center;\n  transition: all 0.1s ease-in-out;\n  background: white;\n  color: black;\n  margin-bottom: -60px;\n  opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n  opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n  .walletconnect-modal__header {\n    height: 130px;\n  }\n  .walletconnect-modal__base {\n    overflow: auto;\n  }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n  #content {\n    max-width: 768px;\n    box-sizing: border-box;\n  }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n  #content {\n    max-width: 414px;\n    box-sizing: border-box;\n  }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n  #content {\n    max-width: 375px;\n    box-sizing: border-box;\n  }\n}\n\n@media only screen and (max-width: 320px) {\n  #content {\n    max-width: 320px;\n    box-sizing: border-box;\n  }\n}\n\n.walletconnect-modal__base {\n  -webkit-font-smoothing: antialiased;\n  background: #ffffff;\n  border-radius: 24px;\n  box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n  font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n    -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n    "Open Sans", "Helvetica Neue", sans-serif;\n  margin-top: 41px;\n  padding: 24px 24px 22px;\n  pointer-events: auto;\n  position: relative;\n  text-align: center;\n  transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n  will-change: transform;\n  overflow: visible;\n  transform: translateY(-50%);\n  top: 50%;\n  max-width: 500px;\n  margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n  .walletconnect-modal__base {\n    padding: 24px 12px;\n  }\n}\n\n.walletconnect-modal__base .hidden {\n  transform: translateY(150%);\n  transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n  align-items: center;\n  display: flex;\n  height: 26px;\n  left: 0;\n  justify-content: space-between;\n  position: absolute;\n  top: -42px;\n  width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n  align-items: center;\n  display: flex;\n  height: 26px;\n  margin-top: 15px;\n  padding-bottom: 15px;\n  pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n  background-color: #3399ff;\n  height: 21px;\n  margin-right: 5px;\n  mask-image: url("images/wc-logo.svg") center no-repeat;\n  width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n  color: #ffffff;\n  font-size: 20px;\n  font-weight: 600;\n  margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n  color: rgba(60, 66, 82, 0.6);\n  font-size: 16px;\n  font-weight: 600;\n  letter-spacing: 0;\n  line-height: 1.1875em;\n  margin: 0 0 19px 0;\n  text-align: center;\n  width: 100%;\n}\n\n.walletconnect-modal__base__row {\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n  align-items: center;\n  border-radius: 20px;\n  cursor: pointer;\n  display: flex;\n  height: 56px;\n  justify-content: space-between;\n  padding: 0 15px;\n  position: relative;\n  margin: 0px 0px 8px;\n  text-align: left;\n  transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n  will-change: transform;\n  text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n  background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n  background: rgba(60, 66, 82, 0.06);\n  transform: scale(0.975);\n  transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n  color: #25292e;\n  font-size: 20px;\n  font-weight: 700;\n  margin: 0;\n  padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n  align-items: center;\n  display: flex;\n  justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n  border-radius: 8px;\n  height: 34px;\n  margin: 0 11px 2px 0;\n  width: 34px;\n  background-size: 100%;\n  box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n  height: 18px;\n  opacity: 0.3;\n  transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n  width: 8px;\n  will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n  opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n  width: 80%;\n  display: flex;\n  margin: 0 auto;\n  position: relative;\n  overflow: hidden;\n  border-radius: 8px;\n  margin-bottom: 18px;\n  background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n  display: flex;\n  justify-content: center;\n  margin-top: 7px;\n  margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n  cursor: pointer;\n  color: rgb(64, 153, 255);\n  font-size: 21px;\n  font-weight: 800;\n  text-decoration: none !important;\n  margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n  width: calc(50% - 8px);\n  background: white;\n  position: absolute;\n  border-radius: 5px;\n  height: calc(100% - 8px);\n  top: 4px;\n  transition: all 0.2s ease-in-out;\n  transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n  transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n  font-size: 12px;\n  width: 50%;\n  text-align: center;\n  padding: 8px;\n  margin: 0;\n  font-weight: 600;\n  z-index: 1;\n}\n\n.walletconnect-modal__footer {\n  display: flex;\n  justify-content: center;\n  margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n  .walletconnect-modal__footer {\n    margin-top: 5vw;\n  }\n}\n\n.walletconnect-modal__footer a {\n  cursor: pointer;\n  color: #898d97;\n  font-size: 15px;\n  margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n  .walletconnect-modal__footer a {\n    font-size: 14px;\n  }\n}\n\n.walletconnect-connect__buttons__wrapper {\n  max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n  margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n  display: grid;\n  grid-template-columns: repeat(4, 1fr);\n  margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n  .walletconnect-connect__buttons__wrapper__wrap {\n    margin-top: 40px;\n  }\n}\n\n.walletconnect-connect__button {\n  background-color: rgb(64, 153, 255);\n  padding: 12px;\n  border-radius: 8px;\n  text-decoration: none;\n  color: rgb(255, 255, 255);\n  font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n  cursor: pointer;\n  display: flex;\n  justify-content: flex-start;\n  align-items: center;\n  margin: 8px;\n  width: 42px;\n  justify-self: center;\n  flex-direction: column;\n  text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n  .walletconnect-connect__button__icon_anchor {\n    margin: 4px;\n  }\n}\n\n.walletconnect-connect__button__icon {\n  border-radius: 10px;\n  height: 42px;\n  margin: 0;\n  width: 42px;\n  background-size: cover !important;\n  box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n  color: #424952;\n  font-size: 2.7vw;\n  text-decoration: none !important;\n  padding: 0;\n  margin-top: 1.8vw;\n  font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n  .walletconnect-connect__button__text {\n    font-size: 16px;\n    margin-top: 12px;\n  }\n}\n\n.walletconnect-search__input {\n  border: none;\n  background: #d4d5d9;\n  border-style: none;\n  padding: 8px 16px;\n  outline: none;\n  font-style: normal;\n  font-stretch: normal;\n  font-size: 16px;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: normal;\n  letter-spacing: normal;\n  text-align: left;\n  border-radius: 8px;\n  width: calc(100% - 16px);\n  margin: 0;\n  margin-bottom: 8px;\n}\n',e.head.appendChild(n)}();var r,o=function(){var e=i.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id","walletconnect-wrapper"),e.body.appendChild(t),t}();a.render(a.createElement(g,{text:(r=i.getNavigatorOrThrow().language.split("-")[0]||"en",y[r]||y.en),uri:e,onClose:v(t),qrcodeModalOptions:n}),o)}(e,t,n)},close:function(){_()||m()}};e.exports=b}).call(this,n(19))},function(e,t,n){const r=n(77),i=n(78),o=n(96),s=n(97);function a(e,t,n,o,s){const a=[].slice.call(arguments,1),c=a.length,u="function"==typeof a[c-1];if(!u&&!r())throw new Error("Callback required as last argument");if(!u){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=t,t=o=void 0):2!==c||t.getContext||(o=n,n=t,t=void 0),new Promise((function(r,s){try{const s=i.create(n,o);r(e(s,t,o))}catch(e){s(e)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(s=n,n=t,t=o=void 0):3===c&&(t.getContext&&void 0===s?(s=o,o=void 0):(s=o,o=n,n=t,t=void 0));try{const r=i.create(n,o);s(null,e(r,t,o))}catch(e){s(e)}}t.create=i.create,t.toCanvas=a.bind(null,o.render),t.toDataURL=a.bind(null,o.renderToDataURL),t.toString=a.bind(null,(function(e,t,n){return s.render(e,n)}))},function(e,t){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},function(e,t,n){const r=n(9),i=n(21),o=n(79),s=n(80),a=n(81),c=n(82),u=n(83),l=n(53),f=n(84),h=n(87),d=n(88),p=n(10),g=n(89);function y(e,t,n){const r=e.size,i=d.getEncodedBits(t,n);let o,s;for(o=0;o<15;o++)s=1==(i>>o&1),o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(r-15+o,8,s,!0),o<8?e.set(8,r-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(r-8,8,1,!0)}function m(e,t,n){const i=new o;n.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(i)}));const s=8*(r.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const a=(s-i.getLengthInBits())/8;for(let e=0;e<a;e++)i.put(e%2?17:236,8);return function(e,t,n){const i=r.getSymbolTotalCodewords(t),o=i-l.getTotalCodewordsCount(t,n),s=l.getBlocksCount(t,n),a=s-i%s,c=Math.floor(i/s),u=Math.floor(o/s),h=u+1,d=c-u,p=new f(d);let g=0;const y=new Array(s),m=new Array(s);let v=0;const _=new Uint8Array(e.buffer);for(let e=0;e<s;e++){const t=e<a?u:h;y[e]=_.slice(g,g+t),m[e]=p.encode(y[e]),g+=t,v=Math.max(v,t)}const b=new Uint8Array(i);let w,E,S=0;for(w=0;w<v;w++)for(E=0;E<s;E++)w<y[E].length&&(b[S++]=y[E][w]);for(w=0;w<d;w++)for(E=0;E<s;E++)b[S++]=m[E][w];return b}(i,e,t)}function v(e,t,n,i){let o;if(Array.isArray(e))o=g.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=g.rawSplit(e);r=h.getBestVersionForData(t,n)}o=g.fromString(e,r||40)}}const l=h.getBestVersionForData(o,n);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<l)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l+".\n")}else t=l;const f=m(t,n,o),d=r.getSymbolSize(t),p=new s(d);return function(e,t){const n=e.size,r=c.getPositions(t);for(let t=0;t<r.length;t++){const i=r[t][0],o=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)o+r<=-1||n<=o+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,o+r,!0,!0):e.set(i+t,o+r,!1,!0))}}(p,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(p),function(e,t){const n=a.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}(p,t),y(p,n,0),t>=7&&function(e,t){const n=e.size,r=h.getEncodedBits(t);let i,o,s;for(let t=0;t<18;t++)i=Math.floor(t/3),o=t%3+n-8-3,s=1==(r>>t&1),e.set(i,o,s,!0),e.set(o,i,s,!0)}(p,t),function(e,t){const n=e.size;let r=-1,i=n-1,o=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,a-n)){let r=!1;s<t.length&&(r=1==(t[s]>>>o&1)),e.set(i,a-n,r),o--,-1===o&&(s++,o=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(p,f),isNaN(i)&&(i=u.getBestMask(p,y.bind(null,p,n))),u.applyMask(i,p),y(p,n,i),{modules:p,version:t,errorCorrectionLevel:n,maskPattern:i,segments:o}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let n,o,s=i.M;return void 0!==t&&(s=i.from(t.errorCorrectionLevel,i.M),n=h.from(t.version),o=u.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),v(e,n,s,o)}},function(e,t){function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=n},function(e,t){function n(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=n},function(e,t,n){const r=n(9).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),i=145===n?26:2*Math.ceil((n-13)/(2*t-2)),o=[n-7];for(let e=1;e<t-1;e++)o[e]=o[e-1]-i;return o.push(6),o.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||n.push([r[e],r[t]]);return n}},function(e,t,n){const r=n(9).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let n=0,r=0,i=0,o=null,s=null;for(let a=0;a<t;a++){r=i=0,o=s=null;for(let c=0;c<t;c++){let t=e.get(a,c);t===o?r++:(r>=5&&(n+=r-5+3),o=t,r=1),t=e.get(c,a),t===s?i++:(i>=5&&(n+=i-5+3),s=t,i=1)}r>=5&&(n+=r-5+3),i>=5&&(n+=i-5+3)}return n},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return 3*n},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,i=0;for(let o=0;o<t;o++){r=i=0;for(let s=0;s<t;s++)r=r<<1&2047|e.get(o,s),s>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|e.get(s,o),s>=10&&(1488===i||93===i)&&n++}return 40*n},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return 10*Math.abs(Math.ceil(100*t/n/5)-10)},t.applyMask=function(e,t){const r=t.size;for(let i=0;i<r;i++)for(let o=0;o<r;o++)t.isReserved(o,i)||t.xor(o,i,n(e,o,i))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let i=0,o=1/0;for(let s=0;s<r;s++){n(s),t.applyMask(s,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),r<o&&(o=r,i=s)}return i}},function(e,t,n){const r=n(85);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),i=this.degree-n.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(n,i),e}return n},e.exports=i},function(e,t,n){const r=n(86);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let o=0;o<t.length;o++)n[i+o]^=r.mul(e[i],t[o]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let i=0;i<t.length;i++)n[i]^=r.mul(t[i],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let i=0;i<e;i++)n=t.mul(n,new Uint8Array([1,r.exp(i)]));return n}},function(e,t){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)n[e]=n[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},function(e,t,n){const r=n(9),i=n(53),o=n(21),s=n(10),a=n(54),c=r.getBCHDigit(7973);function u(e,t){return s.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach((function(e){const r=u(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);const o=8*(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(n===s.MIXED)return o;const c=o-u(n,e);switch(n){case s.NUMERIC:return Math.floor(c/10*3);case s.ALPHANUMERIC:return Math.floor(c/11*2);case s.KANJI:return Math.floor(c/13);case s.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let r;const i=o.from(n,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(l(e,r)<=t.getCapacity(r,n,s.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-c>=0;)t^=7973<<r.getBCHDigit(t)-c;return e<<12|t}},function(e,t,n){const r=n(9),i=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let o=n<<10;for(;r.getBCHDigit(o)-i>=0;)o^=1335<<r.getBCHDigit(o)-i;return 21522^(n<<10|o)}},function(e,t,n){const r=n(10),i=n(90),o=n(91),s=n(92),a=n(94),c=n(55),u=n(9),l=n(95);function f(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){const t=h(c.NUMERIC,r.NUMERIC,e),n=h(c.ALPHANUMERIC,r.ALPHANUMERIC,e);let i,o;return u.isKanjiModeEnabled()?(i=h(c.BYTE,r.BYTE,e),o=h(c.KANJI,r.KANJI,e)):(i=h(c.BYTE_KANJI,r.BYTE,e),o=[]),t.concat(n,i,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case r.NUMERIC:return i.getBitsLength(e);case r.ALPHANUMERIC:return o.getBitsLength(e);case r.KANJI:return a.getBitsLength(e);case r.BYTE:return s.getBitsLength(e)}}function g(e,t){let n;const c=r.getBestModeForData(e);if(n=r.from(t,c),n!==r.BYTE&&n.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||u.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new o(e);case r.KANJI:return new a(e);case r.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e}),[])},t.fromString=function(e,n){const i=function(e,t){const n={},i={start:{}};let o=["start"];for(let s=0;s<e.length;s++){const a=e[s],c=[];for(let e=0;e<a.length;e++){const u=a[e],l=""+s+e;c.push(l),n[l]={node:u,lastCount:0},i[l]={};for(let e=0;e<o.length;e++){const s=o[e];n[s]&&n[s].node.mode===u.mode?(i[s][l]=p(n[s].lastCount+u.length,u.mode)-p(n[s].lastCount,u.mode),n[s].lastCount+=u.length):(n[s]&&(n[s].lastCount=u.length),i[s][l]=p(u.length,u.mode)+4+r.getCharCountIndicator(u.mode,t))}}o=c}for(let e=0;e<o.length;e++)i[o[e]].end=0;return{map:i,table:n}}(function(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:f(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:f(i.data)}])}}return t}(d(e,u.isKanjiModeEnabled())),n),o=l.find_path(i.map,"start","end"),s=[];for(let e=1;e<o.length-1;e++)s.push(i.table[o[e]].node);return t.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function(e){return t.fromArray(d(e,u.isKanjiModeEnabled()))}},function(e,t,n){const r=n(10);function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},e.exports=i},function(e,t,n){const r=n(10),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=r.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},function(e,t,n){const r=n(93),i=n(10);function o(e){this.mode=i.BYTE,"string"==typeof e&&(e=r(e)),this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=o},function(e,t,n){e.exports=function(e){for(var t=[],n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319&&n>r+1){var o=e.charCodeAt(r+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,r+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},function(e,t,n){const r=n(10),i=n(9);function o(e){this.mode=r.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=o},function(e,t,n){var r={single_source_shortest_paths:function(e,t,n){var i={},o={};o[t]=0;var s,a,c,u,l,f,h,d=r.PriorityQueue.make();for(d.push(t,0);!d.empty();)for(c in a=(s=d.pop()).value,u=s.cost,l=e[a]||{})l.hasOwnProperty(c)&&(f=u+l[c],h=o[c],(void 0===o[c]||h>f)&&(o[c]=f,d.push(c,f),i[c]=a));if(void 0!==n&&void 0===o[n]){var p=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(p)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,n){var i=r.single_source_shortest_paths(e,t,n);return r.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var t,n=r.PriorityQueue,i={};for(t in e=e||{},n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=r},function(e,t,n){const r=n(56);t.render=function(e,t,n){let i=n,o=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const s=r.getImageWidth(e.modules.size,i),a=o.getContext("2d"),c=a.createImageData(s,s);return r.qrToImageData(c.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(a,o,s),a.putImageData(c,0,0),o},t.renderToDataURL=function(e,n,r){let i=r;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const o=t.render(e,n,i),s=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}},function(e,t,n){const r=n(56);function i(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function o(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){const s=r.getOptions(t),a=e.modules.size,c=e.modules.data,u=a+2*s.margin,l=s.color.light.a?"<path "+i(s.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",f="<path "+i(s.color.dark,"stroke")+' d="'+function(e,t,n){let r="",i=0,s=!1,a=0;for(let c=0;c<e.length;c++){const u=Math.floor(c%t),l=Math.floor(c/t);u||s||(s=!0),e[c]?(a++,c>0&&u>0&&e[c-1]||(r+=s?o("M",u+n,.5+l+n):o("m",i,0),i=0,s=!1),u+1<t&&e[c+1]||(r+=o("h",a),a=0)):i++}return r}(c,a,s.margin)+'"/>',h='viewBox="0 0 '+u+" "+u+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+h+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof n&&n(null,d),d}},function(e,t,n){var r=n(99),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,s,a,c,u,l=!1;t||(t={}),n=t.debug||!1;try{if(s=r(),a=document.createRange(),c=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(u),a.selectNodeContents(u),c.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(a):c.removeAllRanges()),u&&document.body.removeChild(u),s()}return l}},function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},function(e,t,n){n.r(t);var r={};n.r(r),n.d(r,"generateKey",(function(){return d})),n.d(r,"verifyHmac",(function(){return p})),n.d(r,"encrypt",(function(){return g})),n.d(r,"decrypt",(function(){return y}));var i=n(2),o=n(1),s=n(61),a=class{constructor(){this._eventEmitters=[]}subscribe(e){this._eventEmitters.push(e)}unsubscribe(e){this._eventEmitters=this._eventEmitters.filter((t=>t.event!==e))}trigger(e){let t,n=[];t=Object(o.isJsonRpcRequest)(e)?e.method:Object(o.isJsonRpcResponseSuccess)(e)||Object(o.isJsonRpcResponseError)(e)?"response:"+e.id:Object(o.isInternalEvent)(e)?e.event:"",t&&(n=this._eventEmitters.filter((e=>e.event===t))),n&&n.length||Object(o.isReservedEvent)(t)||Object(o.isInternalEvent)(t)||(n=this._eventEmitters.filter((e=>"call_request"===e.event))),n.forEach((t=>{if(Object(o.isJsonRpcResponseError)(e)){const n=new Error(e.error.message);t.callback(n,null)}else t.callback(null,e)}))}},c=class{constructor(e="walletconnect"){this.storageId=e}getSession(){let e=null;const t=Object(o.getLocal)(this.storageId);return t&&Object(o.isWalletConnectSession)(t)&&(e=t),e}setSession(e){return Object(o.setLocal)(this.storageId,e),e}removeSession(){Object(o.removeLocal)(this.storageId)}};const u="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((e=>`https://${e}.bridge.walletconnect.org`));var l=class{constructor(e){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new a,this._clientMeta=Object(o.getClientMeta)()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new c(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...i.SIGNING_METHODS,...e.connectorOpts.signingMethods||[]],!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error(i.ERROR_MISSING_REQUIRED);var t;e.connectorOpts.bridge&&(this.bridge=function(e){return"walletconnect.org"===function(e){return function(e){let t=e.indexOf("//")>-1?e.split("/")[2]:e.split("/")[0];return t=t.split(":")[0],t=t.split("?")[0],t}(e).split(".").slice(-2).join(".")}(e)}(t=e.connectorOpts.bridge)?u[Math.floor(Math.random()*u.length)]:t),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);const n=e.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new s.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),e.connectorOpts.uri&&this._subscribeToSessionRequest(),e.pushServerOpts&&this._registerPushServer(e.pushServerOpts)}set bridge(e){e&&(this._bridge=e)}get bridge(){return this._bridge}set key(e){if(!e)return;const t=Object(o.convertHexToArrayBuffer)(e);this._key=t}get key(){return this._key?Object(o.convertArrayBufferToHex)(this._key,!0):""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=Object(o.uuid)()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set clientMeta(e){}get clientMeta(){let e=this._clientMeta;return e||(e=this._clientMeta=Object(o.getClientMeta)()),e}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(e){if(!e)return;const{handshakeTopic:t,bridge:n,key:r}=this._parseUri(e);this.handshakeTopic=t,this.bridge=n,this.key=r}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set networkId(e){this._networkId=e}get networkId(){return this._networkId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set rpcUrl(e){this._rpcUrl=e}get rpcUrl(){return this._rpcUrl}set connected(e){}get connected(){return this._connected}set pending(e){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}on(e,t){const n={event:e,callback:t};this._eventManager.subscribe(n)}off(e){this._eventManager.unsubscribe(e)}async createInstantRequest(e){this._key=await this._generateKey();const t=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]});this.handshakeId=t.id,this.handshakeTopic=Object(o.uuid)(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(()=>{throw new Error(i.ERROR_QRCODE_MODAL_USER_CLOSED)}));const n=()=>{this.killSession()};try{const e=await this._sendCallRequest(t);return e&&n(),e}catch(e){throw n(),e}}async connect(e){if(!this._qrcodeModal)throw new Error(i.ERROR_QRCODE_MODAL_NOT_PROVIDED);return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(e),new Promise((async(e,t)=>{this.on("modal_closed",(()=>t(new Error(i.ERROR_QRCODE_MODAL_USER_CLOSED)))),this.on("connect",((n,r)=>{if(n)return t(n);e(r.params[0])}))})))}async createSession(e){if(this._connected)throw new Error(i.ERROR_SESSION_CONNECTED);if(this.pending)return;this._key=await this._generateKey();const t=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]});this.handshakeId=t.id,this.handshakeTopic=Object(o.uuid)(),this._sendSessionRequest(t,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(e){if(this._connected)throw new Error(i.ERROR_SESSION_CONNECTED);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},n={id:this.handshakeId,jsonrpc:"2.0",result:t};this._sendResponse(n),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(e){if(this._connected)throw new Error(i.ERROR_SESSION_CONNECTED);const t=e&&e.message?e.message:i.ERROR_SESSION_REJECTED,n=this._formatResponse({id:this.handshakeId,error:{message:t}});this._sendResponse(n),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession()}updateSession(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},n=this._formatRequest({method:"wc_sessionUpdate",params:[t]});this._sendSessionRequest(n,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(e){const t=e?e.message:"Session Disconnected",n=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});await this._sendRequest(n),this._handleSessionDisconnect(t)}async sendTransaction(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=e,n=this._formatRequest({method:"eth_sendTransaction",params:[t]});return await this._sendCallRequest(n)}async signTransaction(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=e,n=this._formatRequest({method:"eth_signTransaction",params:[t]});return await this._sendCallRequest(n)}async signMessage(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=this._formatRequest({method:"eth_sign",params:e});return await this._sendCallRequest(t)}async signPersonalMessage(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=this._formatRequest({method:"personal_sign",params:e});return await this._sendCallRequest(t)}async signTypedData(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=this._formatRequest({method:"eth_signTypedData",params:e});return await this._sendCallRequest(t)}async updateChain(e){if(!this._connected)throw new Error("Session currently disconnected");const t=this._formatRequest({method:"wallet_updateChain",params:[e]});return await this._sendCallRequest(t)}unsafeSend(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),new Promise(((t,n)=>{this._subscribeToResponse(e.id,((e,r)=>{if(e)n(e);else{if(!r)throw new Error(i.ERROR_MISSING_JSON_RPC);t(r)}}))}))}async sendCustomRequest(e,t){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);switch(e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return Object(o.convertNumberToHex)(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":case"personal_sign":e.params}const n=this._formatRequest(e);return await this._sendCallRequest(n,t)}approveRequest(e){if(!Object(o.isJsonRpcResponseSuccess)(e))throw new Error(i.ERROR_MISSING_RESULT);{const t=this._formatResponse(e);this._sendResponse(t)}}rejectRequest(e){if(!Object(o.isJsonRpcResponseError)(e))throw new Error(i.ERROR_MISSING_ERROR);{const t=this._formatResponse(e);this._sendResponse(t)}}transportClose(){this._transport.close()}async _sendRequest(e,t){const n=this._formatRequest(e),r=await this._encrypt(n),i=void 0!==(null==t?void 0:t.topic)?t.topic:this.peerId,s=JSON.stringify(r),a=void 0!==(null==t?void 0:t.forcePushNotification)?!t.forcePushNotification:Object(o.isSilentPayload)(n);this._transport.send(s,i,a)}async _sendResponse(e){const t=await this._encrypt(e),n=this.peerId,r=JSON.stringify(t);this._transport.send(r,n,!0)}async _sendSessionRequest(e,t,n){this._sendRequest(e,n),this._subscribeToSessionResponse(e.id,t)}_sendCallRequest(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),this._subscribeToCallResponse(e.id)}_formatRequest(e){if(void 0===e.method)throw new Error(i.ERROR_MISSING_METHOD);return{id:void 0===e.id?Object(o.payloadId)():e.id,jsonrpc:"2.0",method:e.method,params:void 0===e.params?[]:e.params}}_formatResponse(e){if(void 0===e.id)throw new Error(i.ERROR_MISSING_ID);const t={id:e.id,jsonrpc:"2.0"};if(Object(o.isJsonRpcResponseError)(e)){const n=Object(o.formatRpcError)(e.error);return Object.assign(Object.assign(Object.assign({},t),e),{error:n})}if(Object(o.isJsonRpcResponseSuccess)(e))return Object.assign(Object.assign({},t),e);throw new Error(i.ERROR_INVALID_RESPONSE)}_handleSessionDisconnect(e){const t=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(o.removeLocal)(i.MOBILE_LINK_CHOICE_KEY)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(e,t){t&&t.approved?(this._connected?(t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),t.peerId&&!this.peerId&&(this.peerId=t.peerId),t.peerMeta&&!this.peerMeta&&(this.peerMeta=t.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e)}async _handleIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let t;try{t=JSON.parse(e.payload)}catch(e){return}const n=await this._decrypt(t);n&&this._eventManager.trigger(n)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(e,t){this.on("response:"+e,t)}_subscribeToSessionResponse(e,t){this._subscribeToResponse(e,((e,n)=>{e?this._handleSessionResponse(e.message):Object(o.isJsonRpcResponseSuccess)(n)?this._handleSessionResponse(t,n.result):n.error&&n.error.message?this._handleSessionResponse(n.error.message):this._handleSessionResponse(t)}))}_subscribeToCallResponse(e){return new Promise(((t,n)=>{this._subscribeToResponse(e,((e,r)=>{e?n(e):Object(o.isJsonRpcResponseSuccess)(r)?t(r.result):r.error&&r.error.message?n(r.error):n(new Error(i.ERROR_INVALID_RESPONSE))}))}))}_subscribeToInternalEvents(){this.on("display_uri",(()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,(()=>{this._eventManager.trigger({event:"modal_closed",params:[]})}),this._qrcodeModalOptions)})),this.on("connect",(()=>{this._qrcodeModal&&this._qrcodeModal.close()})),this.on("call_request_sent",((e,t)=>{const{request:n}=t.params[0];if(Object(o.isMobile)()&&this._signingMethods.includes(n.method)){const e=Object(o.getLocal)(i.MOBILE_LINK_CHOICE_KEY);e&&(window.location.href=e.href)}})),this.on("wc_sessionRequest",((e,t)=>{e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),this.handshakeId=t.id,this.peerId=t.params[0].peerId,this.peerMeta=t.params[0].peerMeta;const n=Object.assign(Object.assign({},t),{method:"session_request"});this._eventManager.trigger(n)})),this.on("wc_sessionUpdate",((e,t)=>{e&&this._handleSessionResponse(e.message),this._handleSessionResponse("Session disconnected",t.params[0])}))}_initTransport(){this._transport.on("message",(e=>this._handleIncomingMessages(e))),this._transport.on("open",(()=>this._eventManager.trigger({event:"transport_open",params:[]}))),this._transport.on("close",(()=>this._eventManager.trigger({event:"transport_close",params:[]}))),this._transport.on("error",(()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]}))),this._transport.open()}_formatUri(){return`${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(e){const t=Object(o.parseWalletConnectUri)(e);if(t.protocol===this.protocol){if(!t.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const e=t.handshakeTopic;if(!t.bridge)throw Error("Invalid or missing bridge url parameter value");const n=decodeURIComponent(t.bridge);if(!t.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:e,bridge:n,key:t.key}}throw new Error(i.ERROR_INVALID_URI)}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(e){const t=this._key;return this._cryptoLib&&t?await this._cryptoLib.encrypt(e,t):null}async _decrypt(e){const t=this._key;return this._cryptoLib&&t?await this._cryptoLib.decrypt(e,t):null}_getStorageSession(){let e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(e){if(!e.url||"string"!=typeof e.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||"string"!=typeof e.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||"string"!=typeof e.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const t={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",(async(n,r)=>{if(n)throw n;if(e.peerMeta){const e=r.params[0].peerMeta.name;t.peerName=e}try{const n=await fetch(e.url+"/new",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)});if(!(await n.json()).success)throw Error("Failed to register in Push Server")}catch(n){throw Error("Failed to register in Push Server")}}))}},f=n(14),h=n(0);async function d(e){const t=(e||256)/8,n=f.randomBytes(t);return Object(o.convertBufferToArrayBuffer)(h.b(n))}async function p(e,t){const n=h.n(e.data),r=h.n(e.iv),i=h.n(e.hmac),o=h.c(i,!1),s=h.j(n,r),a=await f.hmacSha256Sign(t,s),c=h.c(a,!1);return h.A(o)===h.A(c)}async function g(e,t,n){const r=h.f(Object(o.convertArrayBufferToBuffer)(t)),i=n||await d(128),s=h.f(Object(o.convertArrayBufferToBuffer)(i)),a=h.c(s,!1),c=JSON.stringify(e),u=h.C(c),l=await f.aesCbcEncrypt(s,r,u),p=h.c(l,!1),g=h.j(l,s),y=await f.hmacSha256Sign(r,g);return{data:p,hmac:h.c(y,!1),iv:a}}async function y(e,t){const n=h.f(Object(o.convertArrayBufferToBuffer)(t));if(!n)throw new Error("Missing key: required for decryption");if(!await p(e,n))return null;const r=h.n(e.data),i=h.n(e.iv),s=await f.aesCbcDecrypt(i,n,r),a=h.e(s);let c;try{c=JSON.parse(a)}catch(e){return null}return c}t.default=class extends l{constructor(e,t){super({cryptoLib:r,connectorOpts:e,pushServerOpts:t})}}},function(e,t,n){n.r(t),n.d(t,"Component",(function(){return O})),n.d(t,"Fragment",(function(){return _})),n.d(t,"createContext",(function(){return $})),n.d(t,"createElement",(function(){return y})),n.d(t,"createRef",(function(){return v})),n.d(t,"useCallback",(function(){return fe})),n.d(t,"useContext",(function(){return he})),n.d(t,"useDebugValue",(function(){return de})),n.d(t,"useEffect",(function(){return se})),n.d(t,"useErrorBoundary",(function(){return pe})),n.d(t,"useId",(function(){return ge})),n.d(t,"useImperativeHandle",(function(){return ue})),n.d(t,"useLayoutEffect",(function(){return ae})),n.d(t,"useMemo",(function(){return le})),n.d(t,"useReducer",(function(){return oe})),n.d(t,"useRef",(function(){return ce})),n.d(t,"useState",(function(){return ie})),n.d(t,"Children",(function(){return Ae})),n.d(t,"PureComponent",(function(){return Ie})),n.d(t,"StrictMode",(function(){return ht})),n.d(t,"Suspense",(function(){return Le})),n.d(t,"SuspenseList",(function(){return De})),n.d(t,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",(function(){return rt})),n.d(t,"cloneElement",(function(){return at})),n.d(t,"createFactory",(function(){return ot})),n.d(t,"createPortal",(function(){return He})),n.d(t,"default",(function(){return vt})),n.d(t,"findDOMNode",(function(){return ut})),n.d(t,"flushSync",(function(){return ft})),n.d(t,"forwardRef",(function(){return ke})),n.d(t,"hydrate",(function(){return Ge})),n.d(t,"isValidElement",(function(){return st})),n.d(t,"lazy",(function(){return je})),n.d(t,"memo",(function(){return xe})),n.d(t,"render",(function(){return Ke})),n.d(t,"startTransition",(function(){return dt})),n.d(t,"unmountComponentAtNode",(function(){return ct})),n.d(t,"unstable_batchedUpdates",(function(){return lt})),n.d(t,"useDeferredValue",(function(){return pt})),n.d(t,"useInsertionEffect",(function(){return yt})),n.d(t,"useSyncExternalStore",(function(){return mt})),n.d(t,"useTransition",(function(){return gt})),n.d(t,"version",(function(){return it}));var r,i,o,s,a,c,u,l,f={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function y(e,t,n){var i,o,s,a={};for(s in t)"key"==s?i=t[s]:"ref"==s?o=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return m(e,a,i,o,null)}function m(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++o:s};return null==s&&null!=i.vnode&&i.vnode(a),a}function v(){return{current:null}}function _(e){return e.children}function b(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||d.test(t)?n:n+"px"}function w(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||b(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||b(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?S:E,o):e.removeEventListener(t,o?S:E,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function E(e){s=!0;try{return this.l[e.type+!1](i.event?i.event(e):e)}finally{s=!1}}function S(e){s=!0;try{return this.l[e.type+!0](i.event?i.event(e):e)}finally{s=!1}}function O(e,t){this.props=e,this.context=t}function R(e,t){if(null==t)return e.__?R(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?R(e):null}function I(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return I(e)}}function x(e){s?setTimeout(e):u(e)}function C(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!P.__r++||c!==i.debounceRendering)&&((c=i.debounceRendering)||x)(P)}function P(){var e,t,n,r,i,o,s,c;for(a.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=a.shift();)e.__d&&(t=a.length,r=void 0,i=void 0,s=(o=(n=e).__v).__e,(c=n.__P)&&(r=[],(i=p({},o)).__v=o.__v+1,L(c,o,i,n.__n,void 0!==c.ownerSVGElement,null!=o.__h?[s]:null,r,null==s?R(o):s,o.__h),U(r,o),o.__e!=s&&I(o)),a.length>t&&a.sort((function(e,t){return e.__v.__b-t.__v.__b})));P.__r=0}function k(e,t,n,r,i,o,s,a,c,u){var l,d,p,g,y,v,b,w=r&&r.__k||h,E=w.length;for(n.__k=[],l=0;l<t.length;l++)if(null!=(g=n.__k[l]=null==(g=t[l])||"boolean"==typeof g?null:"string"==typeof g||"number"==typeof g||"bigint"==typeof g?m(null,g,null,null,g):Array.isArray(g)?m(_,{children:g},null,null,null):g.__b>0?m(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)){if(g.__=n,g.__b=n.__b+1,null===(p=w[l])||p&&g.key==p.key&&g.type===p.type)w[l]=void 0;else for(d=0;d<E;d++){if((p=w[d])&&g.key==p.key&&g.type===p.type){w[d]=void 0;break}p=null}L(e,g,p=p||f,i,o,s,a,c,u),y=g.__e,(d=g.ref)&&p.ref!=d&&(b||(b=[]),p.ref&&b.push(p.ref,null,g),b.push(d,g.__c||y,g)),null!=y?(null==v&&(v=y),"function"==typeof g.type&&g.__k===p.__k?g.__d=c=N(g,c,e):c=T(e,g,p,w,y,c),"function"==typeof n.type&&(n.__d=c)):c&&p.__e==c&&c.parentNode!=e&&(c=R(p))}for(n.__e=v,l=E;l--;)null!=w[l]&&("function"==typeof n.type&&null!=w[l].__e&&w[l].__e==n.__d&&(n.__d=M(r).nextSibling),z(w[l],w[l]));if(b)for(l=0;l<b.length;l++)D(b[l],b[++l],b[++l])}function N(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?N(r,t,n):T(n,r,r,i,r.__e,t));return t}function A(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){A(e,t)})):t.push(e)),t}function T(e,t,n,r,i,o){var s,a,c;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,c=0;(a=a.nextSibling)&&c<r.length;c+=1)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function M(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=M(n)))return r;return null}function L(e,t,n,r,o,s,a,c,u){var l,f,h,d,g,y,m,v,b,w,E,S,R,I,x,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,c=t.__e=n.__e,t.__h=null,s=[c]),(l=i.__b)&&l(t);try{e:if("function"==typeof C){if(v=t.props,b=(l=C.contextType)&&r[l.__c],w=l?b?b.props.value:l.__:r,n.__c?m=(f=t.__c=n.__c).__=f.__E:("prototype"in C&&C.prototype.render?t.__c=f=new C(v,w):(t.__c=f=new O(v,w),f.constructor=C,f.render=B),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=w,f.__n=r,h=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=C.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=p({},f.__s)),p(f.__s,C.getDerivedStateFromProps(v,f.__s))),d=f.props,g=f.state,f.__v=t,h)null==C.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==C.getDerivedStateFromProps&&v!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(v,w),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(v,f.__s,w)||t.__v===n.__v){for(t.__v!==n.__v&&(f.props=v,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E<f._sb.length;E++)f.__h.push(f._sb[E]);f._sb=[],f.__h.length&&a.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(v,f.__s,w),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(d,g,y)}))}if(f.context=w,f.props=v,f.__P=e,S=i.__r,R=0,"prototype"in C&&C.prototype.render){for(f.state=f.__s,f.__d=!1,S&&S(t),l=f.render(f.props,f.state,f.context),I=0;I<f._sb.length;I++)f.__h.push(f._sb[I]);f._sb=[]}else do{f.__d=!1,S&&S(t),l=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++R<25);f.state=f.__s,null!=f.getChildContext&&(r=p(p({},r),f.getChildContext())),h||null==f.getSnapshotBeforeUpdate||(y=f.getSnapshotBeforeUpdate(d,g)),x=null!=l&&l.type===_&&null==l.key?l.props.children:l,k(e,Array.isArray(x)?x:[x],t,n,r,o,s,a,c,u),f.base=t.__e,t.__h=null,f.__h.length&&a.push(f),m&&(f.__E=f.__=null),f.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=j(n.__e,t,n,r,o,s,a,u);(l=i.diffed)&&l(t)}catch(e){t.__v=null,(u||null!=s)&&(t.__e=c,t.__h=!!u,s[s.indexOf(c)]=null),i.__e(e,t,n)}}function U(e,t){i.__c&&i.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){i.__e(e,t.__v)}}))}function j(e,t,n,i,o,s,a,c){var u,l,h,d=n.props,p=t.props,y=t.type,m=0;if("svg"===y&&(o=!0),null!=s)for(;m<s.length;m++)if((u=s[m])&&"setAttribute"in u==!!y&&(y?u.localName===y:3===u.nodeType)){e=u,s[m]=null;break}if(null==e){if(null===y)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,p.is&&p),s=null,c=!1}if(null===y)d===p||c&&e.data===p||(e.data=p);else{if(s=s&&r.call(e.childNodes),l=(d=n.props||f).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!c){if(null!=s)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(h||l)&&(h&&(l&&h.__html==l.__html||h.__html===e.innerHTML)||(e.innerHTML=h&&h.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||w(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||w(e,o,t[o],n[o],r)}(e,p,d,o,c),h)t.__k=[];else if(m=t.props.children,k(e,Array.isArray(m)?m:[m],t,n,i,o&&"foreignObject"!==y,s,a,s?s[0]:n.__k&&R(n,0),c),null!=s)for(m=s.length;m--;)null!=s[m]&&g(s[m]);c||("value"in p&&void 0!==(m=p.value)&&(m!==e.value||"progress"===y&&!m||"option"===y&&m!==d.value)&&w(e,"value",m,d.value,!1),"checked"in p&&void 0!==(m=p.checked)&&m!==e.checked&&w(e,"checked",m,d.checked,!1))}return e}function D(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){i.__e(e,n)}}function z(e,t,n){var r,o;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||D(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&z(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||g(e.__e),e.__=e.__e=e.__d=void 0}function B(e,t,n){return this.constructor(e,n)}function F(e,t,n){var o,s,a;i.__&&i.__(e,t),s=(o="function"==typeof n)?null:n&&n.__k||t.__k,a=[],L(t,e=(!o&&n||t).__k=y(_,null,[e]),s||f,f,void 0!==t.ownerSVGElement,!o&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!o&&n?n:s?s.__e:t.firstChild,o),U(a,e)}function H(e,t){F(e,t,H)}function q(e,t,n){var i,o,s,a=p({},e.props);for(s in t)"key"==s?i=t[s]:"ref"==s?o=t[s]:a[s]=t[s];return arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),m(e.type,a,i||e.key,o||e.ref,null)}function $(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(C)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=h.slice,i={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},o=0,s=!1,O.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(p({},n),this.props)),e&&p(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),C(this))},O.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},O.prototype.render=_,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,P.__r=0,l=0;var V,W,K,G,Y=0,Q=[],J=[],X=i.__b,Z=i.__r,ee=i.diffed,te=i.__c,ne=i.unmount;function re(e,t){i.__h&&i.__h(W,e,Y||t),Y=0;var n=W.__H||(W.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:J}),n.__[e]}function ie(e){return Y=1,oe(Ee,e)}function oe(e,t,n){var r=re(V++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ee(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=W,!W.u)){W.u=!0;var i=W.shouldComponentUpdate;W.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var s=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function se(e,t){var n=re(V++,3);!i.__s&&we(n.__H,t)&&(n.__=e,n.i=t,W.__H.__h.push(n))}function ae(e,t){var n=re(V++,4);!i.__s&&we(n.__H,t)&&(n.__=e,n.i=t,W.__h.push(n))}function ce(e){return Y=5,le((function(){return{current:e}}),[])}function ue(e,t,n){Y=6,ae((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function le(e,t){var n=re(V++,7);return we(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function fe(e,t){return Y=8,le((function(){return e}),t)}function he(e){var t=W.context[e.__c],n=re(V++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(W)),t.props.value):e.__}function de(e,t){i.useDebugValue&&i.useDebugValue(t?t(e):e)}function pe(e){var t=re(V++,10),n=ie();return t.__=e,W.componentDidCatch||(W.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function ge(){var e=re(V++,11);if(!e.__){for(var t=W.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ye(){for(var e;e=Q.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_e),e.__H.__h.forEach(be),e.__H.__h=[]}catch(t){e.__H.__h=[],i.__e(t,e.__v)}}i.__b=function(e){W=null,X&&X(e)},i.__r=function(e){Z&&Z(e),V=0;var t=(W=e.__c).__H;t&&(K===W?(t.__h=[],W.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=J,e.__N=e.i=void 0}))):(t.__h.forEach(_e),t.__h.forEach(be),t.__h=[])),K=W},i.diffed=function(e){ee&&ee(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Q.push(t)&&G===i.requestAnimationFrame||((G=i.requestAnimationFrame)||ve)(ye)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==J&&(e.__=e.__V),e.i=void 0,e.__V=J}))),K=W=null},i.__c=function(e,t){t.some((function(e){try{e.__h.forEach(_e),e.__h=e.__h.filter((function(e){return!e.__||be(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],i.__e(n,e.__v)}})),te&&te(e,t)},i.unmount=function(e){ne&&ne(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{_e(e)}catch(e){t=e}})),n.__H=void 0,t&&i.__e(t,n.__v))};var me="function"==typeof requestAnimationFrame;function ve(e){var t,n=function(){clearTimeout(r),me&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);me&&(t=requestAnimationFrame(n))}function _e(e){var t=W,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),W=t}function be(e){var t=W;e.__c=e.__(),W=t}function we(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ee(e,t){return"function"==typeof t?t(e):t}function Se(e,t){for(var n in t)e[n]=t[n];return e}function Oe(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Re(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function Ie(e){this.props=e}function xe(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Oe(this.props,e)}function r(t){return this.shouldComponentUpdate=n,y(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ie.prototype=new O).isPureReactComponent=!0,Ie.prototype.shouldComponentUpdate=function(e,t){return Oe(this.props,e)||Oe(this.state,t)};var Ce=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ce&&Ce(e)};var Pe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ke(e){function t(t){var n=Se({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Pe,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ne=function(e,t){return null==e?null:A(A(e).map(t))},Ae={map:Ne,forEach:Ne,count:function(e){return e?A(e).length:0},only:function(e){var t=A(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:A},Te=i.__e;i.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Te(e,t,n,r)};var Me=i.unmount;function Le(){this.__u=0,this.t=null,this.__b=null}function Ue(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function je(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return y(n,i)}return i.displayName="Lazy",i.__f=!0,i}function De(){this.u=null,this.o=null}i.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Me&&Me(e)},(Le.prototype=new O).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Ue(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Le.prototype.componentWillUnmount=function(){this.t=[]},Le.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=Se({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&y(_,null,e.fallback);return i&&(i.__h=null),[y(_,null,t.__a?null:e.children),i]};var ze=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Be(e){return this.getChildContext=function(){return e.context},e.children}function Fe(e){var t=this,n=e.i;t.componentWillUnmount=function(){F(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),F(y(Be,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function He(e,t){var n=y(Fe,{__v:e,i:t});return n.containerInfo=t,n}(De.prototype=new O).__a=function(e){var t=this,n=Ue(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),ze(t,e,r)):i()};n?n(o):o()}},De.prototype.render=function(e){this.u=null,this.o=new Map;var t=A(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},De.prototype.componentDidUpdate=De.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){ze(e,n,t)}))};var qe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,$e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ve="undefined"!=typeof document,We=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ke(e,t,n){return null==t.__k&&(t.textContent=""),F(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ge(e,t,n){return H(e,t),"function"==typeof n&&n(),e?e.__c:null}O.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(O.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Ye=i.event;function Qe(){}function Je(){return this.cancelBubble}function Xe(){return this.defaultPrevented}i.event=function(e){return Ye&&(e=Ye(e)),e.persist=Qe,e.isPropagationStopped=Je,e.isDefaultPrevented=Xe,e.nativeEvent=e};var Ze,et={configurable:!0,get:function(){return this.class}},tt=i.vnode;i.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];Ve&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!We(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&$e.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=A(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=A(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(et.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",et))}e.$$typeof=qe,tt&&tt(e)};var nt=i.__r;i.__r=function(e){nt&&nt(e),Ze=e.__c};var rt={ReactCurrentDispatcher:{current:{readContext:function(e){return Ze.__n[e.__c].props.value}}}},it="17.0.2";function ot(e){return y.bind(null,e)}function st(e){return!!e&&e.$$typeof===qe}function at(e){return st(e)?q.apply(null,arguments):e}function ct(e){return!!e.__k&&(F(null,e),!0)}function ut(e){return e&&(e.base||1===e.nodeType&&e)||null}var lt=function(e,t){return e(t)},ft=function(e,t){return e(t)},ht=_;function dt(e){e()}function pt(e){return e}function gt(){return[!1,dt]}var yt=ae;function mt(e,t){var n=t(),r=ie({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ae((function(){i.__=n,i.v=t,Re(i.__,t())||o({h:i})}),[e,n,t]),se((function(){return Re(i.__,i.v())||o({h:i}),e((function(){Re(i.__,i.v())||o({h:i})}))}),[e]),n}var vt={useState:ie,useId:ge,useReducer:oe,useEffect:se,useLayoutEffect:ae,useInsertionEffect:ae,useTransition:gt,useDeferredValue:pt,useSyncExternalStore:mt,startTransition:dt,useRef:ce,useImperativeHandle:ue,useMemo:le,useCallback:fe,useContext:he,useDebugValue:de,version:"17.0.2",Children:Ae,render:Ke,hydrate:Ge,unmountComponentAtNode:ct,createPortal:He,createElement:y,createContext:$,createFactory:ot,cloneElement:at,createRef:v,Fragment:_,isValidElement:st,findDOMNode:ut,Component:O,PureComponent:Ie,memo:xe,forwardRef:ke,flushSync:ft,unstable_batchedUpdates:lt,StrictMode:_,Suspense:Le,SuspenseList:De,lazy:je,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:rt}},function(e,t,n){n.r(t),n.d(t,"JsonRpcProvider",(function(){return o}));var r=n(13),i=n(7);class o extends i.IJsonRpcProvider{constructor(e){super(e),this.events=new r.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(Object(i.formatJsonRpcRequest)(e.method,e.params||[]),t)}async requestStrict(e,t){return new Promise((async(n,r)=>{if(!this.connection.connected)try{await this.open()}catch(e){r(e)}this.events.on(""+e.id,(e=>{Object(i.isJsonRpcError)(e)?r(e.error):n(e.result)}));try{await this.connection.send(e,t)}catch(e){r(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Object(i.isJsonRpcResponse)(e)?this.events.emit(""+e.id,e):this.events.emit("message",{type:e.method,data:e.params})}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(()=>this.events.emit("disconnect"))),this.connection.on("error",(e=>this.events.emit("error",e))),this.hasRegisteredEventListeners=!0)}}var s=o;t.default=s},function(e,t,n){n.r(t),n.d(t,"HttpConnection",(function(){return u}));var r=n(13),i=n(23),o=n.n(i),s=n(12),a=n(7);const c={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class u{constructor(e){if(this.url=e,this.events=new r.EventEmitter,this.isAvailable=!1,this.registering=!1,!Object(a.isHttpUrl)(e))throw new Error("Provided URL is not compatible with HTTP connection: "+e);this.url=e}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=Object(s.b)(e),n=await o()(this.url,Object.assign(Object.assign({},c),{body:t})),r=await n.json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Object(a.isHttpUrl)(e))throw new Error("Provided URL is not compatible with HTTP connection: "+e);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.isAvailable)return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{const t=Object(s.b)({id:1,jsonrpc:"2.0",method:"test",params:[]});await o()(e,Object.assign(Object.assign({},c),{body:t})),this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?Object(s.a)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=n.message||n.toString(),i=Object(a.formatJsonRpcError)(e,r);this.events.emit("payload",i)}parseError(e,t=this.url){return Object(a.parseConnectionError)(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}var l=u;t.default=l}])}(h);var d,p=l(h.exports),g={exports:{}},y={},m={exports:{}},v={};!function(e){e.exports=function(){if(d)return v;d=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),f=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function m(){}function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=y.prototype;var b=_.prototype=new m;b.constructor=_,p(b,y.prototype),b.isPureReactComponent=!0;var w=Array.isArray,E=Object.prototype.hasOwnProperty,S={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function R(t,n,r){var i,o={},s=null,a=null;if(null!=n)for(i in void 0!==n.ref&&(a=n.ref),void 0!==n.key&&(s=""+n.key),n)E.call(n,i)&&!O.hasOwnProperty(i)&&(o[i]=n[i]);var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];o.children=u}if(t&&t.defaultProps)for(i in c=t.defaultProps)void 0===o[i]&&(o[i]=c[i]);return{$$typeof:e,type:t,key:s,ref:a,props:o,_owner:S.current}}function I(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var x=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(n,r,i,o,s){var a=typeof n;"undefined"!==a&&"boolean"!==a||(n=null);var c=!1;if(null===n)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(n.$$typeof){case e:case t:c=!0}}if(c)return s=s(c=n),n=""===o?"."+C(c,0):o,w(s)?(i="",null!=n&&(i=n.replace(x,"$&/")+"/"),P(s,r,i,"",(function(e){return e}))):null!=s&&(I(s)&&(s=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(s,i+(!s.key||c&&c.key===s.key?"":(""+s.key).replace(x,"$&/")+"/")+n)),r.push(s)),1;if(c=0,o=""===o?".":o+":",w(n))for(var u=0;u<n.length;u++){var l=o+C(a=n[u],u);c+=P(a,r,i,l,s)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(n),"function"==typeof l)for(n=l.call(n),u=0;!(a=n.next()).done;)c+=P(a=a.value,r,i,l=o+C(a,u++),s);else if("object"===a)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return c}function k(e,t,n){if(null==e)return e;var r=[],i=0;return P(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function N(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var A={current:null},T={transition:null},M={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:T,ReactCurrentOwner:S};return v.Children={map:k,forEach:function(e,t,n){k(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return k(e,(function(){t++})),t},toArray:function(e){return k(e,(function(e){return e}))||[]},only:function(e){if(!I(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},v.Component=y,v.Fragment=n,v.Profiler=i,v.PureComponent=_,v.StrictMode=r,v.Suspense=c,v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,v.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=p({},t.props),o=t.key,s=t.ref,a=t._owner;if(null!=n){if(void 0!==n.ref&&(s=n.ref,a=S.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(u in n)E.call(n,u)&&!O.hasOwnProperty(u)&&(i[u]=void 0===n[u]&&void 0!==c?c[u]:n[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){c=Array(u);for(var l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}return{$$typeof:e,type:t.type,key:o,ref:s,props:i,_owner:a}},v.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},v.createElement=R,v.createFactory=function(e){var t=R.bind(null,e);return t.type=e,t},v.createRef=function(){return{current:null}},v.forwardRef=function(e){return{$$typeof:a,render:e}},v.isValidElement=I,v.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:N}},v.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},v.startTransition=function(e){var t=T.transition;T.transition={};try{e()}finally{T.transition=t}},v.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},v.useCallback=function(e,t){return A.current.useCallback(e,t)},v.useContext=function(e){return A.current.useContext(e)},v.useDebugValue=function(){},v.useDeferredValue=function(e){return A.current.useDeferredValue(e)},v.useEffect=function(e,t){return A.current.useEffect(e,t)},v.useId=function(){return A.current.useId()},v.useImperativeHandle=function(e,t,n){return A.current.useImperativeHandle(e,t,n)},v.useInsertionEffect=function(e,t){return A.current.useInsertionEffect(e,t)},v.useLayoutEffect=function(e,t){return A.current.useLayoutEffect(e,t)},v.useMemo=function(e,t){return A.current.useMemo(e,t)},v.useReducer=function(e,t,n){return A.current.useReducer(e,t,n)},v.useRef=function(e){return A.current.useRef(e)},v.useState=function(e){return A.current.useState(e)},v.useSyncExternalStore=function(e,t,n){return A.current.useSyncExternalStore(e,t,n)},v.useTransition=function(){return A.current.useTransition()},v.version="18.2.0",v}()}(m);var _,b=l(m.exports);
/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */!function(e){e.exports=function(){if(_)return y;_=1;var e=m.exports,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,s){var a,c={},u=null,l=null;for(a in void 0!==s&&(u=""+s),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(l=n.ref),n)r.call(n,a)&&!o.hasOwnProperty(a)&&(c[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===c[a]&&(c[a]=n[a]);return{$$typeof:t,type:e,key:u,ref:l,props:c,_owner:i.current}}return y.Fragment=n,y.jsx=s,y.jsxs=s,y}()}(g);var w,E={exports:{}},S={};function O(e){function t(e,r,c,u,h){for(var d,p,g,y,b,E=0,S=0,O=0,R=0,I=0,A=0,M=g=d=0,U=0,j=0,D=0,z=0,B=c.length,F=B-1,H="",q="",$="",V="";U<B;){if(p=c.charCodeAt(U),U===F&&0!==S+R+O+E&&(0!==S&&(p=47===S?10:47),R=O=E=0,B++,F++),0===S+R+O+E){if(U===F&&(0<j&&(H=H.replace(f,"")),0<H.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:H+=c.charAt(U)}p=59}switch(p){case 123:for(d=(H=H.trim()).charCodeAt(0),g=1,z=++U;U<B;){switch(p=c.charCodeAt(U)){case 123:g++;break;case 125:g--;break;case 47:switch(p=c.charCodeAt(U+1)){case 42:case 47:e:{for(M=U+1;M<F;++M)switch(c.charCodeAt(M)){case 47:if(42===p&&42===c.charCodeAt(M-1)&&U+2!==M){U=M+1;break e}break;case 10:if(47===p){U=M+1;break e}}U=M}}break;case 91:p++;case 40:p++;case 34:case 39:for(;U++<F&&c.charCodeAt(U)!==p;);}if(0===g)break;U++}if(g=c.substring(z,U),0===d&&(d=(H=H.replace(l,"").trim()).charCodeAt(0)),64===d){switch(0<j&&(H=H.replace(f,"")),p=H.charCodeAt(1)){case 100:case 109:case 115:case 45:j=r;break;default:j=N}if(z=(g=t(r,j,g,p,h+1)).length,0<T&&(b=a(3,g,j=n(N,H,D),r,C,x,z,p,h,u),H=j.join(""),void 0!==b&&0===(z=(g=b.trim()).length)&&(p=0,g="")),0<z)switch(p){case 115:H=H.replace(w,s);case 100:case 109:case 45:g=H+"{"+g+"}";break;case 107:g=(H=H.replace(m,"$1 $2"))+"{"+g+"}",g=1===k||2===k&&o("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=H+g,112===u&&(q+=g,g="")}else g=""}else g=t(r,n(r,H,D),g,u,h+1);$+=g,g=D=j=M=d=0,H="",p=c.charCodeAt(++U);break;case 125:case 59:if(1<(z=(H=(0<j?H.replace(f,""):H).trim()).length))switch(0===M&&(d=H.charCodeAt(0),45===d||96<d&&123>d)&&(z=(H=H.replace(" ",":")).length),0<T&&void 0!==(b=a(1,H,r,e,C,x,q.length,u,h,u))&&0===(z=(H=b.trim()).length)&&(H="\0\0"),d=H.charCodeAt(0),p=H.charCodeAt(1),d){case 0:break;case 64:if(105===p||99===p){V+=H+c.charAt(U);break}default:58!==H.charCodeAt(z-1)&&(q+=i(H,d,p,H.charCodeAt(2)))}D=j=M=d=0,H="",p=c.charCodeAt(++U)}}switch(p){case 13:case 10:47===S?S=0:0===1+d&&107!==u&&0<H.length&&(j=1,H+="\0"),0<T*L&&a(0,H,r,e,C,x,q.length,u,h,u),x=1,C++;break;case 59:case 125:if(0===S+R+O+E){x++;break}default:switch(x++,y=c.charAt(U),p){case 9:case 32:if(0===R+E+S)switch(I){case 44:case 58:case 9:case 32:y="";break;default:32!==p&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===R+S+E&&(j=D=1,y="\f"+y);break;case 108:if(0===R+S+E+P&&0<M)switch(U-M){case 2:112===I&&58===c.charCodeAt(U-3)&&(P=I);case 8:111===A&&(P=A)}break;case 58:0===R+S+E&&(M=U);break;case 44:0===S+O+R+E&&(j=1,y+="\r");break;case 34:case 39:0===S&&(R=R===p?0:0===R?p:R);break;case 91:0===R+S+O&&E++;break;case 93:0===R+S+O&&E--;break;case 41:0===R+S+E&&O--;break;case 40:0===R+S+E&&(0===d&&(2*I+3*A==533||(d=1)),O++);break;case 64:0===S+O+R+E+M+g&&(g=1);break;case 42:case 47:if(!(0<R+E+O))switch(S){case 0:switch(2*p+3*c.charCodeAt(U+1)){case 235:S=47;break;case 220:z=U,S=42}break;case 42:47===p&&42===I&&z+2!==U&&(33===c.charCodeAt(z+2)&&(q+=c.substring(z,U+1)),y="",S=0)}}0===S&&(H+=y)}A=I,I=p,U++}if(0<(z=q.length)){if(j=r,0<T&&void 0!==(b=a(2,q,j,e,C,x,z,u,h,u))&&0===(q=b).length)return V+q+$;if(q=j.join(",")+"{"+q+"}",0!=k*P){switch(2!==k||o(q,2)||(P=0),P){case 111:q=q.replace(_,":-moz-$1")+q;break;case 112:q=q.replace(v,"::-webkit-input-$1")+q.replace(v,"::-moz-$1")+q.replace(v,":-ms-input-$1")+q}P=0}}return V+q+$}function n(e,t,n){var i=t.trim().split(g);t=i;var o=i.length,s=e.length;switch(s){case 0:case 1:var a=0;for(e=0===s?"":e[0]+" ";a<o;++a)t[a]=r(e,t[a],n).trim();break;default:var c=a=0;for(t=[];a<o;++a)for(var u=0;u<s;++u)t[c++]=r(e[u]+" ",i[a],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(y,"$1"+e.trim());case 58:return e.trim()+t.replace(y,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(y,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function i(e,t,n,r){var s=e+";",a=2*t+3*n+4*r;if(944===a){e=s.indexOf(":",9)+1;var c=s.substring(e,s.length-1).trim();return c=s.substring(0,e).trim()+c+";",1===k||2===k&&o(c,1)?"-webkit-"+c+c:c}if(0===k||2===k&&!o(s,1))return s;switch(a){case 1015:return 97===s.charCodeAt(10)?"-webkit-"+s+s:s;case 951:return 116===s.charCodeAt(3)?"-webkit-"+s+s:s;case 963:return 110===s.charCodeAt(5)?"-webkit-"+s+s:s;case 1009:if(100!==s.charCodeAt(4))break;case 969:case 942:return"-webkit-"+s+s;case 978:return"-webkit-"+s+"-moz-"+s+s;case 1019:case 983:return"-webkit-"+s+"-moz-"+s+"-ms-"+s+s;case 883:if(45===s.charCodeAt(8))return"-webkit-"+s+s;if(0<s.indexOf("image-set(",11))return s.replace(I,"$1-webkit-$2")+s;break;case 932:if(45===s.charCodeAt(4))switch(s.charCodeAt(5)){case 103:return"-webkit-box-"+s.replace("-grow","")+"-webkit-"+s+"-ms-"+s.replace("grow","positive")+s;case 115:return"-webkit-"+s+"-ms-"+s.replace("shrink","negative")+s;case 98:return"-webkit-"+s+"-ms-"+s.replace("basis","preferred-size")+s}return"-webkit-"+s+"-ms-"+s+s;case 964:return"-webkit-"+s+"-ms-flex-"+s+s;case 1023:if(99!==s.charCodeAt(8))break;return"-webkit-box-pack"+(c=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+c+s;case 1005:return d.test(s)?s.replace(h,":-webkit-")+s.replace(h,":-moz-")+s:s;case 1e3:switch(t=(c=s.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=s.replace(b,"tb");break;case 232:c=s.replace(b,"tb-rl");break;case 220:c=s.replace(b,"lr");break;default:return s}return"-webkit-"+s+"-ms-"+c+s;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(t=(s=e).length-10,a=(c=(33===s.charCodeAt(t)?s.substring(0,t):s).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:s=s.replace(c,"-webkit-"+c)+";"+s;break;case 207:case 102:s=s.replace(c,"-webkit-"+(102<a?"inline-":"")+"box")+";"+s.replace(c,"-webkit-"+c)+";"+s.replace(c,"-ms-"+c+"box")+";"+s}return s+";";case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:return c=s.replace("-items",""),"-webkit-"+s+"-webkit-box-"+c+"-ms-flex-"+c+s;case 115:return"-webkit-"+s+"-ms-flex-item-"+s.replace(S,"")+s;default:return"-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","").replace(S,"")+s}break;case 973:case 989:if(45!==s.charCodeAt(3)||122===s.charCodeAt(4))break;case 931:case 953:if(!0===R.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?i(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):s.replace(c,"-webkit-"+c)+s.replace(c,"-moz-"+c.replace("fill-",""))+s;break;case 962:if(s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===n+r&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10))return s.substring(0,s.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+s}return s}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),M(2!==t?r:r.replace(O,"$1"),n,t)}function s(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(E," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,i,o,s,a,c,l){for(var f,h=0,d=t;h<T;++h)switch(f=A[h].call(u,e,d,n,r,i,o,s,a,c,l)){case void 0:case!1:case!0:case null:break;default:d=f}if(d!==t)return d}function c(e){return void 0!==(e=e.prefix)&&(M=null,e?"function"!=typeof e?k=1:(k=2,M=e):k=0),c}function u(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<T){var i=a(-1,n,r,r,C,x,0,0,0,0);void 0!==i&&"string"==typeof i&&(n=i)}var o=t(N,r,n,0,0);return 0<T&&void 0!==(i=a(-2,o,r,r,C,x,o.length,0,0,0))&&(o=i),P=0,x=C=1,o}var l=/^\0+/g,f=/[\0\r\f]/g,h=/: */g,d=/zoo|gra/,p=/([,: ])(transform)/g,g=/,\r+?/g,y=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,_=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,S=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,R=/stretch|:\s*\w+\-(?:conte|avail)/,I=/([^-])(image-set\()/,x=1,C=1,P=0,k=1,N=[],A=[],T=0,M=null,L=0;return u.use=function e(t){switch(t){case void 0:case null:T=A.length=0;break;default:if("function"==typeof t)A[T++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else L=0|!!t}return e},u.set=c,void 0!==e&&c(e),u}!function(e){e.exports=function(){if(w)return S;w=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case c:case u:case r:case o:case i:case f:return e;default:switch(e=e&&e.$$typeof){case a:case l:case p:case d:case s:return e;default:return h}}case n:return h}}}function b(e){return _(e)===u}return S.AsyncMode=c,S.ConcurrentMode=u,S.ContextConsumer=a,S.ContextProvider=s,S.Element=t,S.ForwardRef=l,S.Fragment=r,S.Lazy=p,S.Memo=d,S.Portal=n,S.Profiler=o,S.StrictMode=i,S.Suspense=f,S.isAsyncMode=function(e){return b(e)||_(e)===c},S.isConcurrentMode=b,S.isContextConsumer=function(e){return _(e)===a},S.isContextProvider=function(e){return _(e)===s},S.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},S.isForwardRef=function(e){return _(e)===l},S.isFragment=function(e){return _(e)===r},S.isLazy=function(e){return _(e)===p},S.isMemo=function(e){return _(e)===d},S.isPortal=function(e){return _(e)===n},S.isProfiler=function(e){return _(e)===o},S.isStrictMode=function(e){return _(e)===i},S.isSuspense=function(e){return _(e)===f},S.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===y||e.$$typeof===m||e.$$typeof===v||e.$$typeof===g)},S.typeOf=_,S}()}(E);var R={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var I=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,x=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return I.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),C=E.exports,P={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},k={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},N={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},A={};function T(e){return C.isMemo(e)?N:A[e.$$typeof]||P}A[C.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},A[C.Memo]=N;var M=Object.defineProperty,L=Object.getOwnPropertyNames,U=Object.getOwnPropertySymbols,j=Object.getOwnPropertyDescriptor,D=Object.getPrototypeOf,z=Object.prototype,B=function e(t,n,r){if("string"!=typeof n){if(z){var i=D(n);i&&i!==z&&e(t,i,r)}var o=L(n);U&&(o=o.concat(U(n)));for(var s=T(t),a=T(n),c=0;c<o.length;++c){var u=o[c];if(!(k[u]||r&&r[u]||a&&a[u]||s&&s[u])){var l=j(n,u);try{M(t,u,l)}catch(e){}}}}return t};function F(){return(F=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var H=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},q=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!E.exports.typeOf(e)},$=Object.freeze([]),V=Object.freeze({});function W(e){return"function"==typeof e}function K(e){return e.displayName||e.name||"Component"}function G(e){return e&&"string"==typeof e.styledComponentId}var Y="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Q="undefined"!=typeof window&&"HTMLElement"in window,J=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY));function X(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var Z=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&X(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var s=this.indexOfGroup(e+1),a=0,c=t.length;a<c;a++)this.tag.insertRule(s,t[a])&&(this.groupSizes[e]++,s++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o<i;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),ee=new Map,te=new Map,ne=1,re=function(e){if(ee.has(e))return ee.get(e);for(;te.has(ne);)ne++;var t=ne++;return ee.set(e,t),te.set(t,e),t},ie=function(e){return te.get(e)},oe=function(e,t){t>=ne&&(ne=t+1),ee.set(e,t),te.set(t,e)},se="style["+Y+'][data-styled-version="5.3.11"]',ae=new RegExp("^"+Y+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),ce=function(e,t,n){for(var r,i=n.split(","),o=0,s=i.length;o<s;o++)(r=i[o])&&e.registerName(t,r)},ue=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],i=0,o=n.length;i<o;i++){var s=n[i].trim();if(s){var a=s.match(ae);if(a){var c=0|parseInt(a[1],10),u=a[2];0!==c&&(oe(u,c),ce(e,u,a[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(s)}}},le=function(e){var t=document.head,n=e||t,r=document.createElement("style"),i=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(Y))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(Y,"active"),r.setAttribute("data-styled-version","5.3.11");var s="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return s&&r.setAttribute("nonce",s),n.insertBefore(r,o),r},fe=function(){function e(e){var t=this.element=le(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}X(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),he=function(){function e(e){var t=this.element=le(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),de=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),pe=Q,ge={isServer:!Q,useCSSOMInjection:!J},ye=function(){function e(e,t,n){void 0===e&&(e=V),void 0===t&&(t={}),this.options=F({},ge,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&Q&&pe&&(pe=!1,function(e){for(var t=document.querySelectorAll(se),n=0,r=t.length;n<r;n++){var i=t[n];i&&"active"!==i.getAttribute(Y)&&(ue(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return re(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(F({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,i=t.target,e=n?new de(i):r?new fe(i):new he(i),new Z(e)));var e,t,n,r,i},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(re(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(re(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(re(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",i=0;i<n;i++){var o=ie(i);if(void 0!==o){var s=e.names.get(o),a=t.getGroup(i);if(s&&a&&s.size){var c=Y+".g"+i+'[id="'+o+'"]',u="";void 0!==s&&s.forEach((function(e){e.length>0&&(u+=e+",")})),r+=""+a+c+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),me=/(a)(d)/gi,ve=function(e){return String.fromCharCode(e+(e>25?39:97))};function _e(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ve(t%52)+n;return(ve(t%52)+n).replace(me,"$1-$2")}var be=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},we=function(e){return be(5381,e)},Ee=we("5.3.11"),Se=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(W(n)&&!G(n))return!1}return!0}(e),this.componentId=t,this.baseHash=be(Ee,t),this.baseStyle=n,ye.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var o=je(this.rules,e,t,n).join(""),s=_e(be(this.baseHash,o)>>>0);if(!t.hasNameForId(r,s)){var a=n(o,"."+s,void 0,r);t.insertRules(r,s,a)}i.push(s),this.staticRulesId=s}else{for(var c=this.rules.length,u=be(this.baseHash,n.hash),l="",f=0;f<c;f++){var h=this.rules[f];if("string"==typeof h)l+=h;else if(h){var d=je(h,e,t,n),p=Array.isArray(d)?d.join(""):d;u=be(u,p+f),l+=p}}if(l){var g=_e(u>>>0);if(!t.hasNameForId(r,g)){var y=n(l,"."+g,void 0,r);t.insertRules(r,g,y)}i.push(g)}}return i.join(" ")},e}(),Oe=/^\s*\/\/.*$/gm,Re=[":","[",".","#"],Ie=b.createContext();Ie.Consumer;var xe=b.createContext(),Ce=(xe.Consumer,new ye),Pe=function(){var e,t,n,r,i=V,o=i.options,s=void 0===o?V:o,a=i.plugins,c=void 0===a?$:a,u=new O(s),l=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,s,a,c,u,l,f){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(i[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){l.push(e)})),h=function(n,i,o){return 0===i&&-1!==Re.indexOf(o[t.length])||o.match(r)?n:"."+e};function d(i,o,s,a){void 0===a&&(a="&");var c=i.replace(Oe,""),l=o&&s?s+" "+o+" { "+c+" }":c;return e=a,t=o,n=new RegExp("\\"+t+"\\b","g"),r=new RegExp("(\\"+t+"\\b){2,}"),u(s||!o?"":o,l)}return u.use([].concat(c,[function(e,r,i){2===e&&i.length&&i[0].lastIndexOf(t)>0&&(i[0]=i[0].replace(n,h))},f,function(e){if(-2===e){var t=l;return l=[],t}}])),d.hash=c.length?c.reduce((function(e,t){return t.name||X(15),be(e,t.name)}),5381).toString():"",d}(),ke=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return X(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Pe),this.name+e.hash},e}(),Ne=/([A-Z])/,Ae=/([A-Z])/g,Te=/^ms-/,Me=function(e){return"-"+e.toLowerCase()};function Le(e){return Ne.test(e)?e.replace(Ae,Me).replace(Te,"-ms-"):e}var Ue=function(e){return null==e||!1===e||""===e};function je(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],s=0,a=e.length;s<a;s+=1)""!==(i=je(e[s],t,n,r))&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}return Ue(e)?"":G(e)?"."+e.styledComponentId:W(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?e:je(e(t),t,n,r):e instanceof ke?n?(e.inject(n,r),e.getName(r)):e:q(e)?function e(t,n){var r,i,o=[];for(var s in t)t.hasOwnProperty(s)&&!Ue(t[s])&&(Array.isArray(t[s])&&t[s].isCss||W(t[s])?o.push(Le(s)+":",t[s],";"):q(t[s])?o.push.apply(o,e(t[s],s)):o.push(Le(s)+": "+(r=s,(null==(i=t[s])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in R||r.startsWith("--")?String(i).trim():i+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(e):e.toString();var c}var De=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return W(e)||q(e)?De(je(H($,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:De(je(H(e,n)))}var Be=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Fe=/(^-|-$)/g;function He(e){return e.replace(Be,"-").replace(Fe,"")}function qe(e){return"string"==typeof e&&!0}var $e=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ve=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function We(e,t,n){var r=e[n];$e(t)&&$e(r)?Ke(r,t):e[n]=t}function Ke(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var s=o[i];if($e(s))for(var a in s)Ve(a)&&We(e,s[a],a)}return e}var Ge=b.createContext();Ge.Consumer;var Ye={};function Qe(e,t,n){var r=G(e),i=!qe(e),o=t.attrs,s=void 0===o?$:o,a=t.componentId,c=void 0===a?function(e,t){var n="string"!=typeof e?"sc":He(e);Ye[n]=(Ye[n]||0)+1;var r=n+"-"+function(e){return _e(we(e)>>>0)}("5.3.11"+n+Ye[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):a,u=t.displayName,l=void 0===u?function(e){return qe(e)?"styled."+e:"Styled("+K(e)+")"}(e):u,f=t.displayName&&t.componentId?He(t.displayName)+"-"+t.componentId:t.componentId||c,h=r&&e.attrs?Array.prototype.concat(e.attrs,s).filter(Boolean):s,d=t.shouldForwardProp;r&&e.shouldForwardProp&&(d=t.shouldForwardProp?function(n,r,i){return e.shouldForwardProp(n,r,i)&&t.shouldForwardProp(n,r,i)}:e.shouldForwardProp);var p,g=new Se(n,f,r?e.componentStyle:void 0),y=g.isStatic&&0===s.length,v=function(e,t){return function(e,t,n,r){var i=e.attrs,o=e.componentStyle,s=e.defaultProps,a=e.foldedComponentIds,c=e.shouldForwardProp,u=e.styledComponentId,l=e.target,f=function(e,t,n){void 0===e&&(e=V);var r=F({},t,{theme:e}),i={};return n.forEach((function(e){var t,n,o,s=e;for(t in W(s)&&(s=s(r)),s)r[t]=i[t]="className"===t?(n=i[t],o=s[t],n&&o?n+" "+o:n||o):s[t]})),[r,i]}(function(e,t,n){return void 0===n&&(n=V),e.theme!==n.theme&&e.theme||t||n.theme}(t,m.exports.useContext(Ge),s)||V,t,i),h=f[0],d=f[1],p=function(e,t,n){var r=m.exports.useContext(Ie)||Ce,i=m.exports.useContext(xe)||Pe;return t?e.generateAndInjectStyles(V,r,i):e.generateAndInjectStyles(n,r,i)}(o,r,h),g=n,y=d.$as||t.$as||d.as||t.as||l,v=qe(y),_=d!==t?F({},t,{},d):t,b={};for(var w in _)"$"!==w[0]&&"as"!==w&&("forwardedAs"===w?b.as=_[w]:(c?c(w,x,y):!v||x(w))&&(b[w]=_[w]));return t.style&&d.style!==t.style&&(b.style=F({},t.style,{},d.style)),b.className=Array.prototype.concat(a,u,p!==u?p:null,t.className,d.className).filter(Boolean).join(" "),b.ref=g,m.exports.createElement(y,b)}(p,e,t,y)};return v.displayName=l,(p=b.forwardRef(v)).attrs=h,p.componentStyle=g,p.displayName=l,p.shouldForwardProp=d,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):$,p.styledComponentId=f,p.target=r?e.target:e,p.withComponent=function(e){var r=t.componentId,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["componentId"]),o=r&&r+"-"+(qe(e)?e:He(K(e)));return Qe(e,F({},i,{attrs:h,componentId:o}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ke({},e.defaultProps,t):t}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),i&&B(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var Je=function(e){return function e(t,n,r){if(void 0===r&&(r=V),!E.exports.isValidElementType(n))return X(1,String(n));var i=function(){return t(n,r,ze.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,F({},r,{},i))},i.attrs=function(i){return e(t,n,F({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(Qe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Je[e]=Je(e)}));const Xe=Je.div`
  z-index: 998;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.6);
  transition: opacity .25s;
`,Ze="only screen and (min-width: 640px)",et="only screen and (max-height: 640px)",tt="1.2rem",nt=Je.div`
  z-index: 999;
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100vw;
  height: 100%;

  font: 14px inter, sans-serif;
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  font-feature-settings: "kern";
  text-align: left !important;

  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;

  @media ${Ze} {
    justify-content: start;
    align-items: end;
  }
`,rt=Je.div`
  position: relative;
  bottom: 0px;
  left: 0px;
  width: 100%;
  border-radius: ${tt} ${tt} 0 0;
  background: #131214;

  transform: scale(1);
  transition: opacity .25s,transform .25s;

  @media ${Ze} {
    max-width: 340px;
    margin: auto;
    border-radius: ${tt};
  }
`,it=Je.button`
  box-sizing: border-box;
  margin: 0.2rem 0.2rem 0 0;
  border: none;
  padding: 0;
  width: 18px;
  height: 18px;
  background: transparent;
  outline: none;
  cursor: pointer;

  & > img {
    width: 18px;
    height: 18px;
  }
`,ot="15px",st=Je.div`
  display: flex;
  flex: 1;
  flex-direction: row;
  justify-content: space-between;
  padding: ${ot};
  padding-bottom: 0.9rem;
`,at=Je.div`
  margin-bottom: ${ot};
  border-top: 1px solid #2b2a2b;
  padding: ${ot} ${ot} 0 ${ot};
  color: #C3C3C3;

  ${({textAlign:e})=>e&&ze`
    text-align: ${e};
  `}
`,ct=Je.h2`
  color: #fff;
  margin: 0;
  line-height: 28px;
  font-size: 24px;
  font-weight: 600;

  @media ${et} {
    font-size: 18px;
  }
`;Je.h3`
  color: #fff;
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
`;const ut=Je.p`
  ${({noMargin:e})=>e?ze`
    margin: 0;
  `:"\n    margin: 12px 0 0 0;\n  "}
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
`,lt=Je.button`
  width: 100%;

  ${({extraMargin:e})=>e?ze`
    margin: 2rem 0 1.2rem 0;
  `:ze`
    margin-top: 1.2rem;
  `}

  border-radius: 3rem;
  padding: 0.8rem 1rem;

  font-size: 14px;
  font-weight: 600;
  line-height: 17px;

  transition: all .5s ease;
  cursor: pointer;

  ${({variant:e})=>"primary"==e?ze`
  border: none;
  background-color: white;
  color: #000;
  &:hover, &:focus {
    background-color: rgba(255, 255, 255, 0.8);
  }
  `:ze`
  border: 1px solid #565656;
  background-color: transparent;
  color: #fff;
  &:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
  `}
`,ft=Je.a`
  color: #BBB0FF;
  cursor: pointer;
`;let ht=e=>{};const dt=({onClose:e,children:t})=>{const[n,r]=m.exports.useState(!0);ht=r;const i=()=>{ht(!1),e&&e()};return n?g.exports.jsxs(g.exports.Fragment,{children:[g.exports.jsx(Xe,{}),g.exports.jsx(nt,Object.assign({id:"ModalWrapper",onClick:e=>{var t;"ModalWrapper"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)&&i()}},{children:g.exports.jsxs(rt,{children:[g.exports.jsxs(st,{children:[g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='72' height='24' viewBox='0 0 72 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M61.3616 22.4887V23.9996H71.7318V17.1853H70.2208V22.4887H61.3616ZM61.3616 0V1.51096H70.2208V6.81473H71.7318V0H61.3616ZM56.0137 11.689V8.17796H58.3842C59.5398 8.17796 59.9546 8.56305 59.9546 9.61506V10.2372C59.9546 11.3186 59.5545 11.689 58.3842 11.689H56.0137ZM59.7764 12.311C60.8578 12.0296 61.6133 11.022 61.6133 9.82231C61.6133 9.06683 61.3172 8.38521 60.7542 7.83698C60.0432 7.15536 59.0948 6.81473 57.8653 6.81473H54.5322V17.1849H56.0137V13.0518H58.2361C59.3767 13.0518 59.836 13.5258 59.836 14.7112V17.1853H61.3469V14.9482C61.3469 13.3186 60.9618 12.6965 59.7764 12.5187V12.311ZM47.303 12.6517H51.866V11.2888H47.303V8.17761H52.3102V6.81473H45.7916V17.1849H52.5325V15.822H47.303V12.6517ZM42.3398 13.1999V13.9109C42.3398 15.4072 41.7916 15.8963 40.414 15.8963H40.0881C38.7102 15.8963 38.0436 15.4516 38.0436 13.3925V10.6072C38.0436 8.53329 38.7399 8.10338 40.1175 8.10338H40.4137C41.7618 8.10338 42.1914 8.60716 42.2061 9.99979H43.8357C43.6876 7.9553 42.3248 6.66665 40.2803 6.66665C39.2878 6.66665 38.4581 6.97787 37.836 7.57021C36.9027 8.44437 36.3842 9.92593 36.3842 11.9998C36.3842 13.9999 36.8288 15.4814 37.7471 16.3997C38.3692 17.0071 39.2286 17.333 40.073 17.333C40.9619 17.333 41.7769 16.9773 42.1914 16.2071H42.3986V17.1849H43.7615V11.837H39.7467V13.1999H42.3398ZM29.2737 8.17761H30.8886C32.4146 8.17761 33.2443 8.5627 33.2443 10.6369V13.3627C33.2443 15.4366 32.4146 15.822 30.8886 15.822H29.2737V8.17761ZM31.0216 17.1853C33.8513 17.1853 34.903 15.0372 34.903 12.0002C34.903 8.91874 33.7771 6.81509 30.9919 6.81509H27.7917V17.1853H31.0216ZM20.6367 12.6517H25.1997V11.2888H20.6367V8.17761H25.644V6.81473H19.1254V17.1849H25.8663V15.822H20.6367V12.6517ZM11.8962 6.81473H10.3852V17.1849H17.2V15.822H11.8962V6.81473ZM0 17.1853V24H10.3702V22.4887H1.51096V17.1853H0ZM0 0V6.81473H1.51096V1.51096H10.3702V0H0Z' fill='white'/%3e%3c/svg%3e"}),g.exports.jsx(it,Object.assign({onClick:i},{children:g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M22 2L2 22' stroke='white' stroke-width='3'/%3e%3cpath d='M2 2L22 22' stroke='white' stroke-width='3'/%3e%3c/svg%3e"})}))]}),g.exports.jsx(g.exports.Fragment,{children:t})]})}))]}):null};var pt,gt,yt,mt,vt={exports:{}},_t={},bt={exports:{}},wt={};function Et(){return gt||(gt=1,function(e){e.exports=(pt||(pt=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,c=e[a],u=a+1,l=e[u];if(0>i(c,n))u<o&&0>i(l,c)?(e[r]=l,e[u]=n,r=u):(e[r]=c,e[a]=n,r=a);else{if(!(u<o&&0>i(l,n)))break e;e[r]=l,e[u]=n,r=u}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],u=[],l=1,f=null,h=3,d=!1,p=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var i=n(u);null!==i;){if(null===i.callback)r(u);else{if(!(i.startTime<=e))break;r(u),i.sortIndex=i.expirationTime,t(c,i)}i=n(u)}}function b(e){if(g=!1,_(e),!p)if(null!==n(c))p=!0,A(w);else{var t=n(u);null!==t&&T(b,t.startTime-e)}}function w(t,i){p=!1,g&&(g=!1,m(R),R=-1),d=!0;var o=h;try{for(_(i),f=n(c);null!==f&&(!(f.expirationTime>i)||t&&!C());){var s=f.callback;if("function"==typeof s){f.callback=null,h=f.priorityLevel;var a=s(f.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?f.callback=a:f===n(c)&&r(c),_(i)}else r(c);f=n(c)}if(null!==f)var l=!0;else{var y=n(u);null!==y&&T(b,y.startTime-i),l=!1}return l}finally{f=null,h=o,d=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,O=null,R=-1,I=5,x=-1;function C(){return!(e.unstable_now()-x<I)}function P(){if(null!==O){var t=e.unstable_now();x=t;var n=!0;try{n=O(!0,t)}finally{n?E():(S=!1,O=null)}}else S=!1}if("function"==typeof v)E=function(){v(P)};else if("undefined"!=typeof MessageChannel){var k=new MessageChannel,N=k.port2;k.port1.onmessage=P,E=function(){N.postMessage(null)}}else E=function(){y(P,0)};function A(e){O=e,S||(S=!0,E())}function T(t,n){R=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,A(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:l++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(u,r),null===n(c)&&r===n(u)&&(g?(m(R),R=-1):g=!0,T(b,o-s))):(r.sortIndex=a,t(c,r),p||d||(p=!0,A(w))),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(wt)),wt)}(bt)),bt.exports}
/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */function St(){if(yt)return _t;yt=1;var e=m.exports,t=Et();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(e,t){s(e,t),s(e+"Capture",t)}function s(e,t){for(i[e]=t,e=0;e<t.length;e++)r.add(t[e])}var a=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),c=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,l={},f={};function h(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var d={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){d[e]=new h(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];d[t]=new h(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){d[e]=new h(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){d[e]=new h(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){d[e]=new h(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){d[e]=new h(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){d[e]=new h(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){d[e]=new h(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){d[e]=new h(e,5,!1,e.toLowerCase(),null,!1,!1)}));var p=/[\-:]([a-z])/g;function g(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=d.hasOwnProperty(t)?d[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!c.call(f,e)||!c.call(l,e)&&(u.test(e)?f[e]=!0:(l[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(p,g);d[t]=new h(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(p,g);d[t]=new h(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(p,g);d[t]=new h(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){d[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)})),d.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){d[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)}));var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),R=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),A=Symbol.iterator;function T(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=A&&e[A]||e["@@iterator"])?e:null}var M,L=Object.assign;function U(e){if(void 0===M)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return"\n"+M+e}var j=!1;function D(e,t){if(!e||j)return"";j=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var c="\n"+i[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=s&&0<=a);break}}}finally{j=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?U(e):""}function z(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return D(e.type,!1);case 11:return D(e.type.render,!1);case 1:return D(e.type,!0);default:return""}}function B(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case w:return"Fragment";case b:return"Portal";case S:return"Profiler";case E:return"StrictMode";case x:return"Suspense";case C:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case R:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case P:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return B(e(t))}catch(e){}}return null}function F(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function V(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function W(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var n=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function G(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function Q(e,t){Y(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?X(e,t.type,n):t.hasOwnProperty("defaultValue")&&X(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function X(e,t,n){"number"===t&&W(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Z=Array.isArray;function ee(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function te(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return L({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ne(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(Z(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:H(r)}}function re(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function oe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?oe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ae,ce,ue=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ae=ae||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ae.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function de(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function pe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=de(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ge=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function me(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ve=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var be=null,we=null,Ee=null;function Se(e){if(e=bi(e)){if("function"!=typeof be)throw Error(n(280));var t=e.stateNode;t&&(t=Ei(t),be(e.stateNode,e.type,t))}}function Oe(e){we?Ee?Ee.push(e):Ee=[e]:we=e}function Re(){if(we){var e=we,t=Ee;if(Ee=we=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Ie(e,t){return e(t)}function xe(){}var Ce=!1;function Pe(e,t,n){if(Ce)return e(t,n);Ce=!0;try{return Ie(e,t,n)}finally{Ce=!1,(null!==we||null!==Ee)&&(xe(),Re())}}function ke(e,t){var r=e.stateNode;if(null===r)return null;var i=Ei(r);if(null===i)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var Ne=!1;if(a)try{var Ae={};Object.defineProperty(Ae,"passive",{get:function(){Ne=!0}}),window.addEventListener("test",Ae,Ae),window.removeEventListener("test",Ae,Ae)}catch(ce){Ne=!1}function Te(e,t,n,r,i,o,s,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Me=!1,Le=null,Ue=!1,je=null,De={onError:function(e){Me=!0,Le=e}};function ze(e,t,n,r,i,o,s,a,c){Me=!1,Le=null,Te.apply(De,arguments)}function Be(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Fe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function He(e){if(Be(e)!==e)throw Error(n(188))}function qe(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,i=t;;){var o=r.return;if(null===o)break;var s=o.alternate;if(null===s){if(null!==(i=o.return)){r=i;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===r)return He(o),e;if(s===i)return He(o),t;s=s.sibling}throw Error(n(188))}if(r.return!==i.return)r=o,i=s;else{for(var a=!1,c=o.child;c;){if(c===r){a=!0,r=o,i=s;break}if(c===i){a=!0,i=o,r=s;break}c=c.sibling}if(!a){for(c=s.child;c;){if(c===r){a=!0,r=s,i=o;break}if(c===i){a=!0,i=s,r=o;break}c=c.sibling}if(!a)throw Error(n(189))}}if(r.alternate!==i)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e),null!==e?$e(e):null}function $e(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=$e(e);if(null!==t)return t;e=e.sibling}return null}var Ve=t.unstable_scheduleCallback,We=t.unstable_cancelCallback,Ke=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ye=t.unstable_now,Qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Xe=t.unstable_UserBlockingPriority,Ze=t.unstable_NormalPriority,et=t.unstable_LowPriority,tt=t.unstable_IdlePriority,nt=null,rt=null,it=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ot(e)/st|0)|0},ot=Math.log,st=Math.LN2,at=64,ct=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=ut(a):0!=(o&=s)&&(r=ut(o))}else 0!=(s=n&~i)?r=ut(s):0!==o&&(r=ut(o));if(0===r)return 0;if(0!==t&&t!==r&&!(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(!!(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-it(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function dt(){var e=at;return!(4194240&(at<<=1))&&(at=64),e}function pt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var vt=0;function bt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var wt,St,Ot,Rt,It,xt=!1,Ct=[],Pt=null,kt=null,Nt=null,At=new Map,Tt=new Map,Mt=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ut(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":kt=null;break;case"mouseover":case"mouseout":Nt=null;break;case"pointerover":case"pointerout":At.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tt.delete(t.pointerId)}}function jt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=bi(t))&&St(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Dt(e){var t=_i(e.target);if(null!==t){var n=Be(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Fe(n)))return e.blockedOn=t,void It(e.priority,(function(){Ot(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ve=r,n.target.dispatchEvent(r),ve=null,t.shift()}return!0}function Bt(e,t,n){zt(e)&&n.delete(t)}function Ft(){xt=!1,null!==Pt&&zt(Pt)&&(Pt=null),null!==kt&&zt(kt)&&(kt=null),null!==Nt&&zt(Nt)&&(Nt=null),At.forEach(Bt),Tt.forEach(Bt)}function Ht(e,n){e.blockedOn===n&&(e.blockedOn=null,xt||(xt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ft)))}function qt(e){function t(t){return Ht(t,e)}if(0<Ct.length){Ht(Ct[0],e);for(var n=1;n<Ct.length;n++){var r=Ct[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Pt&&Ht(Pt,e),null!==kt&&Ht(kt,e),null!==Nt&&Ht(Nt,e),At.forEach(t),Tt.forEach(t),n=0;n<Mt.length;n++)(r=Mt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Mt.length&&null===(n=Mt[0]).blockedOn;)Dt(n),null===n.blockedOn&&Mt.shift()}var $t=v.ReactCurrentBatchConfig,Vt=!0;function Wt(e,t,n,r){var i=vt,o=$t.transition;$t.transition=null;try{vt=1,Gt(e,t,n,r)}finally{vt=i,$t.transition=o}}function Kt(e,t,n,r){var i=vt,o=$t.transition;$t.transition=null;try{vt=4,Gt(e,t,n,r)}finally{vt=i,$t.transition=o}}function Gt(e,t,n,r){if(Vt){var i=Qt(e,t,n,r);if(null===i)Vr(e,t,r,Yt,n),Ut(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Pt=jt(Pt,e,t,n,r,i),!0;case"dragenter":return kt=jt(kt,e,t,n,r,i),!0;case"mouseover":return Nt=jt(Nt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return At.set(o,jt(At.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Tt.set(o,jt(Tt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Ut(e,r),4&t&&-1<Lt.indexOf(e)){for(;null!==i;){var o=bi(i);if(null!==o&&wt(o),null===(o=Qt(e,t,n,r))&&Vr(e,t,r,Yt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Vr(e,t,r,null,n)}}var Yt=null;function Qt(e,t,n,r){if(Yt=null,null!==(e=_i(e=_e(r))))if(null===(t=Be(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Fe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Jt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case Xe:return 4;case Ze:case et:return 16;case tt:return 536870912;default:return 16}default:return 16}}var Xt=null,Zt=null,en=null;function tn(){if(en)return en;var e,t,n=Zt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return en=i.slice(e,1<t?1-t:void 0)}function nn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rn(){return!0}function on(){return!1}function sn(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rn:on,this.isPropagationStopped=on,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var an,cn,un,ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=sn(ln),hn=L({},ln,{view:0,detail:0}),dn=sn(hn),pn=L({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(an=e.screenX-un.screenX,cn=e.screenY-un.screenY):cn=an=0,un=e),an)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=sn(pn),yn=sn(L({},pn,{dataTransfer:0})),mn=sn(L({},hn,{relatedTarget:0})),vn=sn(L({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),_n=L({},ln,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=sn(_n),wn=sn(L({},ln,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},On={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=On[e])&&!!t[e]}function In(){return Rn}var xn=L({},hn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Cn=sn(xn),Pn=sn(L({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=sn(L({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Nn=sn(L({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),An=L({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Tn=sn(An),Mn=[9,13,27,32],Ln=a&&"CompositionEvent"in window,Un=null;a&&"documentMode"in document&&(Un=document.documentMode);var jn=a&&"TextEvent"in window&&!Un,Dn=a&&(!Ln||Un&&8<Un&&11>=Un),zn=String.fromCharCode(32),Bn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1,$n={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!$n[e.type]:"textarea"===t}function Wn(e,t,n,r){Oe(r),0<(t=Kr(t,"onChange")).length&&(n=new fn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Gn=null;function Yn(e){zr(e,0)}function Qn(e){if(V(wi(e)))return e}function Jn(e,t){if("change"===e)return t}var Xn=!1;if(a){var Zn;if(a){var er="oninput"in document;if(!er){var tr=document.createElement("div");tr.setAttribute("oninput","return;"),er="function"==typeof tr.oninput}Zn=er}else Zn=!1;Xn=Zn&&(!document.documentMode||9<document.documentMode)}function nr(){Kn&&(Kn.detachEvent("onpropertychange",rr),Gn=Kn=null)}function rr(e){if("value"===e.propertyName&&Qn(Gn)){var t=[];Wn(t,Gn,e,_e(e)),Pe(Yn,t)}}function ir(e,t,n){"focusin"===e?(nr(),Gn=n,(Kn=t).attachEvent("onpropertychange",rr)):"focusout"===e&&nr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Gn)}function sr(e,t){if("click"===e)return Qn(t)}function ar(e,t){if("input"===e||"change"===e)return Qn(t)}var cr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ur(e,t){if(cr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!c.call(t,i)||!cr(e[i],t[i]))return!1}return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=W();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=W((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function gr(e){var t=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=fr(n,o);var s=fr(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var yr=a&&"documentMode"in document&&11>=document.documentMode,mr=null,vr=null,_r=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==W(r)||(r="selectionStart"in(r=mr)&&pr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},_r&&ur(_r,r)||(_r=r,0<(r=Kr(vr,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function Er(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:Er("Animation","AnimationEnd"),animationiteration:Er("Animation","AnimationIteration"),animationstart:Er("Animation","AnimationStart"),transitionend:Er("Transition","TransitionEnd")},Or={},Rr={};function Ir(e){if(Or[e])return Or[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Rr)return Or[e]=n[t];return e}a&&(Rr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var xr=Ir("animationend"),Cr=Ir("animationiteration"),Pr=Ir("animationstart"),kr=Ir("transitionend"),Nr=new Map,Ar="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Tr(e,t){Nr.set(e,t),o(t,[e])}for(var Mr=0;Mr<Ar.length;Mr++){var Lr=Ar[Mr];Tr(Lr.toLowerCase(),"on"+(Lr[0].toUpperCase()+Lr.slice(1)))}Tr(xr,"onAnimationEnd"),Tr(Cr,"onAnimationIteration"),Tr(Pr,"onAnimationStart"),Tr("dblclick","onDoubleClick"),Tr("focusin","onFocus"),Tr("focusout","onBlur"),Tr(kr,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ur="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ur));function Dr(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,i,o,s,a,c,u){if(ze.apply(this,arguments),Me){if(!Me)throw Error(n(198));var l=Le;Me=!1,Le=null,Ue||(Ue=!0,je=l)}}(i,t,void 0,e),e.currentTarget=null}function zr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&i.isPropagationStopped())break e;Dr(i,a,u),o=c}else for(s=0;s<r.length;s++){if(c=(a=r[s]).instance,u=a.currentTarget,a=a.listener,c!==o&&i.isPropagationStopped())break e;Dr(i,a,u),o=c}}}if(Ue)throw e=je,Ue=!1,je=null,e}function Br(e,t){var n=t[yi];void 0===n&&(n=t[yi]=new Set);var r=e+"__bubble";n.has(r)||($r(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),$r(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function qr(e){if(!e[Hr]){e[Hr]=!0,r.forEach((function(t){"selectionchange"!==t&&(jr.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,Fr("selectionchange",!1,t))}}function $r(e,t,n,r){switch(Jt(t)){case 1:var i=Wt;break;case 4:i=Kt;break;default:i=Gt}n=i.bind(null,t,n,e),i=void 0,!Ne||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vr(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=r.return;null!==s;){var c=s.tag;if((3===c||4===c)&&((c=s.stateNode.containerInfo)===i||8===c.nodeType&&c.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=_i(a)))return;if(5===(c=s.tag)||6===c){r=o=s;continue e}a=a.parentNode}}r=r.return}Pe((function(){var r=o,i=_e(n),s=[];e:{var a=Nr.get(e);if(void 0!==a){var c=fn,u=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":c=Cn;break;case"focusin":u="focus",c=mn;break;case"focusout":u="blur",c=mn;break;case"beforeblur":case"afterblur":c=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=kn;break;case xr:case Cr:case Pr:c=vn;break;case kr:c=Nn;break;case"scroll":c=dn;break;case"wheel":c=Tn;break;case"copy":case"cut":case"paste":c=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=Pn}var l=!!(4&t),f=!l&&"scroll"===e,h=l?null!==a?a+"Capture":null:a;l=[];for(var d,p=r;null!==p;){var g=(d=p).stateNode;if(5===d.tag&&null!==g&&(d=g,null!==h&&null!=(g=ke(p,h))&&l.push(Wr(p,g,d))),f)break;p=p.return}0<l.length&&(a=new c(a,u,null,n,i),s.push({event:a,listeners:l}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===ve||!(u=n.relatedTarget||n.fromElement)||!_i(u)&&!u[gi])&&(c||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?_i(u):null)&&(u!==(f=Be(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(c=null,u=r),c!==u)){if(l=gn,g="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(l=Pn,g="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==c?a:wi(c),d=null==u?a:wi(u),(a=new l(g,p+"leave",c,n,i)).target=f,a.relatedTarget=d,g=null,_i(i)===r&&((l=new l(h,p+"enter",u,n,i)).target=d,l.relatedTarget=f,g=l),f=g,c&&u)e:{for(h=u,p=0,d=l=c;d;d=Gr(d))p++;for(d=0,g=h;g;g=Gr(g))d++;for(;0<p-d;)l=Gr(l),p--;for(;0<d-p;)h=Gr(h),d--;for(;p--;){if(l===h||null!==h&&l===h.alternate)break e;l=Gr(l),h=Gr(h)}l=null}else l=null;null!==c&&Yr(s,a,c,l,!1),null!==u&&null!==f&&Yr(s,f,u,l,!0)}if("select"===(c=(a=r?wi(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===c&&"file"===a.type)var y=Jn;else if(Vn(a))if(Xn)y=ar;else{y=or;var m=ir}else(c=a.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(y=sr);switch(y&&(y=y(e,r))?Wn(s,y,n,i):(m&&m(e,a,r),"focusout"===e&&(m=a._wrapperState)&&m.controlled&&"number"===a.type&&X(a,"number",a.value)),m=r?wi(r):window,e){case"focusin":(Vn(m)||"true"===m.contentEditable)&&(mr=m,vr=r,_r=null);break;case"focusout":_r=vr=mr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(s,n,i);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":wr(s,n,i)}var v;if(Ln)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else qn?Fn(e,n)&&(_="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(_="onCompositionStart");_&&(Dn&&"ko"!==n.locale&&(qn||"onCompositionStart"!==_?"onCompositionEnd"===_&&qn&&(v=tn()):(Zt="value"in(Xt=i)?Xt.value:Xt.textContent,qn=!0)),0<(m=Kr(r,_)).length&&(_=new wn(_,e,null,n,i),s.push({event:_,listeners:m}),(v||null!==(v=Hn(n)))&&(_.data=v))),(v=jn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Bn=!0,zn);case"textInput":return(e=t.data)===zn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!Ln&&Fn(e,t)?(e=tn(),en=Zt=Xt=null,qn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Kr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=v)}zr(s,t)}))}function Wr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=ke(e,n))&&r.unshift(Wr(e,o,i)),null!=(o=ke(e,t))&&r.push(Wr(e,o,i))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(null!==c&&c===r)break;5===a.tag&&null!==u&&(a=u,i?null!=(c=ke(n,o))&&s.unshift(Wr(n,c,a)):i||null!=(c=ke(n,o))&&s.push(Wr(n,c,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Qr=/\r\n?/g,Jr=/\u0000|\uFFFD/g;function Xr(e){return("string"==typeof e?e:""+e).replace(Qr,"\n").replace(Jr,"")}function Zr(e,t,r){if(t=Xr(t),Xr(e)!==t&&r)throw Error(n(425))}function ei(){}var ti=null,ni=null;function ri(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ii="function"==typeof setTimeout?setTimeout:void 0,oi="function"==typeof clearTimeout?clearTimeout:void 0,si="function"==typeof Promise?Promise:void 0,ai="function"==typeof queueMicrotask?queueMicrotask:void 0!==si?function(e){return si.resolve(null).then(e).catch(ci)}:ii;function ci(e){setTimeout((function(){throw e}))}function ui(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void qt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);qt(t)}function li(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function fi(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var hi=Math.random().toString(36).slice(2),di="__reactFiber$"+hi,pi="__reactProps$"+hi,gi="__reactContainer$"+hi,yi="__reactEvents$"+hi,mi="__reactListeners$"+hi,vi="__reactHandles$"+hi;function _i(e){var t=e[di];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gi]||n[di]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=fi(e);null!==e;){if(n=e[di])return n;e=fi(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[di]||e[gi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function Ei(e){return e[pi]||null}var Si=[],Oi=-1;function Ri(e){return{current:e}}function Ii(e){0>Oi||(e.current=Si[Oi],Si[Oi]=null,Oi--)}function xi(e,t){Oi++,Si[Oi]=e.current,e.current=t}var Ci={},Pi=Ri(Ci),ki=Ri(!1),Ni=Ci;function Ai(e,t){var n=e.type.contextTypes;if(!n)return Ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ti(e){return null!=e.childContextTypes}function Mi(){Ii(ki),Ii(Pi)}function Li(e,t,r){if(Pi.current!==Ci)throw Error(n(168));xi(Pi,t),xi(ki,r)}function Ui(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,"function"!=typeof i.getChildContext)return r;for(var o in i=i.getChildContext())if(!(o in t))throw Error(n(108,F(e)||"Unknown",o));return L({},r,i)}function ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ci,Ni=Pi.current,xi(Pi,e),xi(ki,ki.current),!0}function Di(e,t,r){var i=e.stateNode;if(!i)throw Error(n(169));r?(e=Ui(e,t,Ni),i.__reactInternalMemoizedMergedChildContext=e,Ii(ki),Ii(Pi),xi(Pi,e)):Ii(ki),xi(ki,r)}var zi=null,Bi=!1,Fi=!1;function Hi(e){null===zi?zi=[e]:zi.push(e)}function qi(){if(!Fi&&null!==zi){Fi=!0;var e=0,t=vt;try{var n=zi;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}zi=null,Bi=!1}catch(t){throw null!==zi&&(zi=zi.slice(e+1)),Ve(Je,qi),t}finally{vt=t,Fi=!1}}return null}var $i=[],Vi=0,Wi=null,Ki=0,Gi=[],Yi=0,Qi=null,Ji=1,Xi="";function Zi(e,t){$i[Vi++]=Ki,$i[Vi++]=Wi,Wi=e,Ki=t}function eo(e,t,n){Gi[Yi++]=Ji,Gi[Yi++]=Xi,Gi[Yi++]=Qi,Qi=e;var r=Ji;e=Xi;var i=32-it(r)-1;r&=~(1<<i),n+=1;var o=32-it(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Ji=1<<32-it(t)+i|n<<i|r,Xi=o+e}else Ji=1<<o|n<<i|r,Xi=e}function to(e){null!==e.return&&(Zi(e,1),eo(e,1,0))}function no(e){for(;e===Wi;)Wi=$i[--Vi],$i[Vi]=null,Ki=$i[--Vi],$i[Vi]=null;for(;e===Qi;)Qi=Gi[--Yi],Gi[Yi]=null,Xi=Gi[--Yi],Gi[Yi]=null,Ji=Gi[--Yi],Gi[Yi]=null}var ro=null,io=null,oo=!1,so=null;function ao(e,t){var n=Tu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function co(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ro=e,io=li(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ro=e,io=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Qi?{id:Ji,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ro=e,io=null,!0);default:return!1}}function uo(e){return!(!(1&e.mode)||128&e.flags)}function lo(e){if(oo){var t=io;if(t){var r=t;if(!co(e,t)){if(uo(e))throw Error(n(418));t=li(r.nextSibling);var i=ro;t&&co(e,t)?ao(i,r):(e.flags=-4097&e.flags|2,oo=!1,ro=e)}}else{if(uo(e))throw Error(n(418));e.flags=-4097&e.flags|2,oo=!1,ro=e}}}function fo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ro=e}function ho(e){if(e!==ro)return!1;if(!oo)return fo(e),oo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ri(e.type,e.memoizedProps)),t&&(t=io)){if(uo(e))throw po(),Error(n(418));for(;t;)ao(e,t),t=li(t.nextSibling)}if(fo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){io=li(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}io=null}}else io=ro?li(e.stateNode.nextSibling):null;return!0}function po(){for(var e=io;e;)e=li(e.nextSibling)}function go(){io=ro=null,oo=!1}function yo(e){null===so?so=[e]:so.push(e)}var mo=v.ReactCurrentBatchConfig;function vo(e,t){if(e&&e.defaultProps){for(var n in t=L({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var _o=Ri(null),bo=null,wo=null,Eo=null;function So(){Eo=wo=bo=null}function Oo(e){var t=_o.current;Ii(_o),e._currentValue=t}function Ro(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Io(e,t){bo=e,Eo=wo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(wa=!0),e.firstContext=null)}function xo(e){var t=e._currentValue;if(Eo!==e)if(e={context:e,memoizedValue:t,next:null},null===wo){if(null===bo)throw Error(n(308));wo=e,bo.dependencies={lanes:0,firstContext:e}}else wo=wo.next=e;return t}var Co=null;function Po(e){null===Co?Co=[e]:Co.push(e)}function ko(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Po(t)):(n.next=i.next,i.next=n),t.interleaved=n,No(e,r)}function No(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ao=!1;function To(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Uo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&kc){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,No(e,n)}return null===(i=r.interleaved)?(t.next=t,Po(r)):(t.next=i.next,i.next=t),r.interleaved=t,No(e,n)}function jo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}function Do(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function zo(e,t,n,r){var i=e.updateQueue;Ao=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var c=a,u=c.next;c.next=null,null===s?o=u:s.next=u,s=c;var l=e.alternate;null!==l&&(a=(l=l.updateQueue).lastBaseUpdate)!==s&&(null===a?l.firstBaseUpdate=u:a.next=u,l.lastBaseUpdate=c)}if(null!==o){var f=i.baseState;for(s=0,l=u=c=null,a=o;;){var h=a.lane,d=a.eventTime;if((r&h)===h){null!==l&&(l=l.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,g=a;switch(h=t,d=n,g.tag){case 1:if("function"==typeof(p=g.payload)){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=g.payload)?p.call(d,f,h):p))break e;f=L({},f,h);break e;case 2:Ao=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else d={eventTime:d,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===l?(u=l=d,c=f):l=l.next=d,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===l&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=l,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Dc|=s,e.lanes=s,e.memoizedState=f}}function Bo(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],o=i.callback;if(null!==o){if(i.callback=null,i=r,"function"!=typeof o)throw Error(n(191,o));o.call(i)}}}var Fo=(new e.Component).refs;function Ho(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:L({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var qo={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nu(),i=ru(e),o=Lo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Uo(e,o,i))&&(iu(t,e,i,r),jo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nu(),i=ru(e),o=Lo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Uo(e,o,i))&&(iu(t,e,i,r),jo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nu(),r=ru(e),i=Lo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Uo(e,i,r))&&(iu(t,e,r,n),jo(t,e,r))}};function $o(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!(t.prototype&&t.prototype.isPureReactComponent&&ur(n,r)&&ur(i,o))}function Vo(e,t,n){var r=!1,i=Ci,o=t.contextType;return"object"==typeof o&&null!==o?o=xo(o):(i=Ti(t)?Ni:Pi.current,o=(r=null!=(r=t.contextTypes))?Ai(e,i):Ci),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=qo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Wo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qo.enqueueReplaceState(t,t.state,null)}function Ko(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Fo,To(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=xo(o):(o=Ti(t)?Ni:Pi.current,i.context=Ai(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Ho(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&qo.enqueueReplaceState(i,i.state,null),zo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Go(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var i=r.stateNode}if(!i)throw Error(n(147,e));var o=i,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=o.refs;t===Fo&&(t=o.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function Yo(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qo(e){return(0,e._init)(e._payload)}function Jo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Lu(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=zu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var i=n.type;return i===w?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===k&&Qo(i)===t.type)?((r=o(t,n.props)).ref=Go(e,t,n),r.return=e,r):((r=Uu(n.type,n.key,n.props,null,e.mode,r)).ref=Go(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=ju(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=zu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=Uu(t.type,t.key,t.props,null,e.mode,n)).ref=Go(e,null,t),n.return=e,n;case b:return(t=Bu(t,e.mode,n)).return=e,t;case k:return h(e,(0,t._init)(t._payload),n)}if(Z(t)||T(t))return(t=ju(t,e.mode,n,null)).return=e,t;Yo(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?u(e,t,n,r):null;case b:return n.key===i?l(e,t,n,r):null;case k:return d(e,t,(i=n._init)(n._payload),r)}if(Z(n)||T(n))return null!==i?null:f(e,t,n,r,null);Yo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return c(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case b:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case k:return p(e,t,n,(0,r._init)(r._payload),i)}if(Z(r)||T(r))return f(t,e=e.get(n)||null,r,i,null);Yo(t,r)}return null}function g(n,o,a,c){for(var u=null,l=null,f=o,g=o=0,y=null;null!==f&&g<a.length;g++){f.index>g?(y=f,f=null):y=f.sibling;var m=d(n,f,a[g],c);if(null===m){null===f&&(f=y);break}e&&f&&null===m.alternate&&t(n,f),o=s(m,o,g),null===l?u=m:l.sibling=m,l=m,f=y}if(g===a.length)return r(n,f),oo&&Zi(n,g),u;if(null===f){for(;g<a.length;g++)null!==(f=h(n,a[g],c))&&(o=s(f,o,g),null===l?u=f:l.sibling=f,l=f);return oo&&Zi(n,g),u}for(f=i(n,f);g<a.length;g++)null!==(y=p(f,n,g,a[g],c))&&(e&&null!==y.alternate&&f.delete(null===y.key?g:y.key),o=s(y,o,g),null===l?u=y:l.sibling=y,l=y);return e&&f.forEach((function(e){return t(n,e)})),oo&&Zi(n,g),u}function y(o,a,c,u){var l=T(c);if("function"!=typeof l)throw Error(n(150));if(null==(c=l.call(c)))throw Error(n(151));for(var f=l=null,g=a,y=a=0,m=null,v=c.next();null!==g&&!v.done;y++,v=c.next()){g.index>y?(m=g,g=null):m=g.sibling;var _=d(o,g,v.value,u);if(null===_){null===g&&(g=m);break}e&&g&&null===_.alternate&&t(o,g),a=s(_,a,y),null===f?l=_:f.sibling=_,f=_,g=m}if(v.done)return r(o,g),oo&&Zi(o,y),l;if(null===g){for(;!v.done;y++,v=c.next())null!==(v=h(o,v.value,u))&&(a=s(v,a,y),null===f?l=v:f.sibling=v,f=v);return oo&&Zi(o,y),l}for(g=i(o,g);!v.done;y++,v=c.next())null!==(v=p(g,o,y,v.value,u))&&(e&&null!==v.alternate&&g.delete(null===v.key?y:v.key),a=s(v,a,y),null===f?l=v:f.sibling=v,f=v);return e&&g.forEach((function(e){return t(o,e)})),oo&&Zi(o,y),l}return function e(n,i,s,c){if("object"==typeof s&&null!==s&&s.type===w&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case _:e:{for(var u=s.key,l=i;null!==l;){if(l.key===u){if((u=s.type)===w){if(7===l.tag){r(n,l.sibling),(i=o(l,s.props.children)).return=n,n=i;break e}}else if(l.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===k&&Qo(u)===l.type){r(n,l.sibling),(i=o(l,s.props)).ref=Go(n,l,s),i.return=n,n=i;break e}r(n,l);break}t(n,l),l=l.sibling}s.type===w?((i=ju(s.props.children,n.mode,c,s.key)).return=n,n=i):((c=Uu(s.type,s.key,s.props,null,n.mode,c)).ref=Go(n,i,s),c.return=n,n=c)}return a(n);case b:e:{for(l=s.key;null!==i;){if(i.key===l){if(4===i.tag&&i.stateNode.containerInfo===s.containerInfo&&i.stateNode.implementation===s.implementation){r(n,i.sibling),(i=o(i,s.children||[])).return=n,n=i;break e}r(n,i);break}t(n,i),i=i.sibling}(i=Bu(s,n.mode,c)).return=n,n=i}return a(n);case k:return e(n,i,(l=s._init)(s._payload),c)}if(Z(s))return g(n,i,s,c);if(T(s))return y(n,i,s,c);Yo(n,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==i&&6===i.tag?(r(n,i.sibling),(i=o(i,s)).return=n,n=i):(r(n,i),(i=zu(s,n.mode,c)).return=n,n=i),a(n)):r(n,i)}}var Xo=Jo(!0),Zo=Jo(!1),es={},ts=Ri(es),ns=Ri(es),rs=Ri(es);function is(e){if(e===es)throw Error(n(174));return e}function os(e,t){switch(xi(rs,t),xi(ns,e),xi(ts,es),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ii(ts),xi(ts,t)}function ss(){Ii(ts),Ii(ns),Ii(rs)}function as(e){is(rs.current);var t=is(ts.current),n=se(t,e.type);t!==n&&(xi(ns,e),xi(ts,n))}function cs(e){ns.current===e&&(Ii(ts),Ii(ns))}var us=Ri(0);function ls(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fs=[];function hs(){for(var e=0;e<fs.length;e++)fs[e]._workInProgressVersionPrimary=null;fs.length=0}var ds=v.ReactCurrentDispatcher,ps=v.ReactCurrentBatchConfig,gs=0,ys=null,ms=null,vs=null,_s=!1,bs=!1,ws=0,Es=0;function Ss(){throw Error(n(321))}function Os(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function Rs(e,t,r,i,o,s){if(gs=s,ys=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ds.current=null===e||null===e.memoizedState?ca:ua,e=r(i,o),bs){s=0;do{if(bs=!1,ws=0,25<=s)throw Error(n(301));s+=1,vs=ms=null,t.updateQueue=null,ds.current=la,e=r(i,o)}while(bs)}if(ds.current=aa,t=null!==ms&&null!==ms.next,gs=0,vs=ms=ys=null,_s=!1,t)throw Error(n(300));return e}function Is(){var e=0!==ws;return ws=0,e}function xs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vs?ys.memoizedState=vs=e:vs=vs.next=e,vs}function Cs(){if(null===ms){var e=ys.alternate;e=null!==e?e.memoizedState:null}else e=ms.next;var t=null===vs?ys.memoizedState:vs.next;if(null!==t)vs=t,ms=e;else{if(null===e)throw Error(n(310));e={memoizedState:(ms=e).memoizedState,baseState:ms.baseState,baseQueue:ms.baseQueue,queue:ms.queue,next:null},null===vs?ys.memoizedState=vs=e:vs=vs.next=e}return vs}function Ps(e,t){return"function"==typeof t?t(e):t}function ks(e){var t=Cs(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=ms,o=i.baseQueue,s=r.pending;if(null!==s){if(null!==o){var a=o.next;o.next=s.next,s.next=a}i.baseQueue=o=s,r.pending=null}if(null!==o){s=o.next,i=i.baseState;var c=a=null,u=null,l=s;do{var f=l.lane;if((gs&f)===f)null!==u&&(u=u.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),i=l.hasEagerState?l.eagerState:e(i,l.action);else{var h={lane:f,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===u?(c=u=h,a=i):u=u.next=h,ys.lanes|=f,Dc|=f}l=l.next}while(null!==l&&l!==s);null===u?a=i:u.next=c,cr(i,t.memoizedState)||(wa=!0),t.memoizedState=i,t.baseState=a,t.baseQueue=u,r.lastRenderedState=i}if(null!==(e=r.interleaved)){o=e;do{s=o.lane,ys.lanes|=s,Dc|=s,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ns(e){var t=Cs(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=r.dispatch,o=r.pending,s=t.memoizedState;if(null!==o){r.pending=null;var a=o=o.next;do{s=e(s,a.action),a=a.next}while(a!==o);cr(s,t.memoizedState)||(wa=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),r.lastRenderedState=s}return[s,i]}function As(){}function Ts(e,t){var r=ys,i=Cs(),o=t(),s=!cr(i.memoizedState,o);if(s&&(i.memoizedState=o,wa=!0),i=i.queue,Vs(Us.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||null!==vs&&1&vs.memoizedState.tag){if(r.flags|=2048,Bs(9,Ls.bind(null,r,i,o,t),void 0,null),null===Nc)throw Error(n(349));30&gs||Ms(r,t,o)}return o}function Ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ys.updateQueue)?(t={lastEffect:null,stores:null},ys.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ls(e,t,n,r){t.value=n,t.getSnapshot=r,js(t)&&Ds(e)}function Us(e,t,n){return n((function(){js(t)&&Ds(e)}))}function js(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cr(e,n)}catch(e){return!0}}function Ds(e){var t=No(e,1);null!==t&&iu(t,e,1,-1)}function zs(e){var t=xs();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:e},t.queue=e,e=e.dispatch=ra.bind(null,ys,e),[t.memoizedState,e]}function Bs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ys.updateQueue)?(t={lastEffect:null,stores:null},ys.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Fs(){return Cs().memoizedState}function Hs(e,t,n,r){var i=xs();ys.flags|=e,i.memoizedState=Bs(1|t,n,void 0,void 0===r?null:r)}function qs(e,t,n,r){var i=Cs();r=void 0===r?null:r;var o=void 0;if(null!==ms){var s=ms.memoizedState;if(o=s.destroy,null!==r&&Os(r,s.deps))return void(i.memoizedState=Bs(t,n,o,r))}ys.flags|=e,i.memoizedState=Bs(1|t,n,o,r)}function $s(e,t){return Hs(8390656,8,e,t)}function Vs(e,t){return qs(2048,8,e,t)}function Ws(e,t){return qs(4,2,e,t)}function Ks(e,t){return qs(4,4,e,t)}function Gs(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ys(e,t,n){return n=null!=n?n.concat([e]):null,qs(4,4,Gs.bind(null,t,e),n)}function Qs(){}function Js(e,t){var n=Cs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Os(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xs(e,t){var n=Cs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Os(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zs(e,t,n){return 21&gs?(cr(n,t)||(n=dt(),ys.lanes|=n,Dc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wa=!0),e.memoizedState=n)}function ea(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=ps.transition;ps.transition={};try{e(!1),t()}finally{vt=n,ps.transition=r}}function ta(){return Cs().memoizedState}function na(e,t,n){var r=ru(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ia(e)?oa(t,n):null!==(n=ko(e,t,n,r))&&(iu(n,e,r,nu()),sa(n,t,r))}function ra(e,t,n){var r=ru(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ia(e))oa(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,cr(a,s)){var c=t.interleaved;return null===c?(i.next=i,Po(t)):(i.next=c.next,c.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=ko(e,t,i,r))&&(iu(n,e,r,i=nu()),sa(n,t,r))}}function ia(e){var t=e.alternate;return e===ys||null!==t&&t===ys}function oa(e,t){bs=_s=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sa(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}var aa={readContext:xo,useCallback:Ss,useContext:Ss,useEffect:Ss,useImperativeHandle:Ss,useInsertionEffect:Ss,useLayoutEffect:Ss,useMemo:Ss,useReducer:Ss,useRef:Ss,useState:Ss,useDebugValue:Ss,useDeferredValue:Ss,useTransition:Ss,useMutableSource:Ss,useSyncExternalStore:Ss,useId:Ss,unstable_isNewReconciler:!1},ca={readContext:xo,useCallback:function(e,t){return xs().memoizedState=[e,void 0===t?null:t],e},useContext:xo,useEffect:$s,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Hs(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hs(4,2,e,t)},useMemo:function(e,t){var n=xs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xs();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=na.bind(null,ys,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},xs().memoizedState=e},useState:zs,useDebugValue:Qs,useDeferredValue:function(e){return xs().memoizedState=e},useTransition:function(){var e=zs(!1),t=e[0];return e=ea.bind(null,e[1]),xs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ys,o=xs();if(oo){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Nc)throw Error(n(349));30&gs||Ms(i,t,r)}o.memoizedState=r;var s={value:r,getSnapshot:t};return o.queue=s,$s(Us.bind(null,i,s,e),[e]),i.flags|=2048,Bs(9,Ls.bind(null,i,s,r,t),void 0,null),r},useId:function(){var e=xs(),t=Nc.identifierPrefix;if(oo){var n=Xi;t=":"+t+"R"+(n=(Ji&~(1<<32-it(Ji)-1)).toString(32)+n),0<(n=ws++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Es++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ua={readContext:xo,useCallback:Js,useContext:xo,useEffect:Vs,useImperativeHandle:Ys,useInsertionEffect:Ws,useLayoutEffect:Ks,useMemo:Xs,useReducer:ks,useRef:Fs,useState:function(){return ks(Ps)},useDebugValue:Qs,useDeferredValue:function(e){return Zs(Cs(),ms.memoizedState,e)},useTransition:function(){return[ks(Ps)[0],Cs().memoizedState]},useMutableSource:As,useSyncExternalStore:Ts,useId:ta,unstable_isNewReconciler:!1},la={readContext:xo,useCallback:Js,useContext:xo,useEffect:Vs,useImperativeHandle:Ys,useInsertionEffect:Ws,useLayoutEffect:Ks,useMemo:Xs,useReducer:Ns,useRef:Fs,useState:function(){return Ns(Ps)},useDebugValue:Qs,useDeferredValue:function(e){var t=Cs();return null===ms?t.memoizedState=e:Zs(t,ms.memoizedState,e)},useTransition:function(){return[Ns(Ps)[0],Cs().memoizedState]},useMutableSource:As,useSyncExternalStore:Ts,useId:ta,unstable_isNewReconciler:!1};function fa(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function ha(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var pa="function"==typeof WeakMap?WeakMap:Map;function ga(e,t,n){(n=Lo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wc||(Wc=!0,Kc=r),da(0,t)},n}function ya(e,t,n){(n=Lo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){da(0,t),"function"!=typeof r&&(null===Gc?Gc=new Set([this]):Gc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ma(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pa;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=xu.bind(null,e,t,n),t.then(e,e))}function va(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function _a(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Lo(-1,1)).tag=2,Uo(n,t,1))),n.lanes|=1),e)}var ba=v.ReactCurrentOwner,wa=!1;function Ea(e,t,n,r){t.child=null===e?Zo(t,null,n,r):Xo(t,e.child,n,r)}function Sa(e,t,n,r,i){n=n.render;var o=t.ref;return Io(t,i),r=Rs(e,t,n,r,o,i),n=Is(),null===e||wa?(oo&&n&&to(t),t.flags|=1,Ea(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wa(e,t,i))}function Oa(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Mu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Uu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ra(e,t,o,r,i))}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:ur)(s,r)&&e.ref===t.ref)return Wa(e,t,i)}return t.flags|=1,(e=Lu(o,r)).ref=t.ref,e.return=t,t.child=e}function Ra(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(ur(o,r)&&e.ref===t.ref){if(wa=!1,t.pendingProps=r=o,!(e.lanes&i))return t.lanes=e.lanes,Wa(e,t,i);131072&e.flags&&(wa=!0)}}return Ca(e,t,n,r,i)}function Ia(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xi(Lc,Mc),Mc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,xi(Lc,Mc),Mc|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xi(Lc,Mc),Mc|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,xi(Lc,Mc),Mc|=r;return Ea(e,t,i,n),t.child}function xa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ca(e,t,n,r,i){var o=Ti(n)?Ni:Pi.current;return o=Ai(t,o),Io(t,i),n=Rs(e,t,n,r,o,i),r=Is(),null===e||wa?(oo&&r&&to(t),t.flags|=1,Ea(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wa(e,t,i))}function Pa(e,t,n,r,i){if(Ti(n)){var o=!0;ji(t)}else o=!1;if(Io(t,i),null===t.stateNode)Va(e,t),Vo(t,n,r),Ko(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var c=s.context,u=n.contextType;u="object"==typeof u&&null!==u?xo(u):Ai(t,u=Ti(n)?Ni:Pi.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof s.getSnapshotBeforeUpdate;f||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||c!==u)&&Wo(t,s,r,u),Ao=!1;var h=t.memoizedState;s.state=h,zo(t,r,s,i),c=t.memoizedState,a!==r||h!==c||ki.current||Ao?("function"==typeof l&&(Ho(t,n,l,r),c=t.memoizedState),(a=Ao||$o(t,n,a,r,h,c,u))?(f||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=u,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Mo(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:vo(t.type,a),s.props=u,f=t.pendingProps,h=s.context,c="object"==typeof(c=n.contextType)&&null!==c?xo(c):Ai(t,c=Ti(n)?Ni:Pi.current);var d=n.getDerivedStateFromProps;(l="function"==typeof d||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==f||h!==c)&&Wo(t,s,r,c),Ao=!1,h=t.memoizedState,s.state=h,zo(t,r,s,i);var p=t.memoizedState;a!==f||h!==p||ki.current||Ao?("function"==typeof d&&(Ho(t,n,d,r),p=t.memoizedState),(u=Ao||$o(t,n,u,r,h,p,c)||!1)?(l||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,c),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,c)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=c,r=u):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return ka(e,t,n,r,o,i)}function ka(e,t,n,r,i,o){xa(e,t);var s=!!(128&t.flags);if(!r&&!s)return i&&Di(t,n,!1),Wa(e,t,o);r=t.stateNode,ba.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Xo(t,e.child,null,o),t.child=Xo(t,null,a,o)):Ea(e,t,a,o),t.memoizedState=r.state,i&&Di(t,n,!0),t.child}function Na(e){var t=e.stateNode;t.pendingContext?Li(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Li(0,t.context,!1),os(e,t.containerInfo)}function Aa(e,t,n,r,i){return go(),yo(i),t.flags|=256,Ea(e,t,n,r),t.child}var Ta,Ma,La,Ua,ja={dehydrated:null,treeContext:null,retryLane:0};function Da(e){return{baseLanes:e,cachePool:null,transitions:null}}function za(e,t,r){var i,o=t.pendingProps,s=us.current,a=!1,c=!!(128&t.flags);if((i=c)||(i=(null===e||null!==e.memoizedState)&&!!(2&s)),i?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),xi(us,1&s),null===e)return lo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(c=o.children,e=o.fallback,a?(o=t.mode,a=t.child,c={mode:"hidden",children:c},1&o||null===a?a=Du(c,o,0,null):(a.childLanes=0,a.pendingProps=c),e=ju(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Da(r),t.memoizedState=ja,e):Ba(t,c));if(null!==(s=e.memoizedState)&&null!==(i=s.dehydrated))return function(e,t,r,i,o,s,a){if(r)return 256&t.flags?(t.flags&=-257,Fa(e,t,a,i=ha(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=i.fallback,o=t.mode,i=Du({mode:"visible",children:i.children},o,0,null),(s=ju(s,o,a,null)).flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,!!(1&t.mode)&&Xo(t,e.child,null,a),t.child.memoizedState=Da(a),t.memoizedState=ja,s);if(!(1&t.mode))return Fa(e,t,a,null);if("$!"===o.data){if(i=o.nextSibling&&o.nextSibling.dataset)var c=i.dgst;return i=c,Fa(e,t,a,i=ha(s=Error(n(419)),i,void 0))}if(c=!!(a&e.childLanes),wa||c){if(null!==(i=Nc)){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=o&(i.suspendedLanes|a)?0:o)&&o!==s.retryLane&&(s.retryLane=o,No(e,o),iu(i,e,o,-1))}return mu(),Fa(e,t,a,i=ha(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Pu.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,io=li(o.nextSibling),ro=t,oo=!0,so=null,null!==e&&(Gi[Yi++]=Ji,Gi[Yi++]=Xi,Gi[Yi++]=Qi,Ji=e.id,Xi=e.overflow,Qi=t),(t=Ba(t,i.children)).flags|=4096,t)}(e,t,c,o,i,s,r);if(a){a=o.fallback,c=t.mode,i=(s=e.child).sibling;var u={mode:"hidden",children:o.children};return 1&c||t.child===s?(o=Lu(s,u)).subtreeFlags=14680064&s.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null),null!==i?a=Lu(i,a):(a=ju(a,c,r,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,c=null===(c=e.child.memoizedState)?Da(r):{baseLanes:c.baseLanes|r,cachePool:null,transitions:c.transitions},a.memoizedState=c,a.childLanes=e.childLanes&~r,t.memoizedState=ja,o}return e=(a=e.child).sibling,o=Lu(a,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Ba(e,t){return(t=Du({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fa(e,t,n,r){return null!==r&&yo(r),Xo(t,e.child,null,n),(e=Ba(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ha(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ro(e.return,t,n)}function qa(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function $a(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ea(e,t,r.children,n),2&(r=us.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ha(e,n,t);else if(19===e.tag)Ha(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xi(us,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ls(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),qa(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ls(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}qa(t,!0,n,null,o);break;case"together":qa(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Va(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wa(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Dc|=t.lanes,!(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=Lu(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Lu(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Ka(e,t){if(!oo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ga(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ya(e,t,r){var o=t.pendingProps;switch(no(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ga(t),null;case 1:case 17:return Ti(t.type)&&Mi(),Ga(t),null;case 3:return o=t.stateNode,ss(),Ii(ki),Ii(Pi),hs(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==so&&(cu(so),so=null))),Ma(e,t),Ga(t),null;case 5:cs(t);var s=is(rs.current);if(r=t.type,null!==e&&null!=t.stateNode)La(e,t,r,o,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Ga(t),null}if(e=is(ts.current),ho(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[di]=t,o[pi]=a,e=!!(1&t.mode),r){case"dialog":Br("cancel",o),Br("close",o);break;case"iframe":case"object":case"embed":Br("load",o);break;case"video":case"audio":for(s=0;s<Ur.length;s++)Br(Ur[s],o);break;case"source":Br("error",o);break;case"img":case"image":case"link":Br("error",o),Br("load",o);break;case"details":Br("toggle",o);break;case"input":G(o,a),Br("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},Br("invalid",o);break;case"textarea":ne(o,a),Br("invalid",o)}for(var c in ye(r,a),s=null,a)if(a.hasOwnProperty(c)){var u=a[c];"children"===c?"string"==typeof u?o.textContent!==u&&(!0!==a.suppressHydrationWarning&&Zr(o.textContent,u,e),s=["children",u]):"number"==typeof u&&o.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Zr(o.textContent,u,e),s=["children",""+u]):i.hasOwnProperty(c)&&null!=u&&"onScroll"===c&&Br("scroll",o)}switch(r){case"input":$(o),J(o,a,!0);break;case"textarea":$(o),ie(o);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(o.onclick=ei)}o=s,t.updateQueue=o,null!==o&&(t.flags|=4)}else{c=9===s.nodeType?s:s.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=oe(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=c.createElement(r,{is:o.is}):(e=c.createElement(r),"select"===r&&(c=e,o.multiple?c.multiple=!0:o.size&&(c.size=o.size))):e=c.createElementNS(e,r),e[di]=t,e[pi]=o,Ta(e,t,!1,!1),t.stateNode=e;e:{switch(c=me(r,o),r){case"dialog":Br("cancel",e),Br("close",e),s=o;break;case"iframe":case"object":case"embed":Br("load",e),s=o;break;case"video":case"audio":for(s=0;s<Ur.length;s++)Br(Ur[s],e);s=o;break;case"source":Br("error",e),s=o;break;case"img":case"image":case"link":Br("error",e),Br("load",e),s=o;break;case"details":Br("toggle",e),s=o;break;case"input":G(e,o),s=K(e,o),Br("invalid",e);break;case"option":default:s=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},s=L({},o,{value:void 0}),Br("invalid",e);break;case"textarea":ne(e,o),s=te(e,o),Br("invalid",e)}for(a in ye(r,s),u=s)if(u.hasOwnProperty(a)){var l=u[a];"style"===a?pe(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&ue(e,l):"children"===a?"string"==typeof l?("textarea"!==r||""!==l)&&le(e,l):"number"==typeof l&&le(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(i.hasOwnProperty(a)?null!=l&&"onScroll"===a&&Br("scroll",e):null!=l&&y(e,a,l,c))}switch(r){case"input":$(e),J(e,o,!1);break;case"textarea":$(e),ie(e);break;case"option":null!=o.value&&e.setAttribute("value",""+H(o.value));break;case"select":e.multiple=!!o.multiple,null!=(a=o.value)?ee(e,!!o.multiple,a,!1):null!=o.defaultValue&&ee(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof s.onClick&&(e.onclick=ei)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ga(t),null;case 6:if(e&&null!=t.stateNode)Ua(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=is(rs.current),is(ts.current),ho(t)){if(o=t.stateNode,r=t.memoizedProps,o[di]=t,(a=o.nodeValue!==r)&&null!==(e=ro))switch(e.tag){case 3:Zr(o.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Zr(o.nodeValue,r,!!(1&e.mode))}a&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[di]=t,t.stateNode=o}return Ga(t),null;case 13:if(Ii(us),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(oo&&null!==io&&1&t.mode&&!(128&t.flags))po(),go(),t.flags|=98560,a=!1;else if(a=ho(t),null!==o&&null!==o.dehydrated){if(null===e){if(!a)throw Error(n(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(n(317));a[di]=t}else go(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ga(t),a=!1}else null!==so&&(cu(so),so=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((o=null!==o)!=(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,!!(1&t.mode)&&(null===e||1&us.current?0===Uc&&(Uc=3):mu())),null!==t.updateQueue&&(t.flags|=4),Ga(t),null);case 4:return ss(),Ma(e,t),null===e&&qr(t.stateNode.containerInfo),Ga(t),null;case 10:return Oo(t.type._context),Ga(t),null;case 19:if(Ii(us),null===(a=t.memoizedState))return Ga(t),null;if(o=!!(128&t.flags),null===(c=a.rendering))if(o)Ka(a,!1);else{if(0!==Uc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(c=ls(e))){for(t.flags|=128,Ka(a,!1),null!==(o=c.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(a=r).flags&=14680066,null===(c=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,e=c.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return xi(us,1&us.current|2),t.child}e=e.sibling}null!==a.tail&&Ye()>$c&&(t.flags|=128,o=!0,Ka(a,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=ls(c))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Ka(a,!0),null===a.tail&&"hidden"===a.tailMode&&!c.alternate&&!oo)return Ga(t),null}else 2*Ye()-a.renderingStartTime>$c&&1073741824!==r&&(t.flags|=128,o=!0,Ka(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(null!==(r=a.last)?r.sibling=c:t.child=c,a.last=c)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ye(),t.sibling=null,r=us.current,xi(us,o?1&r|2:1&r),t):(Ga(t),null);case 22:case 23:return du(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&1&t.mode?!!(1073741824&Mc)&&(Ga(t),6&t.subtreeFlags&&(t.flags|=8192)):Ga(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Qa(e,t){switch(no(t),t.tag){case 1:return Ti(t.type)&&Mi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ss(),Ii(ki),Ii(Pi),hs(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return cs(t),null;case 13:if(Ii(us),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));go()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ii(us),null;case 4:return ss(),null;case 10:return Oo(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Ta=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ma=function(){},La=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,is(ts.current);var s,a=null;switch(n){case"input":o=K(e,o),r=K(e,r),a=[];break;case"select":o=L({},o,{value:void 0}),r=L({},r,{value:void 0}),a=[];break;case"textarea":o=te(e,o),r=te(e,r),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=ei)}for(l in ye(n,r),n=null,o)if(!r.hasOwnProperty(l)&&o.hasOwnProperty(l)&&null!=o[l])if("style"===l){var c=o[l];for(s in c)c.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(i.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var u=r[l];if(c=null!=o?o[l]:void 0,r.hasOwnProperty(l)&&u!==c&&(null!=u||null!=c))if("style"===l)if(c){for(s in c)!c.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&c[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(a||(a=[]),a.push(l,n)),n=u;else"dangerouslySetInnerHTML"===l?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(a=a||[]).push(l,u)):"children"===l?"string"!=typeof u&&"number"!=typeof u||(a=a||[]).push(l,""+u):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(i.hasOwnProperty(l)?(null!=u&&"onScroll"===l&&Br("scroll",e),a||c===u||(a=[])):(a=a||[]).push(l,u))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},Ua=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ja=!1,Xa=!1,Za="function"==typeof WeakSet?WeakSet:Set,ec=null;function tc(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Iu(e,t,n)}else n.current=null}function nc(e,t,n){try{n()}catch(n){Iu(e,t,n)}}var rc=!1;function ic(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&nc(t,n,o)}i=i.next}while(i!==r)}}function oc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function sc(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ac(e){var t=e.alternate;null!==t&&(e.alternate=null,ac(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[di],delete t[pi],delete t[yi],delete t[mi],delete t[vi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cc(e){return 5===e.tag||3===e.tag||4===e.tag}function uc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||cc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function lc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=ei));else if(4!==r&&null!==(e=e.child))for(lc(e,t,n),e=e.sibling;null!==e;)lc(e,t,n),e=e.sibling}function fc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(fc(e,t,n),e=e.sibling;null!==e;)fc(e,t,n),e=e.sibling}var hc=null,dc=!1;function pc(e,t,n){for(n=n.child;null!==n;)gc(e,t,n),n=n.sibling}function gc(e,t,n){if(rt&&"function"==typeof rt.onCommitFiberUnmount)try{rt.onCommitFiberUnmount(nt,n)}catch(e){}switch(n.tag){case 5:Xa||tc(n,t);case 6:var r=hc,i=dc;hc=null,pc(e,t,n),dc=i,null!==(hc=r)&&(dc?(e=hc,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hc.removeChild(n.stateNode));break;case 18:null!==hc&&(dc?(e=hc,n=n.stateNode,8===e.nodeType?ui(e.parentNode,n):1===e.nodeType&&ui(e,n),qt(e)):ui(hc,n.stateNode));break;case 4:r=hc,i=dc,hc=n.stateNode.containerInfo,dc=!0,pc(e,t,n),hc=r,dc=i;break;case 0:case 11:case 14:case 15:if(!Xa&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(!!(2&o)||!!(4&o))&&nc(n,t,s),i=i.next}while(i!==r)}pc(e,t,n);break;case 1:if(!Xa&&(tc(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Iu(n,t,e)}pc(e,t,n);break;case 21:pc(e,t,n);break;case 22:1&n.mode?(Xa=(r=Xa)||null!==n.memoizedState,pc(e,t,n),Xa=r):pc(e,t,n);break;default:pc(e,t,n)}}function yc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Za),t.forEach((function(t){var r=ku.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function mc(e,t){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i];try{var s=e,a=t,c=a;e:for(;null!==c;){switch(c.tag){case 5:hc=c.stateNode,dc=!1;break e;case 3:case 4:hc=c.stateNode.containerInfo,dc=!0;break e}c=c.return}if(null===hc)throw Error(n(160));gc(s,a,o),hc=null,dc=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(e){Iu(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vc(t,e),t=t.sibling}function vc(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mc(t,e),_c(e),4&i){try{ic(3,e,e.return),oc(3,e)}catch(t){Iu(e,e.return,t)}try{ic(5,e,e.return)}catch(t){Iu(e,e.return,t)}}break;case 1:mc(t,e),_c(e),512&i&&null!==r&&tc(r,r.return);break;case 5:if(mc(t,e),_c(e),512&i&&null!==r&&tc(r,r.return),32&e.flags){var o=e.stateNode;try{le(o,"")}catch(t){Iu(e,e.return,t)}}if(4&i&&null!=(o=e.stateNode)){var s=e.memoizedProps,a=null!==r?r.memoizedProps:s,c=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===c&&"radio"===s.type&&null!=s.name&&Y(o,s),me(c,a);var l=me(c,s);for(a=0;a<u.length;a+=2){var f=u[a],h=u[a+1];"style"===f?pe(o,h):"dangerouslySetInnerHTML"===f?ue(o,h):"children"===f?le(o,h):y(o,f,h,l)}switch(c){case"input":Q(o,s);break;case"textarea":re(o,s);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;null!=p?ee(o,!!s.multiple,p,!1):d!==!!s.multiple&&(null!=s.defaultValue?ee(o,!!s.multiple,s.defaultValue,!0):ee(o,!!s.multiple,s.multiple?[]:"",!1))}o[pi]=s}catch(t){Iu(e,e.return,t)}}break;case 6:if(mc(t,e),_c(e),4&i){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(t){Iu(e,e.return,t)}}break;case 3:if(mc(t,e),_c(e),4&i&&null!==r&&r.memoizedState.isDehydrated)try{qt(t.containerInfo)}catch(t){Iu(e,e.return,t)}break;case 4:default:mc(t,e),_c(e);break;case 13:mc(t,e),_c(e),8192&(o=e.child).flags&&(s=null!==o.memoizedState,o.stateNode.isHidden=s,!s||null!==o.alternate&&null!==o.alternate.memoizedState||(qc=Ye())),4&i&&yc(e);break;case 22:if(f=null!==r&&null!==r.memoizedState,1&e.mode?(Xa=(l=Xa)||f,mc(t,e),Xa=l):mc(t,e),_c(e),8192&i){if(l=null!==e.memoizedState,(e.stateNode.isHidden=l)&&!f&&1&e.mode)for(ec=e,f=e.child;null!==f;){for(h=ec=f;null!==ec;){switch(p=(d=ec).child,d.tag){case 0:case 11:case 14:case 15:ic(4,d,d.return);break;case 1:tc(d,d.return);var g=d.stateNode;if("function"==typeof g.componentWillUnmount){i=d,r=d.return;try{t=i,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){Iu(i,r,e)}}break;case 5:tc(d,d.return);break;case 22:if(null!==d.memoizedState){Sc(h);continue}}null!==p?(p.return=d,ec=p):Sc(h)}f=f.sibling}e:for(f=null,h=e;;){if(5===h.tag){if(null===f){f=h;try{o=h.stateNode,l?"function"==typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none":(c=h.stateNode,a=null!=(u=h.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,c.style.display=de("display",a))}catch(t){Iu(e,e.return,t)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=l?"":h.memoizedProps}catch(t){Iu(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:mc(t,e),_c(e),4&i&&yc(e);case 21:}}function _c(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(cc(r)){var i=r;break e}r=r.return}throw Error(n(160))}switch(i.tag){case 5:var o=i.stateNode;32&i.flags&&(le(o,""),i.flags&=-33),fc(e,uc(e),o);break;case 3:case 4:var s=i.stateNode.containerInfo;lc(e,uc(e),s);break;default:throw Error(n(161))}}catch(t){Iu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bc(e,t,n){ec=e,wc(e)}function wc(e,t,n){for(var r=!!(1&e.mode);null!==ec;){var i=ec,o=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||Ja;if(!s){var a=i.alternate,c=null!==a&&null!==a.memoizedState||Xa;a=Ja;var u=Xa;if(Ja=s,(Xa=c)&&!u)for(ec=i;null!==ec;)c=(s=ec).child,22===s.tag&&null!==s.memoizedState?Oc(i):null!==c?(c.return=s,ec=c):Oc(i);for(;null!==o;)ec=o,wc(o),o=o.sibling;ec=i,Ja=a,Xa=u}Ec(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,ec=o):Ec(e)}}function Ec(e){for(;null!==ec;){var t=ec;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Xa||oc(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Xa)if(null===r)i.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:vo(t.type,r.memoizedProps);i.componentDidUpdate(o,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Bo(t,s,i);break;case 3:var a=t.updateQueue;if(null!==a){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Bo(t,a,r)}break;case 5:var c=t.stateNode;if(null===r&&4&t.flags){r=c;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var l=t.alternate;if(null!==l){var f=l.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&qt(h)}}}break;default:throw Error(n(163))}Xa||512&t.flags&&sc(t)}catch(e){Iu(t,t.return,e)}}if(t===e){ec=null;break}if(null!==(r=t.sibling)){r.return=t.return,ec=r;break}ec=t.return}}function Sc(e){for(;null!==ec;){var t=ec;if(t===e){ec=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ec=n;break}ec=t.return}}function Oc(e){for(;null!==ec;){var t=ec;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{oc(4,t)}catch(e){Iu(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Iu(t,i,e)}}var o=t.return;try{sc(t)}catch(e){Iu(t,o,e)}break;case 5:var s=t.return;try{sc(t)}catch(e){Iu(t,s,e)}}}catch(e){Iu(t,t.return,e)}if(t===e){ec=null;break}var a=t.sibling;if(null!==a){a.return=t.return,ec=a;break}ec=t.return}}var Rc,Ic=Math.ceil,xc=v.ReactCurrentDispatcher,Cc=v.ReactCurrentOwner,Pc=v.ReactCurrentBatchConfig,kc=0,Nc=null,Ac=null,Tc=0,Mc=0,Lc=Ri(0),Uc=0,jc=null,Dc=0,zc=0,Bc=0,Fc=null,Hc=null,qc=0,$c=1/0,Vc=null,Wc=!1,Kc=null,Gc=null,Yc=!1,Qc=null,Jc=0,Xc=0,Zc=null,eu=-1,tu=0;function nu(){return 6&kc?Ye():-1!==eu?eu:eu=Ye()}function ru(e){return 1&e.mode?2&kc&&0!==Tc?Tc&-Tc:null!==mo.transition?(0===tu&&(tu=dt()),tu):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Jt(e.type):1}function iu(e,t,r,i){if(50<Xc)throw Xc=0,Zc=null,Error(n(185));gt(e,r,i),2&kc&&e===Nc||(e===Nc&&(!(2&kc)&&(zc|=r),4===Uc&&uu(e,Tc)),ou(e,i),1===r&&0===kc&&!(1&t.mode)&&($c=Ye()+500,Bi&&qi()))}function ou(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-it(o),a=1<<s,c=i[s];-1===c?!!(a&n)&&!(a&r)||(i[s]=ft(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var r=lt(e,e===Nc?Tc:0);if(0===r)null!==n&&We(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&We(n),1===t)0===e.tag?function(e){Bi=!0,Hi(e)}(lu.bind(null,e)):Hi(lu.bind(null,e)),ai((function(){!(6&kc)&&qi()})),n=null;else{switch(bt(r)){case 1:n=Je;break;case 4:n=Xe;break;case 16:default:n=Ze;break;case 536870912:n=tt}n=Nu(n,su.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function su(e,t){if(eu=-1,tu=0,6&kc)throw Error(n(327));var r=e.callbackNode;if(Ou()&&e.callbackNode!==r)return null;var i=lt(e,e===Nc?Tc:0);if(0===i)return null;if(30&i||i&e.expiredLanes||t)t=vu(e,i);else{t=i;var o=kc;kc|=2;var s=yu();for(Nc===e&&Tc===t||(Vc=null,$c=Ye()+500,pu(e,t));;)try{bu();break}catch(t){gu(e,t)}So(),xc.current=s,kc=o,null!==Ac?t=0:(Nc=null,Tc=0,t=Uc)}if(0!==t){if(2===t&&0!==(o=ht(e))&&(i=o,t=au(e,o)),1===t)throw r=jc,pu(e,0),uu(e,i),ou(e,Ye()),r;if(6===t)uu(e,i);else{if(o=e.current.alternate,!(30&i||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!cr(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(2===(t=vu(e,i))&&0!==(s=ht(e))&&(i=s,t=au(e,s)),1!==t)))throw r=jc,pu(e,0),uu(e,i),ou(e,Ye()),r;switch(e.finishedWork=o,e.finishedLanes=i,t){case 0:case 1:throw Error(n(345));case 2:case 5:Su(e,Hc,Vc);break;case 3:if(uu(e,i),(130023424&i)===i&&10<(t=qc+500-Ye())){if(0!==lt(e,0))break;if(((o=e.suspendedLanes)&i)!==i){nu(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ii(Su.bind(null,e,Hc,Vc),t);break}Su(e,Hc,Vc);break;case 4:if(uu(e,i),(4194240&i)===i)break;for(t=e.eventTimes,o=-1;0<i;){var a=31-it(i);s=1<<a,(a=t[a])>o&&(o=a),i&=~s}if(i=o,10<(i=(120>(i=Ye()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Ic(i/1960))-i)){e.timeoutHandle=ii(Su.bind(null,e,Hc,Vc),i);break}Su(e,Hc,Vc);break;default:throw Error(n(329))}}}return ou(e,Ye()),e.callbackNode===r?su.bind(null,e):null}function au(e,t){var n=Fc;return e.current.memoizedState.isDehydrated&&(pu(e,t).flags|=256),2!==(e=vu(e,t))&&(t=Hc,Hc=n,null!==t&&cu(t)),e}function cu(e){null===Hc?Hc=e:Hc.push.apply(Hc,e)}function uu(e,t){for(t&=~Bc,t&=~zc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function lu(e){if(6&kc)throw Error(n(327));Ou();var t=lt(e,0);if(!(1&t))return ou(e,Ye()),null;var r=vu(e,t);if(0!==e.tag&&2===r){var i=ht(e);0!==i&&(t=i,r=au(e,i))}if(1===r)throw r=jc,pu(e,0),uu(e,t),ou(e,Ye()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Su(e,Hc,Vc),ou(e,Ye()),null}function fu(e,t){var n=kc;kc|=1;try{return e(t)}finally{0===(kc=n)&&($c=Ye()+500,Bi&&qi())}}function hu(e){null!==Qc&&0===Qc.tag&&!(6&kc)&&Ou();var t=kc;kc|=1;var n=Pc.transition,r=vt;try{if(Pc.transition=null,vt=1,e)return e()}finally{vt=r,Pc.transition=n,!(6&(kc=t))&&qi()}}function du(){Mc=Lc.current,Ii(Lc)}function pu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oi(n)),null!==Ac)for(n=Ac.return;null!==n;){var r=n;switch(no(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Mi();break;case 3:ss(),Ii(ki),Ii(Pi),hs();break;case 5:cs(r);break;case 4:ss();break;case 13:case 19:Ii(us);break;case 10:Oo(r.type._context);break;case 22:case 23:du()}n=n.return}if(Nc=e,Ac=e=Lu(e.current,null),Tc=Mc=t,Uc=0,jc=null,Bc=zc=Dc=0,Hc=Fc=null,null!==Co){for(t=0;t<Co.length;t++)if(null!==(r=(n=Co[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var s=o.next;o.next=i,r.next=s}n.pending=r}Co=null}return e}function gu(e,t){for(;;){var r=Ac;try{if(So(),ds.current=aa,_s){for(var i=ys.memoizedState;null!==i;){var o=i.queue;null!==o&&(o.pending=null),i=i.next}_s=!1}if(gs=0,vs=ms=ys=null,bs=!1,ws=0,Cc.current=null,null===r||null===r.return){Uc=1,jc=t,Ac=null;break}e:{var s=e,a=r.return,c=r,u=t;if(t=Tc,c.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var l=u,f=c,h=f.tag;if(!(1&f.mode||0!==h&&11!==h&&15!==h)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=va(a);if(null!==p){p.flags&=-257,_a(p,a,c,0,t),1&p.mode&&ma(s,l,t),u=l;var g=(t=p).updateQueue;if(null===g){var y=new Set;y.add(u),t.updateQueue=y}else g.add(u);break e}if(!(1&t)){ma(s,l,t),mu();break e}u=Error(n(426))}else if(oo&&1&c.mode){var m=va(a);if(null!==m){!(65536&m.flags)&&(m.flags|=256),_a(m,a,c,0,t),yo(fa(u,c));break e}}s=u=fa(u,c),4!==Uc&&(Uc=2),null===Fc?Fc=[s]:Fc.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Do(s,ga(0,u,t));break e;case 1:c=u;var v=s.type,_=s.stateNode;if(!(128&s.flags||"function"!=typeof v.getDerivedStateFromError&&(null===_||"function"!=typeof _.componentDidCatch||null!==Gc&&Gc.has(_)))){s.flags|=65536,t&=-t,s.lanes|=t,Do(s,ya(s,c,t));break e}}s=s.return}while(null!==s)}Eu(r)}catch(e){t=e,Ac===r&&null!==r&&(Ac=r=r.return);continue}break}}function yu(){var e=xc.current;return xc.current=aa,null===e?aa:e}function mu(){0!==Uc&&3!==Uc&&2!==Uc||(Uc=4),null===Nc||!(268435455&Dc)&&!(268435455&zc)||uu(Nc,Tc)}function vu(e,t){var r=kc;kc|=2;var i=yu();for(Nc===e&&Tc===t||(Vc=null,pu(e,t));;)try{_u();break}catch(t){gu(e,t)}if(So(),kc=r,xc.current=i,null!==Ac)throw Error(n(261));return Nc=null,Tc=0,Uc}function _u(){for(;null!==Ac;)wu(Ac)}function bu(){for(;null!==Ac&&!Ke();)wu(Ac)}function wu(e){var t=Rc(e.alternate,e,Mc);e.memoizedProps=e.pendingProps,null===t?Eu(e):Ac=t,Cc.current=null}function Eu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Qa(n,t)))return n.flags&=32767,void(Ac=n);if(null===e)return Uc=6,void(Ac=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ya(n,t,Mc)))return void(Ac=n);if(null!==(t=t.sibling))return void(Ac=t);Ac=t=e}while(null!==t);0===Uc&&(Uc=5)}function Su(e,t,r){var i=vt,o=Pc.transition;try{Pc.transition=null,vt=1,function(e,t,r,i){do{Ou()}while(null!==Qc);if(6&kc)throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-it(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,s),e===Nc&&(Ac=Nc=null,Tc=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Yc||(Yc=!0,Nu(Ze,(function(){return Ou(),null}))),s=!!(15990&r.flags),15990&r.subtreeFlags||s){s=Pc.transition,Pc.transition=null;var a=vt;vt=1;var c=kc;kc|=4,Cc.current=null,function(e,t){if(ti=Vt,pr(e=dr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(i&&0!==i.rangeCount){r=i.anchorNode;var o=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{r.nodeType,s.nodeType}catch(e){r=null;break e}var a=0,c=-1,u=-1,l=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==r||0!==o&&3!==h.nodeType||(c=a+o),h!==s||0!==i&&3!==h.nodeType||(u=a+i),3===h.nodeType&&(a+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===r&&++l===o&&(c=a),d===s&&++f===i&&(u=a),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}r=-1===c||-1===u?null:{start:c,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(ni={focusedElem:e,selectionRange:r},Vt=!1,ec=t;null!==ec;)if(e=(t=ec).child,1028&t.subtreeFlags&&null!==e)e.return=t,ec=e;else for(;null!==ec;){t=ec;try{var g=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var y=g.memoizedProps,m=g.memoizedState,v=t.stateNode,_=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:vo(t.type,y),m);v.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(n(163))}}catch(e){Iu(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,ec=e;break}ec=t.return}g=rc,rc=!1}(e,r),vc(r,e),gr(ni),Vt=!!ti,ni=ti=null,e.current=r,bc(r),Ge(),kc=c,vt=a,Pc.transition=s}else e.current=r;if(Yc&&(Yc=!1,Qc=e,Jc=o),0===(s=e.pendingLanes)&&(Gc=null),function(e){if(rt&&"function"==typeof rt.onCommitFiberRoot)try{rt.onCommitFiberRoot(nt,e,void 0,!(128&~e.current.flags))}catch(e){}}(r.stateNode),ou(e,Ye()),null!==t)for(i=e.onRecoverableError,r=0;r<t.length;r++)i((o=t[r]).value,{componentStack:o.stack,digest:o.digest});if(Wc)throw Wc=!1,e=Kc,Kc=null,e;!!(1&Jc)&&0!==e.tag&&Ou(),1&(s=e.pendingLanes)?e===Zc?Xc++:(Xc=0,Zc=e):Xc=0,qi()}(e,t,r,i)}finally{Pc.transition=o,vt=i}return null}function Ou(){if(null!==Qc){var e=bt(Jc),t=Pc.transition,r=vt;try{if(Pc.transition=null,vt=16>e?16:e,null===Qc)var i=!1;else{if(e=Qc,Qc=null,Jc=0,6&kc)throw Error(n(331));var o=kc;for(kc|=4,ec=e.current;null!==ec;){var s=ec,a=s.child;if(16&ec.flags){var c=s.deletions;if(null!==c){for(var u=0;u<c.length;u++){var l=c[u];for(ec=l;null!==ec;){var f=ec;switch(f.tag){case 0:case 11:case 15:ic(8,f,s)}var h=f.child;if(null!==h)h.return=f,ec=h;else for(;null!==ec;){var d=(f=ec).sibling,p=f.return;if(ac(f),f===l){ec=null;break}if(null!==d){d.return=p,ec=d;break}ec=p}}}var g=s.alternate;if(null!==g){var y=g.child;if(null!==y){g.child=null;do{var m=y.sibling;y.sibling=null,y=m}while(null!==y)}}ec=s}}if(2064&s.subtreeFlags&&null!==a)a.return=s,ec=a;else e:for(;null!==ec;){if(2048&(s=ec).flags)switch(s.tag){case 0:case 11:case 15:ic(9,s,s.return)}var v=s.sibling;if(null!==v){v.return=s.return,ec=v;break e}ec=s.return}}var _=e.current;for(ec=_;null!==ec;){var b=(a=ec).child;if(2064&a.subtreeFlags&&null!==b)b.return=a,ec=b;else e:for(a=_;null!==ec;){if(2048&(c=ec).flags)try{switch(c.tag){case 0:case 11:case 15:oc(9,c)}}catch(e){Iu(c,c.return,e)}if(c===a){ec=null;break e}var w=c.sibling;if(null!==w){w.return=c.return,ec=w;break e}ec=c.return}}if(kc=o,qi(),rt&&"function"==typeof rt.onPostCommitFiberRoot)try{rt.onPostCommitFiberRoot(nt,e)}catch(e){}i=!0}return i}finally{vt=r,Pc.transition=t}}return!1}function Ru(e,t,n){e=Uo(e,t=ga(0,t=fa(n,t),1),1),t=nu(),null!==e&&(gt(e,1,t),ou(e,t))}function Iu(e,t,n){if(3===e.tag)Ru(e,e,n);else for(;null!==t;){if(3===t.tag){Ru(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Gc||!Gc.has(r))){t=Uo(t,e=ya(t,e=fa(n,e),1),1),e=nu(),null!==t&&(gt(t,1,e),ou(t,e));break}}t=t.return}}function xu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=nu(),e.pingedLanes|=e.suspendedLanes&n,Nc===e&&(Tc&n)===n&&(4===Uc||3===Uc&&(130023424&Tc)===Tc&&500>Ye()-qc?pu(e,0):Bc|=n),ou(e,t)}function Cu(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var n=nu();null!==(e=No(e,t))&&(gt(e,t,n),ou(e,n))}function Pu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cu(e,n)}function ku(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(n(314))}null!==i&&i.delete(t),Cu(e,r)}function Nu(e,t){return Ve(e,t)}function Au(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tu(e,t,n,r){return new Au(e,t,n,r)}function Mu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Lu(e,t){var n=e.alternate;return null===n?((n=Tu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Uu(e,t,r,i,o,s){var a=2;if(i=e,"function"==typeof e)Mu(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case w:return ju(r.children,o,s,t);case E:a=8,o|=8;break;case S:return(e=Tu(12,r,t,2|o)).elementType=S,e.lanes=s,e;case x:return(e=Tu(13,r,t,o)).elementType=x,e.lanes=s,e;case C:return(e=Tu(19,r,t,o)).elementType=C,e.lanes=s,e;case N:return Du(r,o,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:a=10;break e;case R:a=9;break e;case I:a=11;break e;case P:a=14;break e;case k:a=16,i=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Tu(a,r,t,o)).elementType=e,t.type=i,t.lanes=s,t}function ju(e,t,n,r){return(e=Tu(7,e,r,t)).lanes=n,e}function Du(e,t,n,r){return(e=Tu(22,e,r,t)).elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function zu(e,t,n){return(e=Tu(6,e,null,t)).lanes=n,e}function Bu(e,t,n){return(t=Tu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pt(0),this.expirationTimes=pt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Hu(e,t,n,r,i,o,s,a,c){return e=new Fu(e,t,n,a,c),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Tu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},To(o),e}function qu(e){if(!e)return Ci;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ti(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Ti(r))return Ui(e,r,t)}return t}function $u(e,t,n,r,i,o,s,a,c){return(e=Hu(n,r,!0,e,0,o,0,a,c)).context=qu(null),n=e.current,(o=Lo(r=nu(),i=ru(n))).callback=null!=t?t:null,Uo(n,o,i),e.current.lanes=i,gt(e,i,r),ou(e,r),e}function Vu(e,t,n,r){var i=t.current,o=nu(),s=ru(i);return n=qu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Lo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Uo(i,t,s))&&(iu(e,i,s,o),jo(e,i,s)),s}function Wu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Ku(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gu(e,t){Ku(e,t),(e=e.alternate)&&Ku(e,t)}Rc=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||ki.current)wa=!0;else{if(!(e.lanes&r||128&t.flags))return wa=!1,function(e,t,n){switch(t.tag){case 3:Na(t),go();break;case 5:as(t);break;case 1:Ti(t.type)&&ji(t);break;case 4:os(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;xi(_o,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(xi(us,1&us.current),t.flags|=128,null):n&t.child.childLanes?za(e,t,n):(xi(us,1&us.current),null!==(e=Wa(e,t,n))?e.sibling:null);xi(us,1&us.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return $a(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),xi(us,us.current),r)break;return null;case 22:case 23:return t.lanes=0,Ia(e,t,n)}return Wa(e,t,n)}(e,t,r);wa=!!(131072&e.flags)}else wa=!1,oo&&1048576&t.flags&&eo(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Va(e,t),e=t.pendingProps;var o=Ai(t,Pi.current);Io(t,r),o=Rs(null,t,i,e,o,r);var s=Is();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ti(i)?(s=!0,ji(t)):s=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,To(t),o.updater=qo,t.stateNode=o,o._reactInternals=t,Ko(t,i,e,r),t=ka(null,t,i,!0,s,r)):(t.tag=0,oo&&s&&to(t),Ea(null,t,o,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Va(e,t),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Mu(e)?1:0;if(null!=e){if((e=e.$$typeof)===I)return 11;if(e===P)return 14}return 2}(i),e=vo(i,e),o){case 0:t=Ca(null,t,i,e,r);break e;case 1:t=Pa(null,t,i,e,r);break e;case 11:t=Sa(null,t,i,e,r);break e;case 14:t=Oa(null,t,i,vo(i.type,e),r);break e}throw Error(n(306,i,""))}return t;case 0:return i=t.type,o=t.pendingProps,Ca(e,t,i,o=t.elementType===i?o:vo(i,o),r);case 1:return i=t.type,o=t.pendingProps,Pa(e,t,i,o=t.elementType===i?o:vo(i,o),r);case 3:e:{if(Na(t),null===e)throw Error(n(387));i=t.pendingProps,o=(s=t.memoizedState).element,Mo(e,t),zo(t,i,null,r);var a=t.memoizedState;if(i=a.element,s.isDehydrated){if(s={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Aa(e,t,i,r,o=fa(Error(n(423)),t));break e}if(i!==o){t=Aa(e,t,i,r,o=fa(Error(n(424)),t));break e}for(io=li(t.stateNode.containerInfo.firstChild),ro=t,oo=!0,so=null,r=Zo(t,null,i,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(go(),i===o){t=Wa(e,t,r);break e}Ea(e,t,i,r)}t=t.child}return t;case 5:return as(t),null===e&&lo(t),i=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,a=o.children,ri(i,o)?a=null:null!==s&&ri(i,s)&&(t.flags|=32),xa(e,t),Ea(e,t,a,r),t.child;case 6:return null===e&&lo(t),null;case 13:return za(e,t,r);case 4:return os(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=Xo(t,null,i,r):Ea(e,t,i,r),t.child;case 11:return i=t.type,o=t.pendingProps,Sa(e,t,i,o=t.elementType===i?o:vo(i,o),r);case 7:return Ea(e,t,t.pendingProps,r),t.child;case 8:case 12:return Ea(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,s=t.memoizedProps,a=o.value,xi(_o,i._currentValue),i._currentValue=a,null!==s)if(cr(s.value,a)){if(s.children===o.children&&!ki.current){t=Wa(e,t,r);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.dependencies;if(null!==c){a=s.child;for(var u=c.firstContext;null!==u;){if(u.context===i){if(1===s.tag){(u=Lo(-1,r&-r)).tag=2;var l=s.updateQueue;if(null!==l){var f=(l=l.shared).pending;null===f?u.next=u:(u.next=f.next,f.next=u),l.pending=u}}s.lanes|=r,null!==(u=s.alternate)&&(u.lanes|=r),Ro(s.return,r,t),c.lanes|=r;break}u=u.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(n(341));a.lanes|=r,null!==(c=a.alternate)&&(c.lanes|=r),Ro(a,r,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}Ea(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps.children,Io(t,r),i=i(o=xo(o)),t.flags|=1,Ea(e,t,i,r),t.child;case 14:return o=vo(i=t.type,t.pendingProps),Oa(e,t,i,o=vo(i.type,o),r);case 15:return Ra(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:vo(i,o),Va(e,t),t.tag=1,Ti(i)?(e=!0,ji(t)):e=!1,Io(t,r),Vo(t,i,o),Ko(t,i,o,r),ka(null,t,i,!0,e,r);case 19:return $a(e,t,r);case 22:return Ia(e,t,r)}throw Error(n(156,t.tag))};var Yu="function"==typeof reportError?reportError:function(e){console.error(e)};function Qu(e){this._internalRoot=e}function Ju(e){this._internalRoot=e}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function el(){}function tl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if("function"==typeof i){var a=i;i=function(){var e=Wu(s);a.call(e)}}Vu(t,s,e,i)}else s=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Wu(s);o.call(e)}}var s=$u(t,r,e,0,null,!1,0,"",el);return e._reactRootContainer=s,e[gi]=s.current,qr(8===e.nodeType?e.parentNode:e),hu(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var a=r;r=function(){var e=Wu(c);a.call(e)}}var c=Hu(e,0,!1,null,0,!1,0,"",el);return e._reactRootContainer=c,e[gi]=c.current,qr(8===e.nodeType?e.parentNode:e),hu((function(){Vu(t,c,n,r)})),c}(n,t,e,i,r);return Wu(s)}Ju.prototype.render=Qu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Vu(e,t,null,null)},Ju.prototype.unmount=Qu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hu((function(){Vu(null,e,null,null)})),t[gi]=null}},Ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=Rt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mt.length&&0!==t&&t<Mt[n].priority;n++);Mt.splice(n,0,e),0===n&&Dt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ut(t.pendingLanes);0!==n&&(mt(t,1|n),ou(t,Ye()),!(6&kc)&&($c=Ye()+500,qi()))}break;case 13:hu((function(){var t=No(e,1);if(null!==t){var n=nu();iu(t,e,1,n)}})),Gu(e,1)}},St=function(e){if(13===e.tag){var t=No(e,134217728);null!==t&&iu(t,e,134217728,nu()),Gu(e,134217728)}},Ot=function(e){if(13===e.tag){var t=ru(e),n=No(e,t);null!==n&&iu(n,e,t,nu()),Gu(e,t)}},Rt=function(){return vt},It=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}},be=function(e,t,r){switch(t){case"input":if(Q(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var o=Ei(i);if(!o)throw Error(n(90));V(i),Q(i,o)}}}break;case"textarea":re(e,r);break;case"select":null!=(t=r.value)&&ee(e,!!r.multiple,t,!1)}},Ie=fu,xe=hu;var nl={usingClientEntryPoint:!1,Events:[bi,wi,Ei,Oe,Re,fu]},rl={findFiberByHostInstance:_i,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},il={bundleType:rl.bundleType,version:rl.version,rendererPackageName:rl.rendererPackageName,rendererConfig:rl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:v.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:rl.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ol=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ol.isDisabled&&ol.supportsFiber)try{nt=ol.inject(il),rt=ol}catch(ce){}}return _t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nl,_t.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xu(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:b,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},_t.createRoot=function(e,t){if(!Xu(e))throw Error(n(299));var r=!1,i="",o=Yu;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Hu(e,1,!1,null,0,r,0,i,o),e[gi]=t.current,qr(8===e.nodeType?e.parentNode:e),new Qu(t)},_t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return null===(e=qe(t))?null:e.stateNode},_t.flushSync=function(e){return hu(e)},_t.hydrate=function(e,t,r){if(!Zu(t))throw Error(n(200));return tl(null,e,t,!0,r)},_t.hydrateRoot=function(e,t,r){if(!Xu(e))throw Error(n(405));var i=null!=r&&r.hydratedSources||null,o=!1,s="",a=Yu;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(s=r.identifierPrefix),void 0!==r.onRecoverableError&&(a=r.onRecoverableError)),t=$u(t,null,e,1,null!=r?r:null,o,0,s,a),e[gi]=t.current,qr(e),i)for(e=0;e<i.length;e++)o=(o=(r=i[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Ju(t)},_t.render=function(e,t,r){if(!Zu(t))throw Error(n(200));return tl(null,e,t,!1,r)},_t.unmountComponentAtNode=function(e){if(!Zu(e))throw Error(n(40));return!!e._reactRootContainer&&(hu((function(){tl(null,null,e,!1,(function(){e._reactRootContainer=null,e[gi]=null}))})),!0)},_t.unstable_batchedUpdates=fu,_t.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Zu(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return tl(e,t,r,!1,i)},_t.version="18.2.0-next-9e3b772b8-20220608",_t}!function(e){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=St()}(vt);var Ot=vt.exports;mt=Ot.createRoot,Ot.hydrateRoot;const Rt=Je.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 12px 0 0 0;
  padding: 0 3rem 0 0;

  & > img {
    width: 48px;
    height: 48px;
    margin-right: 12px;
  }
`,It=n("ExtensionInstallModal"),xt=({onClose:e=()=>{}})=>(It("initializing"),g.exports.jsx(dt,Object.assign({onClose:e},{children:g.exports.jsx(g.exports.Fragment,{children:g.exports.jsxs(at,{children:[g.exports.jsx(ct,{children:"With Ledger Extension, you can:"}),g.exports.jsxs(Rt,{children:[g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='48' height='48' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='48' height='48' rx='24' fill='%23252333'/%3e%3cpath d='M16.56 32.4h16.8V19.2h-15V21h13.2v9.6h-15c-.12 0-.12 0-.12-.12V17.52c0-.12 0-.12.12-.12h14.88c-.048-1.056-.864-1.8-1.92-1.8H16.56c-1.104 0-1.92.816-1.92 1.92v12.96c0 1.104.816 1.92 1.92 1.92Zm10.488-6.48a1.28 1.28 0 0 0 1.272 1.272c.696 0 1.248-.6 1.248-1.272a1.24 1.24 0 0 0-1.248-1.248c-.72 0-1.272.552-1.272 1.248Z' fill='%23BBB0FF'/%3e%3c/svg%3e"}),"Connect your Ledger directly to any dApp on Ethereum and Polygon"]}),g.exports.jsxs(Rt,{children:[g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='48' height='48' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='48' height='48' rx='24' fill='%23252333'/%3e%3cpath d='M24 33.84c6.24-2.472 9.36-6.408 9.36-11.712v-5.04c-2.664-1.92-5.904-2.928-9.36-2.928-3.456 0-6.696 1.008-9.36 2.928v5.04c0 5.304 3.12 9.24 9.36 11.712Zm-7.44-11.712V18c2.232-1.392 4.632-2.04 7.44-2.04 2.808 0 5.208.648 7.44 2.04v4.128c0 4.512-2.232 7.512-7.44 9.744-5.208-2.232-7.44-5.232-7.44-9.744Zm3.36 1.176 3.36 3.384L28.944 21 27.6 19.656l-4.32 4.296-2.016-1.992-1.344 1.344Z' fill='%23BBB0FF'/%3e%3c/svg%3e"}),"Get warnings about risky transactions before signing them."]}),g.exports.jsx(lt,Object.assign({variant:"primary",onClick:()=>{window.open("https://apps.apple.com/app/ledger-extension-browse-web3/id1627727841?pt=516048&ct=ledger_button&mt=8","_blank")}},{children:"Install Ledger Extension"}))]})})})));var Ct,Pt,kt=Object.defineProperty,Nt=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,Mt=(e,t,n)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;(e=>{const t=class{constructor(e,n,r,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e<this.size;e++)s.push(!1);for(let e=0;e<this.size;e++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(r);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,r){const i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){const i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,n,i=1,s=40,c=-1,u=!0){if(!(t.MIN_VERSION<=i&&i<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let l,f;for(l=i;;l++){const r=8*t.getNumDataCodewords(l,n),i=a.getTotalBits(e,l);if(i<=r){f=i;break}if(l>=s)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])u&&f<=8*t.getNumDataCodewords(l,e)&&(n=e);let h=[];for(const t of e){r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(l),h);for(const e of t.getData())h.push(e)}o(h.length==f);const d=8*t.getNumDataCodewords(l,n);o(h.length<=d),r(0,Math.min(4,d-h.length),h),r(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<d;e^=253)r(e,8,h);let p=[];for(;8*p.length<h.length;)p.push(0);return h.forEach(((e,t)=>p[t>>>3]|=e<<7-(7&t))),new t(l,n,p,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);o(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,i(r,e));this.setFunctionModule(8,7,i(r,6)),this.setFunctionModule(8,8,i(r,7)),this.setFunctionModule(7,8,i(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,i(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,i(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,i(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const n=i(t,e),r=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(r,o,n),this.setFunctionModule(o,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(n)),o=e+r,s=t+n;0<=o&&o<this.size&&0<=s&&s<this.size&&this.setFunctionModule(o,s,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],s=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],a=Math.floor(t.getNumRawDataModules(n)/8),c=i-a%i,u=Math.floor(a/i);let l=[];const f=t.reedSolomonComputeDivisor(s);for(let n=0,r=0;n<i;n++){let i=e.slice(r,r+u-s+(n<c?0:1));r+=i.length;const o=t.reedSolomonComputeRemainder(i,f);n<c&&i.push(0),l.push(i.concat(o))}let h=[];for(let e=0;e<l[0].length;e++)l.forEach(((t,n)=>{(e!=u-s||n>=c)&&h.push(t[e])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let o=0;o<2;o++){const s=t-o,a=t+1&2?r:this.size-1-r;!this.isFunction[a][s]&&n<8*e.length&&(this.modules[a][s]=i(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[n][s]==r?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[n][s],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,o)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][n]==r?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[s][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,o)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*r)/r)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const i of e){const e=i^r.shift();r.push(0),n.forEach(((n,i)=>r[i]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function i(e,t){return!!(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const s=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const i=Math.min(e.length-n,3);r(parseInt(e.substr(n,i),10),3*i+1,t),n+=i}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let i=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(i,11,n)}return t<e.length&&r(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new s(s.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(Ct||(Ct={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})((Pt=Ct||(Ct={})).QrCode||(Pt.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Ct||(Ct={}));var Lt=Ct,Ut={L:Lt.QrCode.Ecc.LOW,M:Lt.QrCode.Ecc.MEDIUM,Q:Lt.QrCode.Ecc.QUARTILE,H:Lt.QrCode.Ecc.HIGH},jt=128,Dt="L",zt="#FFFFFF",Bt="#000000",Ft=!1;
/**
 * @license qrcode.react
 * Copyright (c) Paul O'Shannessy
 * SPDX-License-Identifier: ISC
 */!function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}}();const Ht=Je((function(e){const t=e,{value:n,size:r=jt,level:i=Dt,bgColor:o=zt,fgColor:s=Bt,includeMargin:a=Ft,imageSettings:c}=t,u=((e,t)=>{var n={};for(var r in e)At.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Nt)for(var r of Nt(e))t.indexOf(r)<0&&Tt.call(e,r)&&(n[r]=e[r]);return n})(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let l=Lt.QrCode.encodeText(n,Ut[i]).getModules();const f=a?4:0,h=l.length+2*f,d=function(e,t,n,r){if(null==r)return null;const i=n?4:0,o=e.length+2*i,s=Math.floor(.1*t),a=o/t,c=(r.width||s)*a,u=(r.height||s)*a,l=null==r.x?e.length/2-c/2:r.x*a,f=null==r.y?e.length/2-u/2:r.y*a;let h=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(f);h={x:e,y:t,w:Math.ceil(c+l-e),h:Math.ceil(u+f-t)}}return{x:l,y:f,h:u,w:c,excavation:h}}(l,r,a,c);let p=null;var g,y;null!=c&&null!=d&&(null!=d.excavation&&(g=l,y=d.excavation,l=g.slice().map(((e,t)=>t<y.y||t>=y.y+y.h?e:e.map(((e,t)=>(t<y.x||t>=y.x+y.w)&&e))))),p=b.createElement("image",{xlinkHref:c.src,height:d.h,width:d.w,x:d.x+f,y:d.y+f,preserveAspectRatio:"none"}));const m=function(e,t=0){const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return n.push(`M${i+t} ${r+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?n.push(`M${s+t},${r+t} h1v1H${s+t}z`):n.push(`M${i+t},${r+t} h${s+1-i}v1H${i+t}z`)}}))})),n.join("")}(l,f);return b.createElement("svg",((e,t)=>{for(var n in t||(t={}))At.call(t,n)&&Mt(e,n,t[n]);if(Nt)for(var n of Nt(t))Tt.call(t,n)&&Mt(e,n,t[n]);return e})({height:r,width:r,viewBox:`0 0 ${h} ${h}`},u),b.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),b.createElement("path",{fill:s,d:m,shapeRendering:"crispEdges"}),p)}))`
  box-sizing: border-box;
  flex-grow: 0;
  flex-shrink: 0;
  padding: 15px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.1rem;
  border-radius: 1rem;
  background-color: white;

  @media ${et} {
    width: 200px;
    height: 200px;
  }
`,qt=Je.div`
  margin: 1rem 0;
  border-top: none;
  padding-top: 0;
`,$t=n("UseLedgerLiveModal");let Vt=e=>{};const Wt=({isDesktop:e=!1,uri:t="",onClose:n=()=>{}})=>{$t("initializing",{isDesktop:e,uri:t});const[r,i]=m.exports.useState(t);Vt=i;const o=m.exports.useRef(),s=o.current;t!==s&&t!==r&&i(t),m.exports.useEffect((()=>{o.current=t}));const a=m.exports.useCallback((()=>($t("loading Ledger Live, ",r),window.location.href=`ledgerlive://wc?uri=${encodeURIComponent(r)}`,ht(!1),!1)),[r]),c=m.exports.useCallback((()=>(window.open("https://www.ledger.com/ledger-live"),!1)),[]);return g.exports.jsx(dt,Object.assign({onClose:n},{children:g.exports.jsxs(at,Object.assign({textAlign:"center"},{children:[g.exports.jsx(ct,{children:"Connect with Ledger Live"}),e&&""!==r&&g.exports.jsxs(g.exports.Fragment,{children:[g.exports.jsx(ut,{children:"Scan for Ledger Live mobile"}),g.exports.jsx(qt,{children:g.exports.jsx(Ht,{value:r,size:310})}),g.exports.jsx(ut,Object.assign({noMargin:!0},{children:"or"})),g.exports.jsx(lt,Object.assign({variant:"primary",onClick:a},{children:"Connect with Ledger Live desktop"}))]}),!e&&""!==r&&g.exports.jsx(lt,Object.assign({variant:"primary",onClick:a,extraMargin:!0},{children:"Connect with Ledger Live mobile"})),g.exports.jsxs(ut,{children:["Don't have Ledger Live for ",e?"desktop":"mobile","?"]}),g.exports.jsx(ut,Object.assign({noMargin:!0},{children:g.exports.jsx(ft,Object.assign({onClick:c},{children:"Install it"}))}))]}))}))},Kt=Je.div`
  margin: 1.4rem 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: start;
  font-size: 1rem;
  gap: 12px 20px;
`,Gt=Je.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  word-break: keep-all;

  & > img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
  }
`,Yt=n("PlatformNotSupportedModal"),Qt=()=>(Yt("initializing"),g.exports.jsx(dt,{children:g.exports.jsx(g.exports.Fragment,{children:g.exports.jsxs(at,{children:[g.exports.jsx(ct,{children:"Sorry, we don't support this platform just yet."}),g.exports.jsxs(ut,{children:["We're working hard to expand our coverage.",g.exports.jsx("br",{}),"Until we get there, you can try Ledger Connect on:"]}),g.exports.jsx(Kt,{children:g.exports.jsxs(Gt,{children:[g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='250.076' height='248.707' viewBox='0 0 66.166 65.804'%3e%3cdefs%3e%3clinearGradient id='b'%3e%3cstop style='stop-color:%2306c2e7%3bstop-opacity:1' offset='0'/%3e%3cstop offset='.25' style='stop-color:%230db8ec%3bstop-opacity:1'/%3e%3cstop offset='.5' style='stop-color:%2312aef1%3bstop-opacity:1'/%3e%3cstop style='stop-color:%231f86f9%3bstop-opacity:1' offset='.75'/%3e%3cstop style='stop-color:%23107ddd%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient id='a'%3e%3cstop style='stop-color:%23bdbdbd%3bstop-opacity:1' offset='0'/%3e%3cstop style='stop-color:white%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23a' id='d' x1='412.975' y1='237.608' x2='412.975' y2='59.392' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.35154 0 0 .35154 206.79 159.773)'/%3e%3cfilter style='color-interpolation-filters:sRGB' id='f' x='-.021' width='1.042' y='-.022' height='1.045'%3e%3cfeGaussianBlur stdDeviation='.958'/%3e%3c/filter%3e%3cfilter style='color-interpolation-filters:sRGB' id='c' x='-.048' width='1.096' y='-.048' height='1.096'%3e%3cfeGaussianBlur stdDeviation='3.564'/%3e%3c/filter%3e%3cradialGradient xlink:href='%23b' id='e' cx='413.061' cy='136.818' fx='413.061' fy='136.818' r='82.125' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.38143 0 0 .38143 194.545 155.58)'/%3e%3c/defs%3e%3cpath transform='matrix(.33865 0 0 .3261 -106.77 -14.478)' style='opacity:.52999998%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:2.93077397%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23c)' d='M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z'/%3e%3cpath d='M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z' style='opacity:1%3bfill:url(%23d)%3bfill-opacity:1%3bstroke:%23cdcdcd%3bstroke-width:.09301235%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z' style='opacity:1%3bfill:url(%23e)%3bfill-opacity:1%3bstroke:none%3bstroke-width:.94955933%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M351.969 184.612a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.526.002a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zm-8.355.408a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.174l-1.006-4.75a.42.42 0 0 0-.414-.334zm11.184.004a.42.42 0 0 0-.414.333l-1.01 4.75a.42.42 0 1 0 .824.175l1.01-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.631 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.364-.29zm16.567.001a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm-19.237.976a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm21.937.015a.42.42 0 0 0-.393.25l-1.978 4.434a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.593zm-24.415 1.296a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.421l-1.022-1.769a.42.42 0 0 0-.335-.21zm26.859 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .729.42l1.021-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm31.701.022a.42.42 0 0 0-.355.174l-2.856 3.926a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.14zm35.976.003a.421.421 0 0 0-.291.139l-1.366 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.609 3.249a.42.42 0 1 0 .563-.626l-3.608-3.248a.42.42 0 0 0-.304-.108zm40.108.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm-41.822 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.681l1.653-1.2a.42.42 0 0 0-.261-.76zm-45.137 2.336a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm46.727 0a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm-47.938 2.506a.42.42 0 0 0-.18.805l1.865.833a.42.42 0 1 0 .343-.77l-1.865-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.866.83a.42.42 0 1 0 .343.77l1.866-.831a.42.42 0 0 0-.18-.806zm-50.238 2.602a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zm51.315.018a.408.408 0 0 0-.166.02l-4.618 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm-51.987 2.732a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.823l-1.997-.425a.413.413 0 0 0-.085-.009zm52.654.004a.518.518 0 0 0-.084.009l-1.998.424a.42.42 0 1 0 .175.823l1.997-.424a.42.42 0 0 0-.09-.833zm-53.163 2.761a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .088-.837l-4.828-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.086 0l-4.828.504a.42.42 0 1 0 .087.837l4.829-.504a.42.42 0 0 0-.002-.837zm-53.758 2.794a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.086 0l-4.829.504a.42.42 0 1 0 .088.838l4.829-.504a.42.42 0 0 0-.002-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.434.434 0 0 0-.085-.001zm-46.26 2.844a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.669.004a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zm-45.305 1.657a.408.408 0 0 0-.167.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm-43.7 3.273a.42.42 0 0 0-.163.036l-1.865.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.18-.806zm45.46.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.768l-1.865-.833a.42.42 0 0 0-.163-.036zm-41.827.912a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .421-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.248 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.682l1.653-1.2a.42.42 0 0 0-.261-.762zm40.287.015a.42.42 0 0 0-.262.762l1.653 1.2a.42.42 0 1 0 .495-.681l-1.653-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.303.108l-3.611 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm32.8.011a.421.421 0 0 0-.259.734l3.608 3.248a.42.42 0 1 0 .564-.625l-3.609-3.249a.42.42 0 0 0-.303-.107zm-29.374 3.084a.42.42 0 0 0-.355.173l-2.857 3.927a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm25.936.018a.421.421 0 0 0-.327.668l2.851 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.291.14l-1.366 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.33.002a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.139zm-25.655 1.684a.419.419 0 0 0-.392.25l-1.978 4.433a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.592zm17.956.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm-21.432 1.359a.419.419 0 0 0-.335.21l-1.02 1.768a.42.42 0 1 0 .728.421l1.021-1.769a.42.42 0 0 0-.394-.63zm24.935 0a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.422l-1.021-1.769a.42.42 0 0 0-.335-.21zm-17.055.063a.42.42 0 0 0-.414.334l-1.009 4.749a.42.42 0 1 0 .823.175l1.01-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.572.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .801.26l.631-1.942a.42.42 0 0 0-.436-.55zm15.45 0a.42.42 0 0 0-.437.55l.631 1.943a.42.42 0 1 0 .801-.26l-.631-1.942a.42.42 0 0 0-.364-.29zm-10.366 1.083a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.088l.213-2.03a.42.42 0 0 0-.46-.463zm5.268.002a.42.42 0 0 0-.46.463l.211 2.03a.42.42 0 1 0 .837-.088l-.211-2.03a.42.42 0 0 0-.377-.375z' style='opacity:1%3bfill:%23f4f2f3%3bfill-opacity:1%3bstroke:none%3bstroke-width:.38088897%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath transform='matrix(.35154 0 0 .35154 -112.095 -20.822)' d='m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z' style='opacity:.40900005%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.5614785%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23f)'/%3e%3cpath style='opacity:1%3bfill:%23ff5150%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' d='m129.839 160.803-23.014-23.015 31.437-8.423z' transform='matrix(.64804 -.3317 -.36122 .63206 10.328 -23.732)'/%3e%3cpath transform='matrix(-.36122 .63206 .64804 -.3317 -20.923 6.11)' d='m129.839 160.803-23.014-23.015 31.437-8.423z' style='opacity:1%3bfill:%23f1f1f1%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill'/%3e%3cpath style='opacity:.243%3bfill:black%3bstroke:none%3bstroke-width:.09301235px%3bstroke-linecap:butt%3bstroke-linejoin:miter%3bstroke-opacity:1' d='m331.853 231.185 23.416-15.752 16.815-22.665z' transform='translate(-318.886 -180.595)'/%3e%3c/svg%3e"}),"Safari on iOS"]})})]})})}));var Jt={exports:{}};!function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,c=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,n=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(t.prototype,null),n&&s(t,n),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)})),r>0){var s=Object.keys(n),c=a.default.find(s,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(Jt);var Xt=l(Jt.exports);function Zt(){const e=Xt.getParser(window.navigator.userAgent),t=e.getOS(),n=e.getBrowser(),{type:r}=e.getPlatform();var i,o;return"isBrave"===(null===(o=null===(i=window.navigator.brave)||void 0===i?void 0:i.isBrave)||void 0===o?void 0:o.name)&&(n.name="Brave"),{type:r,os:t,browser:n}}let en=null;function tn(e,t){if(!en){const e=document.body,t=document.createElement("div");t.className="ledger-ck-modal",e.appendChild(t),en=mt(t)}if(en&&e){let n;switch(e){case"UseLedgerLiveModal":n=g.exports.jsx(Wt,Object.assign({},t));break;case"PlatformNotSupportedModal":n=g.exports.jsx(Qt,{});break;case"ExtensionInstallModal":n=g.exports.jsx(xt,Object.assign({},t))}en.render(n)}ht(!0)}const nn=n("WalletConnectLegacy"),rn=r("WalletConnectLegacy");function on(){return c(this,void 0,void 0,(function*(){nn("getWalletConnectLegacyProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){nn("initWalletConnectLegacyProvider");const e=Yi();return nn("walletConnectProviderOptions is",e),nn("created a new legacy provider instance"),new p({chainId:e.chainId,bridge:e.bridge,infuraId:e.infuraId,rpc:e.rpc,qrcode:!1})}))}();return function(e){nn("assignWalletConnectLegacyProviderEvents"),e.on("connect",(function(e){nn("connectHandler",e),ht(!1)})),e.on("disconnect",(function t(n,r){nn("disconnectHandler",n,r),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect"),e.removeListener("disconnect",t)}))}(e),e.request=function(e){nn("patchWalletConnectLegacyProviderRequest");const t=e.request.bind(e),n=Yi();return function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(nn("calling patched",r,i),new Promise(((o,a)=>c(this,void 0,void 0,(function*(){try{if(!e.connected)return yield e.connector.createSession({chainId:n.chainId}),nn("created a new session"),function(e){const t=Zt(),n=(no("getSupportResult"),ro);Yi(),!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))&&n.isLedgerConnectSupported&&n.isChainIdSupported?tn("ExtensionInstallModal",{onClose:e.onClose}):tn("UseLedgerLiveModal",{isDesktop:"desktop"===t.type,uri:e.uri,onClose:e.onClose})}({uri:e.connector.uri,onClose:()=>{rn("user rejected"),a(new s)}}),o(yield t({method:r,params:i}));nn("reusing existing session"),o(yield t({method:r,params:i}))}catch(e){return rn("error",e),a(e)}}))))):(nn("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw rn("error",t),t}}))}var sn,an={exports:{}},cn="object"==typeof Reflect?Reflect:null,un=cn&&"function"==typeof cn.apply?cn.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};sn=cn&&"function"==typeof cn.ownKeys?cn.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var ln=Number.isNaN||function(e){return e!=e};function fn(){fn.init.call(this)}an.exports=fn,an.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}wn(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&wn(e,"error",t,{once:!0})}(e,i)}))},fn.EventEmitter=fn,fn.prototype._events=void 0,fn.prototype._eventsCount=0,fn.prototype._maxListeners=void 0;var hn=10;function dn(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function pn(e){return void 0===e._maxListeners?fn.defaultMaxListeners:e._maxListeners}function gn(e,t,n,r){var i,o,s,a;if(dn(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=pn(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function yn(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function mn(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=yn.bind(r);return i.listener=n,r.wrapFn=i,i}function vn(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):bn(i,i.length)}function _n(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function bn(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function wn(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(fn,"defaultMaxListeners",{enumerable:!0,get:function(){return hn},set:function(e){if("number"!=typeof e||e<0||ln(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");hn=e}}),fn.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},fn.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||ln(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},fn.prototype.getMaxListeners=function(){return pn(this)},fn.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)un(a,this,t);else{var c=a.length,u=bn(a,c);for(n=0;n<c;++n)un(u[n],this,t)}return!0},fn.prototype.addListener=function(e,t){return gn(this,e,t,!1)},fn.prototype.on=fn.prototype.addListener,fn.prototype.prependListener=function(e,t){return gn(this,e,t,!0)},fn.prototype.once=function(e,t){return dn(t),this.on(e,mn(this,e,t)),this},fn.prototype.prependOnceListener=function(e,t){return dn(t),this.prependListener(e,mn(this,e,t)),this},fn.prototype.removeListener=function(e,t){var n,r,i,o,s;if(dn(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},fn.prototype.off=fn.prototype.removeListener,fn.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},fn.prototype.listeners=function(e){return vn(this,e,!0)},fn.prototype.rawListeners=function(e){return vn(this,e,!1)},fn.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):_n.call(e,t)},fn.prototype.listenerCount=_n,fn.prototype.eventNames=function(){return this._eventsCount>0?sn(this._events):[]};var En={},Sn={},On={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(On),Object.defineProperty(Sn,"__esModule",{value:!0});var Rn=On;function In(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function xn(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function Cn(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function Pn(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function kn(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function Nn(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function An(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function Tn(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function Mn(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),An(e/4294967296>>>0,t,n),An(e>>>0,t,n+4),t}function Ln(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Tn(e>>>0,t,n),Tn(e/4294967296>>>0,t,n+4),t}Sn.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},Sn.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},Sn.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},Sn.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},Sn.writeUint16BE=In,Sn.writeInt16BE=In,Sn.writeUint16LE=xn,Sn.writeInt16LE=xn,Sn.readInt32BE=Cn,Sn.readUint32BE=Pn,Sn.readInt32LE=kn,Sn.readUint32LE=Nn,Sn.writeUint32BE=An,Sn.writeInt32BE=An,Sn.writeUint32LE=Tn,Sn.writeInt32LE=Tn,Sn.readInt64BE=function(e,t){void 0===t&&(t=0);var n=Cn(e,t),r=Cn(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},Sn.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*Pn(e,t)+Pn(e,t+4)},Sn.readInt64LE=function(e,t){void 0===t&&(t=0);var n=kn(e,t);return 4294967296*kn(e,t+4)+n-4294967296*(n>>31)},Sn.readUint64LE=function(e,t){void 0===t&&(t=0);var n=Nn(e,t);return 4294967296*Nn(e,t+4)+n},Sn.writeUint64BE=Mn,Sn.writeInt64BE=Mn,Sn.writeUint64LE=Ln,Sn.writeInt64LE=Ln,Sn.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},Sn.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},Sn.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!Rn.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},Sn.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Rn.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},Sn.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},Sn.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},Sn.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},Sn.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},Sn.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},Sn.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},Sn.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},Sn.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var Un={};Object.defineProperty(Un,"__esModule",{value:!0}),Un.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(En,"__esModule",{value:!0});var jn=Sn,Dn=Un;function zn(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,s=1797285236,a=n[3]<<24|n[2]<<16|n[1]<<8|n[0],c=n[7]<<24|n[6]<<16|n[5]<<8|n[4],u=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],f=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],d=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],m=t[11]<<24|t[10]<<16|t[9]<<8|t[8],v=t[15]<<24|t[14]<<16|t[13]<<8|t[12],_=r,b=i,w=o,E=s,S=a,O=c,R=u,I=l,x=f,C=h,P=d,k=p,N=g,A=y,T=m,M=v,L=0;L<20;L+=2)S=(S^=x=x+(N=(N^=_=_+S|0)>>>16|N<<16)|0)>>>20|S<<12,O=(O^=C=C+(A=(A^=b=b+O|0)>>>16|A<<16)|0)>>>20|O<<12,R=(R^=P=P+(T=(T^=w=w+R|0)>>>16|T<<16)|0)>>>20|R<<12,I=(I^=k=k+(M=(M^=E=E+I|0)>>>16|M<<16)|0)>>>20|I<<12,R=(R^=P=P+(T=(T^=w=w+R|0)>>>24|T<<8)|0)>>>25|R<<7,I=(I^=k=k+(M=(M^=E=E+I|0)>>>24|M<<8)|0)>>>25|I<<7,O=(O^=C=C+(A=(A^=b=b+O|0)>>>24|A<<8)|0)>>>25|O<<7,S=(S^=x=x+(N=(N^=_=_+S|0)>>>24|N<<8)|0)>>>25|S<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,R=(R^=k=k+(N=(N^=b=b+R|0)>>>16|N<<16)|0)>>>20|R<<12,I=(I^=x=x+(A=(A^=w=w+I|0)>>>16|A<<16)|0)>>>20|I<<12,S=(S^=C=C+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,I=(I^=x=x+(A=(A^=w=w+I|0)>>>24|A<<8)|0)>>>25|I<<7,S=(S^=C=C+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,R=(R^=k=k+(N=(N^=b=b+R|0)>>>24|N<<8)|0)>>>25|R<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;jn.writeUint32LE(_+r|0,e,0),jn.writeUint32LE(b+i|0,e,4),jn.writeUint32LE(w+o|0,e,8),jn.writeUint32LE(E+s|0,e,12),jn.writeUint32LE(S+a|0,e,16),jn.writeUint32LE(O+c|0,e,20),jn.writeUint32LE(R+u|0,e,24),jn.writeUint32LE(I+l|0,e,28),jn.writeUint32LE(x+f|0,e,32),jn.writeUint32LE(C+h|0,e,36),jn.writeUint32LE(P+d|0,e,40),jn.writeUint32LE(k+p|0,e,44),jn.writeUint32LE(N+g|0,e,48),jn.writeUint32LE(A+y|0,e,52),jn.writeUint32LE(T+m|0,e,56),jn.writeUint32LE(M+v|0,e,60)}function Bn(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var o,s;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=(o=new Uint8Array(16)).length-t.length,o.set(t,s)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,s=i}for(var a=new Uint8Array(64),c=0;c<n.length;c+=64){zn(a,o,e);for(var u=c;u<c+64&&u<n.length;u++)r[u]=n[u]^a[u-c];Fn(o,0,s)}return Dn.wipe(a),0===i&&Dn.wipe(o),r}function Fn(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}En.streamXOR=Bn,En.stream=function(e,t,n,r){return void 0===r&&(r=0),Dn.wipe(n),Bn(e,t,n,n,r)};var Hn={},qn={};function $n(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(qn,"__esModule",{value:!0}),qn.select=function(e,t,n){return~(e-1)&t|e-1&n},qn.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},qn.compare=$n,qn.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==$n(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=qn,n=Un;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var u=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],f=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],g=this._r[1],y=this._r[2],m=this._r[3],v=this._r[4],_=this._r[5],b=this._r[6],w=this._r[7],E=this._r[8],S=this._r[9];n>=16;){var O=e[t+0]|e[t+1]<<8;i+=8191&O;var R=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|R<<3);var I=e[t+4]|e[t+5]<<8;s+=8191&(R>>>10|I<<6);var x=e[t+6]|e[t+7]<<8;a+=8191&(I>>>7|x<<9);var C=e[t+8]|e[t+9]<<8;c+=8191&(x>>>4|C<<12),u+=C>>>1&8191;var P=e[t+10]|e[t+11]<<8;l+=8191&(C>>>14|P<<2);var k=e[t+12]|e[t+13]<<8;f+=8191&(P>>>11|k<<5);var N=e[t+14]|e[t+15]<<8,A=0,T=A;T+=i*p,T+=o*(5*S),T+=s*(5*E),T+=a*(5*w),A=(T+=c*(5*b))>>>13,T&=8191,T+=u*(5*_),T+=l*(5*v),T+=f*(5*m),T+=(h+=8191&(k>>>8|N<<8))*(5*y);var M=A+=(T+=(d+=N>>>5|r)*(5*g))>>>13;M+=i*g,M+=o*p,M+=s*(5*S),M+=a*(5*E),A=(M+=c*(5*w))>>>13,M&=8191,M+=u*(5*b),M+=l*(5*_),M+=f*(5*v),M+=h*(5*m),A+=(M+=d*(5*y))>>>13,M&=8191;var L=A;L+=i*y,L+=o*g,L+=s*p,L+=a*(5*S),A=(L+=c*(5*E))>>>13,L&=8191,L+=u*(5*w),L+=l*(5*b),L+=f*(5*_),L+=h*(5*v);var U=A+=(L+=d*(5*m))>>>13;U+=i*m,U+=o*y,U+=s*g,U+=a*p,A=(U+=c*(5*S))>>>13,U&=8191,U+=u*(5*E),U+=l*(5*w),U+=f*(5*b),U+=h*(5*_);var j=A+=(U+=d*(5*v))>>>13;j+=i*v,j+=o*m,j+=s*y,j+=a*g,A=(j+=c*p)>>>13,j&=8191,j+=u*(5*S),j+=l*(5*E),j+=f*(5*w),j+=h*(5*b);var D=A+=(j+=d*(5*_))>>>13;D+=i*_,D+=o*v,D+=s*m,D+=a*y,A=(D+=c*g)>>>13,D&=8191,D+=u*p,D+=l*(5*S),D+=f*(5*E),D+=h*(5*w);var z=A+=(D+=d*(5*b))>>>13;z+=i*b,z+=o*_,z+=s*v,z+=a*m,A=(z+=c*y)>>>13,z&=8191,z+=u*g,z+=l*p,z+=f*(5*S),z+=h*(5*E);var B=A+=(z+=d*(5*w))>>>13;B+=i*w,B+=o*b,B+=s*_,B+=a*v,A=(B+=c*m)>>>13,B&=8191,B+=u*y,B+=l*g,B+=f*p,B+=h*(5*S);var F=A+=(B+=d*(5*E))>>>13;F+=i*E,F+=o*w,F+=s*b,F+=a*_,A=(F+=c*v)>>>13,F&=8191,F+=u*m,F+=l*y,F+=f*g,F+=h*p;var H=A+=(F+=d*(5*S))>>>13;H+=i*S,H+=o*E,H+=s*w,H+=a*b,A=(H+=c*_)>>>13,H&=8191,H+=u*v,H+=l*m,H+=f*y,H+=h*g,i=T=8191&(A=(A=((A+=(H+=d*p)>>>13)<<2)+A|0)+(T&=8191)|0),o=M+=A>>>=13,s=L&=8191,a=U&=8191,c=j&=8191,u=D&=8191,l=z&=8191,f=B&=8191,h=F&=8191,d=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=f,this._h[8]=h,this._h[9]=d},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,s[0]=this._h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(Hn),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=En,n=Hn,r=Un,i=Sn,o=qn;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var s=new Uint8Array(16),a=function(){function a(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return a.prototype.seal=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);t.stream(this._key,s,a,4);var c,u=n.length+this.tagLength;if(o){if(o.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(u);return t.streamXOR(this._key,s,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),i),r.wipe(s),c},a.prototype.open=function(e,n,i,s){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var a=new Uint8Array(16);a.set(e,a.length-e.length);var c=new Uint8Array(32);t.stream(this._key,a,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,n.subarray(0,n.length-this.tagLength),i),!o.equal(u,n.subarray(n.length-this.tagLength,n.length)))return null;var l,f=n.length-this.tagLength;if(s){if(s.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");l=s}else l=new Uint8Array(f);return t.streamXOR(this._key,a,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(a),l},a.prototype.clean=function(){return r.wipe(this._key),this},a.prototype._authenticate=function(e,t,o,a){var c=new n.Poly1305(t);a&&(c.update(a),a.length%16>0&&c.update(s.subarray(a.length%16))),c.update(o),o.length%16>0&&c.update(s.subarray(o.length%16));var u=new Uint8Array(8);a&&i.writeUint64LE(a.length,u),c.update(u),i.writeUint64LE(o.length,u),c.update(u);for(var l=c.digest(),f=0;f<l.length;f++)e[f]=l[f];c.clean(),r.wipe(l),r.wipe(u)},a}();e.ChaCha20Poly1305=a}({});var Vn={},Wn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(Wn,"__esModule",{value:!0});var Gn=Kn,Yn=qn,Qn=Un,Jn=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;for(this._inner.update(n),r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),Gn.isSerializableHash(this._inner)&&Gn.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Qn.wipe(n)}return e.prototype.reset=function(){if(!Gn.isSerializableHash(this._inner)||!Gn.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){Gn.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Gn.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!Gn.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!Gn.isSerializableHash(this._inner)||!Gn.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!Gn.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();Wn.HMAC=Jn,Wn.hmac=function(e,t,n){var r=new Jn(e,t);r.update(n);var i=r.digest();return r.clean(),i},Wn.equal=Yn.equal,Object.defineProperty(Vn,"__esModule",{value:!0});var Xn=Wn,Zn=Un,er=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=Xn.hmac(this._hash,n,t);this._hmac=new Xn.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),Zn.wipe(this._buffer),Zn.wipe(this._counter),this._bufpos=0},e}();Vn.HKDF=er;var tr={},nr={},rr={};function ir(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}Object.defineProperty(rr,"__esModule",{value:!0}),rr.BrowserRandomSource=void 0,rr.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var or={},sr=f(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(or,"__esModule",{value:!0}),or.NodeRandomSource=void 0;const ar=Un;or.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==ir){const e=sr;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,ar.wipe)(t),n}},Object.defineProperty(nr,"__esModule",{value:!0}),nr.SystemRandomSource=void 0;const cr=rr,ur=or;nr.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new cr.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new ur.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=nr,n=Sn,r=Un;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const o=i(4,t),s=(0,n.readUint32LE)(o);return(0,r.wipe)(o),s};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(t,n=o,s=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let a="";const c=n.length,u=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/u),s);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<u&&(a+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return a}e.randomString=s,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return s(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(tr),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Sn,n=Un;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<a-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(c=0;c<this.digestLength/4;c++)t.writeUint32BE(this._state[c],e,4*c);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([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 o(e,n,r,o,s){for(;s>=64;){for(var a=n[0],c=n[1],u=n[2],l=n[3],f=n[4],h=n[5],d=n[6],p=n[7],g=0;g<16;g++){var y=o+4*g;e[g]=t.readUint32BE(r,y)}for(g=16;g<64;g++){var m=e[g-2],v=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,_=((m=e[g-15])>>>7|m<<25)^(m>>>18|m<<14)^m>>>3;e[g]=(v+e[g-7]|0)+(_+e[g-16]|0)}for(g=0;g<64;g++)v=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&d)|0)+(p+(i[g]+e[g]|0)|0)|0,_=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&u^c&u)|0,p=d,d=h,h=f,f=l+v|0,l=u,u=c,c=a,a=v+_|0;n[0]+=a,n[1]+=c,n[2]+=u,n[3]+=l,n[4]+=f,n[5]+=h,n[6]+=d,n[7]+=p,o+=64,s-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}({}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=tr,n=Un;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const o=r([56129,1]);function s(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function a(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,o=0,s=0,a=0,c=0,u=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,m=0,v=0,_=0,b=0,w=0,E=0,S=0,O=0,R=0,I=0,x=0,C=0,P=0,k=0,N=0,A=0,T=0,M=0,L=0,U=n[0],j=n[1],D=n[2],z=n[3],B=n[4],F=n[5],H=n[6],q=n[7],$=n[8],V=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*U,s+=r*j,a+=r*D,c+=r*z,u+=r*B,l+=r*F,f+=r*H,h+=r*q,d+=r*$,p+=r*V,g+=r*W,y+=r*K,m+=r*G,v+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*U,a+=r*j,c+=r*D,u+=r*z,l+=r*B,f+=r*F,h+=r*H,d+=r*q,p+=r*$,g+=r*V,y+=r*W,m+=r*K,v+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*U,c+=r*j,u+=r*D,l+=r*z,f+=r*B,h+=r*F,d+=r*H,p+=r*q,g+=r*$,y+=r*V,m+=r*W,v+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],c+=r*U,u+=r*j,l+=r*D,f+=r*z,h+=r*B,d+=r*F,p+=r*H,g+=r*q,y+=r*$,m+=r*V,v+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],u+=r*U,l+=r*j,f+=r*D,h+=r*z,d+=r*B,p+=r*F,g+=r*H,y+=r*q,m+=r*$,v+=r*V,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*U,f+=r*j,h+=r*D,d+=r*z,p+=r*B,g+=r*F,y+=r*H,m+=r*q,v+=r*$,_+=r*V,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,R+=r*J,r=t[6],f+=r*U,h+=r*j,d+=r*D,p+=r*z,g+=r*B,y+=r*F,m+=r*H,v+=r*q,_+=r*$,b+=r*V,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,R+=r*Q,I+=r*J,r=t[7],h+=r*U,d+=r*j,p+=r*D,g+=r*z,y+=r*B,m+=r*F,v+=r*H,_+=r*q,b+=r*$,w+=r*V,E+=r*W,S+=r*K,O+=r*G,R+=r*Y,I+=r*Q,x+=r*J,r=t[8],d+=r*U,p+=r*j,g+=r*D,y+=r*z,m+=r*B,v+=r*F,_+=r*H,b+=r*q,w+=r*$,E+=r*V,S+=r*W,O+=r*K,R+=r*G,I+=r*Y,x+=r*Q,C+=r*J,r=t[9],p+=r*U,g+=r*j,y+=r*D,m+=r*z,v+=r*B,_+=r*F,b+=r*H,w+=r*q,E+=r*$,S+=r*V,O+=r*W,R+=r*K,I+=r*G,x+=r*Y,C+=r*Q,P+=r*J,r=t[10],g+=r*U,y+=r*j,m+=r*D,v+=r*z,_+=r*B,b+=r*F,w+=r*H,E+=r*q,S+=r*$,O+=r*V,R+=r*W,I+=r*K,x+=r*G,C+=r*Y,P+=r*Q,k+=r*J,r=t[11],y+=r*U,m+=r*j,v+=r*D,_+=r*z,b+=r*B,w+=r*F,E+=r*H,S+=r*q,O+=r*$,R+=r*V,I+=r*W,x+=r*K,C+=r*G,P+=r*Y,k+=r*Q,N+=r*J,r=t[12],m+=r*U,v+=r*j,_+=r*D,b+=r*z,w+=r*B,E+=r*F,S+=r*H,O+=r*q,R+=r*$,I+=r*V,x+=r*W,C+=r*K,P+=r*G,k+=r*Y,N+=r*Q,A+=r*J,r=t[13],v+=r*U,_+=r*j,b+=r*D,w+=r*z,E+=r*B,S+=r*F,O+=r*H,R+=r*q,I+=r*$,x+=r*V,C+=r*W,P+=r*K,k+=r*G,N+=r*Y,A+=r*Q,T+=r*J,r=t[14],_+=r*U,b+=r*j,w+=r*D,E+=r*z,S+=r*B,O+=r*F,R+=r*H,I+=r*q,x+=r*$,C+=r*V,P+=r*W,k+=r*K,N+=r*G,A+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*U,w+=r*j,E+=r*D,S+=r*z,O+=r*B,R+=r*F,I+=r*H,x+=r*q,C+=r*$,P+=r*V,k+=r*W,N+=r*K,A+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,c+=38*O,u+=38*R,l+=38*I,f+=38*x,h+=38*C,d+=38*P,p+=38*k,g+=38*N,y+=38*A,m+=38*T,v+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=m,e[13]=v,e[14]=_,e[15]=b}function f(e,t){l(e,t,t)}function h(e,t){const n=new Uint8Array(32),i=new Float64Array(80),h=r(),d=r(),p=r(),g=r(),y=r(),m=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)d[e]=i[e];h[0]=g[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;a(h,d,t),a(p,g,t),c(y,h,p),u(h,h,p),c(p,d,g),u(d,d,g),f(g,y),f(m,h),l(h,p,h),l(p,d,y),c(y,h,p),u(h,h,p),f(d,h),u(p,g,m),l(h,p,o),c(h,h,g),l(p,p,h),l(h,g,m),l(g,d,i),f(d,y),a(h,d,t),a(p,g,t)}for(let e=0;e<16;e++)i[e+16]=h[e],i[e+32]=p[e],i[e+48]=d[e],i[e+64]=g[e];const v=i.subarray(32),_=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)f(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(v,v),l(_,_,v);const b=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];s(i),s(i),s(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,a(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(b,_),b}function d(e){return h(e,i)}function p(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:d(n),secretKey:n}}e.scalarMult=h,e.scalarMultBase=d,e.generateKeyPairFromSeed=p,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=p(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=h(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}({});var lr=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,c=e.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var o=(e.length-t)*u+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,u=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*u[d]>>>0,u[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===u[p];)p++;for(var g=c.repeat(n);p<s;++p)g+=e.charAt(u[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}};class fr{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class hr{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return pr(this,e)}}class dr{constructor(e){this.decoders=e}or(e){return pr(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const pr=(e,t)=>new dr({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class gr{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new fr(e,t,n),this.decoder=new hr(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const yr=({name:e,prefix:t,encode:n,decode:r})=>new gr(e,t,n,r),mr=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=lr(n,t);return yr({prefix:e,name:t,encode:r,decode:e=>(e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")})(i(e))})},vr=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>yr({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,c=0,u=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);c=c<<n|o,a+=n,a>=8&&(a-=8,s[u++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)});yr({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)}),vr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),vr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),mr({prefix:"9",name:"base10",alphabet:"0123456789"}),vr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),vr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),vr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),vr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),vr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),vr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),vr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),vr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),vr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),vr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),vr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),mr({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),mr({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),mr({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),mr({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),vr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),vr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),vr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),vr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const _r=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),br=_r.reduce(((e,t,n)=>(e[n]=t,e)),[]),wr=_r.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);yr({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+br[t]),"")},decode:function(e){const t=[];for(const n of e){const e=wr[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var Er=128,Sr=-128,Or=Math.pow(2,31),Rr=Math.pow(2,7),Ir=Math.pow(2,14),xr=Math.pow(2,21),Cr=Math.pow(2,28),Pr=Math.pow(2,35),kr=Math.pow(2,42),Nr=Math.pow(2,49),Ar=Math.pow(2,56),Tr=Math.pow(2,63),Mr=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=Or;)n[r++]=255&t|Er,t/=128;for(;t&Sr;)n[r++]=255&t|Er,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},Lr=function(e){return e<Rr?1:e<Ir?2:e<xr?3:e<Cr?4:e<Pr?5:e<kr?6:e<Nr?7:e<Ar?8:e<Tr?9:10};const Ur=(e,t,n=0)=>(Mr(e,t,n),t),jr=e=>Lr(e),Dr=(e,t)=>{const n=t.byteLength,r=jr(e),i=r+jr(n),o=new Uint8Array(i+n);return Ur(e,o,0),Ur(n,o,r),o.set(t,i),new zr(e,n,t,o)};class zr{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const Br=({name:e,code:t,encode:n})=>new Fr(e,t,n);class Fr{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Dr(this.code,t):t.then((e=>Dr(this.code,e)))}throw Error("Unknown type, must be binary type")}}const Hr=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));Br({name:"sha2-256",code:18,encode:Hr("SHA-256")}),Br({name:"sha2-512",code:19,encode:Hr("SHA-512")}),new TextEncoder,new TextDecoder;var qr=function(e,t){return qr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},qr(e,t)
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */},$r=function(){return $r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$r.apply(this,arguments)};function Vr(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Kr(e){return this instanceof Kr?(this.v=e,this):new Kr(e)}var Gr,Yr,Qr,Jr,Xr,Zr,ei=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}qr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return $r},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])},__values:Vr,__read:Wr,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Wr(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:Kr,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof Kr?Promise.resolve(n.value.v).then(c,u):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:Kr(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Vr(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}),ti=f(ei),ni={},ri={},ii={},oi={},si={},ai={};function ci(){return Jr||(Jr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ti;t.__exportStar((Yr||(Yr=1,Object.defineProperty(si,"__esModule",{value:!0}),si.ONE_THOUSAND=si.ONE_HUNDRED=void 0,si.ONE_HUNDRED=100,si.ONE_THOUSAND=1e3),si),e),t.__exportStar((Qr||(Qr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY}(ai)),ai),e)}(oi)),oi}var ui,li,fi,hi={},di={},pi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ti;t.__exportStar((Zr||(Zr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ti;t.__exportStar((Gr||(Gr=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.delay=void 0,ri.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),ri),e),t.__exportStar(function(){if(Xr)return ii;Xr=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.fromMiliseconds=ii.toMiliseconds=void 0;const e=ci();return ii.toMiliseconds=function(t){return t*e.ONE_THOUSAND},ii.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},ii}(),e)}(ni)),ni),e),t.__exportStar(function(){if(ui)return hi;ui=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}return hi.Watch=e,hi.default=e,hi}(),e),t.__exportStar((fi||(fi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),ti.__exportStar((li||(li=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.IWatch=void 0,pi.IWatch=class{}),pi),e)}(di)),di),e),t.__exportStar(ci(),e)}({});var gi={};function yi(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function mi(e){const t=yi(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(gi,"__esModule",{value:!0}),gi.getLocalStorage=gi.getLocalStorageOrThrow=gi.getCrypto=gi.getCryptoOrThrow=gi.getLocation=gi.getLocationOrThrow=gi.getNavigator=gi.getNavigatorOrThrow=gi.getDocument=gi.getDocumentOrThrow=gi.getFromWindowOrThrow=gi.getFromWindow=void 0,gi.getFromWindow=yi,gi.getFromWindowOrThrow=mi,gi.getDocumentOrThrow=function(){return mi("document")},gi.getDocument=function(){return yi("document")},gi.getNavigatorOrThrow=function(){return mi("navigator")},gi.getNavigator=function(){return yi("navigator")},gi.getLocationOrThrow=function(){return mi("location")},gi.getLocation=function(){return yi("location")},gi.getCryptoOrThrow=function(){return mi("crypto")},gi.getCrypto=function(){return yi("crypto")},gi.getLocalStorageOrThrow=function(){return mi("localStorage")},gi.getLocalStorage=function(){return yi("localStorage")};var vi={};Object.defineProperty(vi,"__esModule",{value:!0}),vi.getWindowMetadata=void 0;const _i=gi;vi.getWindowMetadata=function(){let e,t;try{e=_i.getDocumentOrThrow(),t=_i.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const r=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop(),n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:r}};var bi=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),wi="%[a-f0-9]{2}",Ei=new RegExp("("+wi+")|([^%]+?)","gi"),Si=new RegExp("("+wi+")+","gi");function Oi(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],Oi(n),Oi(r))}function Ri(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(Ei)||[],n=1;n<t.length;n++)t=(e=Oi(t,n).join("")).match(Ei)||[];return e}}var Ii=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=Si.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=Ri(n[0]);r!==n[0]&&(t[n[0]]=r)}n=Si.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),o=0;o<i.length;o++){var s=i[o];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}},xi=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},Ci=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n};!function(e){const t=bi,n=Ii,r=xi,i=Ci,o=Symbol("encodeFragmentIdentifier");function s(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function c(e,t){return t.decode?n(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function f(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function d(e,t){s((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=o?c(n,e):n;const s=i||o?n.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===n?n:c(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?c(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>c(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const o of e.split("&")){if(""===o)continue;let[e,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:c(s,t),n(c(e,t),s,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=h(n[e],t);else i[e]=h(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{const n=i[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=u(n):e[t]=n,e}),Object.create(null))}e.extract=f,e.parse=d,e.stringify=(e,t)=>{if(!e)return"";s((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),"[",i,"]"].join("")]:[...n,[a(t,e),"[",a(i,e),"]=",a(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),"[]"].join("")]:[...n,[a(t,e),"[]=",a(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),":list="].join("")]:[...n,[a(t,e),":list=",a(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[a(n,e),t,a(i,e)].join("")]:[[r,a(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,a(t,e)]:[...n,[a(t,e),"=",a(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((n=>{const i=e[n];return void 0===i?"":null===i?a(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?a(n,t)+"[]":i.reduce(r(n),[]).join("&"):a(n,t)+"="+a(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:d(f(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:c(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[o]:!0},n);const r=l(t.url).split("?")[0]||"",i=e.extract(t.url),s=e.parse(i,{sort:!1}),c=Object.assign(s,t.query);let u=e.stringify(c,n);u&&(u=`?${u}`);let f=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(t.url);return t.fragmentIdentifier&&(f=`#${n[o]?a(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${u}${f}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:s,query:a,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:s,query:i(a,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}({});const Pi={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}};function ki(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}var Ni,Ai,Ti={exports:{}};!function(e,t){!function(e){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof u<"u"?u:typeof self<"u"?self:{};function n(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var r,i={exports:{}},o="object"==typeof Reflect?Reflect:null,s=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function c(){c.init.call(this)}i.exports=c,i.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}_(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&_(e,"error",t,n)}(e,i,{once:!0})}))},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var l=10;function f(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function h(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,s;if(f(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=h(e))>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,function(e){console&&console.warn&&console.warn(e)}(a)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function y(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):v(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),c.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},c.prototype.getMaxListeners=function(){return h(this)},c.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)s(c,this,t);else{var u=c.length,l=v(c,u);for(n=0;n<u;++n)s(l[n],this,t)}return!0},c.prototype.addListener=function(e,t){return d(this,e,t,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(e,t){return d(this,e,t,!0)},c.prototype.once=function(e,t){return f(t),this.on(e,g(this,e,t)),this},c.prototype.prependOnceListener=function(e,t){return f(t),this.prependListener(e,g(this,e,t)),this},c.prototype.removeListener=function(e,t){var n,r,i,o,s;if(f(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},c.prototype.listeners=function(e){return y(this,e,!0)},c.prototype.rawListeners=function(e){return y(this,e,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},c.prototype.listenerCount=m,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};const b=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,w=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,E=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function S(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function O(e,t={}){if("string"!=typeof e)return e;const n=e.trim();if('"'===e[0]&&'"'===e.at(-1)&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const e=n.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!E.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(b.test(e)||w.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,S)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function R(e,...t){try{return function(e){return e&&"function"==typeof e.then?e:Promise.resolve(e)}(e(...t))}catch(e){return Promise.reject(e)}}function I(e){if(function(e){const t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return I(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function x(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const C="base64:";function P(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function k(...e){return P(e.join(":"))}function N(e){return(e=P(e))?e+":":""}const A=()=>{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)||null,getItemRaw:t=>e.get(t)||null,setItem(t,n){e.set(t,n)},setItemRaw(t,n){e.set(t,n)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function T(e={}){const t={mounts:{"":e.driver||A()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=e=>{for(const n of t.mountpoints)if(e.startsWith(n))return{base:n,relativeKey:e.slice(n.length),driver:t.mounts[n]};return{base:"",relativeKey:e,driver:t.mounts[""]}},r=(e,n)=>t.mountpoints.filter((t=>t.startsWith(e)||n&&e.startsWith(t))).map((n=>({relativeBase:e.length>n.length?e.slice(n.length):void 0,mountpoint:n,driver:t.mounts[n]}))),i=(e,n)=>{if(t.watching){n=P(n);for(const r of t.watchListeners)r(e,n)}},o=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},s=(e,t,r)=>{const i=new Map,o=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const r of e){const e="string"==typeof r,i=P(e?r:r.key),s=e?void 0:r.value,a=e||!r.options?t:{...t,...r.options},c=n(i);o(c).items.push({key:i,value:s,relativeKey:c.relativeKey,options:a})}return Promise.all([...i.values()].map((e=>r(e)))).then((e=>e.flat()))},a={hasItem(e,t={}){e=P(e);const{relativeKey:r,driver:i}=n(e);return R(i.hasItem,r,t)},getItem(e,t={}){e=P(e);const{relativeKey:r,driver:i}=n(e);return R(i.getItem,r,t).then((e=>O(e)))},getItems:(e,t)=>s(e,t,(e=>e.driver.getItems?R(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:k(e.base,t.key),value:O(t.value)}))))):Promise.all(e.items.map((t=>R(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:O(e)})))))))),getItemRaw(e,t={}){e=P(e);const{relativeKey:r,driver:i}=n(e);return i.getItemRaw?R(i.getItemRaw,r,t):R(i.getItem,r,t).then((e=>function(e){return"string"==typeof e&&e.startsWith(C)?(x(),Buffer.from(e.slice(7),"base64")):e}(e)))},async setItem(e,t,r={}){if(void 0===t)return a.removeItem(e);e=P(e);const{relativeKey:o,driver:s}=n(e);s.setItem&&(await R(s.setItem,o,I(t),r),s.watch||i("update",e))},async setItems(e,t){await s(e,t,(async e=>{e.driver.setItems&&await R(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:I(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>R(e.driver.setItem,t.relativeKey,I(t.value),t.options))))}))},async setItemRaw(e,t,r={}){if(void 0===t)return a.removeItem(e,r);e=P(e);const{relativeKey:o,driver:s}=n(e);if(s.setItemRaw)await R(s.setItemRaw,o,t,r);else{if(!s.setItem)return;await R(s.setItem,o,function(e){if("string"==typeof e)return e;x();const t=Buffer.from(e).toString("base64");return C+t}(t),r)}s.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=P(e);const{relativeKey:r,driver:o}=n(e);o.removeItem&&(await R(o.removeItem,r,t),(t.removeMeta||t.removeMata)&&await R(o.removeItem,r+"$",t),o.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=P(e);const{relativeKey:r,driver:i}=n(e),o=Object.create(null);if(i.getMeta&&Object.assign(o,await R(i.getMeta,r,t)),!t.nativeOnly){const e=await R(i.getItem,r+"$",t).then((e=>O(e)));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(o,e))}return o},setMeta(e,t,n={}){return this.setItem(e+"$",t,n)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=N(e);const n=r(e,!0);let i=[];const o=[];for(const e of n){const n=(await R(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+P(t))).filter((e=>!i.some((t=>e.startsWith(t)))));o.push(...n),i=[e.mountpoint,...i.filter((t=>!t.startsWith(e.mountpoint)))]}return e?o.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):o.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=N(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return R(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const n=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(n.map((n=>e.driver.removeItem(n,t))))}})))},async dispose(){await Promise.all(Object.values(t.mounts).map((e=>L(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await M(t.mounts[e],i,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await o()}),async unwatch(){t.watchListeners=[],await o()},mount(e,n){if((e=N(e))&&t.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort(((e,t)=>t.length-e.length))),t.mounts[e]=n,t.watching&&Promise.resolve(M(n,i,e)).then((n=>{t.unwatch[e]=n})).catch(console.error),a},async unmount(e,n=!0){(e=N(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),n&&await L(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=P(e)+":";const t=n(e);return{driver:t.driver,base:t.base}},getMounts:(e="",t={})=>(e=P(e),r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint}))))};return a}function M(e,t,n){return e.watch?e.watch(((e,r)=>t(e,n+r))):()=>{}}async function L(e){"function"==typeof e.dispose&&await R(e.dispose)}function U(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function j(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=U(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let D;function z(){return D||(D=j("keyval-store","keyval")),D}function B(e,t=z()){return t("readonly",(t=>U(t.get(e))))}function F(e=z()){return e("readonly",(e=>{if(e.getAllKeys)return U(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},U(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}function H(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return(e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))})(e)}catch{return e}}function q(e){return"string"==typeof e?e:(e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)))(e)||""}var $=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>t+e;let r;return e.dbName&&e.storeName&&(r=j(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await B(n(e),r)>"u"),getItem:async e=>await B(n(e),r)??null,setItem:(e,t)=>function(e,t,n=z()){return n("readwrite",(n=>(n.put(t,e),U(n.transaction))))}(n(e),t,r),removeItem:e=>function(e,t=z()){return t("readwrite",(t=>(t.delete(e),U(t.transaction))))}(n(e),r),getKeys:()=>F(r),clear:()=>function(e=z()){return e("readwrite",(e=>(e.clear(),U(e.transaction))))}(r)}};class V{constructor(){this.indexedDb=T({driver:$({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,q(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof u<"u"?u:typeof self<"u"?self:{},K={exports:{}};function G(e){var t;return[e[0],H(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof W<"u"&&W.localStorage?K.exports=W.localStorage:typeof window<"u"&&window.localStorage?K.exports=window.localStorage:K.exports=new t}();class Y{constructor(){this.localStorage=K.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(G)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return H(t)}async setItem(e,t){this.localStorage.setItem(e,q(t))}async removeItem(e){this.localStorage.removeItem(e)}}const Q=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};class J{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new Y;this.storage=e;try{(async(e,t,n)=>{const r="wc_storage_version",i=await t.getItem(r);if(i&&i>=1)return void n(t);const o=await e.getKeys();if(!o.length)return void n(t);const s=[];for(;o.length;){const n=o.shift();if(!n)continue;const r=n.toLowerCase();if(r.includes("wc@")||r.includes("walletconnect")||r.includes("wc_")||r.includes("wallet_connect")){const r=await e.getItem(n);await t.setItem(n,r),s.push(n)}}await t.setItem(r,1),n(t),Q(e,s)})(e,new V,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}var X={},Z=function(e,t){return(Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};
/*! *****************************************************************************
		Copyright (c) Microsoft Corporation.

		Permission to use, copy, modify, and/or distribute this software for any
		purpose with or without fee is hereby granted.

		THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
		REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
		AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
		INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
		LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
		OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
		PERFORMANCE OF THIS SOFTWARE.
		***************************************************************************** */var ee=function(){return ee=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ee.apply(this,arguments)};function te(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ne(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function re(e){return this instanceof re?(this.v=e,this):new re(e)}var ie=n(Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}Z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return ee},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])},__values:te,__read:ne,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ne(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:re,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof re?Promise.resolve(e.value.v).then(c,u):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:re(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=te(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}})),oe={},se={},ae=function(e,t){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};
/*! *****************************************************************************
		Copyright (c) Microsoft Corporation.

		Permission to use, copy, modify, and/or distribute this software for any
		purpose with or without fee is hereby granted.

		THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
		REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
		AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
		INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
		LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
		OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
		PERFORMANCE OF THIS SOFTWARE.
		***************************************************************************** */var ce=function(){return ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ce.apply(this,arguments)};function ue(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function le(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function fe(e){return this instanceof fe?(this.v=e,this):new fe(e)}var he,de=n(Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}ae(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return ce},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])},__values:ue,__read:le,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(le(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:fe,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof fe?Promise.resolve(e.value.v).then(c,u):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:fe(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=ue(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}})),pe={},ge={};var ye,me={},ve={},_e={};var be,we,Ee,Se,Oe={};function Re(){return we||(we=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=de;t.__exportStar((ye||(ye=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.ONE_THOUSAND=_e.ONE_HUNDRED=void 0,_e.ONE_HUNDRED=100,_e.ONE_THOUSAND=1e3),_e),e),t.__exportStar(function(){return be||(be=1,e=Oe,Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY),Oe;var e}(),e)}(ve)),ve}function Ie(){return Se||(Se=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=de;t.__exportStar((he||(he=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.delay=void 0,ge.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),ge),e),t.__exportStar(function(){if(Ee)return me;Ee=1,Object.defineProperty(me,"__esModule",{value:!0}),me.fromMiliseconds=me.toMiliseconds=void 0;const e=Re();return me.toMiliseconds=function(t){return t*e.ONE_THOUSAND},me.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},me}(),e)}(pe)),pe}var xe,Ce={};var Pe,ke,Ne={},Ae={};function Te(){return ke||(ke=1,e=Ne,Object.defineProperty(e,"__esModule",{value:!0}),de.__exportStar((Pe||(Pe=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.IWatch=void 0,Ae.IWatch=class{}),Ae),e)),Ne;var e}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=de;t.__exportStar(Ie(),e),t.__exportStar(function(){if(xe)return Ce;xe=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(typeof t.elapsed<"u")throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if(typeof t>"u")throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}return Ce.Watch=e,Ce.default=e,Ce}(),e),t.__exportStar(Te(),e),t.__exportStar(Re(),e)}(se);var Me={},Le={};class Ue{}var je,De,ze=n(Object.freeze({__proto__:null,IEvents:Ue}));function Be(){return De||(De=1,e=Me,Object.defineProperty(e,"__esModule",{value:!0}),ie.__exportStar(function(){if(je)return Le;je=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.IHeartBeat=void 0;const e=ze;class t extends e.IEvents{constructor(e){super()}}return Le.IHeartBeat=t,Le}(),e)),Me;var e}var Fe,He,qe,$e={},Ve={};function We(){return He||(He=1,e=$e,Object.defineProperty(e,"__esModule",{value:!0}),ie.__exportStar(function(){if(Fe)return Ve;Fe=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.HEARTBEAT_EVENTS=Ve.HEARTBEAT_INTERVAL=void 0;const e=se;return Ve.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,Ve.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},Ve}(),e)),$e;var e}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ie;t.__exportStar(function(){if(qe)return oe;qe=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.HeartBeat=void 0;const e=ie,t=i.exports,n=se,r=Be(),o=We();class s extends r.IHeartBeat{constructor(e){super(e),this.events=new t.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=e?.interval||o.HEARTBEAT_INTERVAL}static init(t){return e.__awaiter(this,void 0,void 0,(function*(){const e=new s(t);return yield e.init(),e}))}init(){return e.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return e.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),n.toMiliseconds(this.interval))}))}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return oe.HeartBeat=s,oe}(),e),t.__exportStar(Be(),e),t.__exportStar(We(),e)}(X);var Ke={},Ge=function(e,t){return(Ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};
/*! *****************************************************************************
		Copyright (c) Microsoft Corporation.

		Permission to use, copy, modify, and/or distribute this software for any
		purpose with or without fee is hereby granted.

		THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
		REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
		AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
		INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
		LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
		OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
		PERFORMANCE OF THIS SOFTWARE.
		***************************************************************************** */var Ye=function(){return Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ye.apply(this,arguments)};function Qe(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Je(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Xe(e){return this instanceof Xe?(this.v=e,this):new Xe(e)}var Ze,et,tt,nt,rt=n(Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}Ge(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return Ye},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])},__values:Qe,__read:Je,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Je(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:Xe,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof Xe?Promise.resolve(e.value.v).then(c,u):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:Xe(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Qe(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}));function it(){if(nt)return tt;nt=1;const e=function(){if(et)return Ze;function e(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}return et=1,Ze=function(t,n,r){var i=r&&r.stringify||e;if("object"==typeof t&&null!==t){var o=n.length+1;if(1===o)return t;var s=new Array(o);s[0]=i(t);for(var a=1;a<o;a++)s[a]=i(n[a]);return s.join(" ")}if("string"!=typeof t)return t;var c=n.length;if(0===c)return t;for(var u="",l=0,f=-1,h=t&&t.length||0,d=0;d<h;){if(37===t.charCodeAt(d)&&d+1<h){switch(f=f>-1?f:0,t.charCodeAt(d+1)){case 100:case 102:if(l>=c||null==n[l])break;f<d&&(u+=t.slice(f,d)),u+=Number(n[l]),f=d+2,d++;break;case 105:if(l>=c||null==n[l])break;f<d&&(u+=t.slice(f,d)),u+=Math.floor(Number(n[l])),f=d+2,d++;break;case 79:case 111:case 106:if(l>=c||void 0===n[l])break;f<d&&(u+=t.slice(f,d));var p=typeof n[l];if("string"===p){u+="'"+n[l]+"'",f=d+2,d++;break}if("function"===p){u+=n[l].name||"<anonymous>",f=d+2,d++;break}u+=i(n[l]),f=d+2,d++;break;case 115:if(l>=c)break;f<d&&(u+=t.slice(f,d)),u+=String(n[l]),f=d+2,d++;break;case 37:f<d&&(u+=t.slice(f,d)),u+="%",f=d+2,d++,l--}++l}++d}return-1===f?t:(f<h&&(u+=t.slice(f)),u)}}();tt=r;const t=function(){function e(e){return typeof e<"u"&&e}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}().console||{},n={mapHttpRequest:h,mapHttpResponse:h,wrapRequestSerializer:d,wrapResponseSerializer:d,wrapErrorSerializer:d,req:h,res:h,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)void 0===t[n]&&(t[n]=e[n]);return t}};function r(e){(e=e||{}).browser=e.browser||{};const n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");const o=e.browser.write||t;e.browser.write&&(e.browser.asObject=!0);const s=e.serializers||{},u=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,s);let h=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);"function"==typeof o&&(o.error=o.fatal=o.warn=o.info=o.debug=o.trace=o),!1===e.enabled&&(e.level="silent");const d=e.level||"info",g=Object.create(o);g.log||(g.log=p),Object.defineProperty(g,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(g,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,i(y,g,"error","log"),i(y,g,"fatal","error"),i(y,g,"warn","error"),i(y,g,"info","log"),i(y,g,"debug","log"),i(y,g,"trace","log")}});const y={transmit:n,serialize:u,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:f(e)};return g.levels=r.levels,g.level=d,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=p,g.serializers=s,g._serialize=u,g._stdErrSerialize=h,g.child=function(t,r){if(!t)throw new Error("missing bindings for child Pino");r=r||{},u&&t.serializers&&(r.serializers=t.serializers);const i=r.serializers;if(u&&i){var o=Object.assign({},s,i),f=!0===e.browser.serialize?Object.keys(o):u;delete t.serializers,a([t],f,o,this._stdErrSerialize)}function h(e){this._childLevel=1+(0|e._childLevel),this.error=c(e,t,"error"),this.fatal=c(e,t,"fatal"),this.warn=c(e,t,"warn"),this.info=c(e,t,"info"),this.debug=c(e,t,"debug"),this.trace=c(e,t,"trace"),o&&(this.serializers=o,this._serialize=f),n&&(this._logEvent=l([].concat(e._logEvent.bindings,t)))}return h.prototype=this,new h(this)},n&&(g._logEvent=l()),g}function i(e,n,r,i){const s=Object.getPrototypeOf(n);n[r]=n.levelVal>n.levels.values[r]?p:s[r]?s[r]:t[r]||t[i]||p,o(e,n,r)}function o(e,n,i){!e.transmit&&n[i]===p||(n[i]=function(o){return function(){const c=e.timestamp(),l=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var h=0;h<l.length;h++)l[h]=arguments[h];if(e.serialize&&!e.asObject&&a(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?o.call(f,s(this,i,l,c)):o.apply(f,l),e.transmit){const t=e.transmit.level||n.level,o=r.levels.values[t],s=r.levels.values[i];if(s<o)return;u(this,{ts:c,methodLevel:i,methodValue:s,transmitLevel:t,transmitValue:r.levels.values[e.transmit.level||n.level],send:e.transmit.send,val:n.levelVal},l)}}}(n[i]))}function s(t,n,i,o){t._serialize&&a(i,t._serialize,t.serializers,t._stdErrSerialize);const s=i.slice();let c=s[0];const u={};o&&(u.time=o),u.level=r.levels.values[n];let l=1+(0|t._childLevel);if(l<1&&(l=1),null!==c&&"object"==typeof c){for(;l--&&"object"==typeof s[0];)Object.assign(u,s.shift());c=s.length?e(s.shift(),s):void 0}else"string"==typeof c&&(c=e(s.shift(),s));return void 0!==c&&(u.msg=c),u}function a(e,t,n,i){for(const o in e)if(i&&e[o]instanceof Error)e[o]=r.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o]))for(const r in e[o])t&&t.indexOf(r)>-1&&r in n&&(e[o][r]=n[r](e[o][r]))}function c(e,t,n){return function(){const r=new Array(1+arguments.length);r[0]=t;for(var i=1;i<r.length;i++)r[i]=arguments[i-1];return e[n].apply(this,r)}}function u(e,t,n){const r=t.send,i=t.ts,o=t.methodLevel,s=t.methodValue,c=t.val,u=e._logEvent.bindings;a(n,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=n.filter((function(e){return-1===u.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=s,r(o,e._logEvent,c),e._logEvent=l(u)}function l(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function f(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?g:y}function h(){return{}}function d(e){return e}function p(){}function g(){return!1}function y(){return Date.now()}return r.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},r.stdSerializers=n,r.stdTimeFunctions=Object.assign({},{nullTime:g,epochTime:y,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),tt}var ot,st={};function at(){return ot||(ot=1,Object.defineProperty(st,"__esModule",{value:!0}),st.PINO_CUSTOM_CONTEXT_KEY=st.PINO_LOGGER_DEFAULTS=void 0,st.PINO_LOGGER_DEFAULTS={level:"info"},st.PINO_CUSTOM_CONTEXT_KEY="custom_context"),st}var ct,ut={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=rt,n=t.__importDefault(it());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return n.default}}),t.__exportStar(at(),e),t.__exportStar(function(){if(ct)return ut;ct=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.generateChildLogger=ut.formatChildLoggerContext=ut.getLoggerContext=ut.setBrowserLoggerContext=ut.getBrowserLoggerContext=ut.getDefaultLoggerOptions=void 0;const e=at();function t(t,n=e.PINO_CUSTOM_CONTEXT_KEY){return t[n]||""}function n(t,n,r=e.PINO_CUSTOM_CONTEXT_KEY){return t[r]=n,t}function r(n,r=e.PINO_CUSTOM_CONTEXT_KEY){let i="";return i=typeof n.bindings>"u"?t(n,r):n.bindings().context||"",i}function i(t,n,i=e.PINO_CUSTOM_CONTEXT_KEY){const o=r(t,i);return o.trim()?`${o}/${n}`:n}return ut.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:t?.level||e.PINO_LOGGER_DEFAULTS.level})},ut.getBrowserLoggerContext=t,ut.setBrowserLoggerContext=n,ut.getLoggerContext=r,ut.formatChildLoggerContext=i,ut.generateChildLogger=function(t,r,o=e.PINO_CUSTOM_CONTEXT_KEY){const s=i(t,r,o);return n(t.child({context:s}),s,o)},ut}(),e)}(Ke);class lt extends Ue{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class ft extends Ue{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class ht{constructor(e,t){this.logger=e,this.core=t}}class dt extends Ue{constructor(e,t){super(),this.relayer=e,this.logger=t}}class pt extends Ue{constructor(e){super()}}class gt{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}}class yt extends Ue{constructor(e,t){super(),this.relayer=e,this.logger=t}}class mt extends Ue{constructor(e,t){super(),this.core=e,this.logger=t}}class vt{constructor(e,t){this.projectId=e,this.logger=t}}class _t{constructor(e,t){this.projectId=e,this.logger=t}}class bt{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class wt{constructor(e){this.client=e}}var Et={},St={},Ot={},Rt={};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.BrowserRandomSource=void 0;Rt.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var It={},xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e};var Ct=n(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(It,"__esModule",{value:!0}),It.NodeRandomSource=void 0;const Pt=xt;It.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=Ct;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,Pt.wipe)(t),n}},Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.SystemRandomSource=void 0;const kt=Rt,Nt=It;Ot.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new kt.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new Nt.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}};var At={},Tt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}})(Tt),Object.defineProperty(At,"__esModule",{value:!0});var Mt=Tt;function Lt(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function Ut(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function jt(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function Dt(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function zt(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function Bt(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function Ft(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function Ht(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function qt(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Ft(e/4294967296>>>0,t,n),Ft(e>>>0,t,n+4),t}function $t(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Ht(e>>>0,t,n),Ht(e/4294967296>>>0,t,n+4),t}At.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},At.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},At.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},At.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},At.writeUint16BE=Lt,At.writeInt16BE=Lt,At.writeUint16LE=Ut,At.writeInt16LE=Ut,At.readInt32BE=jt,At.readUint32BE=Dt,At.readInt32LE=zt,At.readUint32LE=Bt,At.writeUint32BE=Ft,At.writeInt32BE=Ft,At.writeUint32LE=Ht,At.writeInt32LE=Ht,At.readInt64BE=function(e,t){void 0===t&&(t=0);var n=jt(e,t),r=jt(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},At.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*Dt(e,t)+Dt(e,t+4)},At.readInt64LE=function(e,t){void 0===t&&(t=0);var n=zt(e,t);return 4294967296*zt(e,t+4)+n-4294967296*(n>>31)},At.readUint64LE=function(e,t){void 0===t&&(t=0);var n=Bt(e,t);return 4294967296*Bt(e,t+4)+n},At.writeUint64BE=qt,At.writeInt64BE=qt,At.writeUint64LE=$t,At.writeInt64LE=$t,At.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},At.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},At.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!Mt.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},At.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Mt.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},At.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},At.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},At.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},At.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},At.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},At.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},At.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},At.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=Ot,n=At,r=xt;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const o=i(4,t),s=(0,n.readUint32LE)(o);return(0,r.wipe)(o),s};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(t,n=o,s=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let a="";const c=n.length,u=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/u),s);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<u&&(a+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return a}e.randomString=s,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return s(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(St);var Vt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=At,n=xt;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},r.prototype.update=function(t,n){if(void 0===n&&(n=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var r=0;if(this._bytesHashed+=n,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&n>0;)this._buffer[this._bufferLength++]=t[r++],n--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(n>=this.blockSize&&(r=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,r,n),n%=this.blockSize);n>0;)this._buffer[this._bufferLength++]=t[r++],n--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c<a-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,a),this._finished=!0}for(c=0;c<this.digestLength/8;c++)t.writeUint32BE(this._stateHi[c],e,8*c),t.writeUint32BE(this._stateLo[c],e,8*c+4);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.stateHi),n.wipe(e.stateLo),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA512=r;var i=new Int32Array([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 o(e,n,r,o,s,a,c){for(var u,l,f,h,d,p,g,y,m=r[0],v=r[1],_=r[2],b=r[3],w=r[4],E=r[5],S=r[6],O=r[7],R=o[0],I=o[1],x=o[2],C=o[3],P=o[4],k=o[5],N=o[6],A=o[7];c>=128;){for(var T=0;T<16;T++){var M=8*T+a;e[T]=t.readUint32BE(s,M),n[T]=t.readUint32BE(s,M+4)}for(T=0;T<80;T++){var L,U,j=m,D=v,z=_,B=b,F=w,H=E,q=S,$=R,V=I,W=x,K=C,G=P,Y=k,Q=N;if(d=65535&(l=A),p=l>>>16,g=65535&(u=O),y=u>>>16,d+=65535&(l=(P>>>14|w<<18)^(P>>>18|w<<14)^(w>>>9|P<<23)),p+=l>>>16,g+=65535&(u=(w>>>14|P<<18)^(w>>>18|P<<14)^(P>>>9|w<<23)),y+=u>>>16,d+=65535&(l=P&k^~P&N),p+=l>>>16,g+=65535&(u=w&E^~w&S),y+=u>>>16,u=i[2*T],d+=65535&(l=i[2*T+1]),p+=l>>>16,g+=65535&u,y+=u>>>16,u=e[T%16],p+=(l=n[T%16])>>>16,g+=65535&u,y+=u>>>16,g+=(p+=(d+=65535&l)>>>16)>>>16,d=65535&(l=h=65535&d|p<<16),p=l>>>16,g=65535&(u=f=65535&g|(y+=g>>>16)<<16),y=u>>>16,d+=65535&(l=(R>>>28|m<<4)^(m>>>2|R<<30)^(m>>>7|R<<25)),p+=l>>>16,g+=65535&(u=(m>>>28|R<<4)^(R>>>2|m<<30)^(R>>>7|m<<25)),y+=u>>>16,p+=(l=R&I^R&x^I&x)>>>16,g+=65535&(u=m&v^m&_^v&_),y+=u>>>16,L=65535&(g+=(p+=(d+=65535&l)>>>16)>>>16)|(y+=g>>>16)<<16,U=65535&d|p<<16,d=65535&(l=K),p=l>>>16,g=65535&(u=B),y=u>>>16,p+=(l=h)>>>16,g+=65535&(u=f),y+=u>>>16,v=j,_=D,b=z,w=B=65535&(g+=(p+=(d+=65535&l)>>>16)>>>16)|(y+=g>>>16)<<16,E=F,S=H,O=q,m=L,I=$,x=V,C=W,P=K=65535&d|p<<16,k=G,N=Y,A=Q,R=U,T%16==15)for(M=0;M<16;M++)u=e[M],d=65535&(l=n[M]),p=l>>>16,g=65535&u,y=u>>>16,u=e[(M+9)%16],d+=65535&(l=n[(M+9)%16]),p+=l>>>16,g+=65535&u,y+=u>>>16,f=e[(M+1)%16],d+=65535&(l=((h=n[(M+1)%16])>>>1|f<<31)^(h>>>8|f<<24)^(h>>>7|f<<25)),p+=l>>>16,g+=65535&(u=(f>>>1|h<<31)^(f>>>8|h<<24)^f>>>7),y+=u>>>16,f=e[(M+14)%16],p+=(l=((h=n[(M+14)%16])>>>19|f<<13)^(f>>>29|h<<3)^(h>>>6|f<<26))>>>16,g+=65535&(u=(f>>>19|h<<13)^(h>>>29|f<<3)^f>>>6),y+=u>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,e[M]=65535&g|y<<16,n[M]=65535&d|p<<16}d=65535&(l=R),p=l>>>16,g=65535&(u=m),y=u>>>16,u=r[0],p+=(l=o[0])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[0]=m=65535&g|y<<16,o[0]=R=65535&d|p<<16,d=65535&(l=I),p=l>>>16,g=65535&(u=v),y=u>>>16,u=r[1],p+=(l=o[1])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[1]=v=65535&g|y<<16,o[1]=I=65535&d|p<<16,d=65535&(l=x),p=l>>>16,g=65535&(u=_),y=u>>>16,u=r[2],p+=(l=o[2])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[2]=_=65535&g|y<<16,o[2]=x=65535&d|p<<16,d=65535&(l=C),p=l>>>16,g=65535&(u=b),y=u>>>16,u=r[3],p+=(l=o[3])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[3]=b=65535&g|y<<16,o[3]=C=65535&d|p<<16,d=65535&(l=P),p=l>>>16,g=65535&(u=w),y=u>>>16,u=r[4],p+=(l=o[4])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[4]=w=65535&g|y<<16,o[4]=P=65535&d|p<<16,d=65535&(l=k),p=l>>>16,g=65535&(u=E),y=u>>>16,u=r[5],p+=(l=o[5])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[5]=E=65535&g|y<<16,o[5]=k=65535&d|p<<16,d=65535&(l=N),p=l>>>16,g=65535&(u=S),y=u>>>16,u=r[6],p+=(l=o[6])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[6]=S=65535&g|y<<16,o[6]=N=65535&d|p<<16,d=65535&(l=A),p=l>>>16,g=65535&(u=O),y=u>>>16,u=r[7],p+=(l=o[7])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[7]=O=65535&g|y<<16,o[7]=A=65535&d|p<<16,a+=128,c-=128}return a}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}})(Vt),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const t=St,n=Vt,r=xt;function i(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32,new Uint8Array(32)[0]=9;const o=i(),s=i([1]),a=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),f=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t){for(let n=0;n<16;n++)e[n]=0|t[n]}function d(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function p(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function g(e,t){const n=i(),r=i();for(let e=0;e<16;e++)r[e]=t[e];d(r),d(r),d(r);for(let e=0;e<2;e++){n[0]=r[0]-65517;for(let e=1;e<15;e++)n[e]=r[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,p(r,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&r[t],e[2*t+1]=r[t]>>8}function y(e,t){let n=0;for(let r=0;r<32;r++)n|=e[r]^t[r];return(1&n-1>>>8)-1}function m(e,t){const n=new Uint8Array(32),r=new Uint8Array(32);return g(n,e),g(r,t),y(n,r)}function v(e){const t=new Uint8Array(32);return g(t,e),1&t[0]}function _(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function b(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function w(e,t,n){let r,i,o=0,s=0,a=0,c=0,u=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,m=0,v=0,_=0,b=0,w=0,E=0,S=0,O=0,R=0,I=0,x=0,C=0,P=0,k=0,N=0,A=0,T=0,M=0,L=0,U=n[0],j=n[1],D=n[2],z=n[3],B=n[4],F=n[5],H=n[6],q=n[7],$=n[8],V=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*U,s+=r*j,a+=r*D,c+=r*z,u+=r*B,l+=r*F,f+=r*H,h+=r*q,d+=r*$,p+=r*V,g+=r*W,y+=r*K,m+=r*G,v+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*U,a+=r*j,c+=r*D,u+=r*z,l+=r*B,f+=r*F,h+=r*H,d+=r*q,p+=r*$,g+=r*V,y+=r*W,m+=r*K,v+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*U,c+=r*j,u+=r*D,l+=r*z,f+=r*B,h+=r*F,d+=r*H,p+=r*q,g+=r*$,y+=r*V,m+=r*W,v+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],c+=r*U,u+=r*j,l+=r*D,f+=r*z,h+=r*B,d+=r*F,p+=r*H,g+=r*q,y+=r*$,m+=r*V,v+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],u+=r*U,l+=r*j,f+=r*D,h+=r*z,d+=r*B,p+=r*F,g+=r*H,y+=r*q,m+=r*$,v+=r*V,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*U,f+=r*j,h+=r*D,d+=r*z,p+=r*B,g+=r*F,y+=r*H,m+=r*q,v+=r*$,_+=r*V,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,R+=r*J,r=t[6],f+=r*U,h+=r*j,d+=r*D,p+=r*z,g+=r*B,y+=r*F,m+=r*H,v+=r*q,_+=r*$,b+=r*V,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,R+=r*Q,I+=r*J,r=t[7],h+=r*U,d+=r*j,p+=r*D,g+=r*z,y+=r*B,m+=r*F,v+=r*H,_+=r*q,b+=r*$,w+=r*V,E+=r*W,S+=r*K,O+=r*G,R+=r*Y,I+=r*Q,x+=r*J,r=t[8],d+=r*U,p+=r*j,g+=r*D,y+=r*z,m+=r*B,v+=r*F,_+=r*H,b+=r*q,w+=r*$,E+=r*V,S+=r*W,O+=r*K,R+=r*G,I+=r*Y,x+=r*Q,C+=r*J,r=t[9],p+=r*U,g+=r*j,y+=r*D,m+=r*z,v+=r*B,_+=r*F,b+=r*H,w+=r*q,E+=r*$,S+=r*V,O+=r*W,R+=r*K,I+=r*G,x+=r*Y,C+=r*Q,P+=r*J,r=t[10],g+=r*U,y+=r*j,m+=r*D,v+=r*z,_+=r*B,b+=r*F,w+=r*H,E+=r*q,S+=r*$,O+=r*V,R+=r*W,I+=r*K,x+=r*G,C+=r*Y,P+=r*Q,k+=r*J,r=t[11],y+=r*U,m+=r*j,v+=r*D,_+=r*z,b+=r*B,w+=r*F,E+=r*H,S+=r*q,O+=r*$,R+=r*V,I+=r*W,x+=r*K,C+=r*G,P+=r*Y,k+=r*Q,N+=r*J,r=t[12],m+=r*U,v+=r*j,_+=r*D,b+=r*z,w+=r*B,E+=r*F,S+=r*H,O+=r*q,R+=r*$,I+=r*V,x+=r*W,C+=r*K,P+=r*G,k+=r*Y,N+=r*Q,A+=r*J,r=t[13],v+=r*U,_+=r*j,b+=r*D,w+=r*z,E+=r*B,S+=r*F,O+=r*H,R+=r*q,I+=r*$,x+=r*V,C+=r*W,P+=r*K,k+=r*G,N+=r*Y,A+=r*Q,T+=r*J,r=t[14],_+=r*U,b+=r*j,w+=r*D,E+=r*z,S+=r*B,O+=r*F,R+=r*H,I+=r*q,x+=r*$,C+=r*V,P+=r*W,k+=r*K,N+=r*G,A+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*U,w+=r*j,E+=r*D,S+=r*z,O+=r*B,R+=r*F,I+=r*H,x+=r*q,C+=r*$,P+=r*V,k+=r*W,N+=r*K,A+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,c+=38*O,u+=38*R,l+=38*I,f+=38*x,h+=38*C,d+=38*P,p+=38*k,g+=38*N,y+=38*A,m+=38*T,v+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=m,e[13]=v,e[14]=_,e[15]=b}function E(e,t){w(e,t,t)}function S(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)E(n,n),2!==r&&4!==r&&w(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function O(e,t){const n=i(),r=i(),o=i(),s=i(),a=i(),u=i(),l=i(),f=i(),h=i();b(n,e[1],e[0]),b(h,t[1],t[0]),w(n,n,h),_(r,e[0],e[1]),_(h,t[0],t[1]),w(r,r,h),w(o,e[3],t[3]),w(o,o,c),w(s,e[2],t[2]),_(s,s,s),b(a,r,n),b(u,s,o),_(l,s,o),_(f,r,n),w(e[0],a,u),w(e[1],f,l),w(e[2],l,u),w(e[3],a,f)}function R(e,t,n){for(let r=0;r<4;r++)p(e[r],t[r],n)}function I(e,t){const n=i(),r=i(),o=i();S(o,t[2]),w(n,t[0],o),w(r,t[1],o),g(e,r),e[31]^=v(n)<<7}function x(e,t,n){h(e[0],o),h(e[1],s),h(e[2],s),h(e[3],o);for(let r=255;r>=0;--r){const i=n[r/8|0]>>(7&r)&1;R(e,t,i),O(t,e),O(e,e),R(e,t,i)}}function C(e,t){const n=[i(),i(),i(),i()];h(n[0],u),h(n[1],l),h(n[2],s),w(n[3],u,l),x(e,n,t)}function P(t){if(t.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const r=(0,n.hash)(t);r[0]&=248,r[31]&=127,r[31]|=64;const o=new Uint8Array(32),s=[i(),i(),i(),i()];C(s,r),I(o,s);const a=new Uint8Array(64);return a.set(t),a.set(o,32),{publicKey:o,secretKey:a}}e.generateKeyPairFromSeed=P,e.generateKeyPair=function(e){const n=(0,t.randomBytes)(32,e),i=P(n);return(0,r.wipe)(n),i},e.extractPublicKeyFromSecretKey=function(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(t.subarray(32))};const k=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function N(e,t){let n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;i<o;++i)t[i]+=n-16*t[r]*k[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*k[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*k[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function A(e){const t=new Float64Array(64);for(let n=0;n<64;n++)t[n]=e[n];for(let t=0;t<64;t++)e[t]=0;N(e,t)}function T(e,t){const n=i(),r=i(),c=i(),u=i(),l=i(),d=i(),p=i();return h(e[2],s),function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(e[1],t),E(c,e[1]),w(u,c,a),b(c,c,e[2]),_(u,e[2],u),E(l,u),E(d,l),w(p,d,l),w(n,p,c),w(n,n,u),function(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)E(n,n),1!==r&&w(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(n,n),w(n,n,c),w(n,n,u),w(n,n,u),w(e[0],n,u),E(r,e[0]),w(r,r,u),m(r,c)&&w(e[0],e[0],f),E(r,e[0]),w(r,r,u),m(r,c)?-1:(v(e[0])===t[31]>>7&&b(e[0],o,e[0]),w(e[3],e[0],e[1]),0)}e.sign=function(e,t){const r=new Float64Array(64),o=[i(),i(),i(),i()],s=(0,n.hash)(e.subarray(0,32));s[0]&=248,s[31]&=127,s[31]|=64;const a=new Uint8Array(64);a.set(s.subarray(32),32);const c=new n.SHA512;c.update(a.subarray(32)),c.update(t);const u=c.digest();c.clean(),A(u),C(o,u),I(a,o),c.reset(),c.update(a.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const l=c.digest();A(l);for(let e=0;e<32;e++)r[e]=u[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=l[e]*s[t];return N(a.subarray(32),r),a},e.verify=function(t,r,o){const s=new Uint8Array(32),a=[i(),i(),i(),i()],c=[i(),i(),i(),i()];if(o.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(T(c,t))return!1;const u=new n.SHA512;u.update(o.subarray(0,32)),u.update(t),u.update(r);const l=u.digest();return A(l),x(a,c,l),C(c,o.subarray(32)),O(a,c),I(s,a),!y(o,s)},e.convertPublicKeyToX25519=function(e){let t=[i(),i(),i(),i()];if(T(t,e))throw new Error("Ed25519: invalid public key");let n=i(),r=i(),o=t[1];_(n,s,o),b(r,s,o),S(r,r),w(n,n,r);let a=new Uint8Array(32);return g(a,n),a},e.convertSecretKeyToX25519=function(e){const t=(0,n.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;const i=new Uint8Array(t.subarray(0,32));return(0,r.wipe)(t),i}}(Et);const Wt="base64url",Kt="did",Gt="key",Yt="base58btc";function Qt(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Jt(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Qt(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function Xt(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=Jt(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return Qt(n)}var Zt=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,c=e.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var o=(e.length-t)*u+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,u=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*u[d]>>>0,u[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===u[p];)p++;for(var g=c.repeat(n);p<s;++p)g+=e.charAt(u[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}};const en=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class tn{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class nn{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return on(this,e)}}class rn{constructor(e){this.decoders=e}or(e){return on(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const on=(e,t)=>new rn({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class sn{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new tn(e,t,n),this.decoder=new nn(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const an=({name:e,prefix:t,encode:n,decode:r})=>new sn(e,t,n,r),cn=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=Zt(n,t);return an({prefix:e,name:t,encode:r,decode:e=>en(i(e))})},un=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>an({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,c=0,u=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);c=c<<n|o,a+=n,a>=8&&(a-=8,s[u++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)}),ln=an({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var fn=Object.freeze({__proto__:null,identity:ln});const hn=un({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var dn=Object.freeze({__proto__:null,base2:hn});const pn=un({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var gn=Object.freeze({__proto__:null,base8:pn});const yn=cn({prefix:"9",name:"base10",alphabet:"0123456789"});var mn=Object.freeze({__proto__:null,base10:yn});const vn=un({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),_n=un({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var bn=Object.freeze({__proto__:null,base16:vn,base16upper:_n});const wn=un({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),En=un({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Sn=un({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),On=un({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Rn=un({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),In=un({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),xn=un({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Cn=un({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Pn=un({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var kn=Object.freeze({__proto__:null,base32:wn,base32upper:En,base32pad:Sn,base32padupper:On,base32hex:Rn,base32hexupper:In,base32hexpad:xn,base32hexpadupper:Cn,base32z:Pn});const Nn=cn({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),An=cn({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Tn=Object.freeze({__proto__:null,base36:Nn,base36upper:An});const Mn=cn({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ln=cn({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Un=Object.freeze({__proto__:null,base58btc:Mn,base58flickr:Ln});const jn=un({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Dn=un({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),zn=un({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Bn=un({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Fn=Object.freeze({__proto__:null,base64:jn,base64pad:Dn,base64url:zn,base64urlpad:Bn});const Hn=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),qn=Hn.reduce(((e,t,n)=>(e[n]=t,e)),[]),$n=Hn.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const Vn=an({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+qn[t]),"")},decode:function(e){const t=[];for(const n of e){const e=$n[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var Wn=Object.freeze({__proto__:null,base256emoji:Vn}),Kn=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=Qn;)n[r++]=255&t|Gn,t/=128;for(;t&Yn;)n[r++]=255&t|Gn,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},Gn=128,Yn=-128,Qn=Math.pow(2,31);var Jn=function e(t,n){var r,i=0,o=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],i+=o<28?(r&Zn)<<o:(r&Zn)*Math.pow(2,o),o+=7}while(r>=Xn);return e.bytes=s-n,i},Xn=128,Zn=127;var er=Math.pow(2,7),tr=Math.pow(2,14),nr=Math.pow(2,21),rr=Math.pow(2,28),ir=Math.pow(2,35),or=Math.pow(2,42),sr=Math.pow(2,49),ar=Math.pow(2,56),cr=Math.pow(2,63),ur={encode:Kn,decode:Jn,encodingLength:function(e){return e<er?1:e<tr?2:e<nr?3:e<rr?4:e<ir?5:e<or?6:e<sr?7:e<ar?8:e<cr?9:10}};const lr=(e,t,n=0)=>(ur.encode(e,t,n),t),fr=e=>ur.encodingLength(e),hr=(e,t)=>{const n=t.byteLength,r=fr(e),i=r+fr(n),o=new Uint8Array(i+n);return lr(e,o,0),lr(n,o,r),o.set(t,i),new dr(e,n,t,o)};class dr{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const pr=({name:e,code:t,encode:n})=>new gr(e,t,n);class gr{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?hr(this.code,t):t.then((e=>hr(this.code,e)))}throw Error("Unknown type, must be binary type")}}const yr=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),mr=pr({name:"sha2-256",code:18,encode:yr("SHA-256")}),vr=pr({name:"sha2-512",code:19,encode:yr("SHA-512")});Object.freeze({__proto__:null,sha256:mr,sha512:vr});const _r=en;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:_r,digest:e=>hr(0,_r(e))}}),new TextEncoder,new TextDecoder;const br={...fn,...dn,...gn,...mn,...bn,...kn,...Tn,...Un,...Fn,...Wn};function wr(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const Er=wr("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Sr=wr("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=Jt((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),Or={utf8:Er,"utf-8":Er,hex:br.base16,latin1:Sr,ascii:Sr,binary:Sr,...br};function Rr(e,t="utf8"){const n=Or[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}function Ir(e,t="utf8"){const n=Or[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):Qt(globalThis.Buffer.from(e,"utf-8"))}function xr(e){return Rr(Ir(q(e),"utf8"),Wt)}function Cr(e){const t="z"+Rr(Xt([Ir("K36",Yt),e]),Yt);return[Kt,Gt,t].join(":")}function Pr(e){return Rr(e,Wt)}function kr(e=St.randomBytes(32)){return Et.generateKeyPairFromSeed(e)}async function Nr(e,t,n,r,i=se.fromMiliseconds(Date.now())){const o={alg:"EdDSA",typ:"JWT"},s={iss:Cr(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},a=function(e){return Ir([xr(e.header),xr(e.payload)].join("."),"utf8")}({header:o,payload:s});return function(e){return[xr(e.header),xr(e.payload),Pr(e.signature)].join(".")}({header:o,payload:s,signature:Et.sign(r.secretKey,a)})}var Ar={},Tr={};Object.defineProperty(Tr,"__esModule",{value:!0});var Mr=At,Lr=xt;function Ur(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,s=1797285236,a=n[3]<<24|n[2]<<16|n[1]<<8|n[0],c=n[7]<<24|n[6]<<16|n[5]<<8|n[4],u=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],f=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],d=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],m=t[11]<<24|t[10]<<16|t[9]<<8|t[8],v=t[15]<<24|t[14]<<16|t[13]<<8|t[12],_=r,b=i,w=o,E=s,S=a,O=c,R=u,I=l,x=f,C=h,P=d,k=p,N=g,A=y,T=m,M=v,L=0;L<20;L+=2)S=(S^=x=x+(N=(N^=_=_+S|0)>>>16|N<<16)|0)>>>20|S<<12,O=(O^=C=C+(A=(A^=b=b+O|0)>>>16|A<<16)|0)>>>20|O<<12,R=(R^=P=P+(T=(T^=w=w+R|0)>>>16|T<<16)|0)>>>20|R<<12,I=(I^=k=k+(M=(M^=E=E+I|0)>>>16|M<<16)|0)>>>20|I<<12,R=(R^=P=P+(T=(T^=w=w+R|0)>>>24|T<<8)|0)>>>25|R<<7,I=(I^=k=k+(M=(M^=E=E+I|0)>>>24|M<<8)|0)>>>25|I<<7,O=(O^=C=C+(A=(A^=b=b+O|0)>>>24|A<<8)|0)>>>25|O<<7,S=(S^=x=x+(N=(N^=_=_+S|0)>>>24|N<<8)|0)>>>25|S<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,R=(R^=k=k+(N=(N^=b=b+R|0)>>>16|N<<16)|0)>>>20|R<<12,I=(I^=x=x+(A=(A^=w=w+I|0)>>>16|A<<16)|0)>>>20|I<<12,S=(S^=C=C+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,I=(I^=x=x+(A=(A^=w=w+I|0)>>>24|A<<8)|0)>>>25|I<<7,S=(S^=C=C+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,R=(R^=k=k+(N=(N^=b=b+R|0)>>>24|N<<8)|0)>>>25|R<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;Mr.writeUint32LE(_+r|0,e,0),Mr.writeUint32LE(b+i|0,e,4),Mr.writeUint32LE(w+o|0,e,8),Mr.writeUint32LE(E+s|0,e,12),Mr.writeUint32LE(S+a|0,e,16),Mr.writeUint32LE(O+c|0,e,20),Mr.writeUint32LE(R+u|0,e,24),Mr.writeUint32LE(I+l|0,e,28),Mr.writeUint32LE(x+f|0,e,32),Mr.writeUint32LE(C+h|0,e,36),Mr.writeUint32LE(P+d|0,e,40),Mr.writeUint32LE(k+p|0,e,44),Mr.writeUint32LE(N+g|0,e,48),Mr.writeUint32LE(A+y|0,e,52),Mr.writeUint32LE(T+m|0,e,56),Mr.writeUint32LE(M+v|0,e,60)}function jr(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var o,s;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=(o=new Uint8Array(16)).length-t.length,o.set(t,s)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,s=i}for(var a=new Uint8Array(64),c=0;c<n.length;c+=64){Ur(a,o,e);for(var u=c;u<c+64&&u<n.length;u++)r[u]=n[u]^a[u-c];Dr(o,0,s)}return Lr.wipe(a),0===i&&Lr.wipe(o),r}function Dr(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}Tr.streamXOR=jr,Tr.stream=function(e,t,n,r){return void 0===r&&(r=0),Lr.wipe(n),jr(e,t,n,n,r)};var zr={},Br={};function Fr(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(Br,"__esModule",{value:!0}),Br.select=function(e,t,n){return~(e-1)&t|e-1&n},Br.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},Br.compare=Fr,Br.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==Fr(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Br,n=xt;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var u=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],f=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],g=this._r[1],y=this._r[2],m=this._r[3],v=this._r[4],_=this._r[5],b=this._r[6],w=this._r[7],E=this._r[8],S=this._r[9];n>=16;){var O=e[t+0]|e[t+1]<<8;i+=8191&O;var R=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|R<<3);var I=e[t+4]|e[t+5]<<8;s+=8191&(R>>>10|I<<6);var x=e[t+6]|e[t+7]<<8;a+=8191&(I>>>7|x<<9);var C=e[t+8]|e[t+9]<<8;c+=8191&(x>>>4|C<<12),u+=C>>>1&8191;var P=e[t+10]|e[t+11]<<8;l+=8191&(C>>>14|P<<2);var k=e[t+12]|e[t+13]<<8;f+=8191&(P>>>11|k<<5);var N=e[t+14]|e[t+15]<<8,A=0,T=A;T+=i*p,T+=o*(5*S),T+=s*(5*E),T+=a*(5*w),A=(T+=c*(5*b))>>>13,T&=8191,T+=u*(5*_),T+=l*(5*v),T+=f*(5*m),T+=(h+=8191&(k>>>8|N<<8))*(5*y);var M=A+=(T+=(d+=N>>>5|r)*(5*g))>>>13;M+=i*g,M+=o*p,M+=s*(5*S),M+=a*(5*E),A=(M+=c*(5*w))>>>13,M&=8191,M+=u*(5*b),M+=l*(5*_),M+=f*(5*v),M+=h*(5*m),A+=(M+=d*(5*y))>>>13,M&=8191;var L=A;L+=i*y,L+=o*g,L+=s*p,L+=a*(5*S),A=(L+=c*(5*E))>>>13,L&=8191,L+=u*(5*w),L+=l*(5*b),L+=f*(5*_),L+=h*(5*v);var U=A+=(L+=d*(5*m))>>>13;U+=i*m,U+=o*y,U+=s*g,U+=a*p,A=(U+=c*(5*S))>>>13,U&=8191,U+=u*(5*E),U+=l*(5*w),U+=f*(5*b),U+=h*(5*_);var j=A+=(U+=d*(5*v))>>>13;j+=i*v,j+=o*m,j+=s*y,j+=a*g,A=(j+=c*p)>>>13,j&=8191,j+=u*(5*S),j+=l*(5*E),j+=f*(5*w),j+=h*(5*b);var D=A+=(j+=d*(5*_))>>>13;D+=i*_,D+=o*v,D+=s*m,D+=a*y,A=(D+=c*g)>>>13,D&=8191,D+=u*p,D+=l*(5*S),D+=f*(5*E),D+=h*(5*w);var z=A+=(D+=d*(5*b))>>>13;z+=i*b,z+=o*_,z+=s*v,z+=a*m,A=(z+=c*y)>>>13,z&=8191,z+=u*g,z+=l*p,z+=f*(5*S),z+=h*(5*E);var B=A+=(z+=d*(5*w))>>>13;B+=i*w,B+=o*b,B+=s*_,B+=a*v,A=(B+=c*m)>>>13,B&=8191,B+=u*y,B+=l*g,B+=f*p,B+=h*(5*S);var F=A+=(B+=d*(5*E))>>>13;F+=i*E,F+=o*w,F+=s*b,F+=a*_,A=(F+=c*v)>>>13,F&=8191,F+=u*m,F+=l*y,F+=f*g,F+=h*p;var H=A+=(F+=d*(5*S))>>>13;H+=i*S,H+=o*E,H+=s*w,H+=a*b,A=(H+=c*_)>>>13,H&=8191,H+=u*v,H+=l*m,H+=f*y,H+=h*g,i=T=8191&(A=(A=((A+=(H+=d*p)>>>13)<<2)+A|0)+(T&=8191)|0),o=M+=A>>>=13,s=L&=8191,a=U&=8191,c=j&=8191,u=D&=8191,l=z&=8191,f=B&=8191,h=F&=8191,d=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=f,this._h[8]=h,this._h[9]=d},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,s[0]=this._h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(zr),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Tr,n=zr,r=xt,i=At,o=Br;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var s=new Uint8Array(16),a=function(){function a(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return a.prototype.seal=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);t.stream(this._key,s,a,4);var c,u=n.length+this.tagLength;if(o){if(o.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(u);return t.streamXOR(this._key,s,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),i),r.wipe(s),c},a.prototype.open=function(e,n,i,s){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var a=new Uint8Array(16);a.set(e,a.length-e.length);var c=new Uint8Array(32);t.stream(this._key,a,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,n.subarray(0,n.length-this.tagLength),i),!o.equal(u,n.subarray(n.length-this.tagLength,n.length)))return null;var l,f=n.length-this.tagLength;if(s){if(s.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");l=s}else l=new Uint8Array(f);return t.streamXOR(this._key,a,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(a),l},a.prototype.clean=function(){return r.wipe(this._key),this},a.prototype._authenticate=function(e,t,o,a){var c=new n.Poly1305(t);a&&(c.update(a),a.length%16>0&&c.update(s.subarray(a.length%16))),c.update(o),o.length%16>0&&c.update(s.subarray(o.length%16));var u=new Uint8Array(8);a&&i.writeUint64LE(a.length,u),c.update(u),i.writeUint64LE(o.length,u),c.update(u);for(var l=c.digest(),f=0;f<l.length;f++)e[f]=l[f];c.clean(),r.wipe(l),r.wipe(u)},a}();e.ChaCha20Poly1305=a}(Ar);var Hr={},qr={},$r={};Object.defineProperty($r,"__esModule",{value:!0}),$r.isSerializableHash=function(e){return typeof e.saveState<"u"&&typeof e.restoreState<"u"&&typeof e.cleanSavedState<"u"},Object.defineProperty(qr,"__esModule",{value:!0});var Vr=$r,Wr=Br,Kr=xt,Gr=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;for(this._inner.update(n),r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),Vr.isSerializableHash(this._inner)&&Vr.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Kr.wipe(n)}return e.prototype.reset=function(){if(!Vr.isSerializableHash(this._inner)||!Vr.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){Vr.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Vr.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!Vr.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!Vr.isSerializableHash(this._inner)||!Vr.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!Vr.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();qr.HMAC=Gr,qr.hmac=function(e,t,n){var r=new Gr(e,t);r.update(n);var i=r.digest();return r.clean(),i},qr.equal=Wr.equal,Object.defineProperty(Hr,"__esModule",{value:!0});var Yr=qr,Qr=xt,Jr=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=Yr.hmac(this._hash,n,t);this._hmac=new Yr.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),Qr.wipe(this._buffer),Qr.wipe(this._counter),this._bufpos=0},e}(),Xr=Hr.HKDF=Jr,Zr={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=At,n=xt;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<a-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(c=0;c<this.digestLength/4;c++)t.writeUint32BE(this._state[c],e,4*c);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([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 o(e,n,r,o,s){for(;s>=64;){for(var a=n[0],c=n[1],u=n[2],l=n[3],f=n[4],h=n[5],d=n[6],p=n[7],g=0;g<16;g++){var y=o+4*g;e[g]=t.readUint32BE(r,y)}for(g=16;g<64;g++){var m=e[g-2],v=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,_=((m=e[g-15])>>>7|m<<25)^(m>>>18|m<<14)^m>>>3;e[g]=(v+e[g-7]|0)+(_+e[g-16]|0)}for(g=0;g<64;g++)v=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&d)|0)+(p+(i[g]+e[g]|0)|0)|0,_=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&u^c&u)|0,p=d,d=h,h=f,f=l+v|0,l=u,u=c,c=a,a=v+_|0;n[0]+=a,n[1]+=c,n[2]+=u,n[3]+=l,n[4]+=f,n[5]+=h,n[6]+=d,n[7]+=p,o+=64,s-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(Zr);var ei={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=St,n=xt;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const o=r([56129,1]);function s(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function a(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function c(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];s(i),s(i),s(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,a(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function l(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function f(e,t,n){let r,i,o=0,s=0,a=0,c=0,u=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,m=0,v=0,_=0,b=0,w=0,E=0,S=0,O=0,R=0,I=0,x=0,C=0,P=0,k=0,N=0,A=0,T=0,M=0,L=0,U=n[0],j=n[1],D=n[2],z=n[3],B=n[4],F=n[5],H=n[6],q=n[7],$=n[8],V=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*U,s+=r*j,a+=r*D,c+=r*z,u+=r*B,l+=r*F,f+=r*H,h+=r*q,d+=r*$,p+=r*V,g+=r*W,y+=r*K,m+=r*G,v+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*U,a+=r*j,c+=r*D,u+=r*z,l+=r*B,f+=r*F,h+=r*H,d+=r*q,p+=r*$,g+=r*V,y+=r*W,m+=r*K,v+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*U,c+=r*j,u+=r*D,l+=r*z,f+=r*B,h+=r*F,d+=r*H,p+=r*q,g+=r*$,y+=r*V,m+=r*W,v+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],c+=r*U,u+=r*j,l+=r*D,f+=r*z,h+=r*B,d+=r*F,p+=r*H,g+=r*q,y+=r*$,m+=r*V,v+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],u+=r*U,l+=r*j,f+=r*D,h+=r*z,d+=r*B,p+=r*F,g+=r*H,y+=r*q,m+=r*$,v+=r*V,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*U,f+=r*j,h+=r*D,d+=r*z,p+=r*B,g+=r*F,y+=r*H,m+=r*q,v+=r*$,_+=r*V,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,R+=r*J,r=t[6],f+=r*U,h+=r*j,d+=r*D,p+=r*z,g+=r*B,y+=r*F,m+=r*H,v+=r*q,_+=r*$,b+=r*V,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,R+=r*Q,I+=r*J,r=t[7],h+=r*U,d+=r*j,p+=r*D,g+=r*z,y+=r*B,m+=r*F,v+=r*H,_+=r*q,b+=r*$,w+=r*V,E+=r*W,S+=r*K,O+=r*G,R+=r*Y,I+=r*Q,x+=r*J,r=t[8],d+=r*U,p+=r*j,g+=r*D,y+=r*z,m+=r*B,v+=r*F,_+=r*H,b+=r*q,w+=r*$,E+=r*V,S+=r*W,O+=r*K,R+=r*G,I+=r*Y,x+=r*Q,C+=r*J,r=t[9],p+=r*U,g+=r*j,y+=r*D,m+=r*z,v+=r*B,_+=r*F,b+=r*H,w+=r*q,E+=r*$,S+=r*V,O+=r*W,R+=r*K,I+=r*G,x+=r*Y,C+=r*Q,P+=r*J,r=t[10],g+=r*U,y+=r*j,m+=r*D,v+=r*z,_+=r*B,b+=r*F,w+=r*H,E+=r*q,S+=r*$,O+=r*V,R+=r*W,I+=r*K,x+=r*G,C+=r*Y,P+=r*Q,k+=r*J,r=t[11],y+=r*U,m+=r*j,v+=r*D,_+=r*z,b+=r*B,w+=r*F,E+=r*H,S+=r*q,O+=r*$,R+=r*V,I+=r*W,x+=r*K,C+=r*G,P+=r*Y,k+=r*Q,N+=r*J,r=t[12],m+=r*U,v+=r*j,_+=r*D,b+=r*z,w+=r*B,E+=r*F,S+=r*H,O+=r*q,R+=r*$,I+=r*V,x+=r*W,C+=r*K,P+=r*G,k+=r*Y,N+=r*Q,A+=r*J,r=t[13],v+=r*U,_+=r*j,b+=r*D,w+=r*z,E+=r*B,S+=r*F,O+=r*H,R+=r*q,I+=r*$,x+=r*V,C+=r*W,P+=r*K,k+=r*G,N+=r*Y,A+=r*Q,T+=r*J,r=t[14],_+=r*U,b+=r*j,w+=r*D,E+=r*z,S+=r*B,O+=r*F,R+=r*H,I+=r*q,x+=r*$,C+=r*V,P+=r*W,k+=r*K,N+=r*G,A+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*U,w+=r*j,E+=r*D,S+=r*z,O+=r*B,R+=r*F,I+=r*H,x+=r*q,C+=r*$,P+=r*V,k+=r*W,N+=r*K,A+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,c+=38*O,u+=38*R,l+=38*I,f+=38*x,h+=38*C,d+=38*P,p+=38*k,g+=38*N,y+=38*A,m+=38*T,v+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=m,e[13]=v,e[14]=_,e[15]=b}function h(e,t){f(e,t,t)}function d(e,t){const n=new Uint8Array(32),i=new Float64Array(80),s=r(),d=r(),p=r(),g=r(),y=r(),m=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)d[e]=i[e];s[0]=g[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;a(s,d,t),a(p,g,t),u(y,s,p),l(s,s,p),u(p,d,g),l(d,d,g),h(g,y),h(m,s),f(s,p,s),f(p,d,y),u(y,s,p),l(s,s,p),h(d,s),l(p,g,m),f(s,p,o),u(s,s,g),f(p,p,s),f(s,g,m),f(g,d,i),h(d,y),a(s,d,t),a(p,g,t)}for(let e=0;e<16;e++)i[e+16]=s[e],i[e+32]=p[e],i[e+48]=d[e],i[e+64]=g[e];const v=i.subarray(32),_=i.subarray(16);(function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)h(n,n),2!==e&&4!==e&&f(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]})(v,v),f(_,_,v);const b=new Uint8Array(32);return c(b,_),b}function p(e){return d(e,i)}function g(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:p(n),secretKey:n}}e.scalarMult=d,e.scalarMultBase=p,e.generateKeyPairFromSeed=g,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=g(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=d(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}(ei);var ti=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ni=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},ri=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},ii=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},oi=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},si=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},ai=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,ci=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],ui=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function li(e){return e?fi(e):typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new si:typeof navigator<"u"?fi(navigator.userAgent):typeof process<"u"&&process.version?new ri(process.version.slice(1)):null}function fi(e){var t=function(e){return""!==e&&ci.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new oi;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<3&&(i=ti(ti([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-i.length),!0)):i=[];var o=i.join("."),s=function(e){for(var t=0,n=ui.length;t<n;t++){var r=ui[t],i=r[0];if(r[1].exec(e))return i}return null}(e),a=ai.exec(e);return a&&a[1]?new ii(n,o,s,a[1]):new ni(n,o,s)}var hi={};function di(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}function pi(e){const t=di(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(hi,"__esModule",{value:!0}),hi.getLocalStorage=hi.getLocalStorageOrThrow=hi.getCrypto=hi.getCryptoOrThrow=mi=hi.getLocation=hi.getLocationOrThrow=yi=hi.getNavigator=hi.getNavigatorOrThrow=gi=hi.getDocument=hi.getDocumentOrThrow=hi.getFromWindowOrThrow=hi.getFromWindow=void 0,hi.getFromWindow=di,hi.getFromWindowOrThrow=pi,hi.getDocumentOrThrow=function(){return pi("document")};var gi=hi.getDocument=function(){return di("document")};hi.getNavigatorOrThrow=function(){return pi("navigator")};var yi=hi.getNavigator=function(){return di("navigator")};hi.getLocationOrThrow=function(){return pi("location")};var mi=hi.getLocation=function(){return di("location")};hi.getCryptoOrThrow=function(){return pi("crypto")},hi.getCrypto=function(){return di("crypto")},hi.getLocalStorageOrThrow=function(){return pi("localStorage")},hi.getLocalStorage=function(){return di("localStorage")};var vi={};Object.defineProperty(vi,"__esModule",{value:!0});var _i=vi.getWindowMetadata=void 0;const bi=hi;_i=vi.getWindowMetadata=function(){let e,t;try{e=bi.getDocumentOrThrow(),t=bi.getLocationOrThrow()}catch{return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const r=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop(),n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:r}};var wi={},Ei=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),Si="%[a-f0-9]{2}",Oi=new RegExp("("+Si+")|([^%]+?)","gi"),Ri=new RegExp("("+Si+")+","gi");function Ii(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],Ii(n),Ii(r))}function xi(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Oi)||[],n=1;n<t.length;n++)t=(e=Ii(t,n).join("")).match(Oi)||[];return e}}var Ci=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=Ri.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=xi(n[0]);r!==n[0]&&(t[n[0]]=r)}n=Ri.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),o=0;o<i.length;o++){var s=i[o];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}},Pi=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},ki=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n};!function(e){const t=Ei,n=Ci,r=Pi,i=ki,o=Symbol("encodeFragmentIdentifier");function s(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function c(e,t){return t.decode?n(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function f(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function d(e,t){s((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=o?c(n,e):n;const s=i||o?n.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===n?n:c(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n&&c(n,e));const o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>c(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const o of e.split("&")){if(""===o)continue;let[e,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:c(s,t),n(c(e,t),s,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=h(n[e],t);else i[e]=h(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{const n=i[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=u(n):e[t]=n,e}),Object.create(null))}e.extract=f,e.parse=d,e.stringify=(e,t)=>{if(!e)return"";s((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&(e=>null==e)(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),"[",i,"]"].join("")]:[...n,[a(t,e),"[",a(i,e),"]=",a(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),"[]"].join("")]:[...n,[a(t,e),"[]=",a(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),":list="].join("")]:[...n,[a(t,e),":list=",a(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[a(n,e),t,a(i,e)].join("")]:[[r,a(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,a(t,e)]:[...n,[a(t,e),"=",a(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((n=>{const i=e[n];return void 0===i?"":null===i?a(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?a(n,t)+"[]":i.reduce(r(n),[]).join("&"):a(n,t)+"="+a(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:d(f(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:c(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[o]:!0},n);const r=l(t.url).split("?")[0]||"",i=e.extract(t.url),s=e.parse(i,{sort:!1}),c=Object.assign(s,t.query);let u=e.stringify(c,n);u&&(u=`?${u}`);let f=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(t.url);return t.fragmentIdentifier&&(f=`#${n[o]?a(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${u}${f}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:s,query:a,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:s,query:i(a,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}(wi);const Ti={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};function Mi(e,t){return e.includes(":")?[e]:t.chains||[]}const Li="base10",Ui="base16",ji="base64pad",Di="utf8";function zi(){return Rr(St.randomBytes(32),Ui)}function Bi(e){return Rr(Zr.hash(Ir(e,Di)),Ui)}function Fi(e){return Number(Rr(e,Li))}function Hi(e){const t=function(e){return Ir(`${e}`,Li)}(typeof e.type<"u"?e.type:0);if(1===Fi(t)&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?Ir(e.senderPublicKey,Ui):void 0,r=typeof e.iv<"u"?Ir(e.iv,Ui):St.randomBytes(12);return function(e){if(1===Fi(e.type)){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Rr(Xt([e.type,e.senderPublicKey,e.iv,e.sealed]),ji)}return Rr(Xt([e.type,e.iv,e.sealed]),ji)}({type:t,sealed:new Ar.ChaCha20Poly1305(Ir(e.symKey,Ui)).seal(r,Ir(e.message,Di)),iv:r,senderPublicKey:n})}function qi(e){const t=Ir(e,ji),n=t.slice(0,1);if(1===Fi(n)){const e=33,r=e+12,i=t.slice(1,e),o=t.slice(e,r);return{type:n,sealed:t.slice(r),iv:o,senderPublicKey:i}}const r=t.slice(1,13);return{type:n,sealed:t.slice(13),iv:r}}function $i(e){const t=e?.type||0;if(1===t){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function Vi(e){return 1===e.type&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var Wi=Object.defineProperty,Ki=Object.getOwnPropertySymbols,Gi=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable,Qi=(e,t,n)=>t in e?Wi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ji=(e,t)=>{for(var n in t||(t={}))Gi.call(t,n)&&Qi(e,n,t[n]);if(Ki)for(var n of Ki(t))Yi.call(t,n)&&Qi(e,n,t[n]);return e};const Xi="react-native",Zi="node",eo="browser",to="unknown",no="js";function ro(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function io(){return!gi()&&!!yi()&&"ReactNative"===navigator.product}function oo(){return!ro()&&!!yi()&&!!gi()}function so(){return io()?Xi:ro()?Zi:oo()?eo:to}function ao(e,t,n){const r=function(){if(so()===Xi&&typeof u<"u"&&typeof(null==u?void 0:u.Platform)<"u"){const{OS:e,Version:t}=u.Platform;return[e,t].join("-")}const e=li();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),i=function(){var e;const t=so();return t===eo?[t,(null==(e=mi())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[no,n].join("-"),r,i].join("/")}function co({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:i,projectId:o,useOnCloseEvent:s,bundleId:a}){const c=n.split("?"),u={auth:i,ua:ao(e,t,r),projectId:o,useOnCloseEvent:s||void 0,origin:a||void 0},l=function(e,t){let n=wi.parse(e);return n=Ji(Ji({},n),t),wi.stringify(n)}(c[1]||"",u);return c[0]+"?"+l}function uo(e,t){return e.filter((e=>t.includes(e))).length===e.length}function lo(e){return Object.fromEntries(e.entries())}function fo(e){return new Map(Object.entries(e))}function ho(e=se.FIVE_MINUTES,t){const n=se.toMiliseconds(e||se.FIVE_MINUTES);let r,i,o;return{resolve:e=>{o&&r&&(clearTimeout(o),r(e))},reject:e=>{o&&i&&(clearTimeout(o),i(e))},done:()=>new Promise(((e,s)=>{o=setTimeout((()=>{s(new Error(t))}),n),r=e,i=s}))}}function po(e,t,n){return new Promise((async(r,i)=>{const o=setTimeout((()=>i(new Error(n))),t);try{r(await e)}catch(e){i(e)}clearTimeout(o)}))}function go(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function yo(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else{if("id"!==t||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);r.id=Number(n)}return r}function mo(e,t){return se.fromMiliseconds((t||Date.now())+se.toMiliseconds(e))}function vo(e){return Date.now()>=se.toMiliseconds(e)}function _o(e,t){return`${e}${t?`:${t}`:""}`}function bo(e=[],t=[]){return[...new Set([...e,...t])]}function wo(e){return e?.relay||{protocol:"irn"}}function Eo(e){const t=Ti[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var So=Object.defineProperty,Oo=Object.getOwnPropertySymbols,Ro=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,xo=(e,t,n)=>t in e?So(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function Co(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const i=t.replace(r,""),o=e[t];n[i]=o}})),n}function Po(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),i=e.substring(t+1,n).split("@"),o=typeof n<"u"?e.substring(n):"",s=wi.parse(o);return{protocol:r,topic:ko(i[0]),version:parseInt(i[1],10),symKey:s.symKey,relay:Co(s)}}function ko(e){return e.startsWith("//")?e.substring(2):e}function No(e){return`${e.protocol}:${e.topic}@${e.version}?`+wi.stringify(((e,t)=>{for(var n in t||(t={}))Ro.call(t,n)&&xo(e,n,t[n]);if(Oo)for(var n of Oo(t))Io.call(t,n)&&xo(e,n,t[n]);return e})({symKey:e.symKey},function(e,t="-"){const n={};return Object.keys(e).forEach((r=>{const i="relay"+t+r;e[r]&&(n[i]=e[r])})),n}(e.relay)))}function Ao(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function To(e){return e.includes(":")}function Mo(e){return To(e)?e.split(":")[0]:e}const Lo={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Uo={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function jo(e,t){const{message:n,code:r}=Uo[e];return{message:t?`${n} ${t}`:n,code:r}}function Do(e,t){const{message:n,code:r}=Lo[e];return{message:t?`${n} ${t}`:n,code:r}}function zo(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function Bo(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function Fo(e){return typeof e>"u"}function Ho(e,t){return!(!t||!Fo(e))||"string"==typeof e&&!!e.trim().length}function qo(e,t){return!(!t||!Fo(e))||"number"==typeof e&&!isNaN(e)}function $o(e){return!(!Ho(e,!1)||!e.includes(":"))&&2===e.split(":").length}function Vo(e){let t=!0;return zo(e)?e.length&&(t=e.every((e=>Ho(e,!1)))):t=!1,t}function Wo(e,t,n){let r=null;return Object.entries(e).forEach((([e,i])=>{if(r)return;const o=function(e,t,n){let r=null;return zo(t)&&t.length?t.forEach((e=>{r||$o(e)||(r=Do("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):$o(e)||(r=Do("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),r}(e,Mi(e,i),`${t} ${n}`);o&&(r=o)})),r}function Ko(e,t){let n=null;return zo(e)?e.forEach((e=>{n||function(e){if(Ho(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&$o(e)}}return!1}(e)||(n=Do("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=Do("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function Go(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return Vo(e?.methods)?Vo(e?.events)||(n=Do("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=Do("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}(e,`${t}, namespace`);r&&(n=r)})),n}function Yo(e,t){let n=null;if(e&&Bo(e)){const r=Go(e,t);r&&(n=r);const i=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=Ko(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);i&&(n=i)}else n=jo("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function Qo(e){return Ho(e.protocol,!0)}function Jo(e){return typeof e<"u"&&null!==typeof e}function Xo(e,t){return!(!$o(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...Ao(e.accounts))})),t}(e).includes(t))}function Zo(e,t,n){return!!Ho(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{Ao(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function es(e,t,n){return!!Ho(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{Ao(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function ts(e,t,n){let r=null;const i=function(e){const t={};return Object.keys(e).forEach((n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach((r=>{t[r]={methods:e[n].methods,events:e[n].events}}))})),t}(e),o=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=Ao(e[n].accounts);r?.forEach((r=>{t[r]={accounts:e[n].accounts.filter((e=>e.includes(`${r}:`))),methods:e[n].methods,events:e[n].events}}))}})),t}(t),s=Object.keys(i),a=Object.keys(o),c=ns(Object.keys(e)),u=ns(Object.keys(t)),l=c.filter((e=>!u.includes(e)));return l.length&&(r=jo("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n      Required: ${l.toString()}\n      Received: ${Object.keys(t).toString()}`)),uo(s,a)||(r=jo("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n      Required: ${s.toString()}\n      Approved: ${a.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const i=Ao(t[e].accounts);i.includes(e)||(r=jo("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n        Required: ${e}\n        Approved: ${i.toString()}`))})),s.forEach((e=>{r||(uo(i[e].methods,o[e].methods)?uo(i[e].events,o[e].events)||(r=jo("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=jo("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function ns(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function rs(){const e=so();return new Promise((t=>{switch(e){case eo:t(oo()&&navigator?.onLine);break;case Xi:t(async function(){if(io()&&typeof u<"u"&&null!=u&&u.NetInfo){const e=await(null==u?void 0:u.NetInfo.fetch());return e?.isConnected}return!0}());break;default:t(!0)}}))}function is(e){switch(so()){case eo:!function(e){!io()&&oo()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case Xi:!function(e){io()&&typeof u<"u"&&null!=u&&u.NetInfo&&u?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const os={};class ss{static get(e){return os[e]}static set(e,t){os[e]=t}static delete(e){delete os[e]}}const as="INTERNAL_ERROR",cs="SERVER_ERROR",us=[-32700,-32600,-32601,-32602,-32603],ls={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[as]:{code:-32603,message:"Internal error"},[cs]:{code:-32e3,message:"Server error"}},fs=cs;function hs(e){return Object.keys(ls).includes(e)?ls[e]:ls[fs]}function ds(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var ps={},gs=function(e,t){return(gs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};
/*! *****************************************************************************
		Copyright (c) Microsoft Corporation.

		Permission to use, copy, modify, and/or distribute this software for any
		purpose with or without fee is hereby granted.

		THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
		REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
		AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
		INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
		LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
		OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
		PERFORMANCE OF THIS SOFTWARE.
		***************************************************************************** */var ys=function(){return ys=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ys.apply(this,arguments)};function ms(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vs(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function _s(e){return this instanceof _s?(this.v=e,this):new _s(e)}var bs,ws=n(Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}gs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return ys},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])},__values:ms,__read:vs,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(vs(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:_s,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof _s?Promise.resolve(e.value.v).then(c,u):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:_s(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=ms(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}})),Es={};function Ss(){if(bs)return Es;function e(){return t?.crypto||t?.msCrypto||{}}function n(){const t=e();return t.subtle||t.webkitSubtle}return bs=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.isBrowserCryptoAvailable=Es.getSubtleCrypto=Es.getBrowerCrypto=void 0,Es.getBrowerCrypto=e,Es.getSubtleCrypto=n,Es.isBrowserCryptoAvailable=function(){return!!e()&&!!n()},Es}var Os,Rs={};function Is(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function xs(e=6){return BigInt(Is(e))}function Cs(e,t,n){return{id:n||Is(),jsonrpc:"2.0",method:e,params:t}}function Ps(e,t){return{id:e,jsonrpc:"2.0",result:t}}function ks(e,t,n){return{id:e,jsonrpc:"2.0",error:Ns(t,n)}}function Ns(e,t){return typeof e>"u"?hs(as):("string"==typeof e&&(e=Object.assign(Object.assign({},hs(cs)),{message:e})),typeof t<"u"&&(e.data=t),function(e){return us.includes(e)}(e.code)&&(e=function(e){return Object.values(ls).find((t=>t.code===e))||ls[fs]}(e.code)),e)}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ws;t.__exportStar(Ss(),e),t.__exportStar(function(){if(Os)return Rs;function e(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function t(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}return Os=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.isBrowser=Rs.isNode=Rs.isReactNative=void 0,Rs.isReactNative=e,Rs.isNode=t,Rs.isBrowser=function(){return!e()&&!t()},Rs}(),e)}(ps);class As{}class Ts extends As{constructor(){super()}}class Ms extends Ts{constructor(e){super()}}function Ls(e,t){const n=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return!(typeof n>"u")&&new RegExp(t).test(n)}function Us(e){return Ls(e,"^https?:")}function js(e){return Ls(e,"^wss?:")}function Ds(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function zs(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function Bs(e){return zs(e)&&"method"in e}function Fs(e){return zs(e)&&(Hs(e)||qs(e))}function Hs(e){return"result"in e}function qs(e){return"error"in e}class $s extends Ms{constructor(e){super(e),this.events=new i.exports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(Cs(e.method,e.params||[],e.id||xs().toString()),t)}async requestStrict(e,t){return new Promise((async(n,r)=>{if(!this.connection.connected)try{await this.open()}catch(e){r(e)}this.events.on(`${e.id}`,(e=>{qs(e)?r(e.error):n(e.result)}));try{await this.connection.send(e,t)}catch(e){r(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Fs(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const Vs=e=>e.split("?")[0],Ws=typeof WebSocket<"u"?WebSocket:typeof u<"u"&&typeof u.WebSocket<"u"?u.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:Ai?Ni:(Ai=1,Ni=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")});class Ks{constructor(e){if(this.url=e,this.events=new i.exports.EventEmitter,this.registering=!1,!js(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(q(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!js(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const r=new URLSearchParams(e).get("origin"),i=ps.isReactNative()?{headers:{origin:r}}:{rejectUnauthorized:!Ds(e)},o=new Ws(e,[],i);typeof WebSocket<"u"||typeof u<"u"&&typeof u.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?o.onerror=e=>{const t=e;n(this.emitError(t.error))}:o.on("error",(e=>{n(this.emitError(e))})),o.onopen=()=>{this.onOpen(o),t(o)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?H(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=ks(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ds(e,Vs(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${Vs(this.url)}`));return this.events.emit("register_error",t),t}}var Gs={exports:{}};!function(e,n){var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",c="[object Date]",u="[object Error]",l="[object Function]",f="[object Map]",h="[object Number]",d="[object Object]",p="[object Promise]",g="[object RegExp]",y="[object Set]",m="[object String]",v="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",w=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[o]=S[s]=S[_]=S[a]=S[b]=S[c]=S[u]=S[l]=S[f]=S[h]=S[d]=S[g]=S[y]=S[m]=S[v]=!1;var O="object"==typeof t&&t&&t.Object===Object&&t,R="object"==typeof self&&self&&self.Object===Object&&self,I=O||R||Function("return this")(),x=n&&!n.nodeType&&n,C=x&&e&&!e.nodeType&&e,P=C&&C.exports===x,k=P&&O.process,N=function(){try{return k&&k.binding&&k.binding("util")}catch{}}(),A=N&&N.isTypedArray;function T(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function M(e,t){return e.has(t)}function L(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function U(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var j=Array.prototype,D=Function.prototype,z=Object.prototype,B=I["__core-js_shared__"],F=D.toString,H=z.hasOwnProperty,q=function(){var e=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),$=z.toString,V=RegExp("^"+F.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),W=P?I.Buffer:void 0,K=I.Symbol,G=I.Uint8Array,Y=z.propertyIsEnumerable,Q=j.splice,J=K?K.toStringTag:void 0,X=Object.getOwnPropertySymbols,Z=W?W.isBuffer:void 0,ee=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),te=ke(I,"DataView"),ne=ke(I,"Map"),re=ke(I,"Promise"),ie=ke(I,"Set"),oe=ke(I,"WeakMap"),se=ke(Object,"create"),ae=Me(te),ce=Me(ne),ue=Me(re),le=Me(ie),fe=Me(oe),he=K?K.prototype:void 0,de=he?he.valueOf:void 0;function pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function me(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ye;++t<n;)this.add(e[t])}function ve(e){var t=this.__data__=new ge(e);this.size=t.size}function _e(e,t){var n=je(e),r=!n&&Ue(e),i=!n&&!r&&De(e),o=!n&&!r&&!i&&qe(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=a.length;for(var u in e)(t||H.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Te(u,c)))&&a.push(u);return a}function be(e,t){for(var n=e.length;n--;)if(Le(e[n][0],t))return n;return-1}function we(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=H.call(e,J),n=e[J];try{e[J]=void 0;var r=!0}catch{}var i=$.call(e);return r&&(t?e[J]=n:delete e[J]),i}(e):function(e){return $.call(e)}(e)}function Ee(e){return He(e)&&we(e)==o}function Se(e,t,n,r,i){return e===t||(null==e||null==t||!He(e)&&!He(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var c=je(e),u=je(t),l=c?s:Ae(e),f=u?s:Ae(t),h=(l=l==o?d:l)==d,p=(f=f==o?d:f)==d,g=l==f;if(g&&De(e)){if(!De(t))return!1;c=!0,h=!1}if(g&&!h)return a||(a=new ve),c||qe(e)?Ie(e,t,n,r,i,a):xe(e,t,l,n,r,i,a);if(!(1&n)){var y=h&&H.call(e,"__wrapped__"),m=p&&H.call(t,"__wrapped__");if(y||m){var v=y?e.value():e,_=m?t.value():t;return a||(a=new ve),i(v,_,n,r,a)}}return!!g&&(a||(a=new ve),function(e,t,n,r,i,o){var s=1&n,a=Ce(e),c=a.length;if(c!=Ce(t).length&&!s)return!1;for(var u=c;u--;){var l=a[u];if(!(s?l in t:H.call(t,l)))return!1}var f=o.get(e);if(f&&o.get(t))return f==t;var h=!0;o.set(e,t),o.set(t,e);for(var d=s;++u<c;){var p=e[l=a[u]],g=t[l];if(r)var y=s?r(g,p,l,t,e,o):r(p,g,l,e,t,o);if(!(void 0===y?p===g||i(p,g,n,r,o):y)){h=!1;break}d||(d="constructor"==l)}if(h&&!d){var m=e.constructor,v=t.constructor;m!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof v&&v instanceof v)&&(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,Se,i))}function Oe(e){return!(!Fe(e)||function(e){return!!q&&q in e}(e))&&(ze(e)?V:w).test(Me(e))}function Re(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||z)}(e))return ee(e);var t=[];for(var n in Object(e))H.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ie(e,t,n,r,i,o){var s=1&n,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var l=-1,f=!0,h=2&n?new me:void 0;for(o.set(e,t),o.set(t,e);++l<a;){var d=e[l],p=t[l];if(r)var g=s?r(p,d,l,t,e,o):r(d,p,l,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(h){if(!T(t,(function(e,t){if(!M(h,t)&&(d===e||i(d,e,n,r,o)))return h.push(t)}))){f=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function xe(e,t,n,r,i,o,s){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new G(e),new G(t)));case a:case c:case h:return Le(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case f:var l=L;case y:var d=1&r;if(l||(l=U),e.size!=t.size&&!d)return!1;var p=s.get(e);if(p)return p==t;r|=2,s.set(e,t);var v=Ie(l(e),l(t),r,i,o,s);return s.delete(e),v;case"[object Symbol]":if(de)return de.call(e)==de.call(t)}return!1}function Ce(e){return function(e,t,n){var r=t(e);return je(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,$e,Ne)}function Pe(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ke(e,t){var n=function(e,t){return e?.[t]}(e,t);return Oe(n)?n:void 0}pe.prototype.clear=function(){this.__data__=se?se(null):{},this.size=0},pe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},pe.prototype.get=function(e){var t=this.__data__;if(se){var n=t[e];return n===r?void 0:n}return H.call(t,e)?t[e]:void 0},pe.prototype.has=function(e){var t=this.__data__;return se?void 0!==t[e]:H.call(t,e)},pe.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=se&&void 0===t?r:t,this},ge.prototype.clear=function(){this.__data__=[],this.size=0},ge.prototype.delete=function(e){var t=this.__data__,n=be(t,e);return!(n<0||(n==t.length-1?t.pop():Q.call(t,n,1),--this.size,0))},ge.prototype.get=function(e){var t=this.__data__,n=be(t,e);return n<0?void 0:t[n][1]},ge.prototype.has=function(e){return be(this.__data__,e)>-1},ge.prototype.set=function(e,t){var n=this.__data__,r=be(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new pe,map:new(ne||ge),string:new pe}},ye.prototype.delete=function(e){var t=Pe(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Pe(this,e).get(e)},ye.prototype.has=function(e){return Pe(this,e).has(e)},ye.prototype.set=function(e,t){var n=Pe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},me.prototype.add=me.prototype.push=function(e){return this.__data__.set(e,r),this},me.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.clear=function(){this.__data__=new ge,this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ve.prototype.get=function(e){return this.__data__.get(e)},ve.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ge){var r=n.__data__;if(!ne||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(r)}return n.set(e,t),this.size=n.size,this};var Ne=X?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}(X(e),(function(t){return Y.call(e,t)})))}:function(){return[]},Ae=we;function Te(e,t){return!!(t=t??i)&&("number"==typeof e||E.test(e))&&e>-1&&e%1==0&&e<t}function Me(e){if(null!=e){try{return F.call(e)}catch{}try{return e+""}catch{}}return""}function Le(e,t){return e===t||e!=e&&t!=t}(te&&Ae(new te(new ArrayBuffer(1)))!=b||ne&&Ae(new ne)!=f||re&&Ae(re.resolve())!=p||ie&&Ae(new ie)!=y||oe&&Ae(new oe)!=v)&&(Ae=function(e){var t=we(e),n=t==d?e.constructor:void 0,r=n?Me(n):"";if(r)switch(r){case ae:return b;case ce:return f;case ue:return p;case le:return y;case fe:return v}return t});var Ue=Ee(function(){return arguments}())?Ee:function(e){return He(e)&&H.call(e,"callee")&&!Y.call(e,"callee")},je=Array.isArray;var De=Z||function(){return!1};function ze(e){if(!Fe(e))return!1;var t=we(e);return t==l||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var qe=A?function(e){return function(t){return e(t)}}(A):function(e){return He(e)&&Be(e.length)&&!!S[we(e)]};function $e(e){return function(e){return null!=e&&Be(e.length)&&!ze(e)}(e)?_e(e):Re(e)}e.exports=function(e,t){return Se(e,t)}}(Gs,Gs.exports);var Ys=Gs.exports;var Qs=n(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},c=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),s.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),n(c())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)}))}})),Js=self.fetch||(self.fetch=Qs.default||Qs),Xs=Object.defineProperty,Zs=Object.getOwnPropertySymbols,ea=Object.prototype.hasOwnProperty,ta=Object.prototype.propertyIsEnumerable,na=(e,t,n)=>t in e?Xs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ra=(e,t)=>{for(var n in t||(t={}))ea.call(t,n)&&na(e,n,t[n]);if(Zs)for(var n of Zs(t))ta.call(t,n)&&na(e,n,t[n]);return e};var ia=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,c=e.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var o=(e.length-t)*u+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,u=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*u[d]>>>0,u[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===u[p];)p++;for(var g=c.repeat(n);p<s;++p)g+=e.charAt(u[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}};const oa=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class sa{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class aa{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return ua(this,e)}}class ca{constructor(e){this.decoders=e}or(e){return ua(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const ua=(e,t)=>new ca(ra(ra({},e.decoders||{[e.prefix]:e}),t.decoders||{[t.prefix]:t}));class la{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new sa(e,t,n),this.decoder=new aa(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const fa=({name:e,prefix:t,encode:n,decode:r})=>new la(e,t,n,r),ha=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=ia(n,t);return fa({prefix:e,name:t,encode:r,decode:e=>oa(i(e))})},da=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>fa({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,c=0,u=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);c=c<<n|o,a+=n,a>=8&&(a-=8,s[u++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)}),pa=fa({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var ga=Object.freeze({__proto__:null,identity:pa});const ya=da({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var ma=Object.freeze({__proto__:null,base2:ya});const va=da({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var _a=Object.freeze({__proto__:null,base8:va});const ba=ha({prefix:"9",name:"base10",alphabet:"0123456789"});var wa=Object.freeze({__proto__:null,base10:ba});const Ea=da({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Sa=da({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Oa=Object.freeze({__proto__:null,base16:Ea,base16upper:Sa});const Ra=da({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ia=da({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),xa=da({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Ca=da({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Pa=da({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),ka=da({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Na=da({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Aa=da({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Ta=da({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Ma=Object.freeze({__proto__:null,base32:Ra,base32upper:Ia,base32pad:xa,base32padupper:Ca,base32hex:Pa,base32hexupper:ka,base32hexpad:Na,base32hexpadupper:Aa,base32z:Ta});const La=ha({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ua=ha({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var ja=Object.freeze({__proto__:null,base36:La,base36upper:Ua});const Da=ha({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),za=ha({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Ba=Object.freeze({__proto__:null,base58btc:Da,base58flickr:za});const Fa=da({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Ha=da({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),qa=da({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),$a=da({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Va=Object.freeze({__proto__:null,base64:Fa,base64pad:Ha,base64url:qa,base64urlpad:$a});const Wa=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Ka=Wa.reduce(((e,t,n)=>(e[n]=t,e)),[]),Ga=Wa.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const Ya=fa({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+Ka[t]),"")},decode:function(e){const t=[];for(const n of e){const e=Ga[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var Qa=Object.freeze({__proto__:null,base256emoji:Ya}),Ja=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=ec;)n[r++]=255&t|Xa,t/=128;for(;t&Za;)n[r++]=255&t|Xa,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},Xa=128,Za=-128,ec=Math.pow(2,31);var tc=function e(t,n){var r,i=0,o=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],i+=o<28?(r&rc)<<o:(r&rc)*Math.pow(2,o),o+=7}while(r>=nc);return e.bytes=s-n,i},nc=128,rc=127;var ic=Math.pow(2,7),oc=Math.pow(2,14),sc=Math.pow(2,21),ac=Math.pow(2,28),cc=Math.pow(2,35),uc=Math.pow(2,42),lc=Math.pow(2,49),fc=Math.pow(2,56),hc=Math.pow(2,63),dc={encode:Ja,decode:tc,encodingLength:function(e){return e<ic?1:e<oc?2:e<sc?3:e<ac?4:e<cc?5:e<uc?6:e<lc?7:e<fc?8:e<hc?9:10}};const pc=(e,t,n=0)=>(dc.encode(e,t,n),t),gc=e=>dc.encodingLength(e),yc=(e,t)=>{const n=t.byteLength,r=gc(e),i=r+gc(n),o=new Uint8Array(i+n);return pc(e,o,0),pc(n,o,r),o.set(t,i),new mc(e,n,t,o)};class mc{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const vc=({name:e,code:t,encode:n})=>new _c(e,t,n);class _c{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?yc(this.code,t):t.then((e=>yc(this.code,e)))}throw Error("Unknown type, must be binary type")}}const bc=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),wc=vc({name:"sha2-256",code:18,encode:bc("SHA-256")}),Ec=vc({name:"sha2-512",code:19,encode:bc("SHA-512")});var Sc=Object.freeze({__proto__:null,sha256:wc,sha512:Ec});const Oc=oa;var Rc=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:Oc,digest:e=>yc(0,Oc(e))}});new TextEncoder,new TextDecoder;const Ic=ra(ra(ra(ra(ra(ra(ra(ra(ra(ra({},ga),ma),_a),wa),Oa),Ma),ja),Ba),Va),Qa);function xc(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Cc(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}ra(ra({},Sc),Rc);const Pc=Cc("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),kc=Cc("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?xc(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),Nc=ra({utf8:Pc,"utf-8":Pc,hex:Ic.base16,latin1:kc,ascii:kc,binary:kc},Ic);const Ac="core",Tc=`wc@2:${Ac}:`,Mc="error",Lc={database:":memory:"},Uc="client_ed25519_seed",jc=se.ONE_DAY,Dc=se.SIX_HOURS,zc="wss://relay.walletconnect.com",Bc="wss://relay.walletconnect.org",Fc="relayer_message",Hc="relayer_message_ack",qc="relayer_connect",$c="relayer_disconnect",Vc="relayer_error",Wc="relayer_connection_stalled",Kc="relayer_publish",Gc="payload",Yc="connect",Qc="disconnect",Jc="error",Xc=se.ONE_SECOND,Zc="subscription_created",eu="subscription_deleted",tu="subscription_sync",nu="subscription_resubscribed",ru=1e3*se.FIVE_SECONDS,iu={wc_pairingDelete:{req:{ttl:se.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:se.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:se.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:se.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:se.ONE_DAY,prompt:!1,tag:0},res:{ttl:se.ONE_DAY,prompt:!1,tag:0}}},ou="pairing_create",su="pairing_expire",au="pairing_delete",cu="pairing_ping",uu="history_created",lu="history_updated",fu="history_deleted",hu="history_sync",du="expirer_created",pu="expirer_deleted",gu="expirer_expired",yu="expirer_sync",mu="verify-api",vu="https://verify.walletconnect.com",_u="https://verify.walletconnect.org",bu=[vu,_u];class wu{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=Tc,this.init=async()=>{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=jo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=Ke.generateChildLogger(t,this.name)}get context(){return Ke.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,lo(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?fo(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Eu{constructor(e,t,n){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),Cr(kr(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=ei.generateKeyPair();return{privateKey:Rr(e.secretKey,Ui),publicKey:Rr(e.publicKey,Ui)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=kr(await this.getClientSeed()),n=zi();return await Nr(n,e,jc,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=ei.sharedKey(Ir(e,Ui),Ir(t,Ui),!0);return Rr(new Xr(Zr.SHA256,n).expand(32),Ui)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||function(e){return Rr(Zr.hash(Ir(e,Ui)),Ui)}(e);return await this.keychain.set(n,e),n},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,n)=>{this.isInitialized();const r=$i(n),i=q(t);if(Vi(r)){const t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}const o=this.getSymKey(e),{type:s,senderPublicKey:a}=r;return Hi({type:s,symKey:o,message:i,senderPublicKey:a})},this.decode=async(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=qi(e);return $i({type:Fi(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Rr(n.senderPublicKey,Ui):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,n);if(Vi(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{return H(function(e){const t=new Ar.ChaCha20Poly1305(Ir(e.symKey,Ui)),{sealed:n,iv:r}=qi(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return Rr(i,Di)}({symKey:this.getSymKey(e),encoded:t}))}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>Fi(qi(e).type),this.getPayloadSenderPublicKey=e=>{const t=qi(e);return t.senderPublicKey?Rr(t.senderPublicKey,Ui):void 0},this.core=e,this.logger=Ke.generateChildLogger(t,this.name),this.keychain=n||new wu(this.core,this.logger)}get context(){return Ke.getLoggerContext(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Uc)}catch{e=zi(),await this.keychain.set(Uc,e)}return function(e,t="utf8"){const n=Nc[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):xc(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Su extends ht{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Tc,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const n=Bi(t);let r=this.messages.get(e);return typeof r>"u"&&(r={}),typeof r[n]<"u"||(r[n]=t,this.messages.set(e,r),await this.persist()),n},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>(this.isInitialized(),typeof this.get(e)[Bi(t)]<"u"),this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=Ke.generateChildLogger(e,this.name),this.core=t}get context(){return Ke.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,lo(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?fo(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Ou extends dt{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new i.exports.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=se.toMiliseconds(se.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,n)=>{var r;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}});try{const i=n?.ttl||Dc,o=wo(n),s=n?.prompt||!1,a=n?.tag||0,c=n?.id||xs().toString(),u={topic:e,message:t,opts:{ttl:i,relay:o,prompt:s,tag:a,id:c}},l=setTimeout((()=>this.queue.set(c,u)),this.publishTimeout);try{await await po(this.rpcPublish(e,t,i,o,s,a,c),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(c),this.relayer.events.emit(Kc,u)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(r=n?.internal)&&r.throwOnFailedPublish)throw this.removeRequestFromQueue(c),e;return}finally{clearTimeout(l)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=Ke.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return Ke.getLoggerContext(this.logger)}rpcPublish(e,t,n,r,i,o,s){var a,c,u,l;const f={method:Eo(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:o},id:s};return Fo(null==(a=f.params)?void 0:a.prompt)&&(null==(c=f.params)||delete c.prompt),Fo(null==(u=f.params)?void 0:u.tag)&&(null==(l=f.params)||delete l.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:f}),this.relayer.request(f)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:n,opts:r}=e;await this.publish(t,n,r)}))}registerEventListeners(){this.relayer.core.heartbeat.on(X.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(Wc);this.checkQueue()})),this.relayer.on(Hc,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class Ru{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const r=n.filter((e=>e!==t));r.length?this.map.set(e,r):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Iu=Object.defineProperty,xu=Object.defineProperties,Cu=Object.getOwnPropertyDescriptors,Pu=Object.getOwnPropertySymbols,ku=Object.prototype.hasOwnProperty,Nu=Object.prototype.propertyIsEnumerable,Au=(e,t,n)=>t in e?Iu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tu=(e,t)=>{for(var n in t||(t={}))ku.call(t,n)&&Au(e,n,t[n]);if(Pu)for(var n of Pu(t))Nu.call(t,n)&&Au(e,n,t[n]);return e},Mu=(e,t)=>xu(e,Cu(t));class Lu extends yt{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Ru,this.events=new i.exports.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Tc,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const n=wo(t),r={topic:e,relay:n};this.pending.set(e,r);const i=await this.rpcSubscribe(e,n);return this.onSubscribe(i,r),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>!!this.topics.includes(e)||await new Promise(((t,n)=>{const r=new se.Watch;r.start(this.pendingSubscriptionWatchLabel);const i=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(i),r.stop(this.pendingSubscriptionWatchLabel),t(!0)),r.elapsed(this.pendingSubscriptionWatchLabel)>=ru&&(clearInterval(i),r.stop(this.pendingSubscriptionWatchLabel),n(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1)),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=Ke.generateChildLogger(t,this.name),this.clientId=""}get context(){return Ke.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map((async n=>await this.unsubscribeById(e,n,t))))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const r=wo(n);await this.rpcUnsubscribe(e,t,r);const i=Do("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){const n={method:Eo(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await po(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Wc)}return Bi(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:Eo(e[0].relay.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await po(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Wc)}}rpcUnsubscribe(e,t,n){const r={method:Eo(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(e,t){this.setSubscription(e,Mu(Tu({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,Tu({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,Tu({},t)),this.topicMap.set(t.topic,e),this.events.emit(Zc,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=jo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(eu,Mu(Tu({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(tu)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){const e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(e)}}this.events.emit(nu)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=jo("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);zo(t)&&this.onBatchSubscribe(t.map(((t,n)=>Mu(Tu({},e[n]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(X.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(qc,(async()=>{await this.onConnect()})),this.relayer.on($c,(()=>{this.onDisconnect()})),this.events.on(Zc,(async e=>{const t=Zc;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(eu,(async e=>{const t=eu;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}}var Uu=Object.defineProperty,ju=Object.getOwnPropertySymbols,Du=Object.prototype.hasOwnProperty,zu=Object.prototype.propertyIsEnumerable,Bu=(e,t,n)=>t in e?Uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class Fu extends pt{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new i.exports.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async e=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(e)}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(qc)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(Vc,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Gc,this.onPayloadHandler),this.provider.on(Yc,this.onConnectHandler),this.provider.on(Qc,this.onDisconnectHandler),this.provider.on(Jc,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?Ke.generateChildLogger(e.logger,this.name):Ke.pino(Ke.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new Su(this.logger,e.core),this.subscriber=new Lu(this,this.logger),this.publisher=new Ou(this,this.logger),this.relayUrl=e?.relayUrl||zc,this.projectId=e.projectId,this.bundleId=function(){var e;try{return io()&&typeof u<"u"&&typeof(null==u?void 0:u.Application)<"u"?null==(e=u.Application)?void 0:e.applicationId:void 0}catch{return}}(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${Bc}...`),await this.restartTransport(Bc)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return Ke.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let r,i=(null==(n=this.subscriber.topicMap.get(e))?void 0:n[0])||"";if(i)return i;const o=t=>{t.topic===e&&(this.subscriber.off(Zc,o),r())};return await Promise.all([new Promise((e=>{r=e,this.subscriber.on(Zc,o)})),new Promise((async n=>{i=await this.subscriber.subscribe(e,t),n()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await po(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(nu,(()=>{e()}))})),new Promise((async(e,t)=>{try{await po(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){return void t(e)}e()}))])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.provider.events.emit(Qc)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await rs())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new $s(new Ks(co({sdkVersion:"2.11.0",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||0===n.length)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const r=this.messages.has(t,n);return r&&this.logger.debug(`Ignoring duplicate message: ${n}`),r}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),Bs(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:n,message:r,publishedAt:i}=t.data,o={topic:n,message:r,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var n in t||(t={}))Du.call(t,n)&&Bu(e,n,t[n]);if(ju)for(var n of ju(t))zu.call(t,n)&&Bu(e,n,t[n]);return e})({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else Fs(e)&&this.events.emit(Hc,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Fc,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=Ps(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(Gc,this.onPayloadHandler),this.provider.off(Yc,this.onConnectHandler),this.provider.off(Qc,this.onDisconnectHandler),this.provider.off(Jc,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Wc,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await rs();is((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit($c),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),se.toMiliseconds(Xc)))}isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}}var Hu=Object.defineProperty,qu=Object.getOwnPropertySymbols,$u=Object.prototype.hasOwnProperty,Vu=Object.prototype.propertyIsEnumerable,Wu=(e,t,n)=>t in e?Hu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ku=(e,t)=>{for(var n in t||(t={}))$u.call(t,n)&&Wu(e,n,t[n]);if(qu)for(var n of qu(t))Vu.call(t,n)&&Wu(e,n,t[n]);return e};class Gu extends gt{constructor(e,t,n,r=Tc,i=void 0){super(e,t,n,r),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Tc,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!Fo(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):function(e){return e?.topic}(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((n=>Ys(t[n],e[n]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const n=Ku(Ku({},this.getData(e)),t);this.map.set(e,n),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=Ke.generateChildLogger(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return Ke.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=jo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=jo("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Yu{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new i.exports,this.initialized=!1,this.storagePrefix=Tc,this.ignoredPayloadTypes=[1],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const e=zi(),t=await this.core.crypto.setSymKey(e),n=mo(se.FIVE_MINUTES),r={protocol:"irn"},i={topic:t,expiry:n,relay:r,active:!1},o=No({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:r});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,n),{topic:t,uri:o}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:n,relay:r}=Po(e.uri);let i;if(this.pairings.keys.includes(t)&&(i=this.pairings.get(t),i.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const o=mo(se.FIVE_MINUTES),s={topic:t,relay:r,expiry:o,active:!1};return await this.pairings.set(t,s),this.core.expirer.set(t,o),e.activatePairing&&await this.activate({topic:t}),this.events.emit(ou,s),this.core.crypto.keychain.has(t)||(await this.core.crypto.setSymKey(n,t),await this.core.relayer.subscribe(t,{relay:r})),s},this.activate=async({topic:e})=>{this.isInitialized();const t=mo(se.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:n,resolve:r,reject:i}=ho();this.events.once(_o("pairing_ping",e),(({error:e})=>{e?i(e):r()})),await n()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",Do("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=Cs(t,n),i=await this.core.crypto.encode(e,r),o=iu[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,o),r.id},this.sendResult=async(e,t,n)=>{const r=Ps(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),s=iu[o.request.method].res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=ks(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),s=iu[o.request.method]?iu[o.request.method].res:iu.unregistered_method.res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(r)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,Do("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>vo(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:n}=e;switch(n.method){case"wc_pairingPing":return this.onPairingPingRequest(t,n);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,n);default:return this.onUnknownRpcMethodRequest(t,n)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.core.history.get(t,n.id)).request.method;return"wc_pairingPing"===r?this.onPairingPingResponse(t,n):this.onUnknownRpcMethodResponse(r)},this.onPairingPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult(n,e,!0),this.events.emit(cu,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{Hs(t)?this.events.emit(_o("pairing_ping",n),{}):qs(t)&&this.events.emit(_o("pairing_ping",n),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(au,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:n,method:r}=t;try{if(this.registeredMethods.includes(r))return;const t=Do("WC_METHOD_UNSUPPORTED",r);await this.sendError(n,e,t),this.logger.error(t)}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error(Do("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(Ho(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=jo("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const n=Po(e.uri);if(null==(t=n?.relay)||!t.protocol){const{message:e}=jo("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==n||!n.symKey){const{message:e}=jo("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}},this.isValidPing=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!Ho(e,!1)){const{message:t}=jo("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=jo("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(vo(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=jo("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=Ke.generateChildLogger(t,this.name),this.pairings=new Gu(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Ke.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Fc,(async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const r=await this.core.crypto.decode(t,n);try{Bs(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):Fs(r)&&(await this.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.core.history.delete(t,r.id))}catch(e){this.logger.error(e)}}))}registerExpirerEvents(){this.core.expirer.on(gu,(async e=>{const{topic:t}=yo(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(su,{topic:t}))}))}}class Qu extends ft{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new i.exports.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Tc,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,n)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:n}),this.records.has(t.id))return;const r={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:n,expiry:mo(se.THIRTY_DAYS)};this.records.set(r.id,r),this.events.emit(uu,r)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=qs(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(lu,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((n=>{if(n.topic===e){if(typeof t<"u"&&n.id!==t)return;this.records.delete(n.id),this.events.emit(fu,n)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=Ke.generateChildLogger(t,this.name)}get context(){return Ke.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:Cs(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=jo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(hu)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=jo("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(uu,(e=>{const t=uu;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(lu,(e=>{const t=lu;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(fu,(e=>{const t=fu;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(X.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{se.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Ju extends mt{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new i.exports.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Tc,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const n=this.formatTarget(e),r={target:n,expiry:t};this.expirations.set(n,r),this.checkExpiry(n,r),this.events.emit(du,{target:n,expiration:r})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),n=this.getExpiration(t);this.expirations.delete(t),this.events.emit(pu,{target:t,expiration:n})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=Ke.generateChildLogger(t,this.name)}get context(){return Ke.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function(e){return go("topic",e)}(e);if("number"==typeof e)return function(e){return go("id",e)}(e);const{message:t}=jo("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(yu)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=jo("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=jo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;se.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(gu,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(X.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(du,(e=>{const t=du;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(gu,(e=>{const t=gu;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(pu,(e=>{const t=pu;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Xu extends vt{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=mu,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||io()||!oo())return;const t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=_u;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(e?.verifyUrl);let n;try{n=await this.fetchAttestation(e.attestationId,t)}catch(r){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(r),n=await this.fetchAttestation(e.attestationId,_u)}return n},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*se.ONE_SECOND),r=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(n),200===r.status?await r.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=n=>{"verify_ready"===n.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((n=>{if(document.getElementById(mu))return n();window.addEventListener("message",t);const r=document.createElement("iframe");r.id=mu,r.src=`${this.verifyUrl}/${this.projectId}`,r.style.display="none",document.body.append(r),this.iframe=r,e=n})),new Promise(((e,n)=>setTimeout((()=>{window.removeEventListener("message",t),n("verify iframe load timeout")}),se.toMiliseconds(se.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||vu;return bu.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${vu}`),t=vu),t},this.logger=Ke.generateChildLogger(t,this.name),this.verifyUrl=vu,this.abortController=new AbortController,this.isDevEnv=ro()&&process.env.IS_VITEST}get context(){return Ke.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),se.toMiliseconds(e))}}class Zu extends _t{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{const{clientId:t,token:n,notificationType:r,enableEncrypted:i=!1}=e,o=`https://echo.walletconnect.com/${this.projectId}/clients`;await Js(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:r,token:n,always_raw:i})})},this.logger=Ke.generateChildLogger(t,this.context)}}var el=Object.defineProperty,tl=Object.getOwnPropertySymbols,nl=Object.prototype.hasOwnProperty,rl=Object.prototype.propertyIsEnumerable,il=(e,t,n)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ol=(e,t)=>{for(var n in t||(t={}))nl.call(t,n)&&il(e,n,t[n]);if(tl)for(var n of tl(t))rl.call(t,n)&&il(e,n,t[n]);return e};class sl extends lt{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=Ac,this.events=new i.exports.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||zc,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Ke.pino(Ke.getDefaultLoggerOptions({level:e?.logger||Mc}));this.logger=Ke.generateChildLogger(t,this.name),this.heartbeat=new X.HeartBeat,this.crypto=new Eu(this,this.logger,e?.keychain),this.history=new Qu(this,this.logger),this.expirer=new Ju(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new J(ol(ol({},Lc),e?.storageOptions)),this.relayer=new Fu({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Yu(this,this.logger),this.verify=new Xu(this.projectId||"",this.logger),this.echoClient=new Zu(this.projectId||"",this.logger)}static async init(e){const t=new sl(e);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",n),t}get context(){return Ke.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const al=sl,cl="client",ul=`wc@2:${cl}:`,ll=cl,fl="error",hl="WALLETCONNECT_DEEPLINK_CHOICE",dl="Proposal expired",pl=se.SEVEN_DAYS,gl={wc_sessionPropose:{req:{ttl:se.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:se.ONE_DAY,prompt:!1,tag:1104},res:{ttl:se.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:se.ONE_DAY,prompt:!1,tag:1106},res:{ttl:se.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:se.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:se.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:se.ONE_DAY,prompt:!1,tag:1112},res:{ttl:se.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:se.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:se.THIRTY_SECONDS,prompt:!1,tag:1115}}},yl={min:se.FIVE_MINUTES,max:se.SEVEN_DAYS},ml="IDLE",vl="ACTIVE",_l=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var bl=Object.defineProperty,wl=Object.defineProperties,El=Object.getOwnPropertyDescriptors,Sl=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,Rl=Object.prototype.propertyIsEnumerable,Il=(e,t,n)=>t in e?bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xl=(e,t)=>{for(var n in t||(t={}))Ol.call(t,n)&&Il(e,n,t[n]);if(Sl)for(var n of Sl(t))Rl.call(t,n)&&Il(e,n,t[n]);return e},Cl=(e,t)=>wl(e,El(t));class Pl extends wt{constructor(e){super(e),this.name="engine",this.events=new i.exports,this.initialized=!1,this.ignoredPayloadTypes=[1],this.requestQueue={state:ml,queue:[]},this.sessionRequestQueue={state:ml,queue:[]},this.requestQueueDelay=se.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(gl)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),se.toMiliseconds(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=Cl(xl({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:o,relays:s}=t;let a,c=n,u=!1;if(c&&(u=this.client.core.pairing.pairings.get(c).active),!c||!u){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,a=t}const l=await this.client.core.crypto.generateKeyPair(),f=xl({requiredNamespaces:r,optionalNamespaces:i,relays:s??[{protocol:"irn"}],proposer:{publicKey:l,metadata:this.client.metadata}},o&&{sessionProperties:o}),{reject:h,resolve:d,done:p}=ho(se.FIVE_MINUTES,dl);if(this.events.once(_o("session_connect"),(async({error:e,session:t})=>{if(e)h(e);else if(t){t.self.publicKey=l;const e=Cl(xl({},t),{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:t.peer.metadata}),d(e)}})),!c){const{message:e}=jo("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const g=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:f}),y=mo(se.FIVE_MINUTES);return await this.setProposal(g,xl({id:g,expiry:y},f)),{uri:a,approval:p}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:n,namespaces:r,sessionProperties:i}=e,o=this.client.proposal.get(t);let{pairingTopic:s,proposer:a,requiredNamespaces:c,optionalNamespaces:u}=o;s=s||"",Bo(c)||(c=function(e,t){const n=Yo(e,t);if(n)throw new Error(n.message);const r={};for(const[t,n]of Object.entries(e))r[t]={methods:n.methods,events:n.events,chains:n.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return r}(r,"approve()"));const l=await this.client.core.crypto.generateKeyPair(),f=a.publicKey,h=await this.client.core.crypto.generateSharedKey(l,f);s&&t&&(await this.client.core.pairing.updateMetadata({topic:s,metadata:a.metadata}),await this.sendResult({id:t,topic:s,result:{relay:{protocol:n??"irn"},responderPublicKey:l}}),await this.client.proposal.delete(t,Do("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:s}));const d=xl({relay:{protocol:n??"irn"},namespaces:r,requiredNamespaces:c,optionalNamespaces:u,pairingTopic:s,controller:{publicKey:l,metadata:this.client.metadata},expiry:mo(pl)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(h),await this.sendRequest({topic:h,method:"wc_sessionSettle",params:d,throwOnFailedPublish:!0});const p=Cl(xl({},d),{topic:h,pairingTopic:s,acknowledged:!1,self:d.controller,peer:{publicKey:a.publicKey,metadata:a.metadata},controller:l});return await this.client.session.set(h,p),await this.setExpiry(h,mo(pl)),{topic:h,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(h))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:t,reason:n}=e,{pairingTopic:r}=this.client.proposal.get(t);r&&(await this.sendError(t,r,n),await this.client.proposal.delete(t,Do("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:n}=e,r=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:n}}),{done:i,resolve:o,reject:s}=ho();return this.events.once(_o("session_update",r),(({error:e})=>{e?s(e):o()})),await this.client.session.update(t,{namespaces:n}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,n=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:r,resolve:i,reject:o}=ho();return this.events.once(_o("session_extend",n),(({error:e})=>{e?o(e):i()})),await this.setExpiry(t,mo(pl)),{acknowledged:r}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:r,expiry:i}=e,o=Is(),{done:s,resolve:a,reject:c}=ho(i,"Request expired. Please try again.");return this.events.once(_o("session_request",o),(({error:e,result:t})=>{e?c(e):a(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:o,topic:r,method:"wc_sessionRequest",params:{request:n,chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>c(e))),this.client.events.emit("session_request_sent",{topic:r,request:n,chainId:t,id:o}),e()})),new Promise((async e=>{const t=await async function(e,t){try{return await e.getItem(t)||(oo()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}(this.client.core.storage,hl);(async function({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;const r="string"==typeof n?JSON.parse(n):n;let i=r?.href;if("string"!=typeof i)return;i.endsWith("/")&&(i=i.slice(0,-1));const o=`${i}/wc?requestId=${e}&sessionTopic=${t}`,s=so();s===eo?o.startsWith("https://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):s===Xi&&typeof(null==u?void 0:u.Linking)<"u"&&await u.Linking.openURL(o)}catch(e){console.error(e)}})({id:o,topic:r,wcDeepLink:t}),e()})),s()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;Hs(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0}):qs(n)&&await this.sendError(r,t,n.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:n,resolve:r,reject:i}=ho();this.events.once(_o("session_ping",e),(({error:e})=>{e?i(e):r()})),await n()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:n,chainId:r}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:n,chainId:r}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.client.session.keys.includes(t)?(await this.sendRequest({topic:t,method:"wc_sessionDelete",params:Do("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(t)):await this.client.core.pairing.disconnect({topic:t})},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>function(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n);let o=!0;return!!uo(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:s}=e.namespaces[t],a=Ao(r),c=n[t];uo(Mi(t,c),a)&&uo(c.methods,i)&&uo(c.events,s)||(o=!1)})),o)}(t,e)))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),n=this.client.core.pairing.pairings.getAll().filter((n=>{var r,i;return(null==(r=n.peerMetadata)?void 0:r.url)&&(null==(i=n.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&n.topic&&n.topic!==t.topic}));if(0===n.length)return;this.client.logger.info(`Cleaning up ${n.length} duplicate pairing(s)`),await Promise.all(n.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async(e,t)=>{const{self:n}=this.client.session.get(e);await this.client.core.relayer.unsubscribe(e),this.client.session.delete(e,Do("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(n.publicKey)&&await this.client.core.crypto.deleteKeyPair(n.publicKey),this.client.core.crypto.keychain.has(e)&&await this.client.core.crypto.deleteSymKey(e),t||this.client.core.expirer.del(e),this.client.core.storage.removeItem(hl).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((t=>{t.topic===e&&this.deletePendingSessionRequest(t.id,Do("USER_DISCONNECTED"))}))},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,Do("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,n=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),n?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter((t=>t.id!==e)),n&&(this.sessionRequestQueue.state=ml)},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,t.expiry)},this.setPendingSessionRequest=async e=>{const t=gl.wc_sessionRequest.req.ttl,{id:n,topic:r,params:i,verifyContext:o}=e;await this.client.pendingRequest.set(n,{id:n,topic:r,params:i,verifyContext:o}),t&&this.client.core.expirer.set(n,mo(t))},this.sendRequest=async e=>{const{topic:t,method:n,params:r,expiry:i,relayRpcId:o,clientRpcId:s,throwOnFailedPublish:a}=e,c=Cs(n,r,s);if(oo()&&_l.includes(n)){const e=Bi(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}const u=await this.client.core.crypto.encode(t,c),l=gl[n].req;return i&&(l.ttl=i),o&&(l.id=o),this.client.core.history.set(t,c),a?(l.internal=Cl(xl({},l.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,u,l)):this.client.core.relayer.publish(t,u,l).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:n,result:r,throwOnFailedPublish:i}=e,o=Ps(t,r),s=await this.client.core.crypto.encode(n,o),a=await this.client.core.history.get(n,t),c=gl[a.request.method].res;i?(c.internal=Cl(xl({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,s,c)):this.client.core.relayer.publish(n,s,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(o)},this.sendError=async(e,t,n)=>{const r=ks(e,n),i=await this.client.core.crypto.encode(t,r),o=await this.client.core.history.get(t,e),s=gl[o.request.method].res;this.client.core.relayer.publish(t,i,s),await this.client.core.history.resolve(r)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{vo(t.expiry)&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{vo(e.expiry)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession(e))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==vl){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=vl;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=ml}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:n}=e,r=n.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeRequest(t,n);case"wc_sessionSettle":return this.onSessionSettleRequest(t,n);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,n);case"wc_sessionExtend":return this.onSessionExtendRequest(t,n);case"wc_sessionPing":return this.onSessionPingRequest(t,n);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,n);case"wc_sessionRequest":return this.onSessionRequest(t,n);case"wc_sessionEvent":return this.onSessionEventRequest(t,n);default:return this.client.logger.info(`Unsupported request method ${r}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.client.core.history.get(t,n.id)).request.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeResponse(t,n);case"wc_sessionSettle":return this.onSessionSettleResponse(t,n);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,n);case"wc_sessionExtend":return this.onSessionExtendResponse(t,n);case"wc_sessionPing":return this.onSessionPingResponse(t,n);case"wc_sessionRequest":return this.onSessionRequestResponse(t,n);default:return this.client.logger.info(`Unsupported response method ${r}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:n}=jo("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(n)},this.onSessionProposeRequest=async(e,t)=>{const{params:n,id:r}=t;try{this.isValidConnect(xl({},t.params));const i=mo(se.FIVE_MINUTES),o=xl({id:r,pairingTopic:e,expiry:i},n);await this.setProposal(r,o);const s=Bi(JSON.stringify(t)),a=await this.getVerifyContext(s,o.proposer.metadata);this.client.events.emit("session_proposal",{id:r,params:o,verifyContext:a})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{const{id:n}=t;if(Hs(t)){const{result:r}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:r});const i=this.client.proposal.get(n);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const o=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const s=r.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:s});const a=await this.client.core.crypto.generateSharedKey(o,s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:a});const c=await this.client.core.relayer.subscribe(a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else qs(t)&&(await this.client.proposal.delete(n,Do("USER_DISCONNECTED")),this.events.emit(_o("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidSessionSettleRequest(r);const{relay:n,controller:i,expiry:o,namespaces:s,requiredNamespaces:a,optionalNamespaces:c,sessionProperties:u,pairingTopic:l}=t.params,f=xl({topic:e,relay:n,expiry:o,namespaces:s,acknowledged:!0,pairingTopic:l,requiredNamespaces:a,optionalNamespaces:c,controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},u&&{sessionProperties:u});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit(_o("session_connect"),{session:f}),this.cleanupDuplicatePairings(f)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:n}=t;Hs(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(_o("session_approve",n),{})):qs(t)&&(await this.client.session.delete(e,Do("USER_DISCONNECTED")),this.events.emit(_o("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{const t=`${e}_session_update`,i=ss.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidUpdate(xl({topic:e},n)),await this.client.session.update(e,{namespaces:n.namespaces}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_update",{id:r,topic:e,params:n}),ss.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:n}=t;Hs(t)?this.events.emit(_o("session_update",n),{}):qs(t)&&this.events.emit(_o("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,mo(pl)),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_extend",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{const{id:n}=t;Hs(t)?this.events.emit(_o("session_extend",n),{}):qs(t)&&this.events.emit(_o("session_extend",n),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_ping",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{Hs(t)?this.events.emit(_o("session_ping",n),{}):qs(t)&&this.events.emit(_o("session_ping",n),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(Kc,(async()=>{t(await this.deleteSession(e))}))})),this.sendResult({id:n,topic:e,result:!0})]),this.client.events.emit("session_delete",{id:n,topic:e})}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidRequest(xl({topic:e},r));const t=Bi(JSON.stringify(Cs("wc_sessionRequest",r,n))),i=this.client.session.get(e),o={id:n,topic:e,params:r,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(o),this.addSessionRequestToSessionRequestQueue(o),this.processSessionRequestQueue()}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t;Hs(t)?this.events.emit(_o("session_request",n),{result:t.result}):qs(t)&&this.events.emit(_o("session_request",n),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:n,params:r}=t;try{const t=`${e}_session_event_${r.event.name}`,i=ss.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidEmit(xl({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),ss.set(t,n)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=ml,this.processSessionRequestQueue()}),se.toMiliseconds(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===vl)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=vl,this.client.events.emit("session_request",e)}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=e=>{if(e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,Cs("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,relays:o}=e;if(Fo(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&zo(e)&&e.length&&e.forEach((e=>{n=Qo(e)})),n}(o,!0)){const{message:e}=jo("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(e)}!Fo(n)&&0!==Bo(n)&&this.validateNamespaces(n,"requiredNamespaces"),!Fo(r)&&0!==Bo(r)&&this.validateNamespaces(r,"optionalNamespaces"),Fo(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=function(e,t,n){let r=null;if(e&&Bo(e)){const i=Go(e,t);i&&(r=i);const o=Wo(e,t,n);o&&(r=o)}else r=jo("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}(e,"connect()",t);if(n)throw new Error(n.message)},this.isValidApprove=async e=>{if(!Jo(e))throw new Error(jo("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:n,relayProtocol:r,sessionProperties:i}=e;await this.isValidProposalId(t);const o=this.client.proposal.get(t),s=Yo(n,"approve()");if(s)throw new Error(s.message);const a=ts(o.requiredNamespaces,n,"approve()");if(a)throw new Error(a.message);if(!Ho(r,!0)){const{message:e}=jo("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}Fo(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:n}=e;if(await this.isValidProposalId(t),!function(e){return!!(e&&"object"==typeof e&&e.code&&qo(e.code,!1)&&e.message&&Ho(e.message,!1))}(n)){const{message:e}=jo("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!Qo(t)){const{message:e}=jo("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const o=function(e,t){let n=null;return Ho(e?.publicKey,!1)||(n=jo("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}(n,"onSessionSettleRequest()");if(o)throw new Error(o.message);const s=Yo(r,"onSessionSettleRequest()");if(s)throw new Error(s.message);if(vo(i)){const{message:e}=jo("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:n}=e;await this.isValidSessionTopic(t);const r=this.client.session.get(t),i=Yo(n,"update()");if(i)throw new Error(i.message);const o=ts(r.requiredNamespaces,n,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:n,chainId:r,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:o}=this.client.session.get(t);if(!Xo(o,r)){const{message:e}=jo("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(Fo(e)||!Ho(e.method,!1))}(n)){const{message:e}=jo("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!Zo(o,r,n.method)){const{message:e}=jo("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!function(e,t){return qo(e,!1)&&e<=t.max&&e>=t.min}(i,yl)){const{message:e}=jo("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${yl.min} and ${yl.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:n,response:r}=e;try{await this.isValidSessionTopic(n)}catch(n){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),n}if(!function(e){return!(Fo(e)||Fo(e.result)&&Fo(e.error)||!qo(e.id,!1)||!Ho(e.jsonrpc,!1))}(r)){const{message:e}=jo("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:n,chainId:r}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!Xo(i,r)){const{message:e}=jo("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(Fo(e)||!Ho(e.name,!1))}(n)){const{message:e}=jo("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!es(i,r,n.name)){const{message:e}=jo("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!Jo(e)){const{message:t}=jo("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const n={verified:{verifyUrl:t.verifyUrl||vu,validation:"UNKNOWN",origin:t.url||""}};try{const r=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});r&&(n.verified.origin=r.origin,n.verified.isScam=r.isScam,n.verified.validation=r.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.info(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(n)}`),n},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!Ho(e,!1)){const{message:n}=jo("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(n)}}))}}async isInitialized(){if(!this.initialized){const{message:e}=jo("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Fc,(async e=>{const{topic:t,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const r=await this.client.core.crypto.decode(t,n);try{Bs(r)?(this.client.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):Fs(r)?(await this.client.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.client.core.history.delete(t,r.id)):this.onRelayEventUnknownPayload({topic:t,payload:r})}catch(e){this.client.logger.error(e)}}))}registerExpirerEvents(){this.client.core.expirer.on(gu,(async e=>{const{topic:t,id:n}=yo(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,jo("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession(t,!0),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))}))}registerPairingEvents(){this.client.core.pairing.events.on(ou,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!Ho(e,!1)){const{message:t}=jo("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=jo("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(vo(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=jo("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!Ho(e,!1)){const{message:t}=jo("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=jo("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(vo(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:t}=jo("EXPIRED",`session topic: ${e}`);throw new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if(Ho(e,!1)){const{message:t}=jo("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=jo("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!function(e){return"number"==typeof e}(e)){const{message:t}=jo("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=jo("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(vo(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:t}=jo("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class kl extends Gu{constructor(e,t){super(e,t,"proposal",ul),this.core=e,this.logger=t}}class Nl extends Gu{constructor(e,t){super(e,t,"session",ul),this.core=e,this.logger=t}}class Al extends Gu{constructor(e,t){super(e,t,"request",ul,(e=>e.id)),this.core=e,this.logger=t}}class Tl extends bt{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=ll,this.events=new i.exports.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||ll,this.metadata=e?.metadata||_i()||{name:"",description:"",url:"",icons:[""]};const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Ke.pino(Ke.getDefaultLoggerOptions({level:e?.logger||fl}));this.core=e?.core||new al(e),this.logger=Ke.generateChildLogger(t,this.name),this.session=new Nl(this.core,this.logger),this.proposal=new kl(this.core,this.logger),this.pendingRequest=new Al(this.core,this.logger),this.engine=new Pl(this)}static async init(e){const t=new Tl(e);return await t.initialize(),t}get context(){return Ke.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}const Ml="error",Ll="wc@2:universal_provider:",Ul="default_chain_changed";var jl,Dl,zl={exports:{}};
/**
	 * @license
	 * Lodash <https://lodash.com/>
	 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
	 * Released under MIT license <https://lodash.com/license>
	 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
	 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
	 */jl=zl,Dl=zl.exports,function(){var e,n="Expected a function",r="__lodash_hash_undefined__",i="__lodash_placeholder__",o=16,s=32,a=64,c=128,u=256,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=d-1,g=d>>>1,y=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",s],["partialRight",a],["rearg",u]],m="[object Arguments]",v="[object Array]",_="[object Boolean]",b="[object Date]",w="[object Error]",E="[object Function]",S="[object GeneratorFunction]",O="[object Map]",R="[object Number]",I="[object Object]",x="[object Promise]",C="[object RegExp]",P="[object Set]",k="[object String]",N="[object Symbol]",A="[object WeakMap]",T="[object ArrayBuffer]",M="[object DataView]",L="[object Float32Array]",U="[object Float64Array]",j="[object Int8Array]",D="[object Int16Array]",z="[object Int32Array]",B="[object Uint8Array]",F="[object Uint8ClampedArray]",H="[object Uint16Array]",q="[object Uint32Array]",$=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,Y=RegExp(K.source),Q=RegExp(G.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(re.source),oe=/^\s+/,se=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,_e=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Re="\\u2700-\\u27bf",Ie="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="['’]",Ne="["+Se+"]",Ae="["+Pe+"]",Te="["+Oe+"]",Me="\\d+",Le="["+Re+"]",Ue="["+Ie+"]",je="[^"+Se+Pe+Me+Re+Ie+xe+"]",De="\\ud83c[\\udffb-\\udfff]",ze="[^"+Se+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+xe+"]",qe="\\u200d",$e="(?:"+Ue+"|"+je+")",Ve="(?:"+He+"|"+je+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ke="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Te+"|"+De+")?",Ye="["+Ce+"]?",Qe=Ye+Ge+"(?:"+qe+"(?:"+[ze,Be,Fe].join("|")+")"+Ye+Ge+")*",Je="(?:"+[Le,Be,Fe].join("|")+")"+Qe,Xe="(?:"+[ze+Te+"?",Te,Be,Fe,Ne].join("|")+")",Ze=RegExp(ke,"g"),et=RegExp(Te,"g"),tt=RegExp(De+"(?="+De+")|"+Xe+Qe,"g"),nt=RegExp([He+"?"+Ue+"+"+We+"(?="+[Ae,He,"$"].join("|")+")",Ve+"+"+Ke+"(?="+[Ae,He+$e,"$"].join("|")+")",He+"?"+$e+"+"+We,He+"+"+Ke,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Je].join("|"),"g"),rt=RegExp("["+qe+Se+Oe+Ce+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,at={};at[L]=at[U]=at[j]=at[D]=at[z]=at[B]=at[F]=at[H]=at[q]=!0,at[m]=at[v]=at[T]=at[_]=at[M]=at[b]=at[w]=at[E]=at[O]=at[R]=at[I]=at[C]=at[P]=at[k]=at[A]=!1;var ct={};ct[m]=ct[v]=ct[T]=ct[M]=ct[_]=ct[b]=ct[L]=ct[U]=ct[j]=ct[D]=ct[z]=ct[O]=ct[R]=ct[I]=ct[C]=ct[P]=ct[k]=ct[N]=ct[B]=ct[F]=ct[H]=ct[q]=!0,ct[w]=ct[E]=ct[A]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ft=parseInt,ht="object"==typeof t&&t&&t.Object===Object&&t,dt="object"==typeof self&&self&&self.Object===Object&&self,pt=ht||dt||Function("return this")(),gt=Dl&&!Dl.nodeType&&Dl,yt=gt&&jl&&!jl.nodeType&&jl,mt=yt&&yt.exports===gt,vt=mt&&ht.process,_t=function(){try{return yt&&yt.require&&yt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch{}}(),bt=_t&&_t.isArrayBuffer,wt=_t&&_t.isDate,Et=_t&&_t.isMap,St=_t&&_t.isRegExp,Ot=_t&&_t.isSet,Rt=_t&&_t.isTypedArray;function It(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function xt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function Ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Pt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function At(e,t){return!(null==e||!e.length)&&qt(e,t,0)>-1}function Tt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ut(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function jt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var zt=Kt("length");function Bt(e){return e.match(le)||[]}function Ft(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ht(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function qt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ht(e,Vt,n)}function $t(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function Wt(e,t){var n=null==e?0:e.length;return n?Qt(e,t)/n:h}function Kt(t){return function(n){return null==n?e:n[t]}}function Gt(t){return function(n){return null==t?e:t[n]}}function Yt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Qt(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function Jt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e&&e.slice(0,yn(e)+1).replace(oe,"")}function Zt(e){return function(t){return e(t)}}function en(e,t){return Mt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&qt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&qt(t,e[n],0)>-1;);return n}var on=Gt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),sn=Gt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function an(e){return"\\"+ut[e]}function cn(e){return rt.test(e)}function un(e){return it.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function fn(e,t){return function(n){return e(t(n))}}function hn(e,t){for(var n=-1,r=e.length,o=0,s=[];++n<r;){var a=e[n];(a===t||a===i)&&(e[n]=i,s[o++]=n)}return s}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){return cn(e)?function(e){for(var t=tt.lastIndex=0;tt.test(e);)++t;return t}(e):zt(e)}function gn(e){return cn(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function yn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var mn=Gt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});function vn(e){return e.match(nt)||[]}var _n=function t(se){var le,Se=(se=null==se?pt:_n.defaults(pt.Object(),se,_n.pick(pt,ot))).Array,Oe=se.Date,Re=se.Error,Ie=se.Function,xe=se.Math,Ce=se.Object,Pe=se.RegExp,ke=se.String,Ne=se.TypeError,Ae=Se.prototype,Te=Ie.prototype,Me=Ce.prototype,Le=se["__core-js_shared__"],Ue=Te.toString,je=Me.hasOwnProperty,De=0,ze=(le=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+le:"",Be=Me.toString,Fe=Ue.call(Ce),He=pt._,qe=Pe("^"+Ue.call(je).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=mt?se.Buffer:e,Ve=se.Symbol,We=se.Uint8Array,Ke=$e?$e.allocUnsafe:e,Ge=fn(Ce.getPrototypeOf,Ce),Ye=Ce.create,Qe=Me.propertyIsEnumerable,Je=Ae.splice,Xe=Ve?Ve.isConcatSpreadable:e,tt=Ve?Ve.iterator:e,nt=Ve?Ve.toStringTag:e,rt=function(){try{var e=mo(Ce,"defineProperty");return e({},"",{}),e}catch{}}(),it=se.clearTimeout!==pt.clearTimeout&&se.clearTimeout,ut=Oe&&Oe.now!==pt.Date.now&&Oe.now,ht=se.setTimeout!==pt.setTimeout&&se.setTimeout,dt=xe.ceil,gt=xe.floor,yt=Ce.getOwnPropertySymbols,vt=$e?$e.isBuffer:e,_t=se.isFinite,zt=Ae.join,Gt=fn(Ce.keys,Ce),bn=xe.max,wn=xe.min,En=Oe.now,Sn=se.parseInt,On=xe.random,Rn=Ae.reverse,In=mo(se,"DataView"),xn=mo(se,"Map"),Cn=mo(se,"Promise"),Pn=mo(se,"Set"),kn=mo(se,"WeakMap"),Nn=mo(Ce,"create"),An=kn&&new kn,Tn={},Mn=Vo(In),Ln=Vo(xn),Un=Vo(Cn),jn=Vo(Pn),Dn=Vo(kn),zn=Ve?Ve.prototype:e,Bn=zn?zn.valueOf:e,Fn=zn?zn.toString:e;function Hn(e){if(ca(e)&&!Js(e)&&!(e instanceof Wn)){if(e instanceof Vn)return e;if(je.call(e,"__wrapped__"))return Wo(e)}return new Vn(e)}var qn=function(){function t(){}return function(n){if(!aa(n))return{};if(Ye)return Ye(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function $n(){}function Vn(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Yn;++t<n;)this.add(e[t])}function Jn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Xn(e,t){var n=Js(e),r=!n&&Qs(e),i=!n&&!r&&ta(e),o=!n&&!r&&!i&&ya(e),s=n||r||i||o,a=s?Jt(e.length,ke):[],c=a.length;for(var u in e)(t||je.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Oo(u,c)))&&a.push(u);return a}function Zn(t){var n=t.length;return n?t[Jr(0,n-1)]:e}function er(e,t){return Ho(Ai(e),ur(t,0,e.length))}function tr(e){return Ho(Ai(e))}function nr(t,n,r){(r!==e&&!Ks(t[n],r)||r===e&&!(n in t))&&ar(t,n,r)}function rr(t,n,r){var i=t[n];(!je.call(t,n)||!Ks(i,r)||r===e&&!(n in t))&&ar(t,n,r)}function ir(e,t){for(var n=e.length;n--;)if(Ks(e[n][0],t))return n;return-1}function or(e,t,n,r){return pr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function sr(e,t){return e&&Ti(t,Da(t),e)}function ar(e,t,n){"__proto__"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function cr(t,n){for(var r=-1,i=n.length,o=Se(i),s=null==t;++r<i;)o[r]=s?e:Ta(t,n[r]);return o}function ur(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function lr(t,n,r,i,o,s){var a,c=1&n,u=2&n,l=4&n;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!aa(t))return t;var f=Js(t);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!c)return Ai(t,a)}else{var h=bo(t),d=h==E||h==S;if(ta(t))return Ii(t,c);if(h==I||h==m||d&&!o){if(a=u||d?{}:Eo(t),!c)return u?function(e,t){return Ti(e,_o(e),t)}(t,function(e,t){return e&&Ti(t,za(t),e)}(a,t)):function(e,t){return Ti(e,vo(e),t)}(t,sr(a,t))}else{if(!ct[h])return o?t:{};a=function(e,t,n){var r=e.constructor;switch(t){case T:return xi(e);case _:case b:return new r(+e);case M:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case U:case j:case D:case z:case B:case F:case H:case q:return Ci(e,n);case O:return new r;case R:case k:return new r(e);case C:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new r;case N:return function(e){return Bn?Ce(Bn.call(e)):{}}(e)}}(t,h,c)}}s||(s=new Jn);var p=s.get(t);if(p)return p;s.set(t,a),da(t)?t.forEach((function(e){a.add(lr(e,n,r,e,t,s))})):ua(t)&&t.forEach((function(e,i){a.set(i,lr(e,n,r,i,t,s))}));var g=f?e:(l?u?uo:co:u?za:Da)(t);return Ct(g||t,(function(e,i){g&&(e=t[i=e]),rr(a,i,lr(e,n,r,i,t,s))})),a}function fr(t,n,r){var i=r.length;if(null==t)return!i;for(t=Ce(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function hr(t,r,i){if("function"!=typeof t)throw new Ne(n);return Do((function(){t.apply(e,i)}),r)}function dr(e,t,n,r){var i=-1,o=At,s=!0,a=e.length,c=[],u=t.length;if(!a)return c;n&&(t=Mt(t,Zt(n))),r?(o=Tt,s=!1):t.length>=200&&(o=tn,s=!1,t=new Qn(t));e:for(;++i<a;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var h=u;h--;)if(t[h]===f)continue e;c.push(l)}else o(t,f,r)||c.push(l)}return c}Hn.templateSettings={escape:J,evaluate:X,interpolate:Z,variable:"",imports:{_:Hn}},Hn.prototype=$n.prototype,Hn.prototype.constructor=Hn,Vn.prototype=qn($n.prototype),Vn.prototype.constructor=Vn,Wn.prototype=qn($n.prototype),Wn.prototype.constructor=Wn,Kn.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},Kn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Kn.prototype.get=function(t){var n=this.__data__;if(Nn){var i=n[t];return i===r?e:i}return je.call(n,t)?n[t]:e},Kn.prototype.has=function(t){var n=this.__data__;return Nn?n[t]!==e:je.call(n,t)},Kn.prototype.set=function(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Nn&&n===e?r:n,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0||(n==t.length-1?t.pop():Je.call(t,n,1),--this.size,0))},Gn.prototype.get=function(t){var n=this.__data__,r=ir(n,t);return r<0?e:n[r][1]},Gn.prototype.has=function(e){return ir(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(xn||Gn),string:new Kn}},Yn.prototype.delete=function(e){var t=go(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return go(this,e).get(e)},Yn.prototype.has=function(e){return go(this,e).has(e)},Yn.prototype.set=function(e,t){var n=go(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Qn.prototype.add=Qn.prototype.push=function(e){return this.__data__.set(e,r),this},Qn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(e,t),this.size=n.size,this};var pr=Ui(Sr),gr=Ui(Or,!0);function yr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function mr(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(c===e?a==a&&!ga(a):r(a,c)))var c=a,u=s}return u}function vr(t,n,r,i){var o=t.length;for((r=wa(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:wa(i))<0&&(i+=o),i=r>i?0:Ea(i);r<i;)t[r++]=n;return t}function _r(e,t){var n=[];return pr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function br(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=So),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?br(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var wr=ji(),Er=ji(!0);function Sr(e,t){return e&&wr(e,t,Da)}function Or(e,t){return e&&Er(e,t,Da)}function Rr(e,t){return Nt(t,(function(t){return ia(e[t])}))}function Ir(t,n){for(var r=0,i=(n=Ei(n,t)).length;null!=t&&r<i;)t=t[$o(n[r++])];return r&&r==i?t:e}function xr(e,t,n){var r=t(e);return Js(e)?r:Lt(r,n(e))}function Cr(t){return null==t?t===e?"[object Undefined]":"[object Null]":nt&&nt in Ce(t)?function(t){var n=je.call(t,nt),r=t[nt];try{t[nt]=e;var i=!0}catch{}var o=Be.call(t);return i&&(n?t[nt]=r:delete t[nt]),o}(t):function(e){return Be.call(e)}(t)}function Pr(e,t){return e>t}function kr(e,t){return null!=e&&je.call(e,t)}function Nr(e,t){return null!=e&&t in Ce(e)}function Ar(t,n,r){for(var i=r?Tt:At,o=t[0].length,s=t.length,a=s,c=Se(s),u=1/0,l=[];a--;){var f=t[a];a&&n&&(f=Mt(f,Zt(n))),u=wn(f.length,u),c[a]=!r&&(n||o>=120&&f.length>=120)?new Qn(a&&f):e}f=t[0];var h=-1,d=c[0];e:for(;++h<o&&l.length<u;){var p=f[h],g=n?n(p):p;if(p=r||0!==p?p:0,!(d?tn(d,g):i(l,g,r))){for(a=s;--a;){var y=c[a];if(!(y?tn(y,g):i(t[a],g,r)))continue e}d&&d.push(g),l.push(p)}}return l}function Tr(t,n,r){var i=null==(t=Mo(t,n=Ei(n,t)))?t:t[$o(rs(n))];return null==i?e:It(i,t,r)}function Mr(e){return ca(e)&&Cr(e)==m}function Lr(e,t,n,r,i){return e===t||(null==e||null==t||!ca(e)&&!ca(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var s=Js(e),a=Js(t),c=s?v:bo(e),u=a?v:bo(t),l=(c=c==m?I:c)==I,f=(u=u==m?I:u)==I,h=c==u;if(h&&ta(e)){if(!ta(t))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Jn),s||ya(e)?io(e,t,n,r,i,o):oo(e,t,c,n,r,i,o);if(!(1&n)){var d=l&&je.call(e,"__wrapped__"),p=f&&je.call(t,"__wrapped__");if(d||p){var g=d?e.value():e,y=p?t.value():t;return o||(o=new Jn),i(g,y,n,r,o)}}return!!h&&(o||(o=new Jn),so(e,t,n,r,i,o))}(e,t,n,r,Lr,i))}function Ur(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=Ce(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<s;){var u=(c=r[o])[0],l=t[u],f=c[1];if(a&&c[2]){if(l===e&&!(u in t))return!1}else{var h=new Jn;if(i)var d=i(l,f,u,t,n,h);if(!(d===e?Lr(f,l,3,i,h):d))return!1}}return!0}function jr(e){return!(!aa(e)||function(e){return!!ze&&ze in e}(e))&&(ia(e)?qe:me).test(Vo(e))}function Dr(e){return"function"==typeof e?e:null==e?lc:"object"==typeof e?Js(e)?$r(e[0],e[1]):qr(e):_c(e)}function zr(e){if(!Po(e))return Gt(e);var t=[];for(var n in Ce(e))je.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Br(e){if(!aa(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=Po(e),n=[];for(var r in e)"constructor"==r&&(t||!je.call(e,r))||n.push(r);return n}function Fr(e,t){return e<t}function Hr(e,t){var n=-1,r=Zs(e)?Se(e.length):[];return pr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function qr(e){var t=yo(e);return 1==t.length&&t[0][2]?No(t[0][0],t[0][1]):function(n){return n===e||Ur(n,e,t)}}function $r(t,n){return Io(t)&&ko(n)?No($o(t),n):function(r){var i=Ta(r,t);return i===e&&i===n?Ma(r,t):Lr(n,i,3)}}function Vr(t,n,r,i,o){t!==n&&wr(n,(function(s,a){if(o||(o=new Jn),aa(s))!function(t,n,r,i,o,s,a){var c=Uo(t,r),u=Uo(n,r),l=a.get(u);if(l)nr(t,r,l);else{var f=s?s(c,u,r+"",t,n,a):e,h=f===e;if(h){var d=Js(u),p=!d&&ta(u),g=!d&&!p&&ya(u);f=u,d||p||g?Js(c)?f=c:ea(c)?f=Ai(c):p?(h=!1,f=Ii(u,!0)):g?(h=!1,f=Ci(u,!0)):f=[]:fa(u)||Qs(u)?(f=c,Qs(c)?f=Oa(c):(!aa(c)||ia(c))&&(f=Eo(u))):h=!1}h&&(a.set(u,f),o(f,u,i,s,a),a.delete(u)),nr(t,r,f)}}(t,n,a,r,Vr,i,o);else{var c=i?i(Uo(t,a),s,a+"",t,n,o):e;c===e&&(c=s),nr(t,a,c)}}),za)}function Wr(t,n){var r=t.length;if(r)return Oo(n+=n<0?r:0,r)?t[n]:e}function Kr(e,t,n){t=t.length?Mt(t,(function(e){return Js(e)?function(t){return Ir(t,1===e.length?e[0]:e)}:e})):[lc];var r=-1;t=Mt(t,Zt(po()));var i=Hr(e,(function(e,n,i){var o=Mt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var c=Pi(i[r],o[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Gr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Ir(e,s);n(a,s)&&ni(o,Ei(s,e),a)}return o}function Yr(e,t,n,r){var i=r?$t:qt,o=-1,s=t.length,a=e;for(e===t&&(t=Ai(t)),n&&(a=Mt(e,Zt(n)));++o<s;)for(var c=0,u=t[o],l=n?n(u):u;(c=i(a,l,c,r))>-1;)a!==e&&Je.call(a,c,1),Je.call(e,c,1);return e}function Qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Oo(i)?Je.call(e,i,1):pi(e,i)}}return e}function Jr(e,t){return e+gt(On()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return zo(To(e,t,lc),e+"")}function ei(e){return Zn(Ka(e))}function ti(e,t){var n=Ka(e);return Ho(n,ur(t,0,n.length))}function ni(t,n,r,i){if(!aa(t))return t;for(var o=-1,s=(n=Ei(n,t)).length,a=s-1,c=t;null!=c&&++o<s;){var u=$o(n[o]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(o!=a){var f=c[u];(l=i?i(f,u,c):e)===e&&(l=aa(f)?f:Oo(n[o+1])?[]:{})}rr(c,u,l),c=c[u]}return t}var ri=An?function(e,t){return An.set(e,t),e}:lc,ii=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:ac(t),writable:!0})}:lc;function oi(e){return Ho(Ka(e))}function si(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Se(i);++r<i;)o[r]=e[r+t];return o}function ai(e,t){var n;return pr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ci(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=g){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!ga(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return ui(e,t,lc,n)}function ui(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,c=null===n,u=ga(n),l=n===e;o<s;){var f=gt((o+s)/2),h=r(t[f]),d=h!==e,g=null===h,y=h==h,m=ga(h);if(a)var v=i||y;else v=l?y&&(i||d):c?y&&d&&(i||!g):u?y&&d&&!g&&(i||!m):!g&&!m&&(i?h<=n:h<n);v?o=f+1:s=f}return wn(s,p)}function li(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Ks(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function fi(e){return"number"==typeof e?e:ga(e)?h:+e}function hi(e){if("string"==typeof e)return e;if(Js(e))return Mt(e,hi)+"";if(ga(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-l?"-0":t}function di(e,t,n){var r=-1,i=At,o=e.length,s=!0,a=[],c=a;if(n)s=!1,i=Tt;else if(o>=200){var u=t?null:Xi(e);if(u)return dn(u);s=!1,i=tn,c=new Qn}else c=t?[]:a;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),a.push(l)}else i(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a}function pi(e,t){return null==(e=Mo(e,t=Ei(t,e)))||delete e[$o(rs(t))]}function gi(e,t,n,r){return ni(e,t,n(Ir(e,t)),r)}function yi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?si(e,r?0:o,r?o+1:i):si(e,r?o+1:0,r?i:o)}function mi(e,t){var n=e;return n instanceof Wn&&(n=n.value()),Ut(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function vi(e,t,n){var r=e.length;if(r<2)return r?di(e[0]):[];for(var i=-1,o=Se(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=dr(o[i]||s,e[a],t,n));return di(br(o,1),t,n)}function _i(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var c=i<s?n[i]:e;r(a,t[i],c)}return a}function bi(e){return ea(e)?e:[]}function wi(e){return"function"==typeof e?e:lc}function Ei(e,t){return Js(e)?e:Io(e,t)?[e]:qo(Ra(e))}var Si=Zr;function Oi(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:si(t,n,r)}var Ri=it||function(e){return pt.clearTimeout(e)};function Ii(e,t){if(t)return e.slice();var n=e.length,r=Ke?Ke(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function Ci(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Pi(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=ga(t),a=n!==e,c=null===n,u=n==n,l=ga(n);if(!c&&!l&&!s&&t>n||s&&a&&u&&!c&&!l||i&&a&&u||!r&&u||!o)return 1;if(!i&&!s&&!l&&t<n||l&&r&&o&&!i&&!s||c&&r&&o||!a&&o||!u)return-1}return 0}function ki(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,c=t.length,u=bn(o-s,0),l=Se(c+u),f=!r;++a<c;)l[a]=t[a];for(;++i<s;)(f||i<o)&&(l[n[i]]=e[i]);for(;u--;)l[a++]=e[i++];return l}function Ni(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,c=-1,u=t.length,l=bn(o-a,0),f=Se(l+u),h=!r;++i<l;)f[i]=e[i];for(var d=i;++c<u;)f[d+c]=t[c];for(;++s<a;)(h||i<o)&&(f[d+n[s]]=e[i++]);return f}function Ai(e,t){var n=-1,r=e.length;for(t||(t=Se(r));++n<r;)t[n]=e[n];return t}function Ti(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var c=n[s],u=i?i(r[c],t[c],c,r,t):e;u===e&&(u=t[c]),o?ar(r,c,u):rr(r,c,u)}return r}function Mi(e,t){return function(n,r){var i=Js(n)?xt:or,o=t?t():{};return i(n,e,po(r,2),o)}}function Li(t){return Zr((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&Ro(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=Ce(n);++i<o;){var c=r[i];c&&t(n,c,i,s)}return n}))}function Ui(e,t){return function(n,r){if(null==n)return n;if(!Zs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Ce(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function ji(e){return function(t,n,r){for(var i=-1,o=Ce(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}}function Di(t){return function(n){var r=cn(n=Ra(n))?gn(n):e,i=r?r[0]:n.charAt(0),o=r?Oi(r,1).join(""):n.slice(1);return i[t]()+o}}function zi(e){return function(t){return Ut(ic(Qa(t).replace(Ze,"")),e,"")}}function Bi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=qn(e.prototype),r=e.apply(n,t);return aa(r)?r:n}}function Fi(t){return function(n,r,i){var o=Ce(n);if(!Zs(n)){var s=po(r,3);n=Da(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function Hi(t){return ao((function(r){var i=r.length,o=i,s=Vn.prototype.thru;for(t&&r.reverse();o--;){var a=r[o];if("function"!=typeof a)throw new Ne(n);if(s&&!c&&"wrapper"==fo(a))var c=new Vn([],!0)}for(o=c?o:i;++o<i;){var u=fo(a=r[o]),l="wrapper"==u?lo(a):e;c=l&&xo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[fo(l[0])].apply(c,l[3]):1==a.length&&xo(a)?c[u]():c.thru(a)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&Js(t))return c.plant(t).value();for(var n=0,o=i?r[n].apply(this,e):t;++n<i;)o=r[n].call(this,o);return o}}))}function qi(t,n,r,i,o,s,a,u,l,f){var h=n&c,d=1&n,p=2&n,g=24&n,y=512&n,m=p?e:Bi(t);return function e(){for(var c=arguments.length,v=Se(c),_=c;_--;)v[_]=arguments[_];if(g)var b=ho(e),w=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(v,b);if(i&&(v=ki(v,i,o,g)),s&&(v=Ni(v,s,a,g)),c-=w,g&&c<f){var E=hn(v,b);return Qi(t,n,qi,e.placeholder,r,v,E,u,l,f-c)}var S=d?r:this,O=p?S[t]:t;return c=v.length,u?v=Lo(v,u):y&&c>1&&v.reverse(),h&&l<c&&(v.length=l),this&&this!==pt&&this instanceof e&&(O=m||Bi(O)),O.apply(S,v)}}function $i(e,t){return function(n,r){return function(e,t,n,r){return Sr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Vi(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=hi(r),i=hi(i)):(r=fi(r),i=fi(i)),o=t(r,i)}return o}}function Wi(e){return ao((function(t){return t=Mt(t,Zt(po())),Zr((function(n){var r=this;return e(t,(function(e){return It(e,r,n)}))}))}))}function Ki(t,n){var r=(n=n===e?" ":hi(n)).length;if(r<2)return r?Xr(n,t):n;var i=Xr(n,dt(t/pn(n)));return cn(n)?Oi(gn(i),0,t).join(""):i.slice(0,t)}function Gi(t){return function(n,r,i){return i&&"number"!=typeof i&&Ro(n,r,i)&&(r=i=e),n=ba(n),r===e?(r=n,n=0):r=ba(r),function(e,t,n,r){for(var i=-1,o=bn(dt((t-e)/(n||1)),0),s=Se(o);o--;)s[r?o:++i]=e,e+=n;return s}(n,r,i=i===e?n<r?1:-1:ba(i),t)}}function Yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Sa(t),n=Sa(n)),e(t,n)}}function Qi(t,n,r,i,o,c,u,l,f,h){var d=8&n;n|=d?s:a,4&(n&=~(d?a:s))||(n&=-4);var p=[t,n,o,d?c:e,d?u:e,d?e:c,d?e:u,l,f,h],g=r.apply(e,p);return xo(t)&&jo(g,p),g.placeholder=i,Bo(g,t,n)}function Ji(e){var t=xe[e];return function(e,n){if(e=Sa(e),(n=null==n?0:wn(wa(n),292))&&_t(e)){var r=(Ra(e)+"e").split("e");return+((r=(Ra(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Xi=Pn&&1/dn(new Pn([,-0]))[1]==l?function(e){return new Pn(e)}:gc;function Zi(e){return function(t){var n=bo(t);return n==O?ln(t):n==P?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return Mt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function eo(t,r,i,c,u,l,f,h){var d=2&r;if(!d&&"function"!=typeof t)throw new Ne(n);var p=c?c.length:0;if(p||(r&=-97,c=u=e),f=f===e?f:bn(wa(f),0),h=h===e?h:wa(h),p-=u?u.length:0,r&a){var g=c,y=u;c=u=e}var m=d?e:lo(t),v=[t,r,i,c,u,g,y,l,f,h];if(m&&Ao(v,m),t=v[0],r=v[1],i=v[2],c=v[3],u=v[4],!(h=v[9]=v[9]===e?d?0:t.length:bn(v[9]-p,0))&&24&r&&(r&=-25),r&&1!=r)_=8==r||r==o?function(t,n,r){var i=Bi(t);return function o(){for(var s=arguments.length,a=Se(s),c=s,u=ho(o);c--;)a[c]=arguments[c];var l=s<3&&a[0]!==u&&a[s-1]!==u?[]:hn(a,u);return(s-=l.length)<r?Qi(t,n,qi,o.placeholder,e,a,l,e,e,r-s):It(this&&this!==pt&&this instanceof o?i:t,this,a)}}(t,r,h):r!=s&&33!=r||u.length?qi.apply(e,v):function(e,t,n,r){var i=1&t,o=Bi(e);return function t(){for(var s=-1,a=arguments.length,c=-1,u=r.length,l=Se(u+a),f=this&&this!==pt&&this instanceof t?o:e;++c<u;)l[c]=r[c];for(;a--;)l[c++]=arguments[++s];return It(f,i?n:this,l)}}(t,r,i,c);else var _=function(e,t,n){var r=1&t,i=Bi(e);return function t(){return(this&&this!==pt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(t,r,i);return Bo((m?ri:jo)(_,v),t,r)}function to(t,n,r,i){return t===e||Ks(t,Me[r])&&!je.call(i,r)?n:t}function no(t,n,r,i,o,s){return aa(t)&&aa(n)&&(s.set(n,t),Vr(t,n,e,no,s),s.delete(n)),t}function ro(t){return fa(t)?e:t}function io(t,n,r,i,o,s){var a=1&r,c=t.length,u=n.length;if(c!=u&&!(a&&u>c))return!1;var l=s.get(t),f=s.get(n);if(l&&f)return l==n&&f==t;var h=-1,d=!0,p=2&r?new Qn:e;for(s.set(t,n),s.set(n,t);++h<c;){var g=t[h],y=n[h];if(i)var m=a?i(y,g,h,n,t,s):i(g,y,h,t,n,s);if(m!==e){if(m)continue;d=!1;break}if(p){if(!Dt(n,(function(e,t){if(!tn(p,t)&&(g===e||o(g,e,r,i,s)))return p.push(t)}))){d=!1;break}}else if(g!==y&&!o(g,y,r,i,s)){d=!1;break}}return s.delete(t),s.delete(n),d}function oo(e,t,n,r,i,o,s){switch(n){case M:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case _:case b:case R:return Ks(+e,+t);case w:return e.name==t.name&&e.message==t.message;case C:case k:return e==t+"";case O:var a=ln;case P:var c=1&r;if(a||(a=dn),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=2,s.set(e,t);var l=io(a(e),a(t),r,i,o,s);return s.delete(e),l;case N:if(Bn)return Bn.call(e)==Bn.call(t)}return!1}function so(t,n,r,i,o,s){var a=1&r,c=co(t),u=c.length;if(u!=co(n).length&&!a)return!1;for(var l=u;l--;){var f=c[l];if(!(a?f in n:je.call(n,f)))return!1}var h=s.get(t),d=s.get(n);if(h&&d)return h==n&&d==t;var p=!0;s.set(t,n),s.set(n,t);for(var g=a;++l<u;){var y=t[f=c[l]],m=n[f];if(i)var v=a?i(m,y,f,n,t,s):i(y,m,f,t,n,s);if(!(v===e?y===m||o(y,m,r,i,s):v)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var _=t.constructor,b=n.constructor;_!=b&&"constructor"in t&&"constructor"in n&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(p=!1)}return s.delete(t),s.delete(n),p}function ao(t){return zo(To(t,e,Xo),t+"")}function co(e){return xr(e,Da,vo)}function uo(e){return xr(e,za,_o)}var lo=An?function(e){return An.get(e)}:gc;function fo(e){for(var t=e.name+"",n=Tn[t],r=je.call(Tn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function ho(e){return(je.call(Hn,"placeholder")?Hn:e).placeholder}function po(){var e=Hn.iteratee||fc;return e=e===fc?Dr:e,arguments.length?e(arguments[0],arguments[1]):e}function go(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function yo(e){for(var t=Da(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ko(i)]}return t}function mo(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return jr(r)?r:e}var vo=yt?function(e){return null==e?[]:(e=Ce(e),Nt(yt(e),(function(t){return Qe.call(e,t)})))}:Ec,_o=yt?function(e){for(var t=[];e;)Lt(t,vo(e)),e=Ge(e);return t}:Ec,bo=Cr;function wo(e,t,n){for(var r=-1,i=(t=Ei(t,e)).length,o=!1;++r<i;){var s=$o(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&sa(i)&&Oo(s,i)&&(Js(e)||Qs(e))}function Eo(e){return"function"!=typeof e.constructor||Po(e)?{}:qn(Ge(e))}function So(e){return Js(e)||Qs(e)||!!(Xe&&e&&e[Xe])}function Oo(e,t){var n=typeof e;return!!(t=t??f)&&("number"==n||"symbol"!=n&&_e.test(e))&&e>-1&&e%1==0&&e<t}function Ro(e,t,n){if(!aa(n))return!1;var r=typeof t;return!!("number"==r?Zs(n)&&Oo(t,n.length):"string"==r&&t in n)&&Ks(n[t],e)}function Io(e,t){if(Js(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ga(e))||te.test(e)||!ee.test(e)||null!=t&&e in Ce(t)}function xo(e){var t=fo(e),n=Hn[t];if("function"!=typeof n||!(t in Wn.prototype))return!1;if(e===n)return!0;var r=lo(n);return!!r&&e===r[0]}(In&&bo(new In(new ArrayBuffer(1)))!=M||xn&&bo(new xn)!=O||Cn&&bo(Cn.resolve())!=x||Pn&&bo(new Pn)!=P||kn&&bo(new kn)!=A)&&(bo=function(t){var n=Cr(t),r=n==I?t.constructor:e,i=r?Vo(r):"";if(i)switch(i){case Mn:return M;case Ln:return O;case Un:return x;case jn:return P;case Dn:return A}return n});var Co=Le?ia:Sc;function Po(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Me)}function ko(e){return e==e&&!aa(e)}function No(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in Ce(r))}}function Ao(e,t){var n=e[1],r=t[1],o=n|r,s=o<131,a=r==c&&8==n||r==c&&n==u&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!s&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var f=e[3];e[3]=f?ki(f,l,t[4]):l,e[4]=f?hn(e[3],i):t[4]}return(l=t[5])&&(f=e[5],e[5]=f?Ni(f,l,t[6]):l,e[6]=f?hn(e[5],i):t[6]),(l=t[7])&&(e[7]=l),r&c&&(e[8]=null==e[8]?t[8]:wn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function To(t,n,r){return n=bn(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=bn(e.length-n,0),s=Se(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=Se(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),It(t,this,a)}}function Mo(e,t){return t.length<2?e:Ir(e,si(t,0,-1))}function Lo(t,n){for(var r=t.length,i=wn(n.length,r),o=Ai(t);i--;){var s=n[i];t[i]=Oo(s,r)?o[s]:e}return t}function Uo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var jo=Fo(ri),Do=ht||function(e,t){return pt.setTimeout(e,t)},zo=Fo(ii);function Bo(e,t,n){var r=t+"";return zo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ct(y,(function(n){var r="_."+n[0];t&n[1]&&!At(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(ue):[]}(r),n)))}function Fo(t){var n=0,r=0;return function(){var i=En(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Ho(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=Jr(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var qo=function(e){var t=Fs(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function $o(e){if("string"==typeof e||ga(e))return e;var t=e+"";return"0"==t&&1/e==-l?"-0":t}function Vo(e){if(null!=e){try{return Ue.call(e)}catch{}try{return e+""}catch{}}return""}function Wo(e){if(e instanceof Wn)return e.clone();var t=new Vn(e.__wrapped__,e.__chain__);return t.__actions__=Ai(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ko=Zr((function(e,t){return ea(e)?dr(e,br(t,1,ea,!0)):[]})),Go=Zr((function(t,n){var r=rs(n);return ea(r)&&(r=e),ea(t)?dr(t,br(n,1,ea,!0),po(r,2)):[]})),Yo=Zr((function(t,n){var r=rs(n);return ea(r)&&(r=e),ea(t)?dr(t,br(n,1,ea,!0),e,r):[]}));function Qo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:wa(n);return i<0&&(i=bn(r+i,0)),Ht(e,po(t,3),i)}function Jo(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=wa(r),o=r<0?bn(i+o,0):wn(o,i-1)),Ht(t,po(n,3),o,!0)}function Xo(e){return null!=e&&e.length?br(e,1):[]}function Zo(t){return t&&t.length?t[0]:e}var es=Zr((function(e){var t=Mt(e,bi);return t.length&&t[0]===e[0]?Ar(t):[]})),ts=Zr((function(t){var n=rs(t),r=Mt(t,bi);return n===rs(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Ar(r,po(n,2)):[]})),ns=Zr((function(t){var n=rs(t),r=Mt(t,bi);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Ar(r,e,n):[]}));function rs(t){var n=null==t?0:t.length;return n?t[n-1]:e}var is=Zr(os);function os(e,t){return e&&e.length&&t&&t.length?Yr(e,t):e}var ss=ao((function(e,t){var n=null==e?0:e.length,r=cr(e,t);return Qr(e,Mt(t,(function(e){return Oo(e,n)?+e:e})).sort(Pi)),r}));function as(e){return null==e?e:Rn.call(e)}var cs=Zr((function(e){return di(br(e,1,ea,!0))})),us=Zr((function(t){var n=rs(t);return ea(n)&&(n=e),di(br(t,1,ea,!0),po(n,2))})),ls=Zr((function(t){var n=rs(t);return n="function"==typeof n?n:e,di(br(t,1,ea,!0),e,n)}));function fs(e){if(!e||!e.length)return[];var t=0;return e=Nt(e,(function(e){if(ea(e))return t=bn(e.length,t),!0})),Jt(t,(function(t){return Mt(e,Kt(t))}))}function hs(t,n){if(!t||!t.length)return[];var r=fs(t);return null==n?r:Mt(r,(function(t){return It(n,e,t)}))}var ds=Zr((function(e,t){return ea(e)?dr(e,t):[]})),ps=Zr((function(e){return vi(Nt(e,ea))})),gs=Zr((function(t){var n=rs(t);return ea(n)&&(n=e),vi(Nt(t,ea),po(n,2))})),ys=Zr((function(t){var n=rs(t);return n="function"==typeof n?n:e,vi(Nt(t,ea),e,n)})),ms=Zr(fs);var vs=Zr((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,hs(t,r)}));function _s(e){var t=Hn(e);return t.__chain__=!0,t}function bs(e,t){return t(e)}var ws=ao((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return cr(e,t)};return!(n>1||this.__actions__.length)&&i instanceof Wn&&Oo(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:bs,args:[o],thisArg:e}),new Vn(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));var Es=Mi((function(e,t,n){je.call(e,n)?++e[n]:ar(e,n,1)}));var Ss=Fi(Qo),Os=Fi(Jo);function Rs(e,t){return(Js(e)?Ct:pr)(e,po(t,3))}function Is(e,t){return(Js(e)?Pt:gr)(e,po(t,3))}var xs=Mi((function(e,t,n){je.call(e,n)?e[n].push(t):ar(e,n,[t])}));var Cs=Zr((function(e,t,n){var r=-1,i="function"==typeof t,o=Zs(e)?Se(e.length):[];return pr(e,(function(e){o[++r]=i?It(t,e,n):Tr(e,t,n)})),o})),Ps=Mi((function(e,t,n){ar(e,n,t)}));function ks(e,t){return(Js(e)?Mt:Hr)(e,po(t,3))}var Ns=Mi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var As=Zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Ro(e,t[0],t[1])?t=[]:n>2&&Ro(t[0],t[1],t[2])&&(t=[t[0]]),Kr(e,br(t,1),[])})),Ts=ut||function(){return pt.Date.now()};function Ms(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,eo(t,c,e,e,e,e,n)}function Ls(t,r){var i;if("function"!=typeof r)throw new Ne(n);return t=wa(t),function(){return--t>0&&(i=r.apply(this,arguments)),t<=1&&(r=e),i}}var Us=Zr((function(e,t,n){var r=1;if(n.length){var i=hn(n,ho(Us));r|=s}return eo(e,r,t,n,i)})),js=Zr((function(e,t,n){var r=3;if(n.length){var i=hn(n,ho(js));r|=s}return eo(t,r,e,n,i)}));function Ds(t,r,i){var o,s,a,c,u,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new Ne(n);function g(n){var r=o,i=s;return o=s=e,f=n,c=t.apply(i,r)}function y(t){var n=t-l;return l===e||n>=r||n<0||d&&t-f>=a}function m(){var e=Ts();if(y(e))return v(e);u=Do(m,function(e){var t=r-(e-l);return d?wn(t,a-(e-f)):t}(e))}function v(t){return u=e,p&&o?g(t):(o=s=e,c)}function _(){var t=Ts(),n=y(t);if(o=arguments,s=this,l=t,n){if(u===e)return function(e){return f=e,u=Do(m,r),h?g(e):c}(l);if(d)return Ri(u),u=Do(m,r),g(l)}return u===e&&(u=Do(m,r)),c}return r=Sa(r)||0,aa(i)&&(h=!!i.leading,a=(d="maxWait"in i)?bn(Sa(i.maxWait)||0,r):a,p="trailing"in i?!!i.trailing:p),_.cancel=function(){u!==e&&Ri(u),f=0,o=l=s=u=e},_.flush=function(){return u===e?c:v(Ts())},_}var zs=Zr((function(e,t){return hr(e,1,t)})),Bs=Zr((function(e,t,n){return hr(e,Sa(t)||0,n)}));function Fs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ne(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Fs.Cache||Yn),r}function Hs(e){if("function"!=typeof e)throw new Ne(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fs.Cache=Yn;var qs=Si((function(e,t){var n=(t=1==t.length&&Js(t[0])?Mt(t[0],Zt(po())):Mt(br(t,1),Zt(po()))).length;return Zr((function(r){for(var i=-1,o=wn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return It(e,this,r)}))})),$s=Zr((function(t,n){var r=hn(n,ho($s));return eo(t,s,e,n,r)})),Vs=Zr((function(t,n){var r=hn(n,ho(Vs));return eo(t,a,e,n,r)})),Ws=ao((function(t,n){return eo(t,u,e,e,e,n)}));function Ks(e,t){return e===t||e!=e&&t!=t}var Gs=Yi(Pr),Ys=Yi((function(e,t){return e>=t})),Qs=Mr(function(){return arguments}())?Mr:function(e){return ca(e)&&je.call(e,"callee")&&!Qe.call(e,"callee")},Js=Se.isArray,Xs=bt?Zt(bt):function(e){return ca(e)&&Cr(e)==T};function Zs(e){return null!=e&&sa(e.length)&&!ia(e)}function ea(e){return ca(e)&&Zs(e)}var ta=vt||Sc,na=wt?Zt(wt):function(e){return ca(e)&&Cr(e)==b};function ra(e){if(!ca(e))return!1;var t=Cr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!fa(e)}function ia(e){if(!aa(e))return!1;var t=Cr(e);return t==E||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function oa(e){return"number"==typeof e&&e==wa(e)}function sa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function aa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ca(e){return null!=e&&"object"==typeof e}var ua=Et?Zt(Et):function(e){return ca(e)&&bo(e)==O};function la(e){return"number"==typeof e||ca(e)&&Cr(e)==R}function fa(e){if(!ca(e)||Cr(e)!=I)return!1;var t=Ge(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ue.call(n)==Fe}var ha=St?Zt(St):function(e){return ca(e)&&Cr(e)==C};var da=Ot?Zt(Ot):function(e){return ca(e)&&bo(e)==P};function pa(e){return"string"==typeof e||!Js(e)&&ca(e)&&Cr(e)==k}function ga(e){return"symbol"==typeof e||ca(e)&&Cr(e)==N}var ya=Rt?Zt(Rt):function(e){return ca(e)&&sa(e.length)&&!!at[Cr(e)]};var ma=Yi(Fr),va=Yi((function(e,t){return e<=t}));function _a(e){if(!e)return[];if(Zs(e))return pa(e)?gn(e):Ai(e);if(tt&&e[tt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[tt]());var t=bo(e);return(t==O?ln:t==P?dn:Ka)(e)}function ba(e){return e?(e=Sa(e))===l||e===-l?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function wa(e){var t=ba(e),n=t%1;return t==t?n?t-n:t:0}function Ea(e){return e?ur(wa(e),0,d):0}function Sa(e){if("number"==typeof e)return e;if(ga(e))return h;if(aa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=aa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=ye.test(e);return n||ve.test(e)?ft(e.slice(2),n?2:8):ge.test(e)?h:+e}function Oa(e){return Ti(e,za(e))}function Ra(e){return null==e?"":hi(e)}var Ia=Li((function(e,t){if(Po(t)||Zs(t))Ti(t,Da(t),e);else for(var n in t)je.call(t,n)&&rr(e,n,t[n])})),xa=Li((function(e,t){Ti(t,za(t),e)})),Ca=Li((function(e,t,n,r){Ti(t,za(t),e,r)})),Pa=Li((function(e,t,n,r){Ti(t,Da(t),e,r)})),ka=ao(cr);var Na=Zr((function(t,n){t=Ce(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&Ro(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=za(s),c=-1,u=a.length;++c<u;){var l=a[c],f=t[l];(f===e||Ks(f,Me[l])&&!je.call(t,l))&&(t[l]=s[l])}return t})),Aa=Zr((function(t){return t.push(e,no),It(Fa,e,t)}));function Ta(t,n,r){var i=null==t?e:Ir(t,n);return i===e?r:i}function Ma(e,t){return null!=e&&wo(e,t,Nr)}var La=$i((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),e[t]=n}),ac(lc)),Ua=$i((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),je.call(e,t)?e[t].push(n):e[t]=[n]}),po),ja=Zr(Tr);function Da(e){return Zs(e)?Xn(e):zr(e)}function za(e){return Zs(e)?Xn(e,!0):Br(e)}var Ba=Li((function(e,t,n){Vr(e,t,n)})),Fa=Li((function(e,t,n,r){Vr(e,t,n,r)})),Ha=ao((function(e,t){var n={};if(null==e)return n;var r=!1;t=Mt(t,(function(t){return t=Ei(t,e),r||(r=t.length>1),t})),Ti(e,uo(e),n),r&&(n=lr(n,7,ro));for(var i=t.length;i--;)pi(n,t[i]);return n}));var qa=ao((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return Ma(e,n)}))}(e,t)}));function $a(e,t){if(null==e)return{};var n=Mt(uo(e),(function(e){return[e]}));return t=po(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var Va=Zi(Da),Wa=Zi(za);function Ka(e){return null==e?[]:en(e,Da(e))}var Ga=zi((function(e,t,n){return t=t.toLowerCase(),e+(n?Ya(t):t)}));function Ya(e){return rc(Ra(e).toLowerCase())}function Qa(e){return(e=Ra(e))&&e.replace(be,on).replace(et,"")}var Ja=zi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Xa=zi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Za=Di("toLowerCase");var ec=zi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var tc=zi((function(e,t,n){return e+(n?" ":"")+rc(t)}));var nc=zi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),rc=Di("toUpperCase");function ic(t,n,r){return t=Ra(t),(n=r?e:n)===e?un(t)?vn(t):Bt(t):t.match(n)||[]}var oc=Zr((function(t,n){try{return It(t,e,n)}catch(e){return ra(e)?e:new Re(e)}})),sc=ao((function(e,t){return Ct(t,(function(t){t=$o(t),ar(e,t,Us(e[t],e))})),e}));function ac(e){return function(){return e}}var cc=Hi(),uc=Hi(!0);function lc(e){return e}function fc(e){return Dr("function"==typeof e?e:lr(e,1))}var hc=Zr((function(e,t){return function(n){return Tr(n,e,t)}})),dc=Zr((function(e,t){return function(n){return Tr(e,n,t)}}));function pc(e,t,n){var r=Da(t),i=Rr(t,r);null==n&&(!aa(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Rr(t,Da(t)));var o=!(aa(n)&&"chain"in n&&!n.chain),s=ia(e);return Ct(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ai(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function gc(){}var yc=Wi(Mt),mc=Wi(kt),vc=Wi(Dt);function _c(e){return Io(e)?Kt($o(e)):function(e){return function(t){return Ir(t,e)}}(e)}var bc=Gi(),wc=Gi(!0);function Ec(){return[]}function Sc(){return!1}var Oc=Vi((function(e,t){return e+t}),0),Rc=Ji("ceil"),Ic=Vi((function(e,t){return e/t}),1),xc=Ji("floor");var Cc=Vi((function(e,t){return e*t}),1),Pc=Ji("round"),kc=Vi((function(e,t){return e-t}),0);return Hn.after=function(e,t){if("function"!=typeof t)throw new Ne(n);return e=wa(e),function(){if(--e<1)return t.apply(this,arguments)}},Hn.ary=Ms,Hn.assign=Ia,Hn.assignIn=xa,Hn.assignInWith=Ca,Hn.assignWith=Pa,Hn.at=ka,Hn.before=Ls,Hn.bind=Us,Hn.bindAll=sc,Hn.bindKey=js,Hn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Js(e)?e:[e]},Hn.chain=_s,Hn.chunk=function(t,n,r){n=(r?Ro(t,n,r):n===e)?1:bn(wa(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=Se(dt(i/n));o<i;)a[s++]=si(t,o,o+=n);return a},Hn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Hn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Se(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(Js(n)?Ai(n):[n],br(t,1))},Hn.cond=function(e){var t=null==e?0:e.length,r=po();return e=t?Mt(e,(function(e){if("function"!=typeof e[1])throw new Ne(n);return[r(e[0]),e[1]]})):[],Zr((function(n){for(var r=-1;++r<t;){var i=e[r];if(It(i[0],this,n))return It(i[1],this,n)}}))},Hn.conforms=function(e){return function(e){var t=Da(e);return function(n){return fr(n,e,t)}}(lr(e,1))},Hn.constant=ac,Hn.countBy=Es,Hn.create=function(e,t){var n=qn(e);return null==t?n:sr(n,t)},Hn.curry=function t(n,r,i){var o=eo(n,8,e,e,e,e,e,r=i?e:r);return o.placeholder=t.placeholder,o},Hn.curryRight=function t(n,r,i){var s=eo(n,o,e,e,e,e,e,r=i?e:r);return s.placeholder=t.placeholder,s},Hn.debounce=Ds,Hn.defaults=Na,Hn.defaultsDeep=Aa,Hn.defer=zs,Hn.delay=Bs,Hn.difference=Ko,Hn.differenceBy=Go,Hn.differenceWith=Yo,Hn.drop=function(t,n,r){var i=null==t?0:t.length;return i?si(t,(n=r||n===e?1:wa(n))<0?0:n,i):[]},Hn.dropRight=function(t,n,r){var i=null==t?0:t.length;return i?si(t,0,(n=i-(n=r||n===e?1:wa(n)))<0?0:n):[]},Hn.dropRightWhile=function(e,t){return e&&e.length?yi(e,po(t,3),!0,!0):[]},Hn.dropWhile=function(e,t){return e&&e.length?yi(e,po(t,3),!0):[]},Hn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&Ro(e,t,n)&&(n=0,r=i),vr(e,t,n,r)):[]},Hn.filter=function(e,t){return(Js(e)?Nt:_r)(e,po(t,3))},Hn.flatMap=function(e,t){return br(ks(e,t),1)},Hn.flatMapDeep=function(e,t){return br(ks(e,t),l)},Hn.flatMapDepth=function(t,n,r){return r=r===e?1:wa(r),br(ks(t,n),r)},Hn.flatten=Xo,Hn.flattenDeep=function(e){return null!=e&&e.length?br(e,l):[]},Hn.flattenDepth=function(t,n){return null!=t&&t.length?br(t,n=n===e?1:wa(n)):[]},Hn.flip=function(e){return eo(e,512)},Hn.flow=cc,Hn.flowRight=uc,Hn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Hn.functions=function(e){return null==e?[]:Rr(e,Da(e))},Hn.functionsIn=function(e){return null==e?[]:Rr(e,za(e))},Hn.groupBy=xs,Hn.initial=function(e){return null!=e&&e.length?si(e,0,-1):[]},Hn.intersection=es,Hn.intersectionBy=ts,Hn.intersectionWith=ns,Hn.invert=La,Hn.invertBy=Ua,Hn.invokeMap=Cs,Hn.iteratee=fc,Hn.keyBy=Ps,Hn.keys=Da,Hn.keysIn=za,Hn.map=ks,Hn.mapKeys=function(e,t){var n={};return t=po(t,3),Sr(e,(function(e,r,i){ar(n,t(e,r,i),e)})),n},Hn.mapValues=function(e,t){var n={};return t=po(t,3),Sr(e,(function(e,r,i){ar(n,r,t(e,r,i))})),n},Hn.matches=function(e){return qr(lr(e,1))},Hn.matchesProperty=function(e,t){return $r(e,lr(t,1))},Hn.memoize=Fs,Hn.merge=Ba,Hn.mergeWith=Fa,Hn.method=hc,Hn.methodOf=dc,Hn.mixin=pc,Hn.negate=Hs,Hn.nthArg=function(e){return e=wa(e),Zr((function(t){return Wr(t,e)}))},Hn.omit=Ha,Hn.omitBy=function(e,t){return $a(e,Hs(po(t)))},Hn.once=function(e){return Ls(2,e)},Hn.orderBy=function(t,n,r,i){return null==t?[]:(Js(n)||(n=null==n?[]:[n]),Js(r=i?e:r)||(r=null==r?[]:[r]),Kr(t,n,r))},Hn.over=yc,Hn.overArgs=qs,Hn.overEvery=mc,Hn.overSome=vc,Hn.partial=$s,Hn.partialRight=Vs,Hn.partition=Ns,Hn.pick=qa,Hn.pickBy=$a,Hn.property=_c,Hn.propertyOf=function(t){return function(n){return null==t?e:Ir(t,n)}},Hn.pull=is,Hn.pullAll=os,Hn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,po(n,2)):e},Hn.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Yr(t,n,e,r):t},Hn.pullAt=ss,Hn.range=bc,Hn.rangeRight=wc,Hn.rearg=Ws,Hn.reject=function(e,t){return(Js(e)?Nt:_r)(e,Hs(po(t,3)))},Hn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=po(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Qr(e,i),n},Hn.rest=function(t,r){if("function"!=typeof t)throw new Ne(n);return Zr(t,r=r===e?r:wa(r))},Hn.reverse=as,Hn.sampleSize=function(t,n,r){return n=(r?Ro(t,n,r):n===e)?1:wa(n),(Js(t)?er:ti)(t,n)},Hn.set=function(e,t,n){return null==e?e:ni(e,t,n)},Hn.setWith=function(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:ni(t,n,r,i)},Hn.shuffle=function(e){return(Js(e)?tr:oi)(e)},Hn.slice=function(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&Ro(t,n,r)?(n=0,r=i):(n=null==n?0:wa(n),r=r===e?i:wa(r)),si(t,n,r)):[]},Hn.sortBy=As,Hn.sortedUniq=function(e){return e&&e.length?li(e):[]},Hn.sortedUniqBy=function(e,t){return e&&e.length?li(e,po(t,2)):[]},Hn.split=function(t,n,r){return r&&"number"!=typeof r&&Ro(t,n,r)&&(n=r=e),(r=r===e?d:r>>>0)?(t=Ra(t))&&("string"==typeof n||null!=n&&!ha(n))&&!(n=hi(n))&&cn(t)?Oi(gn(t),0,r):t.split(n,r):[]},Hn.spread=function(e,t){if("function"!=typeof e)throw new Ne(n);return t=null==t?0:bn(wa(t),0),Zr((function(n){var r=n[t],i=Oi(n,0,t);return r&&Lt(i,r),It(e,this,i)}))},Hn.tail=function(e){var t=null==e?0:e.length;return t?si(e,1,t):[]},Hn.take=function(t,n,r){return t&&t.length?si(t,0,(n=r||n===e?1:wa(n))<0?0:n):[]},Hn.takeRight=function(t,n,r){var i=null==t?0:t.length;return i?si(t,(n=i-(n=r||n===e?1:wa(n)))<0?0:n,i):[]},Hn.takeRightWhile=function(e,t){return e&&e.length?yi(e,po(t,3),!1,!0):[]},Hn.takeWhile=function(e,t){return e&&e.length?yi(e,po(t,3)):[]},Hn.tap=function(e,t){return t(e),e},Hn.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new Ne(n);return aa(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Ds(e,t,{leading:i,maxWait:t,trailing:o})},Hn.thru=bs,Hn.toArray=_a,Hn.toPairs=Va,Hn.toPairsIn=Wa,Hn.toPath=function(e){return Js(e)?Mt(e,$o):ga(e)?[e]:Ai(qo(Ra(e)))},Hn.toPlainObject=Oa,Hn.transform=function(e,t,n){var r=Js(e),i=r||ta(e)||ya(e);if(t=po(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:aa(e)&&ia(o)?qn(Ge(e)):{}}return(i?Ct:Sr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Hn.unary=function(e){return Ms(e,1)},Hn.union=cs,Hn.unionBy=us,Hn.unionWith=ls,Hn.uniq=function(e){return e&&e.length?di(e):[]},Hn.uniqBy=function(e,t){return e&&e.length?di(e,po(t,2)):[]},Hn.uniqWith=function(t,n){return n="function"==typeof n?n:e,t&&t.length?di(t,e,n):[]},Hn.unset=function(e,t){return null==e||pi(e,t)},Hn.unzip=fs,Hn.unzipWith=hs,Hn.update=function(e,t,n){return null==e?e:gi(e,t,wi(n))},Hn.updateWith=function(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:gi(t,n,wi(r),i)},Hn.values=Ka,Hn.valuesIn=function(e){return null==e?[]:en(e,za(e))},Hn.without=ds,Hn.words=ic,Hn.wrap=function(e,t){return $s(wi(t),e)},Hn.xor=ps,Hn.xorBy=gs,Hn.xorWith=ys,Hn.zip=ms,Hn.zipObject=function(e,t){return _i(e||[],t||[],rr)},Hn.zipObjectDeep=function(e,t){return _i(e||[],t||[],ni)},Hn.zipWith=vs,Hn.entries=Va,Hn.entriesIn=Wa,Hn.extend=xa,Hn.extendWith=Ca,pc(Hn,Hn),Hn.add=Oc,Hn.attempt=oc,Hn.camelCase=Ga,Hn.capitalize=Ya,Hn.ceil=Rc,Hn.clamp=function(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=Sa(r))==r?r:0),n!==e&&(n=(n=Sa(n))==n?n:0),ur(Sa(t),n,r)},Hn.clone=function(e){return lr(e,4)},Hn.cloneDeep=function(e){return lr(e,5)},Hn.cloneDeepWith=function(t,n){return lr(t,5,n="function"==typeof n?n:e)},Hn.cloneWith=function(t,n){return lr(t,4,n="function"==typeof n?n:e)},Hn.conformsTo=function(e,t){return null==t||fr(e,t,Da(t))},Hn.deburr=Qa,Hn.defaultTo=function(e,t){return null==e||e!=e?t:e},Hn.divide=Ic,Hn.endsWith=function(t,n,r){t=Ra(t),n=hi(n);var i=t.length,o=r=r===e?i:ur(wa(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n},Hn.eq=Ks,Hn.escape=function(e){return(e=Ra(e))&&Q.test(e)?e.replace(G,sn):e},Hn.escapeRegExp=function(e){return(e=Ra(e))&&ie.test(e)?e.replace(re,"\\$&"):e},Hn.every=function(t,n,r){var i=Js(t)?kt:yr;return r&&Ro(t,n,r)&&(n=e),i(t,po(n,3))},Hn.find=Ss,Hn.findIndex=Qo,Hn.findKey=function(e,t){return Ft(e,po(t,3),Sr)},Hn.findLast=Os,Hn.findLastIndex=Jo,Hn.findLastKey=function(e,t){return Ft(e,po(t,3),Or)},Hn.floor=xc,Hn.forEach=Rs,Hn.forEachRight=Is,Hn.forIn=function(e,t){return null==e?e:wr(e,po(t,3),za)},Hn.forInRight=function(e,t){return null==e?e:Er(e,po(t,3),za)},Hn.forOwn=function(e,t){return e&&Sr(e,po(t,3))},Hn.forOwnRight=function(e,t){return e&&Or(e,po(t,3))},Hn.get=Ta,Hn.gt=Gs,Hn.gte=Ys,Hn.has=function(e,t){return null!=e&&wo(e,t,kr)},Hn.hasIn=Ma,Hn.head=Zo,Hn.identity=lc,Hn.includes=function(e,t,n,r){e=Zs(e)?e:Ka(e),n=n&&!r?wa(n):0;var i=e.length;return n<0&&(n=bn(i+n,0)),pa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&qt(e,t,n)>-1},Hn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:wa(n);return i<0&&(i=bn(r+i,0)),qt(e,t,i)},Hn.inRange=function(t,n,r){return n=ba(n),r===e?(r=n,n=0):r=ba(r),function(e,t,n){return e>=wn(t,n)&&e<bn(t,n)}(t=Sa(t),n,r)},Hn.invoke=ja,Hn.isArguments=Qs,Hn.isArray=Js,Hn.isArrayBuffer=Xs,Hn.isArrayLike=Zs,Hn.isArrayLikeObject=ea,Hn.isBoolean=function(e){return!0===e||!1===e||ca(e)&&Cr(e)==_},Hn.isBuffer=ta,Hn.isDate=na,Hn.isElement=function(e){return ca(e)&&1===e.nodeType&&!fa(e)},Hn.isEmpty=function(e){if(null==e)return!0;if(Zs(e)&&(Js(e)||"string"==typeof e||"function"==typeof e.splice||ta(e)||ya(e)||Qs(e)))return!e.length;var t=bo(e);if(t==O||t==P)return!e.size;if(Po(e))return!zr(e).length;for(var n in e)if(je.call(e,n))return!1;return!0},Hn.isEqual=function(e,t){return Lr(e,t)},Hn.isEqualWith=function(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Lr(t,n,e,r):!!i},Hn.isError=ra,Hn.isFinite=function(e){return"number"==typeof e&&_t(e)},Hn.isFunction=ia,Hn.isInteger=oa,Hn.isLength=sa,Hn.isMap=ua,Hn.isMatch=function(e,t){return e===t||Ur(e,t,yo(t))},Hn.isMatchWith=function(t,n,r){return r="function"==typeof r?r:e,Ur(t,n,yo(n),r)},Hn.isNaN=function(e){return la(e)&&e!=+e},Hn.isNative=function(e){if(Co(e))throw new Re("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return jr(e)},Hn.isNil=function(e){return null==e},Hn.isNull=function(e){return null===e},Hn.isNumber=la,Hn.isObject=aa,Hn.isObjectLike=ca,Hn.isPlainObject=fa,Hn.isRegExp=ha,Hn.isSafeInteger=function(e){return oa(e)&&e>=-f&&e<=f},Hn.isSet=da,Hn.isString=pa,Hn.isSymbol=ga,Hn.isTypedArray=ya,Hn.isUndefined=function(t){return t===e},Hn.isWeakMap=function(e){return ca(e)&&bo(e)==A},Hn.isWeakSet=function(e){return ca(e)&&"[object WeakSet]"==Cr(e)},Hn.join=function(e,t){return null==e?"":zt.call(e,t)},Hn.kebabCase=Ja,Hn.last=rs,Hn.lastIndexOf=function(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=wa(r))<0?bn(i+o,0):wn(o,i-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(t,n,o):Ht(t,Vt,o,!0)},Hn.lowerCase=Xa,Hn.lowerFirst=Za,Hn.lt=ma,Hn.lte=va,Hn.max=function(t){return t&&t.length?mr(t,lc,Pr):e},Hn.maxBy=function(t,n){return t&&t.length?mr(t,po(n,2),Pr):e},Hn.mean=function(e){return Wt(e,lc)},Hn.meanBy=function(e,t){return Wt(e,po(t,2))},Hn.min=function(t){return t&&t.length?mr(t,lc,Fr):e},Hn.minBy=function(t,n){return t&&t.length?mr(t,po(n,2),Fr):e},Hn.stubArray=Ec,Hn.stubFalse=Sc,Hn.stubObject=function(){return{}},Hn.stubString=function(){return""},Hn.stubTrue=function(){return!0},Hn.multiply=Cc,Hn.nth=function(t,n){return t&&t.length?Wr(t,wa(n)):e},Hn.noConflict=function(){return pt._===this&&(pt._=He),this},Hn.noop=gc,Hn.now=Ts,Hn.pad=function(e,t,n){e=Ra(e);var r=(t=wa(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ki(gt(i),n)+e+Ki(dt(i),n)},Hn.padEnd=function(e,t,n){e=Ra(e);var r=(t=wa(t))?pn(e):0;return t&&r<t?e+Ki(t-r,n):e},Hn.padStart=function(e,t,n){e=Ra(e);var r=(t=wa(t))?pn(e):0;return t&&r<t?Ki(t-r,n)+e:e},Hn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Sn(Ra(e).replace(oe,""),t||0)},Hn.random=function(t,n,r){if(r&&"boolean"!=typeof r&&Ro(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=ba(t),n===e?(n=t,t=0):n=ba(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=On();return wn(t+o*(n-t+lt("1e-"+((o+"").length-1))),n)}return Jr(t,n)},Hn.reduce=function(e,t,n){var r=Js(e)?Ut:Yt,i=arguments.length<3;return r(e,po(t,4),n,i,pr)},Hn.reduceRight=function(e,t,n){var r=Js(e)?jt:Yt,i=arguments.length<3;return r(e,po(t,4),n,i,gr)},Hn.repeat=function(t,n,r){return n=(r?Ro(t,n,r):n===e)?1:wa(n),Xr(Ra(t),n)},Hn.replace=function(){var e=arguments,t=Ra(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Hn.result=function(t,n,r){var i=-1,o=(n=Ei(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[$o(n[i])];s===e&&(i=o,s=r),t=ia(s)?s.call(t):s}return t},Hn.round=Pc,Hn.runInContext=t,Hn.sample=function(e){return(Js(e)?Zn:ei)(e)},Hn.size=function(e){if(null==e)return 0;if(Zs(e))return pa(e)?pn(e):e.length;var t=bo(e);return t==O||t==P?e.size:zr(e).length},Hn.snakeCase=ec,Hn.some=function(t,n,r){var i=Js(t)?Dt:ai;return r&&Ro(t,n,r)&&(n=e),i(t,po(n,3))},Hn.sortedIndex=function(e,t){return ci(e,t)},Hn.sortedIndexBy=function(e,t,n){return ui(e,t,po(n,2))},Hn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ci(e,t);if(r<n&&Ks(e[r],t))return r}return-1},Hn.sortedLastIndex=function(e,t){return ci(e,t,!0)},Hn.sortedLastIndexBy=function(e,t,n){return ui(e,t,po(n,2),!0)},Hn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ci(e,t,!0)-1;if(Ks(e[n],t))return n}return-1},Hn.startCase=tc,Hn.startsWith=function(e,t,n){return e=Ra(e),n=null==n?0:ur(wa(n),0,e.length),t=hi(t),e.slice(n,n+t.length)==t},Hn.subtract=kc,Hn.sum=function(e){return e&&e.length?Qt(e,lc):0},Hn.sumBy=function(e,t){return e&&e.length?Qt(e,po(t,2)):0},Hn.template=function(t,n,r){var i=Hn.templateSettings;r&&Ro(t,n,r)&&(n=e),t=Ra(t),n=Ca({},n,i,to);var o,s,a=Ca({},n.imports,i.imports,to),c=Da(a),u=en(a,c),l=0,f=n.interpolate||we,h="__p += '",d=Pe((n.escape||we).source+"|"+f.source+"|"+(f===Z?de:we).source+"|"+(n.evaluate||we).source+"|$","g"),p="//# sourceURL="+(je.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";t.replace(d,(function(e,n,r,i,a,c){return r||(r=i),h+=t.slice(l,c).replace(Ee,an),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),h+="';\n";var g=je.call(n,"variable")&&n.variable;if(g){if(fe.test(g))throw new Re("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace($,""):h).replace(V,"$1").replace(W,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=oc((function(){return Ie(c,p+"return "+h).apply(e,u)}));if(y.source=h,ra(y))throw y;return y},Hn.times=function(e,t){if((e=wa(e))<1||e>f)return[];var n=d,r=wn(e,d);t=po(t),e-=d;for(var i=Jt(r,t);++n<e;)t(n);return i},Hn.toFinite=ba,Hn.toInteger=wa,Hn.toLength=Ea,Hn.toLower=function(e){return Ra(e).toLowerCase()},Hn.toNumber=Sa,Hn.toSafeInteger=function(e){return e?ur(wa(e),-f,f):0===e?e:0},Hn.toString=Ra,Hn.toUpper=function(e){return Ra(e).toUpperCase()},Hn.trim=function(t,n,r){if((t=Ra(t))&&(r||n===e))return Xt(t);if(!t||!(n=hi(n)))return t;var i=gn(t),o=gn(n);return Oi(i,nn(i,o),rn(i,o)+1).join("")},Hn.trimEnd=function(t,n,r){if((t=Ra(t))&&(r||n===e))return t.slice(0,yn(t)+1);if(!t||!(n=hi(n)))return t;var i=gn(t);return Oi(i,0,rn(i,gn(n))+1).join("")},Hn.trimStart=function(t,n,r){if((t=Ra(t))&&(r||n===e))return t.replace(oe,"");if(!t||!(n=hi(n)))return t;var i=gn(t);return Oi(i,nn(i,gn(n))).join("")},Hn.truncate=function(t,n){var r=30,i="...";if(aa(n)){var o="separator"in n?n.separator:o;r="length"in n?wa(n.length):r,i="omission"in n?hi(n.omission):i}var s=(t=Ra(t)).length;if(cn(t)){var a=gn(t);s=a.length}if(r>=s)return t;var c=r-pn(i);if(c<1)return i;var u=a?Oi(a,0,c).join(""):t.slice(0,c);if(o===e)return u+i;if(a&&(c+=u.length-c),ha(o)){if(t.slice(c).search(o)){var l,f=u;for(o.global||(o=Pe(o.source,Ra(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;u=u.slice(0,h===e?c:h)}}else if(t.indexOf(hi(o),c)!=c){var d=u.lastIndexOf(o);d>-1&&(u=u.slice(0,d))}return u+i},Hn.unescape=function(e){return(e=Ra(e))&&Y.test(e)?e.replace(K,mn):e},Hn.uniqueId=function(e){var t=++De;return Ra(e)+t},Hn.upperCase=nc,Hn.upperFirst=rc,Hn.each=Rs,Hn.eachRight=Is,Hn.first=Zo,pc(Hn,function(){var e={};return Sr(Hn,(function(t,n){je.call(Hn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Hn.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Hn[e].placeholder=Hn})),Ct(["drop","take"],(function(t,n){Wn.prototype[t]=function(r){r=r===e?1:bn(wa(r),0);var i=this.__filtered__&&!n?new Wn(this):this.clone();return i.__filtered__?i.__takeCount__=wn(r,i.__takeCount__):i.__views__.push({size:wn(r,d),type:t+(i.__dir__<0?"Right":"")}),i},Wn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:po(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ct(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(lc)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Zr((function(e,t){return"function"==typeof e?new Wn(this):this.map((function(n){return Tr(n,e,t)}))})),Wn.prototype.reject=function(e){return this.filter(Hs(po(e)))},Wn.prototype.slice=function(t,n){t=wa(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Wn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=wa(n))<0?r.dropRight(-n):r.take(n-t)),r)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(d)},Sr(Wn.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Hn[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Hn.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,c=n instanceof Wn,u=a[0],l=c||Js(n),f=function(e){var t=o.apply(Hn,Lt([e],a));return i&&h?t[0]:t};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=c&&!d;if(!s&&l){n=g?n:new Wn(this);var y=t.apply(n,a);return y.__actions__.push({func:bs,args:[f],thisArg:e}),new Vn(y,h)}return p&&g?t.apply(this,a):(y=this.thru(f),p?i?y.value()[0]:y.value():y)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ae[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Hn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Js(i)?i:[],e)}return this[n]((function(n){return t.apply(Js(n)?n:[],e)}))}})),Sr(Wn.prototype,(function(e,t){var n=Hn[t];if(n){var r=n.name+"";je.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:t,func:n})}})),Tn[qi(e,2).name]=[{name:"wrapper",func:e}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Ai(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ai(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ai(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Js(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=wn(t,e+s);break;case"takeRight":e=bn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,c=a-s,u=r?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=wn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return mi(e,this.__actions__);var p=[];e:for(;c--&&h<d;){for(var g=-1,y=e[u+=t];++g<f;){var m=l[g],v=m.iteratee,_=m.type,b=v(y);if(2==_)y=b;else if(!b){if(1==_)continue e;break e}}p[h++]=y}return p},Hn.prototype.at=ws,Hn.prototype.chain=function(){return _s(this)},Hn.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},Hn.prototype.next=function(){this.__values__===e&&(this.__values__=_a(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},Hn.prototype.plant=function(t){for(var n,r=this;r instanceof $n;){var i=Wo(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n},Hn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Wn){var n=t;return this.__actions__.length&&(n=new Wn(this)),(n=n.reverse()).__actions__.push({func:bs,args:[as],thisArg:e}),new Vn(n,this.__chain__)}return this.thru(as)},Hn.prototype.toJSON=Hn.prototype.valueOf=Hn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Hn.prototype.first=Hn.prototype.head,tt&&(Hn.prototype[tt]=function(){return this}),Hn}();yt?((yt.exports=_n)._=_n,gt._=_n):pt._=_n}.call(t);var Bl=Object.defineProperty,Fl=Object.defineProperties,Hl=Object.getOwnPropertyDescriptors,ql=Object.getOwnPropertySymbols,$l=Object.prototype.hasOwnProperty,Vl=Object.prototype.propertyIsEnumerable,Wl=(e,t,n)=>t in e?Bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kl=(e,t)=>{for(var n in t||(t={}))$l.call(t,n)&&Wl(e,n,t[n]);if(ql)for(var n of ql(t))Vl.call(t,n)&&Wl(e,n,t[n]);return e},Gl=(e,t)=>Fl(e,Hl(t));function Yl(e,t,n){var r;const i=function(e){const[t,n]=e.split(":");return{namespace:t,reference:n}}(e);return(null==(r=t.rpcMap)?void 0:r[i.reference])||`https://rpc.walletconnect.com/v1/?chainId=${i.namespace}:${i.reference}&projectId=${n}`}function Ql(e){return e.includes(":")?e.split(":")[1]:e}function Jl(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Xl(e){var t,n,r,i;const o={};if(!Bo(e))return o;for(const[s,a]of Object.entries(e)){const e=To(s)?[s]:a.chains,c=a.methods||[],u=a.events||[],l=a.rpcMap||{},f=Mo(s);o[f]=Gl(Kl(Kl({},o[f]),a),{chains:bo(e,null==(t=o[f])?void 0:t.chains),methods:bo(c,null==(n=o[f])?void 0:n.methods),events:bo(u,null==(r=o[f])?void 0:r.events),rpcMap:Kl(Kl({},l),null==(i=o[f])?void 0:i.rpcMap)})}return o}function Zl(e){return e.includes(":")?e.split(":")[2]:e}function ef(e){const t={};for(const[n,r]of Object.entries(e)){const e=r.methods||[],i=r.events||[],o=r.accounts||[],s=To(n)?[n]:r.chains?r.chains:Jl(r.accounts);t[n]={chains:s,methods:e,events:i,accounts:o}}return t}function tf(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):e.includes(":")?Number(e.split(":")[1]):Number(e)}const nf={},rf=e=>nf[e],of=(e,t)=>{nf[e]=t};var sf={exports:{}};!function(e,n){var r,i=typeof self<"u"?self:t,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();r=o,function(e){var t="URLSearchParams"in r,n="Symbol"in r&&"iterator"in Symbol,i="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&function(e){return e&&DataView.prototype.isPrototypeOf(e)}(e)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[u(e)]},h.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},h.prototype.set=function(e,t){this.map[u(e)]=l(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(e,t){var n=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&null!=e._bodyInit&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new h(t.headers)),this.method=function(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e){var t=new h;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},m.call(_.prototype),m.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function O(t,n){return new Promise((function(r,o){var s=new _(t,n);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:w(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;r(new E(t,e))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(typeof s._bodyInit>"u"?null:s._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=h,r.Request=_,r.Response=E),e.Headers=h,e.Request=_,e.Response=E,e.fetch=O,Object.defineProperty(e,"__esModule",{value:!0})}({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var s=o;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,e.exports=n}(sf,sf.exports);var af=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(sf.exports);const cf={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class uf{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new i.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Us(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=q(e),n=await(await af(this.url,Object.assign(Object.assign({},cf),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Us(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=q({id:1,jsonrpc:"2.0",method:"test",params:[]});await af(e,Object.assign(Object.assign({},cf),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?H(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=ks(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ds(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}class lf{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=rf("events"),this.client=rf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Ul,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Ql(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new $s(new uf(n,rf("disableProviderPing")))}}class ff{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=rf("events"),this.client=rf("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Ul,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Yl(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new $s(new uf(n,rf("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=parseInt(Ql(t));e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let r=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const i=parseInt(r,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:r}]},chainId:null==(n=this.namespace.chains)?void 0:n[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class hf{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=rf("events"),this.client=rf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Ul,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Ql(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new $s(new uf(n,rf("disableProviderPing")))}}class df{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=rf("events"),this.client=rf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Ul,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Ql(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new $s(new uf(n,rf("disableProviderPing")))}}class pf{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=rf("events"),this.client=rf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Ul,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const n=this.getCardanoRPCUrl(t),r=Ql(t);e[r]=this.createHttpProvider(r,n)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new $s(new uf(n,rf("disableProviderPing")))}}class gf{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=rf("events"),this.client=rf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Ul,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Ql(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new $s(new uf(n,rf("disableProviderPing")))}}class yf{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=rf("events"),this.client=rf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Ul,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Ql(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new $s(new uf(n,rf("disableProviderPing")))}}class mf{constructor(e){this.name="near",this.namespace=e.namespace,this.events=rf("events"),this.client=rf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Yl(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Ul,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Yl(e,this.namespace);return typeof n>"u"?void 0:new $s(new uf(n,rf("disableProviderPing")))}}var vf=Object.defineProperty,_f=Object.defineProperties,bf=Object.getOwnPropertyDescriptors,wf=Object.getOwnPropertySymbols,Ef=Object.prototype.hasOwnProperty,Sf=Object.prototype.propertyIsEnumerable,Of=(e,t,n)=>t in e?vf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rf=(e,t)=>{for(var n in t||(t={}))Ef.call(t,n)&&Of(e,n,t[n]);if(wf)for(var n of wf(t))Sf.call(t,n)&&Of(e,n,t[n]);return e},If=(e,t)=>_f(e,bf(t));class xf{constructor(e){this.events=new i.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Ke.pino(Ke.getDefaultLoggerOptions({level:e?.logger||Ml})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new xf(e);return await t.initialize(),t}async request(e,t){const[n,r]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:Rf({},e),chainId:`${n}:${r}`,topic:this.session.topic})}sendAsync(e,t,n){const r=(new Date).getTime();this.request(e,n).then((e=>t(null,Ps(r,e)))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:Do("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:r}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await r().then((e=>{this.session=e,this.namespaces||(this.namespaces=ef(e.namespaces),this.persist("namespaces",this.namespaces))})).catch((e=>{if(e.message!==dl)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(zo(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await Tl.init({logger:this.providerOpts.logger||Ml,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>Mo(e))))];of("client",this.client),of("events",this.events),of("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=function(e,t){const n=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!n.length)return[];const r=[];return n.forEach((e=>{const n=t.namespaces[e].accounts;r.push(...n)})),r}(e,this.session),n=Jl(t),r=function(e={},t={}){const n=Xl(e),r=Xl(t);return zl.exports.merge(n,r)}(this.namespaces,this.optionalNamespaces),i=If(Rf({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new ff({namespace:i});break;case"solana":this.rpcProviders[e]=new hf({namespace:i});break;case"cosmos":this.rpcProviders[e]=new df({namespace:i});break;case"polkadot":this.rpcProviders[e]=new lf({namespace:i});break;case"cip34":this.rpcProviders[e]=new pf({namespace:i});break;case"elrond":this.rpcProviders[e]=new gf({namespace:i});break;case"multiversx":this.rpcProviders[e]=new yf({namespace:i});break;case"near":this.rpcProviders[e]=new mf({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:n}=t;if("accountsChanged"===n.name){const e=n.data;e&&zo(e)&&this.events.emit("accountsChanged",e.map(Zl))}else if("chainChanged"===n.name){const e=t.chainId,n=t.event.data,r=Mo(e),i=tf(e)!==tf(n)?`${r}:${tf(n)}`:e;this.onChainChanged(i)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var n;const{namespaces:r}=t,i=null==(n=this.client)?void 0:n.session.get(e);this.session=If(Rf({},i),{namespaces:r}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",If(Rf({},Do("USER_DISCONNECTED")),{data:e.topic}))})),this.on(Ul,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:r}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=r,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map((e=>Mo(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const r=Mo(Object.keys(this.namespaces)[0]);return[r,this.rpcProviders[r].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var n;if(!this.namespaces)return;const[r,i]=this.validateChain(e);t||this.getProvider(r).setDefaultChain(i),(null!=(n=this.namespaces[r])?n:this.namespaces[`${r}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Ll}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Ll}/${e}`)}}const Cf=xf;e.UniversalProvider=Cf,e.default=xf,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Ti.exports);const Mi=["eth_sendTransaction","personal_sign"],Li=["chainChanged","accountsChanged"];function Ui(e){return Number(e[0].split(":")[1])}function ji(e){return`0x${e.toString(16)}`}class Di{constructor(){this.events=new an.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static init(e){return c(this,void 0,void 0,(function*(){const t=new Di;return yield t.initialize(e),t}))}request(e){return c(this,void 0,void 0,(function*(){return yield this.signer.request(e,this.formatChainId(this.chainId))}))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){return c(this,void 0,void 0,(function*(){return this.session||(yield this.connect()),yield this.request({method:"eth_requestAccounts"})}))}connect(e){return c(this,void 0,void 0,(function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=function(e){const{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:s,rpcMap:a}=e;if(!ki(t))throw new Error("Invalid chains");const c=t,u=r||Mi,l=o||Li,f={chains:c,methods:u,events:l,rpcMap:{[Ui(c)]:a[Ui(c)]}},h=null==o?void 0:o.filter((e=>!Li.includes(e))),d=null==r?void 0:r.filter((e=>!Mi.includes(e)));if(!(n||s||i||(null==h?void 0:h.length)||(null==d?void 0:d.length)))return{required:f};const p=(null==h?void 0:h.length)&&(null==d?void 0:d.length)||!n;return{required:f,optional:{chains:[...new Set(p?c.concat(n||[]):n)],methods:[...new Set(u.concat(i||[]))],events:[...new Set(l.concat(s||[]))],rpcMap:a}}}(this.rpc);try{const r=yield new Promise(((r,i)=>c(this,void 0,void 0,(function*(){yield this.signer.connect(Object.assign(Object.assign({namespaces:{[this.namespace]:t}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:null==e?void 0:e.pairingTopic,skipPairing:!1})).then((e=>{r(e)})).catch((e=>{i(new Error(e.message))}))}))));if(!r)return;this.setChainIds(this.rpc.chains);const i=function(e,t=[]){const n=[];return Object.keys(e).forEach((r=>{if(t.length&&!t.includes(r))return;const i=e[r];n.push(...i.accounts)})),n}(r.namespaces,[this.namespace]);this.setAccounts(i),this.events.emit("connect",{chainId:ji(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}}))}disconnect(){return c(this,void 0,void 0,(function*(){this.session&&(yield this.signer.disconnect()),this.reset()}))}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",ji(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Object.assign(Object.assign({},function(){const{message:e,code:t}=Pi.USER_DISCONNECTED;return{message:e,code:t}}()),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))).map((e=>this.parseChainId(e)));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",ji(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,r]=e.split(":");return{chainId:`${t}:${n}`,address:r}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t;return{chains:(null===(t=e.chains)||void 0===t?void 0:t.map((e=>this.formatChainId(e))))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map((e=>this.formatChainId(e))):void 0,methods:(null==e?void 0:e.methods)||Mi,events:(null==e?void 0:e.events)||Li,optionalMethods:(null==e?void 0:e.optionalMethods)||[],optionalEvents:(null==e?void 0:e.optionalEvents)||[],rpcMap:(null==e?void 0:e.rpcMap)||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach((e=>{n[e]=this.getRpcUrl(e,t)})),n}initialize(e){return c(this,void 0,void 0,(function*(){this.rpc=this.getRpcConfig(e),this.chainId=Ui(this.rpc.chains),this.signer=yield Ti.exports.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),yield this.loadPersistedSession()}))}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:r}=e;t&&ki(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)}))),n&&ki(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==n?void 0:n.map((e=>this.formatChainId(e))),n.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)})))}getRpcUrl(e,t){var n;return(null===(n=this.rpc.rpcMap)||void 0===n?void 0:n[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}loadPersistedSession(){return c(this,void 0,void 0,(function*(){if(!this.session)return;const e=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:null==t?void 0:t.accounts),this.setAccounts(null==t?void 0:t.accounts)}))}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const zi=n("WalletConnectEvm"),Bi=r("WalletConnectEvm");function Fi(e){zi("displayUriHandler",e),(e=>{$t("setModalUri",e),Vt(e)})(e)}const Hi=n("getProvider"),qi=[1];var $i;let Vi;e.SupportedProviders=void 0,(e.SupportedProviders||(e.SupportedProviders={})).Ethereum="Ethereum",e.SupportedProviderImplementations=void 0,($i=e.SupportedProviderImplementations||(e.SupportedProviderImplementations={})).LedgerConnect="LedgerConnect",$i.WalletConnect="WalletConnect";const Wi=e=>(Hi("getHexChainId",e),"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)?e:`0x${e.toString(16)}`),Ki=n("supportOptions");let Gi;const Yi=()=>(Ki("getSupportOptions"),Gi),Qi=n("ExtensionEvm");var Ji;function Xi(e){return("iOS"===e.os.name||"macOS"===e.os.name)&&"Safari"===e.browser.name}function Zi(e){return!!Ji[e]}function eo(e){return e.every(Zi)}function to(){if(Qi("getEthereumProvider"),"undefined"==typeof window)throw new a;let e=window.ethereum;if(Qi("provider is",e),void 0===e||void 0===e.isLedgerConnect)throw new i;const t=Yi(),n=Wi(t.chainId||0);return Wi(e.chainId)!=n&&(Qi("chainIds are different, changing to",n),e.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})),e}!function(e){e[e.EthereumMainnet=1]="EthereumMainnet",e[e.Polygon=137]="Polygon"}(Ji||(Ji={}));const no=n("support");let ro;e.checkSupport=function(t){no("checkSupport",t),(e=>{var t;Ki("setSupportOptions",e);const n=e.walletConnectVersion||1;let r,i,o=[];1===n?(i=e.chainId||1,r=[i]):(r=e.chains||qi,i=r[0],o.push(...r),(null===(t=e.optionalChains)||void 0===t?void 0:t.length)&&o.push(...e.optionalChains.filter((e=>o.indexOf(e)<0))));const s=Object.assign(Object.assign({},e),{walletConnectVersion:n,chains:r,chainId:i,optionalChains:o,projectId:e.projectId||""});if(2===n&&(!e.projectId||""===e.projectId))throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");Gi=s})(t);const n=Yi();let r;return n.providerType,e.SupportedProviders.Ethereum,r=function(t){no("checkEthereumSupport",t);const n=Zt();let r=!1;try{r=!!to()}catch(e){}const i={isLedgerConnectSupported:Xi(n),isLedgerConnectEnabled:!!r,isChainIdSupported:eo(t.chains),providerImplementation:e.SupportedProviderImplementations.LedgerConnect};return i.isLedgerConnectSupported&&i.isLedgerConnectEnabled&&i.isChainIdSupported||(i.providerImplementation=e.SupportedProviderImplementations.WalletConnect),function(e){Hi("setProviderImplementation",e),Vi=e}(i.providerImplementation),i}(n),no("checkSupportResult is",r),ro=r,r},e.enableDebugLogs=()=>{t=!0},e.getProvider=function(){return c(this,void 0,void 0,(function*(){Hi("getProvider",Vi);const t=Yi();if(t.providerType===e.SupportedProviders.Ethereum)return(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))||Vi!==e.SupportedProviderImplementations.LedgerConnect?(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||1!==t.walletConnectVersion&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))?yield function(){return c(this,void 0,void 0,(function*(){zi("getWalletConnectProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){zi("initWalletConnectProvider");const e=Yi();zi("walletConnectProviderOptions is",e);const t={projectId:e.projectId,chains:e.chains,optionalChains:e.optionalChains,methods:e.methods,optionalMethods:e.optionalMethods||[],events:e.events,optionalEvents:e.optionalEvents||[],rpcMap:e.rpcMap,relayUrl:e.relayUrl,showQrModal:!1};zi("ethereum init options are",t),zi("creating a new provider instance");try{return Di.init(t)}catch(e){throw Bi("Error while initializing ethereum provider"),e}}))}();return function(e){function t(e){e&&(e.removeListener("connect",n),e.removeListener("session_delete",r))}function n(e){zi("connectHandler",e),ht(!1)}function r(n){zi("disconnectHandler",n),e.disconnect(),t(e)}zi("assignWalletConnectProviderEvents"),e&&(t(e),e.on("connect",n),e.on("session_delete",r),zi("provider is",e))}(e),e.request=function(e){zi("patchWalletConnectProviderRequest");const t=e.request.bind(e),n=Yi();return zi("walletConnectProviderOptions is",n),function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(zi("calling patched",r,i),zi("handling display_uri once"),e.once("display_uri",Fi),new Promise(((o,a)=>c(this,void 0,void 0,(function*(){var c,u;try{(null===(c=null==e?void 0:e.session)||void 0===c?void 0:c.connected)?(zi("reusing existing session"),o(yield t({method:r,params:i}))):(u={uri:"",onClose:()=>{Bi("user rejected"),a(new s)}},tn("UseLedgerLiveModal",{isDesktop:"desktop"===Zt().type,uri:u.uri,onClose:u.onClose}),zi("creating a new session"),yield e.connect({chains:n.chains,optionalChains:n.optionalChains}),o(yield t({method:r,params:i})))}catch(e){return Bi("error",e),a(e)}}))))):(zi("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw Bi("error",t),t}}))}():yield on():to();throw new o}))},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=/sm/54154c566b62b076776489c6a47fa48755fe7f2fa1ac9a4aef0c00258c5b3c36.map