@snowmonster_defi/widget 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -39
- package/dist/{add-C1-3Nxd0.mjs → add-BPV517ty.mjs} +1 -1
- package/dist/{add-BMx827fr.js → add-BPho8Nes.js} +1 -1
- package/dist/{all-wallets-CeboYmll.mjs → all-wallets-CiIBeiWr.mjs} +1 -1
- package/dist/{all-wallets-Bw2RRXQf.js → all-wallets-vW2hc4rM.js} +1 -1
- package/dist/{app-store-C-SLhk-c.mjs → app-store-C6Z4049-.mjs} +1 -1
- package/dist/{app-store-DWCVxk5n.js → app-store-DsTJJkbc.js} +1 -1
- package/dist/{apple-C6JNxC7s.js → apple-BaIvScvo.js} +1 -1
- package/dist/{apple-C0-QMsmX.mjs → apple-BoVttKqM.mjs} +1 -1
- package/dist/{arrow-bottom-BQlfsLH7.js → arrow-bottom-B-4Ygcmm.js} +1 -1
- package/dist/{arrow-bottom-DBsoY1j4.mjs → arrow-bottom-IMykiiHq.mjs} +1 -1
- package/dist/{arrow-bottom-circle-BWbOWcMy.js → arrow-bottom-circle-u-wHHjSl.js} +1 -1
- package/dist/{arrow-bottom-circle-0d4DMC8k.mjs → arrow-bottom-circle-ww23Oo7w.mjs} +1 -1
- package/dist/{arrow-left-Buye_G_C.mjs → arrow-left-8UMbM21G.mjs} +1 -1
- package/dist/{arrow-left-CYea8lr5.js → arrow-left-D0A5ZeHX.js} +1 -1
- package/dist/{arrow-right-NcpIvTiP.mjs → arrow-right-D4msWuyB.mjs} +1 -1
- package/dist/{arrow-right-Bz07l-7m.js → arrow-right-Dof9_DCu.js} +1 -1
- package/dist/{arrow-top-CE8kNyrN.js → arrow-top-CvBYy8tE.js} +1 -1
- package/dist/{arrow-top-BHtmjrGh.mjs → arrow-top-GvPPq7Oj.mjs} +1 -1
- package/dist/{bank-54nZmUNU.js → bank-DVoUwWPa.js} +1 -1
- package/dist/{bank-foInih1V.mjs → bank-DitzyCyd.mjs} +1 -1
- package/dist/{basic-DgjjeOAX.js → basic-BZtwfI9s.js} +1 -1
- package/dist/{basic-BoWB3br8.mjs → basic-DaftXE56.mjs} +2 -2
- package/dist/{browser-b-nGXlqN.js → browser-BOjOgqqR.js} +1 -1
- package/dist/{browser-BC7vNobG.mjs → browser-DAoS0pqS.mjs} +1 -1
- package/dist/{card--XvDDn3y.mjs → card-BKTwGF3D.mjs} +1 -1
- package/dist/{card-BkMuyW1R.js → card-dnj6ci0D.js} +1 -1
- package/dist/{ccip-DKFQjR9A.mjs → ccip-C4MhpzIT.mjs} +1 -1
- package/dist/{ccip-B3WUowc8.js → ccip-D5uz0WmF.js} +1 -1
- package/dist/{checkmark-DXb72YHc.js → checkmark-X3jF2to2.js} +1 -1
- package/dist/{checkmark-BbGho5Io.mjs → checkmark-a4R9tQ59.mjs} +1 -1
- package/dist/{checkmark-bold-B1F7R5EK.mjs → checkmark-bold-B5m6nFJs.mjs} +1 -1
- package/dist/{checkmark-bold-DdBV1Lmi.js → checkmark-bold-CQsgaDa-.js} +1 -1
- package/dist/{chevron-bottom-XyYYwAR8.mjs → chevron-bottom-BxqBvchZ.mjs} +1 -1
- package/dist/{chevron-bottom-CQZ-Wq5W.js → chevron-bottom-DeedT_F1.js} +1 -1
- package/dist/{chevron-left-DuAvtNd0.mjs → chevron-left-BO7jNn6D.mjs} +1 -1
- package/dist/{chevron-left-8n-It-m1.js → chevron-left-CSnmuYaP.js} +1 -1
- package/dist/{chevron-right-W5vVm_KB.mjs → chevron-right-BDLOHLOC.mjs} +1 -1
- package/dist/{chevron-right-D59N_heq.js → chevron-right-C947RiRa.js} +1 -1
- package/dist/{chevron-top-DFkm04W3.mjs → chevron-top-DQeh2Y_5.mjs} +1 -1
- package/dist/{chevron-top-CEOzd8Ij.js → chevron-top-DcT74sQW.js} +1 -1
- package/dist/{chrome-store-BrkLwaGp.js → chrome-store-D5kzIuNb.js} +1 -1
- package/dist/{chrome-store-CP2NiEXz.mjs → chrome-store-N3_b-aes.mjs} +1 -1
- package/dist/{clock-B5JaCeFx.mjs → clock-CinkYoNf.mjs} +1 -1
- package/dist/{clock-LQXXXzZd.js → clock-Dtf4mH84.js} +1 -1
- package/dist/{close-w5A4PucI.mjs → close-D4MWwtJe.mjs} +1 -1
- package/dist/{close-CvPH2PaL.js → close-DI1RHF8v.js} +1 -1
- package/dist/{coinPlaceholder-haEbTDpA.mjs → coinPlaceholder-CsoXT7JB.mjs} +1 -1
- package/dist/{coinPlaceholder-DFh7VbZT.js → coinPlaceholder-DA1nHq9_.js} +1 -1
- package/dist/{compass-CvRkiQHa.mjs → compass-BLnQinlT.mjs} +1 -1
- package/dist/{compass-Df_6O9--.js → compass-C6vJRUYh.js} +1 -1
- package/dist/{copy-D0w04l-Q.js → copy-BrHIxCKf.js} +1 -1
- package/dist/{copy-CyrCMq2Q.mjs → copy-BuRNtKMA.mjs} +1 -1
- package/dist/{core-auWK_7Ox.mjs → core-7LtihVxb.mjs} +4 -4
- package/dist/{core-BdUBRviB.js → core-CKEBRqJG.js} +3 -3
- package/dist/{cursor-DFMotZ-L.js → cursor--U2SHjOW.js} +1 -1
- package/dist/{cursor-D5uRbW9D.mjs → cursor-B7D1R5Jx.mjs} +1 -1
- package/dist/{cursor-transparent-BanA5rDD.mjs → cursor-transparent-CLfz5eqc.mjs} +1 -1
- package/dist/{cursor-transparent-Cs4NrQu6.js → cursor-transparent-D8mgBLhV.js} +1 -1
- package/dist/{desktop-CheS5Az_.js → desktop-D15Zh6YB.js} +1 -1
- package/dist/{desktop-6Q-_rh47.mjs → desktop-LJLhtmCr.mjs} +1 -1
- package/dist/{disconnect-DltoX_gP.js → disconnect-Btu0RPvp.js} +1 -1
- package/dist/{disconnect-CRF11ye0.mjs → disconnect-DtHq3NW3.mjs} +1 -1
- package/dist/{discord-B6nj8oD_.mjs → discord-B2wex93m.mjs} +1 -1
- package/dist/{discord-CqY7Pilo.js → discord-D2XZHgYW.js} +1 -1
- package/dist/en_US-Y4ZOVFV4-D2wGVa2b.mjs +4 -0
- package/dist/{en_US-Y4ZOVFV4-Dn3zitY_.js → en_US-Y4ZOVFV4-DBqUKfQh.js} +1 -1
- package/dist/{etherscan-CLcbtjKR.mjs → etherscan-DnhJnMc1.mjs} +1 -1
- package/dist/{etherscan-DxjvKQo9.js → etherscan-DsJEkOUz.js} +1 -1
- package/dist/{exclamation-triangle-CxJuBpFB.mjs → exclamation-triangle-BU3gP5qY.mjs} +1 -1
- package/dist/{exclamation-triangle-D9vGQKFQ.js → exclamation-triangle-zwn1pVGJ.js} +1 -1
- package/dist/{extension-t0E2b7ef.mjs → extension-6YBZn5l5.mjs} +1 -1
- package/dist/{extension-CSqCxcZG.js → extension-tCaHxyD9.js} +1 -1
- package/dist/{external-link-B-Lcyi6R.mjs → external-link-DBT7XJ7w.mjs} +1 -1
- package/dist/{external-link-BoArXGTq.js → external-link-DvaiPeiZ.js} +1 -1
- package/dist/{facebook-DOkj8R5F.js → facebook-D_R2Ch8w.js} +1 -1
- package/dist/{facebook-Cnfem7th.mjs → facebook-Di4nk83F.mjs} +1 -1
- package/dist/{farcaster-BlN1w-oR.mjs → farcaster-DK7J9QZQ.mjs} +1 -1
- package/dist/{farcaster-DKhgfKln.js → farcaster-_bmxN7eE.js} +1 -1
- package/dist/{filters-w4oLgYuJ.js → filters-DMA0z9Xf.js} +1 -1
- package/dist/{filters-DY5tpPJB.mjs → filters-DYn3A8Qc.mjs} +1 -1
- package/dist/{github-Bq8YXj-l.js → github-BAqh5GDr.js} +1 -1
- package/dist/{github-BnOjmw_1.mjs → github-DTQwjsGN.mjs} +1 -1
- package/dist/{google-ySq_VIsy.mjs → google-Bxyl2WXy.mjs} +1 -1
- package/dist/{google-BjbAYNIf.js → google-Di6zv-2m.js} +1 -1
- package/dist/{help-circle-D_pee-dG.mjs → help-circle-BwuxonVp.mjs} +1 -1
- package/dist/{help-circle-MVmAyaVF.js → help-circle-CCnRbe9g.js} +1 -1
- package/dist/{id-ByfWOnEX.js → id-5NWvRbPW.js} +1 -1
- package/dist/{id-CuusF9Qd.mjs → id-CEIaI4H1.mjs} +1 -1
- package/dist/{image-BlN-YE3X.js → image-BO81Uk1U.js} +1 -1
- package/dist/{image-Cs26jwi7.mjs → image-ODLhaGq9.mjs} +1 -1
- package/dist/{index-BUG5Ve0i.mjs → index-C06gpTYX.mjs} +78 -78
- package/dist/{index-STIsWesT.js → index-CL3HAprc.js} +2 -2
- package/dist/{index-BKj9Y5tv.js → index-VHB4k7R7.js} +52 -52
- package/dist/{index-C8nreL9m.mjs → index-zFOcZ90F.mjs} +2785 -2791
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-e80IGd_J.mjs → index.es-0IhW12Mz.mjs} +3 -3
- package/dist/{index.es-APae9KBk.js → index.es-5uEkuPzw.js} +3 -3
- package/dist/index.es.js +1 -1
- package/dist/{info-Cb2Tnwp9.mjs → info-DOWjMq4g.mjs} +1 -1
- package/dist/{info-D7vY5t3I.js → info-Da_tw9Vb.js} +1 -1
- package/dist/{info-circle-CIVy5nVm.js → info-circle-BVI3pzZy.js} +1 -1
- package/dist/{info-circle-sI2i5HOv.mjs → info-circle-G3naLW3K.mjs} +1 -1
- package/dist/{lightbulb-5NUvCVy3.js → lightbulb-B-lGHBBk.js} +1 -1
- package/dist/{lightbulb-BYmcwWUA.mjs → lightbulb-BThmcys-.mjs} +1 -1
- package/dist/{mail-CT9BLct_.mjs → mail-BMjkQGoD.mjs} +1 -1
- package/dist/{mail-DAYPcxbx.js → mail-BXlcglnW.js} +1 -1
- package/dist/{metamask-sdk-5m3nvPtB.js → metamask-sdk-CKwOy3_1.js} +1 -1
- package/dist/{metamask-sdk-CPh1Wi1b.mjs → metamask-sdk-Y-ZzvFgh.mjs} +1 -1
- package/dist/{mobile-DNsm674z.js → mobile-BnBBc98F.js} +1 -1
- package/dist/{mobile-DRfo1ZAq.mjs → mobile-D7E8ud2a.mjs} +1 -1
- package/dist/{more-DFKbhNg4.js → more-CdcjjGWT.js} +1 -1
- package/dist/{more-DvtnI5Dv.mjs → more-st65oVJ-.mjs} +1 -1
- package/dist/{network-placeholder-BPGY0Pea.js → network-placeholder-BGP5yudU.js} +1 -1
- package/dist/{network-placeholder-DOmySIjI.mjs → network-placeholder-CIh7bVKs.mjs} +1 -1
- package/dist/{nftPlaceholder-CRB7uOjv.mjs → nftPlaceholder-B0i5-z9I.mjs} +1 -1
- package/dist/{nftPlaceholder-Dp6Tl1yi.js → nftPlaceholder-CHTKmYr7.js} +1 -1
- package/dist/{off-BVEy2I2N.js → off-CO2d06NG.js} +1 -1
- package/dist/{off-LjovEQOy.mjs → off-D3SBQ1uB.mjs} +1 -1
- package/dist/{play-store-DlHvVfW-.js → play-store-DqVbl3Da.js} +1 -1
- package/dist/{play-store-BwddU0Wq.mjs → play-store-md1rTEdi.mjs} +1 -1
- package/dist/{plus-ZMKluBd6.js → plus-9CuDNjjZ.js} +1 -1
- package/dist/{plus-C-X64_gj.mjs → plus-DKO6pqvO.mjs} +1 -1
- package/dist/{qr-code-bLEKEk0B.mjs → qr-code-CoBdSlMj.mjs} +1 -1
- package/dist/{qr-code-Dhu5TPha.js → qr-code-DnrpOmnA.js} +1 -1
- package/dist/{recycle-horizontal-9JHHDd4h.js → recycle-horizontal-FSLMVZm8.js} +1 -1
- package/dist/{recycle-horizontal-CS_0PZGV.mjs → recycle-horizontal-QVM9S5AC.mjs} +1 -1
- package/dist/{refresh-C_qXNL0S.mjs → refresh-BLIVGKaq.mjs} +1 -1
- package/dist/{refresh-DkMlARk7.js → refresh-COfPS7vr.js} +1 -1
- package/dist/{reown-logo-UwMrTrcX.js → reown-logo-CZAsRrs0.js} +1 -1
- package/dist/{reown-logo-CBPzCyQW.mjs → reown-logo-DUChpH7H.mjs} +1 -1
- package/dist/{search-CQuKFVAx.mjs → search-CLiLGFA4.mjs} +1 -1
- package/dist/{search-B4itLiVW.js → search-DLgB_GbD.js} +1 -1
- package/dist/{secp256k1-BB5DYugF.mjs → secp256k1-BJsOrooe.mjs} +1 -1
- package/dist/{secp256k1-BiRGPPqo.js → secp256k1-CNUh3htr.js} +1 -1
- package/dist/{secp256k1-Cf9t2cTM.mjs → secp256k1-Ccv5OiSV.mjs} +1 -1
- package/dist/{secp256k1-CI29X52U.js → secp256k1-bnuRwvDw.js} +1 -1
- package/dist/{send-qTi-ybzM.mjs → send-C1u-6SHt.mjs} +1 -1
- package/dist/{send-porC6mPB.js → send-DGshrpDA.js} +1 -1
- package/dist/{swapHorizontal-HantsmRd.js → swapHorizontal-CFbfyLgn.js} +1 -1
- package/dist/{swapHorizontal-C3MNcVMo.mjs → swapHorizontal-Cwjkdsr_.mjs} +1 -1
- package/dist/{swapHorizontalBold-XlXD6Scp.js → swapHorizontalBold-09z63E9T.js} +1 -1
- package/dist/{swapHorizontalBold-C_GQta-j.mjs → swapHorizontalBold-B28dKslj.mjs} +1 -1
- package/dist/{swapHorizontalMedium-ChYk0TiL.js → swapHorizontalMedium-DJYNXSPW.js} +1 -1
- package/dist/{swapHorizontalMedium-Bo6Sszm7.mjs → swapHorizontalMedium-trPBtiFC.mjs} +1 -1
- package/dist/{swapHorizontalRoundedBold-B5EvZSwz.mjs → swapHorizontalRoundedBold-CMZxOUua.mjs} +1 -1
- package/dist/{swapHorizontalRoundedBold-Dx_Co5wk.js → swapHorizontalRoundedBold-Ptc8r0vg.js} +1 -1
- package/dist/{swapVertical-cHQwpGr0.mjs → swapVertical-DY90vFiN.mjs} +1 -1
- package/dist/{swapVertical-fmzZLSPI.js → swapVertical-ny4gtovd.js} +1 -1
- package/dist/{telegram-Dv7wEgKb.js → telegram-C2ZKHNWF.js} +1 -1
- package/dist/{telegram-BdrptLN3.mjs → telegram-l0Kq7QNJ.mjs} +1 -1
- package/dist/{three-dots-DEs9ZhDC.mjs → three-dots-BfIVjHqD.mjs} +1 -1
- package/dist/{three-dots-CPXRPIKy.js → three-dots-D7fNl4Y3.js} +1 -1
- package/dist/{twitch-Ck5pSyDI.js → twitch-Cp3J00vk.js} +1 -1
- package/dist/{twitch-IQhZ8m1X.mjs → twitch-mse8Ps_4.mjs} +1 -1
- package/dist/{twitterIcon-DsS9CDA5.mjs → twitterIcon-BJ_sFyVT.mjs} +1 -1
- package/dist/{twitterIcon-DO8XDAwC.js → twitterIcon-H4h5Aywp.js} +1 -1
- package/dist/types/index.d.ts +7 -0
- package/dist/utils/constants.d.ts +15 -2
- package/dist/{verify-CgTgRejE.js → verify-CGPWx5np.js} +1 -1
- package/dist/{verify-filled-BhxgjhKC.js → verify-filled-D9Glq4lu.js} +1 -1
- package/dist/{verify-filled-QPe9Hi2W.mjs → verify-filled-DUK_OCSP.mjs} +1 -1
- package/dist/{verify-DOD4hBvs.mjs → verify-s1BE8BKh.mjs} +1 -1
- package/dist/{w3m-modal-DLEWxfrc.js → w3m-modal-B5jwhJmy.js} +1 -1
- package/dist/{w3m-modal-C3JE1VNb.mjs → w3m-modal-C6jLvRzV.mjs} +2 -2
- package/dist/{wallet-ByF6bf_R.mjs → wallet-Bzh0erOH.mjs} +1 -1
- package/dist/{wallet-DU_BeJ1K.js → wallet-g7RENq36.js} +1 -1
- package/dist/{wallet-placeholder-C3VkDDkp.js → wallet-placeholder-BcUgE4NN.js} +1 -1
- package/dist/{wallet-placeholder-DBpXjyqE.mjs → wallet-placeholder-CEzpeXcS.mjs} +1 -1
- package/dist/{walletconnect-DC4CEinm.js → walletconnect-BKjSlNIP.js} +1 -1
- package/dist/{walletconnect-B2bmSYc7.mjs → walletconnect-CK6Oi70p.mjs} +1 -1
- package/dist/{warning-circle-CYTT9cYz.mjs → warning-circle-A8bchW2N.mjs} +1 -1
- package/dist/{warning-circle-BBKO7OkV.js → warning-circle-CkEcV2BW.js} +1 -1
- package/dist/{x-DG2aE2ub.mjs → x-D9Vj3f9W.mjs} +1 -1
- package/dist/{x-PLo7_AhG.js → x-DZ3xIhAs.js} +1 -1
- package/package.json +9 -4
- package/dist/en_US-Y4ZOVFV4-hyEPVcDM.mjs +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Ob=Object.defineProperty;var Sd=e=>{throw TypeError(e)};var Tb=(e,t,n)=>t in e?Ob(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Kt=(e,t,n)=>Tb(e,typeof t!="symbol"?t+"":t,n),Wa=(e,t,n)=>t.has(e)||Sd("Cannot "+n);var k=(e,t,n)=>(Wa(e,t,"read from private field"),n?n.call(e):t.get(e)),Z=(e,t,n)=>t.has(e)?Sd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),z=(e,t,n,r)=>(Wa(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Y=(e,t,n)=>(Wa(e,t,"access private method"),n);var hi=(e,t,n,r)=>({set _(o){z(e,t,o,n)},get _(){return k(e,t,r)}});const p=require("react"),Rb=require("react-dom");function Nb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const J=Nb(p);var kh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ih(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fb(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var _c={exports:{}},Yo={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Pd;function
|
|
9
|
+
*/var Pd;function Mb(){if(Pd)return Yo;Pd=1;var e=p,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,c,l){var u,f={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(u in c)r.call(c,u)&&!s.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:t,type:a,key:d,ref:h,props:f,_owner:o.current}}return Yo.Fragment=n,Yo.jsx=i,Yo.jsxs=i,Yo}var Xo={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,43 +14,43 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Od;function
|
|
18
|
-
`+ae+B}}var Oe=!1,Se;{var
|
|
19
|
-
`),
|
|
20
|
-
`),Pe=
|
|
21
|
-
`+
|
|
17
|
+
*/var Od;function Db(){return Od||(Od=1,process.env.NODE_ENV!=="production"&&function(){var e=p,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g=Symbol.iterator,m="@@iterator";function b(B){if(B===null||typeof B!="object")return null;var $=g&&B[g]||B[m];return typeof $=="function"?$:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(B){{for(var $=arguments.length,V=new Array($>1?$-1:0),se=1;se<$;se++)V[se-1]=arguments[se];v("error",B,V)}}function v(B,$,V){{var se=y.ReactDebugCurrentFrame,ye=se.getStackAddendum();ye!==""&&($+="%s",V=V.concat([ye]));var ke=V.map(function(me){return String(me)});ke.unshift("Warning: "+$),Function.prototype.apply.call(console[B],console,ke)}}var w=!1,x=!1,E=!1,A=!1,I=!1,S;S=Symbol.for("react.module.reference");function T(B){return!!(typeof B=="string"||typeof B=="function"||B===r||B===s||I||B===o||B===l||B===u||A||B===h||w||x||E||typeof B=="object"&&B!==null&&(B.$$typeof===d||B.$$typeof===f||B.$$typeof===i||B.$$typeof===a||B.$$typeof===c||B.$$typeof===S||B.getModuleId!==void 0))}function R(B,$,V){var se=B.displayName;if(se)return se;var ye=$.displayName||$.name||"";return ye!==""?V+"("+ye+")":V}function M(B){return B.displayName||"Context"}function N(B){if(B==null)return null;if(typeof B.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof B=="function")return B.displayName||B.name||null;if(typeof B=="string")return B;switch(B){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof B=="object")switch(B.$$typeof){case a:var $=B;return M($)+".Consumer";case i:var V=B;return M(V._context)+".Provider";case c:return R(B,B.render,"ForwardRef");case f:var se=B.displayName||null;return se!==null?se:N(B.type)||"Memo";case d:{var ye=B,ke=ye._payload,me=ye._init;try{return N(me(ke))}catch{return null}}}return null}var q=Object.assign,P=0,D,_,F,U,W,ne,ce;function xe(){}xe.__reactDisabledLog=!0;function H(){{if(P===0){D=console.log,_=console.info,F=console.warn,U=console.error,W=console.group,ne=console.groupCollapsed,ce=console.groupEnd;var B={configurable:!0,enumerable:!0,value:xe,writable:!0};Object.defineProperties(console,{info:B,log:B,warn:B,error:B,group:B,groupCollapsed:B,groupEnd:B})}P++}}function Q(){{if(P--,P===0){var B={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},B,{value:D}),info:q({},B,{value:_}),warn:q({},B,{value:F}),error:q({},B,{value:U}),group:q({},B,{value:W}),groupCollapsed:q({},B,{value:ne}),groupEnd:q({},B,{value:ce})})}P<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=y.ReactCurrentDispatcher,ae;function Ie(B,$,V){{if(ae===void 0)try{throw Error()}catch(ye){var se=ye.stack.trim().match(/\n( *(at )?)/);ae=se&&se[1]||""}return`
|
|
18
|
+
`+ae+B}}var Oe=!1,Se;{var Ft=typeof WeakMap=="function"?WeakMap:Map;Se=new Ft}function rt(B,$){if(!B||Oe)return"";{var V=Se.get(B);if(V!==void 0)return V}var se;Oe=!0;var ye=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ke;ke=oe.current,oe.current=null,H();try{if($){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(it){se=it}Reflect.construct(B,[],me)}else{try{me.call()}catch(it){se=it}B.call(me.prototype)}}else{try{throw Error()}catch(it){se=it}B()}}catch(it){if(it&&se&&typeof it.stack=="string"){for(var de=it.stack.split(`
|
|
19
|
+
`),Ve=se.stack.split(`
|
|
20
|
+
`),Pe=de.length-1,Te=Ve.length-1;Pe>=1&&Te>=0&&de[Pe]!==Ve[Te];)Te--;for(;Pe>=1&&Te>=0;Pe--,Te--)if(de[Pe]!==Ve[Te]){if(Pe!==1||Te!==1)do if(Pe--,Te--,Te<0||de[Pe]!==Ve[Te]){var It=`
|
|
21
|
+
`+de[Pe].replace(" at new "," at ");return B.displayName&&It.includes("<anonymous>")&&(It=It.replace("<anonymous>",B.displayName)),typeof B=="function"&&Se.set(B,It),It}while(Pe>=1&&Te>=0);break}}}finally{Oe=!1,oe.current=ke,Q(),Error.prepareStackTrace=ye}var Hr=B?B.displayName||B.name:"",ar=Hr?Ie(Hr):"";return typeof B=="function"&&Se.set(B,ar),ar}function ot(B,$,V){return rt(B,!1)}function At(B){var $=B.prototype;return!!($&&$.isReactComponent)}function G(B,$,V){if(B==null)return"";if(typeof B=="function")return rt(B,At(B));if(typeof B=="string")return Ie(B);switch(B){case l:return Ie("Suspense");case u:return Ie("SuspenseList")}if(typeof B=="object")switch(B.$$typeof){case c:return ot(B.render);case f:return G(B.type,$,V);case d:{var se=B,ye=se._payload,ke=se._init;try{return G(ke(ye),$,V)}catch{}}}return""}var pe=Object.prototype.hasOwnProperty,Et={},st=y.ReactDebugCurrentFrame;function tr(B){if(B){var $=B._owner,V=G(B.type,B._source,$?$.type:null);st.setExtraStackFrame(V)}else st.setExtraStackFrame(null)}function nr(B,$,V,se,ye){{var ke=Function.call.bind(pe);for(var me in B)if(ke(B,me)){var de=void 0;try{if(typeof B[me]!="function"){var Ve=Error((se||"React class")+": "+V+" type `"+me+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof B[me]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ve.name="Invariant Violation",Ve}de=B[me]($,me,se,V,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Pe){de=Pe}de&&!(de instanceof Error)&&(tr(ye),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",se||"React class",V,me,typeof de),tr(null)),de instanceof Error&&!(de.message in Et)&&(Et[de.message]=!0,tr(ye),C("Failed %s type: %s",V,de.message),tr(null))}}}var Ua=Array.isArray;function rr(B){return Ua(B)}function or(B){{var $=typeof Symbol=="function"&&Symbol.toStringTag,V=$&&B[Symbol.toStringTag]||B.constructor.name||"Object";return V}}function sr(B){try{return fi(B),!1}catch{return!0}}function fi(B){return""+B}function Ko(B){if(sr(B))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",or(B)),fi(B)}var Jo=y.ReactCurrentOwner,mt={key:!0,ref:!0,__self:!0,__source:!0},dn,ir;function ue(B){if(pe.call(B,"ref")){var $=Object.getOwnPropertyDescriptor(B,"ref").get;if($&&$.isReactWarning)return!1}return B.ref!==void 0}function ge(B){if(pe.call(B,"key")){var $=Object.getOwnPropertyDescriptor(B,"key").get;if($&&$.isReactWarning)return!1}return B.key!==void 0}function ie(B,$){typeof B.ref=="string"&&Jo.current}function Ce(B,$){{var V=function(){dn||(dn=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$))};V.isReactWarning=!0,Object.defineProperty(B,"key",{get:V,configurable:!0})}}function Mt(B,$){{var V=function(){ir||(ir=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$))};V.isReactWarning=!0,Object.defineProperty(B,"ref",{get:V,configurable:!0})}}var kt=function(B,$,V,se,ye,ke,me){var de={$$typeof:t,type:B,key:$,ref:V,props:me,_owner:ke};return de._store={},Object.defineProperty(de._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(de,"_self",{configurable:!1,enumerable:!1,writable:!1,value:se}),Object.defineProperty(de,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ye}),Object.freeze&&(Object.freeze(de.props),Object.freeze(de)),de};function be(B,$,V,se,ye){{var ke,me={},de=null,Ve=null;V!==void 0&&(Ko(V),de=""+V),ge($)&&(Ko($.key),de=""+$.key),ue($)&&(Ve=$.ref,ie($,ye));for(ke in $)pe.call($,ke)&&!mt.hasOwnProperty(ke)&&(me[ke]=$[ke]);if(B&&B.defaultProps){var Pe=B.defaultProps;for(ke in Pe)me[ke]===void 0&&(me[ke]=Pe[ke])}if(de||Ve){var Te=typeof B=="function"?B.displayName||B.name||"Unknown":B;de&&Ce(me,Te),Ve&&Mt(me,Te)}return kt(B,de,Ve,ye,se,Jo.current,me)}}var re=y.ReactCurrentOwner,gt=y.ReactDebugCurrentFrame;function Vt(B){if(B){var $=B._owner,V=G(B.type,B._source,$?$.type:null);gt.setExtraStackFrame(V)}else gt.setExtraStackFrame(null)}var Qr;Qr=!1;function _a(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function Ad(){{if(re.current){var B=N(re.current.type);if(B)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+B+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+B+"`."}return""}}function xb(B){return""}var Ed={};function Cb(B){{var $=Ad();if(!$){var V=typeof B=="string"?B:B.displayName||B.name;V&&($=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+V+">.")}return $}}function kd(B,$){{if(!B._store||B._store.validated||B.key!=null)return;B._store.validated=!0;var V=Cb($);if(Ed[V])return;Ed[V]=!0;var se="";B&&B._owner&&B._owner!==re.current&&(se=" It was passed a child from "+N(B._owner.type)+"."),Vt(B),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,se),Vt(null)}}function Id(B,$){{if(typeof B!="object")return;if(rr(B))for(var V=0;V<B.length;V++){var se=B[V];_a(se)&&kd(se,$)}else if(_a(B))B._store&&(B._store.validated=!0);else if(B){var ye=b(B);if(typeof ye=="function"&&ye!==B.entries)for(var ke=ye.call(B),me;!(me=ke.next()).done;)_a(me.value)&&kd(me.value,$)}}}function Ab(B){{var $=B.type;if($==null||typeof $=="string")return;var V;if(typeof $=="function")V=$.propTypes;else if(typeof $=="object"&&($.$$typeof===c||$.$$typeof===f))V=$.propTypes;else return;if(V){var se=N($);nr(V,B.props,"prop",se,B)}else if($.PropTypes!==void 0&&!Qr){Qr=!0;var ye=N($);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ye||"Unknown")}typeof $.getDefaultProps=="function"&&!$.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Eb(B){{for(var $=Object.keys(B.props),V=0;V<$.length;V++){var se=$[V];if(se!=="children"&&se!=="key"){Vt(B),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",se),Vt(null);break}}B.ref!==null&&(Vt(B),C("Invalid attribute `ref` supplied to `React.Fragment`."),Vt(null))}}var jd={};function Bd(B,$,V,se,ye,ke){{var me=T(B);if(!me){var de="";(B===void 0||typeof B=="object"&&B!==null&&Object.keys(B).length===0)&&(de+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ve=xb();Ve?de+=Ve:de+=Ad();var Pe;B===null?Pe="null":rr(B)?Pe="array":B!==void 0&&B.$$typeof===t?(Pe="<"+(N(B.type)||"Unknown")+" />",de=" Did you accidentally export a JSX literal instead of a component?"):Pe=typeof B,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Pe,de)}var Te=be(B,$,V,ye,ke);if(Te==null)return Te;if(me){var It=$.children;if(It!==void 0)if(se)if(rr(It)){for(var Hr=0;Hr<It.length;Hr++)Id(It[Hr],B);Object.freeze&&Object.freeze(It)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Id(It,B)}if(pe.call($,"key")){var ar=N(B),it=Object.keys($).filter(function(Pb){return Pb!=="key"}),$a=it.length>0?"{key: someKey, "+it.join(": ..., ")+": ...}":"{key: someKey}";if(!jd[ar+$a]){var Sb=it.length>0?"{"+it.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,$a,ar,
|
|
31
|
-
`);super(i,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=
|
|
30
|
+
<%s key={someKey} {...props} />`,$a,ar,Sb,ar),jd[ar+$a]=!0}}return B===r?Eb(Te):Ab(Te),Te}}function kb(B,$,V){return Bd(B,$,V,!0)}function Ib(B,$,V){return Bd(B,$,V,!1)}var jb=Ib,Bb=kb;Xo.Fragment=r,Xo.jsx=jb,Xo.jsxs=Bb}()),Xo}process.env.NODE_ENV==="production"?_c.exports=Mb():_c.exports=Db();var O=_c.exports;const $c=[{address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",symbol:"AVAX",name:"Avalanche",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7/logo.png"},{address:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",symbol:"USDC",name:"USD Coin",decimals:6,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E/logo.png"},{address:"0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",symbol:"USDT",name:"Tether USD",decimals:6,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7/logo.png"},{address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",symbol:"DAI",name:"Dai Stablecoin",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0xd586E7F844cEa2F87f50152665BCbc2C279D8d70/logo.png"},{address:"0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664",symbol:"USDC.e",name:"USD Coin (Bridged)",decimals:6,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664/logo.png"},{address:"0x50b7545627a5162F82A992c33b87aDc75187B218",symbol:"WBTC",name:"Wrapped Bitcoin",decimals:8,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x50b7545627a5162F82A992c33b87aDc75187B218/logo.png"},{address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",symbol:"WETH",name:"Wrapped Ether",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB/logo.png"},{address:"0x152b9d0FdC40C096757F570A51E494bd4b943E50",symbol:"BTC.b",name:"Bitcoin",decimals:8,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x152b9d0FdC40C096757F570A51E494bd4b943E50/logo.png"},{address:"0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE",symbol:"sAVAX",name:"Staked AVAX",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE/logo.png"},{address:"0x5947bb275c521040051d82396192181b413227a3",symbol:"LINK",name:"Chainlink",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x5947bb275c521040051d82396192181b413227a3/logo.png"},{address:"0x62edc0692BD897D2295872a9FFCac5425011c661",symbol:"GMX",name:"GMX",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x62edc0692BD897D2295872a9FFCac5425011c661/logo.png"},{address:"0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64",symbol:"FRAX",name:"Frax",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64/logo.png"},{address:"0x6e84a6216eA6dACC71eE8E6b0a5B7322EEbC0fDd",symbol:"JOE",name:"JOE",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x6e84a6216eA6dACC71eE8E6b0a5B7322EEbC0fDd/logo.png"},{address:"0x60781C2586D68229fde47564546784ab3fACA982",symbol:"PNG",name:"Pangolin",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/pangolindex/tokenlists/master/logos/0x60781C2586D68229fde47564546784ab3fACA982/logo.png"},{address:"0x8729438EB15e2C8B576fCc6AeCdA6A148776C0F5",symbol:"QI",name:"BENQI",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x8729438EB15e2C8B576fCc6AeCdA6A148776C0F5/logo.png"},{address:"0x47536F17F4fF30e64A96a7555826b8f9e66ec468",symbol:"CRV",name:"Curve",decimals:18,chainId:43114,logoURI:"https://raw.githubusercontent.com/traderjoe-xyz/joe-tokenlists/main/logos/0x47536F17F4fF30e64A96a7555826b8f9e66ec468/logo.png"},{address:"0x420FcA0121DC28039145009570975747295f2329",symbol:"COQ",name:"Coq Inu",decimals:18,chainId:43114,logoURI:"https://assets.coingecko.com/coins/images/34112/small/coq.png"}],Oi="0x81308B8e4C72E5aA042ADA30f9b29729c5a43098",jh=.5,Bh="https://avax-router-api.avaxrouter.workers.dev",Lb=25,jo=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Wc=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],Sh=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],Ph=[...Sh,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],Ub=[...Sh,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],Td=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],Rd=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],Oh=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],Nd=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function qt(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Zb(e.type);return`${e.name}(${da(e.inputs,{includeName:t})})`}function da(e,{includeName:t=!1}={}){return e?e.map(n=>_b(n,{includeName:t})).join(t?", ":","):""}function _b(e,{includeName:t}){return e.type.startsWith("tuple")?`(${da(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function zt(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function Be(e){return zt(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Th="2.46.2";let Zo={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Th}`},L=class qc extends Error{constructor(t,n={}){var a;const r=(()=>{var c;return n.cause instanceof qc?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),o=n.cause instanceof qc&&n.cause.docsPath||n.docsPath,s=(a=Zo.getDocsUrl)==null?void 0:a.call(Zo,{...n,docsPath:o}),i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],...Zo.version?[`Version: ${Zo.version}`]:[]].join(`
|
|
31
|
+
`);super(i,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Th}walk(t){return Rh(this,t)}};function Rh(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Rh(e.cause,t):t?null:e}class $b extends L{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
32
32
|
`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class Fd extends L{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
33
|
-
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class
|
|
34
|
-
`),{metaMessages:[`Params: (${da(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class Qs extends L{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class
|
|
35
|
-
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class
|
|
36
|
-
`),{name:"AbiEncodingLengthMismatchError"})}}class
|
|
33
|
+
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class Nh extends L{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
|
|
34
|
+
`),{metaMessages:[`Params: (${da(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class Qs extends L{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class Wb extends L{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
|
|
35
|
+
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class qb extends L{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Be(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class zb extends L{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
|
|
36
|
+
`),{name:"AbiEncodingLengthMismatchError"})}}class Qb extends L{constructor(t,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
|
|
37
37
|
`),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class Md extends L{constructor(t,{docsPath:n}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
|
|
38
|
-
`),{docsPath:n,name:"AbiErrorNotFoundError"})}}class
|
|
39
|
-
`),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class
|
|
38
|
+
`),{docsPath:n,name:"AbiErrorNotFoundError"})}}class Fh extends L{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
39
|
+
`),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class Hb extends L{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class Gb extends L{constructor(t,{docsPath:n}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
40
40
|
`),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class Dd extends L{constructor(t,{docsPath:n}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
|
|
41
41
|
`),{docsPath:n,name:"AbiEventNotFoundError"})}}class Bo extends L{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
42
|
-
`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class
|
|
43
|
-
`),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class
|
|
44
|
-
`),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class
|
|
45
|
-
`),{metaMessages:[`Params: (${da(r,{includeName:!0})})`,`Data: ${n} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=n,this.params=r,this.size=o}}class ou extends L{constructor({abiItem:t,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${
|
|
46
|
-
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class
|
|
47
|
-
`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class
|
|
48
|
-
`),{docsPath:n,name:"InvalidAbiDecodingType"})}}let
|
|
49
|
-
`),{name:"InvalidArrayError"})}};class
|
|
50
|
-
`),{name:"InvalidDefinitionTypeError"})}}let Jn=class extends L{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},Dh=class extends L{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},Lh=class extends L{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class Ld extends L{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function _o(e,{dir:t,size:n=32}={}){return typeof e=="string"?Gn(e,{dir:t,size:n}):Xb(e,{dir:t,size:n})}function Gn(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new Lh({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function Xb(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Lh({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const s=t==="right";r[s?o:n-o-1]=e[s?o:e.length-o-1]}return r}let su=class extends L{constructor({max:t,min:n,signed:r,size:o,value:s}){super(`Number "${s}" is not in safe ${o?`${o*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}},Zb=class extends L{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class ey extends L{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let ty=class extends L{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function kn(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&n[t==="left"?o:n.length-o-1].toString()==="0";o++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function Rt(e,{size:t}){if(Be(e)>t)throw new ty({givenSize:Be(e),maxSize:t})}function an(e,t={}){const{signed:n}=t;t.size&&Rt(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,s=(1n<<BigInt(o)*8n-1n)-1n;return r<=s?r:r-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function ny(e,t={}){let n=e;if(t.size&&(Rt(n,{size:t.size}),n=kn(n)),kn(n)==="0x00")return!1;if(kn(n)==="0x01")return!0;throw new ey(n)}function cn(e,t={}){const n=an(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new su({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}function ry(e,t={}){let n=Qt(e);return t.size&&(Rt(n,{size:t.size}),n=kn(n,{dir:"right"})),new TextDecoder().decode(n)}const oy=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ln(e,t={}){return typeof e=="number"||typeof e=="bigint"?ee(e,t):typeof e=="string"?So(e,t):typeof e=="boolean"?Uh(e,t):De(e,t)}function Uh(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Rt(n,{size:t.size}),_o(n,{size:t.size})):n}function De(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=oy[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(Rt(r,{size:t.size}),_o(r,{dir:"right",size:t.size})):r}function ee(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&n?-s-1n:0;if(s&&o>s||o<i){const c=typeof e=="bigint"?"n":"";throw new su({max:s?`${s}${c}`:void 0,min:`${i}${c}`,signed:n,size:r,value:`${e}${c}`})}const a=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?_o(a,{size:r}):a}const sy=new TextEncoder;function So(e,t={}){const n=sy.encode(e);return De(n,t)}const iy=new TextEncoder;function $o(e,t={}){return typeof e=="number"||typeof e=="bigint"?cy(e,t):typeof e=="boolean"?ay(e,t):zt(e)?Qt(e,t):Sr(e,t)}function ay(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(Rt(n,{size:t.size}),_o(n,{size:t.size})):n}const fn={zero:48,nine:57,A:65,F:70,a:97,f:102};function Ud(e){if(e>=fn.zero&&e<=fn.nine)return e-fn.zero;if(e>=fn.A&&e<=fn.F)return e-(fn.A-10);if(e>=fn.a&&e<=fn.f)return e-(fn.a-10)}function Qt(e,t={}){let n=e;t.size&&(Rt(n,{size:t.size}),n=_o(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,s=new Uint8Array(o);for(let i=0,a=0;i<o;i++){const c=Ud(r.charCodeAt(a++)),l=Ud(r.charCodeAt(a++));if(c===void 0||l===void 0)throw new L(`Invalid byte sequence ("${r[a-2]}${r[a-1]}" in "${r}").`);s[i]=c*16+l}return s}function cy(e,t){const n=ee(e,t);return Qt(n)}function Sr(e,t={}){const n=iy.encode(e);return typeof t.size=="number"?(Rt(n,{size:t.size}),_o(n,{dir:"right",size:t.size})):n}const pi=BigInt(2**32-1),_d=BigInt(32);function ly(e,t=!1){return t?{h:Number(e&pi),l:Number(e>>_d&pi)}:{h:Number(e>>_d&pi)|0,l:Number(e&pi)|0}}function uy(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:a}=ly(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const dy=(e,t,n)=>e<<n|t>>>32-n,fy=(e,t,n)=>t<<n|e>>>32-n,hy=(e,t,n)=>t<<n-32|e>>>64-n,py=(e,t,n)=>e<<n-32|t>>>64-n,Vr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function my(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ds(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Or(e,...t){if(!my(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function gy(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ds(e.outputLen),ds(e.blockLen)}function Po(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function _h(e,t){Or(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function by(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Oo(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Wa(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Jt(e,t){return e<<32-t|e>>>t}const yy=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function wy(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function vy(e){for(let t=0;t<e.length;t++)e[t]=wy(e[t]);return e}const $d=yy?e=>e:vy;function xy(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function fa(e){return typeof e=="string"&&(e=xy(e)),Or(e),e}function Cy(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];Or(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}let iu=class{};function $h(e){const t=r=>e().update(fa(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Ay(e=32){if(Vr&&typeof Vr.getRandomValues=="function")return Vr.getRandomValues(new Uint8Array(e));if(Vr&&typeof Vr.randomBytes=="function")return Uint8Array.from(Vr.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const Ey=BigInt(0),es=BigInt(1),ky=BigInt(2),Iy=BigInt(7),jy=BigInt(256),By=BigInt(113),qh=[],Wh=[],zh=[];for(let e=0,t=es,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],qh.push(2*(5*r+n)),Wh.push((e+1)*(e+2)/2%64);let o=Ey;for(let s=0;s<7;s++)t=(t<<es^(t>>Iy)*By)%jy,t&ky&&(o^=es<<(es<<BigInt(s))-es);zh.push(o)}const Qh=uy(zh,!0),Sy=Qh[0],Py=Qh[1],qd=(e,t,n)=>n>32?hy(e,t,n):dy(e,t,n),Wd=(e,t,n)=>n>32?py(e,t,n):fy(e,t,n);function Oy(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const a=(i+8)%10,c=(i+2)%10,l=n[c],u=n[c+1],f=qd(l,u,1)^n[a],d=Wd(l,u,1)^n[a+1];for(let h=0;h<50;h+=10)e[i+h]^=f,e[i+h+1]^=d}let o=e[2],s=e[3];for(let i=0;i<24;i++){const a=Wh[i],c=qd(o,s,a),l=Wd(o,s,a),u=qh[i];o=e[u],s=e[u+1],e[u]=c,e[u+1]=l}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)n[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=Sy[r],e[1]^=Py[r]}Oo(n)}let Ty=class Hh extends iu{constructor(t,n,r,o=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=s,ds(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=by(this.state)}clone(){return this._cloneInto()}keccak(){$d(this.state32),Oy(this.state32,this.rounds),$d(this.state32),this.posOut=0,this.pos=0}update(t){Po(this),t=fa(t),Or(t);const{blockLen:n,state:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);for(let a=0;a<i;a++)r[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,n&128&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Po(this,!1),Or(t),this.finish();const n=this.state,{blockLen:r}=this;for(let o=0,s=t.length;o<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-o);t.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ds(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(_h(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Oo(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new Hh(n,r,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}};const Ry=(e,t,n)=>$h(()=>new Ty(t,e,n)),Ny=Ry(1,136,256/8);function ze(e,t){const n=t||"hex",r=Ny(zt(e,{strict:!1})?$o(e):e);return n==="bytes"?r:ln(r)}let Hs=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}};const Fy=/^0x[a-fA-F0-9]{40}$/,za=new Hs(8192);function wt(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(za.has(r))return za.get(r);const o=Fy.test(e)?e.toLowerCase()===e?!0:n?ha(e)===e:!0:!1;return za.set(r,o),o}const Qa=new Hs(8192);function ha(e,t){if(Qa.has(`${e}.${t}`))return Qa.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=ze(Sr(n),"bytes"),o=n.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());const s=`0x${o.join("")}`;return Qa.set(`${e}.${t}`,s),s}function yt(e,t){if(!wt(e,{strict:!1}))throw new Jn({address:e});return ha(e,t)}let zd=class extends L{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},Vh=class extends L{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},My=class extends L{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const Dy={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new My({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Vh({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new zd({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new zd({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function au(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Dy);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function To(e,t,n,{strict:r}={}){return zt(e,{strict:!1})?Ly(e,t,n,{strict:r}):Jh(e,t,n,{strict:r})}function Gh(e,t){if(typeof t=="number"&&t>0&&t>Be(e)-1)throw new Dh({offset:t,position:"start",size:Be(e)})}function Kh(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Be(e)!==n-t)throw new Dh({offset:n,position:"end",size:Be(e)})}function Jh(e,t,n,{strict:r}={}){Gh(e,t);const o=e.slice(t,n);return r&&Kh(o,t,n),o}function Ly(e,t,n,{strict:r}={}){Gh(e,t);const o=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&Kh(o,t,n),o}function Uy(e,t={}){typeof t.size<"u"&&Rt(e,{size:t.size});const n=De(e,t);return an(n,t)}function _y(e,t={}){let n=e;if(typeof t.size<"u"&&(Rt(n,{size:t.size}),n=kn(n)),n.length>1||n[0]>1)throw new Zb(n);return!!n[0]}function In(e,t={}){typeof t.size<"u"&&Rt(e,{size:t.size});const n=De(e,t);return cn(n,t)}function $y(e,t={}){let n=e;return typeof t.size<"u"&&(Rt(n,{size:t.size}),n=kn(n,{dir:"right"})),new TextDecoder().decode(n)}function vt(e){return typeof e[0]=="string"?qo(e):qy(e)}function qy(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function qo(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}const Wy=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Yh=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Zn(e,t){if(e.length!==t.length)throw new qb({expectedLength:e.length,givenLength:t.length});const n=zy({params:e,values:t}),r=lu(n);return r.length===0?"0x":r}function zy({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(cu({param:e[r],value:t[r]}));return n}function cu({param:e,value:t}){const n=uu(e.type);if(n){const[r,o]=n;return Hy(t,{length:r,param:{...e,type:o}})}if(e.type==="tuple")return Yy(t,{param:e});if(e.type==="address")return Qy(t);if(e.type==="bool")return Gy(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,o="256"]=Yh.exec(e.type)??[];return Ky(t,{signed:r,size:Number(o)})}if(e.type.startsWith("bytes"))return Vy(t,{param:e});if(e.type==="string")return Jy(t);throw new Kb(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function lu(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?t+=32:t+=Be(a)}const n=[],r=[];let o=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?(n.push(ee(t+o,{size:32})),r.push(a),o+=Be(a)):n.push(a)}return vt([...n,...r])}function Qy(e){if(!wt(e))throw new Jn({address:e});return{dynamic:!1,encoded:Gn(e.toLowerCase())}}function Hy(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new Mh(e);if(!r&&e.length!==t)throw new _b({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let o=!1;const s=[];for(let i=0;i<e.length;i++){const a=cu({param:n,value:e[i]});a.dynamic&&(o=!0),s.push(a)}if(r||o){const i=lu(s);if(r){const a=ee(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?vt([a,i]):a}}if(o)return{dynamic:!0,encoded:i}}return{dynamic:!1,encoded:vt(s.map(({encoded:i})=>i))}}function Vy(e,{param:t}){const[,n]=t.type.split("bytes"),r=Be(e);if(!n){let o=e;return r%32!==0&&(o=Gn(o,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:vt([Gn(ee(r,{size:32})),o])}}if(r!==Number.parseInt(n,10))throw new $b({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Gn(e,{dir:"right"})}}function Gy(e){if(typeof e!="boolean")throw new L(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Gn(Uh(e))}}function Ky(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new su({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:ee(e,{size:32,signed:t})}}function Jy(e){const t=So(e),n=Math.ceil(Be(t)/32),r=[];for(let o=0;o<n;o++)r.push(Gn(To(t,o*32,(o+1)*32),{dir:"right"}));return{dynamic:!0,encoded:vt([Gn(ee(Be(t),{size:32})),...r])}}function Yy(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const s=t.components[o],i=Array.isArray(e)?o:s.name,a=cu({param:s,value:e[i]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?lu(r):vt(r.map(({encoded:o})=>o))}}function uu(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Vs(e,t){const n=typeof t=="string"?Qt(t):t,r=au(n);if(Be(n)===0&&e.length>0)throw new Qs;if(Be(t)&&Be(t)<32)throw new Rh({data:typeof t=="string"?t:De(t),params:e,size:Be(t)});let o=0;const s=[];for(let i=0;i<e.length;++i){const a=e[i];r.setPosition(o);const[c,l]=ao(r,a,{staticPosition:0});o+=l,s.push(c)}return s}function ao(e,t,{staticPosition:n}){const r=uu(t.type);if(r){const[o,s]=r;return Zy(e,{...t,type:s},{length:o,staticPosition:n})}if(t.type==="tuple")return rw(e,t,{staticPosition:n});if(t.type==="address")return Xy(e);if(t.type==="bool")return ew(e);if(t.type.startsWith("bytes"))return tw(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return nw(e,t);if(t.type==="string")return ow(e,{staticPosition:n});throw new Jb(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const Qd=32,zc=32;function Xy(e){const t=e.readBytes(32);return[ha(De(Jh(t,-20))),32]}function Zy(e,t,{length:n,staticPosition:r}){if(!n){const i=In(e.readBytes(zc)),a=r+i,c=a+Qd;e.setPosition(a);const l=In(e.readBytes(Qd)),u=fs(t);let f=0;const d=[];for(let h=0;h<l;++h){e.setPosition(c+(u?h*32:f));const[g,m]=ao(e,t,{staticPosition:c});f+=m,d.push(g)}return e.setPosition(r+32),[d,32]}if(fs(t)){const i=In(e.readBytes(zc)),a=r+i,c=[];for(let l=0;l<n;++l){e.setPosition(a+l*32);const[u]=ao(e,t,{staticPosition:a});c.push(u)}return e.setPosition(r+32),[c,32]}let o=0;const s=[];for(let i=0;i<n;++i){const[a,c]=ao(e,t,{staticPosition:r+o});o+=c,s.push(a)}return[s,o]}function ew(e){return[_y(e.readBytes(32),{size:32}),32]}function tw(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const i=In(e.readBytes(32));e.setPosition(n+i);const a=In(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(a);return e.setPosition(n+32),[De(c),32]}return[De(e.readBytes(Number.parseInt(o,10),32)),32]}function nw(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?Uy(o,{signed:n}):In(o,{signed:n}),32]}function rw(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:i})=>!i),o=r?[]:{};let s=0;if(fs(t)){const i=In(e.readBytes(zc)),a=n+i;for(let c=0;c<t.components.length;++c){const l=t.components[c];e.setPosition(a+s);const[u,f]=ao(e,l,{staticPosition:a});s+=f,o[r?c:l==null?void 0:l.name]=u}return e.setPosition(n+32),[o,32]}for(let i=0;i<t.components.length;++i){const a=t.components[i],[c,l]=ao(e,a,{staticPosition:n});o[r?i:a==null?void 0:a.name]=c,s+=l}return[o,s]}function ow(e,{staticPosition:t}){const n=In(e.readBytes(32)),r=t+n;e.setPosition(r);const o=In(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const s=e.readBytes(o,32),i=$y(kn(s));return e.setPosition(t+32),[i,32]}function fs(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(fs);const n=uu(e.type);return!!(n&&fs({...e,type:n[1]}))}const sw=e=>ze($o(e));function iw(e){return sw(e)}const aw="1.2.3";let ft=class Qc extends Error{constructor(t,n={}){var i;const r=n.cause instanceof Qc?n.cause.details:(i=n.cause)!=null&&i.message?n.cause.message:n.details,o=n.cause instanceof Qc&&n.cause.docsPath||n.docsPath,s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${aw}`].join(`
|
|
51
|
-
`);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}};function Tn(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const Xh=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Zh=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,ep=/^\(.+?\).*?$/,Hd=/^tuple(?<array>(\[(\d*)\])*)$/;function Hc(e){let t=e.type;if(Hd.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let o=0;o<n;o++){const s=e.components[o];t+=Hc(s),o<n-1&&(t+=", ")}const r=Tn(Hd,e.type);return t+=`)${(r==null?void 0:r.array)||""}`,Hc({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Zr(e){let t="";const n=e.length;for(let r=0;r<n;r++){const o=e[r];t+=Hc(o),r!==n-1&&(t+=", ")}return t}function qi(e){var t;return e.type==="function"?`function ${e.name}(${Zr(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${Zr(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Zr(e.inputs)})`:e.type==="error"?`error ${e.name}(${Zr(e.inputs)})`:e.type==="constructor"?`constructor(${Zr(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const tp=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function cw(e){return tp.test(e)}function lw(e){return Tn(tp,e)}const np=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function uw(e){return np.test(e)}function dw(e){return Tn(np,e)}const rp=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function fw(e){return rp.test(e)}function hw(e){return Tn(rp,e)}const op=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function pa(e){return op.test(e)}function pw(e){return Tn(op,e)}const sp=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function mw(e){return sp.test(e)}function gw(e){return Tn(sp,e)}const ip=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function bw(e){return ip.test(e)}function yw(e){return Tn(ip,e)}const ww=/^receive\(\) external payable$/;function vw(e){return ww.test(e)}const Vd=new Set(["memory","indexed","storage","calldata"]),xw=new Set(["indexed"]),Vc=new Set(["calldata","memory","storage"]);class Cw extends ft{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class Aw extends ft{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class Ew extends ft{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class kw extends ft{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class Iw extends ft{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class jw extends ft{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class Bw extends ft{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class Sw extends ft{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class Pw extends ft{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class Wo extends ft{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class Ow extends ft{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class Tw extends ft{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class Rw extends ft{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class Nw extends ft{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function Fw(e,t,n){let r="";if(n)for(const o of Object.entries(n)){if(!o)continue;let s="";for(const i of o[1])s+=`[${i.type}${i.name?`:${i.name}`:""}]`;r+=`(${o[0]}{${s}})`}return t?`${t}:${e}${r}`:`${e}${r}`}const Ha=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Gc(e,t={}){if(fw(e))return Mw(e,t);if(uw(e))return Dw(e,t);if(cw(e))return Lw(e,t);if(mw(e))return Uw(e,t);if(bw(e))return _w(e);if(vw(e))return{type:"receive",stateMutability:"payable"};throw new Ow({signature:e})}function Mw(e,t={}){const n=hw(e);if(!n)throw new Wo({signature:e,type:"function"});const r=bt(n.parameters),o=[],s=r.length;for(let a=0;a<s;a++)o.push(Pn(r[a],{modifiers:Vc,structs:t,type:"function"}));const i=[];if(n.returns){const a=bt(n.returns),c=a.length;for(let l=0;l<c;l++)i.push(Pn(a[l],{modifiers:Vc,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:o,outputs:i}}function Dw(e,t={}){const n=dw(e);if(!n)throw new Wo({signature:e,type:"event"});const r=bt(n.parameters),o=[],s=r.length;for(let i=0;i<s;i++)o.push(Pn(r[i],{modifiers:xw,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:o}}function Lw(e,t={}){const n=lw(e);if(!n)throw new Wo({signature:e,type:"error"});const r=bt(n.parameters),o=[],s=r.length;for(let i=0;i<s;i++)o.push(Pn(r[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:o}}function Uw(e,t={}){const n=gw(e);if(!n)throw new Wo({signature:e,type:"constructor"});const r=bt(n.parameters),o=[],s=r.length;for(let i=0;i<s;i++)o.push(Pn(r[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:o}}function _w(e){const t=yw(e);if(!t)throw new Wo({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const $w=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,qw=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Ww=/^u?int$/;function Pn(e,t){var f,d;const n=Fw(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(Ha.has(n))return Ha.get(n);const r=ep.test(e),o=Tn(r?qw:$w,e);if(!o)throw new Iw({param:e});if(o.name&&Qw(o.name))throw new jw({param:e,name:o.name});const s=o.name?{name:o.name}:{},i=o.modifier==="indexed"?{indexed:!0}:{},a=(t==null?void 0:t.structs)??{};let c,l={};if(r){c="tuple";const h=bt(o.type),g=[],m=h.length;for(let b=0;b<m;b++)g.push(Pn(h[b],{structs:a}));l={components:g}}else if(o.type in a)c="tuple",l={components:a[o.type]};else if(Ww.test(o.type))c=`${o.type}256`;else if(o.type==="address payable")c="address";else if(c=o.type,(t==null?void 0:t.type)!=="struct"&&!ap(c))throw new Ew({type:c});if(o.modifier){if(!((d=(f=t==null?void 0:t.modifiers)==null?void 0:f.has)!=null&&d.call(f,o.modifier)))throw new Bw({param:e,type:t==null?void 0:t.type,modifier:o.modifier});if(Vc.has(o.modifier)&&!Hw(c,!!o.array))throw new Sw({param:e,type:t==null?void 0:t.type,modifier:o.modifier})}const u={type:`${c}${o.array??""}`,...s,...i,...l};return Ha.set(n,u),u}function bt(e,t=[],n="",r=0){const o=e.trim().length;for(let s=0;s<o;s++){const i=e[s],a=e.slice(s+1);switch(i){case",":return r===0?bt(a,[...t,n.trim()]):bt(a,t,`${n}${i}`,r);case"(":return bt(a,t,`${n}${i}`,r+1);case")":return bt(a,t,`${n}${i}`,r-1);default:return bt(a,t,`${n}${i}`,r)}}if(n==="")return t;if(r!==0)throw new Nw({current:n,depth:r});return t.push(n.trim()),t}function ap(e){return e==="address"||e==="bool"||e==="function"||e==="string"||Xh.test(e)||Zh.test(e)}const zw=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function Qw(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||Xh.test(e)||Zh.test(e)||zw.test(e)}function Hw(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function du(e){const t={},n=e.length;for(let i=0;i<n;i++){const a=e[i];if(!pa(a))continue;const c=pw(a);if(!c)throw new Wo({signature:a,type:"struct"});const l=c.properties.split(";"),u=[],f=l.length;for(let d=0;d<f;d++){const g=l[d].trim();if(!g)continue;const m=Pn(g,{type:"struct"});u.push(m)}if(!u.length)throw new Tw({signature:a});t[c.name]=u}const r={},o=Object.entries(t),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];r[a]=cp(c,t)}return r}const Vw=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function cp(e=[],t={},n=new Set){const r=[],o=e.length;for(let s=0;s<o;s++){const i=e[s];if(ep.test(i.type))r.push(i);else{const c=Tn(Vw,i.type);if(!(c!=null&&c.type))throw new Pw({abiParameter:i});const{array:l,type:u}=c;if(u in t){if(n.has(u))throw new Rw({type:u});r.push({...i,type:`tuple${l??""}`,components:cp(t[u],t,new Set([...n,u]))})}else if(ap(u))r.push(i);else throw new Aw({type:u})}}return r}function lp(e){const t=du(e),n=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];pa(s)||n.push(Gc(s,t))}return n}function Gd(e){let t;if(typeof e=="string")t=Gc(e);else{const n=du(e),r=e.length;for(let o=0;o<r;o++){const s=e[o];if(!pa(s)){t=Gc(s,n);break}}}if(!t)throw new Cw({signature:e});return t}function Kd(e){const t=[];if(typeof e=="string"){const n=bt(e),r=n.length;for(let o=0;o<r;o++)t.push(Pn(n[o],{modifiers:Vd}))}else{const n=du(e),r=e.length;for(let o=0;o<r;o++){const s=e[o];if(pa(s))continue;const i=bt(s),a=i.length;for(let c=0;c<a;c++)t.push(Pn(i[c],{modifiers:Vd,structs:n}))}}if(t.length===0)throw new kw({params:e});return t}function Gw(e){let t=!0,n="",r=0,o="",s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function",""].includes(o))o="";else if(o+=a,a===")"){s=!0;break}continue}if(a===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=a,n+=a}}if(!s)throw new L("Unable to normalize signature.");return o}const Kw=e=>{const t=typeof e=="string"?e:qi(e);return Gw(t)};function up(e){return iw(Kw(e))}const ma=up,Gs=e=>To(up(e),0,4);function $r(e){const{abi:t,args:n=[],name:r}=e,o=zt(r,{strict:!1}),s=t.filter(a=>o?a.type==="function"?Gs(a)===r:a.type==="event"?ma(a)===r:!1:"name"in a&&a.name===r);if(s.length===0)return;if(s.length===1)return s[0];let i;for(const a of s){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((l,u)=>{const f="inputs"in a&&a.inputs[u];return f?Kc(l,f):!1})){if(i&&"inputs"in i&&i.inputs){const l=dp(a.inputs,i.inputs,n);if(l)throw new Vb({abiItem:a,type:l[0]},{abiItem:i,type:l[1]})}i=a}}return i||s[0]}function Kc(e,t){const n=typeof e,r=t.type;switch(r){case"address":return wt(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,s)=>n==="object"&&Kc(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>Kc(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function dp(e,t,n){for(const r in e){const o=e[r],s=t[r];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return dp(o.components,s.components,n[r]);const i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?wt(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?wt(n[r],{strict:!1}):!1)return i}}const Va="/docs/contract/decodeFunctionResult";function er(e){const{abi:t,args:n,functionName:r,data:o}=e;let s=t[0];if(r){const a=$r({abi:t,args:n,name:r});if(!a)throw new Bo(r,{docsPath:Va});s=a}if(s.type!=="function")throw new Bo(void 0,{docsPath:Va});if(!s.outputs)throw new Fh(s.name,{docsPath:Va});const i=Vs(s.outputs,o);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const Jd="/docs/contract/encodeFunctionData";function Jw(e){const{abi:t,args:n,functionName:r}=e;let o=t[0];if(r){const s=$r({abi:t,args:n,name:r});if(!s)throw new Bo(r,{docsPath:Jd});o=s}if(o.type!=="function")throw new Bo(void 0,{docsPath:Jd});return{abi:[o],functionName:Gs(Wt(o))}}function Ct(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:Jw(e)})(),o=n[0],s=r,i="inputs"in o&&o.inputs?Zn(o.inputs,t??[]):void 0;return qo([s,i??"0x"])}class Jc extends L{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class Yw extends L{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class Xw extends L{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
52
|
-
`),{name:"ChainNotFoundError"})}}class
|
|
53
|
-
`,"")}function
|
|
42
|
+
`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class Mh extends L{constructor(t,{docsPath:n}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
43
|
+
`),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class Vb extends L{constructor(t,{docsPath:n}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
44
|
+
`),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class Kb extends L{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${qt(t.abiItem)}\`, and`,`\`${n.type}\` in \`${qt(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let Jb=class extends L{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}};class $i extends L{constructor({abiItem:t,data:n,params:r,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join(`
|
|
45
|
+
`),{metaMessages:[`Params: (${da(r,{includeName:!0})})`,`Data: ${n} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=n,this.params=r,this.size=o}}class ou extends L{constructor({abiItem:t,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${qt(t,{includeName:!0})}".`].join(`
|
|
46
|
+
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class Yb extends L{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
47
|
+
`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class Xb extends L{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
48
|
+
`),{docsPath:n,name:"InvalidAbiDecodingType"})}}let Dh=class extends L{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
|
|
49
|
+
`),{name:"InvalidArrayError"})}};class Zb extends L{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
50
|
+
`),{name:"InvalidDefinitionTypeError"})}}let Jn=class extends L{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},Lh=class extends L{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},Uh=class extends L{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class Ld extends L{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function _o(e,{dir:t,size:n=32}={}){return typeof e=="string"?Vn(e,{dir:t,size:n}):ey(e,{dir:t,size:n})}function Vn(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new Uh({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function ey(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Uh({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const s=t==="right";r[s?o:n-o-1]=e[s?o:e.length-o-1]}return r}let su=class extends L{constructor({max:t,min:n,signed:r,size:o,value:s}){super(`Number "${s}" is not in safe ${o?`${o*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}},ty=class extends L{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class ny extends L{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let ry=class extends L{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function kn(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&n[t==="left"?o:n.length-o-1].toString()==="0";o++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function Nt(e,{size:t}){if(Be(e)>t)throw new ry({givenSize:Be(e),maxSize:t})}function an(e,t={}){const{signed:n}=t;t.size&&Nt(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,s=(1n<<BigInt(o)*8n-1n)-1n;return r<=s?r:r-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function oy(e,t={}){let n=e;if(t.size&&(Nt(n,{size:t.size}),n=kn(n)),kn(n)==="0x00")return!1;if(kn(n)==="0x01")return!0;throw new ny(n)}function cn(e,t={}){const n=an(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new su({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}function sy(e,t={}){let n=Qt(e);return t.size&&(Nt(n,{size:t.size}),n=kn(n,{dir:"right"})),new TextDecoder().decode(n)}const iy=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ln(e,t={}){return typeof e=="number"||typeof e=="bigint"?ee(e,t):typeof e=="string"?So(e,t):typeof e=="boolean"?_h(e,t):De(e,t)}function _h(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Nt(n,{size:t.size}),_o(n,{size:t.size})):n}function De(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=iy[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(Nt(r,{size:t.size}),_o(r,{dir:"right",size:t.size})):r}function ee(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&n?-s-1n:0;if(s&&o>s||o<i){const c=typeof e=="bigint"?"n":"";throw new su({max:s?`${s}${c}`:void 0,min:`${i}${c}`,signed:n,size:r,value:`${e}${c}`})}const a=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?_o(a,{size:r}):a}const ay=new TextEncoder;function So(e,t={}){const n=ay.encode(e);return De(n,t)}const cy=new TextEncoder;function $o(e,t={}){return typeof e=="number"||typeof e=="bigint"?uy(e,t):typeof e=="boolean"?ly(e,t):zt(e)?Qt(e,t):Sr(e,t)}function ly(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(Nt(n,{size:t.size}),_o(n,{size:t.size})):n}const fn={zero:48,nine:57,A:65,F:70,a:97,f:102};function Ud(e){if(e>=fn.zero&&e<=fn.nine)return e-fn.zero;if(e>=fn.A&&e<=fn.F)return e-(fn.A-10);if(e>=fn.a&&e<=fn.f)return e-(fn.a-10)}function Qt(e,t={}){let n=e;t.size&&(Nt(n,{size:t.size}),n=_o(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,s=new Uint8Array(o);for(let i=0,a=0;i<o;i++){const c=Ud(r.charCodeAt(a++)),l=Ud(r.charCodeAt(a++));if(c===void 0||l===void 0)throw new L(`Invalid byte sequence ("${r[a-2]}${r[a-1]}" in "${r}").`);s[i]=c*16+l}return s}function uy(e,t){const n=ee(e,t);return Qt(n)}function Sr(e,t={}){const n=cy.encode(e);return typeof t.size=="number"?(Nt(n,{size:t.size}),_o(n,{dir:"right",size:t.size})):n}const pi=BigInt(2**32-1),_d=BigInt(32);function dy(e,t=!1){return t?{h:Number(e&pi),l:Number(e>>_d&pi)}:{h:Number(e>>_d&pi)|0,l:Number(e&pi)|0}}function fy(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:a}=dy(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const hy=(e,t,n)=>e<<n|t>>>32-n,py=(e,t,n)=>t<<n|e>>>32-n,my=(e,t,n)=>t<<n-32|e>>>64-n,gy=(e,t,n)=>e<<n-32|t>>>64-n,Gr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function by(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ds(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Or(e,...t){if(!by(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function yy(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ds(e.outputLen),ds(e.blockLen)}function Po(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function $h(e,t){Or(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function wy(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Oo(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function qa(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Jt(e,t){return e<<32-t|e>>>t}const vy=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function xy(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Cy(e){for(let t=0;t<e.length;t++)e[t]=xy(e[t]);return e}const $d=vy?e=>e:Cy;function Ay(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function fa(e){return typeof e=="string"&&(e=Ay(e)),Or(e),e}function Ey(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];Or(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}let iu=class{};function Wh(e){const t=r=>e().update(fa(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ky(e=32){if(Gr&&typeof Gr.getRandomValues=="function")return Gr.getRandomValues(new Uint8Array(e));if(Gr&&typeof Gr.randomBytes=="function")return Uint8Array.from(Gr.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const Iy=BigInt(0),es=BigInt(1),jy=BigInt(2),By=BigInt(7),Sy=BigInt(256),Py=BigInt(113),qh=[],zh=[],Qh=[];for(let e=0,t=es,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],qh.push(2*(5*r+n)),zh.push((e+1)*(e+2)/2%64);let o=Iy;for(let s=0;s<7;s++)t=(t<<es^(t>>By)*Py)%Sy,t&jy&&(o^=es<<(es<<BigInt(s))-es);Qh.push(o)}const Hh=fy(Qh,!0),Oy=Hh[0],Ty=Hh[1],Wd=(e,t,n)=>n>32?my(e,t,n):hy(e,t,n),qd=(e,t,n)=>n>32?gy(e,t,n):py(e,t,n);function Ry(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const a=(i+8)%10,c=(i+2)%10,l=n[c],u=n[c+1],f=Wd(l,u,1)^n[a],d=qd(l,u,1)^n[a+1];for(let h=0;h<50;h+=10)e[i+h]^=f,e[i+h+1]^=d}let o=e[2],s=e[3];for(let i=0;i<24;i++){const a=zh[i],c=Wd(o,s,a),l=qd(o,s,a),u=qh[i];o=e[u],s=e[u+1],e[u]=c,e[u+1]=l}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)n[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=Oy[r],e[1]^=Ty[r]}Oo(n)}let Ny=class Gh extends iu{constructor(t,n,r,o=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=s,ds(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=wy(this.state)}clone(){return this._cloneInto()}keccak(){$d(this.state32),Ry(this.state32,this.rounds),$d(this.state32),this.posOut=0,this.pos=0}update(t){Po(this),t=fa(t),Or(t);const{blockLen:n,state:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);for(let a=0;a<i;a++)r[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,n&128&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Po(this,!1),Or(t),this.finish();const n=this.state,{blockLen:r}=this;for(let o=0,s=t.length;o<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-o);t.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ds(t),this.xofInto(new Uint8Array(t))}digestInto(t){if($h(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Oo(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new Gh(n,r,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}};const Fy=(e,t,n)=>Wh(()=>new Ny(t,e,n)),My=Fy(1,136,256/8);function ze(e,t){const n=t||"hex",r=My(zt(e,{strict:!1})?$o(e):e);return n==="bytes"?r:ln(r)}let Hs=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}};const Dy=/^0x[a-fA-F0-9]{40}$/,za=new Hs(8192);function wt(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(za.has(r))return za.get(r);const o=Dy.test(e)?e.toLowerCase()===e?!0:n?ha(e)===e:!0:!1;return za.set(r,o),o}const Qa=new Hs(8192);function ha(e,t){if(Qa.has(`${e}.${t}`))return Qa.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=ze(Sr(n),"bytes"),o=n.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());const s=`0x${o.join("")}`;return Qa.set(`${e}.${t}`,s),s}function yt(e,t){if(!wt(e,{strict:!1}))throw new Jn({address:e});return ha(e,t)}let zd=class extends L{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},Vh=class extends L{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},Ly=class extends L{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const Uy={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Ly({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Vh({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new zd({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new zd({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function au(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Uy);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function To(e,t,n,{strict:r}={}){return zt(e,{strict:!1})?_y(e,t,n,{strict:r}):Yh(e,t,n,{strict:r})}function Kh(e,t){if(typeof t=="number"&&t>0&&t>Be(e)-1)throw new Lh({offset:t,position:"start",size:Be(e)})}function Jh(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Be(e)!==n-t)throw new Lh({offset:n,position:"end",size:Be(e)})}function Yh(e,t,n,{strict:r}={}){Kh(e,t);const o=e.slice(t,n);return r&&Jh(o,t,n),o}function _y(e,t,n,{strict:r}={}){Kh(e,t);const o=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&Jh(o,t,n),o}function $y(e,t={}){typeof t.size<"u"&&Nt(e,{size:t.size});const n=De(e,t);return an(n,t)}function Wy(e,t={}){let n=e;if(typeof t.size<"u"&&(Nt(n,{size:t.size}),n=kn(n)),n.length>1||n[0]>1)throw new ty(n);return!!n[0]}function In(e,t={}){typeof t.size<"u"&&Nt(e,{size:t.size});const n=De(e,t);return cn(n,t)}function qy(e,t={}){let n=e;return typeof t.size<"u"&&(Nt(n,{size:t.size}),n=kn(n,{dir:"right"})),new TextDecoder().decode(n)}function vt(e){return typeof e[0]=="string"?Wo(e):zy(e)}function zy(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Wo(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}const Qy=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Xh=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Zn(e,t){if(e.length!==t.length)throw new zb({expectedLength:e.length,givenLength:t.length});const n=Hy({params:e,values:t}),r=lu(n);return r.length===0?"0x":r}function Hy({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(cu({param:e[r],value:t[r]}));return n}function cu({param:e,value:t}){const n=uu(e.type);if(n){const[r,o]=n;return Vy(t,{length:r,param:{...e,type:o}})}if(e.type==="tuple")return Zy(t,{param:e});if(e.type==="address")return Gy(t);if(e.type==="bool")return Jy(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,o="256"]=Xh.exec(e.type)??[];return Yy(t,{signed:r,size:Number(o)})}if(e.type.startsWith("bytes"))return Ky(t,{param:e});if(e.type==="string")return Xy(t);throw new Yb(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function lu(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?t+=32:t+=Be(a)}const n=[],r=[];let o=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?(n.push(ee(t+o,{size:32})),r.push(a),o+=Be(a)):n.push(a)}return vt([...n,...r])}function Gy(e){if(!wt(e))throw new Jn({address:e});return{dynamic:!1,encoded:Vn(e.toLowerCase())}}function Vy(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new Dh(e);if(!r&&e.length!==t)throw new Wb({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let o=!1;const s=[];for(let i=0;i<e.length;i++){const a=cu({param:n,value:e[i]});a.dynamic&&(o=!0),s.push(a)}if(r||o){const i=lu(s);if(r){const a=ee(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?vt([a,i]):a}}if(o)return{dynamic:!0,encoded:i}}return{dynamic:!1,encoded:vt(s.map(({encoded:i})=>i))}}function Ky(e,{param:t}){const[,n]=t.type.split("bytes"),r=Be(e);if(!n){let o=e;return r%32!==0&&(o=Vn(o,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:vt([Vn(ee(r,{size:32})),o])}}if(r!==Number.parseInt(n,10))throw new qb({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Vn(e,{dir:"right"})}}function Jy(e){if(typeof e!="boolean")throw new L(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Vn(_h(e))}}function Yy(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new su({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:ee(e,{size:32,signed:t})}}function Xy(e){const t=So(e),n=Math.ceil(Be(t)/32),r=[];for(let o=0;o<n;o++)r.push(Vn(To(t,o*32,(o+1)*32),{dir:"right"}));return{dynamic:!0,encoded:vt([Vn(ee(Be(t),{size:32})),...r])}}function Zy(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const s=t.components[o],i=Array.isArray(e)?o:s.name,a=cu({param:s,value:e[i]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?lu(r):vt(r.map(({encoded:o})=>o))}}function uu(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Gs(e,t){const n=typeof t=="string"?Qt(t):t,r=au(n);if(Be(n)===0&&e.length>0)throw new Qs;if(Be(t)&&Be(t)<32)throw new Nh({data:typeof t=="string"?t:De(t),params:e,size:Be(t)});let o=0;const s=[];for(let i=0;i<e.length;++i){const a=e[i];r.setPosition(o);const[c,l]=ao(r,a,{staticPosition:0});o+=l,s.push(c)}return s}function ao(e,t,{staticPosition:n}){const r=uu(t.type);if(r){const[o,s]=r;return tw(e,{...t,type:s},{length:o,staticPosition:n})}if(t.type==="tuple")return sw(e,t,{staticPosition:n});if(t.type==="address")return ew(e);if(t.type==="bool")return nw(e);if(t.type.startsWith("bytes"))return rw(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return ow(e,t);if(t.type==="string")return iw(e,{staticPosition:n});throw new Xb(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const Qd=32,zc=32;function ew(e){const t=e.readBytes(32);return[ha(De(Yh(t,-20))),32]}function tw(e,t,{length:n,staticPosition:r}){if(!n){const i=In(e.readBytes(zc)),a=r+i,c=a+Qd;e.setPosition(a);const l=In(e.readBytes(Qd)),u=fs(t);let f=0;const d=[];for(let h=0;h<l;++h){e.setPosition(c+(u?h*32:f));const[g,m]=ao(e,t,{staticPosition:c});f+=m,d.push(g)}return e.setPosition(r+32),[d,32]}if(fs(t)){const i=In(e.readBytes(zc)),a=r+i,c=[];for(let l=0;l<n;++l){e.setPosition(a+l*32);const[u]=ao(e,t,{staticPosition:a});c.push(u)}return e.setPosition(r+32),[c,32]}let o=0;const s=[];for(let i=0;i<n;++i){const[a,c]=ao(e,t,{staticPosition:r+o});o+=c,s.push(a)}return[s,o]}function nw(e){return[Wy(e.readBytes(32),{size:32}),32]}function rw(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const i=In(e.readBytes(32));e.setPosition(n+i);const a=In(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(a);return e.setPosition(n+32),[De(c),32]}return[De(e.readBytes(Number.parseInt(o,10),32)),32]}function ow(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?$y(o,{signed:n}):In(o,{signed:n}),32]}function sw(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:i})=>!i),o=r?[]:{};let s=0;if(fs(t)){const i=In(e.readBytes(zc)),a=n+i;for(let c=0;c<t.components.length;++c){const l=t.components[c];e.setPosition(a+s);const[u,f]=ao(e,l,{staticPosition:a});s+=f,o[r?c:l==null?void 0:l.name]=u}return e.setPosition(n+32),[o,32]}for(let i=0;i<t.components.length;++i){const a=t.components[i],[c,l]=ao(e,a,{staticPosition:n});o[r?i:a==null?void 0:a.name]=c,s+=l}return[o,s]}function iw(e,{staticPosition:t}){const n=In(e.readBytes(32)),r=t+n;e.setPosition(r);const o=In(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const s=e.readBytes(o,32),i=qy(kn(s));return e.setPosition(t+32),[i,32]}function fs(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(fs);const n=uu(e.type);return!!(n&&fs({...e,type:n[1]}))}const aw=e=>ze($o(e));function cw(e){return aw(e)}const lw="1.2.3";let ft=class Qc extends Error{constructor(t,n={}){var i;const r=n.cause instanceof Qc?n.cause.details:(i=n.cause)!=null&&i.message?n.cause.message:n.details,o=n.cause instanceof Qc&&n.cause.docsPath||n.docsPath,s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${lw}`].join(`
|
|
51
|
+
`);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}};function Tn(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const Zh=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,ep=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,tp=/^\(.+?\).*?$/,Hd=/^tuple(?<array>(\[(\d*)\])*)$/;function Hc(e){let t=e.type;if(Hd.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let o=0;o<n;o++){const s=e.components[o];t+=Hc(s),o<n-1&&(t+=", ")}const r=Tn(Hd,e.type);return t+=`)${(r==null?void 0:r.array)||""}`,Hc({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Zr(e){let t="";const n=e.length;for(let r=0;r<n;r++){const o=e[r];t+=Hc(o),r!==n-1&&(t+=", ")}return t}function Wi(e){var t;return e.type==="function"?`function ${e.name}(${Zr(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${Zr(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Zr(e.inputs)})`:e.type==="error"?`error ${e.name}(${Zr(e.inputs)})`:e.type==="constructor"?`constructor(${Zr(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const np=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function uw(e){return np.test(e)}function dw(e){return Tn(np,e)}const rp=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function fw(e){return rp.test(e)}function hw(e){return Tn(rp,e)}const op=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function pw(e){return op.test(e)}function mw(e){return Tn(op,e)}const sp=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function pa(e){return sp.test(e)}function gw(e){return Tn(sp,e)}const ip=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function bw(e){return ip.test(e)}function yw(e){return Tn(ip,e)}const ap=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function ww(e){return ap.test(e)}function vw(e){return Tn(ap,e)}const xw=/^receive\(\) external payable$/;function Cw(e){return xw.test(e)}const Gd=new Set(["memory","indexed","storage","calldata"]),Aw=new Set(["indexed"]),Gc=new Set(["calldata","memory","storage"]);class Ew extends ft{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class kw extends ft{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class Iw extends ft{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class jw extends ft{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class Bw extends ft{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class Sw extends ft{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class Pw extends ft{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class Ow extends ft{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class Tw extends ft{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class qo extends ft{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class Rw extends ft{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class Nw extends ft{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class Fw extends ft{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class Mw extends ft{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function Dw(e,t,n){let r="";if(n)for(const o of Object.entries(n)){if(!o)continue;let s="";for(const i of o[1])s+=`[${i.type}${i.name?`:${i.name}`:""}]`;r+=`(${o[0]}{${s}})`}return t?`${t}:${e}${r}`:`${e}${r}`}const Ha=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Vc(e,t={}){if(pw(e))return Lw(e,t);if(fw(e))return Uw(e,t);if(uw(e))return _w(e,t);if(bw(e))return $w(e,t);if(ww(e))return Ww(e);if(Cw(e))return{type:"receive",stateMutability:"payable"};throw new Rw({signature:e})}function Lw(e,t={}){const n=mw(e);if(!n)throw new qo({signature:e,type:"function"});const r=bt(n.parameters),o=[],s=r.length;for(let a=0;a<s;a++)o.push(Pn(r[a],{modifiers:Gc,structs:t,type:"function"}));const i=[];if(n.returns){const a=bt(n.returns),c=a.length;for(let l=0;l<c;l++)i.push(Pn(a[l],{modifiers:Gc,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:o,outputs:i}}function Uw(e,t={}){const n=hw(e);if(!n)throw new qo({signature:e,type:"event"});const r=bt(n.parameters),o=[],s=r.length;for(let i=0;i<s;i++)o.push(Pn(r[i],{modifiers:Aw,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:o}}function _w(e,t={}){const n=dw(e);if(!n)throw new qo({signature:e,type:"error"});const r=bt(n.parameters),o=[],s=r.length;for(let i=0;i<s;i++)o.push(Pn(r[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:o}}function $w(e,t={}){const n=yw(e);if(!n)throw new qo({signature:e,type:"constructor"});const r=bt(n.parameters),o=[],s=r.length;for(let i=0;i<s;i++)o.push(Pn(r[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:o}}function Ww(e){const t=vw(e);if(!t)throw new qo({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const qw=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,zw=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Qw=/^u?int$/;function Pn(e,t){var f,d;const n=Dw(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(Ha.has(n))return Ha.get(n);const r=tp.test(e),o=Tn(r?zw:qw,e);if(!o)throw new Bw({param:e});if(o.name&&Gw(o.name))throw new Sw({param:e,name:o.name});const s=o.name?{name:o.name}:{},i=o.modifier==="indexed"?{indexed:!0}:{},a=(t==null?void 0:t.structs)??{};let c,l={};if(r){c="tuple";const h=bt(o.type),g=[],m=h.length;for(let b=0;b<m;b++)g.push(Pn(h[b],{structs:a}));l={components:g}}else if(o.type in a)c="tuple",l={components:a[o.type]};else if(Qw.test(o.type))c=`${o.type}256`;else if(o.type==="address payable")c="address";else if(c=o.type,(t==null?void 0:t.type)!=="struct"&&!cp(c))throw new Iw({type:c});if(o.modifier){if(!((d=(f=t==null?void 0:t.modifiers)==null?void 0:f.has)!=null&&d.call(f,o.modifier)))throw new Pw({param:e,type:t==null?void 0:t.type,modifier:o.modifier});if(Gc.has(o.modifier)&&!Vw(c,!!o.array))throw new Ow({param:e,type:t==null?void 0:t.type,modifier:o.modifier})}const u={type:`${c}${o.array??""}`,...s,...i,...l};return Ha.set(n,u),u}function bt(e,t=[],n="",r=0){const o=e.trim().length;for(let s=0;s<o;s++){const i=e[s],a=e.slice(s+1);switch(i){case",":return r===0?bt(a,[...t,n.trim()]):bt(a,t,`${n}${i}`,r);case"(":return bt(a,t,`${n}${i}`,r+1);case")":return bt(a,t,`${n}${i}`,r-1);default:return bt(a,t,`${n}${i}`,r)}}if(n==="")return t;if(r!==0)throw new Mw({current:n,depth:r});return t.push(n.trim()),t}function cp(e){return e==="address"||e==="bool"||e==="function"||e==="string"||Zh.test(e)||ep.test(e)}const Hw=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function Gw(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||Zh.test(e)||ep.test(e)||Hw.test(e)}function Vw(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function du(e){const t={},n=e.length;for(let i=0;i<n;i++){const a=e[i];if(!pa(a))continue;const c=gw(a);if(!c)throw new qo({signature:a,type:"struct"});const l=c.properties.split(";"),u=[],f=l.length;for(let d=0;d<f;d++){const g=l[d].trim();if(!g)continue;const m=Pn(g,{type:"struct"});u.push(m)}if(!u.length)throw new Nw({signature:a});t[c.name]=u}const r={},o=Object.entries(t),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];r[a]=lp(c,t)}return r}const Kw=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function lp(e=[],t={},n=new Set){const r=[],o=e.length;for(let s=0;s<o;s++){const i=e[s];if(tp.test(i.type))r.push(i);else{const c=Tn(Kw,i.type);if(!(c!=null&&c.type))throw new Tw({abiParameter:i});const{array:l,type:u}=c;if(u in t){if(n.has(u))throw new Fw({type:u});r.push({...i,type:`tuple${l??""}`,components:lp(t[u],t,new Set([...n,u]))})}else if(cp(u))r.push(i);else throw new kw({type:u})}}return r}function up(e){const t=du(e),n=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];pa(s)||n.push(Vc(s,t))}return n}function Vd(e){let t;if(typeof e=="string")t=Vc(e);else{const n=du(e),r=e.length;for(let o=0;o<r;o++){const s=e[o];if(!pa(s)){t=Vc(s,n);break}}}if(!t)throw new Ew({signature:e});return t}function Kd(e){const t=[];if(typeof e=="string"){const n=bt(e),r=n.length;for(let o=0;o<r;o++)t.push(Pn(n[o],{modifiers:Gd}))}else{const n=du(e),r=e.length;for(let o=0;o<r;o++){const s=e[o];if(pa(s))continue;const i=bt(s),a=i.length;for(let c=0;c<a;c++)t.push(Pn(i[c],{modifiers:Gd,structs:n}))}}if(t.length===0)throw new jw({params:e});return t}function Jw(e){let t=!0,n="",r=0,o="",s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function",""].includes(o))o="";else if(o+=a,a===")"){s=!0;break}continue}if(a===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=a,n+=a}}if(!s)throw new L("Unable to normalize signature.");return o}const Yw=e=>{const t=typeof e=="string"?e:Wi(e);return Jw(t)};function dp(e){return cw(Yw(e))}const ma=dp,Vs=e=>To(dp(e),0,4);function $r(e){const{abi:t,args:n=[],name:r}=e,o=zt(r,{strict:!1}),s=t.filter(a=>o?a.type==="function"?Vs(a)===r:a.type==="event"?ma(a)===r:!1:"name"in a&&a.name===r);if(s.length===0)return;if(s.length===1)return s[0];let i;for(const a of s){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((l,u)=>{const f="inputs"in a&&a.inputs[u];return f?Kc(l,f):!1})){if(i&&"inputs"in i&&i.inputs){const l=fp(a.inputs,i.inputs,n);if(l)throw new Kb({abiItem:a,type:l[0]},{abiItem:i,type:l[1]})}i=a}}return i||s[0]}function Kc(e,t){const n=typeof e,r=t.type;switch(r){case"address":return wt(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,s)=>n==="object"&&Kc(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>Kc(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function fp(e,t,n){for(const r in e){const o=e[r],s=t[r];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return fp(o.components,s.components,n[r]);const i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?wt(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?wt(n[r],{strict:!1}):!1)return i}}const Ga="/docs/contract/decodeFunctionResult";function er(e){const{abi:t,args:n,functionName:r,data:o}=e;let s=t[0];if(r){const a=$r({abi:t,args:n,name:r});if(!a)throw new Bo(r,{docsPath:Ga});s=a}if(s.type!=="function")throw new Bo(void 0,{docsPath:Ga});if(!s.outputs)throw new Mh(s.name,{docsPath:Ga});const i=Gs(s.outputs,o);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const Jd="/docs/contract/encodeFunctionData";function Xw(e){const{abi:t,args:n,functionName:r}=e;let o=t[0];if(r){const s=$r({abi:t,args:n,name:r});if(!s)throw new Bo(r,{docsPath:Jd});o=s}if(o.type!=="function")throw new Bo(void 0,{docsPath:Jd});return{abi:[o],functionName:Vs(qt(o))}}function Ct(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:Xw(e)})(),o=n[0],s=r,i="inputs"in o&&o.inputs?Zn(o.inputs,t??[]):void 0;return Wo([s,i??"0x"])}class Jc extends L{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class Zw extends L{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class e6 extends L{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
52
|
+
`),{name:"ChainNotFoundError"})}}class hp extends L{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}function zo({blockNumber:e,chain:t,contract:n}){var o;const r=(o=t==null?void 0:t.contracts)==null?void 0:o[n];if(!r)throw new Jc({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new Jc({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function Qe(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const t6={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},pp={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},n6={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function mp(e){const{abi:t,data:n}=e,r=To(n,0,4);if(r==="0x")throw new Qs;const s=[...t||[],pp,n6].find(i=>i.type==="error"&&r===Vs(qt(i)));if(!s)throw new Fh(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Gs(s.inputs,To(n,4)):void 0,errorName:s.name}}const _e=(e,t,n)=>JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString():o,n);function gp({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((o,s)=>`${r&&o.name?`${o.name}: `:""}${typeof t[s]=="object"?_e(t[s]):t[s]}`).join(", ")})`}const r6={gwei:9,wei:18},o6={ether:-9,wei:9},s6={ether:-18,gwei:-9};function Ks(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,s]=[n.slice(0,n.length-t),n.slice(n.length-t)];return s=s.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${s?`.${s}`:""}`}function fu(e,t="wei"){return Ks(e,r6[t])}function dt(e,t="wei"){return Ks(e,o6[t])}class i6 extends L{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class a6 extends L{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function Yd(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r}
|
|
53
|
+
`,"")}function c6(e){return e.reduce((t,{address:n,...r})=>{let o=`${t} ${n}:
|
|
54
54
|
`;return r.nonce&&(o+=` nonce: ${r.nonce}
|
|
55
55
|
`),r.balance&&(o+=` balance: ${r.balance}
|
|
56
56
|
`),r.code&&(o+=` code: ${r.code}
|
|
@@ -58,20 +58,20 @@ React keys must be passed directly to JSX without using spread:
|
|
|
58
58
|
`,o+=Yd(r.state)),r.stateDiff&&(o+=` stateDiff:
|
|
59
59
|
`,o+=Yd(r.stateDiff)),o},` State Override:
|
|
60
60
|
`).slice(0,-1)}function Js(e){const t=Object.entries(e).map(([r,o])=>o===void 0||o===!1?null:[r,o]).filter(Boolean),n=t.reduce((r,[o])=>Math.max(r,o.length),0);return t.map(([r,o])=>` ${`${r}:`.padEnd(n+1)} ${o}`).join(`
|
|
61
|
-
`)}class
|
|
62
|
-
${
|
|
63
|
-
`):`The contract function "${r}" reverted.`,{cause:s,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=i,this.raw=n,this.reason=c,this.signature=l}}class
|
|
61
|
+
`)}class l6 extends L{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Js(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class u6 extends L{constructor(t,{account:n,docsPath:r,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){var g;const h=Js({chain:o&&`${o==null?void 0:o.name} (id: ${o==null?void 0:o.id})`,from:n==null?void 0:n.address,to:f,value:typeof d<"u"&&`${fu(d)} ${((g=o==null?void 0:o.nativeCurrency)==null?void 0:g.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${dt(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${dt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${dt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class bp extends L{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:o,index:s}){let i="Transaction";r&&s!==void 0&&(i=`Transaction at block time "${r}" at index "${s}"`),t&&s!==void 0&&(i=`Transaction at block hash "${t}" at index "${s}"`),n&&s!==void 0&&(i=`Transaction at block number "${n}" at index "${s}"`),o&&(i=`Transaction with hash "${o}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}}class yp extends L{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class d6 extends L{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class f6 extends L{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const h6=e=>e,ga=e=>e;class wp extends L{constructor(t,{account:n,docsPath:r,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d,stateOverride:h}){var b;const g=n?Qe(n):void 0;let m=Js({from:g==null?void 0:g.address,to:f,value:typeof d<"u"&&`${fu(d)} ${((b=o==null?void 0:o.nativeCurrency)==null?void 0:b.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${dt(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${dt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${dt(l)} gwei`,nonce:u});h&&(m+=`
|
|
62
|
+
${c6(h)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",m].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class hu extends L{constructor(t,{abi:n,args:r,contractAddress:o,docsPath:s,functionName:i,sender:a}){const c=$r({abi:n,args:r,name:i}),l=c?gp({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,u=c?qt(c,{includeName:!0}):void 0,f=Js({address:o&&h6(o),function:u,args:l&&l!=="()"&&`${[...Array((i==null?void 0:i.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:t,docsPath:s,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],f&&"Contract Call:",f].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=o,this.functionName=i,this.sender=a}}class Yc extends L{constructor({abi:t,data:n,functionName:r,message:o}){let s,i,a,c;if(n&&n!=="0x")try{i=mp({abi:t,data:n});const{abiItem:u,errorName:f,args:d}=i;if(f==="Error")c=d[0];else if(f==="Panic"){const[h]=d;c=t6[h]}else{const h=u?qt(u,{includeName:!0}):void 0,g=u&&d?gp({abiItem:u,args:d,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",g&&g!=="()"?` ${[...Array((f==null?void 0:f.length)??0).keys()].map(()=>" ").join("")}${g}`:""]}}catch(u){s=u}else o&&(c=o);let l;s instanceof Fh&&(l=s.signature,a=[`Unable to decode signature "${l}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${r}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(`
|
|
63
|
+
`):`The contract function "${r}" reverted.`,{cause:s,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=i,this.raw=n,this.reason=c,this.signature=l}}class p6 extends L{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class m6 extends L{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class ba extends L{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}function pu(e){var n,r,o,s,i,a;if(!(e instanceof L))return!1;const t=e.walk(c=>c instanceof Yc);return t instanceof Yc?((n=t.data)==null?void 0:n.errorName)==="HttpError"||((r=t.data)==null?void 0:r.errorName)==="ResolverError"||((o=t.data)==null?void 0:o.errorName)==="ResolverNotContract"||((s=t.data)==null?void 0:s.errorName)==="ResolverNotFound"||((i=t.data)==null?void 0:i.errorName)==="ReverseAddressMismatch"||((a=t.data)==null?void 0:a.errorName)==="UnsupportedResolverProfile":!1}function g6(e){const{abi:t,data:n}=e,r=To(n,0,4),o=t.find(s=>s.type==="function"&&r===Vs(qt(s)));if(!o)throw new Vb(r,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?Gs(o.inputs,To(n,4)):void 0}}const Va="/docs/contract/encodeErrorResult";function Xd(e){const{abi:t,errorName:n,args:r}=e;let o=t[0];if(n){const c=$r({abi:t,args:r,name:n});if(!c)throw new Md(n,{docsPath:Va});o=c}if(o.type!=="error")throw new Md(void 0,{docsPath:Va});const s=qt(o),i=Vs(s);let a="0x";if(r&&r.length>0){if(!o.inputs)throw new Qb(o.name,{docsPath:Va});a=Zn(o.inputs,r)}return Wo([i,a])}const Ka="/docs/contract/encodeFunctionResult";function b6(e){const{abi:t,functionName:n,result:r}=e;let o=t[0];if(n){const i=$r({abi:t,name:n});if(!i)throw new Bo(n,{docsPath:Ka});o=i}if(o.type!=="function")throw new Bo(void 0,{docsPath:Ka});if(!o.outputs)throw new Mh(o.name,{docsPath:Ka});const s=(()=>{if(o.outputs.length===0)return[];if(o.outputs.length===1)return[r];if(Array.isArray(r))return r;throw new Dh(r)})();return Zn(o.outputs,s)}const Ys="x-batch-gateway:true";async function vp(e){const{data:t,ccipRequest:n}=e,{args:[r]}=g6({abi:Wc,data:t}),o=[],s=[];return await Promise.all(r.map(async(i,a)=>{try{s[a]=i.urls.includes(Ys)?await vp({data:i.data,ccipRequest:n}):await n(i),o[a]=!1}catch(c){o[a]=!0,s[a]=y6(c)}})),b6({abi:Wc,functionName:"query",result:[o,s]})}function y6(e){return e.name==="HttpRequestError"&&e.status?Xd({abi:Wc,errorName:"HttpError",args:[e.status,e.shortMessage]}):Xd({abi:[pp],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function xp(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return zt(t)?t:null}function Xc(e){let t=new Uint8Array(32).fill(0);if(!e)return De(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const o=xp(n[r]),s=o?$o(o):ze(Sr(n[r]),"bytes");t=ze(vt([t,s]),"bytes")}return De(t)}function w6(e){return`[${e.slice(2)}]`}function v6(e){const t=new Uint8Array(32).fill(0);return e?xp(e)||ze(Sr(e)):De(t)}function mu(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(Sr(t).byteLength+2);let r=0;const o=t.split(".");for(let s=0;s<o.length;s++){let i=Sr(o[s]);i.byteLength>255&&(i=Sr(w6(v6(o[s])))),n[r]=i.length,n.set(i,r+1),r+=i.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}function te(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const o=e[n];return typeof o=="function"?o:s=>t(e,s)}class co extends L{constructor({body:t,cause:n,details:r,headers:o,status:s,url:i}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${ga(i)}`,t&&`Request body: ${_e(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=o,this.status=s,this.url=i}}class gu extends L{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${ga(r)}`,`Request body: ${_e(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data,this.url=r}}class Zd extends L{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${ga(n)}`,`Request body: ${_e(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=n}}const x6=-1;class ht extends L{constructor(t,{code:n,docsPath:r,metaMessages:o,name:s,shortMessage:i}){super(i,{cause:t,docsPath:r,metaMessages:o||(t==null?void 0:t.metaMessages),name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||t.name,this.code=t instanceof gu?t.code:n??x6}}class pt extends ht{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class hs extends ht{constructor(t){super(t,{code:hs.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(hs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class ps extends ht{constructor(t){super(t,{code:ps.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(ps,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class ms extends ht{constructor(t,{method:n}={}){super(t,{code:ms.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(ms,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class gs extends ht{constructor(t){super(t,{code:gs.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
64
64
|
`)})}}Object.defineProperty(gs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Tr extends ht{constructor(t){super(t,{code:Tr.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Tr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Yn extends ht{constructor(t){super(t,{code:Yn.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
65
|
-
`)})}}Object.defineProperty(Yn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class bs extends ht{constructor(t){super(t,{code:bs.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(bs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class on extends ht{constructor(t){super(t,{code:on.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(on,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Ro extends ht{constructor(t){super(t,{code:Ro.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Ro,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class pr extends ht{constructor(t,{method:n}={}){super(t,{code:pr.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(pr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class No extends ht{constructor(t){super(t,{code:No.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(No,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class ys extends ht{constructor(t){super(t,{code:ys.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(ys,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Ee extends pt{constructor(t){super(t,{code:Ee.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Ee,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class ws extends pt{constructor(t){super(t,{code:ws.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(ws,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class vs extends pt{constructor(t,{method:n}={}){super(t,{code:vs.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(vs,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class xs extends pt{constructor(t){super(t,{code:xs.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(xs,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Cs extends pt{constructor(t){super(t,{code:Cs.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Cs,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class
|
|
66
|
-
`);super(l,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=n.cause,this.details=r,this.docs=i,this.docsOrigin=s,this.docsPath=o,this.shortMessage=t,this.showVersion=a,this.version=c}walk(t){return xp(this,t)}};Object.defineProperty(le,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${A6()}`}});le.setStaticOptions(le.defaultStaticOptions);function xp(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?xp(e.cause,t):t?null:e}function Xs(e,t){if(to(e)>t)throw new _6({givenSize:to(e),maxSize:t})}const hn={zero:48,nine:57,A:65,F:70,a:97,f:102};function ef(e){if(e>=hn.zero&&e<=hn.nine)return e-hn.zero;if(e>=hn.A&&e<=hn.F)return e-(hn.A-10);if(e>=hn.a&&e<=hn.f)return e-(hn.a-10)}function E6(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new $6({size:e.length,targetSize:r,type:"Bytes"});const o=new Uint8Array(r);for(let s=0;s<r;s++){const i=n==="right";o[i?s:r-s-1]=e[i?s:e.length-s-1]}return o}function Cp(e,t={}){const{dir:n="left"}=t;let r=e,o=0;for(let s=0;s<r.length-1&&r[n==="left"?s:r.length-s-1].toString()==="0";s++)o++;return r=n==="left"?r.slice(o):r.slice(0,r.length-o),r}function ya(e,t){if(xt(e)>t)throw new V6({givenSize:xt(e),maxSize:t})}function k6(e,t){if(typeof t=="number"&&t>0&&t>xt(e)-1)throw new Op({offset:t,position:"start",size:xt(e)})}function I6(e,t,n){if(typeof t=="number"&&typeof n=="number"&&xt(e)!==n-t)throw new Op({offset:n,position:"end",size:xt(e)})}function Ap(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const o=e.replace("0x","");if(o.length>r*2)throw new G6({size:Math.ceil(o.length/2),targetSize:r,type:"Hex"});return`0x${o[n==="right"?"padEnd":"padStart"](r*2,"0")}`}const j6="#__bigint";function Ep(e,t,n){return JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString()+j6:o,n)}const B6=new TextDecoder,S6=new TextEncoder;function P6(e){return e instanceof Uint8Array?e:typeof e=="string"?kp(e):O6(e)}function O6(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function kp(e,t={}){const{size:n}=t;let r=e;n&&(ya(e,n),r=Fr(e,n));let o=r.slice(2);o.length%2&&(o=`0${o}`);const s=o.length/2,i=new Uint8Array(s);for(let a=0,c=0;a<s;a++){const l=ef(o.charCodeAt(c++)),u=ef(o.charCodeAt(c++));if(l===void 0||u===void 0)throw new le(`Invalid byte sequence ("${o[c-2]}${o[c-1]}" in "${o}").`);i[a]=l<<4|u}return i}function T6(e,t={}){const{size:n}=t,r=S6.encode(e);return typeof n=="number"?(Xs(r,n),R6(r,n)):r}function R6(e,t){return E6(e,{dir:"right",size:t})}function to(e){return e.length}function N6(e,t,n,r={}){const{strict:o}=r;return e.slice(t,n)}function F6(e,t={}){const{size:n}=t;typeof n<"u"&&Xs(e,n);const r=Vt(e,t);return Bp(r,t)}function M6(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Xs(r,n),r=Ip(r)),r.length>1||r[0]>1)throw new U6(r);return!!r[0]}function jn(e,t={}){const{size:n}=t;typeof n<"u"&&Xs(e,n);const r=Vt(e,t);return Sp(r,t)}function D6(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Xs(r,n),r=L6(r)),B6.decode(r)}function Ip(e){return Cp(e,{dir:"left"})}function L6(e){return Cp(e,{dir:"right"})}class U6 extends le{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}let _6=class extends le{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},$6=class extends le{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const q6=new TextEncoder,W6=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function z6(e,t={}){const{strict:n=!1}=t;if(!e)throw new tf(e);if(typeof e!="string")throw new tf(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new nf(e);if(!e.startsWith("0x"))throw new nf(e)}function Ht(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Q6(e){return e instanceof Uint8Array?Vt(e):Array.isArray(e)?Vt(new Uint8Array(e)):e}function jp(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ya(n,t.size),Nr(n,t.size)):n}function Vt(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=W6[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(ya(r,t.size),Fr(r,t.size)):r}function Ze(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&n?-s-1n:0;if(s&&o>s||o<i){const l=typeof e=="bigint"?"n":"";throw new Pp({max:s?`${s}${l}`:void 0,min:`${i}${l}`,signed:n,size:r,value:`${e}${l}`})}const c=`0x${(n&&o<0?BigInt.asUintN(r*8,BigInt(o)):o).toString(16)}`;return r?Nr(c,r):c}function bu(e,t={}){return Vt(q6.encode(e),t)}function Nr(e,t){return Ap(e,{dir:"left",size:t})}function Fr(e,t){return Ap(e,{dir:"right",size:t})}function sn(e,t,n,r={}){const{strict:o}=r;k6(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&I6(s,t,n),s}function xt(e){return Math.ceil((e.length-2)/2)}function Bp(e,t={}){const{signed:n}=t;t.size&&ya(e,t.size);const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,s=(1n<<BigInt(o)*8n)-1n,i=s>>1n;return r<=i?r:r-s-1n}function Sp(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:Bp(e,t))}function H6(e,t={}){const{strict:n=!1}=t;try{return z6(e,{strict:n}),!0}catch{return!1}}class Pp extends le{constructor({max:t,min:n,signed:r,size:o,value:s}){super(`Number \`${s}\` is not in safe${o?` ${o*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class tf extends le{constructor(t){super(`Value \`${typeof t=="object"?Ep(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class nf extends le{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class V6 extends le{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class Op extends le{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class G6 extends le{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function K6(e){return{address:e.address,amount:Ze(e.amount),index:Ze(e.index),validatorIndex:Ze(e.validatorIndex)}}function Tp(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Ze(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Ze(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Ze(e.gasLimit)},...typeof e.number=="bigint"&&{number:Ze(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Ze(e.prevRandao)},...typeof e.time=="bigint"&&{time:Ze(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(K6)}}}const J6="0x82ad56cb",Rp="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Y6="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",X6="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",yu="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",Ja="/docs/contract/encodeDeployData";function wu(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const o=t.find(i=>"type"in i&&i.type==="constructor");if(!o)throw new Ub({docsPath:Ja});if(!("inputs"in o))throw new Fd({docsPath:Ja});if(!o.inputs||o.inputs.length===0)throw new Fd({docsPath:Ja});const s=Zn(o.inputs,n);return qo([r,s])}class mr extends L{constructor({cause:t,message:n}={}){var o;const r=(o=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:o.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(mr,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(mr,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class Wi extends L{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${dt(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(Wi,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class Zc extends L{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${dt(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Zc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class el extends L{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(el,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class tl extends L{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
65
|
+
`)})}}Object.defineProperty(Yn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class bs extends ht{constructor(t){super(t,{code:bs.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(bs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class on extends ht{constructor(t){super(t,{code:on.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(on,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Ro extends ht{constructor(t){super(t,{code:Ro.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Ro,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class pr extends ht{constructor(t,{method:n}={}){super(t,{code:pr.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(pr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class No extends ht{constructor(t){super(t,{code:No.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(No,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class ys extends ht{constructor(t){super(t,{code:ys.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(ys,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Ee extends pt{constructor(t){super(t,{code:Ee.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Ee,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class ws extends pt{constructor(t){super(t,{code:ws.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(ws,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class vs extends pt{constructor(t,{method:n}={}){super(t,{code:vs.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(vs,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class xs extends pt{constructor(t){super(t,{code:xs.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(xs,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Cs extends pt{constructor(t){super(t,{code:Cs.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Cs,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Wt extends pt{constructor(t){super(t,{code:Wt.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Wt,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class As extends pt{constructor(t){super(t,{code:As.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(As,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class Es extends pt{constructor(t){super(t,{code:Es.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(Es,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class ks extends pt{constructor(t){super(t,{code:ks.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(ks,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class Is extends pt{constructor(t){super(t,{code:Is.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(Is,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class js extends pt{constructor(t){super(t,{code:js.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(js,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Bs extends pt{constructor(t){super(t,{code:Bs.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Bs,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Ss extends pt{constructor(t){super(t,{code:Ss.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Ss,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class Fo extends pt{constructor(t){super(t,{code:Fo.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(Fo,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class C6 extends ht{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const A6=3;function Rr(e,{abi:t,address:n,args:r,docsPath:o,functionName:s,sender:i}){const a=e instanceof ba?e:e instanceof L?e.walk(g=>"data"in g)||e.walk():{},{code:c,data:l,details:u,message:f,shortMessage:d}=a,h=e instanceof Qs?new p6({functionName:s}):[A6,Tr.code].includes(c)&&(l||u||f||d)||c===Yn.code&&u==="execution reverted"&&l?new Yc({abi:t,data:typeof l=="object"?l.data:l,functionName:s,message:a instanceof gu?u:d??f}):e;return new hu(h,{abi:t,args:r,contractAddress:n,docsPath:o,functionName:s,sender:i})}const E6="0.1.1";function k6(){return E6}let le=class mn extends Error{static setStaticOptions(t){mn.prototype.docsOrigin=t.docsOrigin,mn.prototype.showVersion=t.showVersion,mn.prototype.version=t.version}constructor(t,n={}){const r=(()=>{var u;if(n.cause instanceof mn){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(u=n.cause)!=null&&u.message?n.cause.message:n.details})(),o=n.cause instanceof mn&&n.cause.docsPath||n.docsPath,s=n.docsOrigin??mn.prototype.docsOrigin,i=`${s}${o??""}`,a=!!(n.version??mn.prototype.showVersion),c=n.version??mn.prototype.version,l=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||o||a?["",r?`Details: ${r}`:void 0,o?`See: ${i}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(u=>typeof u=="string").join(`
|
|
66
|
+
`);super(l,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=n.cause,this.details=r,this.docs=i,this.docsOrigin=s,this.docsPath=o,this.shortMessage=t,this.showVersion=a,this.version=c}walk(t){return Cp(this,t)}};Object.defineProperty(le,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${k6()}`}});le.setStaticOptions(le.defaultStaticOptions);function Cp(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Cp(e.cause,t):t?null:e}function Xs(e,t){if(to(e)>t)throw new W6({givenSize:to(e),maxSize:t})}const hn={zero:48,nine:57,A:65,F:70,a:97,f:102};function ef(e){if(e>=hn.zero&&e<=hn.nine)return e-hn.zero;if(e>=hn.A&&e<=hn.F)return e-(hn.A-10);if(e>=hn.a&&e<=hn.f)return e-(hn.a-10)}function I6(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new q6({size:e.length,targetSize:r,type:"Bytes"});const o=new Uint8Array(r);for(let s=0;s<r;s++){const i=n==="right";o[i?s:r-s-1]=e[i?s:e.length-s-1]}return o}function Ap(e,t={}){const{dir:n="left"}=t;let r=e,o=0;for(let s=0;s<r.length-1&&r[n==="left"?s:r.length-s-1].toString()==="0";s++)o++;return r=n==="left"?r.slice(o):r.slice(0,r.length-o),r}function ya(e,t){if(xt(e)>t)throw new K6({givenSize:xt(e),maxSize:t})}function j6(e,t){if(typeof t=="number"&&t>0&&t>xt(e)-1)throw new Tp({offset:t,position:"start",size:xt(e)})}function B6(e,t,n){if(typeof t=="number"&&typeof n=="number"&&xt(e)!==n-t)throw new Tp({offset:n,position:"end",size:xt(e)})}function Ep(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const o=e.replace("0x","");if(o.length>r*2)throw new J6({size:Math.ceil(o.length/2),targetSize:r,type:"Hex"});return`0x${o[n==="right"?"padEnd":"padStart"](r*2,"0")}`}const S6="#__bigint";function kp(e,t,n){return JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString()+S6:o,n)}const P6=new TextDecoder,O6=new TextEncoder;function T6(e){return e instanceof Uint8Array?e:typeof e=="string"?Ip(e):R6(e)}function R6(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Ip(e,t={}){const{size:n}=t;let r=e;n&&(ya(e,n),r=Fr(e,n));let o=r.slice(2);o.length%2&&(o=`0${o}`);const s=o.length/2,i=new Uint8Array(s);for(let a=0,c=0;a<s;a++){const l=ef(o.charCodeAt(c++)),u=ef(o.charCodeAt(c++));if(l===void 0||u===void 0)throw new le(`Invalid byte sequence ("${o[c-2]}${o[c-1]}" in "${o}").`);i[a]=l<<4|u}return i}function N6(e,t={}){const{size:n}=t,r=O6.encode(e);return typeof n=="number"?(Xs(r,n),F6(r,n)):r}function F6(e,t){return I6(e,{dir:"right",size:t})}function to(e){return e.length}function M6(e,t,n,r={}){const{strict:o}=r;return e.slice(t,n)}function D6(e,t={}){const{size:n}=t;typeof n<"u"&&Xs(e,n);const r=Gt(e,t);return Sp(r,t)}function L6(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Xs(r,n),r=jp(r)),r.length>1||r[0]>1)throw new $6(r);return!!r[0]}function jn(e,t={}){const{size:n}=t;typeof n<"u"&&Xs(e,n);const r=Gt(e,t);return Pp(r,t)}function U6(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Xs(r,n),r=_6(r)),P6.decode(r)}function jp(e){return Ap(e,{dir:"left"})}function _6(e){return Ap(e,{dir:"right"})}class $6 extends le{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}let W6=class extends le{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},q6=class extends le{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const z6=new TextEncoder,Q6=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function H6(e,t={}){const{strict:n=!1}=t;if(!e)throw new tf(e);if(typeof e!="string")throw new tf(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new nf(e);if(!e.startsWith("0x"))throw new nf(e)}function Ht(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function G6(e){return e instanceof Uint8Array?Gt(e):Array.isArray(e)?Gt(new Uint8Array(e)):e}function Bp(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ya(n,t.size),Nr(n,t.size)):n}function Gt(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=Q6[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(ya(r,t.size),Fr(r,t.size)):r}function Ze(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&n?-s-1n:0;if(s&&o>s||o<i){const l=typeof e=="bigint"?"n":"";throw new Op({max:s?`${s}${l}`:void 0,min:`${i}${l}`,signed:n,size:r,value:`${e}${l}`})}const c=`0x${(n&&o<0?BigInt.asUintN(r*8,BigInt(o)):o).toString(16)}`;return r?Nr(c,r):c}function bu(e,t={}){return Gt(z6.encode(e),t)}function Nr(e,t){return Ep(e,{dir:"left",size:t})}function Fr(e,t){return Ep(e,{dir:"right",size:t})}function sn(e,t,n,r={}){const{strict:o}=r;j6(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&B6(s,t,n),s}function xt(e){return Math.ceil((e.length-2)/2)}function Sp(e,t={}){const{signed:n}=t;t.size&&ya(e,t.size);const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,s=(1n<<BigInt(o)*8n)-1n,i=s>>1n;return r<=i?r:r-s-1n}function Pp(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:Sp(e,t))}function V6(e,t={}){const{strict:n=!1}=t;try{return H6(e,{strict:n}),!0}catch{return!1}}class Op extends le{constructor({max:t,min:n,signed:r,size:o,value:s}){super(`Number \`${s}\` is not in safe${o?` ${o*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class tf extends le{constructor(t){super(`Value \`${typeof t=="object"?kp(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class nf extends le{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class K6 extends le{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class Tp extends le{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class J6 extends le{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function Y6(e){return{address:e.address,amount:Ze(e.amount),index:Ze(e.index),validatorIndex:Ze(e.validatorIndex)}}function Rp(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Ze(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Ze(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Ze(e.gasLimit)},...typeof e.number=="bigint"&&{number:Ze(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Ze(e.prevRandao)},...typeof e.time=="bigint"&&{time:Ze(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Y6)}}}const X6="0x82ad56cb",Np="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Z6="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",ev="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",yu="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",Ja="/docs/contract/encodeDeployData";function wu(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const o=t.find(i=>"type"in i&&i.type==="constructor");if(!o)throw new $b({docsPath:Ja});if(!("inputs"in o))throw new Fd({docsPath:Ja});if(!o.inputs||o.inputs.length===0)throw new Fd({docsPath:Ja});const s=Zn(o.inputs,n);return Wo([r,s])}class mr extends L{constructor({cause:t,message:n}={}){var o;const r=(o=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:o.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(mr,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(mr,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class qi extends L{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${dt(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(qi,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class Zc extends L{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${dt(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Zc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class el extends L{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(el,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class tl extends L{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
67
67
|
`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(tl,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class nl extends L{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(nl,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class rl extends L{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
68
68
|
`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(rl,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class ol extends L{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(ol,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class sl extends L{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(sl,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class il extends L{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(il,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class zi extends L{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${dt(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${dt(r)} gwei`:""}).`].join(`
|
|
69
|
-
`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(zi,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Zs extends L{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function wa(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof L?e.walk(o=>(o==null?void 0:o.code)===mr.code):e;return r instanceof L?new mr({cause:e,message:r.details}):mr.nodeMessage.test(n)?new mr({cause:e,message:e.details}):Wi.nodeMessage.test(n)?new Wi({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Zc.nodeMessage.test(n)?new Zc({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):el.nodeMessage.test(n)?new el({cause:e,nonce:t==null?void 0:t.nonce}):tl.nodeMessage.test(n)?new tl({cause:e,nonce:t==null?void 0:t.nonce}):nl.nodeMessage.test(n)?new nl({cause:e,nonce:t==null?void 0:t.nonce}):rl.nodeMessage.test(n)?new rl({cause:e}):ol.nodeMessage.test(n)?new ol({cause:e,gas:t==null?void 0:t.gas}):sl.nodeMessage.test(n)?new sl({cause:e,gas:t==null?void 0:t.gas}):il.nodeMessage.test(n)?new il({cause:e}):zi.nodeMessage.test(n)?new zi({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new Zs({cause:e})}function Np(e,{docsPath:t,...n}){const r=(()=>{const o=wa(e,n);return o instanceof Zs?e:o})();return new yp(r,{docsPath:t,...n})}function ei(e,{format:t}){if(!t)return{};const n={};function r(s){const i=Object.keys(s);for(const a of i)a in e&&(n[a]=e[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&r(s[a])}const o=t(e||{});return r(o),n}const Z6={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Qo(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=ev(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>De(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=ee(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=ee(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=ee(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=ee(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=ee(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=ee(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=Z6[e.type]),typeof e.value<"u"&&(n.value=ee(e.value)),n}function ev(e){return e.map(t=>({address:t.address,r:t.r?ee(BigInt(t.r)):t.r,s:t.s?ee(BigInt(t.s)):t.s,chainId:ee(t.chainId),nonce:ee(t.nonce),...typeof t.yParity<"u"?{yParity:ee(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:ee(t.v)}:{}}))}function Fp(){let e=()=>{},t=()=>{};return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}const Ya=new Map;function Mp({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){const s=async()=>{const u=c();i();const f=u.map(({args:d})=>d);f.length!==0&&e(f).then(d=>{o&&Array.isArray(d)&&d.sort(o);for(let h=0;h<u.length;h++){const{resolve:g}=u[h];g==null||g([d[h],d])}}).catch(d=>{for(let h=0;h<u.length;h++){const{reject:g}=u[h];g==null||g(d)}})},i=()=>Ya.delete(t),a=()=>c().map(({args:u})=>u),c=()=>Ya.get(t)||[],l=u=>Ya.set(t,[...c(),u]);return{flush:i,async schedule(u){const{promise:f,resolve:d,reject:h}=Fp();return(n==null?void 0:n([...a(),u]))&&s(),c().length>0?(l({args:u,resolve:d,reject:h}),f):(l({args:u,resolve:d,reject:h}),setTimeout(s,r),f)}}}function rf(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Ld({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Ld({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function tv(e){const{balance:t,nonce:n,state:r,stateDiff:o,code:s}=e,i={};if(s!==void 0&&(i.code=s),t!==void 0&&(i.balance=ee(t)),n!==void 0&&(i.nonce=ee(n)),r!==void 0&&(i.state=rf(r)),o!==void 0){if(i.state)throw new s6;i.stateDiff=rf(o)}return i}function vu(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!wt(n,{strict:!1}))throw new Jn({address:n});if(t[n])throw new o6({address:n});t[n]=tv(r)}return t}const nv=2n**256n-1n;function qr(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:o}=e,s=t?Qe(t):void 0;if(s&&!wt(s.address))throw new Jn({address:s.address});if(o&&!wt(o))throw new Jn({address:o});if(n&&n>nv)throw new Wi({maxFeePerGas:n});if(r&&n&&r>n)throw new zi({maxFeePerGas:n,maxPriorityFeePerGas:r})}async function Ho(e,t){var N,W,P,D;const{account:n=e.account,authorizationList:r,batch:o=!!((N=e.batch)!=null&&N.multicall),blockNumber:s,blockTag:i=e.experimental_blockTag??"latest",accessList:a,blobs:c,blockOverrides:l,code:u,data:f,factory:d,factoryData:h,gas:g,gasPrice:m,maxFeePerBlobGas:b,maxFeePerGas:y,maxPriorityFeePerGas:C,nonce:v,to:w,value:x,stateOverride:E,...A}=t,I=n?Qe(n):void 0;if(u&&(d||h))throw new L("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&w)throw new L("Cannot provide both `code` & `to` as parameters.");const S=u&&f,T=d&&h&&w&&f,R=S||T,M=S?Dp({code:u,data:f}):T?sv({data:f,factory:d,factoryData:h,to:w}):f;try{qr(t);const F=(typeof s=="bigint"?ee(s):void 0)||i,U=l?Tp(l):void 0,q=vu(E),ne=(D=(P=(W=e.chain)==null?void 0:W.formatters)==null?void 0:P.transactionRequest)==null?void 0:D.format,xe=(ne||Qo)({...ei(A,{format:ne}),accessList:a,account:I,authorizationList:r,blobs:c,data:M,gas:g,gasPrice:m,maxFeePerBlobGas:b,maxFeePerGas:y,maxPriorityFeePerGas:C,nonce:v,to:R?void 0:w,value:x},"call");if(o&&rv({request:xe})&&!q&&!U)try{return await ov(e,{...xe,blockNumber:s,blockTag:i})}catch(oe){if(!(oe instanceof fp)&&!(oe instanceof Jc))throw oe}const Q=(()=>{const oe=[xe,F];return q&&U?[...oe,q,U]:q?[...oe,q]:U?[...oe,{},U]:oe})(),G=await e.request({method:"eth_call",params:Q});return G==="0x"?{data:void 0}:{data:G}}catch(_){const F=iv(_),{offchainLookup:U,offchainLookupSignature:q}=await Promise.resolve().then(()=>require("./ccip-B3WUowc8.js"));if(e.ccipRead!==!1&&(F==null?void 0:F.slice(0,10))===q&&w)return{data:await U(e,{data:F,to:w})};throw R&&(F==null?void 0:F.slice(0,10))==="0x101bb98d"?new h6({factory:d}):Np(_,{...t,account:I,chain:e.chain})}}function rv({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(J6)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function ov(e,t){var m;const{batchSize:n=1024,deployless:r=!1,wait:o=0}=typeof((m=e.batch)==null?void 0:m.multicall)=="object"?e.batch.multicall:{},{blockNumber:s,blockTag:i=e.experimental_blockTag??"latest",data:a,to:c}=t,l=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return zo({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new fp})(),f=(typeof s=="bigint"?ee(s):void 0)||i,{schedule:d}=Mp({id:`${e.uid}.${f}`,wait:o,shouldSplitBatch(b){return b.reduce((C,{data:v})=>C+(v.length-2),0)>n*2},fn:async b=>{const y=b.map(w=>({allowFailure:!0,callData:w.data,target:w.to})),C=Ct({abi:jo,args:[y],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{...l===null?{data:Dp({code:yu,data:C})}:{to:l,data:C}},f]});return er({abi:jo,args:[y],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:h,success:g}]=await d({data:a,to:c});if(!g)throw new ba({data:h});return h==="0x"?{data:void 0}:{data:h}}function Dp(e){const{code:t,data:n}=e;return wu({abi:lp(["constructor(bytes, bytes)"]),bytecode:Rp,args:[t,n]})}function sv(e){const{data:t,factory:n,factoryData:r,to:o}=e;return wu({abi:lp(["constructor(address, bytes, address, bytes)"]),bytecode:Y6,args:[o,t,n,r]})}function iv(e){var n;if(!(e instanceof L))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function Tt(e,t){const{abi:n,address:r,args:o,functionName:s,...i}=t,a=Ct({abi:n,args:o,functionName:s});try{const{data:c}=await te(e,Ho,"call")({...i,data:a,to:r});return er({abi:n,args:o,functionName:s,data:c||"0x"})}catch(c){throw Rr(c,{abi:n,address:r,args:o,docsPath:"/docs/contract/readContract",functionName:s})}}async function av(e,t){const{blockNumber:n,blockTag:r,coinType:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return zo({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(d=>s.endsWith(d)))return null;const f=o!=null?[Xc(s),BigInt(o)]:[Xc(s)];try{const d=Ct({abi:Rd,functionName:"addr",args:f}),h={address:l,abi:Sh,functionName:"resolveWithGateways",args:[ln(mu(s)),d,i??[Ys]],blockNumber:n,blockTag:r},m=await te(e,Tt,"readContract")(h);if(m[0]==="0x")return null;const b=er({abi:Rd,args:f,functionName:"addr",data:m[0]});return b==="0x"||kn(b)==="0x00"?null:b}catch(d){if(a)throw d;if(pu(d))return null;throw d}}class cv extends L{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class ts extends L{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class xu extends L{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class lv extends L{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const uv=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,dv=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,fv=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,hv=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function pv(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function of(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Lp({uri:e,gatewayUrls:t}){const n=fv.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=of(t==null?void 0:t.ipfs,"https://ipfs.io"),o=of(t==null?void 0:t.arweave,"https://arweave.net"),s=e.match(uv),{protocol:i,subpath:a,target:c,subtarget:l=""}=(s==null?void 0:s.groups)||{},u=i==="ipns:/"||a==="ipns/",f=i==="ipfs:/"||a==="ipfs/"||dv.test(e);if(e.startsWith("http")&&!u&&!f){let h=e;return t!=null&&t.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((u||f)&&c)return{uri:`${r}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(i==="ar:/"&&c)return{uri:`${o}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=e.replace(hv,"");if(d.startsWith("<svg")&&(d=`data:image/svg+xml;base64,${btoa(d)}`),d.startsWith("data:")||d.startsWith("{"))return{uri:d,isOnChain:!0,isEncoded:!1};throw new xu({uri:e})}function Up(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new cv({data:e});return e.image||e.image_url||e.image_data}async function mv({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then(o=>o.json());return await Cu({gatewayUrls:e,uri:Up(n)})}catch{throw new xu({uri:t})}}async function Cu({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=Lp({uri:t,gatewayUrls:e});if(r||await pv(n))return n;throw new xu({uri:t})}function gv(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,o]=t.split("/"),[s,i]=n.split(":"),[a,c]=r.split(":");if(!s||s.toLowerCase()!=="eip155")throw new ts({reason:"Only EIP-155 supported"});if(!i)throw new ts({reason:"Chain ID not found"});if(!c)throw new ts({reason:"Contract address not found"});if(!o)throw new ts({reason:"Token ID not found"});if(!a)throw new ts({reason:"ERC namespace not found"});return{chainID:Number.parseInt(i,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:o}}async function bv(e,{nft:t}){if(t.namespace==="erc721")return Tt(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return Tt(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new lv({namespace:t.namespace})}async function yv(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?wv(e,{gatewayUrls:t,record:n}):Cu({uri:n,gatewayUrls:t})}async function wv(e,{gatewayUrls:t,record:n}){const r=gv(n),o=await bv(e,{nft:r}),{uri:s,isOnChain:i,isEncoded:a}=Lp({uri:o,gatewayUrls:t});if(i&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const l=a?atob(s.replace("data:application/json;base64,","")):s,u=JSON.parse(l);return Cu({uri:Up(u),gatewayUrls:t})}let c=r.tokenID;return r.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),mv({gatewayUrls:t,uri:s.replace(/(?:0x)?{id}/,c)})}async function _p(e,t){const{blockNumber:n,blockTag:r,key:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return zo({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(f=>s.endsWith(f)))return null;try{const f={address:l,abi:Sh,args:[ln(mu(s)),Ct({abi:Td,functionName:"text",args:[Xc(s),o]}),i??[Ys]],functionName:"resolveWithGateways",blockNumber:n,blockTag:r},h=await te(e,Tt,"readContract")(f);if(h[0]==="0x")return null;const g=er({abi:Td,functionName:"text",data:h[0]});return g===""?null:g}catch(f){if(a)throw f;if(pu(f))return null;throw f}}async function $p(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:o,gatewayUrls:s,strict:i,universalResolverAddress:a}){const c=await te(e,_p,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:o,universalResolverAddress:a,gatewayUrls:s,strict:i});if(!c)return null;try{return await yv(e,{record:c,gatewayUrls:r})}catch{return null}}async function qp(e,t){const{address:n,blockNumber:r,blockTag:o,coinType:s=60n,gatewayUrls:i,strict:a}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return zo({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})();try{const u={address:l,abi:Db,args:[n,s,i??[Ys]],functionName:"reverseWithGateways",blockNumber:r,blockTag:o},f=te(e,Tt,"readContract"),[d]=await f(u);return d||null}catch(u){if(a)throw u;if(pu(u))return null;throw u}}async function vv(e,t){const{blockNumber:n,blockTag:r,name:o}=t,{chain:s}=e,i=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!s)throw new Error("client chain not configured. universalResolverAddress is required.");return zo({blockNumber:n,chain:s,contract:"ensUniversalResolver"})})(),a=s==null?void 0:s.ensTlds;if(a&&!a.some(l=>o.endsWith(l)))throw new Error(`${o} is not a valid ENS TLD (${a==null?void 0:a.join(", ")}) for chain "${s.name}" (id: ${s.id}).`);const[c]=await te(e,Tt,"readContract")({address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[ln(mu(o))],blockNumber:n,blockTag:r});return c}async function Wp(e,t){var b,y,C;const{account:n=e.account,blockNumber:r,blockTag:o="latest",blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,to:d,value:h,...g}=t,m=n?Qe(n):void 0;try{qr(t);const w=(typeof r=="bigint"?ee(r):void 0)||o,x=(C=(y=(b=e.chain)==null?void 0:b.formatters)==null?void 0:y.transactionRequest)==null?void 0:C.format,A=(x||Qo)({...ei(g,{format:x}),account:m,blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,to:d,value:h},"createAccessList"),I=await e.request({method:"eth_createAccessList",params:[A,w]});return{accessList:I.accessList,gasUsed:BigInt(I.gasUsed)}}catch(v){throw Np(v,{...t,account:m,chain:e.chain})}}function va(e,{method:t}){var r,o;const n={};return e.transport.type==="fallback"&&((o=(r=e.transport).onResponse)==null||o.call(r,({method:s,response:i,status:a,transport:c})=>{a==="success"&&t===s&&(n[i]=c.request)})),s=>n[s]||e.request}async function xv(e){const t=va(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}class Cv extends L{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const sf="/docs/contract/encodeEventTopics";function ti(e){var c;const{abi:t,eventName:n,args:r}=e;let o=t[0];if(n){const l=$r({abi:t,name:n});if(!l)throw new Dd(n,{docsPath:sf});o=l}if(o.type!=="event")throw new Dd(void 0,{docsPath:sf});const s=Wt(o),i=ma(s);let a=[];if(r&&"inputs"in o){const l=(c=o.inputs)==null?void 0:c.filter(f=>"indexed"in f&&f.indexed),u=Array.isArray(r)?r:Object.values(r).length>0?(l==null?void 0:l.map(f=>r[f.name]))??[]:[];u.length>0&&(a=(l==null?void 0:l.map((f,d)=>Array.isArray(u[d])?u[d].map((h,g)=>af({param:f,value:u[d][g]})):typeof u[d]<"u"&&u[d]!==null?af({param:f,value:u[d]}):null))??[])}return[i,...a]}function af({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return ze($o(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new Cv(e.type);return Zn([e],[t])}async function zp(e,t){const{address:n,abi:r,args:o,eventName:s,fromBlock:i,strict:a,toBlock:c}=t,l=va(e,{method:"eth_newFilter"}),u=s?ti({abi:r,args:o,eventName:s}):void 0,f=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof i=="bigint"?ee(i):i,toBlock:typeof c=="bigint"?ee(c):c,topics:u}]});return{abi:r,args:o,eventName:s,id:f,request:l(f),strict:!!a,type:"event"}}async function Qp(e,{address:t,args:n,event:r,events:o,fromBlock:s,strict:i,toBlock:a}={}){const c=o??(r?[r]:void 0),l=va(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(h=>ti({abi:[h],eventName:h.name,args:n}))],r&&(u=u[0]));const f=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof s=="bigint"?ee(s):s,toBlock:typeof a=="bigint"?ee(a):a,...u.length?{topics:u}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:s,id:f,request:l(f),strict:!!i,toBlock:a,type:"event"}}async function Hp(e){const t=va(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}function Av(e){const t=ze(`0x${e.substring(4)}`).substring(26);return ha(`0x${t}`)}async function Ev({hash:e,signature:t}){const n=zt(e)?e:ln(e),{secp256k1:r}=await Promise.resolve().then(()=>z3);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:l,s:u,v:f,yParity:d}=t,h=Number(d??f),g=cf(h);return new r.Signature(an(l),an(u)).addRecoveryBit(g)}const i=zt(t)?t:ln(t);if(Be(i)!==65)throw new Error("invalid signature length");const a=cn(`0x${i.slice(130)}`),c=cf(a);return r.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function cf(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Vp({hash:e,signature:t}){return Av(await Ev({hash:e,signature:t}))}function kv(e,t="hex"){const n=Gp(e),r=au(new Uint8Array(n.length));return n.encode(r),t==="hex"?De(r.bytes):r.bytes}function Gp(e){return Array.isArray(e)?Iv(e.map(t=>Gp(t))):jv(e)}function Iv(e){const t=e.reduce((o,s)=>o+s.length,0),n=Kp(t);return{length:t<=55?1+t:1+n+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+n),n===1?o.pushUint8(t):n===2?o.pushUint16(t):n===3?o.pushUint24(t):o.pushUint32(t));for(const{encode:s}of e)s(o)}}}function jv(e){const t=typeof e=="string"?Qt(e):e,n=Kp(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(o){t.length===1&&t[0]<128?o.pushBytes(t):t.length<=55?(o.pushByte(128+t.length),o.pushBytes(t)):(o.pushByte(183+n),n===1?o.pushUint8(t.length):n===2?o.pushUint16(t.length):n===3?o.pushUint24(t.length):o.pushUint32(t.length),o.pushBytes(t))}}}function Kp(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new L("Length is too large.")}function Bv(e){const{chainId:t,nonce:n,to:r}=e,o=e.contractAddress??e.address,s=ze(qo(["0x05",kv([t?ee(t):"0x",o,n?ee(n):"0x"])]));return r==="bytes"?Qt(s):s}async function Au(e){const{authorization:t,signature:n}=e;return Vp({hash:Bv(t),signature:n??t})}class Sv extends L{constructor(t,{account:n,docsPath:r,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){var g;const h=Js({from:n==null?void 0:n.address,to:f,value:typeof d<"u"&&`${fu(d)} ${((g=o==null?void 0:o.nativeCurrency)==null?void 0:g.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${dt(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${dt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${dt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function Pv(e,{docsPath:t,...n}){const r=(()=>{const o=wa(e,n);return o instanceof Zs?e:o})();return new Sv(r,{docsPath:t,...n})}class Jp extends L{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Eu extends L{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class Ov extends L{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${dt(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Yp extends L{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const Xp={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function ku(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?cn(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?cn(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Xp[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=Tv(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}function Tv(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Zp(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:ku(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function $t(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:o}={}){var l,u,f;const s=o??!1,i=n!==void 0?ee(n):void 0;let a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):a=await e.request({method:"eth_getBlockByNumber",params:[i||r,s]},{dedupe:!!i}),!a)throw new Yp({blockHash:t,blockNumber:n});return(((f=(u=(l=e.chain)==null?void 0:l.formatters)==null?void 0:u.block)==null?void 0:f.format)||Zp)(a,"getBlock")}async function Iu(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function Rv(e,t){return em(e,t)}async function em(e,t){var s,i;const{block:n,chain:r=e.chain,request:o}=t||{};try{const a=((s=r==null?void 0:r.fees)==null?void 0:s.maxPriorityFeePerGas)??((i=r==null?void 0:r.fees)==null?void 0:i.defaultPriorityFee);if(typeof a=="function"){const l=n||await te(e,$t,"getBlock")({}),u=await a({block:l,client:e,request:o});if(u===null)throw new Error;return u}if(typeof a<"u")return a;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return an(c)}catch{const[a,c]=await Promise.all([n?Promise.resolve(n):te(e,$t,"getBlock")({}),te(e,Iu,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new Eu;const l=c-a.baseFeePerGas;return l<0n?0n:l}}async function Nv(e,t){return al(e,t)}async function al(e,t){var d,h;const{block:n,chain:r=e.chain,request:o,type:s="eip1559"}=t||{},i=await(async()=>{var g,m;return typeof((g=r==null?void 0:r.fees)==null?void 0:g.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:o}):((m=r==null?void 0:r.fees)==null?void 0:m.baseFeeMultiplier)??1.2})();if(i<1)throw new Jp;const c=10**(((d=i.toString().split(".")[1])==null?void 0:d.length)??0),l=g=>g*BigInt(Math.ceil(i*c))/BigInt(c),u=n||await te(e,$t,"getBlock")({});if(typeof((h=r==null?void 0:r.fees)==null?void 0:h.estimateFeesPerGas)=="function"){const g=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:l,request:o,type:s});if(g!==null)return g}if(s==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new Eu;const g=typeof(o==null?void 0:o.maxPriorityFeePerGas)=="bigint"?o.maxPriorityFeePerGas:await em(e,{block:u,chain:r,request:o}),m=l(u.baseFeePerGas);return{maxFeePerGas:(o==null?void 0:o.maxFeePerGas)??m+g,maxPriorityFeePerGas:g}}return{gasPrice:(o==null?void 0:o.gasPrice)??l(await te(e,Iu,"getGasPrice")({}))}}async function tm(e,{address:t,blockTag:n="latest",blockNumber:r}){const o=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?ee(r):n]},{dedupe:!!r});return cn(o)}function nm(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>Qt(s)):e.blobs,o=[];for(const s of r)o.push(Uint8Array.from(t.blobToKzgCommitment(s)));return n==="bytes"?o:o.map(s=>De(s))}function rm(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>Qt(i)):e.blobs,o=typeof e.commitments[0]=="string"?e.commitments.map(i=>Qt(i)):e.commitments,s=[];for(let i=0;i<r.length;i++){const a=r[i],c=o[i];s.push(Uint8Array.from(t.computeBlobKzgProof(a,c)))}return n==="bytes"?s:s.map(i=>De(i))}function Fv(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),a=Number(n&s),c=r?4:0,l=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+l,a,r)}function Mv(e,t,n){return e&t^~e&n}function Dv(e,t,n){return e&t^e&n^t&n}class Lv extends iu{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Wa(this.buffer)}update(t){Po(this),t=fa(t),Or(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const a=Math.min(o-this.pos,s-i);if(a===o){const c=Wa(t);for(;o<=s-i;i+=o)this.process(c,i);continue}r.set(t.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Po(this),_h(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,Oo(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let f=i;f<o;f++)n[f]=0;Fv(r,o-8,BigInt(this.length*8),s),this.process(r,0);const a=Wa(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:a}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=a,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Nn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Uv=Uint32Array.from([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]),Fn=new Uint32Array(64);class _v extends Lv{constructor(t=32){super(64,t,8,!1),this.A=Nn[0]|0,this.B=Nn[1]|0,this.C=Nn[2]|0,this.D=Nn[3]|0,this.E=Nn[4]|0,this.F=Nn[5]|0,this.G=Nn[6]|0,this.H=Nn[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:a,H:c}=this;return[t,n,r,o,s,i,a,c]}set(t,n,r,o,s,i,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}process(t,n){for(let f=0;f<16;f++,n+=4)Fn[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const d=Fn[f-15],h=Fn[f-2],g=Jt(d,7)^Jt(d,18)^d>>>3,m=Jt(h,17)^Jt(h,19)^h>>>10;Fn[f]=m+Fn[f-7]+g+Fn[f-16]|0}let{A:r,B:o,C:s,D:i,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=Jt(a,6)^Jt(a,11)^Jt(a,25),h=u+d+Mv(a,c,l)+Uv[f]+Fn[f]|0,m=(Jt(r,2)^Jt(r,13)^Jt(r,22))+Dv(r,o,s)|0;u=l,l=c,c=a,a=i+h|0,i=s,s=o,o=r,r=h+m|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,o,s,i,a,c,l,u)}roundClean(){Oo(Fn)}destroy(){this.set(0,0,0,0,0,0,0,0),Oo(this.buffer)}}const om=$h(()=>new _v),$v=om;function qv(e,t){return $v(zt(e,{strict:!1})?$o(e):e)}function Wv(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),o=qv(t);return o.set([n],0),r==="bytes"?o:De(o)}function zv(e){const{commitments:t,version:n}=e,r=e.to,o=[];for(const s of t)o.push(Wv({commitment:s,to:r,version:n}));return o}const lf=6,sm=32,ju=4096,im=sm*ju,uf=im*lf-1-1*ju*lf;class Qv extends L{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class Hv extends L{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}function Vv(e){const t=typeof e.data=="string"?Qt(e.data):e.data,n=Be(t);if(!n)throw new Hv;if(n>uf)throw new Qv({maxSize:uf,size:n});const r=[];let o=!0,s=0;for(;o;){const i=au(new Uint8Array(im));let a=0;for(;a<ju;){const c=t.slice(s,s+(sm-1));if(i.pushByte(0),i.pushBytes(c),c.length<31){i.pushByte(128),o=!1;break}a++,s+=31}r.push(i)}return r.map(i=>De(i.bytes))}function Gv(e){const{data:t,kzg:n,to:r}=e,o=e.blobs??Vv({data:t}),s=e.commitments??nm({blobs:o,kzg:n,to:r}),i=e.proofs??rm({blobs:o,commitments:s,kzg:n,to:r}),a=[];for(let c=0;c<o.length;c++)a.push({blob:o[c],commitment:s[c],proof:i[c]});return a}function Kv(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new a6({transaction:e})}function am(e,{docsPath:t,...n}){const r=(()=>{const o=wa(e,n);return o instanceof Zs?e:o})();return new c6(r,{docsPath:t,...n})}async function xa(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return cn(t)}async function cm(e,t){var I,S,T,R,M;const{account:n=e.account,accessList:r,authorizationList:o,chain:s=e.chain,blobVersionedHashes:i,blobs:a,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:g,nonceManager:m,to:b,type:y,value:C,...v}=t,w=await(async()=>{if(!n||!m||typeof g<"u")return g;const N=Qe(n),W=s?s.id:await te(e,xa,"getChainId")({});return await m.consume({address:N.address,chainId:W,client:e})})();qr(t);const x=(S=(I=s==null?void 0:s.formatters)==null?void 0:I.transactionRequest)==null?void 0:S.format,A=(x||Qo)({...ei(v,{format:x}),account:n?Qe(n):void 0,accessList:r,authorizationList:o,blobs:a,blobVersionedHashes:i,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:w,to:b,type:y,value:C},"fillTransaction");try{const N=await e.request({method:"eth_fillTransaction",params:[A]}),P=(((R=(T=s==null?void 0:s.formatters)==null?void 0:T.transaction)==null?void 0:R.format)||ku)(N.tx);delete P.blockHash,delete P.blockNumber,delete P.r,delete P.s,delete P.transactionIndex,delete P.v,delete P.yParity,P.data=P.input,P.gas&&(P.gas=t.gas??P.gas),P.gasPrice&&(P.gasPrice=t.gasPrice??P.gasPrice),P.maxFeePerBlobGas&&(P.maxFeePerBlobGas=t.maxFeePerBlobGas??P.maxFeePerBlobGas),P.maxFeePerGas&&(P.maxFeePerGas=t.maxFeePerGas??P.maxFeePerGas),P.maxPriorityFeePerGas&&(P.maxPriorityFeePerGas=t.maxPriorityFeePerGas??P.maxPriorityFeePerGas),P.nonce&&(P.nonce=t.nonce??P.nonce);const D=await(async()=>{var q,ne;if(typeof((q=s==null?void 0:s.fees)==null?void 0:q.baseFeeMultiplier)=="function"){const ce=await te(e,$t,"getBlock")({});return s.fees.baseFeeMultiplier({block:ce,client:e,request:t})}return((ne=s==null?void 0:s.fees)==null?void 0:ne.baseFeeMultiplier)??1.2})();if(D<1)throw new Jp;const F=10**(((M=D.toString().split(".")[1])==null?void 0:M.length)??0),U=q=>q*BigInt(Math.ceil(D*F))/BigInt(F);return P.maxFeePerGas&&!t.maxFeePerGas&&(P.maxFeePerGas=U(P.maxFeePerGas)),P.gasPrice&&!t.gasPrice&&(P.gasPrice=U(P.gasPrice)),{raw:N.raw,transaction:{from:A.from,...P}}}catch(N){throw am(N,{...t,chain:e.chain})}}const lm=["blobVersionedHashes","chainId","fees","gas","nonce","type"],df=new Map,Xa=new Hs(128);async function Bu(e,t){var w,x,E;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=lm);const{account:r,chain:o=e.chain,nonceManager:s,parameters:i}=n,a=(()=>{if(typeof(o==null?void 0:o.prepareTransactionRequest)=="function")return{fn:o.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(o==null?void 0:o.prepareTransactionRequest))return{fn:o.prepareTransactionRequest[0],runAt:o.prepareTransactionRequest[1].runAt}})();let c;async function l(){return c||(typeof n.chainId<"u"?n.chainId:o?o.id:(c=await te(e,xa,"getChainId")({}),c))}const u=r&&Qe(r);let f=n.nonce;if(i.includes("nonce")&&typeof f>"u"&&u&&s){const A=await l();f=await s.consume({address:u.address,chainId:A,client:e})}a!=null&&a.fn&&((w=a.runAt)!=null&&w.includes("beforeFillTransaction"))&&(n=await a.fn({...n,chain:o},{phase:"beforeFillTransaction"}),f??(f=n.nonce));const h=((i.includes("blobVersionedHashes")||i.includes("sidecars"))&&n.kzg&&n.blobs||Xa.get(e.uid)===!1||!["fees","gas"].some(I=>i.includes(I))?!1:!!(i.includes("chainId")&&typeof n.chainId!="number"||i.includes("nonce")&&typeof f!="number"||i.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||i.includes("gas")&&typeof n.gas!="bigint"))?await te(e,cm,"fillTransaction")({...n,nonce:f}).then(A=>{const{chainId:I,from:S,gas:T,gasPrice:R,nonce:M,maxFeePerBlobGas:N,maxFeePerGas:W,maxPriorityFeePerGas:P,type:D,..._}=A.transaction;return Xa.set(e.uid,!0),{...n,...S?{from:S}:{},...D?{type:D}:{},...typeof I<"u"?{chainId:I}:{},...typeof T<"u"?{gas:T}:{},...typeof R<"u"?{gasPrice:R}:{},...typeof M<"u"?{nonce:M}:{},...typeof N<"u"?{maxFeePerBlobGas:N}:{},...typeof W<"u"?{maxFeePerGas:W}:{},...typeof P<"u"?{maxPriorityFeePerGas:P}:{},..."nonceKey"in _&&typeof _.nonceKey<"u"?{nonceKey:_.nonceKey}:{}}}).catch(A=>{var T;const I=A;return I.name!=="TransactionExecutionError"||((T=I.walk)==null?void 0:T.call(I,R=>{const M=R;return M.name==="MethodNotFoundRpcError"||M.name==="MethodNotSupportedRpcError"}))&&Xa.set(e.uid,!1),n}):n;f??(f=h.nonce),n={...h,...u?{from:u==null?void 0:u.address}:{},...f?{nonce:f}:{}};const{blobs:g,gas:m,kzg:b,type:y}=n;a!=null&&a.fn&&((x=a.runAt)!=null&&x.includes("beforeFillParameters"))&&(n=await a.fn({...n,chain:o},{phase:"beforeFillParameters"}));let C;async function v(){return C||(C=await te(e,$t,"getBlock")({blockTag:"latest"}),C)}if(i.includes("nonce")&&typeof f>"u"&&u&&!s&&(n.nonce=await te(e,tm,"getTransactionCount")({address:u.address,blockTag:"pending"})),(i.includes("blobVersionedHashes")||i.includes("sidecars"))&&g&&b){const A=nm({blobs:g,kzg:b});if(i.includes("blobVersionedHashes")){const I=zv({commitments:A,to:"hex"});n.blobVersionedHashes=I}if(i.includes("sidecars")){const I=rm({blobs:g,commitments:A,kzg:b}),S=Gv({blobs:g,commitments:A,proofs:I,to:"hex"});n.sidecars=S}}if(i.includes("chainId")&&(n.chainId=await l()),(i.includes("fees")||i.includes("type"))&&typeof y>"u")try{n.type=Kv(n)}catch{let A=df.get(e.uid);if(typeof A>"u"){const I=await v();A=typeof(I==null?void 0:I.baseFeePerGas)=="bigint",df.set(e.uid,A)}n.type=A?"eip1559":"legacy"}if(i.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const A=await v(),{maxFeePerGas:I,maxPriorityFeePerGas:S}=await al(e,{block:A,chain:o,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<S)throw new Ov({maxPriorityFeePerGas:S});n.maxPriorityFeePerGas=S,n.maxFeePerGas=I}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new Eu;if(typeof n.gasPrice>"u"){const A=await v(),{gasPrice:I}=await al(e,{block:A,chain:o,request:n,type:"legacy"});n.gasPrice=I}}return i.includes("gas")&&typeof m>"u"&&(n.gas=await te(e,Su,"estimateGas")({...n,account:u,prepare:(u==null?void 0:u.type)==="local"?[]:["blobVersionedHashes"]})),a!=null&&a.fn&&((E=a.runAt)!=null&&E.includes("afterFillParameters"))&&(n=await a.fn({...n,chain:o},{phase:"afterFillParameters"})),qr(n),delete n.parameters,n}async function Su(e,t){var i,a,c;const{account:n=e.account,prepare:r=!0}=t,o=n?Qe(n):void 0,s=(()=>{if(Array.isArray(r))return r;if((o==null?void 0:o.type)!=="local")return["blobVersionedHashes"]})();try{const l=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Au({authorization:t.authorizationList[0]}).catch(()=>{throw new L("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:u,authorizationList:f,blobs:d,blobVersionedHashes:h,blockNumber:g,blockTag:m,data:b,gas:y,gasPrice:C,maxFeePerBlobGas:v,maxFeePerGas:w,maxPriorityFeePerGas:x,nonce:E,value:A,stateOverride:I,...S}=r?await Bu(e,{...t,parameters:s,to:l}):t;if(y&&t.gas!==y)return y;const R=(typeof g=="bigint"?ee(g):void 0)||m,M=vu(I);qr(t);const N=(c=(a=(i=e.chain)==null?void 0:i.formatters)==null?void 0:a.transactionRequest)==null?void 0:c.format,P=(N||Qo)({...ei(S,{format:N}),account:o,accessList:u,authorizationList:f,blobs:d,blobVersionedHashes:h,data:b,gasPrice:C,maxFeePerBlobGas:v,maxFeePerGas:w,maxPriorityFeePerGas:x,nonce:E,to:l,value:A},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:M?[P,R??e.experimental_blockTag??"latest",M]:R?[P,R]:[P]}))}catch(l){throw Pv(l,{...t,account:o,chain:e.chain})}}async function Jv(e,t){var l;const{abi:n,address:r,args:o,functionName:s,dataSuffix:i=typeof e.dataSuffix=="string"?e.dataSuffix:(l=e.dataSuffix)==null?void 0:l.value,...a}=t,c=Ct({abi:n,args:o,functionName:s});try{return await te(e,Su,"estimateGas")({data:`${c}${i?i.replace("0x",""):""}`,to:r,...a})}catch(u){const f=a.account?Qe(a.account):void 0;throw Rr(u,{abi:n,address:r,args:o,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:f==null?void 0:f.address})}}async function um(e,{address:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest"}){var i,a,c;if((i=e.batch)!=null&&i.multicall&&((c=(a=e.chain)==null?void 0:a.contracts)!=null&&c.multicall3)){const l=e.chain.contracts.multicall3.address,u=Ct({abi:jo,functionName:"getEthBalance",args:[t]}),{data:f}=await te(e,Ho,"call")({to:l,data:u,blockNumber:n,blockTag:r});return er({abi:jo,functionName:"getEthBalance",args:[t],data:f||"0x"})}const o=typeof n=="bigint"?ee(n):void 0,s=await e.request({method:"eth_getBalance",params:[t,o||r]});return BigInt(s)}async function Yv(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}const Xv=new Map,Zv=new Map;function e2(e){const t=(o,s)=>({clear:()=>s.delete(o),get:()=>s.get(o),set:i=>s.set(o,i)}),n=t(e,Xv),r=t(e,Zv);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function t2(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=e2(t),o=r.response.get();if(o&&n>0&&Date.now()-o.created.getTime()<n)return o.data;let s=r.promise.get();s||(s=e(),r.promise.set(s));try{const i=await s;return r.response.set({created:new Date,data:i}),i}finally{r.promise.clear()}}const n2=e=>`blockNumber.${e}`;async function ni(e,{cacheTime:t=e.cacheTime}={}){const n=await t2(()=>e.request({method:"eth_blockNumber"}),{cacheKey:n2(e.uid),cacheTime:t});return BigInt(n)}async function r2(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const o=n!==void 0?ee(n):void 0;let s;return t?s=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):s=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||r]},{dedupe:!!o}),cn(s)}async function cl(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=n!==void 0?ee(n):void 0,s=await e.request({method:"eth_getCode",params:[t,o||r]},{dedupe:!!o});if(s!=="0x")return s}function ri(e,t){if(!wt(e,{strict:!1}))throw new Jn({address:e});if(!wt(t,{strict:!1}))throw new Jn({address:t});return e.toLowerCase()===t.toLowerCase()}const ff="/docs/contract/decodeEventLog";function Qi(e){const{abi:t,data:n,strict:r,topics:o}=e,s=r??!0,[i,...a]=o;if(!i)throw new zb({docsPath:ff});const c=t.find(y=>y.type==="event"&&i===ma(Wt(y)));if(!(c&&"name"in c)||c.type!=="event")throw new Qb(i,{docsPath:ff});const{name:l,inputs:u}=c,f=u==null?void 0:u.some(y=>!("name"in y&&y.name)),d=f?[]:{},h=u.map((y,C)=>[y,C]).filter(([y])=>"indexed"in y&&y.indexed),g=[];for(let y=0;y<h.length;y++){const[C,v]=h[y],w=a[y];if(!w){if(s)throw new ou({abiItem:c,param:C});g.push([C,v]);continue}d[f?v:C.name||v]=o2({param:C,value:w})}const m=u.filter(y=>!("indexed"in y&&y.indexed)),b=s?m:[...g.map(([y])=>y),...m];if(b.length>0){if(n&&n!=="0x")try{const y=Vs(b,n);if(y){let C=0;if(!s)for(const[v,w]of g)d[f?w:v.name||w]=y[C++];if(f)for(let v=0;v<u.length;v++)d[v]===void 0&&C<y.length&&(d[v]=y[C++]);else for(let v=0;v<m.length;v++)d[m[v].name]=y[C++]}}catch(y){if(s)throw y instanceof Rh||y instanceof Vh?new $i({abiItem:c,data:n,params:b,size:Be(n)}):y}else if(s)throw new $i({abiItem:c,data:"0x",params:b,size:0})}return{eventName:l,args:Object.values(d).length>0?d:void 0}}function o2({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Vs([e],t)||[])[0]}function Pu(e){const{abi:t,args:n,logs:r,strict:o=!0}=e,s=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),i=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:ma(a)}));return r.map(a=>{var f;const c=i.filter(d=>a.topics[0]===d.selector);if(c.length===0)return null;let l,u;for(const d of c)try{l=Qi({...a,abi:[d.abi],strict:!0}),u=d;break}catch{}if(!l&&!o){u=c[0];try{l=Qi({data:a.data,topics:a.topics,abi:[u.abi],strict:!1})}catch{const d=(f=u.abi.inputs)==null?void 0:f.some(h=>!("name"in h&&h.name));return{...a,args:d?[]:{},eventName:u.abi.name}}}return!l||!u||s&&!s.includes(l.eventName)||!s2({args:l.args,inputs:u.abi.inputs,matchArgs:n})?null:{...l,...a}}).filter(Boolean)}function s2(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function o(s,i,a){try{return s.type==="address"?ri(i,a):s.type==="string"||s.type==="bytes"?ze($o(i))===a:i===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((s,i)=>{if(s==null)return!0;const a=n[i];return a?(Array.isArray(s)?s:[s]).some(l=>o(a,l,t[i])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([s,i])=>{if(i==null)return!0;const a=n.find(l=>l.name===s);return a?(Array.isArray(i)?i:[i]).some(l=>o(a,l,t[s])):!1}):!1}function On(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}async function Ou(e,{address:t,blockHash:n,fromBlock:r,toBlock:o,event:s,events:i,args:a,strict:c}={}){const l=c??!1,u=i??(s?[s]:void 0);let f=[];u&&(f=[u.flatMap(m=>ti({abi:[m],eventName:m.name,args:i?void 0:a}))],s&&(f=f[0]));let d;n?d=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:n}]}):d=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:typeof r=="bigint"?ee(r):r,toBlock:typeof o=="bigint"?ee(o):o}]});const h=d.map(g=>On(g));return u?Pu({abi:u,args:a,logs:h,strict:l}):h}async function dm(e,t){const{abi:n,address:r,args:o,blockHash:s,eventName:i,fromBlock:a,toBlock:c,strict:l}=t,u=i?$r({abi:n,name:i}):void 0,f=u?void 0:n.filter(d=>d.type==="event");return te(e,Ou,"getLogs")({address:r,args:o,blockHash:s,event:u,events:f,fromBlock:a,toBlock:c,strict:l})}class i2 extends L{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function a2(e,t){const{address:n,factory:r,factoryData:o}=t;try{const[s,i,a,c,l,u,f]=await te(e,Tt,"readContract")({abi:c2,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:i,version:a,chainId:Number(c),verifyingContract:l,salt:u},extensions:f,fields:s}}catch(s){const i=s;throw i.name==="ContractFunctionExecutionError"&&i.cause.name==="ContractFunctionZeroDataError"?new i2({address:n}):i}}const c2=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function l2(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function u2(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:o}){const s=typeof n=="bigint"?ee(n):void 0,i=await e.request({method:"eth_feeHistory",params:[ee(t),s||r,o]},{dedupe:!!s});return l2(i)}async function Ca(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const o=r.map(s=>On(s));return!("abi"in t)||!t.abi?o:Pu({abi:t.abi,logs:o,strict:n})}async function d2(e,{filter:t}){const n=t.strict??!1,o=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(s=>On(s));return t.abi?Pu({abi:t.abi,logs:o,strict:n}):o}async function f2({address:e,authorization:t,signature:n}){return ri(yt(e),await Au({authorization:t,signature:n}))}const mi=new Hs(8192);function h2(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(mi.get(n))return mi.get(n);const r=e().finally(()=>mi.delete(n));return mi.set(n,r),r}async function Hi(e){return new Promise(t=>setTimeout(t,e))}function Mo(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((o,s)=>{const i=async({count:a=0}={})=>{const c=async({error:l})=>{const u=typeof t=="function"?t({count:a,error:l}):t;u&&await Hi(u),i({count:a+1})};try{const l=await e();o(l)}catch(l){if(a<n&&await r({count:a,error:l}))return c({error:l});s(l)}};i()})}function p2(e,t={}){return async(n,r={})=>{var f;const{dedupe:o=!1,methods:s,retryDelay:i=150,retryCount:a=3,uid:c}={...t,...r},{method:l}=n;if((f=s==null?void 0:s.exclude)!=null&&f.includes(l))throw new pr(new Error("method not supported"),{method:l});if(s!=null&&s.include&&!s.include.includes(l))throw new pr(new Error("method not supported"),{method:l});const u=o?So(`${c}.${_e(n)}`):void 0;return h2(()=>Mo(async()=>{try{return await e(n)}catch(d){const h=d;switch(h.code){case hs.code:throw new hs(h);case ps.code:throw new ps(h);case ms.code:throw new ms(h,{method:n.method});case gs.code:throw new gs(h);case Tr.code:throw new Tr(h);case Yn.code:throw new Yn(h);case bs.code:throw new bs(h);case on.code:throw new on(h);case Ro.code:throw new Ro(h);case pr.code:throw new pr(h,{method:n.method});case No.code:throw new No(h);case ys.code:throw new ys(h);case Ee.code:throw new Ee(h);case ws.code:throw new ws(h);case vs.code:throw new vs(h);case xs.code:throw new xs(h);case Cs.code:throw new Cs(h);case qt.code:throw new qt(h);case As.code:throw new As(h);case Es.code:throw new Es(h);case ks.code:throw new ks(h);case Is.code:throw new Is(h);case js.code:throw new js(h);case Bs.code:throw new Bs(h);case Ss.code:throw new Ss(h);case 5e3:throw new Ee(h);case Fo.code:throw new Fo(h);default:throw d instanceof L?d:new v6(h)}}},{delay:({count:d,error:h})=>{var g;if(h&&h instanceof co){const m=(g=h==null?void 0:h.headers)==null?void 0:g.get("Retry-After");if(m!=null&&m.match(/\d/))return Number.parseInt(m,10)*1e3}return~~(1<<d)*i},retryCount:a,shouldRetry:({error:d})=>m2(d)}),{enabled:o,id:u})}}function m2(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===No.code||e.code===Tr.code:e instanceof co&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function g2({chain:e,currentChainId:t}){if(!e)throw new Xw;if(t!==e.id)throw new Yw({chain:e,currentChainId:t})}function fm(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(r){return o=>{const s=typeof o=="function"?o(r):o,i={...r,...s};return Object.assign(i,{extend:n(i)})}}return Object.assign(t,{extend:n(t)})}const b2={"0x0":"reverted","0x1":"success"};function hm(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>On(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?cn(e.transactionIndex):null,status:e.status?b2[e.status]:null,type:e.type?Xp[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}function Tu(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((o,s)=>{(async()=>{let i;try{const a=new AbortController;n>0&&(i=setTimeout(()=>{r?a.abort():s(t)},n)),o(await e({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&s(t),s(a)}finally{clearTimeout(i)}})()})}function y2(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const hf=y2();function w2(e,t={}){const{url:n,headers:r}=v2(e);return{async request(o){var g;const{body:s,fetchFn:i=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:c=t.onResponse,timeout:l=t.timeout??1e4}=o,u={...t.fetchOptions??{},...o.fetchOptions??{}},{headers:f,method:d,signal:h}=u;try{const m=await Tu(async({signal:y})=>{const C={...u,body:Array.isArray(s)?_e(s.map(E=>({jsonrpc:"2.0",id:E.id??hf.take(),...E}))):_e({jsonrpc:"2.0",id:s.id??hf.take(),...s}),headers:{...r,"Content-Type":"application/json",...f},method:d||"POST",signal:h||(l>0?y:null)},v=new Request(n,C),w=await(a==null?void 0:a(v,C))??{...C,url:n};return await i(w.url??n,w)},{errorInstance:new Zd({body:s,url:n}),timeout:l,signal:!0});c&&await c(m);let b;if((g=m.headers.get("Content-Type"))!=null&&g.startsWith("application/json"))b=await m.json();else{b=await m.text();try{b=JSON.parse(b||"{}")}catch(y){if(m.ok)throw y;b={error:b}}}if(!m.ok)throw new co({body:s,details:_e(b.error)||m.statusText,headers:m.headers,status:m.status,url:n});return b}catch(m){throw m instanceof co||m instanceof Zd?m:new co({body:s,cause:m,url:n})}}}}function v2(e){try{const t=new URL(e),n=(()=>{if(t.username){const r=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(r)}`}}}})();return{url:t.toString(),...n}}catch{return{url:e}}}const x2=`Ethereum Signed Message:
|
|
70
|
-
`;function C2(e){const t=typeof e=="string"?So(e):typeof e.raw=="string"?e.raw:De(e.raw),n=So(`${x2}${Be(t)}`);return vt([n,t])}function pm(e,t){return ze(C2(e),t)}class A2 extends L{constructor({domain:t}){super(`Invalid domain "${_e(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class E2 extends L{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class k2 extends L{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function I2(e){const{domain:t,message:n,primaryType:r,types:o}=e,s=(i,a)=>{for(const c of i){const{name:l,type:u}=c,f=a[l],d=u.match(Yh);if(d&&(typeof f=="number"||typeof f=="bigint")){const[m,b,y]=d;ee(f,{signed:b==="int",size:Number.parseInt(y,10)/8})}if(u==="address"&&typeof f=="string"&&!wt(f))throw new Jn({address:f});const h=u.match(Wy);if(h){const[m,b]=h;if(b&&Be(f)!==Number.parseInt(b,10))throw new Gb({expectedSize:Number.parseInt(b,10),givenSize:Be(f)})}const g=o[u];g&&(B2(u),s(g,f))}};if(o.EIP712Domain&&t){if(typeof t!="object")throw new A2({domain:t});s(o.EIP712Domain,t)}if(r!=="EIP712Domain")if(o[r])s(o[r],n);else throw new E2({primaryType:r,types:o})}function j2({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function B2(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new k2({type:e})}function S2(e){const{domain:t={},message:n,primaryType:r}=e,o={EIP712Domain:j2({domain:t}),...e.types};I2({domain:t,message:n,primaryType:r,types:o});const s=["0x1901"];return t&&s.push(P2({domain:t,types:o})),r!=="EIP712Domain"&&s.push(mm({data:n,primaryType:r,types:o})),ze(vt(s))}function P2({domain:e,types:t}){return mm({data:e,primaryType:"EIP712Domain",types:t})}function mm({data:e,primaryType:t,types:n}){const r=gm({data:e,primaryType:t,types:n});return ze(r)}function gm({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],o=[O2({primaryType:t,types:n})];for(const s of n[t]){const[i,a]=ym({types:n,name:s.name,type:s.type,value:e[s.name]});r.push(i),o.push(a)}return Zn(r,o)}function O2({primaryType:e,types:t}){const n=ln(T2({primaryType:e,types:t}));return ze(n)}function T2({primaryType:e,types:t}){let n="";const r=bm({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const s of o)n+=`${s}(${t[s].map(({name:i,type:a})=>`${a} ${i}`).join(",")})`;return n}function bm({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),o=r==null?void 0:r[0];if(n.has(o)||t[o]===void 0)return n;n.add(o);for(const s of t[o])bm({primaryType:s.type,types:t},n);return n}function ym({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},ze(gm({data:r,primaryType:n,types:e}))];if(n==="bytes")return[{type:"bytes32"},ze(r)];if(n==="string")return[{type:"bytes32"},ze(ln(r))];if(n.lastIndexOf("]")===n.length-1){const o=n.slice(0,n.lastIndexOf("[")),s=r.map(i=>ym({name:t,type:o,types:e,value:i}));return[{type:"bytes32"},ze(Zn(s.map(([i])=>i),s.map(([,i])=>i)))]}return[{type:n},r]}class R2 extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const N2={checksum:new R2(8192)},Za=N2.checksum;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function F2(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function pf(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Vi(e,...t){if(!F2(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function mf(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function M2(e,t){Vi(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function D2(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function wm(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}const L2=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function U2(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function _2(e){for(let t=0;t<e.length;t++)e[t]=U2(e[t]);return e}const gf=L2?e=>e:_2;function $2(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function vm(e){return typeof e=="string"&&(e=$2(e)),Vi(e),e}class q2{}function W2(e){const t=r=>e().update(vm(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const gi=BigInt(2**32-1),bf=BigInt(32);function z2(e,t=!1){return t?{h:Number(e&gi),l:Number(e>>bf&gi)}:{h:Number(e>>bf&gi)|0,l:Number(e&gi)|0}}function Q2(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:a}=z2(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const H2=(e,t,n)=>e<<n|t>>>32-n,V2=(e,t,n)=>t<<n|e>>>32-n,G2=(e,t,n)=>t<<n-32|e>>>64-n,K2=(e,t,n)=>e<<n-32|t>>>64-n,J2=BigInt(0),ns=BigInt(1),Y2=BigInt(2),X2=BigInt(7),Z2=BigInt(256),e5=BigInt(113),xm=[],Cm=[],Am=[];for(let e=0,t=ns,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],xm.push(2*(5*r+n)),Cm.push((e+1)*(e+2)/2%64);let o=J2;for(let s=0;s<7;s++)t=(t<<ns^(t>>X2)*e5)%Z2,t&Y2&&(o^=ns<<(ns<<BigInt(s))-ns);Am.push(o)}const Em=Q2(Am,!0),t5=Em[0],n5=Em[1],yf=(e,t,n)=>n>32?G2(e,t,n):H2(e,t,n),wf=(e,t,n)=>n>32?K2(e,t,n):V2(e,t,n);function r5(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const a=(i+8)%10,c=(i+2)%10,l=n[c],u=n[c+1],f=yf(l,u,1)^n[a],d=wf(l,u,1)^n[a+1];for(let h=0;h<50;h+=10)e[i+h]^=f,e[i+h+1]^=d}let o=e[2],s=e[3];for(let i=0;i<24;i++){const a=Cm[i],c=yf(o,s,a),l=wf(o,s,a),u=xm[i];o=e[u],s=e[u+1],e[u]=c,e[u+1]=l}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)n[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=t5[r],e[1]^=n5[r]}wm(n)}class Ru extends q2{constructor(t,n,r,o=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=s,pf(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=D2(this.state)}clone(){return this._cloneInto()}keccak(){gf(this.state32),r5(this.state32,this.rounds),gf(this.state32),this.posOut=0,this.pos=0}update(t){mf(this),t=vm(t),Vi(t);const{blockLen:n,state:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);for(let a=0;a<i;a++)r[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,n&128&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){mf(this,!1),Vi(t),this.finish();const n=this.state,{blockLen:r}=this;for(let o=0,s=t.length;o<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-o);t.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return pf(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(M2(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,wm(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new Ru(n,r,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}}const o5=(e,t,n)=>W2(()=>new Ru(t,e,n)),s5=o5(1,136,256/8);function km(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=s5(P6(e));return n==="Bytes"?r:Vt(r)}const i5=/^0x[a-fA-F0-9]{40}$/;function Aa(e,t={}){const{strict:n=!0}=t;if(!i5.test(e))throw new vf({address:e,cause:new a5});if(n){if(e.toLowerCase()===e)return;if(Im(e)!==e)throw new vf({address:e,cause:new c5})}}function Im(e){if(Za.has(e))return Za.get(e);Aa(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=km(T6(t),{as:"Bytes"}),r=t.split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&r[s]&&(r[s]=r[s].toUpperCase()),(n[s>>1]&15)>=8&&r[s+1]&&(r[s+1]=r[s+1].toUpperCase());const o=`0x${r.join("")}`;return Za.set(e,o),o}function ll(e,t={}){const{strict:n=!0}=t??{};try{return Aa(e,{strict:n}),!0}catch{return!1}}class vf extends le{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class a5 extends le{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class c5 extends le{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const l5=/^(.*)\[([0-9]*)\]$/,u5=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,jm=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,xf=2n**256n-1n;function lo(e,t,n){const{checksumAddress:r,staticPosition:o}=n,s=Mu(t.type);if(s){const[i,a]=s;return f5(e,{...t,type:a},{checksumAddress:r,length:i,staticPosition:o})}if(t.type==="tuple")return g5(e,t,{checksumAddress:r,staticPosition:o});if(t.type==="address")return d5(e,{checksum:r});if(t.type==="bool")return h5(e);if(t.type.startsWith("bytes"))return p5(e,t,{staticPosition:o});if(t.type.startsWith("uint")||t.type.startsWith("int"))return m5(e,t);if(t.type==="string")return b5(e,{staticPosition:o});throw new Lu(t.type)}const Cf=32,ul=32;function d5(e,t={}){const{checksum:n=!1}=t,r=e.readBytes(32);return[(s=>n?Im(s):s)(Vt(N6(r,-20))),32]}function f5(e,t,n){const{checksumAddress:r,length:o,staticPosition:s}=n;if(!o){const c=jn(e.readBytes(ul)),l=s+c,u=l+Cf;e.setPosition(l);const f=jn(e.readBytes(Cf)),d=Ps(t);let h=0;const g=[];for(let m=0;m<f;++m){e.setPosition(u+(d?m*32:h));const[b,y]=lo(e,t,{checksumAddress:r,staticPosition:u});h+=y,g.push(b)}return e.setPosition(s+32),[g,32]}if(Ps(t)){const c=jn(e.readBytes(ul)),l=s+c,u=[];for(let f=0;f<o;++f){e.setPosition(l+f*32);const[d]=lo(e,t,{checksumAddress:r,staticPosition:l});u.push(d)}return e.setPosition(s+32),[u,32]}let i=0;const a=[];for(let c=0;c<o;++c){const[l,u]=lo(e,t,{checksumAddress:r,staticPosition:s+i});i+=u,a.push(l)}return[a,i]}function h5(e){return[M6(e.readBytes(32),{size:32}),32]}function p5(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const i=jn(e.readBytes(32));e.setPosition(n+i);const a=jn(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(a);return e.setPosition(n+32),[Vt(c),32]}return[Vt(e.readBytes(Number.parseInt(o,10),32)),32]}function m5(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?F6(o,{signed:n}):jn(o,{signed:n}),32]}function g5(e,t,n){const{checksumAddress:r,staticPosition:o}=n,s=t.components.length===0||t.components.some(({name:c})=>!c),i=s?[]:{};let a=0;if(Ps(t)){const c=jn(e.readBytes(ul)),l=o+c;for(let u=0;u<t.components.length;++u){const f=t.components[u];e.setPosition(l+a);const[d,h]=lo(e,f,{checksumAddress:r,staticPosition:l});a+=h,i[s?u:f==null?void 0:f.name]=d}return e.setPosition(o+32),[i,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[u,f]=lo(e,l,{checksumAddress:r,staticPosition:o});i[s?c:l==null?void 0:l.name]=u,a+=f}return[i,a]}function b5(e,{staticPosition:t}){const n=jn(e.readBytes(32)),r=t+n;e.setPosition(r);const o=jn(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const s=e.readBytes(o,32),i=D6(Ip(s));return e.setPosition(t+32),[i,32]}function y5({checksumAddress:e,parameters:t,values:n}){const r=[];for(let o=0;o<t.length;o++)r.push(Nu({checksumAddress:e,parameter:t[o],value:n[o]}));return r}function Nu({checksumAddress:e=!1,parameter:t,value:n}){const r=t,o=Mu(r.type);if(o){const[s,i]=o;return v5(n,{checksumAddress:e,length:s,parameter:{...r,type:i}})}if(r.type==="tuple")return k5(n,{checksumAddress:e,parameter:r});if(r.type==="address")return w5(n,{checksum:e});if(r.type==="bool")return C5(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const s=r.type.startsWith("int"),[,,i="256"]=jm.exec(r.type)??[];return A5(n,{signed:s,size:Number(i)})}if(r.type.startsWith("bytes"))return x5(n,{type:r.type});if(r.type==="string")return E5(n);throw new Lu(r.type)}function Fu(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?t+=32:t+=xt(a)}const n=[],r=[];let o=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?(n.push(Ze(t+o,{size:32})),r.push(a),o+=xt(a)):n.push(a)}return Ht(...n,...r)}function w5(e,t){const{checksum:n=!1}=t;return Aa(e,{strict:n}),{dynamic:!1,encoded:Nr(e.toLowerCase())}}function v5(e,t){const{checksumAddress:n,length:r,parameter:o}=t,s=r===null;if(!Array.isArray(e))throw new N5(e);if(!s&&e.length!==r)throw new R5({expectedLength:r,givenLength:e.length,type:`${o.type}[${r}]`});let i=!1;const a=[];for(let c=0;c<e.length;c++){const l=Nu({checksumAddress:n,parameter:o,value:e[c]});l.dynamic&&(i=!0),a.push(l)}if(s||i){const c=Fu(a);if(s){const l=Ze(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?Ht(l,c):l}}if(i)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:Ht(...a.map(({encoded:c})=>c))}}function x5(e,{type:t}){const[,n]=t.split("bytes"),r=xt(e);if(!n){let o=e;return r%32!==0&&(o=Fr(o,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:Ht(Nr(Ze(r,{size:32})),o)}}if(r!==Number.parseInt(n,10))throw new Sm({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Fr(e)}}function C5(e){if(typeof e!="boolean")throw new le(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Nr(jp(e))}}function A5(e,{signed:t,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new Pp({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:Ze(e,{size:32,signed:t})}}function E5(e){const t=bu(e),n=Math.ceil(xt(t)/32),r=[];for(let o=0;o<n;o++)r.push(Fr(sn(t,o*32,(o+1)*32)));return{dynamic:!0,encoded:Ht(Fr(Ze(xt(t),{size:32})),...r)}}function k5(e,t){const{checksumAddress:n,parameter:r}=t;let o=!1;const s=[];for(let i=0;i<r.components.length;i++){const a=r.components[i],c=Array.isArray(e)?i:a.name,l=Nu({checksumAddress:n,parameter:a,value:e[c]});s.push(l),l.dynamic&&(o=!0)}return{dynamic:o,encoded:o?Fu(s):Ht(...s.map(({encoded:i})=>i))}}function Mu(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Ps(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(Ps);const n=Mu(e.type);return!!(n&&Ps({...e,type:n[1]}))}const I5={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new S5({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new B5({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Af({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Af({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function j5(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(I5);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}class Af extends le{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class B5 extends le{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class S5 extends le{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function P5(e,t,n={}){const{as:r="Array",checksumAddress:o=!1}=n,s=typeof t=="string"?kp(t):t,i=j5(s);if(to(s)===0&&e.length>0)throw new T5;if(to(s)&&to(s)<32)throw new O5({data:typeof t=="string"?t:Vt(t),parameters:e,size:to(s)});let a=0;const c=r==="Array"?[]:{};for(let l=0;l<e.length;++l){const u=e[l];i.setPosition(a);const[f,d]=lo(i,u,{checksumAddress:o,staticPosition:0});a+=d,r==="Array"?c.push(f):c[u.name??l]=f}return c}function Du(e,t,n){const{checksumAddress:r=!1}={};if(e.length!==t.length)throw new Pm({expectedLength:e.length,givenLength:t.length});const o=y5({checksumAddress:r,parameters:e,values:t}),s=Fu(o);return s.length===0?"0x":s}function dl(e,t){if(e.length!==t.length)throw new Pm({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r];n.push(dl.encode(o,s))}return Ht(...n)}(function(e){function t(n,r,o=!1){if(n==="address"){const c=r;return Aa(c),Nr(c.toLowerCase(),o?32:0)}if(n==="string")return bu(r);if(n==="bytes")return r;if(n==="bool")return Nr(jp(r),o?32:1);const s=n.match(jm);if(s){const[c,l,u="256"]=s,f=Number.parseInt(u,10)/8;return Ze(r,{size:o?32:f,signed:l==="int"})}const i=n.match(u5);if(i){const[c,l]=i;if(Number.parseInt(l,10)!==(r.length-2)/2)throw new Sm({expectedSize:Number.parseInt(l,10),value:r});return Fr(r,o?32:0)}const a=n.match(l5);if(a&&Array.isArray(r)){const[c,l]=a,u=[];for(let f=0;f<r.length;f++)u.push(t(l,r[f],!0));return u.length===0?"0x":Ht(...u)}throw new Lu(n)}e.encode=t})(dl||(dl={}));function Bm(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?Kd(e):e}class O5 extends le{constructor({data:t,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Zr(n)})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class T5 extends le{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class R5 extends le{constructor({expectedLength:t,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class Sm extends le{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${xt(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Pm extends le{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
|
|
71
|
-
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class N5 extends le{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class Lu extends le{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function Om(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new ec({signature:e});if(typeof e.s>"u")throw new ec({signature:e});if(n&&typeof e.yParity>"u")throw new ec({signature:e});if(e.r<0n||e.r>xf)throw new $5({value:e.r});if(e.s<0n||e.s>xf)throw new q5({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new _u({value:e.yParity})}function F5(e){return Tm(Vt(e))}function Tm(e){if(e.length!==130&&e.length!==132)throw new _5({signature:e});const t=BigInt(sn(e,0,32)),n=BigInt(sn(e,32,64)),r=(()=>{const o=+`0x${e.slice(130)}`;if(!Number.isNaN(o))try{return Uu(o)}catch{throw new _u({value:o})}})();return typeof r>"u"?{r:t,s:n}:{r:t,s:n,yParity:r}}function M5(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return D5(e)}function D5(e){const t=typeof e=="string"?Tm(e):e instanceof Uint8Array?F5(e):typeof e.r=="string"?U5(e):e.v?L5(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Om(t),t}function L5(e){return{r:e.r,s:e.s,yParity:Uu(e.v)}}function U5(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=Uu(n)),typeof r!="number")throw new _u({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function Uu(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new W5({value:e})}class _5 extends le{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${xt(Q6(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class ec extends le{constructor({signature:t}){super(`Signature \`${Ep(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class $5 extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class q5 extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class _u extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class W5 extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function z5(e,t={}){return typeof e.chainId=="string"?Q5(e):{...e,...t.signature}}function Q5(e){const{address:t,chainId:n,nonce:r}=e,o=M5(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...o}}const H5="0x8010801080108010801080108010801080108010801080108010801080108010",V5=Bm("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Rm(e){if(typeof e=="string"){if(sn(e,-32)!==H5)throw new J5(e)}else Om(e.authorization)}function G5(e){Rm(e);const t=Sp(sn(e,-64,-32)),n=sn(e,-t-64,-64),r=sn(e,0,-t-64),[o,s,i]=P5(V5,n);return{authorization:z5({address:o.delegation,chainId:Number(o.chainId),nonce:o.nonce,yParity:o.yParity,r:o.r,s:o.s}),signature:r,...i&&i!=="0x"?{data:i,to:s}:{}}}function K5(e){try{return Rm(e),!0}catch{return!1}}let J5=class extends le{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};function Y5(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function X5(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?cn(e.nonce):void 0,storageProof:e.storageProof?Y5(e.storageProof):void 0}}async function Z5(e,{address:t,blockNumber:n,blockTag:r,storageKeys:o}){const s=r??"latest",i=n!==void 0?ee(n):void 0,a=await e.request({method:"eth_getProof",params:[t,o,i||s]});return X5(a)}async function e3(e,{address:t,blockNumber:n,blockTag:r="latest",slot:o}){const s=n!==void 0?ee(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,s||r]})}async function $u(e,{blockHash:t,blockNumber:n,blockTag:r,hash:o,index:s,sender:i,nonce:a}){var d,h,g;const c=r||"latest",l=n!==void 0?ee(n):void 0;let u=null;if(o?u=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?u=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,ee(s)]},{dedupe:!0}):typeof s=="number"?u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,ee(s)]},{dedupe:!!l}):i&&typeof a=="number"&&(u=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[i,ee(a)]},{dedupe:!0})),!u)throw new gp({blockHash:t,blockNumber:n,blockTag:c,hash:o,index:s});return(((g=(h=(d=e.chain)==null?void 0:d.formatters)==null?void 0:h.transaction)==null?void 0:g.format)||ku)(u,"getTransaction")}async function t3(e,{hash:t,transactionReceipt:n}){const[r,o]=await Promise.all([te(e,ni,"getBlockNumber")({}),t?te(e,$u,"getTransaction")({hash:t}):void 0]),s=(n==null?void 0:n.blockNumber)||(o==null?void 0:o.blockNumber);return s?r-s+1n:0n}async function Ti(e,{hash:t}){var o,s,i;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new bp({hash:t});return(((i=(s=(o=e.chain)==null?void 0:o.formatters)==null?void 0:s.transactionReceipt)==null?void 0:i.format)||hm)(n,"getTransactionReceipt")}async function Nm(e,t){var C;const{account:n,authorizationList:r,allowFailure:o=!0,blockNumber:s,blockOverrides:i,blockTag:a,stateOverride:c}=t,l=t.contracts,{batchSize:u=t.batchSize??1024,deployless:f=t.deployless??!1}=typeof((C=e.batch)==null?void 0:C.multicall)=="object"?e.batch.multicall:{},d=(()=>{if(t.multicallAddress)return t.multicallAddress;if(f)return null;if(e.chain)return zo({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),h=[[]];let g=0,m=0;for(let v=0;v<l.length;v++){const{abi:w,address:x,args:E,functionName:A}=l[v];try{const I=Ct({abi:w,args:E,functionName:A});m+=(I.length-2)/2,u>0&&m>u&&h[g].length>0&&(g++,m=(I.length-2)/2,h[g]=[]),h[g]=[...h[g],{allowFailure:!0,callData:I,target:x}]}catch(I){const S=Rr(I,{abi:w,address:x,args:E,docsPath:"/docs/contract/multicall",functionName:A,sender:n});if(!o)throw S;h[g]=[...h[g],{allowFailure:!0,callData:"0x",target:x}]}}const b=await Promise.allSettled(h.map(v=>te(e,Tt,"readContract")({...d===null?{code:yu}:{address:d},abi:jo,account:n,args:[v],authorizationList:r,blockNumber:s,blockOverrides:i,blockTag:a,functionName:"aggregate3",stateOverride:c}))),y=[];for(let v=0;v<b.length;v++){const w=b[v];if(w.status==="rejected"){if(!o)throw w.reason;for(let E=0;E<h[v].length;E++)y.push({status:"failure",error:w.reason,result:void 0});continue}const x=w.value;for(let E=0;E<x.length;E++){const{returnData:A,success:I}=x[E],{callData:S}=h[v][E],{abi:T,address:R,functionName:M,args:N}=l[y.length];try{if(S==="0x")throw new Qs;if(!I)throw new ba({data:A});const W=er({abi:T,args:N,data:A,functionName:M});y.push(o?{result:W,status:"success"}:W)}catch(W){const P=Rr(W,{abi:T,address:R,args:N,docsPath:"/docs/contract/multicall",functionName:M});if(!o)throw P;y.push({error:P,result:void 0,status:"failure"})}}}if(y.length!==l.length)throw new L("multicall results mismatch");return y}async function fl(e,t){const{blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",blocks:o,returnFullTransactions:s,traceTransfers:i,validation:a}=t;try{const c=[];for(const d of o){const h=d.blockOverrides?Tp(d.blockOverrides):void 0,g=d.calls.map(b=>{const y=b,C=y.account?Qe(y.account):void 0,v=y.abi?Ct(y):y.data,w={...y,account:C,data:y.dataSuffix?vt([v||"0x",y.dataSuffix]):v,from:y.from??(C==null?void 0:C.address)};return qr(w),Qo(w)}),m=d.stateOverrides?vu(d.stateOverrides):void 0;c.push({blockOverrides:h,calls:g,stateOverrides:m})}const u=(typeof n=="bigint"?ee(n):void 0)||r;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:s,traceTransfers:i,validation:a},u]})).map((d,h)=>({...Zp(d),calls:d.calls.map((g,m)=>{var T,R;const{abi:b,args:y,functionName:C,to:v}=o[h].calls[m],w=((T=g.error)==null?void 0:T.data)??g.returnData,x=BigInt(g.gasUsed),E=(R=g.logs)==null?void 0:R.map(M=>On(M)),A=g.status==="0x1"?"success":"failure",I=b&&A==="success"&&w!=="0x"?er({abi:b,data:w,functionName:C}):null,S=(()=>{if(A==="success")return;let M;if(w==="0x"?M=new Qs:w&&(M=new ba({data:w})),!!M)return Rr(M,{abi:b??[],address:v??"0x",args:y,functionName:C??"<unknown>"})})();return{data:w,gasUsed:x,logs:E,status:A,...A==="success"?{result:I}:{error:S}}})}))}catch(c){const l=c,u=wa(l,{});throw u instanceof Zs?l:u}}function hl(e){let t=!0,n="",r=0,o="",s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function","error",""].includes(o))o="";else if(o+=a,a===")"){s=!0;break}continue}if(a===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=a,n+=a}}if(!s)throw new le("Unable to normalize signature.");return o}function pl(e,t){const n=typeof e,r=t.type;switch(r){case"address":return ll(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,s)=>pl(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>pl(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Fm(e,t,n){for(const r in e){const o=e[r],s=t[r];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return Fm(o.components,s.components,n[r]);const i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?ll(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?ll(n[r],{strict:!1}):!1)return i}}function Mm(e,t={}){const{prepare:n=!0}=t,r=Array.isArray(e)||typeof e=="string"?Gd(e):e;return{...r,...n?{hash:no(r)}:{}}}function Ea(e,t,n){const{args:r=[],prepare:o=!0}=n??{},s=H6(t,{strict:!1}),i=e.filter(l=>s?l.type==="function"||l.type==="error"?Dm(l)===sn(t,0,4):l.type==="event"?no(l)===t:!1:"name"in l&&l.name===t);if(i.length===0)throw new Gi({name:t});if(i.length===1)return{...i[0],...o?{hash:no(i[0])}:{}};let a;for(const l of i){if(!("inputs"in l))continue;if(!r||r.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...o?{hash:no(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==r.length)continue;if(r.every((f,d)=>{const h="inputs"in l&&l.inputs[d];return h?pl(f,h):!1})){if(a&&"inputs"in a&&a.inputs){const f=Fm(l.inputs,a.inputs,r);if(f)throw new r3({abiItem:l,type:f[0]},{abiItem:a,type:f[1]})}a=l}}const c=(()=>{if(a)return a;const[l,...u]=i;return{...l,overloads:u}})();if(!c)throw new Gi({name:t});return{...c,...o?{hash:no(c)}:{}}}function Dm(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Ea(n,r)}return e[0]})();return sn(no(t),0,4)}function n3(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,o]=e;return Ea(r,o)}return e[0]})(),n=typeof t=="string"?t:qi(t);return hl(n)}function no(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Ea(n,r)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:km(bu(n3(t)))}class r3 extends le{constructor(t,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${hl(qi(t.abiItem))}\`, and`,`\`${n.type}\` in \`${hl(qi(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class Gi extends le{constructor({name:t,data:n,type:r="item"}){const o=t?` with name "${t}"`:n?` with data "${n}"`:"";super(`ABI ${r}${o} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function o3(...e){var s;const[t,n]=(()=>{if(Array.isArray(e[0])){const[i,a]=e;return[i3(i),a]}return e})(),{bytecode:r,args:o}=n;return Ht(r,(s=t.inputs)!=null&&s.length&&(o!=null&&o.length)?Du(t.inputs,o):"0x")}function s3(e){return Mm(e)}function i3(e){const t=e.find(n=>n.type==="constructor");if(!t)throw new Gi({name:"constructor"});return t}function a3(...e){const[t,n=[]]=(()=>{if(Array.isArray(e[0])){const[l,u,f]=e;return[Ef(l,u,{args:f}),f]}const[a,c]=e;return[a,c]})(),{overloads:r}=t,o=r?Ef([t,...r],t.name,{args:n}):t,s=c3(o),i=n.length>0?Du(o.inputs,n):void 0;return i?Ht(s,i):s}function Gr(e,t={}){return Mm(e,t)}function Ef(e,t,n){const r=Ea(e,t,n);if(r.type!=="function")throw new Gi({name:t,type:"function"});return r}function c3(e){return Dm(e)}const l3="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Yt="0x0000000000000000000000000000000000000000",u3="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function d3(e,t){const{blockNumber:n,blockTag:r,calls:o,stateOverrides:s,traceAssetChanges:i,traceTransfers:a,validation:c}=t,l=t.account?Qe(t.account):void 0;if(i&&!l)throw new L("`account` is required when `traceAssetChanges` is true");const u=l?o3(s3("constructor(bytes, bytes)"),{bytecode:Rp,args:[u3,a3(Gr("function getBalance(address)"),[l.address])]}):void 0,f=i?await Promise.all(t.calls.map(async F=>{if(!F.data&&!F.abi)return;const{accessList:U}=await Wp(e,{account:l.address,...F,data:F.abi?Ct(F):F.data});return U.map(({address:q,storageKeys:ne})=>ne.length>0?q:null)})).then(F=>F.flat().filter(Boolean)):[],d=await fl(e,{blockNumber:n,blockTag:r,blocks:[...i?[{calls:[{data:u}],stateOverrides:s},{calls:f.map((F,U)=>({abi:[Gr("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:F,from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]}]:[],{calls:[...o,{}].map(F=>({...F,from:l==null?void 0:l.address})),stateOverrides:s},...i?[{calls:[{data:u}]},{calls:f.map((F,U)=>({abi:[Gr("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:F,from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]},{calls:f.map((F,U)=>({to:F,abi:[Gr("function decimals() returns (uint256)")],functionName:"decimals",from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]},{calls:f.map((F,U)=>({to:F,abi:[Gr("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]},{calls:f.map((F,U)=>({to:F,abi:[Gr("function symbol() returns (string)")],functionName:"symbol",from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]}]:[]],traceTransfers:a,validation:c}),h=i?d[2]:d[0],[g,m,,b,y,C,v,w]=i?d:[],{calls:x,...E}=h,A=x.slice(0,-1)??[],I=(g==null?void 0:g.calls)??[],S=(m==null?void 0:m.calls)??[],T=[...I,...S].map(F=>F.status==="success"?an(F.data):null),R=(b==null?void 0:b.calls)??[],M=(y==null?void 0:y.calls)??[],N=[...R,...M].map(F=>F.status==="success"?an(F.data):null),W=((C==null?void 0:C.calls)??[]).map(F=>F.status==="success"?F.result:null),P=((w==null?void 0:w.calls)??[]).map(F=>F.status==="success"?F.result:null),D=((v==null?void 0:v.calls)??[]).map(F=>F.status==="success"?F.result:null),_=[];for(const[F,U]of N.entries()){const q=T[F];if(typeof U!="bigint"||typeof q!="bigint")continue;const ne=W[F-1],ce=P[F-1],xe=D[F-1],Q=F===0?{address:l3,decimals:18,symbol:"ETH"}:{address:f[F-1],decimals:xe||ne?Number(ne??1):void 0,symbol:ce??void 0};_.some(G=>G.token.address===Q.address)||_.push({token:Q,value:{pre:q,post:U,diff:U-q}})}return{assetChanges:_,block:E,results:A}}async function f3(e,t){var u;const{abi:n,address:r,args:o,functionName:s,dataSuffix:i=typeof e.dataSuffix=="string"?e.dataSuffix:(u=e.dataSuffix)==null?void 0:u.value,...a}=t,c=a.account?Qe(a.account):e.account,l=Ct({abi:n,args:o,functionName:s});try{const{data:f}=await te(e,Ho,"call")({batch:!1,data:`${l}${i?i.replace("0x",""):""}`,to:r,...a,account:c}),d=er({abi:n,args:o,functionName:s,data:f||"0x"}),h=n.filter(g=>"name"in g&&g.name===t.functionName);return{result:d,request:{abi:h,address:r,args:o,dataSuffix:i,functionName:s,...a,account:c}}}catch(f){throw Rr(f,{abi:n,address:r,args:o,docsPath:"/docs/contract/simulateContract",functionName:s,sender:c==null?void 0:c.address})}}async function ka(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}const Lm="0x6492649264926492649264926492649264926492649264926492649264926492";function h3(e){if(sn(e,-32)!==Lm)throw new g3(e)}function p3(e){const{data:t,signature:n,to:r}=e;return Ht(Du(Bm("address, bytes, bytes"),[r,t,n]),Lm)}function m3(e){try{return h3(e),!0}catch{return!1}}class g3 extends le{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}class Um extends iu{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,gy(t);const r=fa(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),Oo(s)}update(t){return Po(this),this.iHash.update(t),this}digestInto(t){Po(this),Or(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:a}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const _m=(e,t,n)=>new Um(e,t).update(n).digest();_m.create=(e,t)=>new Um(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qu=BigInt(0),ml=BigInt(1);function oi(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Wu(e){if(!oi(e))throw new Error("Uint8Array expected")}function Os(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function bi(e){const t=e.toString(16);return t.length&1?"0"+t:t}function $m(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?qu:BigInt("0x"+e)}const qm=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",b3=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ts(e){if(Wu(e),qm)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=b3[e[n]];return t}const pn={_0:48,_9:57,A:65,F:70,a:97,f:102};function kf(e){if(e>=pn._0&&e<=pn._9)return e-pn._0;if(e>=pn.A&&e<=pn.F)return e-(pn.A-10);if(e>=pn.a&&e<=pn.f)return e-(pn.a-10)}function Ki(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(qm)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=kf(e.charCodeAt(s)),a=kf(e.charCodeAt(s+1));if(i===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[o]=i*16+a}return r}function Pr(e){return $m(Ts(e))}function Wm(e){return Wu(e),$m(Ts(Uint8Array.from(e).reverse()))}function si(e,t){return Ki(e.toString(16).padStart(t*2,"0"))}function zm(e,t){return si(e,t).reverse()}function jt(e,t,n){let r;if(typeof t=="string")try{r=Ki(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(oi(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}function Ji(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];Wu(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}const tc=e=>typeof e=="bigint"&&qu<=e;function zu(e,t,n){return tc(e)&&tc(t)&&tc(n)&&t<=e&&e<n}function uo(e,t,n,r){if(!zu(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function y3(e){let t;for(t=0;e>qu;e>>=ml,t+=1);return t}const Ia=e=>(ml<<BigInt(e))-ml,nc=e=>new Uint8Array(e),If=e=>Uint8Array.from(e);function w3(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=nc(e),o=nc(e),s=0;const i=()=>{r.fill(1),o.fill(0),s=0},a=(...f)=>n(o,r,...f),c=(f=nc(0))=>{o=a(If([0]),f),r=a(),f.length!==0&&(o=a(If([1]),f),r=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const d=[];for(;f<t;){r=a();const h=r.slice();d.push(h),f+=r.length}return Ji(...d)};return(f,d)=>{i(),c(f);let h;for(;!(h=d(l()));)c();return i(),h}}const v3={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||oi(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function ja(e,t,n={}){const r=(o,s,i)=>{const a=v3[s];if(typeof a!="function")throw new Error("invalid validator function");const c=e[o];if(!(i&&c===void 0)&&!a(c,e))throw new Error("param "+String(o)+" is invalid. Expected "+s+", got "+c)};for(const[o,s]of Object.entries(t))r(o,s,!1);for(const[o,s]of Object.entries(n))r(o,s,!0);return e}function jf(e){const t=new WeakMap;return(n,...r)=>{const o=t.get(n);if(o!==void 0)return o;const s=e(n,...r);return t.set(n,s),s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ut=BigInt(0),et=BigInt(1),gr=BigInt(2),x3=BigInt(3),Qm=BigInt(4),Hm=BigInt(5),Vm=BigInt(8);function lt(e,t){const n=e%t;return n>=ut?n:t+n}function It(e,t,n){let r=e;for(;t-- >ut;)r*=r,r%=n;return r}function gl(e,t){if(e===ut)throw new Error("invert: expected non-zero number");if(t<=ut)throw new Error("invert: expected positive modulus, got "+t);let n=lt(e,t),r=t,o=ut,s=et;for(;n!==ut;){const a=r/n,c=r%n,l=o-s*a;r=n,n=c,o=s,s=l}if(r!==et)throw new Error("invert: does not exist");return lt(o,t)}function Gm(e,t){const n=(e.ORDER+et)/Qm,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function C3(e,t){const n=(e.ORDER-Hm)/Vm,r=e.mul(t,gr),o=e.pow(r,n),s=e.mul(t,o),i=e.mul(e.mul(s,gr),o),a=e.mul(s,e.sub(i,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function A3(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-et,n=0;for(;t%gr===ut;)t/=gr,n++;let r=gr;const o=Qu(e);for(;Bf(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Gm;let s=o.pow(r,t);const i=(t+et)/gr;return function(c,l){if(c.is0(l))return l;if(Bf(c,l)!==1)throw new Error("Cannot find square root");let u=n,f=c.mul(c.ONE,s),d=c.pow(l,t),h=c.pow(l,i);for(;!c.eql(d,c.ONE);){if(c.is0(d))return c.ZERO;let g=1,m=c.sqr(d);for(;!c.eql(m,c.ONE);)if(g++,m=c.sqr(m),g===u)throw new Error("Cannot find square root");const b=et<<BigInt(u-g-1),y=c.pow(f,b);u=g,f=c.sqr(y),d=c.mul(d,f),h=c.mul(h,y)}return h}}function E3(e){return e%Qm===x3?Gm:e%Vm===Hm?C3:A3(e)}const k3=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function I3(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=k3.reduce((r,o)=>(r[o]="function",r),t);return ja(e,n)}function j3(e,t,n){if(n<ut)throw new Error("invalid exponent, negatives unsupported");if(n===ut)return e.ONE;if(n===et)return t;let r=e.ONE,o=t;for(;n>ut;)n&et&&(r=e.mul(r,o)),o=e.sqr(o),n>>=et;return r}function Km(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((i,a,c)=>e.is0(a)?i:(r[c]=i,e.mul(i,a)),e.ONE),s=e.inv(o);return t.reduceRight((i,a,c)=>e.is0(a)?i:(r[c]=e.mul(i,r[c]),e.mul(i,a)),s),r}function Bf(e,t){const n=(e.ORDER-et)/gr,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),i=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!i)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function Jm(e,t){t!==void 0&&ds(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Qu(e,t,n=!1,r={}){if(e<=ut)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:o,nByteLength:s}=Jm(e,t);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let i;const a=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:s,MASK:Ia(o),ZERO:ut,ONE:et,create:c=>lt(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return ut<=c&&c<e},is0:c=>c===ut,isOdd:c=>(c&et)===et,neg:c=>lt(-c,e),eql:(c,l)=>c===l,sqr:c=>lt(c*c,e),add:(c,l)=>lt(c+l,e),sub:(c,l)=>lt(c-l,e),mul:(c,l)=>lt(c*l,e),pow:(c,l)=>j3(a,c,l),div:(c,l)=>lt(c*gl(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>gl(c,e),sqrt:r.sqrt||(c=>(i||(i=E3(e)),i(a,c))),toBytes:c=>n?zm(c,s):si(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return n?Wm(c):Pr(c)},invertBatch:c=>Km(a,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(a)}function Ym(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Xm(e){const t=Ym(e);return t+Math.ceil(t/2)}function B3(e,t,n=!1){const r=e.length,o=Ym(t),s=Xm(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const i=n?Wm(e):Pr(e),a=lt(i,t-et)+et;return n?zm(a,o):si(a,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Sf=BigInt(0),bl=BigInt(1);function rc(e,t){const n=t.negate();return e?n:t}function Zm(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function oc(e,t){Zm(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),o=2**e,s=Ia(e),i=BigInt(e);return{windows:n,windowSize:r,mask:s,maxNumber:o,shiftBy:i}}function Pf(e,t,n){const{windowSize:r,mask:o,maxNumber:s,shiftBy:i}=n;let a=Number(e&o),c=e>>i;a>r&&(a-=s,c+=bl);const l=t*r,u=l+Math.abs(a)-1,f=a===0,d=a<0,h=t%2!==0;return{nextN:c,offset:u,isZero:f,isNeg:d,isNegF:h,offsetF:l}}function S3(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function P3(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const sc=new WeakMap,e1=new WeakMap;function ic(e){return e1.get(e)||1}function O3(e,t){return{constTimeNegate:rc,hasPrecomputes(n){return ic(n)!==1},unsafeLadder(n,r,o=e.ZERO){let s=n;for(;r>Sf;)r&bl&&(o=o.add(s)),s=s.double(),r>>=bl;return o},precomputeWindow(n,r){const{windows:o,windowSize:s}=oc(r,t),i=[];let a=n,c=a;for(let l=0;l<o;l++){c=a,i.push(c);for(let u=1;u<s;u++)c=c.add(a),i.push(c);a=c.double()}return i},wNAF(n,r,o){let s=e.ZERO,i=e.BASE;const a=oc(n,t);for(let c=0;c<a.windows;c++){const{nextN:l,offset:u,isZero:f,isNeg:d,isNegF:h,offsetF:g}=Pf(o,c,a);o=l,f?i=i.add(rc(h,r[g])):s=s.add(rc(d,r[u]))}return{p:s,f:i}},wNAFUnsafe(n,r,o,s=e.ZERO){const i=oc(n,t);for(let a=0;a<i.windows&&o!==Sf;a++){const{nextN:c,offset:l,isZero:u,isNeg:f}=Pf(o,a,i);if(o=c,!u){const d=r[l];s=s.add(f?d.negate():d)}}return s},getPrecomputes(n,r,o){let s=sc.get(r);return s||(s=this.precomputeWindow(r,n),n!==1&&sc.set(r,o(s))),s},wNAFCached(n,r,o){const s=ic(n);return this.wNAF(s,this.getPrecomputes(s,n,o),r)},wNAFCachedUnsafe(n,r,o,s){const i=ic(n);return i===1?this.unsafeLadder(n,r,s):this.wNAFUnsafe(i,this.getPrecomputes(i,n,o),r,s)},setWindowSize(n,r){Zm(r,t),e1.set(n,r),sc.delete(n)}}}function T3(e,t,n,r){S3(n,e),P3(r,t);const o=n.length,s=r.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const i=e.ZERO,a=y3(BigInt(o));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const l=Ia(c),u=new Array(Number(l)+1).fill(i),f=Math.floor((t.BITS-1)/c)*c;let d=i;for(let h=f;h>=0;h-=c){u.fill(i);for(let m=0;m<s;m++){const b=r[m],y=Number(b>>BigInt(h)&l);u[y]=u[y].add(n[m])}let g=i;for(let m=u.length-1,b=i;m>0;m--)b=b.add(u[m]),g=g.add(b);if(d=d.add(g),h!==0)for(let m=0;m<c;m++)d=d.double()}return d}function t1(e){return I3(e.Fp),ja(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Jm(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Of(e){e.lowS!==void 0&&Os("lowS",e.lowS),e.prehash!==void 0&&Os("prehash",e.prehash)}function R3(e){const t=t1(e);ja(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class N3 extends Error{constructor(t=""){super(t)}}const yn={Err:N3,_tlv:{encode:(e,t)=>{const{Err:n}=yn;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=bi(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?bi(o.length/2|128):"";return bi(e)+s+o+t},decode(e,t){const{Err:n}=yn;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++],s=!!(o&128);let i=0;if(!s)i=o;else{const c=o&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const l=t.subarray(r,r+c);if(l.length!==c)throw new n("tlv.decode: length bytes not complete");if(l[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const u of l)i=i<<8|u;if(r+=c,i<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+i);if(a.length!==i)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+i)}}},_int:{encode(e){const{Err:t}=yn;if(e<En)throw new t("integer: negative integers are not allowed");let n=bi(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=yn;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return Pr(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=yn,o=jt("signature",e),{v:s,l:i}=r.decode(48,o);if(i.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,s),{v:l,l:u}=r.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(l)}},hexFromSig(e){const{_tlv:t,_int:n}=yn,r=t.encode(2,n.encode(e.r)),o=t.encode(2,n.encode(e.s)),s=r+o;return t.encode(48,s)}};function ac(e,t){return Ts(si(e,t))}const En=BigInt(0),Ue=BigInt(1);BigInt(2);const cc=BigInt(3),F3=BigInt(4);function M3(e){const t=R3(e),{Fp:n}=t,r=Qu(t.n,t.nBitLength),o=t.toBytes||((v,w,x)=>{const E=w.toAffine();return Ji(Uint8Array.from([4]),n.toBytes(E.x),n.toBytes(E.y))}),s=t.fromBytes||(v=>{const w=v.subarray(1),x=n.fromBytes(w.subarray(0,n.BYTES)),E=n.fromBytes(w.subarray(n.BYTES,2*n.BYTES));return{x,y:E}});function i(v){const{a:w,b:x}=t,E=n.sqr(v),A=n.mul(E,v);return n.add(n.add(A,n.mul(v,w)),x)}function a(v,w){const x=n.sqr(w),E=i(v);return n.eql(x,E)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,cc),F3),l=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,l)))throw new Error("bad curve params: a or b");function u(v){return zu(v,Ue,t.n)}function f(v){const{allowedPrivateKeyLengths:w,nByteLength:x,wrapPrivateKey:E,n:A}=t;if(w&&typeof v!="bigint"){if(oi(v)&&(v=Ts(v)),typeof v!="string"||!w.includes(v.length))throw new Error("invalid private key");v=v.padStart(x*2,"0")}let I;try{I=typeof v=="bigint"?v:Pr(jt("private key",v,x))}catch{throw new Error("invalid private key, expected hex or "+x+" bytes, got "+typeof v)}return E&&(I=lt(I,A)),uo("private key",I,Ue,A),I}function d(v){if(!(v instanceof m))throw new Error("ProjectivePoint expected")}const h=jf((v,w)=>{const{px:x,py:E,pz:A}=v;if(n.eql(A,n.ONE))return{x,y:E};const I=v.is0();w==null&&(w=I?n.ONE:n.inv(A));const S=n.mul(x,w),T=n.mul(E,w),R=n.mul(A,w);if(I)return{x:n.ZERO,y:n.ZERO};if(!n.eql(R,n.ONE))throw new Error("invZ was invalid");return{x:S,y:T}}),g=jf(v=>{if(v.is0()){if(t.allowInfinityPoint&&!n.is0(v.py))return;throw new Error("bad point: ZERO")}const{x:w,y:x}=v.toAffine();if(!n.isValid(w)||!n.isValid(x))throw new Error("bad point: x or y not FE");if(!a(w,x))throw new Error("bad point: equation left != right");if(!v.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class m{constructor(w,x,E){if(w==null||!n.isValid(w))throw new Error("x required");if(x==null||!n.isValid(x)||n.is0(x))throw new Error("y required");if(E==null||!n.isValid(E))throw new Error("z required");this.px=w,this.py=x,this.pz=E,Object.freeze(this)}static fromAffine(w){const{x,y:E}=w||{};if(!w||!n.isValid(x)||!n.isValid(E))throw new Error("invalid affine point");if(w instanceof m)throw new Error("projective point not allowed");const A=I=>n.eql(I,n.ZERO);return A(x)&&A(E)?m.ZERO:new m(x,E,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(w){const x=Km(n,w.map(E=>E.pz));return w.map((E,A)=>E.toAffine(x[A])).map(m.fromAffine)}static fromHex(w){const x=m.fromAffine(s(jt("pointHex",w)));return x.assertValidity(),x}static fromPrivateKey(w){return m.BASE.multiply(f(w))}static msm(w,x){return T3(m,r,w,x)}_setWindowSize(w){C.setWindowSize(this,w)}assertValidity(){g(this)}hasEvenY(){const{y:w}=this.toAffine();if(n.isOdd)return!n.isOdd(w);throw new Error("Field doesn't support isOdd")}equals(w){d(w);const{px:x,py:E,pz:A}=this,{px:I,py:S,pz:T}=w,R=n.eql(n.mul(x,T),n.mul(I,A)),M=n.eql(n.mul(E,T),n.mul(S,A));return R&&M}negate(){return new m(this.px,n.neg(this.py),this.pz)}double(){const{a:w,b:x}=t,E=n.mul(x,cc),{px:A,py:I,pz:S}=this;let T=n.ZERO,R=n.ZERO,M=n.ZERO,N=n.mul(A,A),W=n.mul(I,I),P=n.mul(S,S),D=n.mul(A,I);return D=n.add(D,D),M=n.mul(A,S),M=n.add(M,M),T=n.mul(w,M),R=n.mul(E,P),R=n.add(T,R),T=n.sub(W,R),R=n.add(W,R),R=n.mul(T,R),T=n.mul(D,T),M=n.mul(E,M),P=n.mul(w,P),D=n.sub(N,P),D=n.mul(w,D),D=n.add(D,M),M=n.add(N,N),N=n.add(M,N),N=n.add(N,P),N=n.mul(N,D),R=n.add(R,N),P=n.mul(I,S),P=n.add(P,P),N=n.mul(P,D),T=n.sub(T,N),M=n.mul(P,W),M=n.add(M,M),M=n.add(M,M),new m(T,R,M)}add(w){d(w);const{px:x,py:E,pz:A}=this,{px:I,py:S,pz:T}=w;let R=n.ZERO,M=n.ZERO,N=n.ZERO;const W=t.a,P=n.mul(t.b,cc);let D=n.mul(x,I),_=n.mul(E,S),F=n.mul(A,T),U=n.add(x,E),q=n.add(I,S);U=n.mul(U,q),q=n.add(D,_),U=n.sub(U,q),q=n.add(x,A);let ne=n.add(I,T);return q=n.mul(q,ne),ne=n.add(D,F),q=n.sub(q,ne),ne=n.add(E,A),R=n.add(S,T),ne=n.mul(ne,R),R=n.add(_,F),ne=n.sub(ne,R),N=n.mul(W,q),R=n.mul(P,F),N=n.add(R,N),R=n.sub(_,N),N=n.add(_,N),M=n.mul(R,N),_=n.add(D,D),_=n.add(_,D),F=n.mul(W,F),q=n.mul(P,q),_=n.add(_,F),F=n.sub(D,F),F=n.mul(W,F),q=n.add(q,F),D=n.mul(_,q),M=n.add(M,D),D=n.mul(ne,q),R=n.mul(U,R),R=n.sub(R,D),D=n.mul(U,_),N=n.mul(ne,N),N=n.add(N,D),new m(R,M,N)}subtract(w){return this.add(w.negate())}is0(){return this.equals(m.ZERO)}wNAF(w){return C.wNAFCached(this,w,m.normalizeZ)}multiplyUnsafe(w){const{endo:x,n:E}=t;uo("scalar",w,En,E);const A=m.ZERO;if(w===En)return A;if(this.is0()||w===Ue)return this;if(!x||C.hasPrecomputes(this))return C.wNAFCachedUnsafe(this,w,m.normalizeZ);let{k1neg:I,k1:S,k2neg:T,k2:R}=x.splitScalar(w),M=A,N=A,W=this;for(;S>En||R>En;)S&Ue&&(M=M.add(W)),R&Ue&&(N=N.add(W)),W=W.double(),S>>=Ue,R>>=Ue;return I&&(M=M.negate()),T&&(N=N.negate()),N=new m(n.mul(N.px,x.beta),N.py,N.pz),M.add(N)}multiply(w){const{endo:x,n:E}=t;uo("scalar",w,Ue,E);let A,I;if(x){const{k1neg:S,k1:T,k2neg:R,k2:M}=x.splitScalar(w);let{p:N,f:W}=this.wNAF(T),{p:P,f:D}=this.wNAF(M);N=C.constTimeNegate(S,N),P=C.constTimeNegate(R,P),P=new m(n.mul(P.px,x.beta),P.py,P.pz),A=N.add(P),I=W.add(D)}else{const{p:S,f:T}=this.wNAF(w);A=S,I=T}return m.normalizeZ([A,I])[0]}multiplyAndAddUnsafe(w,x,E){const A=m.BASE,I=(T,R)=>R===En||R===Ue||!T.equals(A)?T.multiplyUnsafe(R):T.multiply(R),S=I(this,x).add(I(w,E));return S.is0()?void 0:S}toAffine(w){return h(this,w)}isTorsionFree(){const{h:w,isTorsionFree:x}=t;if(w===Ue)return!0;if(x)return x(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:w,clearCofactor:x}=t;return w===Ue?this:x?x(m,this):this.multiplyUnsafe(t.h)}toRawBytes(w=!0){return Os("isCompressed",w),this.assertValidity(),o(m,this,w)}toHex(w=!0){return Os("isCompressed",w),Ts(this.toRawBytes(w))}}m.BASE=new m(t.Gx,t.Gy,n.ONE),m.ZERO=new m(n.ZERO,n.ONE,n.ZERO);const{endo:b,nBitLength:y}=t,C=O3(m,b?Math.ceil(y/2):y);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:f,weierstrassEquation:i,isWithinCurveOrder:u}}function D3(e){const t=t1(e);return ja(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function L3(e){const t=D3(e),{Fp:n,n:r,nByteLength:o,nBitLength:s}=t,i=n.BYTES+1,a=2*n.BYTES+1;function c(P){return lt(P,r)}function l(P){return gl(P,r)}const{ProjectivePoint:u,normPrivateKeyToScalar:f,weierstrassEquation:d,isWithinCurveOrder:h}=M3({...t,toBytes(P,D,_){const F=D.toAffine(),U=n.toBytes(F.x),q=Ji;return Os("isCompressed",_),_?q(Uint8Array.from([D.hasEvenY()?2:3]),U):q(Uint8Array.from([4]),U,n.toBytes(F.y))},fromBytes(P){const D=P.length,_=P[0],F=P.subarray(1);if(D===i&&(_===2||_===3)){const U=Pr(F);if(!zu(U,Ue,n.ORDER))throw new Error("Point is not on curve");const q=d(U);let ne;try{ne=n.sqrt(q)}catch(Q){const G=Q instanceof Error?": "+Q.message:"";throw new Error("Point is not on curve"+G)}const ce=(ne&Ue)===Ue;return(_&1)===1!==ce&&(ne=n.neg(ne)),{x:U,y:ne}}else if(D===a&&_===4){const U=n.fromBytes(F.subarray(0,n.BYTES)),q=n.fromBytes(F.subarray(n.BYTES,2*n.BYTES));return{x:U,y:q}}else{const U=i,q=a;throw new Error("invalid Point, expected length of "+U+", or uncompressed "+q+", got "+D)}}});function g(P){const D=r>>Ue;return P>D}function m(P){return g(P)?c(-P):P}const b=(P,D,_)=>Pr(P.slice(D,_));class y{constructor(D,_,F){uo("r",D,Ue,r),uo("s",_,Ue,r),this.r=D,this.s=_,F!=null&&(this.recovery=F),Object.freeze(this)}static fromCompact(D){const _=o;return D=jt("compactSignature",D,_*2),new y(b(D,0,_),b(D,_,2*_))}static fromDER(D){const{r:_,s:F}=yn.toSig(jt("DER",D));return new y(_,F)}assertValidity(){}addRecoveryBit(D){return new y(this.r,this.s,D)}recoverPublicKey(D){const{r:_,s:F,recovery:U}=this,q=A(jt("msgHash",D));if(U==null||![0,1,2,3].includes(U))throw new Error("recovery id invalid");const ne=U===2||U===3?_+t.n:_;if(ne>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const ce=U&1?"03":"02",xe=u.fromHex(ce+ac(ne,n.BYTES)),Q=l(ne),G=c(-q*Q),oe=c(F*Q),ae=u.BASE.multiplyAndAddUnsafe(xe,G,oe);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Ki(this.toDERHex())}toDERHex(){return yn.hexFromSig(this)}toCompactRawBytes(){return Ki(this.toCompactHex())}toCompactHex(){const D=o;return ac(this.r,D)+ac(this.s,D)}}const C={isValidPrivateKey(P){try{return f(P),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const P=Xm(t.n);return B3(t.randomBytes(P),t.n)},precompute(P=8,D=u.BASE){return D._setWindowSize(P),D.multiply(BigInt(3)),D}};function v(P,D=!0){return u.fromPrivateKey(P).toRawBytes(D)}function w(P){if(typeof P=="bigint")return!1;if(P instanceof u)return!0;const _=jt("key",P).length,F=n.BYTES,U=F+1,q=2*F+1;if(!(t.allowedPrivateKeyLengths||o===U))return _===U||_===q}function x(P,D,_=!0){if(w(P)===!0)throw new Error("first arg must be private key");if(w(D)===!1)throw new Error("second arg must be public key");return u.fromHex(D).multiply(f(P)).toRawBytes(_)}const E=t.bits2int||function(P){if(P.length>8192)throw new Error("input is too large");const D=Pr(P),_=P.length*8-s;return _>0?D>>BigInt(_):D},A=t.bits2int_modN||function(P){return c(E(P))},I=Ia(s);function S(P){return uo("num < 2^"+s,P,En,I),si(P,o)}function T(P,D,_=R){if(["recovered","canonical"].some(Oe=>Oe in _))throw new Error("sign() legacy options not supported");const{hash:F,randomBytes:U}=t;let{lowS:q,prehash:ne,extraEntropy:ce}=_;q==null&&(q=!0),P=jt("msgHash",P),Of(_),ne&&(P=jt("prehashed msgHash",F(P)));const xe=A(P),Q=f(D),G=[S(Q),S(xe)];if(ce!=null&&ce!==!1){const Oe=ce===!0?U(n.BYTES):ce;G.push(jt("extraEntropy",Oe))}const oe=Ji(...G),ae=xe;function Ie(Oe){const Se=E(Oe);if(!h(Se))return;const Nt=l(Se),rt=u.BASE.multiply(Se).toAffine(),ot=c(rt.x);if(ot===En)return;const At=c(Nt*c(ae+ot*Q));if(At===En)return;let K=(rt.x===ot?0:2)|Number(rt.y&Ue),de=At;return q&&g(At)&&(de=m(At),K^=1),new y(ot,de,K)}return{seed:oe,k2sig:Ie}}const R={lowS:t.lowS,prehash:!1},M={lowS:t.lowS,prehash:!1};function N(P,D,_=R){const{seed:F,k2sig:U}=T(P,D,_),q=t;return w3(q.hash.outputLen,q.nByteLength,q.hmac)(F,U)}u.BASE._setWindowSize(8);function W(P,D,_,F=M){var K;const U=P;D=jt("msgHash",D),_=jt("publicKey",_);const{lowS:q,prehash:ne,format:ce}=F;if(Of(F),"strict"in F)throw new Error("options.strict was renamed to lowS");if(ce!==void 0&&ce!=="compact"&&ce!=="der")throw new Error("format must be compact or der");const xe=typeof U=="string"||oi(U),Q=!xe&&!ce&&typeof U=="object"&&U!==null&&typeof U.r=="bigint"&&typeof U.s=="bigint";if(!xe&&!Q)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let G,oe;try{if(Q&&(G=new y(U.r,U.s)),xe){try{ce!=="compact"&&(G=y.fromDER(U))}catch(de){if(!(de instanceof yn.Err))throw de}!G&&ce!=="der"&&(G=y.fromCompact(U))}oe=u.fromHex(_)}catch{return!1}if(!G||q&&G.hasHighS())return!1;ne&&(D=t.hash(D));const{r:ae,s:Ie}=G,Oe=A(D),Se=l(Ie),Nt=c(Oe*Se),rt=c(ae*Se),ot=(K=u.BASE.multiplyAndAddUnsafe(oe,Nt,rt))==null?void 0:K.toAffine();return ot?c(ot.x)===ae:!1}return{CURVE:t,getPublicKey:v,getSharedSecret:x,sign:N,verify:W,ProjectivePoint:u,Signature:y,utils:C}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function U3(e){return{hash:e,hmac:(t,...n)=>_m(e,t,Cy(...n)),randomBytes:Ay}}function _3(e,t){const n=r=>L3({...e,...U3(r)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const n1=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Tf=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),$3=BigInt(0),q3=BigInt(1),yl=BigInt(2),Rf=(e,t)=>(e+t/yl)/t;function W3(e){const t=n1,n=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,f=It(u,n,t)*u%t,d=It(f,n,t)*u%t,h=It(d,yl,t)*l%t,g=It(h,o,t)*h%t,m=It(g,s,t)*g%t,b=It(m,a,t)*m%t,y=It(b,c,t)*b%t,C=It(y,a,t)*m%t,v=It(C,n,t)*u%t,w=It(v,i,t)*g%t,x=It(w,r,t)*l%t,E=It(x,yl,t);if(!wl.eql(wl.sqr(E),e))throw new Error("Cannot find square root");return E}const wl=Qu(n1,void 0,void 0,{sqrt:W3}),r1=_3({a:$3,b:BigInt(7),Fp:wl,n:Tf,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Tf,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-q3*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,i=BigInt("0x100000000000000000000000000000000"),a=Rf(s*e,t),c=Rf(-r*e,t);let l=lt(e-a*n-c*o,t),u=lt(-a*r-c*s,t);const f=l>i,d=u>i;if(f&&(l=t-l),d&&(u=t-u),l>i||u>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:l,k2neg:d,k2:u}}}},om),z3=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:r1},Symbol.toStringTag,{value:"Module"}));function Q3({r:e,s:t,to:n="hex",v:r,yParity:o}){const s=(()=>{if(o===0||o===1)return o;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),i=`0x${new r1.Signature(an(e),an(t)).toCompactHex()}${s===0?"1b":"1c"}`;return n==="hex"?i:Qt(i)}async function Ba(e,t){var c,l,u,f;const{address:n,chain:r=e.chain,hash:o,erc6492VerifierAddress:s=t.universalSignatureVerifierAddress??((l=(c=r==null?void 0:r.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:l.address),multicallAddress:i=t.multicallAddress??((f=(u=r==null?void 0:r.contracts)==null?void 0:u.multicall3)==null?void 0:f.address)}=t;if(r!=null&&r.verifyHash)return await r.verifyHash(e,t);const a=(()=>{const d=t.signature;return zt(d)?d:typeof d=="object"&&"r"in d&&"s"in d?Q3(d):De(d)})();try{return K5(a)?await H3(e,{...t,multicallAddress:i,signature:a}):await V3(e,{...t,verifierAddress:s,signature:a})}catch(d){try{if(ri(yt(n),await Vp({hash:o,signature:a})))return!0}catch{}if(d instanceof Mr)return!1;throw d}}async function H3(e,t){var b;const{address:n,blockNumber:r,blockTag:o,hash:s,multicallAddress:i}=t,{authorization:a,data:c,signature:l,to:u}=G5(t.signature);if(await cl(e,{address:n,blockNumber:r,blockTag:o})===qo(["0xef0100",a.address]))return await G3(e,{address:n,blockNumber:r,blockTag:o,hash:s,signature:l});const d={address:a.address,chainId:Number(a.chainId),nonce:Number(a.nonce),r:ee(a.r,{size:32}),s:ee(a.s,{size:32}),yParity:a.yParity};if(!await f2({address:n,authorization:d}))throw new Mr;const g=await te(e,Tt,"readContract")({...i?{address:i}:{code:yu},authorizationList:[d],abi:jo,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:u??n,callData:c}]:[],{allowFailure:!0,target:n,callData:Ct({abi:Ph,functionName:"isValidSignature",args:[s,l]})}]]}),m=(b=g[g.length-1])==null?void 0:b.returnData;if(m!=null&&m.startsWith("0x1626ba7e"))return!0;throw new Mr}async function V3(e,t){const{address:n,factory:r,factoryData:o,hash:s,signature:i,verifierAddress:a,...c}=t,l=await(async()=>!r&&!o||m3(i)?i:p3({data:o,signature:i,to:r}))(),u=a?{to:a,data:Ct({abi:Nd,functionName:"isValidSig",args:[n,s,l]}),...c}:{data:wu({abi:Nd,args:[n,s,l],bytecode:X6}),...c},{data:f}=await te(e,Ho,"call")(u).catch(d=>{throw d instanceof yp?new Mr:d});if(ny(f??"0x0"))return!0;throw new Mr}async function G3(e,t){const{address:n,blockNumber:r,blockTag:o,hash:s,signature:i}=t;if((await te(e,Tt,"readContract")({address:n,abi:Ph,args:[s,i],blockNumber:r,blockTag:o,functionName:"isValidSignature"}).catch(c=>{throw c instanceof hu?new Mr:c})).startsWith("0x1626ba7e"))return!0;throw new Mr}class Mr extends Error{}async function K3(e,{address:t,message:n,factory:r,factoryData:o,signature:s,...i}){const a=pm(n);return te(e,Ba,"verifyHash")({address:t,factory:r,factoryData:o,hash:a,signature:s,...i})}async function J3(e,t){const{address:n,factory:r,factoryData:o,signature:s,message:i,primaryType:a,types:c,domain:l,...u}=t,f=S2({message:i,primaryType:a,types:c,domain:l});return te(e,Ba,"verifyHash")({address:n,factory:r,factoryData:o,hash:f,signature:s,...u})}const lc=new Map,Nf=new Map;let Y3=0;function Xn(e,t,n){const r=++Y3,o=()=>lc.get(e)||[],s=()=>{const u=o();lc.set(e,u.filter(f=>f.id!==r))},i=()=>{const u=o();if(!u.some(d=>d.id===r))return;const f=Nf.get(e);if(u.length===1&&f){const d=f();d instanceof Promise&&d.catch(()=>{})}s()},a=o();if(lc.set(e,[...a,{id:r,fns:t}]),a&&a.length>0)return i;const c={};for(const u in t)c[u]=(...f)=>{var h,g;const d=o();if(d.length!==0)for(const m of d)(g=(h=m.fns)[u])==null||g.call(h,...f)};const l=n(c);return typeof l=="function"&&Nf.set(e,l),i}function ii(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let o=!0;const s=()=>o=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));const c=await(n==null?void 0:n(a))??r;await Hi(c);const l=async()=>{o&&(await e({unpoll:s}),await Hi(r),l())};l()})(),s}function o1(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:o,poll:s,pollingInterval:i=e.pollingInterval}){const a=typeof s<"u"?s:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return a?(()=>{const f=_e(["watchBlockNumber",e.uid,t,n,i]);return Xn(f,{onBlockNumber:r,onError:o},d=>ii(async()=>{var h;try{const g=await te(e,ni,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(g===c)return;if(g-c>1&&n)for(let m=c+1n;m<g;m++)d.onBlockNumber(m,c),c=m}(c===void 0||g>c)&&(d.onBlockNumber(g,c),c=g)}catch(g){(h=d.onError)==null||h.call(d,g)}},{emitOnBegin:t,interval:i}))})():(()=>{const f=_e(["watchBlockNumber",e.uid,t,n]);return Xn(f,{onBlockNumber:r,onError:o},d=>{let h=!0,g=()=>h=!1;return(async()=>{try{const m=(()=>{if(e.transport.type==="fallback"){const y=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return y?y.value:e.transport}return e.transport})(),{unsubscribe:b}=await m.subscribe({params:["newHeads"],onData(y){var v;if(!h)return;const C=an((v=y.result)==null?void 0:v.number);d.onBlockNumber(C,c),c=C},onError(y){var C;(C=d.onError)==null||C.call(d,y)}});g=b,h||g()}catch(m){o==null||o(m)}})(),()=>g()})})()}async function X3(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:o,onReplaced:s,retryCount:i=6,retryDelay:a=({count:x})=>~~(1<<x)*200,timeout:c=18e4}=t,l=_e(["waitForTransactionReceipt",e.uid,o]),u=(()=>{var x;return t.pollingInterval?t.pollingInterval:(x=e.chain)!=null&&x.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let f,d,h,g=!1,m,b;const{promise:y,resolve:C,reject:v}=Fp(),w=c?setTimeout(()=>{b==null||b(),m==null||m(),v(new u6({hash:o}))},c):void 0;return m=Xn(l,{onReplaced:s,resolve:C,reject:v},async x=>{if(h=await te(e,Ti,"getTransactionReceipt")({hash:o}).catch(()=>{}),h&&r<=1){clearTimeout(w),x.resolve(h),m==null||m();return}b=te(e,o1,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(E){const A=S=>{clearTimeout(w),b==null||b(),S(),m==null||m()};let I=E;if(!g)try{if(h){if(r>1&&(!h.blockNumber||I-h.blockNumber+1n<r))return;A(()=>x.resolve(h));return}if(n&&!f&&(g=!0,await Mo(async()=>{f=await te(e,$u,"getTransaction")({hash:o}),f.blockNumber&&(I=f.blockNumber)},{delay:a,retryCount:i}),g=!1),h=await te(e,Ti,"getTransactionReceipt")({hash:o}),r>1&&(!h.blockNumber||I-h.blockNumber+1n<r))return;A(()=>x.resolve(h))}catch(S){if(S instanceof gp||S instanceof bp){if(!f){g=!1;return}try{d=f,g=!0;const T=await Mo(()=>te(e,$t,"getBlock")({blockNumber:I,includeTransactions:!0}),{delay:a,retryCount:i,shouldRetry:({error:N})=>N instanceof Yp});g=!1;const R=T.transactions.find(({from:N,nonce:W})=>N===d.from&&W===d.nonce);if(!R||(h=await te(e,Ti,"getTransactionReceipt")({hash:R.hash}),r>1&&(!h.blockNumber||I-h.blockNumber+1n<r)))return;let M="replaced";R.to===d.to&&R.value===d.value&&R.input===d.input?M="repriced":R.from===R.to&&R.value===0n&&(M="cancelled"),A(()=>{var N;(N=x.onReplaced)==null||N.call(x,{reason:M,replacedTransaction:d,transaction:R,transactionReceipt:h}),x.resolve(h)})}catch(T){A(()=>x.reject(T))}}else A(()=>x.reject(S))}}})}),y}function Z3(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:o,onError:s,includeTransactions:i,poll:a,pollingInterval:c=e.pollingInterval}){const l=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),u=i??!1;let f;return l?(()=>{const g=_e(["watchBlocks",e.uid,t,n,r,u,c]);return Xn(g,{onBlock:o,onError:s},m=>ii(async()=>{var b;try{const y=await te(e,$t,"getBlock")({blockTag:t,includeTransactions:u});if(y.number!==null&&(f==null?void 0:f.number)!=null){if(y.number===f.number)return;if(y.number-f.number>1&&n)for(let C=(f==null?void 0:f.number)+1n;C<y.number;C++){const v=await te(e,$t,"getBlock")({blockNumber:C,includeTransactions:u});m.onBlock(v,f),f=v}}((f==null?void 0:f.number)==null||t==="pending"&&(y==null?void 0:y.number)==null||y.number!==null&&y.number>f.number)&&(m.onBlock(y,f),f=y)}catch(y){(b=m.onError)==null||b.call(m,y)}},{emitOnBegin:r,interval:c}))})():(()=>{let g=!0,m=!0,b=()=>g=!1;return(async()=>{try{r&&te(e,$t,"getBlock")({blockTag:t,includeTransactions:u}).then(v=>{g&&m&&(o(v,void 0),m=!1)}).catch(s);const y=(()=>{if(e.transport.type==="fallback"){const v=e.transport.transports.find(w=>w.config.type==="webSocket"||w.config.type==="ipc");return v?v.value:e.transport}return e.transport})(),{unsubscribe:C}=await y.subscribe({params:["newHeads"],async onData(v){var x;if(!g)return;const w=await te(e,$t,"getBlock")({blockNumber:(x=v.result)==null?void 0:x.number,includeTransactions:u}).catch(()=>{});g&&(o(w,f),m=!1,f=w)},onError(v){s==null||s(v)}});b=C,g||b()}catch(y){s==null||s(y)}})(),()=>b()})()}function ex(e,t){const{abi:n,address:r,args:o,batch:s=!0,eventName:i,fromBlock:a,onError:c,onLogs:l,poll:u,pollingInterval:f=e.pollingInterval,strict:d}=t;return(typeof u<"u"?u:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const b=d??!1,y=_e(["watchContractEvent",r,o,s,e.uid,i,f,b,a]);return Xn(y,{onLogs:l,onError:c},C=>{let v;a!==void 0&&(v=a-1n);let w,x=!1;const E=ii(async()=>{var A;if(!x){try{w=await te(e,zp,"createContractEventFilter")({abi:n,address:r,args:o,eventName:i,strict:b,fromBlock:a})}catch{}x=!0;return}try{let I;if(w)I=await te(e,Ca,"getFilterChanges")({filter:w});else{const S=await te(e,ni,"getBlockNumber")({});v&&v<S?I=await te(e,dm,"getContractEvents")({abi:n,address:r,args:o,eventName:i,fromBlock:v+1n,toBlock:S,strict:b}):I=[],v=S}if(I.length===0)return;if(s)C.onLogs(I);else for(const S of I)C.onLogs([S])}catch(I){w&&I instanceof Yn&&(x=!1),(A=C.onError)==null||A.call(C,I)}},{emitOnBegin:!0,interval:f});return async()=>{w&&await te(e,ka,"uninstallFilter")({filter:w}),E()}})})():(()=>{const b=d??!1,y=_e(["watchContractEvent",r,o,s,e.uid,i,f,b]);let C=!0,v=()=>C=!1;return Xn(y,{onLogs:l,onError:c},w=>((async()=>{try{const x=(()=>{if(e.transport.type==="fallback"){const I=e.transport.transports.find(S=>S.config.type==="webSocket"||S.config.type==="ipc");return I?I.value:e.transport}return e.transport})(),E=i?ti({abi:n,eventName:i,args:o}):[],{unsubscribe:A}=await x.subscribe({params:["logs",{address:r,topics:E}],onData(I){var T;if(!C)return;const S=I.result;try{const{eventName:R,args:M}=Qi({abi:n,data:S.data,topics:S.topics,strict:d}),N=On(S,{args:M,eventName:R});w.onLogs([N])}catch(R){let M,N;if(R instanceof $i||R instanceof ou){if(d)return;M=R.abiItem.name,N=(T=R.abiItem.inputs)==null?void 0:T.some(P=>!("name"in P&&P.name))}const W=On(S,{args:N?[]:{},eventName:M});w.onLogs([W])}},onError(I){var S;(S=w.onError)==null||S.call(w,I)}});v=A,C||v()}catch(x){c==null||c(x)}})(),()=>v()))})()}function tx(e,{address:t,args:n,batch:r=!0,event:o,events:s,fromBlock:i,onError:a,onLogs:c,poll:l,pollingInterval:u=e.pollingInterval,strict:f}){const d=typeof l<"u"?l:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=f??!1;return d?(()=>{const b=_e(["watchEvent",t,n,r,e.uid,o,u,i]);return Xn(b,{onLogs:c,onError:a},y=>{let C;i!==void 0&&(C=i-1n);let v,w=!1;const x=ii(async()=>{var E;if(!w){try{v=await te(e,Qp,"createEventFilter")({address:t,args:n,event:o,events:s,strict:h,fromBlock:i})}catch{}w=!0;return}try{let A;if(v)A=await te(e,Ca,"getFilterChanges")({filter:v});else{const I=await te(e,ni,"getBlockNumber")({});C&&C!==I?A=await te(e,Ou,"getLogs")({address:t,args:n,event:o,events:s,fromBlock:C+1n,toBlock:I}):A=[],C=I}if(A.length===0)return;if(r)y.onLogs(A);else for(const I of A)y.onLogs([I])}catch(A){v&&A instanceof Yn&&(w=!1),(E=y.onError)==null||E.call(y,A)}},{emitOnBegin:!0,interval:u});return async()=>{v&&await te(e,ka,"uninstallFilter")({filter:v}),x()}})})():(()=>{let b=!0,y=()=>b=!1;return(async()=>{try{const C=(()=>{if(e.transport.type==="fallback"){const E=e.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return E?E.value:e.transport}return e.transport})(),v=s??(o?[o]:void 0);let w=[];v&&(w=[v.flatMap(A=>ti({abi:[A],eventName:A.name,args:n}))],o&&(w=w[0]));const{unsubscribe:x}=await C.subscribe({params:["logs",{address:t,topics:w}],onData(E){var I;if(!b)return;const A=E.result;try{const{eventName:S,args:T}=Qi({abi:v??[],data:A.data,topics:A.topics,strict:h}),R=On(A,{args:T,eventName:S});c([R])}catch(S){let T,R;if(S instanceof $i||S instanceof ou){if(f)return;T=S.abiItem.name,R=(I=S.abiItem.inputs)==null?void 0:I.some(N=>!("name"in N&&N.name))}const M=On(A,{args:R?[]:{},eventName:T});c([M])}},onError(E){a==null||a(E)}});y=x,b||y()}catch(C){a==null||a(C)}})(),()=>y()})()}function nx(e,{batch:t=!0,onError:n,onTransactions:r,poll:o,pollingInterval:s=e.pollingInterval}){return(typeof o<"u"?o:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const l=_e(["watchPendingTransactions",e.uid,t,s]);return Xn(l,{onTransactions:r,onError:n},u=>{let f;const d=ii(async()=>{var h;try{if(!f)try{f=await te(e,Hp,"createPendingTransactionFilter")({});return}catch(m){throw d(),m}const g=await te(e,Ca,"getFilterChanges")({filter:f});if(g.length===0)return;if(t)u.onTransactions(g);else for(const m of g)u.onTransactions([m])}catch(g){(h=u.onError)==null||h.call(u,g)}},{emitOnBegin:!0,interval:s});return async()=>{f&&await te(e,ka,"uninstallFilter")({filter:f}),d()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:f}=await e.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!l)return;const h=d.result;r([h])},onError(d){n==null||n(d)}});u=f,l||u()}catch(f){n==null||n(f)}})(),()=>u()})()}class Hu extends L{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
72
|
-
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class uc extends L{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}async function
|
|
73
|
-
`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return
|
|
74
|
-
- `).slice(1);return{...r,...l,...o?{chainId:Number(o)}:{},...s?{expirationTime:new Date(s)}:{},...i?{issuedAt:new Date(i)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const px=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,mx=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function gx(e){const{address:t,domain:n,message:r,nonce:o,scheme:s,time:i=new Date}=e;if(n&&r.domain!==n||o&&r.nonce!==o||s&&r.scheme!==s||r.expirationTime&&i>=r.expirationTime||r.notBefore&&i<r.notBefore)return!1;try{if(!r.address||!wt(r.address,{strict:!1})||t&&!ri(r.address,t))return!1}catch{return!1}return!0}async function bx(e,t){const{address:n,domain:r,message:o,nonce:s,scheme:i,signature:a,time:c=new Date,...l}=t,u=hx(o);if(!u.address||!gx({address:n,domain:r,message:u,nonce:s,scheme:i,time:c}))return!1;const d=pm(o);return Ba(e,{address:u.address,hash:d,signature:a,...l})}function yx(e){return{call:t=>Ho(e,t),createAccessList:t=>Wp(e,t),createBlockFilter:()=>xv(e),createContractEventFilter:t=>zp(e,t),createEventFilter:t=>Qp(e,t),createPendingTransactionFilter:()=>Hp(e),estimateContractGas:t=>Jv(e,t),estimateGas:t=>Su(e,t),getBalance:t=>um(e,t),getBlobBaseFee:()=>Yv(e),getBlock:t=>$t(e,t),getBlockNumber:t=>ni(e,t),getBlockTransactionCount:t=>r2(e,t),getBytecode:t=>cl(e,t),getChainId:()=>xa(e),getCode:t=>cl(e,t),getContractEvents:t=>dm(e,t),getEip712Domain:t=>a2(e,t),getEnsAddress:t=>av(e,t),getEnsAvatar:t=>$p(e,t),getEnsName:t=>qp(e,t),getEnsResolver:t=>vv(e,t),getEnsText:t=>_p(e,t),getFeeHistory:t=>u2(e,t),estimateFeesPerGas:t=>Nv(e,t),getFilterChanges:t=>Ca(e,t),getFilterLogs:t=>d2(e,t),getGasPrice:()=>Iu(e),getLogs:t=>Ou(e,t),getProof:t=>Z5(e,t),estimateMaxPriorityFeePerGas:t=>Rv(e,t),fillTransaction:t=>cm(e,t),getStorageAt:t=>e3(e,t),getTransaction:t=>$u(e,t),getTransactionConfirmations:t=>t3(e,t),getTransactionCount:t=>tm(e,t),getTransactionReceipt:t=>Ti(e,t),multicall:t=>Nm(e,t),prepareTransactionRequest:t=>Bu(e,t),readContract:t=>Tt(e,t),sendRawTransaction:t=>s1(e,t),sendRawTransactionSync:t=>ox(e,t),simulate:t=>fl(e,t),simulateBlocks:t=>fl(e,t),simulateCalls:t=>d3(e,t),simulateContract:t=>f3(e,t),verifyHash:t=>Ba(e,t),verifyMessage:t=>K3(e,t),verifySiweMessage:t=>bx(e,t),verifyTypedData:t=>J3(e,t),uninstallFilter:t=>ka(e,t),waitForTransactionReceipt:t=>X3(e,t),watchBlocks:t=>Z3(e,t),watchBlockNumber:t=>o1(e,t),watchContractEvent:t=>ex(e,t),watchEvent:t=>tx(e,t),watchPendingTransactions:t=>nx(e,t)}}function Vu({key:e,methods:t,name:n,request:r,retryCount:o=3,retryDelay:s=150,timeout:i,type:a},c){const l=c1();return{config:{key:e,methods:t,name:n,request:r,retryCount:o,retryDelay:s,timeout:i,type:a},request:p2(r,{methods:t,retryCount:o,retryDelay:s,uid:l}),value:c}}function wx(e,t={}){const{key:n="custom",methods:r,name:o="Custom Provider",retryDelay:s}=t;return({retryCount:i})=>Vu({key:n,methods:r,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:s,type:"custom"})}class vx extends L{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function u1(e,t={}){const{batch:n,fetchFn:r,fetchOptions:o,key:s="http",methods:i,name:a="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:u,raw:f}=t;return({chain:d,retryCount:h,timeout:g})=>{const{batchSize:m=1e3,wait:b=0}=typeof n=="object"?n:{},y=t.retryCount??h,C=g??t.timeout??1e4,v=e||(d==null?void 0:d.rpcUrls.default.http[0]);if(!v)throw new vx;const w=w2(v,{fetchFn:r,fetchOptions:o,onRequest:c,onResponse:l,timeout:C});return Vu({key:s,methods:i,name:a,async request({method:x,params:E}){const A={method:x,params:E},{schedule:I}=Mp({id:v,wait:b,shouldSplitBatch(M){return M.length>m},fn:M=>w.request({body:M}),sort:(M,N)=>M.id-N.id}),S=async M=>n?I(M):[await w.request({body:M})],[{error:T,result:R}]=await S(A);if(f)return{error:T,result:R};if(T)throw new gu({body:A,error:T,url:v});return R},retryCount:y,retryDelay:u,timeout:C,type:"http"},{fetchOptions:o,url:v})}}async function d1(e,t={}){const{assertChainId:n=!0}=t;let r;if(t.connector){const{connector:u}=t;if(e.state.status==="reconnecting"&&!u.getAccounts&&!u.getChainId)throw new dx({connector:u});const[f,d]=await Promise.all([u.getAccounts().catch(h=>{if(t.account===null)return[];throw h}),u.getChainId()]);r={accounts:f,chainId:d,connector:u}}else r=e.state.connections.get(e.state.current);if(!r)throw new cx;const o=t.chainId??r.chainId,s=await r.connector.getChainId();if(n&&s!==o)throw new ux({connectionChainId:o,connectorChainId:s});const i=r.connector;if(i.getClient)return i.getClient({chainId:o});const a=Qe(t.account??r.accounts[0]);if(a&&(a.address=yt(a.address)),t.account&&!r.accounts.some(u=>u.toLowerCase()===a.address.toLowerCase()))throw new lx({address:a.address,connector:i});const c=e.chains.find(u=>u.id===o),l=await r.connector.getProvider({chainId:o});return l1({account:a,chain:c,name:"Connector Client",transport:u=>wx(l)({...u,retryCount:0})})}async function xx(e,t={}){var o,s;let n;if(t.connector)n=t.connector;else{const{connections:i,current:a}=e.state,c=i.get(a);n=c==null?void 0:c.connector}const r=e.state.connections;n&&(await n.disconnect(),n.emitter.off("change",e._internal.events.change),n.emitter.off("disconnect",e._internal.events.disconnect),n.emitter.on("connect",e._internal.events.connect),r.delete(n.uid)),e.setState(i=>{if(r.size===0)return{...i,connections:new Map,current:null,status:"disconnected"};const a=r.values().next().value;return{...i,connections:new Map(r),current:a.connector.uid}});{const i=e.state.current;if(!i)return;const a=(o=e.state.connections.get(i))==null?void 0:o.connector;if(!a)return;await((s=e.storage)==null?void 0:s.setItem("recentConnectorId",a.id))}}function f1(e){return typeof e=="number"?e:e==="wei"?0:Math.abs(r6[e])}function h1(e){const t=e.state.current,n=e.state.connections.get(t),r=n==null?void 0:n.accounts,o=r==null?void 0:r[0],s=e.chains.find(a=>a.id===(n==null?void 0:n.chainId)),i=e.state.status;switch(i){case"connected":return{address:o,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:i};case"reconnecting":return{address:o,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!!o,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:i};case"connecting":return{address:o,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:i};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:i}}}async function Cx(e,t){const{allowFailure:n=!0,chainId:r,contracts:o,...s}=t,i=e.getClient({chainId:r});return Wr(i,Nm,"multicall")({allowFailure:n,contracts:o,...s})}function p1(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return Wr(o,Tt,"readContract")(r)}async function Ax(e,t){var a;const{allowFailure:n=!0,blockNumber:r,blockTag:o,...s}=t,i=t.contracts;try{const c={};for(const[d,h]of i.entries()){const g=h.chainId??e.state.chainId;c[g]||(c[g]=[]),(a=c[g])==null||a.push({contract:h,index:d})}const l=()=>Object.entries(c).map(([d,h])=>Cx(e,{...s,allowFailure:n,blockNumber:r,blockTag:o,chainId:Number.parseInt(d,10),contracts:h.map(({contract:g})=>g)})),u=(await Promise.all(l())).flat(),f=Object.values(c).flatMap(d=>d.map(({index:h})=>h));return u.reduce((d,h,g)=>(d&&(d[f[g]]=h),d),[])}catch(c){if(c instanceof hu)throw c;const l=()=>i.map(u=>p1(e,{...u,blockNumber:r,blockTag:o}));return n?(await Promise.allSettled(l())).map(u=>u.status==="fulfilled"?{result:u.value,status:"success"}:{error:u.reason,result:void 0,status:"failure"}):await Promise.all(l())}}async function Ex(e,t){const{address:n,blockNumber:r,blockTag:o,chainId:s,token:i,unit:a="ether"}=t;if(i)try{return await Ff(e,{balanceAddress:n,chainId:s,symbolType:"string",tokenAddress:i})}catch(d){if(d.name==="ContractFunctionExecutionError"){const h=await Ff(e,{balanceAddress:n,chainId:s,symbolType:"bytes32",tokenAddress:i}),g=ry(kn(h.symbol,{dir:"right"}));return{...h,symbol:g}}throw d}const c=e.getClient({chainId:s}),u=await Wr(c,um,"getBalance")(r?{address:n,blockNumber:r}:{address:n,blockTag:o}),f=e.chains.find(d=>d.id===s)??c.chain;return{decimals:f.nativeCurrency.decimals,formatted:Ks(u,f1(a)),symbol:f.nativeCurrency.symbol,value:u}}async function Ff(e,t){const{balanceAddress:n,chainId:r,symbolType:o,tokenAddress:s,unit:i}=t,a={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:o}]}],address:s},[c,l,u]=await Ax(e,{allowFailure:!1,contracts:[{...a,functionName:"balanceOf",args:[n],chainId:r},{...a,functionName:"decimals",chainId:r},{...a,functionName:"symbol",chainId:r}]}),f=Ks(c??"0",f1(i??l));return{decimals:l,formatted:f,symbol:u,value:c}}function Mf(e){return e.state.chainId}function Dr(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Dr(e[r],t[r]))return!1;return!0}if(typeof e.valueOf=="function"&&e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(typeof e.toString=="function"&&e.toString!==Object.prototype.toString)return e.toString()===t.toString();const o=Object.keys(e);if(n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.hasOwn(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(s&&!Dr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}let fc=[];function Df(e){const t=e.chains;return Dr(fc,t)?fc:(fc=t,t)}function kx(e,t={}){try{return e.getClient(t)}catch{return}}let vi=[];function Cl(e){const t=[...e.state.connections.values()];return e.state.status==="reconnecting"||Dr(vi,t)?vi:(vi=t,t)}let xi=[];function Lf(e){const t=e.connectors;return xi.length===t.length&&xi.every((n,r)=>n===t[r])?xi:(xi=t,t)}function Ix(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return Wr(o,$p,"getEnsAvatar")(r)}function jx(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return Wr(o,qp,"getEnsName")(r)}function Al(e,t={}){const n=kx(e,t);return n==null?void 0:n.extend(yx)}let hc=!1;async function Bx(e,t={}){var l,u;if(hc)return[];hc=!0,e.setState(f=>({...f,status:f.current?"reconnecting":"connecting"}));const n=[];if((l=t.connectors)!=null&&l.length)for(const f of t.connectors){let d;typeof f=="function"?d=e._internal.connectors.setup(f):d=f,n.push(d)}else n.push(...e.connectors);let r;try{r=await((u=e.storage)==null?void 0:u.getItem("recentConnectorId"))}catch{}const o={};for(const[,f]of e.state.connections)o[f.connector.id]=1;r&&(o[r]=0);const s=Object.keys(o).length>0?[...n].sort((f,d)=>(o[f.id]??10)-(o[d.id]??10)):n;let i=!1;const a=[],c=[];for(const f of s){const d=await f.getProvider().catch(()=>{});if(!d||c.some(m=>m===d)||!await f.isAuthorized())continue;const g=await f.connect({isReconnecting:!0}).catch(()=>null);g&&(f.emitter.off("connect",e._internal.events.connect),f.emitter.on("change",e._internal.events.change),f.emitter.on("disconnect",e._internal.events.disconnect),e.setState(m=>{const b=new Map(i?m.connections:new Map).set(f.uid,{accounts:g.accounts,chainId:g.chainId,connector:f});return{...m,current:i?m.current:f.uid,connections:b}}),a.push({accounts:g.accounts,chainId:g.chainId,connector:f}),c.push(d),i=!0)}return(e.state.status==="reconnecting"||e.state.status==="connecting")&&(i?e.setState(f=>({...f,status:"connected"})):e.setState(f=>({...f,connections:new Map,current:null,status:"disconnected"}))),hc=!1,a}async function Sx(e,t){const{account:n,connector:r,...o}=t;let s;return typeof n=="object"&&n.type==="local"?s=e.getClient():s=await d1(e,{account:n,connector:r}),Wr(s,sx,"signMessage")({...o,...n?{account:n}:{}})}class wn extends Rn{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class Px extends Rn{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function Ox(e,t){var i;const{addEthereumChainParameter:n,chainId:r}=t,o=e.state.connections.get(((i=t.connector)==null?void 0:i.uid)??e.state.current);if(o){const a=o.connector;if(!a.switchChain)throw new Px({connector:a});return await a.switchChain({addEthereumChainParameter:n,chainId:r})}const s=e.chains.find(a=>a.id===r);if(!s)throw new Do;return e.setState(a=>({...a,chainId:r})),s}function m1(e,t){const{onChange:n}=t;return e.subscribe(()=>h1(e),n,{equalityFn(r,o){const{connector:s,...i}=r,{connector:a,...c}=o;return Dr(i,c)&&(s==null?void 0:s.id)===(a==null?void 0:a.id)&&(s==null?void 0:s.uid)===(a==null?void 0:a.uid)}})}function Tx(e,t){const{onChange:n}=t;return e.subscribe(r=>r.chainId,n)}function Rx(e,t){const{onChange:n}=t;return e.subscribe(()=>Cl(e),n,{equalityFn:Dr})}function Nx(e,t){const{onChange:n}=t;return e._internal.connectors.subscribe((r,o)=>{n(Object.values(r),o)})}function Fx(e,t){const{onChange:n}=t;return e.subscribe(()=>Al(e),n,{equalityFn(r,o){return(r==null?void 0:r.uid)===(o==null?void 0:o.uid)}})}async function Mx(e,t){const{account:n,chainId:r,connector:o,...s}=t;let i;return typeof n=="object"&&(n==null?void 0:n.type)==="local"?i=e.getClient({chainId:r}):i=await d1(e,{account:n??void 0,assertChainId:!1,chainId:r,connector:o}),await Wr(i,Yi,"writeContract")({...s,...n?{account:n}:{},chain:r?{id:r}:null})}Sa.type="injected";function Sa(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:n}=e;function r(){const c=e.target;if(typeof c=="function"){const l=c();if(l)return l}return typeof c=="object"?c:typeof c=="string"?{...Dx[c]??{id:c,name:`${c[0].toUpperCase()}${c.slice(1)}`,provider:`is${c[0].toUpperCase()}${c.slice(1)}`}}:{id:"injected",name:"Injected",provider(l){return l==null?void 0:l.ethereum}}}let o,s,i,a;return c=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},get supportsSimulation(){return!0},type:Sa.type,async setup(){const l=await this.getProvider();l!=null&&l.on&&e.target&&(i||(i=this.onConnect.bind(this),l.on("connect",i)),o||(o=this.onAccountsChanged.bind(this),l.on("accountsChanged",o)))},async connect({chainId:l,isReconnecting:u,withCapabilities:f}={}){var g,m,b,y,C,v;const d=await this.getProvider();if(!d)throw new wn;let h=[];if(u)h=await this.getAccounts().catch(()=>[]);else if(t)try{h=(y=(b=(m=(g=(await d.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:g.caveats)==null?void 0:m[0])==null?void 0:b.value)==null?void 0:y.map(x=>yt(x)),h.length>0&&(h=await this.getAccounts())}catch(w){const x=w;if(x.code===Ee.code)throw new Ee(x);if(x.code===on.code)throw x}try{!(h!=null&&h.length)&&!u&&(h=(await d.request({method:"eth_requestAccounts"})).map(E=>yt(E))),i&&(d.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),d.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),d.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),d.on("disconnect",a));let w=await this.getChainId();if(l&&w!==l){const x=await this.switchChain({chainId:l}).catch(E=>{if(E.code===Ee.code)throw E;return{id:w}});w=(x==null?void 0:x.id)??w}return t&&await((C=c.storage)==null?void 0:C.removeItem(`${this.id}.disconnected`)),e.target||await((v=c.storage)==null?void 0:v.setItem("injected.connected",!0)),{accounts:f?h.map(x=>({address:x,capabilities:{}})):h,chainId:w}}catch(w){const x=w;throw x.code===Ee.code?new Ee(x):x.code===on.code?new on(x):x}},async disconnect(){var u,f;const l=await this.getProvider();if(!l)throw new wn;s&&(l.removeListener("chainChanged",s),s=void 0),a&&(l.removeListener("disconnect",a),a=void 0),i||(i=this.onConnect.bind(this),l.on("connect",i));try{await Tu(()=>l.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await((u=c.storage)==null?void 0:u.setItem(`${this.id}.disconnected`,!0)),e.target||await((f=c.storage)==null?void 0:f.removeItem("injected.connected"))},async getAccounts(){const l=await this.getProvider();if(!l)throw new wn;return(await l.request({method:"eth_accounts"})).map(f=>yt(f))},async getChainId(){const l=await this.getProvider();if(!l)throw new wn;const u=await l.request({method:"eth_chainId"});return Number(u)},async getProvider(){if(typeof window>"u")return;let l;const u=r();return typeof u.provider=="function"?l=u.provider(window):typeof u.provider=="string"?l=Ni(window,u.provider):l=u.provider,l&&!l.removeListener&&("off"in l&&typeof l.off=="function"?l.removeListener=l.off:l.removeListener=()=>{}),l},async isAuthorized(){var l,u;try{if(t&&await((l=c.storage)==null?void 0:l.getItem(`${this.id}.disconnected`))||!e.target&&!await((u=c.storage)==null?void 0:u.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const g=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",g),!!await this.getProvider()),m=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(y=>window.addEventListener("ethereum#initialized",()=>y(g()),{once:!0}))]:[],new Promise(y=>setTimeout(()=>y(g()),m))]))return!0}throw new wn}return!!(await Mo(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:l,chainId:u}){var g,m,b,y;const f=await this.getProvider();if(!f)throw new wn;const d=c.chains.find(C=>C.id===u);if(!d)throw new qt(new Do);const h=new Promise(C=>{const v=w=>{"chainId"in w&&w.chainId===u&&(c.emitter.off("change",v),C())};c.emitter.on("change",v)});try{return await Promise.all([f.request({method:"wallet_switchEthereumChain",params:[{chainId:ee(u)}]}).then(async()=>{await this.getChainId()===u&&c.emitter.emit("change",{chainId:u})}),h]),d}catch(C){const v=C;if(v.code===4902||((m=(g=v==null?void 0:v.data)==null?void 0:g.originalError)==null?void 0:m.code)===4902)try{const{default:w,...x}=d.blockExplorers??{};let E;l!=null&&l.blockExplorerUrls?E=l.blockExplorerUrls:w&&(E=[w.url,...Object.values(x).map(S=>S.url)]);let A;(b=l==null?void 0:l.rpcUrls)!=null&&b.length?A=l.rpcUrls:A=[((y=d.rpcUrls.default)==null?void 0:y.http[0])??""];const I={blockExplorerUrls:E,chainId:ee(u),chainName:(l==null?void 0:l.chainName)??d.name,iconUrls:l==null?void 0:l.iconUrls,nativeCurrency:(l==null?void 0:l.nativeCurrency)??d.nativeCurrency,rpcUrls:A};return await Promise.all([f.request({method:"wallet_addEthereumChain",params:[I]}).then(async()=>{if(await this.getChainId()===u)c.emitter.emit("change",{chainId:u});else throw new Ee(new Error("User rejected switch after adding network."))}),h]),d}catch(w){throw new Ee(w)}throw v.code===Ee.code?new Ee(v):new qt(v)}},async onAccountsChanged(l){var u;if(l.length===0)this.onDisconnect();else if(c.emitter.listenerCount("connect")){const f=(await this.getChainId()).toString();this.onConnect({chainId:f}),t&&await((u=c.storage)==null?void 0:u.removeItem(`${this.id}.disconnected`))}else c.emitter.emit("change",{accounts:l.map(f=>yt(f))})},onChainChanged(l){const u=Number(l);c.emitter.emit("change",{chainId:u})},async onConnect(l){const u=await this.getAccounts();if(u.length===0)return;const f=Number(l.chainId);c.emitter.emit("connect",{accounts:u,chainId:f});const d=await this.getProvider();d&&(i&&(d.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),d.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),d.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),d.on("disconnect",a)))},async onDisconnect(l){const u=await this.getProvider();l&&l.code===1013&&u&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),u&&(s&&(u.removeListener("chainChanged",s),s=void 0),a&&(u.removeListener("disconnect",a),a=void 0),i||(i=this.onConnect.bind(this),u.on("connect",i))))}})}const Dx={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e!=null&&e.coinbaseWalletExtension?e.coinbaseWalletExtension:Ni(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return Ni(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const r of n)if(t[r])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){var t,n;return(t=e==null?void 0:e.phantom)!=null&&t.ethereum?(n=e.phantom)==null?void 0:n.ethereum:Ni(e,"isPhantom")}}};function Ni(e,t){function n(o){return typeof t=="function"?t(o):typeof t=="string"?o[t]:!0}const r=e.ethereum;if(r!=null&&r.providers)return r.providers.find(o=>n(o));if(r&&n(r))return r}function Lx(e){if(typeof window>"u")return;const t=n=>e(n.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}function Ux(){const e=new Set;let t=[];const n=()=>Lx(o=>{t.some(({info:s})=>s.uuid===o.info.uuid)||(t=[...t,o],e.forEach(s=>s(t,{added:[o]})))});let r=n();return{_listeners(){return e},clear(){e.forEach(o=>o([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r==null||r()},findProvider({rdns:o}){return t.find(s=>s.info.rdns===o)},getProviders(){return t},reset(){this.clear(),r==null||r(),r=n()},subscribe(o,{emitImmediately:s}={}){return e.add(o),s&&o(t,{added:t}),()=>e.delete(o)}}}const _x=e=>(t,n,r)=>{const o=r.subscribe;return r.subscribe=(i,a,c)=>{let l=i;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let f=i(r.getState());l=d=>{const h=i(d);if(!u(f,h)){const g=f;a(f=h,g)}},c!=null&&c.fireImmediately&&a(f,f)}return o(l)},e(t,n,r)},$x=_x;function qx(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var s;const i=c=>c===null?null:JSON.parse(c,void 0),a=(s=n.getItem(o))!=null?s:null;return a instanceof Promise?a.then(i):i(a)},setItem:(o,s)=>n.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>n.removeItem(o)}}const El=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return El(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return El(r)(n)}}}},Wx=(e,t)=>(n,r,o)=>{let s={storage:qx(()=>localStorage),partialize:m=>m,version:0,merge:(m,b)=>({...b,...m}),...t},i=!1;const a=new Set,c=new Set;let l=s.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...m)},r,o);const u=()=>{const m=s.partialize({...r()});return l.setItem(s.name,{state:m,version:s.version})},f=o.setState;o.setState=(m,b)=>{f(m,b),u()};const d=e((...m)=>{n(...m),u()},r,o);o.getInitialState=()=>d;let h;const g=()=>{var m,b;if(!l)return;i=!1,a.forEach(C=>{var v;return C((v=r())!=null?v:d)});const y=((b=s.onRehydrateStorage)==null?void 0:b.call(s,(m=r())!=null?m:d))||void 0;return El(l.getItem.bind(l))(s.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==s.version){if(s.migrate)return[!0,s.migrate(C.state,C.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var v;const[w,x]=C;if(h=s.merge(x,(v=r())!=null?v:d),n(h,!0),w)return u()}).then(()=>{y==null||y(h,void 0),h=r(),i=!0,c.forEach(C=>C(h))}).catch(C=>{y==null||y(void 0,C)})};return o.persist={setOptions:m=>{s={...s,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},s.skipHydration||g(),h||d},zx=Wx,Uf=e=>{let t;const n=new Set,r=(l,u)=>{const f=typeof l=="function"?l(t):l;if(!Object.is(f,t)){const d=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,d))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,o,a);return a},pc=e=>e?Uf(e):Uf;var g1={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function s(c,l,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new o(u,f||c,d),g=n?n+l:l;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],h]:c._events[g].push(h):(c._events[g]=h,c._eventsCount++),c}function i(c,l){--c._eventsCount===0?c._events=new r:delete c._events[l]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],u,f;if(this._eventsCount===0)return l;for(f in u=this._events)t.call(u,f)&&l.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},a.prototype.listeners=function(l){var u=n?n+l:l,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,g=new Array(h);d<h;d++)g[d]=f[d].fn;return g},a.prototype.listenerCount=function(l){var u=n?n+l:l,f=this._events[u];return f?f.fn?1:f.length:0},a.prototype.emit=function(l,u,f,d,h,g){var m=n?n+l:l;if(!this._events[m])return!1;var b=this._events[m],y=arguments.length,C,v;if(b.fn){switch(b.once&&this.removeListener(l,b.fn,void 0,!0),y){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,u),!0;case 3:return b.fn.call(b.context,u,f),!0;case 4:return b.fn.call(b.context,u,f,d),!0;case 5:return b.fn.call(b.context,u,f,d,h),!0;case 6:return b.fn.call(b.context,u,f,d,h,g),!0}for(v=1,C=new Array(y-1);v<y;v++)C[v-1]=arguments[v];b.fn.apply(b.context,C)}else{var w=b.length,x;for(v=0;v<w;v++)switch(b[v].once&&this.removeListener(l,b[v].fn,void 0,!0),y){case 1:b[v].fn.call(b[v].context);break;case 2:b[v].fn.call(b[v].context,u);break;case 3:b[v].fn.call(b[v].context,u,f);break;case 4:b[v].fn.call(b[v].context,u,f,d);break;default:if(!C)for(x=1,C=new Array(y-1);x<y;x++)C[x-1]=arguments[x];b[v].fn.apply(b[v].context,C)}}return!0},a.prototype.on=function(l,u,f){return s(this,l,u,f,!1)},a.prototype.once=function(l,u,f){return s(this,l,u,f,!0)},a.prototype.removeListener=function(l,u,f,d){var h=n?n+l:l;if(!this._events[h])return this;if(!u)return i(this,h),this;var g=this._events[h];if(g.fn)g.fn===u&&(!d||g.once)&&(!f||g.context===f)&&i(this,h);else{for(var m=0,b=[],y=g.length;m<y;m++)(g[m].fn!==u||d&&!g[m].once||f&&g[m].context!==f)&&b.push(g[m]);b.length?this._events[h]=b.length===1?b[0]:b:i(this,h)}return this},a.prototype.removeAllListeners=function(l){var u;return l?(u=n?n+l:l,this._events[u]&&i(this,u)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(g1);var Qx=g1.exports;const Hx=kh(Qx);class Vx{constructor(t){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new Hx})}on(t,n){this._emitter.on(t,n)}once(t,n){this._emitter.once(t,n)}off(t,n){this._emitter.off(t,n)}emit(t,...n){const r=n[0];this._emitter.emit(t,{uid:this.uid,...r})}listenerCount(t){return this._emitter.listenerCount(t)}}function Gx(e){return new Vx(e)}function Kx(e,t){return JSON.parse(e,(n,r)=>{let o=r;return(o==null?void 0:o.__type)==="bigint"&&(o=BigInt(o.value)),(o==null?void 0:o.__type)==="Map"&&(o=new Map(o.value)),(t==null?void 0:t(n,o))??o})}function _f(e,t){return e.slice(0,t).join(".")||"."}function $f(e,t){const{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function Jx(e,t){const n=typeof e=="function",r=typeof t=="function",o=[],s=[];return function(a,c){if(typeof c=="object")if(o.length){const l=$f(o,this);l===0?o[o.length]=this:(o.splice(l),s.splice(l)),s[s.length]=a;const u=$f(o,c);if(u!==0)return r?t.call(this,a,c,_f(s,u)):`[ref=${_f(s,u)}]`}else o[0]=c,s[0]=a;return n?e.call(this,a,c):c}}function Yx(e,t,n,r){return JSON.stringify(e,Jx((o,s)=>{let i=s;return typeof i=="bigint"&&(i={__type:"bigint",value:s.toString()}),i instanceof Map&&(i={__type:"Map",value:Array.from(s.entries())}),(t==null?void 0:t(o,i))??i},r),n??void 0)}function Xx(e){const{deserialize:t=Kx,key:n="wagmi",serialize:r=Yx,storage:o=b1}=e;function s(i){return i instanceof Promise?i.then(a=>a).catch(()=>null):i}return{...o,key:n,async getItem(i,a){const c=o.getItem(`${n}.${i}`),l=await s(c);return l?t(l)??null:a??null},async setItem(i,a){const c=`${n}.${i}`;a===null?await s(o.removeItem(c)):await s(o.setItem(c,r(a)))},async removeItem(i){await s(o.removeItem(`${n}.${i}`))}}}const b1={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function Zx(){const e=typeof window<"u"&&window.localStorage?window.localStorage:b1;return{getItem(t){return e.getItem(t)},removeItem(t){e.removeItem(t)},setItem(t,n){try{e.setItem(t,n)}catch{}}}}const kl=256;let Ci=kl,Ai;function e8(e=11){if(!Ai||Ci+e>kl*2){Ai="",Ci=0;for(let t=0;t<kl;t++)Ai+=(256+Math.random()*256|0).toString(16).substring(1)}return Ai.substring(Ci,Ci+++e)}function t8(e){const{multiInjectedProviderDiscovery:t=!0,storage:n=Xx({storage:Zx()}),syncConnectedChain:r=!0,ssr:o=!1,...s}=e,i=typeof window<"u"&&t?Ux():void 0,a=pc(()=>s.chains),c=pc(()=>{const x=[],E=new Set;for(const A of s.connectors??[]){const I=l(A);if(x.push(I),!o&&I.rdns){const S=typeof I.rdns=="string"?[I.rdns]:I.rdns;for(const T of S)E.add(T)}}if(!o&&i){const A=i.getProviders();for(const I of A)E.has(I.info.rdns)||x.push(l(u(I)))}return x});function l(x){var I;const E=Gx(e8()),A={...x({emitter:E,chains:a.getState(),storage:n,transports:s.transports}),emitter:E,uid:E.uid};return E.on("connect",v),(I=A.setup)==null||I.call(A),A}function u(x){const{info:E}=x,A=x.provider;return Sa({target:{...E,id:E.rdns,provider:A}})}const f=new Map;function d(x={}){const E=x.chainId??b.getState().chainId,A=a.getState().find(S=>S.id===E);if(x.chainId&&!A)throw new Do;{const S=f.get(b.getState().chainId);if(S&&!A)return S;if(!A)throw new Do}{const S=f.get(E);if(S)return S}let I;if(s.client)I=s.client({chain:A});else{const S=A.id,T=a.getState().map(N=>N.id),R={},M=Object.entries(s);for(const[N,W]of M)if(!(N==="chains"||N==="client"||N==="connectors"||N==="transports"))if(typeof W=="object")if(S in W)R[N]=W[S];else{if(T.some(D=>D in W))continue;R[N]=W}else R[N]=W;I=l1({...R,chain:A,batch:R.batch??{multicall:!0},transport:N=>s.transports[S]({...N,connectors:c})})}return f.set(E,I),I}function h(){return{chainId:a.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let g;const m="0.0.0-canary-";Ri.startsWith(m)?g=Number.parseInt(Ri.replace(m,""),10):g=Number.parseInt(Ri.split(".")[0]??"0",10);const b=pc($x(n?zx(h,{migrate(x,E){if(E===g)return x;const A=h(),I=y(x,A.chainId);return{...A,chainId:I}},name:"store",partialize(x){return{connections:{__type:"Map",value:Array.from(x.connections.entries()).map(([E,A])=>{const{id:I,name:S,type:T,uid:R}=A.connector;return[E,{...A,connector:{id:I,name:S,type:T,uid:R}}]})},chainId:x.chainId,current:x.current}},merge(x,E){typeof x=="object"&&x&&"status"in x&&delete x.status;const A=y(x,E.chainId);return{...E,...x,chainId:A}},skipHydration:o,storage:n,version:g}):h));b.setState(h());function y(x,E){return x&&typeof x=="object"&&"chainId"in x&&typeof x.chainId=="number"&&a.getState().some(A=>A.id===x.chainId)?x.chainId:E}r&&b.subscribe(({connections:x,current:E})=>{var A;return E?(A=x.get(E))==null?void 0:A.chainId:void 0},x=>{if(a.getState().some(A=>A.id===x))return b.setState(A=>({...A,chainId:x??A.chainId}))}),i==null||i.subscribe(x=>{const E=new Set,A=new Set;for(const S of c.getState())if(E.add(S.id),S.rdns){const T=typeof S.rdns=="string"?[S.rdns]:S.rdns;for(const R of T)A.add(R)}const I=[];for(const S of x){if(A.has(S.info.rdns))continue;const T=l(u(S));E.has(T.id)||I.push(T)}n&&!b.persist.hasHydrated()||c.setState(S=>[...S,...I],!0)});function C(x){b.setState(E=>{const A=E.connections.get(x.uid);return A?{...E,connections:new Map(E.connections).set(x.uid,{accounts:x.accounts??A.accounts,chainId:x.chainId??A.chainId,connector:A.connector})}:E})}function v(x){b.getState().status==="connecting"||b.getState().status==="reconnecting"||b.setState(E=>{const A=c.getState().find(I=>I.uid===x.uid);return A?(A.emitter.listenerCount("connect")&&A.emitter.off("connect",C),A.emitter.listenerCount("change")||A.emitter.on("change",C),A.emitter.listenerCount("disconnect")||A.emitter.on("disconnect",w),{...E,connections:new Map(E.connections).set(x.uid,{accounts:x.accounts,chainId:x.chainId,connector:A}),current:x.uid,status:"connected"}):E})}function w(x){b.setState(E=>{const A=E.connections.get(x.uid);if(A){const S=A.connector;S.emitter.listenerCount("change")&&A.connector.emitter.off("change",C),S.emitter.listenerCount("disconnect")&&A.connector.emitter.off("disconnect",w),S.emitter.listenerCount("connect")||A.connector.emitter.on("connect",v)}if(E.connections.delete(x.uid),E.connections.size===0)return{...E,connections:new Map,current:null,status:"disconnected"};const I=E.connections.values().next().value;return{...E,connections:new Map(E.connections),current:I.connector.uid}})}return{get chains(){return a.getState()},get connectors(){return c.getState()},storage:n,getClient:d,get state(){return b.getState()},setState(x){let E;typeof x=="function"?E=x(b.getState()):E=x;const A=h();typeof E!="object"&&(E=A),Object.keys(A).some(S=>!(S in E))&&(E=A),b.setState(E,!0)},subscribe(x,E,A){return b.subscribe(x,E,A?{...A,fireImmediately:A.emitImmediately}:void 0)},_internal:{mipd:i,async revalidate(){const x=b.getState(),E=x.connections;let A=x.current;for(const[,I]of E){const S=I.connector;S.isAuthorized&&await S.isAuthorized()||(E.delete(S.uid),A===S.uid&&(A=null))}b.setState(I=>({...I,connections:E,current:A}))},store:b,ssr:!!o,syncConnectedChain:r,transports:s.transports,chains:{setState(x){const E=typeof x=="function"?x(a.getState()):x;if(E.length!==0)return a.setState(E,!0)},subscribe(x){return a.subscribe(x)}},connectors:{providerDetailToConnector:u,setup:l,setState(x){return c.setState(typeof x=="function"?x(c.getState()):x,!0)},subscribe(x){return c.subscribe(x)}},events:{change:C,connect:v,disconnect:w}}}}function n8(e,t){const{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(o=>o.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(o=>{var c;const s=new Set;for(const l of o??[])if(l.rdns){const u=Array.isArray(l.rdns)?l.rdns:[l.rdns];for(const f of u)s.add(f)}const i=[],a=((c=e._internal.mipd)==null?void 0:c.getProviders())??[];for(const l of a){if(s.has(l.info.rdns))continue;const u=e._internal.connectors.providerDetailToConnector(l),f=e._internal.connectors.setup(u);i.push(f)}return[...o,...i]})),r?Bx(e):e.storage&&e.setState(o=>({...o,connections:new Map}))}}}function y1(e){var s,i,a;const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const r=(i=(s=e.transports)==null?void 0:s[t.id])==null?void 0:i.call(s,{chain:t});return(((a=r==null?void 0:r.value)==null?void 0:a.transports)||[r]).map(({value:c})=>(c==null?void 0:c.url)||n)}function r8(e){const{children:t,config:n,initialState:r,reconnectOnMount:o=!0}=e,{onMount:s}=n8(n,{initialState:r,reconnectOnMount:o});n._internal.ssr||s();const i=p.useRef(!0);return p.useEffect(()=>{if(i.current&&n._internal.ssr)return s(),()=>{i.current=!1}},[]),t}const w1=p.createContext(void 0);function o8(e){const{children:t,config:n}=e,r={value:n};return p.createElement(r8,e,p.createElement(w1.Provider,r,t))}const s8="2.19.5",i8=()=>`wagmi@${s8}`;class a8 extends Rn{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return i8()}}class c8 extends a8{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function Ne(e={}){const t=e.config??p.useContext(w1);if(!t)throw new c8;return t}function l8(e,t){const{onChange:n}=t;return e._internal.chains.subscribe((r,o)=>{n(r,o)})}var Il={exports:{}},mc={},Ei={exports:{}},gc={};/**
|
|
69
|
+
`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(zi,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Zs extends L{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function wa(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof L?e.walk(o=>(o==null?void 0:o.code)===mr.code):e;return r instanceof L?new mr({cause:e,message:r.details}):mr.nodeMessage.test(n)?new mr({cause:e,message:e.details}):qi.nodeMessage.test(n)?new qi({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Zc.nodeMessage.test(n)?new Zc({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):el.nodeMessage.test(n)?new el({cause:e,nonce:t==null?void 0:t.nonce}):tl.nodeMessage.test(n)?new tl({cause:e,nonce:t==null?void 0:t.nonce}):nl.nodeMessage.test(n)?new nl({cause:e,nonce:t==null?void 0:t.nonce}):rl.nodeMessage.test(n)?new rl({cause:e}):ol.nodeMessage.test(n)?new ol({cause:e,gas:t==null?void 0:t.gas}):sl.nodeMessage.test(n)?new sl({cause:e,gas:t==null?void 0:t.gas}):il.nodeMessage.test(n)?new il({cause:e}):zi.nodeMessage.test(n)?new zi({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new Zs({cause:e})}function Fp(e,{docsPath:t,...n}){const r=(()=>{const o=wa(e,n);return o instanceof Zs?e:o})();return new wp(r,{docsPath:t,...n})}function ei(e,{format:t}){if(!t)return{};const n={};function r(s){const i=Object.keys(s);for(const a of i)a in e&&(n[a]=e[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&r(s[a])}const o=t(e||{});return r(o),n}const tv={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Qo(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=nv(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>De(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=ee(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=ee(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=ee(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=ee(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=ee(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=ee(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=tv[e.type]),typeof e.value<"u"&&(n.value=ee(e.value)),n}function nv(e){return e.map(t=>({address:t.address,r:t.r?ee(BigInt(t.r)):t.r,s:t.s?ee(BigInt(t.s)):t.s,chainId:ee(t.chainId),nonce:ee(t.nonce),...typeof t.yParity<"u"?{yParity:ee(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:ee(t.v)}:{}}))}function Mp(){let e=()=>{},t=()=>{};return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}const Ya=new Map;function Dp({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){const s=async()=>{const u=c();i();const f=u.map(({args:d})=>d);f.length!==0&&e(f).then(d=>{o&&Array.isArray(d)&&d.sort(o);for(let h=0;h<u.length;h++){const{resolve:g}=u[h];g==null||g([d[h],d])}}).catch(d=>{for(let h=0;h<u.length;h++){const{reject:g}=u[h];g==null||g(d)}})},i=()=>Ya.delete(t),a=()=>c().map(({args:u})=>u),c=()=>Ya.get(t)||[],l=u=>Ya.set(t,[...c(),u]);return{flush:i,async schedule(u){const{promise:f,resolve:d,reject:h}=Mp();return(n==null?void 0:n([...a(),u]))&&s(),c().length>0?(l({args:u,resolve:d,reject:h}),f):(l({args:u,resolve:d,reject:h}),setTimeout(s,r),f)}}}function rf(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Ld({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Ld({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function rv(e){const{balance:t,nonce:n,state:r,stateDiff:o,code:s}=e,i={};if(s!==void 0&&(i.code=s),t!==void 0&&(i.balance=ee(t)),n!==void 0&&(i.nonce=ee(n)),r!==void 0&&(i.state=rf(r)),o!==void 0){if(i.state)throw new a6;i.stateDiff=rf(o)}return i}function vu(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!wt(n,{strict:!1}))throw new Jn({address:n});if(t[n])throw new i6({address:n});t[n]=rv(r)}return t}const ov=2n**256n-1n;function Wr(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:o}=e,s=t?Qe(t):void 0;if(s&&!wt(s.address))throw new Jn({address:s.address});if(o&&!wt(o))throw new Jn({address:o});if(n&&n>ov)throw new qi({maxFeePerGas:n});if(r&&n&&r>n)throw new zi({maxFeePerGas:n,maxPriorityFeePerGas:r})}async function Ho(e,t){var N,q,P,D;const{account:n=e.account,authorizationList:r,batch:o=!!((N=e.batch)!=null&&N.multicall),blockNumber:s,blockTag:i=e.experimental_blockTag??"latest",accessList:a,blobs:c,blockOverrides:l,code:u,data:f,factory:d,factoryData:h,gas:g,gasPrice:m,maxFeePerBlobGas:b,maxFeePerGas:y,maxPriorityFeePerGas:C,nonce:v,to:w,value:x,stateOverride:E,...A}=t,I=n?Qe(n):void 0;if(u&&(d||h))throw new L("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&w)throw new L("Cannot provide both `code` & `to` as parameters.");const S=u&&f,T=d&&h&&w&&f,R=S||T,M=S?Lp({code:u,data:f}):T?av({data:f,factory:d,factoryData:h,to:w}):f;try{Wr(t);const F=(typeof s=="bigint"?ee(s):void 0)||i,U=l?Rp(l):void 0,W=vu(E),ne=(D=(P=(q=e.chain)==null?void 0:q.formatters)==null?void 0:P.transactionRequest)==null?void 0:D.format,xe=(ne||Qo)({...ei(A,{format:ne}),accessList:a,account:I,authorizationList:r,blobs:c,data:M,gas:g,gasPrice:m,maxFeePerBlobGas:b,maxFeePerGas:y,maxPriorityFeePerGas:C,nonce:v,to:R?void 0:w,value:x},"call");if(o&&sv({request:xe})&&!W&&!U)try{return await iv(e,{...xe,blockNumber:s,blockTag:i})}catch(oe){if(!(oe instanceof hp)&&!(oe instanceof Jc))throw oe}const H=(()=>{const oe=[xe,F];return W&&U?[...oe,W,U]:W?[...oe,W]:U?[...oe,{},U]:oe})(),Q=await e.request({method:"eth_call",params:H});return Q==="0x"?{data:void 0}:{data:Q}}catch(_){const F=cv(_),{offchainLookup:U,offchainLookupSignature:W}=await Promise.resolve().then(()=>require("./ccip-D5uz0WmF.js"));if(e.ccipRead!==!1&&(F==null?void 0:F.slice(0,10))===W&&w)return{data:await U(e,{data:F,to:w})};throw R&&(F==null?void 0:F.slice(0,10))==="0x101bb98d"?new m6({factory:d}):Fp(_,{...t,account:I,chain:e.chain})}}function sv({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(X6)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function iv(e,t){var m;const{batchSize:n=1024,deployless:r=!1,wait:o=0}=typeof((m=e.batch)==null?void 0:m.multicall)=="object"?e.batch.multicall:{},{blockNumber:s,blockTag:i=e.experimental_blockTag??"latest",data:a,to:c}=t,l=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return zo({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new hp})(),f=(typeof s=="bigint"?ee(s):void 0)||i,{schedule:d}=Dp({id:`${e.uid}.${f}`,wait:o,shouldSplitBatch(b){return b.reduce((C,{data:v})=>C+(v.length-2),0)>n*2},fn:async b=>{const y=b.map(w=>({allowFailure:!0,callData:w.data,target:w.to})),C=Ct({abi:jo,args:[y],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{...l===null?{data:Lp({code:yu,data:C})}:{to:l,data:C}},f]});return er({abi:jo,args:[y],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:h,success:g}]=await d({data:a,to:c});if(!g)throw new ba({data:h});return h==="0x"?{data:void 0}:{data:h}}function Lp(e){const{code:t,data:n}=e;return wu({abi:up(["constructor(bytes, bytes)"]),bytecode:Np,args:[t,n]})}function av(e){const{data:t,factory:n,factoryData:r,to:o}=e;return wu({abi:up(["constructor(address, bytes, address, bytes)"]),bytecode:Z6,args:[o,t,n,r]})}function cv(e){var n;if(!(e instanceof L))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function Rt(e,t){const{abi:n,address:r,args:o,functionName:s,...i}=t,a=Ct({abi:n,args:o,functionName:s});try{const{data:c}=await te(e,Ho,"call")({...i,data:a,to:r});return er({abi:n,args:o,functionName:s,data:c||"0x"})}catch(c){throw Rr(c,{abi:n,address:r,args:o,docsPath:"/docs/contract/readContract",functionName:s})}}async function lv(e,t){const{blockNumber:n,blockTag:r,coinType:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return zo({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(d=>s.endsWith(d)))return null;const f=o!=null?[Xc(s),BigInt(o)]:[Xc(s)];try{const d=Ct({abi:Rd,functionName:"addr",args:f}),h={address:l,abi:Ph,functionName:"resolveWithGateways",args:[ln(mu(s)),d,i??[Ys]],blockNumber:n,blockTag:r},m=await te(e,Rt,"readContract")(h);if(m[0]==="0x")return null;const b=er({abi:Rd,args:f,functionName:"addr",data:m[0]});return b==="0x"||kn(b)==="0x00"?null:b}catch(d){if(a)throw d;if(pu(d))return null;throw d}}class uv extends L{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class ts extends L{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class xu extends L{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class dv extends L{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const fv=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,hv=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,pv=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,mv=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function gv(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function of(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Up({uri:e,gatewayUrls:t}){const n=pv.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=of(t==null?void 0:t.ipfs,"https://ipfs.io"),o=of(t==null?void 0:t.arweave,"https://arweave.net"),s=e.match(fv),{protocol:i,subpath:a,target:c,subtarget:l=""}=(s==null?void 0:s.groups)||{},u=i==="ipns:/"||a==="ipns/",f=i==="ipfs:/"||a==="ipfs/"||hv.test(e);if(e.startsWith("http")&&!u&&!f){let h=e;return t!=null&&t.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((u||f)&&c)return{uri:`${r}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(i==="ar:/"&&c)return{uri:`${o}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=e.replace(mv,"");if(d.startsWith("<svg")&&(d=`data:image/svg+xml;base64,${btoa(d)}`),d.startsWith("data:")||d.startsWith("{"))return{uri:d,isOnChain:!0,isEncoded:!1};throw new xu({uri:e})}function _p(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new uv({data:e});return e.image||e.image_url||e.image_data}async function bv({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then(o=>o.json());return await Cu({gatewayUrls:e,uri:_p(n)})}catch{throw new xu({uri:t})}}async function Cu({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=Up({uri:t,gatewayUrls:e});if(r||await gv(n))return n;throw new xu({uri:t})}function yv(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,o]=t.split("/"),[s,i]=n.split(":"),[a,c]=r.split(":");if(!s||s.toLowerCase()!=="eip155")throw new ts({reason:"Only EIP-155 supported"});if(!i)throw new ts({reason:"Chain ID not found"});if(!c)throw new ts({reason:"Contract address not found"});if(!o)throw new ts({reason:"Token ID not found"});if(!a)throw new ts({reason:"ERC namespace not found"});return{chainID:Number.parseInt(i,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:o}}async function wv(e,{nft:t}){if(t.namespace==="erc721")return Rt(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return Rt(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new dv({namespace:t.namespace})}async function vv(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?xv(e,{gatewayUrls:t,record:n}):Cu({uri:n,gatewayUrls:t})}async function xv(e,{gatewayUrls:t,record:n}){const r=yv(n),o=await wv(e,{nft:r}),{uri:s,isOnChain:i,isEncoded:a}=Up({uri:o,gatewayUrls:t});if(i&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const l=a?atob(s.replace("data:application/json;base64,","")):s,u=JSON.parse(l);return Cu({uri:_p(u),gatewayUrls:t})}let c=r.tokenID;return r.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),bv({gatewayUrls:t,uri:s.replace(/(?:0x)?{id}/,c)})}async function $p(e,t){const{blockNumber:n,blockTag:r,key:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return zo({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(f=>s.endsWith(f)))return null;try{const f={address:l,abi:Ph,args:[ln(mu(s)),Ct({abi:Td,functionName:"text",args:[Xc(s),o]}),i??[Ys]],functionName:"resolveWithGateways",blockNumber:n,blockTag:r},h=await te(e,Rt,"readContract")(f);if(h[0]==="0x")return null;const g=er({abi:Td,functionName:"text",data:h[0]});return g===""?null:g}catch(f){if(a)throw f;if(pu(f))return null;throw f}}async function Wp(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:o,gatewayUrls:s,strict:i,universalResolverAddress:a}){const c=await te(e,$p,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:o,universalResolverAddress:a,gatewayUrls:s,strict:i});if(!c)return null;try{return await vv(e,{record:c,gatewayUrls:r})}catch{return null}}async function qp(e,t){const{address:n,blockNumber:r,blockTag:o,coinType:s=60n,gatewayUrls:i,strict:a}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return zo({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})();try{const u={address:l,abi:Ub,args:[n,s,i??[Ys]],functionName:"reverseWithGateways",blockNumber:r,blockTag:o},f=te(e,Rt,"readContract"),[d]=await f(u);return d||null}catch(u){if(a)throw u;if(pu(u))return null;throw u}}async function Cv(e,t){const{blockNumber:n,blockTag:r,name:o}=t,{chain:s}=e,i=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!s)throw new Error("client chain not configured. universalResolverAddress is required.");return zo({blockNumber:n,chain:s,contract:"ensUniversalResolver"})})(),a=s==null?void 0:s.ensTlds;if(a&&!a.some(l=>o.endsWith(l)))throw new Error(`${o} is not a valid ENS TLD (${a==null?void 0:a.join(", ")}) for chain "${s.name}" (id: ${s.id}).`);const[c]=await te(e,Rt,"readContract")({address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[ln(mu(o))],blockNumber:n,blockTag:r});return c}async function zp(e,t){var b,y,C;const{account:n=e.account,blockNumber:r,blockTag:o="latest",blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,to:d,value:h,...g}=t,m=n?Qe(n):void 0;try{Wr(t);const w=(typeof r=="bigint"?ee(r):void 0)||o,x=(C=(y=(b=e.chain)==null?void 0:b.formatters)==null?void 0:y.transactionRequest)==null?void 0:C.format,A=(x||Qo)({...ei(g,{format:x}),account:m,blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,to:d,value:h},"createAccessList"),I=await e.request({method:"eth_createAccessList",params:[A,w]});return{accessList:I.accessList,gasUsed:BigInt(I.gasUsed)}}catch(v){throw Fp(v,{...t,account:m,chain:e.chain})}}function va(e,{method:t}){var r,o;const n={};return e.transport.type==="fallback"&&((o=(r=e.transport).onResponse)==null||o.call(r,({method:s,response:i,status:a,transport:c})=>{a==="success"&&t===s&&(n[i]=c.request)})),s=>n[s]||e.request}async function Av(e){const t=va(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}class Ev extends L{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const sf="/docs/contract/encodeEventTopics";function ti(e){var c;const{abi:t,eventName:n,args:r}=e;let o=t[0];if(n){const l=$r({abi:t,name:n});if(!l)throw new Dd(n,{docsPath:sf});o=l}if(o.type!=="event")throw new Dd(void 0,{docsPath:sf});const s=qt(o),i=ma(s);let a=[];if(r&&"inputs"in o){const l=(c=o.inputs)==null?void 0:c.filter(f=>"indexed"in f&&f.indexed),u=Array.isArray(r)?r:Object.values(r).length>0?(l==null?void 0:l.map(f=>r[f.name]))??[]:[];u.length>0&&(a=(l==null?void 0:l.map((f,d)=>Array.isArray(u[d])?u[d].map((h,g)=>af({param:f,value:u[d][g]})):typeof u[d]<"u"&&u[d]!==null?af({param:f,value:u[d]}):null))??[])}return[i,...a]}function af({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return ze($o(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new Ev(e.type);return Zn([e],[t])}async function Qp(e,t){const{address:n,abi:r,args:o,eventName:s,fromBlock:i,strict:a,toBlock:c}=t,l=va(e,{method:"eth_newFilter"}),u=s?ti({abi:r,args:o,eventName:s}):void 0,f=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof i=="bigint"?ee(i):i,toBlock:typeof c=="bigint"?ee(c):c,topics:u}]});return{abi:r,args:o,eventName:s,id:f,request:l(f),strict:!!a,type:"event"}}async function Hp(e,{address:t,args:n,event:r,events:o,fromBlock:s,strict:i,toBlock:a}={}){const c=o??(r?[r]:void 0),l=va(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(h=>ti({abi:[h],eventName:h.name,args:n}))],r&&(u=u[0]));const f=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof s=="bigint"?ee(s):s,toBlock:typeof a=="bigint"?ee(a):a,...u.length?{topics:u}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:s,id:f,request:l(f),strict:!!i,toBlock:a,type:"event"}}async function Gp(e){const t=va(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}function kv(e){const t=ze(`0x${e.substring(4)}`).substring(26);return ha(`0x${t}`)}async function Iv({hash:e,signature:t}){const n=zt(e)?e:ln(e),{secp256k1:r}=await Promise.resolve().then(()=>H3);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:l,s:u,v:f,yParity:d}=t,h=Number(d??f),g=cf(h);return new r.Signature(an(l),an(u)).addRecoveryBit(g)}const i=zt(t)?t:ln(t);if(Be(i)!==65)throw new Error("invalid signature length");const a=cn(`0x${i.slice(130)}`),c=cf(a);return r.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function cf(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Vp({hash:e,signature:t}){return kv(await Iv({hash:e,signature:t}))}function jv(e,t="hex"){const n=Kp(e),r=au(new Uint8Array(n.length));return n.encode(r),t==="hex"?De(r.bytes):r.bytes}function Kp(e){return Array.isArray(e)?Bv(e.map(t=>Kp(t))):Sv(e)}function Bv(e){const t=e.reduce((o,s)=>o+s.length,0),n=Jp(t);return{length:t<=55?1+t:1+n+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+n),n===1?o.pushUint8(t):n===2?o.pushUint16(t):n===3?o.pushUint24(t):o.pushUint32(t));for(const{encode:s}of e)s(o)}}}function Sv(e){const t=typeof e=="string"?Qt(e):e,n=Jp(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(o){t.length===1&&t[0]<128?o.pushBytes(t):t.length<=55?(o.pushByte(128+t.length),o.pushBytes(t)):(o.pushByte(183+n),n===1?o.pushUint8(t.length):n===2?o.pushUint16(t.length):n===3?o.pushUint24(t.length):o.pushUint32(t.length),o.pushBytes(t))}}}function Jp(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new L("Length is too large.")}function Pv(e){const{chainId:t,nonce:n,to:r}=e,o=e.contractAddress??e.address,s=ze(Wo(["0x05",jv([t?ee(t):"0x",o,n?ee(n):"0x"])]));return r==="bytes"?Qt(s):s}async function Au(e){const{authorization:t,signature:n}=e;return Vp({hash:Pv(t),signature:n??t})}class Ov extends L{constructor(t,{account:n,docsPath:r,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){var g;const h=Js({from:n==null?void 0:n.address,to:f,value:typeof d<"u"&&`${fu(d)} ${((g=o==null?void 0:o.nativeCurrency)==null?void 0:g.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${dt(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${dt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${dt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function Tv(e,{docsPath:t,...n}){const r=(()=>{const o=wa(e,n);return o instanceof Zs?e:o})();return new Ov(r,{docsPath:t,...n})}class Yp extends L{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Eu extends L{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class Rv extends L{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${dt(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Xp extends L{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const Zp={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function ku(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?cn(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?cn(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Zp[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=Nv(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}function Nv(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function em(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:ku(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function $t(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:o}={}){var l,u,f;const s=o??!1,i=n!==void 0?ee(n):void 0;let a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):a=await e.request({method:"eth_getBlockByNumber",params:[i||r,s]},{dedupe:!!i}),!a)throw new Xp({blockHash:t,blockNumber:n});return(((f=(u=(l=e.chain)==null?void 0:l.formatters)==null?void 0:u.block)==null?void 0:f.format)||em)(a,"getBlock")}async function Iu(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function Fv(e,t){return tm(e,t)}async function tm(e,t){var s,i;const{block:n,chain:r=e.chain,request:o}=t||{};try{const a=((s=r==null?void 0:r.fees)==null?void 0:s.maxPriorityFeePerGas)??((i=r==null?void 0:r.fees)==null?void 0:i.defaultPriorityFee);if(typeof a=="function"){const l=n||await te(e,$t,"getBlock")({}),u=await a({block:l,client:e,request:o});if(u===null)throw new Error;return u}if(typeof a<"u")return a;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return an(c)}catch{const[a,c]=await Promise.all([n?Promise.resolve(n):te(e,$t,"getBlock")({}),te(e,Iu,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new Eu;const l=c-a.baseFeePerGas;return l<0n?0n:l}}async function Mv(e,t){return al(e,t)}async function al(e,t){var d,h;const{block:n,chain:r=e.chain,request:o,type:s="eip1559"}=t||{},i=await(async()=>{var g,m;return typeof((g=r==null?void 0:r.fees)==null?void 0:g.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:o}):((m=r==null?void 0:r.fees)==null?void 0:m.baseFeeMultiplier)??1.2})();if(i<1)throw new Yp;const c=10**(((d=i.toString().split(".")[1])==null?void 0:d.length)??0),l=g=>g*BigInt(Math.ceil(i*c))/BigInt(c),u=n||await te(e,$t,"getBlock")({});if(typeof((h=r==null?void 0:r.fees)==null?void 0:h.estimateFeesPerGas)=="function"){const g=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:l,request:o,type:s});if(g!==null)return g}if(s==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new Eu;const g=typeof(o==null?void 0:o.maxPriorityFeePerGas)=="bigint"?o.maxPriorityFeePerGas:await tm(e,{block:u,chain:r,request:o}),m=l(u.baseFeePerGas);return{maxFeePerGas:(o==null?void 0:o.maxFeePerGas)??m+g,maxPriorityFeePerGas:g}}return{gasPrice:(o==null?void 0:o.gasPrice)??l(await te(e,Iu,"getGasPrice")({}))}}async function nm(e,{address:t,blockTag:n="latest",blockNumber:r}){const o=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?ee(r):n]},{dedupe:!!r});return cn(o)}function rm(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>Qt(s)):e.blobs,o=[];for(const s of r)o.push(Uint8Array.from(t.blobToKzgCommitment(s)));return n==="bytes"?o:o.map(s=>De(s))}function om(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>Qt(i)):e.blobs,o=typeof e.commitments[0]=="string"?e.commitments.map(i=>Qt(i)):e.commitments,s=[];for(let i=0;i<r.length;i++){const a=r[i],c=o[i];s.push(Uint8Array.from(t.computeBlobKzgProof(a,c)))}return n==="bytes"?s:s.map(i=>De(i))}function Dv(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),a=Number(n&s),c=r?4:0,l=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+l,a,r)}function Lv(e,t,n){return e&t^~e&n}function Uv(e,t,n){return e&t^e&n^t&n}class _v extends iu{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=qa(this.buffer)}update(t){Po(this),t=fa(t),Or(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const a=Math.min(o-this.pos,s-i);if(a===o){const c=qa(t);for(;o<=s-i;i+=o)this.process(c,i);continue}r.set(t.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Po(this),$h(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,Oo(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let f=i;f<o;f++)n[f]=0;Dv(r,o-8,BigInt(this.length*8),s),this.process(r,0);const a=qa(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:a}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=a,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Nn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$v=Uint32Array.from([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]),Fn=new Uint32Array(64);class Wv extends _v{constructor(t=32){super(64,t,8,!1),this.A=Nn[0]|0,this.B=Nn[1]|0,this.C=Nn[2]|0,this.D=Nn[3]|0,this.E=Nn[4]|0,this.F=Nn[5]|0,this.G=Nn[6]|0,this.H=Nn[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:a,H:c}=this;return[t,n,r,o,s,i,a,c]}set(t,n,r,o,s,i,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}process(t,n){for(let f=0;f<16;f++,n+=4)Fn[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const d=Fn[f-15],h=Fn[f-2],g=Jt(d,7)^Jt(d,18)^d>>>3,m=Jt(h,17)^Jt(h,19)^h>>>10;Fn[f]=m+Fn[f-7]+g+Fn[f-16]|0}let{A:r,B:o,C:s,D:i,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=Jt(a,6)^Jt(a,11)^Jt(a,25),h=u+d+Lv(a,c,l)+$v[f]+Fn[f]|0,m=(Jt(r,2)^Jt(r,13)^Jt(r,22))+Uv(r,o,s)|0;u=l,l=c,c=a,a=i+h|0,i=s,s=o,o=r,r=h+m|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,o,s,i,a,c,l,u)}roundClean(){Oo(Fn)}destroy(){this.set(0,0,0,0,0,0,0,0),Oo(this.buffer)}}const sm=Wh(()=>new Wv),qv=sm;function zv(e,t){return qv(zt(e,{strict:!1})?$o(e):e)}function Qv(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),o=zv(t);return o.set([n],0),r==="bytes"?o:De(o)}function Hv(e){const{commitments:t,version:n}=e,r=e.to,o=[];for(const s of t)o.push(Qv({commitment:s,to:r,version:n}));return o}const lf=6,im=32,ju=4096,am=im*ju,uf=am*lf-1-1*ju*lf;class Gv extends L{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class Vv extends L{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}function Kv(e){const t=typeof e.data=="string"?Qt(e.data):e.data,n=Be(t);if(!n)throw new Vv;if(n>uf)throw new Gv({maxSize:uf,size:n});const r=[];let o=!0,s=0;for(;o;){const i=au(new Uint8Array(am));let a=0;for(;a<ju;){const c=t.slice(s,s+(im-1));if(i.pushByte(0),i.pushBytes(c),c.length<31){i.pushByte(128),o=!1;break}a++,s+=31}r.push(i)}return r.map(i=>De(i.bytes))}function Jv(e){const{data:t,kzg:n,to:r}=e,o=e.blobs??Kv({data:t}),s=e.commitments??rm({blobs:o,kzg:n,to:r}),i=e.proofs??om({blobs:o,commitments:s,kzg:n,to:r}),a=[];for(let c=0;c<o.length;c++)a.push({blob:o[c],commitment:s[c],proof:i[c]});return a}function Yv(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new l6({transaction:e})}function cm(e,{docsPath:t,...n}){const r=(()=>{const o=wa(e,n);return o instanceof Zs?e:o})();return new u6(r,{docsPath:t,...n})}async function xa(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return cn(t)}async function lm(e,t){var I,S,T,R,M;const{account:n=e.account,accessList:r,authorizationList:o,chain:s=e.chain,blobVersionedHashes:i,blobs:a,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:g,nonceManager:m,to:b,type:y,value:C,...v}=t,w=await(async()=>{if(!n||!m||typeof g<"u")return g;const N=Qe(n),q=s?s.id:await te(e,xa,"getChainId")({});return await m.consume({address:N.address,chainId:q,client:e})})();Wr(t);const x=(S=(I=s==null?void 0:s.formatters)==null?void 0:I.transactionRequest)==null?void 0:S.format,A=(x||Qo)({...ei(v,{format:x}),account:n?Qe(n):void 0,accessList:r,authorizationList:o,blobs:a,blobVersionedHashes:i,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:w,to:b,type:y,value:C},"fillTransaction");try{const N=await e.request({method:"eth_fillTransaction",params:[A]}),P=(((R=(T=s==null?void 0:s.formatters)==null?void 0:T.transaction)==null?void 0:R.format)||ku)(N.tx);delete P.blockHash,delete P.blockNumber,delete P.r,delete P.s,delete P.transactionIndex,delete P.v,delete P.yParity,P.data=P.input,P.gas&&(P.gas=t.gas??P.gas),P.gasPrice&&(P.gasPrice=t.gasPrice??P.gasPrice),P.maxFeePerBlobGas&&(P.maxFeePerBlobGas=t.maxFeePerBlobGas??P.maxFeePerBlobGas),P.maxFeePerGas&&(P.maxFeePerGas=t.maxFeePerGas??P.maxFeePerGas),P.maxPriorityFeePerGas&&(P.maxPriorityFeePerGas=t.maxPriorityFeePerGas??P.maxPriorityFeePerGas),P.nonce&&(P.nonce=t.nonce??P.nonce);const D=await(async()=>{var W,ne;if(typeof((W=s==null?void 0:s.fees)==null?void 0:W.baseFeeMultiplier)=="function"){const ce=await te(e,$t,"getBlock")({});return s.fees.baseFeeMultiplier({block:ce,client:e,request:t})}return((ne=s==null?void 0:s.fees)==null?void 0:ne.baseFeeMultiplier)??1.2})();if(D<1)throw new Yp;const F=10**(((M=D.toString().split(".")[1])==null?void 0:M.length)??0),U=W=>W*BigInt(Math.ceil(D*F))/BigInt(F);return P.maxFeePerGas&&!t.maxFeePerGas&&(P.maxFeePerGas=U(P.maxFeePerGas)),P.gasPrice&&!t.gasPrice&&(P.gasPrice=U(P.gasPrice)),{raw:N.raw,transaction:{from:A.from,...P}}}catch(N){throw cm(N,{...t,chain:e.chain})}}const um=["blobVersionedHashes","chainId","fees","gas","nonce","type"],df=new Map,Xa=new Hs(128);async function Bu(e,t){var w,x,E;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=um);const{account:r,chain:o=e.chain,nonceManager:s,parameters:i}=n,a=(()=>{if(typeof(o==null?void 0:o.prepareTransactionRequest)=="function")return{fn:o.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(o==null?void 0:o.prepareTransactionRequest))return{fn:o.prepareTransactionRequest[0],runAt:o.prepareTransactionRequest[1].runAt}})();let c;async function l(){return c||(typeof n.chainId<"u"?n.chainId:o?o.id:(c=await te(e,xa,"getChainId")({}),c))}const u=r&&Qe(r);let f=n.nonce;if(i.includes("nonce")&&typeof f>"u"&&u&&s){const A=await l();f=await s.consume({address:u.address,chainId:A,client:e})}a!=null&&a.fn&&((w=a.runAt)!=null&&w.includes("beforeFillTransaction"))&&(n=await a.fn({...n,chain:o},{phase:"beforeFillTransaction"}),f??(f=n.nonce));const h=((i.includes("blobVersionedHashes")||i.includes("sidecars"))&&n.kzg&&n.blobs||Xa.get(e.uid)===!1||!["fees","gas"].some(I=>i.includes(I))?!1:!!(i.includes("chainId")&&typeof n.chainId!="number"||i.includes("nonce")&&typeof f!="number"||i.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||i.includes("gas")&&typeof n.gas!="bigint"))?await te(e,lm,"fillTransaction")({...n,nonce:f}).then(A=>{const{chainId:I,from:S,gas:T,gasPrice:R,nonce:M,maxFeePerBlobGas:N,maxFeePerGas:q,maxPriorityFeePerGas:P,type:D,..._}=A.transaction;return Xa.set(e.uid,!0),{...n,...S?{from:S}:{},...D?{type:D}:{},...typeof I<"u"?{chainId:I}:{},...typeof T<"u"?{gas:T}:{},...typeof R<"u"?{gasPrice:R}:{},...typeof M<"u"?{nonce:M}:{},...typeof N<"u"?{maxFeePerBlobGas:N}:{},...typeof q<"u"?{maxFeePerGas:q}:{},...typeof P<"u"?{maxPriorityFeePerGas:P}:{},..."nonceKey"in _&&typeof _.nonceKey<"u"?{nonceKey:_.nonceKey}:{}}}).catch(A=>{var T;const I=A;return I.name!=="TransactionExecutionError"||((T=I.walk)==null?void 0:T.call(I,R=>{const M=R;return M.name==="MethodNotFoundRpcError"||M.name==="MethodNotSupportedRpcError"}))&&Xa.set(e.uid,!1),n}):n;f??(f=h.nonce),n={...h,...u?{from:u==null?void 0:u.address}:{},...f?{nonce:f}:{}};const{blobs:g,gas:m,kzg:b,type:y}=n;a!=null&&a.fn&&((x=a.runAt)!=null&&x.includes("beforeFillParameters"))&&(n=await a.fn({...n,chain:o},{phase:"beforeFillParameters"}));let C;async function v(){return C||(C=await te(e,$t,"getBlock")({blockTag:"latest"}),C)}if(i.includes("nonce")&&typeof f>"u"&&u&&!s&&(n.nonce=await te(e,nm,"getTransactionCount")({address:u.address,blockTag:"pending"})),(i.includes("blobVersionedHashes")||i.includes("sidecars"))&&g&&b){const A=rm({blobs:g,kzg:b});if(i.includes("blobVersionedHashes")){const I=Hv({commitments:A,to:"hex"});n.blobVersionedHashes=I}if(i.includes("sidecars")){const I=om({blobs:g,commitments:A,kzg:b}),S=Jv({blobs:g,commitments:A,proofs:I,to:"hex"});n.sidecars=S}}if(i.includes("chainId")&&(n.chainId=await l()),(i.includes("fees")||i.includes("type"))&&typeof y>"u")try{n.type=Yv(n)}catch{let A=df.get(e.uid);if(typeof A>"u"){const I=await v();A=typeof(I==null?void 0:I.baseFeePerGas)=="bigint",df.set(e.uid,A)}n.type=A?"eip1559":"legacy"}if(i.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const A=await v(),{maxFeePerGas:I,maxPriorityFeePerGas:S}=await al(e,{block:A,chain:o,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<S)throw new Rv({maxPriorityFeePerGas:S});n.maxPriorityFeePerGas=S,n.maxFeePerGas=I}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new Eu;if(typeof n.gasPrice>"u"){const A=await v(),{gasPrice:I}=await al(e,{block:A,chain:o,request:n,type:"legacy"});n.gasPrice=I}}return i.includes("gas")&&typeof m>"u"&&(n.gas=await te(e,Su,"estimateGas")({...n,account:u,prepare:(u==null?void 0:u.type)==="local"?[]:["blobVersionedHashes"]})),a!=null&&a.fn&&((E=a.runAt)!=null&&E.includes("afterFillParameters"))&&(n=await a.fn({...n,chain:o},{phase:"afterFillParameters"})),Wr(n),delete n.parameters,n}async function Su(e,t){var i,a,c;const{account:n=e.account,prepare:r=!0}=t,o=n?Qe(n):void 0,s=(()=>{if(Array.isArray(r))return r;if((o==null?void 0:o.type)!=="local")return["blobVersionedHashes"]})();try{const l=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Au({authorization:t.authorizationList[0]}).catch(()=>{throw new L("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:u,authorizationList:f,blobs:d,blobVersionedHashes:h,blockNumber:g,blockTag:m,data:b,gas:y,gasPrice:C,maxFeePerBlobGas:v,maxFeePerGas:w,maxPriorityFeePerGas:x,nonce:E,value:A,stateOverride:I,...S}=r?await Bu(e,{...t,parameters:s,to:l}):t;if(y&&t.gas!==y)return y;const R=(typeof g=="bigint"?ee(g):void 0)||m,M=vu(I);Wr(t);const N=(c=(a=(i=e.chain)==null?void 0:i.formatters)==null?void 0:a.transactionRequest)==null?void 0:c.format,P=(N||Qo)({...ei(S,{format:N}),account:o,accessList:u,authorizationList:f,blobs:d,blobVersionedHashes:h,data:b,gasPrice:C,maxFeePerBlobGas:v,maxFeePerGas:w,maxPriorityFeePerGas:x,nonce:E,to:l,value:A},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:M?[P,R??e.experimental_blockTag??"latest",M]:R?[P,R]:[P]}))}catch(l){throw Tv(l,{...t,account:o,chain:e.chain})}}async function Xv(e,t){var l;const{abi:n,address:r,args:o,functionName:s,dataSuffix:i=typeof e.dataSuffix=="string"?e.dataSuffix:(l=e.dataSuffix)==null?void 0:l.value,...a}=t,c=Ct({abi:n,args:o,functionName:s});try{return await te(e,Su,"estimateGas")({data:`${c}${i?i.replace("0x",""):""}`,to:r,...a})}catch(u){const f=a.account?Qe(a.account):void 0;throw Rr(u,{abi:n,address:r,args:o,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:f==null?void 0:f.address})}}async function dm(e,{address:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest"}){var i,a,c;if((i=e.batch)!=null&&i.multicall&&((c=(a=e.chain)==null?void 0:a.contracts)!=null&&c.multicall3)){const l=e.chain.contracts.multicall3.address,u=Ct({abi:jo,functionName:"getEthBalance",args:[t]}),{data:f}=await te(e,Ho,"call")({to:l,data:u,blockNumber:n,blockTag:r});return er({abi:jo,functionName:"getEthBalance",args:[t],data:f||"0x"})}const o=typeof n=="bigint"?ee(n):void 0,s=await e.request({method:"eth_getBalance",params:[t,o||r]});return BigInt(s)}async function Zv(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}const e2=new Map,t2=new Map;function n2(e){const t=(o,s)=>({clear:()=>s.delete(o),get:()=>s.get(o),set:i=>s.set(o,i)}),n=t(e,e2),r=t(e,t2);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function r2(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=n2(t),o=r.response.get();if(o&&n>0&&Date.now()-o.created.getTime()<n)return o.data;let s=r.promise.get();s||(s=e(),r.promise.set(s));try{const i=await s;return r.response.set({created:new Date,data:i}),i}finally{r.promise.clear()}}const o2=e=>`blockNumber.${e}`;async function ni(e,{cacheTime:t=e.cacheTime}={}){const n=await r2(()=>e.request({method:"eth_blockNumber"}),{cacheKey:o2(e.uid),cacheTime:t});return BigInt(n)}async function s2(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const o=n!==void 0?ee(n):void 0;let s;return t?s=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):s=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||r]},{dedupe:!!o}),cn(s)}async function cl(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=n!==void 0?ee(n):void 0,s=await e.request({method:"eth_getCode",params:[t,o||r]},{dedupe:!!o});if(s!=="0x")return s}function ri(e,t){if(!wt(e,{strict:!1}))throw new Jn({address:e});if(!wt(t,{strict:!1}))throw new Jn({address:t});return e.toLowerCase()===t.toLowerCase()}const ff="/docs/contract/decodeEventLog";function Qi(e){const{abi:t,data:n,strict:r,topics:o}=e,s=r??!0,[i,...a]=o;if(!i)throw new Hb({docsPath:ff});const c=t.find(y=>y.type==="event"&&i===ma(qt(y)));if(!(c&&"name"in c)||c.type!=="event")throw new Gb(i,{docsPath:ff});const{name:l,inputs:u}=c,f=u==null?void 0:u.some(y=>!("name"in y&&y.name)),d=f?[]:{},h=u.map((y,C)=>[y,C]).filter(([y])=>"indexed"in y&&y.indexed),g=[];for(let y=0;y<h.length;y++){const[C,v]=h[y],w=a[y];if(!w){if(s)throw new ou({abiItem:c,param:C});g.push([C,v]);continue}d[f?v:C.name||v]=i2({param:C,value:w})}const m=u.filter(y=>!("indexed"in y&&y.indexed)),b=s?m:[...g.map(([y])=>y),...m];if(b.length>0){if(n&&n!=="0x")try{const y=Gs(b,n);if(y){let C=0;if(!s)for(const[v,w]of g)d[f?w:v.name||w]=y[C++];if(f)for(let v=0;v<u.length;v++)d[v]===void 0&&C<y.length&&(d[v]=y[C++]);else for(let v=0;v<m.length;v++)d[m[v].name]=y[C++]}}catch(y){if(s)throw y instanceof Nh||y instanceof Vh?new $i({abiItem:c,data:n,params:b,size:Be(n)}):y}else if(s)throw new $i({abiItem:c,data:"0x",params:b,size:0})}return{eventName:l,args:Object.values(d).length>0?d:void 0}}function i2({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Gs([e],t)||[])[0]}function Pu(e){const{abi:t,args:n,logs:r,strict:o=!0}=e,s=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),i=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:ma(a)}));return r.map(a=>{var f;const c=i.filter(d=>a.topics[0]===d.selector);if(c.length===0)return null;let l,u;for(const d of c)try{l=Qi({...a,abi:[d.abi],strict:!0}),u=d;break}catch{}if(!l&&!o){u=c[0];try{l=Qi({data:a.data,topics:a.topics,abi:[u.abi],strict:!1})}catch{const d=(f=u.abi.inputs)==null?void 0:f.some(h=>!("name"in h&&h.name));return{...a,args:d?[]:{},eventName:u.abi.name}}}return!l||!u||s&&!s.includes(l.eventName)||!a2({args:l.args,inputs:u.abi.inputs,matchArgs:n})?null:{...l,...a}}).filter(Boolean)}function a2(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function o(s,i,a){try{return s.type==="address"?ri(i,a):s.type==="string"||s.type==="bytes"?ze($o(i))===a:i===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((s,i)=>{if(s==null)return!0;const a=n[i];return a?(Array.isArray(s)?s:[s]).some(l=>o(a,l,t[i])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([s,i])=>{if(i==null)return!0;const a=n.find(l=>l.name===s);return a?(Array.isArray(i)?i:[i]).some(l=>o(a,l,t[s])):!1}):!1}function On(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}async function Ou(e,{address:t,blockHash:n,fromBlock:r,toBlock:o,event:s,events:i,args:a,strict:c}={}){const l=c??!1,u=i??(s?[s]:void 0);let f=[];u&&(f=[u.flatMap(m=>ti({abi:[m],eventName:m.name,args:i?void 0:a}))],s&&(f=f[0]));let d;n?d=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:n}]}):d=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:typeof r=="bigint"?ee(r):r,toBlock:typeof o=="bigint"?ee(o):o}]});const h=d.map(g=>On(g));return u?Pu({abi:u,args:a,logs:h,strict:l}):h}async function fm(e,t){const{abi:n,address:r,args:o,blockHash:s,eventName:i,fromBlock:a,toBlock:c,strict:l}=t,u=i?$r({abi:n,name:i}):void 0,f=u?void 0:n.filter(d=>d.type==="event");return te(e,Ou,"getLogs")({address:r,args:o,blockHash:s,event:u,events:f,fromBlock:a,toBlock:c,strict:l})}class c2 extends L{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function l2(e,t){const{address:n,factory:r,factoryData:o}=t;try{const[s,i,a,c,l,u,f]=await te(e,Rt,"readContract")({abi:u2,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:i,version:a,chainId:Number(c),verifyingContract:l,salt:u},extensions:f,fields:s}}catch(s){const i=s;throw i.name==="ContractFunctionExecutionError"&&i.cause.name==="ContractFunctionZeroDataError"?new c2({address:n}):i}}const u2=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function d2(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function f2(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:o}){const s=typeof n=="bigint"?ee(n):void 0,i=await e.request({method:"eth_feeHistory",params:[ee(t),s||r,o]},{dedupe:!!s});return d2(i)}async function Ca(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const o=r.map(s=>On(s));return!("abi"in t)||!t.abi?o:Pu({abi:t.abi,logs:o,strict:n})}async function h2(e,{filter:t}){const n=t.strict??!1,o=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(s=>On(s));return t.abi?Pu({abi:t.abi,logs:o,strict:n}):o}async function p2({address:e,authorization:t,signature:n}){return ri(yt(e),await Au({authorization:t,signature:n}))}const mi=new Hs(8192);function m2(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(mi.get(n))return mi.get(n);const r=e().finally(()=>mi.delete(n));return mi.set(n,r),r}async function Hi(e){return new Promise(t=>setTimeout(t,e))}function Mo(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((o,s)=>{const i=async({count:a=0}={})=>{const c=async({error:l})=>{const u=typeof t=="function"?t({count:a,error:l}):t;u&&await Hi(u),i({count:a+1})};try{const l=await e();o(l)}catch(l){if(a<n&&await r({count:a,error:l}))return c({error:l});s(l)}};i()})}function g2(e,t={}){return async(n,r={})=>{var f;const{dedupe:o=!1,methods:s,retryDelay:i=150,retryCount:a=3,uid:c}={...t,...r},{method:l}=n;if((f=s==null?void 0:s.exclude)!=null&&f.includes(l))throw new pr(new Error("method not supported"),{method:l});if(s!=null&&s.include&&!s.include.includes(l))throw new pr(new Error("method not supported"),{method:l});const u=o?So(`${c}.${_e(n)}`):void 0;return m2(()=>Mo(async()=>{try{return await e(n)}catch(d){const h=d;switch(h.code){case hs.code:throw new hs(h);case ps.code:throw new ps(h);case ms.code:throw new ms(h,{method:n.method});case gs.code:throw new gs(h);case Tr.code:throw new Tr(h);case Yn.code:throw new Yn(h);case bs.code:throw new bs(h);case on.code:throw new on(h);case Ro.code:throw new Ro(h);case pr.code:throw new pr(h,{method:n.method});case No.code:throw new No(h);case ys.code:throw new ys(h);case Ee.code:throw new Ee(h);case ws.code:throw new ws(h);case vs.code:throw new vs(h);case xs.code:throw new xs(h);case Cs.code:throw new Cs(h);case Wt.code:throw new Wt(h);case As.code:throw new As(h);case Es.code:throw new Es(h);case ks.code:throw new ks(h);case Is.code:throw new Is(h);case js.code:throw new js(h);case Bs.code:throw new Bs(h);case Ss.code:throw new Ss(h);case 5e3:throw new Ee(h);case Fo.code:throw new Fo(h);default:throw d instanceof L?d:new C6(h)}}},{delay:({count:d,error:h})=>{var g;if(h&&h instanceof co){const m=(g=h==null?void 0:h.headers)==null?void 0:g.get("Retry-After");if(m!=null&&m.match(/\d/))return Number.parseInt(m,10)*1e3}return~~(1<<d)*i},retryCount:a,shouldRetry:({error:d})=>b2(d)}),{enabled:o,id:u})}}function b2(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===No.code||e.code===Tr.code:e instanceof co&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function y2({chain:e,currentChainId:t}){if(!e)throw new e6;if(t!==e.id)throw new Zw({chain:e,currentChainId:t})}function hm(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(r){return o=>{const s=typeof o=="function"?o(r):o,i={...r,...s};return Object.assign(i,{extend:n(i)})}}return Object.assign(t,{extend:n(t)})}const w2={"0x0":"reverted","0x1":"success"};function pm(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>On(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?cn(e.transactionIndex):null,status:e.status?w2[e.status]:null,type:e.type?Zp[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}function Tu(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((o,s)=>{(async()=>{let i;try{const a=new AbortController;n>0&&(i=setTimeout(()=>{r?a.abort():s(t)},n)),o(await e({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&s(t),s(a)}finally{clearTimeout(i)}})()})}function v2(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const hf=v2();function x2(e,t={}){const{url:n,headers:r}=C2(e);return{async request(o){var g;const{body:s,fetchFn:i=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:c=t.onResponse,timeout:l=t.timeout??1e4}=o,u={...t.fetchOptions??{},...o.fetchOptions??{}},{headers:f,method:d,signal:h}=u;try{const m=await Tu(async({signal:y})=>{const C={...u,body:Array.isArray(s)?_e(s.map(E=>({jsonrpc:"2.0",id:E.id??hf.take(),...E}))):_e({jsonrpc:"2.0",id:s.id??hf.take(),...s}),headers:{...r,"Content-Type":"application/json",...f},method:d||"POST",signal:h||(l>0?y:null)},v=new Request(n,C),w=await(a==null?void 0:a(v,C))??{...C,url:n};return await i(w.url??n,w)},{errorInstance:new Zd({body:s,url:n}),timeout:l,signal:!0});c&&await c(m);let b;if((g=m.headers.get("Content-Type"))!=null&&g.startsWith("application/json"))b=await m.json();else{b=await m.text();try{b=JSON.parse(b||"{}")}catch(y){if(m.ok)throw y;b={error:b}}}if(!m.ok)throw new co({body:s,details:_e(b.error)||m.statusText,headers:m.headers,status:m.status,url:n});return b}catch(m){throw m instanceof co||m instanceof Zd?m:new co({body:s,cause:m,url:n})}}}}function C2(e){try{const t=new URL(e),n=(()=>{if(t.username){const r=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(r)}`}}}})();return{url:t.toString(),...n}}catch{return{url:e}}}const A2=`Ethereum Signed Message:
|
|
70
|
+
`;function E2(e){const t=typeof e=="string"?So(e):typeof e.raw=="string"?e.raw:De(e.raw),n=So(`${A2}${Be(t)}`);return vt([n,t])}function mm(e,t){return ze(E2(e),t)}class k2 extends L{constructor({domain:t}){super(`Invalid domain "${_e(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class I2 extends L{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class j2 extends L{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function B2(e){const{domain:t,message:n,primaryType:r,types:o}=e,s=(i,a)=>{for(const c of i){const{name:l,type:u}=c,f=a[l],d=u.match(Xh);if(d&&(typeof f=="number"||typeof f=="bigint")){const[m,b,y]=d;ee(f,{signed:b==="int",size:Number.parseInt(y,10)/8})}if(u==="address"&&typeof f=="string"&&!wt(f))throw new Jn({address:f});const h=u.match(Qy);if(h){const[m,b]=h;if(b&&Be(f)!==Number.parseInt(b,10))throw new Jb({expectedSize:Number.parseInt(b,10),givenSize:Be(f)})}const g=o[u];g&&(P2(u),s(g,f))}};if(o.EIP712Domain&&t){if(typeof t!="object")throw new k2({domain:t});s(o.EIP712Domain,t)}if(r!=="EIP712Domain")if(o[r])s(o[r],n);else throw new I2({primaryType:r,types:o})}function S2({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function P2(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new j2({type:e})}function O2(e){const{domain:t={},message:n,primaryType:r}=e,o={EIP712Domain:S2({domain:t}),...e.types};B2({domain:t,message:n,primaryType:r,types:o});const s=["0x1901"];return t&&s.push(T2({domain:t,types:o})),r!=="EIP712Domain"&&s.push(gm({data:n,primaryType:r,types:o})),ze(vt(s))}function T2({domain:e,types:t}){return gm({data:e,primaryType:"EIP712Domain",types:t})}function gm({data:e,primaryType:t,types:n}){const r=bm({data:e,primaryType:t,types:n});return ze(r)}function bm({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],o=[R2({primaryType:t,types:n})];for(const s of n[t]){const[i,a]=wm({types:n,name:s.name,type:s.type,value:e[s.name]});r.push(i),o.push(a)}return Zn(r,o)}function R2({primaryType:e,types:t}){const n=ln(N2({primaryType:e,types:t}));return ze(n)}function N2({primaryType:e,types:t}){let n="";const r=ym({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const s of o)n+=`${s}(${t[s].map(({name:i,type:a})=>`${a} ${i}`).join(",")})`;return n}function ym({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),o=r==null?void 0:r[0];if(n.has(o)||t[o]===void 0)return n;n.add(o);for(const s of t[o])ym({primaryType:s.type,types:t},n);return n}function wm({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},ze(bm({data:r,primaryType:n,types:e}))];if(n==="bytes")return[{type:"bytes32"},ze(r)];if(n==="string")return[{type:"bytes32"},ze(ln(r))];if(n.lastIndexOf("]")===n.length-1){const o=n.slice(0,n.lastIndexOf("[")),s=r.map(i=>wm({name:t,type:o,types:e,value:i}));return[{type:"bytes32"},ze(Zn(s.map(([i])=>i),s.map(([,i])=>i)))]}return[{type:n},r]}class F2 extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const M2={checksum:new F2(8192)},Za=M2.checksum;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function D2(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function pf(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Gi(e,...t){if(!D2(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function mf(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function L2(e,t){Gi(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function U2(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function vm(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}const _2=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function $2(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function W2(e){for(let t=0;t<e.length;t++)e[t]=$2(e[t]);return e}const gf=_2?e=>e:W2;function q2(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function xm(e){return typeof e=="string"&&(e=q2(e)),Gi(e),e}class z2{}function Q2(e){const t=r=>e().update(xm(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const gi=BigInt(2**32-1),bf=BigInt(32);function H2(e,t=!1){return t?{h:Number(e&gi),l:Number(e>>bf&gi)}:{h:Number(e>>bf&gi)|0,l:Number(e&gi)|0}}function G2(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:a}=H2(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const V2=(e,t,n)=>e<<n|t>>>32-n,K2=(e,t,n)=>t<<n|e>>>32-n,J2=(e,t,n)=>t<<n-32|e>>>64-n,Y2=(e,t,n)=>e<<n-32|t>>>64-n,X2=BigInt(0),ns=BigInt(1),Z2=BigInt(2),e5=BigInt(7),t5=BigInt(256),n5=BigInt(113),Cm=[],Am=[],Em=[];for(let e=0,t=ns,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Cm.push(2*(5*r+n)),Am.push((e+1)*(e+2)/2%64);let o=X2;for(let s=0;s<7;s++)t=(t<<ns^(t>>e5)*n5)%t5,t&Z2&&(o^=ns<<(ns<<BigInt(s))-ns);Em.push(o)}const km=G2(Em,!0),r5=km[0],o5=km[1],yf=(e,t,n)=>n>32?J2(e,t,n):V2(e,t,n),wf=(e,t,n)=>n>32?Y2(e,t,n):K2(e,t,n);function s5(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const a=(i+8)%10,c=(i+2)%10,l=n[c],u=n[c+1],f=yf(l,u,1)^n[a],d=wf(l,u,1)^n[a+1];for(let h=0;h<50;h+=10)e[i+h]^=f,e[i+h+1]^=d}let o=e[2],s=e[3];for(let i=0;i<24;i++){const a=Am[i],c=yf(o,s,a),l=wf(o,s,a),u=Cm[i];o=e[u],s=e[u+1],e[u]=c,e[u+1]=l}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)n[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=r5[r],e[1]^=o5[r]}vm(n)}class Ru extends z2{constructor(t,n,r,o=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=s,pf(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=U2(this.state)}clone(){return this._cloneInto()}keccak(){gf(this.state32),s5(this.state32,this.rounds),gf(this.state32),this.posOut=0,this.pos=0}update(t){mf(this),t=xm(t),Gi(t);const{blockLen:n,state:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);for(let a=0;a<i;a++)r[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,n&128&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){mf(this,!1),Gi(t),this.finish();const n=this.state,{blockLen:r}=this;for(let o=0,s=t.length;o<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-o);t.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return pf(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(L2(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,vm(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new Ru(n,r,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}}const i5=(e,t,n)=>Q2(()=>new Ru(t,e,n)),a5=i5(1,136,256/8);function Im(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=a5(T6(e));return n==="Bytes"?r:Gt(r)}const c5=/^0x[a-fA-F0-9]{40}$/;function Aa(e,t={}){const{strict:n=!0}=t;if(!c5.test(e))throw new vf({address:e,cause:new l5});if(n){if(e.toLowerCase()===e)return;if(jm(e)!==e)throw new vf({address:e,cause:new u5})}}function jm(e){if(Za.has(e))return Za.get(e);Aa(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=Im(N6(t),{as:"Bytes"}),r=t.split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&r[s]&&(r[s]=r[s].toUpperCase()),(n[s>>1]&15)>=8&&r[s+1]&&(r[s+1]=r[s+1].toUpperCase());const o=`0x${r.join("")}`;return Za.set(e,o),o}function ll(e,t={}){const{strict:n=!0}=t??{};try{return Aa(e,{strict:n}),!0}catch{return!1}}class vf extends le{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class l5 extends le{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class u5 extends le{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const d5=/^(.*)\[([0-9]*)\]$/,f5=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Bm=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,xf=2n**256n-1n;function lo(e,t,n){const{checksumAddress:r,staticPosition:o}=n,s=Mu(t.type);if(s){const[i,a]=s;return p5(e,{...t,type:a},{checksumAddress:r,length:i,staticPosition:o})}if(t.type==="tuple")return y5(e,t,{checksumAddress:r,staticPosition:o});if(t.type==="address")return h5(e,{checksum:r});if(t.type==="bool")return m5(e);if(t.type.startsWith("bytes"))return g5(e,t,{staticPosition:o});if(t.type.startsWith("uint")||t.type.startsWith("int"))return b5(e,t);if(t.type==="string")return w5(e,{staticPosition:o});throw new Lu(t.type)}const Cf=32,ul=32;function h5(e,t={}){const{checksum:n=!1}=t,r=e.readBytes(32);return[(s=>n?jm(s):s)(Gt(M6(r,-20))),32]}function p5(e,t,n){const{checksumAddress:r,length:o,staticPosition:s}=n;if(!o){const c=jn(e.readBytes(ul)),l=s+c,u=l+Cf;e.setPosition(l);const f=jn(e.readBytes(Cf)),d=Ps(t);let h=0;const g=[];for(let m=0;m<f;++m){e.setPosition(u+(d?m*32:h));const[b,y]=lo(e,t,{checksumAddress:r,staticPosition:u});h+=y,g.push(b)}return e.setPosition(s+32),[g,32]}if(Ps(t)){const c=jn(e.readBytes(ul)),l=s+c,u=[];for(let f=0;f<o;++f){e.setPosition(l+f*32);const[d]=lo(e,t,{checksumAddress:r,staticPosition:l});u.push(d)}return e.setPosition(s+32),[u,32]}let i=0;const a=[];for(let c=0;c<o;++c){const[l,u]=lo(e,t,{checksumAddress:r,staticPosition:s+i});i+=u,a.push(l)}return[a,i]}function m5(e){return[L6(e.readBytes(32),{size:32}),32]}function g5(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const i=jn(e.readBytes(32));e.setPosition(n+i);const a=jn(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(a);return e.setPosition(n+32),[Gt(c),32]}return[Gt(e.readBytes(Number.parseInt(o,10),32)),32]}function b5(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?D6(o,{signed:n}):jn(o,{signed:n}),32]}function y5(e,t,n){const{checksumAddress:r,staticPosition:o}=n,s=t.components.length===0||t.components.some(({name:c})=>!c),i=s?[]:{};let a=0;if(Ps(t)){const c=jn(e.readBytes(ul)),l=o+c;for(let u=0;u<t.components.length;++u){const f=t.components[u];e.setPosition(l+a);const[d,h]=lo(e,f,{checksumAddress:r,staticPosition:l});a+=h,i[s?u:f==null?void 0:f.name]=d}return e.setPosition(o+32),[i,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[u,f]=lo(e,l,{checksumAddress:r,staticPosition:o});i[s?c:l==null?void 0:l.name]=u,a+=f}return[i,a]}function w5(e,{staticPosition:t}){const n=jn(e.readBytes(32)),r=t+n;e.setPosition(r);const o=jn(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const s=e.readBytes(o,32),i=U6(jp(s));return e.setPosition(t+32),[i,32]}function v5({checksumAddress:e,parameters:t,values:n}){const r=[];for(let o=0;o<t.length;o++)r.push(Nu({checksumAddress:e,parameter:t[o],value:n[o]}));return r}function Nu({checksumAddress:e=!1,parameter:t,value:n}){const r=t,o=Mu(r.type);if(o){const[s,i]=o;return C5(n,{checksumAddress:e,length:s,parameter:{...r,type:i}})}if(r.type==="tuple")return j5(n,{checksumAddress:e,parameter:r});if(r.type==="address")return x5(n,{checksum:e});if(r.type==="bool")return E5(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const s=r.type.startsWith("int"),[,,i="256"]=Bm.exec(r.type)??[];return k5(n,{signed:s,size:Number(i)})}if(r.type.startsWith("bytes"))return A5(n,{type:r.type});if(r.type==="string")return I5(n);throw new Lu(r.type)}function Fu(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?t+=32:t+=xt(a)}const n=[],r=[];let o=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?(n.push(Ze(t+o,{size:32})),r.push(a),o+=xt(a)):n.push(a)}return Ht(...n,...r)}function x5(e,t){const{checksum:n=!1}=t;return Aa(e,{strict:n}),{dynamic:!1,encoded:Nr(e.toLowerCase())}}function C5(e,t){const{checksumAddress:n,length:r,parameter:o}=t,s=r===null;if(!Array.isArray(e))throw new M5(e);if(!s&&e.length!==r)throw new F5({expectedLength:r,givenLength:e.length,type:`${o.type}[${r}]`});let i=!1;const a=[];for(let c=0;c<e.length;c++){const l=Nu({checksumAddress:n,parameter:o,value:e[c]});l.dynamic&&(i=!0),a.push(l)}if(s||i){const c=Fu(a);if(s){const l=Ze(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?Ht(l,c):l}}if(i)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:Ht(...a.map(({encoded:c})=>c))}}function A5(e,{type:t}){const[,n]=t.split("bytes"),r=xt(e);if(!n){let o=e;return r%32!==0&&(o=Fr(o,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:Ht(Nr(Ze(r,{size:32})),o)}}if(r!==Number.parseInt(n,10))throw new Pm({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Fr(e)}}function E5(e){if(typeof e!="boolean")throw new le(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Nr(Bp(e))}}function k5(e,{signed:t,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new Op({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:Ze(e,{size:32,signed:t})}}function I5(e){const t=bu(e),n=Math.ceil(xt(t)/32),r=[];for(let o=0;o<n;o++)r.push(Fr(sn(t,o*32,(o+1)*32)));return{dynamic:!0,encoded:Ht(Fr(Ze(xt(t),{size:32})),...r)}}function j5(e,t){const{checksumAddress:n,parameter:r}=t;let o=!1;const s=[];for(let i=0;i<r.components.length;i++){const a=r.components[i],c=Array.isArray(e)?i:a.name,l=Nu({checksumAddress:n,parameter:a,value:e[c]});s.push(l),l.dynamic&&(o=!0)}return{dynamic:o,encoded:o?Fu(s):Ht(...s.map(({encoded:i})=>i))}}function Mu(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Ps(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(Ps);const n=Mu(e.type);return!!(n&&Ps({...e,type:n[1]}))}const B5={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new O5({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new P5({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Af({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Af({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function S5(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(B5);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}class Af extends le{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class P5 extends le{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class O5 extends le{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function T5(e,t,n={}){const{as:r="Array",checksumAddress:o=!1}=n,s=typeof t=="string"?Ip(t):t,i=S5(s);if(to(s)===0&&e.length>0)throw new N5;if(to(s)&&to(s)<32)throw new R5({data:typeof t=="string"?t:Gt(t),parameters:e,size:to(s)});let a=0;const c=r==="Array"?[]:{};for(let l=0;l<e.length;++l){const u=e[l];i.setPosition(a);const[f,d]=lo(i,u,{checksumAddress:o,staticPosition:0});a+=d,r==="Array"?c.push(f):c[u.name??l]=f}return c}function Du(e,t,n){const{checksumAddress:r=!1}={};if(e.length!==t.length)throw new Om({expectedLength:e.length,givenLength:t.length});const o=v5({checksumAddress:r,parameters:e,values:t}),s=Fu(o);return s.length===0?"0x":s}function dl(e,t){if(e.length!==t.length)throw new Om({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r];n.push(dl.encode(o,s))}return Ht(...n)}(function(e){function t(n,r,o=!1){if(n==="address"){const c=r;return Aa(c),Nr(c.toLowerCase(),o?32:0)}if(n==="string")return bu(r);if(n==="bytes")return r;if(n==="bool")return Nr(Bp(r),o?32:1);const s=n.match(Bm);if(s){const[c,l,u="256"]=s,f=Number.parseInt(u,10)/8;return Ze(r,{size:o?32:f,signed:l==="int"})}const i=n.match(f5);if(i){const[c,l]=i;if(Number.parseInt(l,10)!==(r.length-2)/2)throw new Pm({expectedSize:Number.parseInt(l,10),value:r});return Fr(r,o?32:0)}const a=n.match(d5);if(a&&Array.isArray(r)){const[c,l]=a,u=[];for(let f=0;f<r.length;f++)u.push(t(l,r[f],!0));return u.length===0?"0x":Ht(...u)}throw new Lu(n)}e.encode=t})(dl||(dl={}));function Sm(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?Kd(e):e}class R5 extends le{constructor({data:t,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Zr(n)})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class N5 extends le{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class F5 extends le{constructor({expectedLength:t,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class Pm extends le{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${xt(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Om extends le{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
|
|
71
|
+
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class M5 extends le{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class Lu extends le{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function Tm(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new ec({signature:e});if(typeof e.s>"u")throw new ec({signature:e});if(n&&typeof e.yParity>"u")throw new ec({signature:e});if(e.r<0n||e.r>xf)throw new q5({value:e.r});if(e.s<0n||e.s>xf)throw new z5({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new _u({value:e.yParity})}function D5(e){return Rm(Gt(e))}function Rm(e){if(e.length!==130&&e.length!==132)throw new W5({signature:e});const t=BigInt(sn(e,0,32)),n=BigInt(sn(e,32,64)),r=(()=>{const o=+`0x${e.slice(130)}`;if(!Number.isNaN(o))try{return Uu(o)}catch{throw new _u({value:o})}})();return typeof r>"u"?{r:t,s:n}:{r:t,s:n,yParity:r}}function L5(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return U5(e)}function U5(e){const t=typeof e=="string"?Rm(e):e instanceof Uint8Array?D5(e):typeof e.r=="string"?$5(e):e.v?_5(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Tm(t),t}function _5(e){return{r:e.r,s:e.s,yParity:Uu(e.v)}}function $5(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=Uu(n)),typeof r!="number")throw new _u({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function Uu(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new Q5({value:e})}class W5 extends le{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${xt(G6(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class ec extends le{constructor({signature:t}){super(`Signature \`${kp(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class q5 extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class z5 extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class _u extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class Q5 extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function H5(e,t={}){return typeof e.chainId=="string"?G5(e):{...e,...t.signature}}function G5(e){const{address:t,chainId:n,nonce:r}=e,o=L5(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...o}}const V5="0x8010801080108010801080108010801080108010801080108010801080108010",K5=Sm("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Nm(e){if(typeof e=="string"){if(sn(e,-32)!==V5)throw new X5(e)}else Tm(e.authorization)}function J5(e){Nm(e);const t=Pp(sn(e,-64,-32)),n=sn(e,-t-64,-64),r=sn(e,0,-t-64),[o,s,i]=T5(K5,n);return{authorization:H5({address:o.delegation,chainId:Number(o.chainId),nonce:o.nonce,yParity:o.yParity,r:o.r,s:o.s}),signature:r,...i&&i!=="0x"?{data:i,to:s}:{}}}function Y5(e){try{return Nm(e),!0}catch{return!1}}let X5=class extends le{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};function Z5(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function e3(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?cn(e.nonce):void 0,storageProof:e.storageProof?Z5(e.storageProof):void 0}}async function t3(e,{address:t,blockNumber:n,blockTag:r,storageKeys:o}){const s=r??"latest",i=n!==void 0?ee(n):void 0,a=await e.request({method:"eth_getProof",params:[t,o,i||s]});return e3(a)}async function n3(e,{address:t,blockNumber:n,blockTag:r="latest",slot:o}){const s=n!==void 0?ee(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,s||r]})}async function $u(e,{blockHash:t,blockNumber:n,blockTag:r,hash:o,index:s,sender:i,nonce:a}){var d,h,g;const c=r||"latest",l=n!==void 0?ee(n):void 0;let u=null;if(o?u=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?u=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,ee(s)]},{dedupe:!0}):typeof s=="number"?u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,ee(s)]},{dedupe:!!l}):i&&typeof a=="number"&&(u=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[i,ee(a)]},{dedupe:!0})),!u)throw new bp({blockHash:t,blockNumber:n,blockTag:c,hash:o,index:s});return(((g=(h=(d=e.chain)==null?void 0:d.formatters)==null?void 0:h.transaction)==null?void 0:g.format)||ku)(u,"getTransaction")}async function r3(e,{hash:t,transactionReceipt:n}){const[r,o]=await Promise.all([te(e,ni,"getBlockNumber")({}),t?te(e,$u,"getTransaction")({hash:t}):void 0]),s=(n==null?void 0:n.blockNumber)||(o==null?void 0:o.blockNumber);return s?r-s+1n:0n}async function Ti(e,{hash:t}){var o,s,i;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new yp({hash:t});return(((i=(s=(o=e.chain)==null?void 0:o.formatters)==null?void 0:s.transactionReceipt)==null?void 0:i.format)||pm)(n,"getTransactionReceipt")}async function Fm(e,t){var C;const{account:n,authorizationList:r,allowFailure:o=!0,blockNumber:s,blockOverrides:i,blockTag:a,stateOverride:c}=t,l=t.contracts,{batchSize:u=t.batchSize??1024,deployless:f=t.deployless??!1}=typeof((C=e.batch)==null?void 0:C.multicall)=="object"?e.batch.multicall:{},d=(()=>{if(t.multicallAddress)return t.multicallAddress;if(f)return null;if(e.chain)return zo({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),h=[[]];let g=0,m=0;for(let v=0;v<l.length;v++){const{abi:w,address:x,args:E,functionName:A}=l[v];try{const I=Ct({abi:w,args:E,functionName:A});m+=(I.length-2)/2,u>0&&m>u&&h[g].length>0&&(g++,m=(I.length-2)/2,h[g]=[]),h[g]=[...h[g],{allowFailure:!0,callData:I,target:x}]}catch(I){const S=Rr(I,{abi:w,address:x,args:E,docsPath:"/docs/contract/multicall",functionName:A,sender:n});if(!o)throw S;h[g]=[...h[g],{allowFailure:!0,callData:"0x",target:x}]}}const b=await Promise.allSettled(h.map(v=>te(e,Rt,"readContract")({...d===null?{code:yu}:{address:d},abi:jo,account:n,args:[v],authorizationList:r,blockNumber:s,blockOverrides:i,blockTag:a,functionName:"aggregate3",stateOverride:c}))),y=[];for(let v=0;v<b.length;v++){const w=b[v];if(w.status==="rejected"){if(!o)throw w.reason;for(let E=0;E<h[v].length;E++)y.push({status:"failure",error:w.reason,result:void 0});continue}const x=w.value;for(let E=0;E<x.length;E++){const{returnData:A,success:I}=x[E],{callData:S}=h[v][E],{abi:T,address:R,functionName:M,args:N}=l[y.length];try{if(S==="0x")throw new Qs;if(!I)throw new ba({data:A});const q=er({abi:T,args:N,data:A,functionName:M});y.push(o?{result:q,status:"success"}:q)}catch(q){const P=Rr(q,{abi:T,address:R,args:N,docsPath:"/docs/contract/multicall",functionName:M});if(!o)throw P;y.push({error:P,result:void 0,status:"failure"})}}}if(y.length!==l.length)throw new L("multicall results mismatch");return y}async function fl(e,t){const{blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",blocks:o,returnFullTransactions:s,traceTransfers:i,validation:a}=t;try{const c=[];for(const d of o){const h=d.blockOverrides?Rp(d.blockOverrides):void 0,g=d.calls.map(b=>{const y=b,C=y.account?Qe(y.account):void 0,v=y.abi?Ct(y):y.data,w={...y,account:C,data:y.dataSuffix?vt([v||"0x",y.dataSuffix]):v,from:y.from??(C==null?void 0:C.address)};return Wr(w),Qo(w)}),m=d.stateOverrides?vu(d.stateOverrides):void 0;c.push({blockOverrides:h,calls:g,stateOverrides:m})}const u=(typeof n=="bigint"?ee(n):void 0)||r;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:s,traceTransfers:i,validation:a},u]})).map((d,h)=>({...em(d),calls:d.calls.map((g,m)=>{var T,R;const{abi:b,args:y,functionName:C,to:v}=o[h].calls[m],w=((T=g.error)==null?void 0:T.data)??g.returnData,x=BigInt(g.gasUsed),E=(R=g.logs)==null?void 0:R.map(M=>On(M)),A=g.status==="0x1"?"success":"failure",I=b&&A==="success"&&w!=="0x"?er({abi:b,data:w,functionName:C}):null,S=(()=>{if(A==="success")return;let M;if(w==="0x"?M=new Qs:w&&(M=new ba({data:w})),!!M)return Rr(M,{abi:b??[],address:v??"0x",args:y,functionName:C??"<unknown>"})})();return{data:w,gasUsed:x,logs:E,status:A,...A==="success"?{result:I}:{error:S}}})}))}catch(c){const l=c,u=wa(l,{});throw u instanceof Zs?l:u}}function hl(e){let t=!0,n="",r=0,o="",s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function","error",""].includes(o))o="";else if(o+=a,a===")"){s=!0;break}continue}if(a===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=a,n+=a}}if(!s)throw new le("Unable to normalize signature.");return o}function pl(e,t){const n=typeof e,r=t.type;switch(r){case"address":return ll(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,s)=>pl(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>pl(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Mm(e,t,n){for(const r in e){const o=e[r],s=t[r];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return Mm(o.components,s.components,n[r]);const i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?ll(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?ll(n[r],{strict:!1}):!1)return i}}function Dm(e,t={}){const{prepare:n=!0}=t,r=Array.isArray(e)||typeof e=="string"?Vd(e):e;return{...r,...n?{hash:no(r)}:{}}}function Ea(e,t,n){const{args:r=[],prepare:o=!0}=n??{},s=V6(t,{strict:!1}),i=e.filter(l=>s?l.type==="function"||l.type==="error"?Lm(l)===sn(t,0,4):l.type==="event"?no(l)===t:!1:"name"in l&&l.name===t);if(i.length===0)throw new Vi({name:t});if(i.length===1)return{...i[0],...o?{hash:no(i[0])}:{}};let a;for(const l of i){if(!("inputs"in l))continue;if(!r||r.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...o?{hash:no(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==r.length)continue;if(r.every((f,d)=>{const h="inputs"in l&&l.inputs[d];return h?pl(f,h):!1})){if(a&&"inputs"in a&&a.inputs){const f=Mm(l.inputs,a.inputs,r);if(f)throw new s3({abiItem:l,type:f[0]},{abiItem:a,type:f[1]})}a=l}}const c=(()=>{if(a)return a;const[l,...u]=i;return{...l,overloads:u}})();if(!c)throw new Vi({name:t});return{...c,...o?{hash:no(c)}:{}}}function Lm(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Ea(n,r)}return e[0]})();return sn(no(t),0,4)}function o3(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,o]=e;return Ea(r,o)}return e[0]})(),n=typeof t=="string"?t:Wi(t);return hl(n)}function no(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Ea(n,r)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Im(bu(o3(t)))}class s3 extends le{constructor(t,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${hl(Wi(t.abiItem))}\`, and`,`\`${n.type}\` in \`${hl(Wi(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class Vi extends le{constructor({name:t,data:n,type:r="item"}){const o=t?` with name "${t}"`:n?` with data "${n}"`:"";super(`ABI ${r}${o} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function i3(...e){var s;const[t,n]=(()=>{if(Array.isArray(e[0])){const[i,a]=e;return[c3(i),a]}return e})(),{bytecode:r,args:o}=n;return Ht(r,(s=t.inputs)!=null&&s.length&&(o!=null&&o.length)?Du(t.inputs,o):"0x")}function a3(e){return Dm(e)}function c3(e){const t=e.find(n=>n.type==="constructor");if(!t)throw new Vi({name:"constructor"});return t}function l3(...e){const[t,n=[]]=(()=>{if(Array.isArray(e[0])){const[l,u,f]=e;return[Ef(l,u,{args:f}),f]}const[a,c]=e;return[a,c]})(),{overloads:r}=t,o=r?Ef([t,...r],t.name,{args:n}):t,s=u3(o),i=n.length>0?Du(o.inputs,n):void 0;return i?Ht(s,i):s}function Vr(e,t={}){return Dm(e,t)}function Ef(e,t,n){const r=Ea(e,t,n);if(r.type!=="function")throw new Vi({name:t,type:"function"});return r}function u3(e){return Lm(e)}const d3="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Yt="0x0000000000000000000000000000000000000000",f3="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function h3(e,t){const{blockNumber:n,blockTag:r,calls:o,stateOverrides:s,traceAssetChanges:i,traceTransfers:a,validation:c}=t,l=t.account?Qe(t.account):void 0;if(i&&!l)throw new L("`account` is required when `traceAssetChanges` is true");const u=l?i3(a3("constructor(bytes, bytes)"),{bytecode:Np,args:[f3,l3(Vr("function getBalance(address)"),[l.address])]}):void 0,f=i?await Promise.all(t.calls.map(async F=>{if(!F.data&&!F.abi)return;const{accessList:U}=await zp(e,{account:l.address,...F,data:F.abi?Ct(F):F.data});return U.map(({address:W,storageKeys:ne})=>ne.length>0?W:null)})).then(F=>F.flat().filter(Boolean)):[],d=await fl(e,{blockNumber:n,blockTag:r,blocks:[...i?[{calls:[{data:u}],stateOverrides:s},{calls:f.map((F,U)=>({abi:[Vr("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:F,from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]}]:[],{calls:[...o,{}].map(F=>({...F,from:l==null?void 0:l.address})),stateOverrides:s},...i?[{calls:[{data:u}]},{calls:f.map((F,U)=>({abi:[Vr("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:F,from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]},{calls:f.map((F,U)=>({to:F,abi:[Vr("function decimals() returns (uint256)")],functionName:"decimals",from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]},{calls:f.map((F,U)=>({to:F,abi:[Vr("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]},{calls:f.map((F,U)=>({to:F,abi:[Vr("function symbol() returns (string)")],functionName:"symbol",from:Yt,nonce:U})),stateOverrides:[{address:Yt,nonce:0}]}]:[]],traceTransfers:a,validation:c}),h=i?d[2]:d[0],[g,m,,b,y,C,v,w]=i?d:[],{calls:x,...E}=h,A=x.slice(0,-1)??[],I=(g==null?void 0:g.calls)??[],S=(m==null?void 0:m.calls)??[],T=[...I,...S].map(F=>F.status==="success"?an(F.data):null),R=(b==null?void 0:b.calls)??[],M=(y==null?void 0:y.calls)??[],N=[...R,...M].map(F=>F.status==="success"?an(F.data):null),q=((C==null?void 0:C.calls)??[]).map(F=>F.status==="success"?F.result:null),P=((w==null?void 0:w.calls)??[]).map(F=>F.status==="success"?F.result:null),D=((v==null?void 0:v.calls)??[]).map(F=>F.status==="success"?F.result:null),_=[];for(const[F,U]of N.entries()){const W=T[F];if(typeof U!="bigint"||typeof W!="bigint")continue;const ne=q[F-1],ce=P[F-1],xe=D[F-1],H=F===0?{address:d3,decimals:18,symbol:"ETH"}:{address:f[F-1],decimals:xe||ne?Number(ne??1):void 0,symbol:ce??void 0};_.some(Q=>Q.token.address===H.address)||_.push({token:H,value:{pre:W,post:U,diff:U-W}})}return{assetChanges:_,block:E,results:A}}async function p3(e,t){var u;const{abi:n,address:r,args:o,functionName:s,dataSuffix:i=typeof e.dataSuffix=="string"?e.dataSuffix:(u=e.dataSuffix)==null?void 0:u.value,...a}=t,c=a.account?Qe(a.account):e.account,l=Ct({abi:n,args:o,functionName:s});try{const{data:f}=await te(e,Ho,"call")({batch:!1,data:`${l}${i?i.replace("0x",""):""}`,to:r,...a,account:c}),d=er({abi:n,args:o,functionName:s,data:f||"0x"}),h=n.filter(g=>"name"in g&&g.name===t.functionName);return{result:d,request:{abi:h,address:r,args:o,dataSuffix:i,functionName:s,...a,account:c}}}catch(f){throw Rr(f,{abi:n,address:r,args:o,docsPath:"/docs/contract/simulateContract",functionName:s,sender:c==null?void 0:c.address})}}async function ka(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}const Um="0x6492649264926492649264926492649264926492649264926492649264926492";function m3(e){if(sn(e,-32)!==Um)throw new y3(e)}function g3(e){const{data:t,signature:n,to:r}=e;return Ht(Du(Sm("address, bytes, bytes"),[r,t,n]),Um)}function b3(e){try{return m3(e),!0}catch{return!1}}class y3 extends le{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}class _m extends iu{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,yy(t);const r=fa(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),Oo(s)}update(t){return Po(this),this.iHash.update(t),this}digestInto(t){Po(this),Or(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:a}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const $m=(e,t,n)=>new _m(e,t).update(n).digest();$m.create=(e,t)=>new _m(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Wu=BigInt(0),ml=BigInt(1);function oi(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function qu(e){if(!oi(e))throw new Error("Uint8Array expected")}function Os(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function bi(e){const t=e.toString(16);return t.length&1?"0"+t:t}function Wm(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Wu:BigInt("0x"+e)}const qm=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",w3=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ts(e){if(qu(e),qm)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=w3[e[n]];return t}const pn={_0:48,_9:57,A:65,F:70,a:97,f:102};function kf(e){if(e>=pn._0&&e<=pn._9)return e-pn._0;if(e>=pn.A&&e<=pn.F)return e-(pn.A-10);if(e>=pn.a&&e<=pn.f)return e-(pn.a-10)}function Ki(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(qm)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=kf(e.charCodeAt(s)),a=kf(e.charCodeAt(s+1));if(i===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[o]=i*16+a}return r}function Pr(e){return Wm(Ts(e))}function zm(e){return qu(e),Wm(Ts(Uint8Array.from(e).reverse()))}function si(e,t){return Ki(e.toString(16).padStart(t*2,"0"))}function Qm(e,t){return si(e,t).reverse()}function Bt(e,t,n){let r;if(typeof t=="string")try{r=Ki(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(oi(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}function Ji(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];qu(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}const tc=e=>typeof e=="bigint"&&Wu<=e;function zu(e,t,n){return tc(e)&&tc(t)&&tc(n)&&t<=e&&e<n}function uo(e,t,n,r){if(!zu(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function v3(e){let t;for(t=0;e>Wu;e>>=ml,t+=1);return t}const Ia=e=>(ml<<BigInt(e))-ml,nc=e=>new Uint8Array(e),If=e=>Uint8Array.from(e);function x3(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=nc(e),o=nc(e),s=0;const i=()=>{r.fill(1),o.fill(0),s=0},a=(...f)=>n(o,r,...f),c=(f=nc(0))=>{o=a(If([0]),f),r=a(),f.length!==0&&(o=a(If([1]),f),r=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const d=[];for(;f<t;){r=a();const h=r.slice();d.push(h),f+=r.length}return Ji(...d)};return(f,d)=>{i(),c(f);let h;for(;!(h=d(l()));)c();return i(),h}}const C3={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||oi(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function ja(e,t,n={}){const r=(o,s,i)=>{const a=C3[s];if(typeof a!="function")throw new Error("invalid validator function");const c=e[o];if(!(i&&c===void 0)&&!a(c,e))throw new Error("param "+String(o)+" is invalid. Expected "+s+", got "+c)};for(const[o,s]of Object.entries(t))r(o,s,!1);for(const[o,s]of Object.entries(n))r(o,s,!0);return e}function jf(e){const t=new WeakMap;return(n,...r)=>{const o=t.get(n);if(o!==void 0)return o;const s=e(n,...r);return t.set(n,s),s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ut=BigInt(0),et=BigInt(1),gr=BigInt(2),A3=BigInt(3),Hm=BigInt(4),Gm=BigInt(5),Vm=BigInt(8);function lt(e,t){const n=e%t;return n>=ut?n:t+n}function jt(e,t,n){let r=e;for(;t-- >ut;)r*=r,r%=n;return r}function gl(e,t){if(e===ut)throw new Error("invert: expected non-zero number");if(t<=ut)throw new Error("invert: expected positive modulus, got "+t);let n=lt(e,t),r=t,o=ut,s=et;for(;n!==ut;){const a=r/n,c=r%n,l=o-s*a;r=n,n=c,o=s,s=l}if(r!==et)throw new Error("invert: does not exist");return lt(o,t)}function Km(e,t){const n=(e.ORDER+et)/Hm,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function E3(e,t){const n=(e.ORDER-Gm)/Vm,r=e.mul(t,gr),o=e.pow(r,n),s=e.mul(t,o),i=e.mul(e.mul(s,gr),o),a=e.mul(s,e.sub(i,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function k3(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-et,n=0;for(;t%gr===ut;)t/=gr,n++;let r=gr;const o=Qu(e);for(;Bf(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Km;let s=o.pow(r,t);const i=(t+et)/gr;return function(c,l){if(c.is0(l))return l;if(Bf(c,l)!==1)throw new Error("Cannot find square root");let u=n,f=c.mul(c.ONE,s),d=c.pow(l,t),h=c.pow(l,i);for(;!c.eql(d,c.ONE);){if(c.is0(d))return c.ZERO;let g=1,m=c.sqr(d);for(;!c.eql(m,c.ONE);)if(g++,m=c.sqr(m),g===u)throw new Error("Cannot find square root");const b=et<<BigInt(u-g-1),y=c.pow(f,b);u=g,f=c.sqr(y),d=c.mul(d,f),h=c.mul(h,y)}return h}}function I3(e){return e%Hm===A3?Km:e%Vm===Gm?E3:k3(e)}const j3=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function B3(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=j3.reduce((r,o)=>(r[o]="function",r),t);return ja(e,n)}function S3(e,t,n){if(n<ut)throw new Error("invalid exponent, negatives unsupported");if(n===ut)return e.ONE;if(n===et)return t;let r=e.ONE,o=t;for(;n>ut;)n&et&&(r=e.mul(r,o)),o=e.sqr(o),n>>=et;return r}function Jm(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((i,a,c)=>e.is0(a)?i:(r[c]=i,e.mul(i,a)),e.ONE),s=e.inv(o);return t.reduceRight((i,a,c)=>e.is0(a)?i:(r[c]=e.mul(i,r[c]),e.mul(i,a)),s),r}function Bf(e,t){const n=(e.ORDER-et)/gr,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),i=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!i)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function Ym(e,t){t!==void 0&&ds(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Qu(e,t,n=!1,r={}){if(e<=ut)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:o,nByteLength:s}=Ym(e,t);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let i;const a=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:s,MASK:Ia(o),ZERO:ut,ONE:et,create:c=>lt(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return ut<=c&&c<e},is0:c=>c===ut,isOdd:c=>(c&et)===et,neg:c=>lt(-c,e),eql:(c,l)=>c===l,sqr:c=>lt(c*c,e),add:(c,l)=>lt(c+l,e),sub:(c,l)=>lt(c-l,e),mul:(c,l)=>lt(c*l,e),pow:(c,l)=>S3(a,c,l),div:(c,l)=>lt(c*gl(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>gl(c,e),sqrt:r.sqrt||(c=>(i||(i=I3(e)),i(a,c))),toBytes:c=>n?Qm(c,s):si(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return n?zm(c):Pr(c)},invertBatch:c=>Jm(a,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(a)}function Xm(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Zm(e){const t=Xm(e);return t+Math.ceil(t/2)}function P3(e,t,n=!1){const r=e.length,o=Xm(t),s=Zm(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const i=n?zm(e):Pr(e),a=lt(i,t-et)+et;return n?Qm(a,o):si(a,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Sf=BigInt(0),bl=BigInt(1);function rc(e,t){const n=t.negate();return e?n:t}function e1(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function oc(e,t){e1(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),o=2**e,s=Ia(e),i=BigInt(e);return{windows:n,windowSize:r,mask:s,maxNumber:o,shiftBy:i}}function Pf(e,t,n){const{windowSize:r,mask:o,maxNumber:s,shiftBy:i}=n;let a=Number(e&o),c=e>>i;a>r&&(a-=s,c+=bl);const l=t*r,u=l+Math.abs(a)-1,f=a===0,d=a<0,h=t%2!==0;return{nextN:c,offset:u,isZero:f,isNeg:d,isNegF:h,offsetF:l}}function O3(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function T3(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const sc=new WeakMap,t1=new WeakMap;function ic(e){return t1.get(e)||1}function R3(e,t){return{constTimeNegate:rc,hasPrecomputes(n){return ic(n)!==1},unsafeLadder(n,r,o=e.ZERO){let s=n;for(;r>Sf;)r&bl&&(o=o.add(s)),s=s.double(),r>>=bl;return o},precomputeWindow(n,r){const{windows:o,windowSize:s}=oc(r,t),i=[];let a=n,c=a;for(let l=0;l<o;l++){c=a,i.push(c);for(let u=1;u<s;u++)c=c.add(a),i.push(c);a=c.double()}return i},wNAF(n,r,o){let s=e.ZERO,i=e.BASE;const a=oc(n,t);for(let c=0;c<a.windows;c++){const{nextN:l,offset:u,isZero:f,isNeg:d,isNegF:h,offsetF:g}=Pf(o,c,a);o=l,f?i=i.add(rc(h,r[g])):s=s.add(rc(d,r[u]))}return{p:s,f:i}},wNAFUnsafe(n,r,o,s=e.ZERO){const i=oc(n,t);for(let a=0;a<i.windows&&o!==Sf;a++){const{nextN:c,offset:l,isZero:u,isNeg:f}=Pf(o,a,i);if(o=c,!u){const d=r[l];s=s.add(f?d.negate():d)}}return s},getPrecomputes(n,r,o){let s=sc.get(r);return s||(s=this.precomputeWindow(r,n),n!==1&&sc.set(r,o(s))),s},wNAFCached(n,r,o){const s=ic(n);return this.wNAF(s,this.getPrecomputes(s,n,o),r)},wNAFCachedUnsafe(n,r,o,s){const i=ic(n);return i===1?this.unsafeLadder(n,r,s):this.wNAFUnsafe(i,this.getPrecomputes(i,n,o),r,s)},setWindowSize(n,r){e1(r,t),t1.set(n,r),sc.delete(n)}}}function N3(e,t,n,r){O3(n,e),T3(r,t);const o=n.length,s=r.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const i=e.ZERO,a=v3(BigInt(o));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const l=Ia(c),u=new Array(Number(l)+1).fill(i),f=Math.floor((t.BITS-1)/c)*c;let d=i;for(let h=f;h>=0;h-=c){u.fill(i);for(let m=0;m<s;m++){const b=r[m],y=Number(b>>BigInt(h)&l);u[y]=u[y].add(n[m])}let g=i;for(let m=u.length-1,b=i;m>0;m--)b=b.add(u[m]),g=g.add(b);if(d=d.add(g),h!==0)for(let m=0;m<c;m++)d=d.double()}return d}function n1(e){return B3(e.Fp),ja(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Ym(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Of(e){e.lowS!==void 0&&Os("lowS",e.lowS),e.prehash!==void 0&&Os("prehash",e.prehash)}function F3(e){const t=n1(e);ja(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class M3 extends Error{constructor(t=""){super(t)}}const yn={Err:M3,_tlv:{encode:(e,t)=>{const{Err:n}=yn;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=bi(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?bi(o.length/2|128):"";return bi(e)+s+o+t},decode(e,t){const{Err:n}=yn;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++],s=!!(o&128);let i=0;if(!s)i=o;else{const c=o&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const l=t.subarray(r,r+c);if(l.length!==c)throw new n("tlv.decode: length bytes not complete");if(l[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const u of l)i=i<<8|u;if(r+=c,i<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+i);if(a.length!==i)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+i)}}},_int:{encode(e){const{Err:t}=yn;if(e<En)throw new t("integer: negative integers are not allowed");let n=bi(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=yn;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return Pr(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=yn,o=Bt("signature",e),{v:s,l:i}=r.decode(48,o);if(i.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,s),{v:l,l:u}=r.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(l)}},hexFromSig(e){const{_tlv:t,_int:n}=yn,r=t.encode(2,n.encode(e.r)),o=t.encode(2,n.encode(e.s)),s=r+o;return t.encode(48,s)}};function ac(e,t){return Ts(si(e,t))}const En=BigInt(0),Ue=BigInt(1);BigInt(2);const cc=BigInt(3),D3=BigInt(4);function L3(e){const t=F3(e),{Fp:n}=t,r=Qu(t.n,t.nBitLength),o=t.toBytes||((v,w,x)=>{const E=w.toAffine();return Ji(Uint8Array.from([4]),n.toBytes(E.x),n.toBytes(E.y))}),s=t.fromBytes||(v=>{const w=v.subarray(1),x=n.fromBytes(w.subarray(0,n.BYTES)),E=n.fromBytes(w.subarray(n.BYTES,2*n.BYTES));return{x,y:E}});function i(v){const{a:w,b:x}=t,E=n.sqr(v),A=n.mul(E,v);return n.add(n.add(A,n.mul(v,w)),x)}function a(v,w){const x=n.sqr(w),E=i(v);return n.eql(x,E)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,cc),D3),l=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,l)))throw new Error("bad curve params: a or b");function u(v){return zu(v,Ue,t.n)}function f(v){const{allowedPrivateKeyLengths:w,nByteLength:x,wrapPrivateKey:E,n:A}=t;if(w&&typeof v!="bigint"){if(oi(v)&&(v=Ts(v)),typeof v!="string"||!w.includes(v.length))throw new Error("invalid private key");v=v.padStart(x*2,"0")}let I;try{I=typeof v=="bigint"?v:Pr(Bt("private key",v,x))}catch{throw new Error("invalid private key, expected hex or "+x+" bytes, got "+typeof v)}return E&&(I=lt(I,A)),uo("private key",I,Ue,A),I}function d(v){if(!(v instanceof m))throw new Error("ProjectivePoint expected")}const h=jf((v,w)=>{const{px:x,py:E,pz:A}=v;if(n.eql(A,n.ONE))return{x,y:E};const I=v.is0();w==null&&(w=I?n.ONE:n.inv(A));const S=n.mul(x,w),T=n.mul(E,w),R=n.mul(A,w);if(I)return{x:n.ZERO,y:n.ZERO};if(!n.eql(R,n.ONE))throw new Error("invZ was invalid");return{x:S,y:T}}),g=jf(v=>{if(v.is0()){if(t.allowInfinityPoint&&!n.is0(v.py))return;throw new Error("bad point: ZERO")}const{x:w,y:x}=v.toAffine();if(!n.isValid(w)||!n.isValid(x))throw new Error("bad point: x or y not FE");if(!a(w,x))throw new Error("bad point: equation left != right");if(!v.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class m{constructor(w,x,E){if(w==null||!n.isValid(w))throw new Error("x required");if(x==null||!n.isValid(x)||n.is0(x))throw new Error("y required");if(E==null||!n.isValid(E))throw new Error("z required");this.px=w,this.py=x,this.pz=E,Object.freeze(this)}static fromAffine(w){const{x,y:E}=w||{};if(!w||!n.isValid(x)||!n.isValid(E))throw new Error("invalid affine point");if(w instanceof m)throw new Error("projective point not allowed");const A=I=>n.eql(I,n.ZERO);return A(x)&&A(E)?m.ZERO:new m(x,E,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(w){const x=Jm(n,w.map(E=>E.pz));return w.map((E,A)=>E.toAffine(x[A])).map(m.fromAffine)}static fromHex(w){const x=m.fromAffine(s(Bt("pointHex",w)));return x.assertValidity(),x}static fromPrivateKey(w){return m.BASE.multiply(f(w))}static msm(w,x){return N3(m,r,w,x)}_setWindowSize(w){C.setWindowSize(this,w)}assertValidity(){g(this)}hasEvenY(){const{y:w}=this.toAffine();if(n.isOdd)return!n.isOdd(w);throw new Error("Field doesn't support isOdd")}equals(w){d(w);const{px:x,py:E,pz:A}=this,{px:I,py:S,pz:T}=w,R=n.eql(n.mul(x,T),n.mul(I,A)),M=n.eql(n.mul(E,T),n.mul(S,A));return R&&M}negate(){return new m(this.px,n.neg(this.py),this.pz)}double(){const{a:w,b:x}=t,E=n.mul(x,cc),{px:A,py:I,pz:S}=this;let T=n.ZERO,R=n.ZERO,M=n.ZERO,N=n.mul(A,A),q=n.mul(I,I),P=n.mul(S,S),D=n.mul(A,I);return D=n.add(D,D),M=n.mul(A,S),M=n.add(M,M),T=n.mul(w,M),R=n.mul(E,P),R=n.add(T,R),T=n.sub(q,R),R=n.add(q,R),R=n.mul(T,R),T=n.mul(D,T),M=n.mul(E,M),P=n.mul(w,P),D=n.sub(N,P),D=n.mul(w,D),D=n.add(D,M),M=n.add(N,N),N=n.add(M,N),N=n.add(N,P),N=n.mul(N,D),R=n.add(R,N),P=n.mul(I,S),P=n.add(P,P),N=n.mul(P,D),T=n.sub(T,N),M=n.mul(P,q),M=n.add(M,M),M=n.add(M,M),new m(T,R,M)}add(w){d(w);const{px:x,py:E,pz:A}=this,{px:I,py:S,pz:T}=w;let R=n.ZERO,M=n.ZERO,N=n.ZERO;const q=t.a,P=n.mul(t.b,cc);let D=n.mul(x,I),_=n.mul(E,S),F=n.mul(A,T),U=n.add(x,E),W=n.add(I,S);U=n.mul(U,W),W=n.add(D,_),U=n.sub(U,W),W=n.add(x,A);let ne=n.add(I,T);return W=n.mul(W,ne),ne=n.add(D,F),W=n.sub(W,ne),ne=n.add(E,A),R=n.add(S,T),ne=n.mul(ne,R),R=n.add(_,F),ne=n.sub(ne,R),N=n.mul(q,W),R=n.mul(P,F),N=n.add(R,N),R=n.sub(_,N),N=n.add(_,N),M=n.mul(R,N),_=n.add(D,D),_=n.add(_,D),F=n.mul(q,F),W=n.mul(P,W),_=n.add(_,F),F=n.sub(D,F),F=n.mul(q,F),W=n.add(W,F),D=n.mul(_,W),M=n.add(M,D),D=n.mul(ne,W),R=n.mul(U,R),R=n.sub(R,D),D=n.mul(U,_),N=n.mul(ne,N),N=n.add(N,D),new m(R,M,N)}subtract(w){return this.add(w.negate())}is0(){return this.equals(m.ZERO)}wNAF(w){return C.wNAFCached(this,w,m.normalizeZ)}multiplyUnsafe(w){const{endo:x,n:E}=t;uo("scalar",w,En,E);const A=m.ZERO;if(w===En)return A;if(this.is0()||w===Ue)return this;if(!x||C.hasPrecomputes(this))return C.wNAFCachedUnsafe(this,w,m.normalizeZ);let{k1neg:I,k1:S,k2neg:T,k2:R}=x.splitScalar(w),M=A,N=A,q=this;for(;S>En||R>En;)S&Ue&&(M=M.add(q)),R&Ue&&(N=N.add(q)),q=q.double(),S>>=Ue,R>>=Ue;return I&&(M=M.negate()),T&&(N=N.negate()),N=new m(n.mul(N.px,x.beta),N.py,N.pz),M.add(N)}multiply(w){const{endo:x,n:E}=t;uo("scalar",w,Ue,E);let A,I;if(x){const{k1neg:S,k1:T,k2neg:R,k2:M}=x.splitScalar(w);let{p:N,f:q}=this.wNAF(T),{p:P,f:D}=this.wNAF(M);N=C.constTimeNegate(S,N),P=C.constTimeNegate(R,P),P=new m(n.mul(P.px,x.beta),P.py,P.pz),A=N.add(P),I=q.add(D)}else{const{p:S,f:T}=this.wNAF(w);A=S,I=T}return m.normalizeZ([A,I])[0]}multiplyAndAddUnsafe(w,x,E){const A=m.BASE,I=(T,R)=>R===En||R===Ue||!T.equals(A)?T.multiplyUnsafe(R):T.multiply(R),S=I(this,x).add(I(w,E));return S.is0()?void 0:S}toAffine(w){return h(this,w)}isTorsionFree(){const{h:w,isTorsionFree:x}=t;if(w===Ue)return!0;if(x)return x(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:w,clearCofactor:x}=t;return w===Ue?this:x?x(m,this):this.multiplyUnsafe(t.h)}toRawBytes(w=!0){return Os("isCompressed",w),this.assertValidity(),o(m,this,w)}toHex(w=!0){return Os("isCompressed",w),Ts(this.toRawBytes(w))}}m.BASE=new m(t.Gx,t.Gy,n.ONE),m.ZERO=new m(n.ZERO,n.ONE,n.ZERO);const{endo:b,nBitLength:y}=t,C=R3(m,b?Math.ceil(y/2):y);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:f,weierstrassEquation:i,isWithinCurveOrder:u}}function U3(e){const t=n1(e);return ja(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function _3(e){const t=U3(e),{Fp:n,n:r,nByteLength:o,nBitLength:s}=t,i=n.BYTES+1,a=2*n.BYTES+1;function c(P){return lt(P,r)}function l(P){return gl(P,r)}const{ProjectivePoint:u,normPrivateKeyToScalar:f,weierstrassEquation:d,isWithinCurveOrder:h}=L3({...t,toBytes(P,D,_){const F=D.toAffine(),U=n.toBytes(F.x),W=Ji;return Os("isCompressed",_),_?W(Uint8Array.from([D.hasEvenY()?2:3]),U):W(Uint8Array.from([4]),U,n.toBytes(F.y))},fromBytes(P){const D=P.length,_=P[0],F=P.subarray(1);if(D===i&&(_===2||_===3)){const U=Pr(F);if(!zu(U,Ue,n.ORDER))throw new Error("Point is not on curve");const W=d(U);let ne;try{ne=n.sqrt(W)}catch(H){const Q=H instanceof Error?": "+H.message:"";throw new Error("Point is not on curve"+Q)}const ce=(ne&Ue)===Ue;return(_&1)===1!==ce&&(ne=n.neg(ne)),{x:U,y:ne}}else if(D===a&&_===4){const U=n.fromBytes(F.subarray(0,n.BYTES)),W=n.fromBytes(F.subarray(n.BYTES,2*n.BYTES));return{x:U,y:W}}else{const U=i,W=a;throw new Error("invalid Point, expected length of "+U+", or uncompressed "+W+", got "+D)}}});function g(P){const D=r>>Ue;return P>D}function m(P){return g(P)?c(-P):P}const b=(P,D,_)=>Pr(P.slice(D,_));class y{constructor(D,_,F){uo("r",D,Ue,r),uo("s",_,Ue,r),this.r=D,this.s=_,F!=null&&(this.recovery=F),Object.freeze(this)}static fromCompact(D){const _=o;return D=Bt("compactSignature",D,_*2),new y(b(D,0,_),b(D,_,2*_))}static fromDER(D){const{r:_,s:F}=yn.toSig(Bt("DER",D));return new y(_,F)}assertValidity(){}addRecoveryBit(D){return new y(this.r,this.s,D)}recoverPublicKey(D){const{r:_,s:F,recovery:U}=this,W=A(Bt("msgHash",D));if(U==null||![0,1,2,3].includes(U))throw new Error("recovery id invalid");const ne=U===2||U===3?_+t.n:_;if(ne>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const ce=U&1?"03":"02",xe=u.fromHex(ce+ac(ne,n.BYTES)),H=l(ne),Q=c(-W*H),oe=c(F*H),ae=u.BASE.multiplyAndAddUnsafe(xe,Q,oe);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Ki(this.toDERHex())}toDERHex(){return yn.hexFromSig(this)}toCompactRawBytes(){return Ki(this.toCompactHex())}toCompactHex(){const D=o;return ac(this.r,D)+ac(this.s,D)}}const C={isValidPrivateKey(P){try{return f(P),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const P=Zm(t.n);return P3(t.randomBytes(P),t.n)},precompute(P=8,D=u.BASE){return D._setWindowSize(P),D.multiply(BigInt(3)),D}};function v(P,D=!0){return u.fromPrivateKey(P).toRawBytes(D)}function w(P){if(typeof P=="bigint")return!1;if(P instanceof u)return!0;const _=Bt("key",P).length,F=n.BYTES,U=F+1,W=2*F+1;if(!(t.allowedPrivateKeyLengths||o===U))return _===U||_===W}function x(P,D,_=!0){if(w(P)===!0)throw new Error("first arg must be private key");if(w(D)===!1)throw new Error("second arg must be public key");return u.fromHex(D).multiply(f(P)).toRawBytes(_)}const E=t.bits2int||function(P){if(P.length>8192)throw new Error("input is too large");const D=Pr(P),_=P.length*8-s;return _>0?D>>BigInt(_):D},A=t.bits2int_modN||function(P){return c(E(P))},I=Ia(s);function S(P){return uo("num < 2^"+s,P,En,I),si(P,o)}function T(P,D,_=R){if(["recovered","canonical"].some(Oe=>Oe in _))throw new Error("sign() legacy options not supported");const{hash:F,randomBytes:U}=t;let{lowS:W,prehash:ne,extraEntropy:ce}=_;W==null&&(W=!0),P=Bt("msgHash",P),Of(_),ne&&(P=Bt("prehashed msgHash",F(P)));const xe=A(P),H=f(D),Q=[S(H),S(xe)];if(ce!=null&&ce!==!1){const Oe=ce===!0?U(n.BYTES):ce;Q.push(Bt("extraEntropy",Oe))}const oe=Ji(...Q),ae=xe;function Ie(Oe){const Se=E(Oe);if(!h(Se))return;const Ft=l(Se),rt=u.BASE.multiply(Se).toAffine(),ot=c(rt.x);if(ot===En)return;const At=c(Ft*c(ae+ot*H));if(At===En)return;let G=(rt.x===ot?0:2)|Number(rt.y&Ue),pe=At;return W&&g(At)&&(pe=m(At),G^=1),new y(ot,pe,G)}return{seed:oe,k2sig:Ie}}const R={lowS:t.lowS,prehash:!1},M={lowS:t.lowS,prehash:!1};function N(P,D,_=R){const{seed:F,k2sig:U}=T(P,D,_),W=t;return x3(W.hash.outputLen,W.nByteLength,W.hmac)(F,U)}u.BASE._setWindowSize(8);function q(P,D,_,F=M){var G;const U=P;D=Bt("msgHash",D),_=Bt("publicKey",_);const{lowS:W,prehash:ne,format:ce}=F;if(Of(F),"strict"in F)throw new Error("options.strict was renamed to lowS");if(ce!==void 0&&ce!=="compact"&&ce!=="der")throw new Error("format must be compact or der");const xe=typeof U=="string"||oi(U),H=!xe&&!ce&&typeof U=="object"&&U!==null&&typeof U.r=="bigint"&&typeof U.s=="bigint";if(!xe&&!H)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Q,oe;try{if(H&&(Q=new y(U.r,U.s)),xe){try{ce!=="compact"&&(Q=y.fromDER(U))}catch(pe){if(!(pe instanceof yn.Err))throw pe}!Q&&ce!=="der"&&(Q=y.fromCompact(U))}oe=u.fromHex(_)}catch{return!1}if(!Q||W&&Q.hasHighS())return!1;ne&&(D=t.hash(D));const{r:ae,s:Ie}=Q,Oe=A(D),Se=l(Ie),Ft=c(Oe*Se),rt=c(ae*Se),ot=(G=u.BASE.multiplyAndAddUnsafe(oe,Ft,rt))==null?void 0:G.toAffine();return ot?c(ot.x)===ae:!1}return{CURVE:t,getPublicKey:v,getSharedSecret:x,sign:N,verify:q,ProjectivePoint:u,Signature:y,utils:C}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function $3(e){return{hash:e,hmac:(t,...n)=>$m(e,t,Ey(...n)),randomBytes:ky}}function W3(e,t){const n=r=>_3({...e,...$3(r)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r1=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Tf=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),q3=BigInt(0),z3=BigInt(1),yl=BigInt(2),Rf=(e,t)=>(e+t/yl)/t;function Q3(e){const t=r1,n=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,f=jt(u,n,t)*u%t,d=jt(f,n,t)*u%t,h=jt(d,yl,t)*l%t,g=jt(h,o,t)*h%t,m=jt(g,s,t)*g%t,b=jt(m,a,t)*m%t,y=jt(b,c,t)*b%t,C=jt(y,a,t)*m%t,v=jt(C,n,t)*u%t,w=jt(v,i,t)*g%t,x=jt(w,r,t)*l%t,E=jt(x,yl,t);if(!wl.eql(wl.sqr(E),e))throw new Error("Cannot find square root");return E}const wl=Qu(r1,void 0,void 0,{sqrt:Q3}),o1=W3({a:q3,b:BigInt(7),Fp:wl,n:Tf,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Tf,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-z3*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,i=BigInt("0x100000000000000000000000000000000"),a=Rf(s*e,t),c=Rf(-r*e,t);let l=lt(e-a*n-c*o,t),u=lt(-a*r-c*s,t);const f=l>i,d=u>i;if(f&&(l=t-l),d&&(u=t-u),l>i||u>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:l,k2neg:d,k2:u}}}},sm),H3=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:o1},Symbol.toStringTag,{value:"Module"}));function G3({r:e,s:t,to:n="hex",v:r,yParity:o}){const s=(()=>{if(o===0||o===1)return o;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),i=`0x${new o1.Signature(an(e),an(t)).toCompactHex()}${s===0?"1b":"1c"}`;return n==="hex"?i:Qt(i)}async function Ba(e,t){var c,l,u,f;const{address:n,chain:r=e.chain,hash:o,erc6492VerifierAddress:s=t.universalSignatureVerifierAddress??((l=(c=r==null?void 0:r.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:l.address),multicallAddress:i=t.multicallAddress??((f=(u=r==null?void 0:r.contracts)==null?void 0:u.multicall3)==null?void 0:f.address)}=t;if(r!=null&&r.verifyHash)return await r.verifyHash(e,t);const a=(()=>{const d=t.signature;return zt(d)?d:typeof d=="object"&&"r"in d&&"s"in d?G3(d):De(d)})();try{return Y5(a)?await V3(e,{...t,multicallAddress:i,signature:a}):await K3(e,{...t,verifierAddress:s,signature:a})}catch(d){try{if(ri(yt(n),await Vp({hash:o,signature:a})))return!0}catch{}if(d instanceof Mr)return!1;throw d}}async function V3(e,t){var b;const{address:n,blockNumber:r,blockTag:o,hash:s,multicallAddress:i}=t,{authorization:a,data:c,signature:l,to:u}=J5(t.signature);if(await cl(e,{address:n,blockNumber:r,blockTag:o})===Wo(["0xef0100",a.address]))return await J3(e,{address:n,blockNumber:r,blockTag:o,hash:s,signature:l});const d={address:a.address,chainId:Number(a.chainId),nonce:Number(a.nonce),r:ee(a.r,{size:32}),s:ee(a.s,{size:32}),yParity:a.yParity};if(!await p2({address:n,authorization:d}))throw new Mr;const g=await te(e,Rt,"readContract")({...i?{address:i}:{code:yu},authorizationList:[d],abi:jo,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:u??n,callData:c}]:[],{allowFailure:!0,target:n,callData:Ct({abi:Oh,functionName:"isValidSignature",args:[s,l]})}]]}),m=(b=g[g.length-1])==null?void 0:b.returnData;if(m!=null&&m.startsWith("0x1626ba7e"))return!0;throw new Mr}async function K3(e,t){const{address:n,factory:r,factoryData:o,hash:s,signature:i,verifierAddress:a,...c}=t,l=await(async()=>!r&&!o||b3(i)?i:g3({data:o,signature:i,to:r}))(),u=a?{to:a,data:Ct({abi:Nd,functionName:"isValidSig",args:[n,s,l]}),...c}:{data:wu({abi:Nd,args:[n,s,l],bytecode:ev}),...c},{data:f}=await te(e,Ho,"call")(u).catch(d=>{throw d instanceof wp?new Mr:d});if(oy(f??"0x0"))return!0;throw new Mr}async function J3(e,t){const{address:n,blockNumber:r,blockTag:o,hash:s,signature:i}=t;if((await te(e,Rt,"readContract")({address:n,abi:Oh,args:[s,i],blockNumber:r,blockTag:o,functionName:"isValidSignature"}).catch(c=>{throw c instanceof hu?new Mr:c})).startsWith("0x1626ba7e"))return!0;throw new Mr}class Mr extends Error{}async function Y3(e,{address:t,message:n,factory:r,factoryData:o,signature:s,...i}){const a=mm(n);return te(e,Ba,"verifyHash")({address:t,factory:r,factoryData:o,hash:a,signature:s,...i})}async function X3(e,t){const{address:n,factory:r,factoryData:o,signature:s,message:i,primaryType:a,types:c,domain:l,...u}=t,f=O2({message:i,primaryType:a,types:c,domain:l});return te(e,Ba,"verifyHash")({address:n,factory:r,factoryData:o,hash:f,signature:s,...u})}const lc=new Map,Nf=new Map;let Z3=0;function Xn(e,t,n){const r=++Z3,o=()=>lc.get(e)||[],s=()=>{const u=o();lc.set(e,u.filter(f=>f.id!==r))},i=()=>{const u=o();if(!u.some(d=>d.id===r))return;const f=Nf.get(e);if(u.length===1&&f){const d=f();d instanceof Promise&&d.catch(()=>{})}s()},a=o();if(lc.set(e,[...a,{id:r,fns:t}]),a&&a.length>0)return i;const c={};for(const u in t)c[u]=(...f)=>{var h,g;const d=o();if(d.length!==0)for(const m of d)(g=(h=m.fns)[u])==null||g.call(h,...f)};const l=n(c);return typeof l=="function"&&Nf.set(e,l),i}function ii(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let o=!0;const s=()=>o=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));const c=await(n==null?void 0:n(a))??r;await Hi(c);const l=async()=>{o&&(await e({unpoll:s}),await Hi(r),l())};l()})(),s}function s1(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:o,poll:s,pollingInterval:i=e.pollingInterval}){const a=typeof s<"u"?s:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return a?(()=>{const f=_e(["watchBlockNumber",e.uid,t,n,i]);return Xn(f,{onBlockNumber:r,onError:o},d=>ii(async()=>{var h;try{const g=await te(e,ni,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(g===c)return;if(g-c>1&&n)for(let m=c+1n;m<g;m++)d.onBlockNumber(m,c),c=m}(c===void 0||g>c)&&(d.onBlockNumber(g,c),c=g)}catch(g){(h=d.onError)==null||h.call(d,g)}},{emitOnBegin:t,interval:i}))})():(()=>{const f=_e(["watchBlockNumber",e.uid,t,n]);return Xn(f,{onBlockNumber:r,onError:o},d=>{let h=!0,g=()=>h=!1;return(async()=>{try{const m=(()=>{if(e.transport.type==="fallback"){const y=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return y?y.value:e.transport}return e.transport})(),{unsubscribe:b}=await m.subscribe({params:["newHeads"],onData(y){var v;if(!h)return;const C=an((v=y.result)==null?void 0:v.number);d.onBlockNumber(C,c),c=C},onError(y){var C;(C=d.onError)==null||C.call(d,y)}});g=b,h||g()}catch(m){o==null||o(m)}})(),()=>g()})})()}async function ex(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:o,onReplaced:s,retryCount:i=6,retryDelay:a=({count:x})=>~~(1<<x)*200,timeout:c=18e4}=t,l=_e(["waitForTransactionReceipt",e.uid,o]),u=(()=>{var x;return t.pollingInterval?t.pollingInterval:(x=e.chain)!=null&&x.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let f,d,h,g=!1,m,b;const{promise:y,resolve:C,reject:v}=Mp(),w=c?setTimeout(()=>{b==null||b(),m==null||m(),v(new f6({hash:o}))},c):void 0;return m=Xn(l,{onReplaced:s,resolve:C,reject:v},async x=>{if(h=await te(e,Ti,"getTransactionReceipt")({hash:o}).catch(()=>{}),h&&r<=1){clearTimeout(w),x.resolve(h),m==null||m();return}b=te(e,s1,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(E){const A=S=>{clearTimeout(w),b==null||b(),S(),m==null||m()};let I=E;if(!g)try{if(h){if(r>1&&(!h.blockNumber||I-h.blockNumber+1n<r))return;A(()=>x.resolve(h));return}if(n&&!f&&(g=!0,await Mo(async()=>{f=await te(e,$u,"getTransaction")({hash:o}),f.blockNumber&&(I=f.blockNumber)},{delay:a,retryCount:i}),g=!1),h=await te(e,Ti,"getTransactionReceipt")({hash:o}),r>1&&(!h.blockNumber||I-h.blockNumber+1n<r))return;A(()=>x.resolve(h))}catch(S){if(S instanceof bp||S instanceof yp){if(!f){g=!1;return}try{d=f,g=!0;const T=await Mo(()=>te(e,$t,"getBlock")({blockNumber:I,includeTransactions:!0}),{delay:a,retryCount:i,shouldRetry:({error:N})=>N instanceof Xp});g=!1;const R=T.transactions.find(({from:N,nonce:q})=>N===d.from&&q===d.nonce);if(!R||(h=await te(e,Ti,"getTransactionReceipt")({hash:R.hash}),r>1&&(!h.blockNumber||I-h.blockNumber+1n<r)))return;let M="replaced";R.to===d.to&&R.value===d.value&&R.input===d.input?M="repriced":R.from===R.to&&R.value===0n&&(M="cancelled"),A(()=>{var N;(N=x.onReplaced)==null||N.call(x,{reason:M,replacedTransaction:d,transaction:R,transactionReceipt:h}),x.resolve(h)})}catch(T){A(()=>x.reject(T))}}else A(()=>x.reject(S))}}})}),y}function tx(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:o,onError:s,includeTransactions:i,poll:a,pollingInterval:c=e.pollingInterval}){const l=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),u=i??!1;let f;return l?(()=>{const g=_e(["watchBlocks",e.uid,t,n,r,u,c]);return Xn(g,{onBlock:o,onError:s},m=>ii(async()=>{var b;try{const y=await te(e,$t,"getBlock")({blockTag:t,includeTransactions:u});if(y.number!==null&&(f==null?void 0:f.number)!=null){if(y.number===f.number)return;if(y.number-f.number>1&&n)for(let C=(f==null?void 0:f.number)+1n;C<y.number;C++){const v=await te(e,$t,"getBlock")({blockNumber:C,includeTransactions:u});m.onBlock(v,f),f=v}}((f==null?void 0:f.number)==null||t==="pending"&&(y==null?void 0:y.number)==null||y.number!==null&&y.number>f.number)&&(m.onBlock(y,f),f=y)}catch(y){(b=m.onError)==null||b.call(m,y)}},{emitOnBegin:r,interval:c}))})():(()=>{let g=!0,m=!0,b=()=>g=!1;return(async()=>{try{r&&te(e,$t,"getBlock")({blockTag:t,includeTransactions:u}).then(v=>{g&&m&&(o(v,void 0),m=!1)}).catch(s);const y=(()=>{if(e.transport.type==="fallback"){const v=e.transport.transports.find(w=>w.config.type==="webSocket"||w.config.type==="ipc");return v?v.value:e.transport}return e.transport})(),{unsubscribe:C}=await y.subscribe({params:["newHeads"],async onData(v){var x;if(!g)return;const w=await te(e,$t,"getBlock")({blockNumber:(x=v.result)==null?void 0:x.number,includeTransactions:u}).catch(()=>{});g&&(o(w,f),m=!1,f=w)},onError(v){s==null||s(v)}});b=C,g||b()}catch(y){s==null||s(y)}})(),()=>b()})()}function nx(e,t){const{abi:n,address:r,args:o,batch:s=!0,eventName:i,fromBlock:a,onError:c,onLogs:l,poll:u,pollingInterval:f=e.pollingInterval,strict:d}=t;return(typeof u<"u"?u:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const b=d??!1,y=_e(["watchContractEvent",r,o,s,e.uid,i,f,b,a]);return Xn(y,{onLogs:l,onError:c},C=>{let v;a!==void 0&&(v=a-1n);let w,x=!1;const E=ii(async()=>{var A;if(!x){try{w=await te(e,Qp,"createContractEventFilter")({abi:n,address:r,args:o,eventName:i,strict:b,fromBlock:a})}catch{}x=!0;return}try{let I;if(w)I=await te(e,Ca,"getFilterChanges")({filter:w});else{const S=await te(e,ni,"getBlockNumber")({});v&&v<S?I=await te(e,fm,"getContractEvents")({abi:n,address:r,args:o,eventName:i,fromBlock:v+1n,toBlock:S,strict:b}):I=[],v=S}if(I.length===0)return;if(s)C.onLogs(I);else for(const S of I)C.onLogs([S])}catch(I){w&&I instanceof Yn&&(x=!1),(A=C.onError)==null||A.call(C,I)}},{emitOnBegin:!0,interval:f});return async()=>{w&&await te(e,ka,"uninstallFilter")({filter:w}),E()}})})():(()=>{const b=d??!1,y=_e(["watchContractEvent",r,o,s,e.uid,i,f,b]);let C=!0,v=()=>C=!1;return Xn(y,{onLogs:l,onError:c},w=>((async()=>{try{const x=(()=>{if(e.transport.type==="fallback"){const I=e.transport.transports.find(S=>S.config.type==="webSocket"||S.config.type==="ipc");return I?I.value:e.transport}return e.transport})(),E=i?ti({abi:n,eventName:i,args:o}):[],{unsubscribe:A}=await x.subscribe({params:["logs",{address:r,topics:E}],onData(I){var T;if(!C)return;const S=I.result;try{const{eventName:R,args:M}=Qi({abi:n,data:S.data,topics:S.topics,strict:d}),N=On(S,{args:M,eventName:R});w.onLogs([N])}catch(R){let M,N;if(R instanceof $i||R instanceof ou){if(d)return;M=R.abiItem.name,N=(T=R.abiItem.inputs)==null?void 0:T.some(P=>!("name"in P&&P.name))}const q=On(S,{args:N?[]:{},eventName:M});w.onLogs([q])}},onError(I){var S;(S=w.onError)==null||S.call(w,I)}});v=A,C||v()}catch(x){c==null||c(x)}})(),()=>v()))})()}function rx(e,{address:t,args:n,batch:r=!0,event:o,events:s,fromBlock:i,onError:a,onLogs:c,poll:l,pollingInterval:u=e.pollingInterval,strict:f}){const d=typeof l<"u"?l:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=f??!1;return d?(()=>{const b=_e(["watchEvent",t,n,r,e.uid,o,u,i]);return Xn(b,{onLogs:c,onError:a},y=>{let C;i!==void 0&&(C=i-1n);let v,w=!1;const x=ii(async()=>{var E;if(!w){try{v=await te(e,Hp,"createEventFilter")({address:t,args:n,event:o,events:s,strict:h,fromBlock:i})}catch{}w=!0;return}try{let A;if(v)A=await te(e,Ca,"getFilterChanges")({filter:v});else{const I=await te(e,ni,"getBlockNumber")({});C&&C!==I?A=await te(e,Ou,"getLogs")({address:t,args:n,event:o,events:s,fromBlock:C+1n,toBlock:I}):A=[],C=I}if(A.length===0)return;if(r)y.onLogs(A);else for(const I of A)y.onLogs([I])}catch(A){v&&A instanceof Yn&&(w=!1),(E=y.onError)==null||E.call(y,A)}},{emitOnBegin:!0,interval:u});return async()=>{v&&await te(e,ka,"uninstallFilter")({filter:v}),x()}})})():(()=>{let b=!0,y=()=>b=!1;return(async()=>{try{const C=(()=>{if(e.transport.type==="fallback"){const E=e.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return E?E.value:e.transport}return e.transport})(),v=s??(o?[o]:void 0);let w=[];v&&(w=[v.flatMap(A=>ti({abi:[A],eventName:A.name,args:n}))],o&&(w=w[0]));const{unsubscribe:x}=await C.subscribe({params:["logs",{address:t,topics:w}],onData(E){var I;if(!b)return;const A=E.result;try{const{eventName:S,args:T}=Qi({abi:v??[],data:A.data,topics:A.topics,strict:h}),R=On(A,{args:T,eventName:S});c([R])}catch(S){let T,R;if(S instanceof $i||S instanceof ou){if(f)return;T=S.abiItem.name,R=(I=S.abiItem.inputs)==null?void 0:I.some(N=>!("name"in N&&N.name))}const M=On(A,{args:R?[]:{},eventName:T});c([M])}},onError(E){a==null||a(E)}});y=x,b||y()}catch(C){a==null||a(C)}})(),()=>y()})()}function ox(e,{batch:t=!0,onError:n,onTransactions:r,poll:o,pollingInterval:s=e.pollingInterval}){return(typeof o<"u"?o:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const l=_e(["watchPendingTransactions",e.uid,t,s]);return Xn(l,{onTransactions:r,onError:n},u=>{let f;const d=ii(async()=>{var h;try{if(!f)try{f=await te(e,Gp,"createPendingTransactionFilter")({});return}catch(m){throw d(),m}const g=await te(e,Ca,"getFilterChanges")({filter:f});if(g.length===0)return;if(t)u.onTransactions(g);else for(const m of g)u.onTransactions([m])}catch(g){(h=u.onError)==null||h.call(u,g)}},{emitOnBegin:!0,interval:s});return async()=>{f&&await te(e,ka,"uninstallFilter")({filter:f}),d()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:f}=await e.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!l)return;const h=d.result;r([h])},onError(d){n==null||n(d)}});u=f,l||u()}catch(f){n==null||n(f)}})(),()=>u()})()}class Hu extends L{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
72
|
+
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class uc extends L{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}async function i1(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const dc=new Hs(128);async function sx(e,t){var w,x,E,A,I;const{account:n=e.account,assertChainId:r=!0,chain:o=e.chain,accessList:s,authorizationList:i,blobs:a,data:c,dataSuffix:l=typeof e.dataSuffix=="string"?e.dataSuffix:(w=e.dataSuffix)==null?void 0:w.value,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:g,nonce:m,type:b,value:y,...C}=t;if(typeof n>"u")throw new Hu({docsPath:"/docs/actions/wallet/sendTransaction"});const v=n?Qe(n):null;try{Wr(t);const S=await(async()=>{if(t.to)return t.to;if(t.to!==null&&i&&i.length>0)return await Au({authorization:i[0]}).catch(()=>{throw new L("`to` is required. Could not infer from `authorizationList`.")})})();if((v==null?void 0:v.type)==="json-rpc"||v===null){let T;o!==null&&(T=await te(e,xa,"getChainId")({}),r&&y2({currentChainId:T,chain:o}));const R=(A=(E=(x=e.chain)==null?void 0:x.formatters)==null?void 0:E.transactionRequest)==null?void 0:A.format,N=(R||Qo)({...ei(C,{format:R}),accessList:s,account:v,authorizationList:i,blobs:a,chainId:T,data:c&&vt([c,l??"0x"]),gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:g,nonce:m,to:S,type:b,value:y},"sendTransaction"),q=dc.get(e.uid),P=q?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:P,params:[N]},{retryCount:0})}catch(D){if(q===!1)throw D;const _=D;if(_.name==="InvalidInputRpcError"||_.name==="InvalidParamsRpcError"||_.name==="MethodNotFoundRpcError"||_.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[N]},{retryCount:0}).then(F=>(dc.set(e.uid,!0),F)).catch(F=>{const U=F;throw U.name==="MethodNotFoundRpcError"||U.name==="MethodNotSupportedRpcError"?(dc.set(e.uid,!1),_):U});throw _}}if((v==null?void 0:v.type)==="local"){const T=await te(e,Bu,"prepareTransactionRequest")({account:v,accessList:s,authorizationList:i,blobs:a,chain:o,data:c&&vt([c,l??"0x"]),gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:g,nonce:m,nonceManager:v.nonceManager,parameters:[...um,"sidecars"],type:b,value:y,...C,to:S}),R=(I=o==null?void 0:o.serializers)==null?void 0:I.transaction,M=await v.signTransaction(T,{serializer:R});return await te(e,i1,"sendRawTransaction")({serializedTransaction:M})}throw(v==null?void 0:v.type)==="smart"?new uc({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new uc({docsPath:"/docs/actions/wallet/sendTransaction",type:v==null?void 0:v.type})}catch(S){throw S instanceof uc?S:cm(S,{...t,account:v,chain:t.chain||void 0})}}async function ix(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:r}){var a,c,l;const o=await e.request({method:"eth_sendRawTransactionSync",params:r?[t,ee(r)]:[t]},{retryCount:0}),i=(((l=(c=(a=e.chain)==null?void 0:a.formatters)==null?void 0:c.transactionReceipt)==null?void 0:l.format)||pm)(o);if(i.status==="reverted"&&n)throw new d6({receipt:i});return i}async function ax(e,{account:t=e.account,message:n}){if(!t)throw new Hu({docsPath:"/docs/actions/wallet/signMessage"});const r=Qe(t);if(r.signMessage)return r.signMessage({message:n});const o=typeof n=="string"?So(n):n.raw instanceof Uint8Array?ln(n.raw):n.raw;return e.request({method:"personal_sign",params:[o,r.address]},{retryCount:0})}async function Yi(e,t){return Yi.internal(e,sx,"sendTransaction",t)}(function(e){async function t(n,r,o,s){const{abi:i,account:a=n.account,address:c,args:l,functionName:u,...f}=s;if(typeof a>"u")throw new Hu({docsPath:"/docs/contract/writeContract"});const d=a?Qe(a):null,h=Ct({abi:i,args:l,functionName:u});try{return await te(n,r,o)({data:h,to:c,account:d,...f})}catch(g){throw Rr(g,{abi:i,address:c,args:l,docsPath:"/docs/contract/writeContract",functionName:u,sender:d==null?void 0:d.address})}}e.internal=t})(Yi||(Yi={}));function qr(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const o=e[n];return typeof o=="function"?o:s=>t(e,s)}const Ri="2.22.1",cx=()=>`@wagmi/core@${Ri}`;var a1=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Xi,c1;let Rn=class vl extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return cx()}constructor(t,n={}){var s;super(),Xi.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const r=n.cause instanceof vl?n.cause.details:(s=n.cause)!=null&&s.message?n.cause.message:n.details,o=n.cause instanceof vl&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: ${this.docsBaseUrl}${o}.html${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(`
|
|
73
|
+
`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return a1(this,Xi,"m",c1).call(this,this,t)}};Xi=new WeakSet,c1=function e(t,n){return n!=null&&n(t)?t:t.cause?a1(this,Xi,"m",e).call(this,t.cause,n):t};class Do extends Rn{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class lx extends Rn{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class ux extends Rn{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class dx extends Rn{constructor({address:t,connector:n}){super(`Account "${t}" not found for connector "${n.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class fx extends Rn{constructor({connectionChainId:t,connectorChainId:n}){super(`The current chain of the connector (id: ${n}) does not match the connection's chain (id: ${t}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class hx extends Rn{constructor({connector:t}){super(`Connector "${t.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function px(e,t){var r;let n;if(typeof t.connector=="function"?n=e._internal.connectors.setup(t.connector):n=t.connector,n.uid===e.state.current)throw new lx;try{e.setState(a=>({...a,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const{connector:o,...s}=t,i=await n.connect(s);return n.emitter.off("connect",e._internal.events.connect),n.emitter.on("change",e._internal.events.change),n.emitter.on("disconnect",e._internal.events.disconnect),await((r=e.storage)==null?void 0:r.setItem("recentConnectorId",n.id)),e.setState(a=>({...a,connections:new Map(a.connections).set(n.uid,{accounts:s.withCapabilities?i.accounts.map(c=>typeof c=="object"?c.address:c):i.accounts,chainId:i.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:s.withCapabilities?i.accounts.map(a=>typeof a=="object"?a:{address:a,capabilities:{}}):i.accounts,chainId:i.chainId}}catch(o){throw e.setState(s=>({...s,status:s.current?"connected":"disconnected"})),o}}const xl=256;let yi=xl,wi;function l1(e=11){if(!wi||yi+e>xl*2){wi="",yi=0;for(let t=0;t<xl;t++)wi+=(256+Math.random()*256|0).toString(16).substring(1)}return wi.substring(yi,yi+++e)}function u1(e){const{batch:t,chain:n,ccipRead:r,dataSuffix:o,key:s="base",name:i="Base Client",type:a="base"}=e,c=e.experimental_blockTag??(typeof(n==null?void 0:n.experimental_preconfirmationTime)=="number"?"pending":void 0),l=(n==null?void 0:n.blockTime)??12e3,u=Math.min(Math.max(Math.floor(l/2),500),4e3),f=e.pollingInterval??u,d=e.cacheTime??f,h=e.account?Qe(e.account):void 0,{config:g,request:m,value:b}=e.transport({account:h,chain:n,pollingInterval:f}),y={...g,...b},C={account:h,batch:t,cacheTime:d,ccipRead:r,chain:n,dataSuffix:o,key:s,name:i,pollingInterval:f,request:m,transport:y,type:a,uid:l1(),...c?{experimental_blockTag:c}:{}};function v(w){return x=>{const E=x(w);for(const I in C)delete E[I];const A={...w,...E};return Object.assign(A,{extend:v(A)})}}return Object.assign(C,{extend:v(C)})}function mx(e){var f,d,h;const{scheme:t,statement:n,...r}=((f=e.match(gx))==null?void 0:f.groups)??{},{chainId:o,expirationTime:s,issuedAt:i,notBefore:a,requestId:c,...l}=((d=e.match(bx))==null?void 0:d.groups)??{},u=(h=e.split("Resources:")[1])==null?void 0:h.split(`
|
|
74
|
+
- `).slice(1);return{...r,...l,...o?{chainId:Number(o)}:{},...s?{expirationTime:new Date(s)}:{},...i?{issuedAt:new Date(i)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const gx=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,bx=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function yx(e){const{address:t,domain:n,message:r,nonce:o,scheme:s,time:i=new Date}=e;if(n&&r.domain!==n||o&&r.nonce!==o||s&&r.scheme!==s||r.expirationTime&&i>=r.expirationTime||r.notBefore&&i<r.notBefore)return!1;try{if(!r.address||!wt(r.address,{strict:!1})||t&&!ri(r.address,t))return!1}catch{return!1}return!0}async function wx(e,t){const{address:n,domain:r,message:o,nonce:s,scheme:i,signature:a,time:c=new Date,...l}=t,u=mx(o);if(!u.address||!yx({address:n,domain:r,message:u,nonce:s,scheme:i,time:c}))return!1;const d=mm(o);return Ba(e,{address:u.address,hash:d,signature:a,...l})}function vx(e){return{call:t=>Ho(e,t),createAccessList:t=>zp(e,t),createBlockFilter:()=>Av(e),createContractEventFilter:t=>Qp(e,t),createEventFilter:t=>Hp(e,t),createPendingTransactionFilter:()=>Gp(e),estimateContractGas:t=>Xv(e,t),estimateGas:t=>Su(e,t),getBalance:t=>dm(e,t),getBlobBaseFee:()=>Zv(e),getBlock:t=>$t(e,t),getBlockNumber:t=>ni(e,t),getBlockTransactionCount:t=>s2(e,t),getBytecode:t=>cl(e,t),getChainId:()=>xa(e),getCode:t=>cl(e,t),getContractEvents:t=>fm(e,t),getEip712Domain:t=>l2(e,t),getEnsAddress:t=>lv(e,t),getEnsAvatar:t=>Wp(e,t),getEnsName:t=>qp(e,t),getEnsResolver:t=>Cv(e,t),getEnsText:t=>$p(e,t),getFeeHistory:t=>f2(e,t),estimateFeesPerGas:t=>Mv(e,t),getFilterChanges:t=>Ca(e,t),getFilterLogs:t=>h2(e,t),getGasPrice:()=>Iu(e),getLogs:t=>Ou(e,t),getProof:t=>t3(e,t),estimateMaxPriorityFeePerGas:t=>Fv(e,t),fillTransaction:t=>lm(e,t),getStorageAt:t=>n3(e,t),getTransaction:t=>$u(e,t),getTransactionConfirmations:t=>r3(e,t),getTransactionCount:t=>nm(e,t),getTransactionReceipt:t=>Ti(e,t),multicall:t=>Fm(e,t),prepareTransactionRequest:t=>Bu(e,t),readContract:t=>Rt(e,t),sendRawTransaction:t=>i1(e,t),sendRawTransactionSync:t=>ix(e,t),simulate:t=>fl(e,t),simulateBlocks:t=>fl(e,t),simulateCalls:t=>h3(e,t),simulateContract:t=>p3(e,t),verifyHash:t=>Ba(e,t),verifyMessage:t=>Y3(e,t),verifySiweMessage:t=>wx(e,t),verifyTypedData:t=>X3(e,t),uninstallFilter:t=>ka(e,t),waitForTransactionReceipt:t=>ex(e,t),watchBlocks:t=>tx(e,t),watchBlockNumber:t=>s1(e,t),watchContractEvent:t=>nx(e,t),watchEvent:t=>rx(e,t),watchPendingTransactions:t=>ox(e,t)}}function Gu({key:e,methods:t,name:n,request:r,retryCount:o=3,retryDelay:s=150,timeout:i,type:a},c){const l=l1();return{config:{key:e,methods:t,name:n,request:r,retryCount:o,retryDelay:s,timeout:i,type:a},request:g2(r,{methods:t,retryCount:o,retryDelay:s,uid:l}),value:c}}function xx(e,t={}){const{key:n="custom",methods:r,name:o="Custom Provider",retryDelay:s}=t;return({retryCount:i})=>Gu({key:n,methods:r,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:s,type:"custom"})}class Cx extends L{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function d1(e,t={}){const{batch:n,fetchFn:r,fetchOptions:o,key:s="http",methods:i,name:a="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:u,raw:f}=t;return({chain:d,retryCount:h,timeout:g})=>{const{batchSize:m=1e3,wait:b=0}=typeof n=="object"?n:{},y=t.retryCount??h,C=g??t.timeout??1e4,v=e||(d==null?void 0:d.rpcUrls.default.http[0]);if(!v)throw new Cx;const w=x2(v,{fetchFn:r,fetchOptions:o,onRequest:c,onResponse:l,timeout:C});return Gu({key:s,methods:i,name:a,async request({method:x,params:E}){const A={method:x,params:E},{schedule:I}=Dp({id:v,wait:b,shouldSplitBatch(M){return M.length>m},fn:M=>w.request({body:M}),sort:(M,N)=>M.id-N.id}),S=async M=>n?I(M):[await w.request({body:M})],[{error:T,result:R}]=await S(A);if(f)return{error:T,result:R};if(T)throw new gu({body:A,error:T,url:v});return R},retryCount:y,retryDelay:u,timeout:C,type:"http"},{fetchOptions:o,url:v})}}async function f1(e,t={}){const{assertChainId:n=!0}=t;let r;if(t.connector){const{connector:u}=t;if(e.state.status==="reconnecting"&&!u.getAccounts&&!u.getChainId)throw new hx({connector:u});const[f,d]=await Promise.all([u.getAccounts().catch(h=>{if(t.account===null)return[];throw h}),u.getChainId()]);r={accounts:f,chainId:d,connector:u}}else r=e.state.connections.get(e.state.current);if(!r)throw new ux;const o=t.chainId??r.chainId,s=await r.connector.getChainId();if(n&&s!==o)throw new fx({connectionChainId:o,connectorChainId:s});const i=r.connector;if(i.getClient)return i.getClient({chainId:o});const a=Qe(t.account??r.accounts[0]);if(a&&(a.address=yt(a.address)),t.account&&!r.accounts.some(u=>u.toLowerCase()===a.address.toLowerCase()))throw new dx({address:a.address,connector:i});const c=e.chains.find(u=>u.id===o),l=await r.connector.getProvider({chainId:o});return u1({account:a,chain:c,name:"Connector Client",transport:u=>xx(l)({...u,retryCount:0})})}async function Ax(e,t={}){var o,s;let n;if(t.connector)n=t.connector;else{const{connections:i,current:a}=e.state,c=i.get(a);n=c==null?void 0:c.connector}const r=e.state.connections;n&&(await n.disconnect(),n.emitter.off("change",e._internal.events.change),n.emitter.off("disconnect",e._internal.events.disconnect),n.emitter.on("connect",e._internal.events.connect),r.delete(n.uid)),e.setState(i=>{if(r.size===0)return{...i,connections:new Map,current:null,status:"disconnected"};const a=r.values().next().value;return{...i,connections:new Map(r),current:a.connector.uid}});{const i=e.state.current;if(!i)return;const a=(o=e.state.connections.get(i))==null?void 0:o.connector;if(!a)return;await((s=e.storage)==null?void 0:s.setItem("recentConnectorId",a.id))}}function h1(e){return typeof e=="number"?e:e==="wei"?0:Math.abs(s6[e])}function p1(e){const t=e.state.current,n=e.state.connections.get(t),r=n==null?void 0:n.accounts,o=r==null?void 0:r[0],s=e.chains.find(a=>a.id===(n==null?void 0:n.chainId)),i=e.state.status;switch(i){case"connected":return{address:o,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:i};case"reconnecting":return{address:o,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!!o,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:i};case"connecting":return{address:o,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:i};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:i}}}async function Ex(e,t){const{allowFailure:n=!0,chainId:r,contracts:o,...s}=t,i=e.getClient({chainId:r});return qr(i,Fm,"multicall")({allowFailure:n,contracts:o,...s})}function m1(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return qr(o,Rt,"readContract")(r)}async function kx(e,t){var a;const{allowFailure:n=!0,blockNumber:r,blockTag:o,...s}=t,i=t.contracts;try{const c={};for(const[d,h]of i.entries()){const g=h.chainId??e.state.chainId;c[g]||(c[g]=[]),(a=c[g])==null||a.push({contract:h,index:d})}const l=()=>Object.entries(c).map(([d,h])=>Ex(e,{...s,allowFailure:n,blockNumber:r,blockTag:o,chainId:Number.parseInt(d,10),contracts:h.map(({contract:g})=>g)})),u=(await Promise.all(l())).flat(),f=Object.values(c).flatMap(d=>d.map(({index:h})=>h));return u.reduce((d,h,g)=>(d&&(d[f[g]]=h),d),[])}catch(c){if(c instanceof hu)throw c;const l=()=>i.map(u=>m1(e,{...u,blockNumber:r,blockTag:o}));return n?(await Promise.allSettled(l())).map(u=>u.status==="fulfilled"?{result:u.value,status:"success"}:{error:u.reason,result:void 0,status:"failure"}):await Promise.all(l())}}async function Ix(e,t){const{address:n,blockNumber:r,blockTag:o,chainId:s,token:i,unit:a="ether"}=t;if(i)try{return await Ff(e,{balanceAddress:n,chainId:s,symbolType:"string",tokenAddress:i})}catch(d){if(d.name==="ContractFunctionExecutionError"){const h=await Ff(e,{balanceAddress:n,chainId:s,symbolType:"bytes32",tokenAddress:i}),g=sy(kn(h.symbol,{dir:"right"}));return{...h,symbol:g}}throw d}const c=e.getClient({chainId:s}),u=await qr(c,dm,"getBalance")(r?{address:n,blockNumber:r}:{address:n,blockTag:o}),f=e.chains.find(d=>d.id===s)??c.chain;return{decimals:f.nativeCurrency.decimals,formatted:Ks(u,h1(a)),symbol:f.nativeCurrency.symbol,value:u}}async function Ff(e,t){const{balanceAddress:n,chainId:r,symbolType:o,tokenAddress:s,unit:i}=t,a={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:o}]}],address:s},[c,l,u]=await kx(e,{allowFailure:!1,contracts:[{...a,functionName:"balanceOf",args:[n],chainId:r},{...a,functionName:"decimals",chainId:r},{...a,functionName:"symbol",chainId:r}]}),f=Ks(c??"0",h1(i??l));return{decimals:l,formatted:f,symbol:u,value:c}}function Mf(e){return e.state.chainId}function Dr(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Dr(e[r],t[r]))return!1;return!0}if(typeof e.valueOf=="function"&&e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(typeof e.toString=="function"&&e.toString!==Object.prototype.toString)return e.toString()===t.toString();const o=Object.keys(e);if(n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.hasOwn(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(s&&!Dr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}let fc=[];function Df(e){const t=e.chains;return Dr(fc,t)?fc:(fc=t,t)}function jx(e,t={}){try{return e.getClient(t)}catch{return}}let vi=[];function Cl(e){const t=[...e.state.connections.values()];return e.state.status==="reconnecting"||Dr(vi,t)?vi:(vi=t,t)}let xi=[];function Lf(e){const t=e.connectors;return xi.length===t.length&&xi.every((n,r)=>n===t[r])?xi:(xi=t,t)}function Bx(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return qr(o,Wp,"getEnsAvatar")(r)}function Sx(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return qr(o,qp,"getEnsName")(r)}function Al(e,t={}){const n=jx(e,t);return n==null?void 0:n.extend(vx)}let hc=!1;async function Px(e,t={}){var l,u;if(hc)return[];hc=!0,e.setState(f=>({...f,status:f.current?"reconnecting":"connecting"}));const n=[];if((l=t.connectors)!=null&&l.length)for(const f of t.connectors){let d;typeof f=="function"?d=e._internal.connectors.setup(f):d=f,n.push(d)}else n.push(...e.connectors);let r;try{r=await((u=e.storage)==null?void 0:u.getItem("recentConnectorId"))}catch{}const o={};for(const[,f]of e.state.connections)o[f.connector.id]=1;r&&(o[r]=0);const s=Object.keys(o).length>0?[...n].sort((f,d)=>(o[f.id]??10)-(o[d.id]??10)):n;let i=!1;const a=[],c=[];for(const f of s){const d=await f.getProvider().catch(()=>{});if(!d||c.some(m=>m===d)||!await f.isAuthorized())continue;const g=await f.connect({isReconnecting:!0}).catch(()=>null);g&&(f.emitter.off("connect",e._internal.events.connect),f.emitter.on("change",e._internal.events.change),f.emitter.on("disconnect",e._internal.events.disconnect),e.setState(m=>{const b=new Map(i?m.connections:new Map).set(f.uid,{accounts:g.accounts,chainId:g.chainId,connector:f});return{...m,current:i?m.current:f.uid,connections:b}}),a.push({accounts:g.accounts,chainId:g.chainId,connector:f}),c.push(d),i=!0)}return(e.state.status==="reconnecting"||e.state.status==="connecting")&&(i?e.setState(f=>({...f,status:"connected"})):e.setState(f=>({...f,connections:new Map,current:null,status:"disconnected"}))),hc=!1,a}async function Ox(e,t){const{account:n,connector:r,...o}=t;let s;return typeof n=="object"&&n.type==="local"?s=e.getClient():s=await f1(e,{account:n,connector:r}),qr(s,ax,"signMessage")({...o,...n?{account:n}:{}})}class wn extends Rn{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class Tx extends Rn{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function Rx(e,t){var i;const{addEthereumChainParameter:n,chainId:r}=t,o=e.state.connections.get(((i=t.connector)==null?void 0:i.uid)??e.state.current);if(o){const a=o.connector;if(!a.switchChain)throw new Tx({connector:a});return await a.switchChain({addEthereumChainParameter:n,chainId:r})}const s=e.chains.find(a=>a.id===r);if(!s)throw new Do;return e.setState(a=>({...a,chainId:r})),s}function g1(e,t){const{onChange:n}=t;return e.subscribe(()=>p1(e),n,{equalityFn(r,o){const{connector:s,...i}=r,{connector:a,...c}=o;return Dr(i,c)&&(s==null?void 0:s.id)===(a==null?void 0:a.id)&&(s==null?void 0:s.uid)===(a==null?void 0:a.uid)}})}function Nx(e,t){const{onChange:n}=t;return e.subscribe(r=>r.chainId,n)}function Fx(e,t){const{onChange:n}=t;return e.subscribe(()=>Cl(e),n,{equalityFn:Dr})}function Mx(e,t){const{onChange:n}=t;return e._internal.connectors.subscribe((r,o)=>{n(Object.values(r),o)})}function Dx(e,t){const{onChange:n}=t;return e.subscribe(()=>Al(e),n,{equalityFn(r,o){return(r==null?void 0:r.uid)===(o==null?void 0:o.uid)}})}async function Lx(e,t){const{account:n,chainId:r,connector:o,...s}=t;let i;return typeof n=="object"&&(n==null?void 0:n.type)==="local"?i=e.getClient({chainId:r}):i=await f1(e,{account:n??void 0,assertChainId:!1,chainId:r,connector:o}),await qr(i,Yi,"writeContract")({...s,...n?{account:n}:{},chain:r?{id:r}:null})}Sa.type="injected";function Sa(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:n}=e;function r(){const c=e.target;if(typeof c=="function"){const l=c();if(l)return l}return typeof c=="object"?c:typeof c=="string"?{...Ux[c]??{id:c,name:`${c[0].toUpperCase()}${c.slice(1)}`,provider:`is${c[0].toUpperCase()}${c.slice(1)}`}}:{id:"injected",name:"Injected",provider(l){return l==null?void 0:l.ethereum}}}let o,s,i,a;return c=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},get supportsSimulation(){return!0},type:Sa.type,async setup(){const l=await this.getProvider();l!=null&&l.on&&e.target&&(i||(i=this.onConnect.bind(this),l.on("connect",i)),o||(o=this.onAccountsChanged.bind(this),l.on("accountsChanged",o)))},async connect({chainId:l,isReconnecting:u,withCapabilities:f}={}){var g,m,b,y,C,v;const d=await this.getProvider();if(!d)throw new wn;let h=[];if(u)h=await this.getAccounts().catch(()=>[]);else if(t)try{h=(y=(b=(m=(g=(await d.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:g.caveats)==null?void 0:m[0])==null?void 0:b.value)==null?void 0:y.map(x=>yt(x)),h.length>0&&(h=await this.getAccounts())}catch(w){const x=w;if(x.code===Ee.code)throw new Ee(x);if(x.code===on.code)throw x}try{!(h!=null&&h.length)&&!u&&(h=(await d.request({method:"eth_requestAccounts"})).map(E=>yt(E))),i&&(d.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),d.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),d.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),d.on("disconnect",a));let w=await this.getChainId();if(l&&w!==l){const x=await this.switchChain({chainId:l}).catch(E=>{if(E.code===Ee.code)throw E;return{id:w}});w=(x==null?void 0:x.id)??w}return t&&await((C=c.storage)==null?void 0:C.removeItem(`${this.id}.disconnected`)),e.target||await((v=c.storage)==null?void 0:v.setItem("injected.connected",!0)),{accounts:f?h.map(x=>({address:x,capabilities:{}})):h,chainId:w}}catch(w){const x=w;throw x.code===Ee.code?new Ee(x):x.code===on.code?new on(x):x}},async disconnect(){var u,f;const l=await this.getProvider();if(!l)throw new wn;s&&(l.removeListener("chainChanged",s),s=void 0),a&&(l.removeListener("disconnect",a),a=void 0),i||(i=this.onConnect.bind(this),l.on("connect",i));try{await Tu(()=>l.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await((u=c.storage)==null?void 0:u.setItem(`${this.id}.disconnected`,!0)),e.target||await((f=c.storage)==null?void 0:f.removeItem("injected.connected"))},async getAccounts(){const l=await this.getProvider();if(!l)throw new wn;return(await l.request({method:"eth_accounts"})).map(f=>yt(f))},async getChainId(){const l=await this.getProvider();if(!l)throw new wn;const u=await l.request({method:"eth_chainId"});return Number(u)},async getProvider(){if(typeof window>"u")return;let l;const u=r();return typeof u.provider=="function"?l=u.provider(window):typeof u.provider=="string"?l=Ni(window,u.provider):l=u.provider,l&&!l.removeListener&&("off"in l&&typeof l.off=="function"?l.removeListener=l.off:l.removeListener=()=>{}),l},async isAuthorized(){var l,u;try{if(t&&await((l=c.storage)==null?void 0:l.getItem(`${this.id}.disconnected`))||!e.target&&!await((u=c.storage)==null?void 0:u.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const g=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",g),!!await this.getProvider()),m=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(y=>window.addEventListener("ethereum#initialized",()=>y(g()),{once:!0}))]:[],new Promise(y=>setTimeout(()=>y(g()),m))]))return!0}throw new wn}return!!(await Mo(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:l,chainId:u}){var g,m,b,y;const f=await this.getProvider();if(!f)throw new wn;const d=c.chains.find(C=>C.id===u);if(!d)throw new Wt(new Do);const h=new Promise(C=>{const v=w=>{"chainId"in w&&w.chainId===u&&(c.emitter.off("change",v),C())};c.emitter.on("change",v)});try{return await Promise.all([f.request({method:"wallet_switchEthereumChain",params:[{chainId:ee(u)}]}).then(async()=>{await this.getChainId()===u&&c.emitter.emit("change",{chainId:u})}),h]),d}catch(C){const v=C;if(v.code===4902||((m=(g=v==null?void 0:v.data)==null?void 0:g.originalError)==null?void 0:m.code)===4902)try{const{default:w,...x}=d.blockExplorers??{};let E;l!=null&&l.blockExplorerUrls?E=l.blockExplorerUrls:w&&(E=[w.url,...Object.values(x).map(S=>S.url)]);let A;(b=l==null?void 0:l.rpcUrls)!=null&&b.length?A=l.rpcUrls:A=[((y=d.rpcUrls.default)==null?void 0:y.http[0])??""];const I={blockExplorerUrls:E,chainId:ee(u),chainName:(l==null?void 0:l.chainName)??d.name,iconUrls:l==null?void 0:l.iconUrls,nativeCurrency:(l==null?void 0:l.nativeCurrency)??d.nativeCurrency,rpcUrls:A};return await Promise.all([f.request({method:"wallet_addEthereumChain",params:[I]}).then(async()=>{if(await this.getChainId()===u)c.emitter.emit("change",{chainId:u});else throw new Ee(new Error("User rejected switch after adding network."))}),h]),d}catch(w){throw new Ee(w)}throw v.code===Ee.code?new Ee(v):new Wt(v)}},async onAccountsChanged(l){var u;if(l.length===0)this.onDisconnect();else if(c.emitter.listenerCount("connect")){const f=(await this.getChainId()).toString();this.onConnect({chainId:f}),t&&await((u=c.storage)==null?void 0:u.removeItem(`${this.id}.disconnected`))}else c.emitter.emit("change",{accounts:l.map(f=>yt(f))})},onChainChanged(l){const u=Number(l);c.emitter.emit("change",{chainId:u})},async onConnect(l){const u=await this.getAccounts();if(u.length===0)return;const f=Number(l.chainId);c.emitter.emit("connect",{accounts:u,chainId:f});const d=await this.getProvider();d&&(i&&(d.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),d.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),d.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),d.on("disconnect",a)))},async onDisconnect(l){const u=await this.getProvider();l&&l.code===1013&&u&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),u&&(s&&(u.removeListener("chainChanged",s),s=void 0),a&&(u.removeListener("disconnect",a),a=void 0),i||(i=this.onConnect.bind(this),u.on("connect",i))))}})}const Ux={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e!=null&&e.coinbaseWalletExtension?e.coinbaseWalletExtension:Ni(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return Ni(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const r of n)if(t[r])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){var t,n;return(t=e==null?void 0:e.phantom)!=null&&t.ethereum?(n=e.phantom)==null?void 0:n.ethereum:Ni(e,"isPhantom")}}};function Ni(e,t){function n(o){return typeof t=="function"?t(o):typeof t=="string"?o[t]:!0}const r=e.ethereum;if(r!=null&&r.providers)return r.providers.find(o=>n(o));if(r&&n(r))return r}function _x(e){if(typeof window>"u")return;const t=n=>e(n.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}function $x(){const e=new Set;let t=[];const n=()=>_x(o=>{t.some(({info:s})=>s.uuid===o.info.uuid)||(t=[...t,o],e.forEach(s=>s(t,{added:[o]})))});let r=n();return{_listeners(){return e},clear(){e.forEach(o=>o([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r==null||r()},findProvider({rdns:o}){return t.find(s=>s.info.rdns===o)},getProviders(){return t},reset(){this.clear(),r==null||r(),r=n()},subscribe(o,{emitImmediately:s}={}){return e.add(o),s&&o(t,{added:t}),()=>e.delete(o)}}}const Wx=e=>(t,n,r)=>{const o=r.subscribe;return r.subscribe=(i,a,c)=>{let l=i;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let f=i(r.getState());l=d=>{const h=i(d);if(!u(f,h)){const g=f;a(f=h,g)}},c!=null&&c.fireImmediately&&a(f,f)}return o(l)},e(t,n,r)},qx=Wx;function zx(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var s;const i=c=>c===null?null:JSON.parse(c,void 0),a=(s=n.getItem(o))!=null?s:null;return a instanceof Promise?a.then(i):i(a)},setItem:(o,s)=>n.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>n.removeItem(o)}}const El=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return El(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return El(r)(n)}}}},Qx=(e,t)=>(n,r,o)=>{let s={storage:zx(()=>localStorage),partialize:m=>m,version:0,merge:(m,b)=>({...b,...m}),...t},i=!1;const a=new Set,c=new Set;let l=s.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...m)},r,o);const u=()=>{const m=s.partialize({...r()});return l.setItem(s.name,{state:m,version:s.version})},f=o.setState;o.setState=(m,b)=>{f(m,b),u()};const d=e((...m)=>{n(...m),u()},r,o);o.getInitialState=()=>d;let h;const g=()=>{var m,b;if(!l)return;i=!1,a.forEach(C=>{var v;return C((v=r())!=null?v:d)});const y=((b=s.onRehydrateStorage)==null?void 0:b.call(s,(m=r())!=null?m:d))||void 0;return El(l.getItem.bind(l))(s.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==s.version){if(s.migrate)return[!0,s.migrate(C.state,C.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var v;const[w,x]=C;if(h=s.merge(x,(v=r())!=null?v:d),n(h,!0),w)return u()}).then(()=>{y==null||y(h,void 0),h=r(),i=!0,c.forEach(C=>C(h))}).catch(C=>{y==null||y(void 0,C)})};return o.persist={setOptions:m=>{s={...s,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},s.skipHydration||g(),h||d},Hx=Qx,Uf=e=>{let t;const n=new Set,r=(l,u)=>{const f=typeof l=="function"?l(t):l;if(!Object.is(f,t)){const d=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,d))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,o,a);return a},pc=e=>e?Uf(e):Uf;var b1={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function s(c,l,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new o(u,f||c,d),g=n?n+l:l;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],h]:c._events[g].push(h):(c._events[g]=h,c._eventsCount++),c}function i(c,l){--c._eventsCount===0?c._events=new r:delete c._events[l]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],u,f;if(this._eventsCount===0)return l;for(f in u=this._events)t.call(u,f)&&l.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},a.prototype.listeners=function(l){var u=n?n+l:l,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,g=new Array(h);d<h;d++)g[d]=f[d].fn;return g},a.prototype.listenerCount=function(l){var u=n?n+l:l,f=this._events[u];return f?f.fn?1:f.length:0},a.prototype.emit=function(l,u,f,d,h,g){var m=n?n+l:l;if(!this._events[m])return!1;var b=this._events[m],y=arguments.length,C,v;if(b.fn){switch(b.once&&this.removeListener(l,b.fn,void 0,!0),y){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,u),!0;case 3:return b.fn.call(b.context,u,f),!0;case 4:return b.fn.call(b.context,u,f,d),!0;case 5:return b.fn.call(b.context,u,f,d,h),!0;case 6:return b.fn.call(b.context,u,f,d,h,g),!0}for(v=1,C=new Array(y-1);v<y;v++)C[v-1]=arguments[v];b.fn.apply(b.context,C)}else{var w=b.length,x;for(v=0;v<w;v++)switch(b[v].once&&this.removeListener(l,b[v].fn,void 0,!0),y){case 1:b[v].fn.call(b[v].context);break;case 2:b[v].fn.call(b[v].context,u);break;case 3:b[v].fn.call(b[v].context,u,f);break;case 4:b[v].fn.call(b[v].context,u,f,d);break;default:if(!C)for(x=1,C=new Array(y-1);x<y;x++)C[x-1]=arguments[x];b[v].fn.apply(b[v].context,C)}}return!0},a.prototype.on=function(l,u,f){return s(this,l,u,f,!1)},a.prototype.once=function(l,u,f){return s(this,l,u,f,!0)},a.prototype.removeListener=function(l,u,f,d){var h=n?n+l:l;if(!this._events[h])return this;if(!u)return i(this,h),this;var g=this._events[h];if(g.fn)g.fn===u&&(!d||g.once)&&(!f||g.context===f)&&i(this,h);else{for(var m=0,b=[],y=g.length;m<y;m++)(g[m].fn!==u||d&&!g[m].once||f&&g[m].context!==f)&&b.push(g[m]);b.length?this._events[h]=b.length===1?b[0]:b:i(this,h)}return this},a.prototype.removeAllListeners=function(l){var u;return l?(u=n?n+l:l,this._events[u]&&i(this,u)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(b1);var Gx=b1.exports;const Vx=Ih(Gx);class Kx{constructor(t){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new Vx})}on(t,n){this._emitter.on(t,n)}once(t,n){this._emitter.once(t,n)}off(t,n){this._emitter.off(t,n)}emit(t,...n){const r=n[0];this._emitter.emit(t,{uid:this.uid,...r})}listenerCount(t){return this._emitter.listenerCount(t)}}function Jx(e){return new Kx(e)}function Yx(e,t){return JSON.parse(e,(n,r)=>{let o=r;return(o==null?void 0:o.__type)==="bigint"&&(o=BigInt(o.value)),(o==null?void 0:o.__type)==="Map"&&(o=new Map(o.value)),(t==null?void 0:t(n,o))??o})}function _f(e,t){return e.slice(0,t).join(".")||"."}function $f(e,t){const{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function Xx(e,t){const n=typeof e=="function",r=typeof t=="function",o=[],s=[];return function(a,c){if(typeof c=="object")if(o.length){const l=$f(o,this);l===0?o[o.length]=this:(o.splice(l),s.splice(l)),s[s.length]=a;const u=$f(o,c);if(u!==0)return r?t.call(this,a,c,_f(s,u)):`[ref=${_f(s,u)}]`}else o[0]=c,s[0]=a;return n?e.call(this,a,c):c}}function Zx(e,t,n,r){return JSON.stringify(e,Xx((o,s)=>{let i=s;return typeof i=="bigint"&&(i={__type:"bigint",value:s.toString()}),i instanceof Map&&(i={__type:"Map",value:Array.from(s.entries())}),(t==null?void 0:t(o,i))??i},r),n??void 0)}function e8(e){const{deserialize:t=Yx,key:n="wagmi",serialize:r=Zx,storage:o=y1}=e;function s(i){return i instanceof Promise?i.then(a=>a).catch(()=>null):i}return{...o,key:n,async getItem(i,a){const c=o.getItem(`${n}.${i}`),l=await s(c);return l?t(l)??null:a??null},async setItem(i,a){const c=`${n}.${i}`;a===null?await s(o.removeItem(c)):await s(o.setItem(c,r(a)))},async removeItem(i){await s(o.removeItem(`${n}.${i}`))}}}const y1={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function t8(){const e=typeof window<"u"&&window.localStorage?window.localStorage:y1;return{getItem(t){return e.getItem(t)},removeItem(t){e.removeItem(t)},setItem(t,n){try{e.setItem(t,n)}catch{}}}}const kl=256;let Ci=kl,Ai;function n8(e=11){if(!Ai||Ci+e>kl*2){Ai="",Ci=0;for(let t=0;t<kl;t++)Ai+=(256+Math.random()*256|0).toString(16).substring(1)}return Ai.substring(Ci,Ci+++e)}function r8(e){const{multiInjectedProviderDiscovery:t=!0,storage:n=e8({storage:t8()}),syncConnectedChain:r=!0,ssr:o=!1,...s}=e,i=typeof window<"u"&&t?$x():void 0,a=pc(()=>s.chains),c=pc(()=>{const x=[],E=new Set;for(const A of s.connectors??[]){const I=l(A);if(x.push(I),!o&&I.rdns){const S=typeof I.rdns=="string"?[I.rdns]:I.rdns;for(const T of S)E.add(T)}}if(!o&&i){const A=i.getProviders();for(const I of A)E.has(I.info.rdns)||x.push(l(u(I)))}return x});function l(x){var I;const E=Jx(n8()),A={...x({emitter:E,chains:a.getState(),storage:n,transports:s.transports}),emitter:E,uid:E.uid};return E.on("connect",v),(I=A.setup)==null||I.call(A),A}function u(x){const{info:E}=x,A=x.provider;return Sa({target:{...E,id:E.rdns,provider:A}})}const f=new Map;function d(x={}){const E=x.chainId??b.getState().chainId,A=a.getState().find(S=>S.id===E);if(x.chainId&&!A)throw new Do;{const S=f.get(b.getState().chainId);if(S&&!A)return S;if(!A)throw new Do}{const S=f.get(E);if(S)return S}let I;if(s.client)I=s.client({chain:A});else{const S=A.id,T=a.getState().map(N=>N.id),R={},M=Object.entries(s);for(const[N,q]of M)if(!(N==="chains"||N==="client"||N==="connectors"||N==="transports"))if(typeof q=="object")if(S in q)R[N]=q[S];else{if(T.some(D=>D in q))continue;R[N]=q}else R[N]=q;I=u1({...R,chain:A,batch:R.batch??{multicall:!0},transport:N=>s.transports[S]({...N,connectors:c})})}return f.set(E,I),I}function h(){return{chainId:a.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let g;const m="0.0.0-canary-";Ri.startsWith(m)?g=Number.parseInt(Ri.replace(m,""),10):g=Number.parseInt(Ri.split(".")[0]??"0",10);const b=pc(qx(n?Hx(h,{migrate(x,E){if(E===g)return x;const A=h(),I=y(x,A.chainId);return{...A,chainId:I}},name:"store",partialize(x){return{connections:{__type:"Map",value:Array.from(x.connections.entries()).map(([E,A])=>{const{id:I,name:S,type:T,uid:R}=A.connector;return[E,{...A,connector:{id:I,name:S,type:T,uid:R}}]})},chainId:x.chainId,current:x.current}},merge(x,E){typeof x=="object"&&x&&"status"in x&&delete x.status;const A=y(x,E.chainId);return{...E,...x,chainId:A}},skipHydration:o,storage:n,version:g}):h));b.setState(h());function y(x,E){return x&&typeof x=="object"&&"chainId"in x&&typeof x.chainId=="number"&&a.getState().some(A=>A.id===x.chainId)?x.chainId:E}r&&b.subscribe(({connections:x,current:E})=>{var A;return E?(A=x.get(E))==null?void 0:A.chainId:void 0},x=>{if(a.getState().some(A=>A.id===x))return b.setState(A=>({...A,chainId:x??A.chainId}))}),i==null||i.subscribe(x=>{const E=new Set,A=new Set;for(const S of c.getState())if(E.add(S.id),S.rdns){const T=typeof S.rdns=="string"?[S.rdns]:S.rdns;for(const R of T)A.add(R)}const I=[];for(const S of x){if(A.has(S.info.rdns))continue;const T=l(u(S));E.has(T.id)||I.push(T)}n&&!b.persist.hasHydrated()||c.setState(S=>[...S,...I],!0)});function C(x){b.setState(E=>{const A=E.connections.get(x.uid);return A?{...E,connections:new Map(E.connections).set(x.uid,{accounts:x.accounts??A.accounts,chainId:x.chainId??A.chainId,connector:A.connector})}:E})}function v(x){b.getState().status==="connecting"||b.getState().status==="reconnecting"||b.setState(E=>{const A=c.getState().find(I=>I.uid===x.uid);return A?(A.emitter.listenerCount("connect")&&A.emitter.off("connect",C),A.emitter.listenerCount("change")||A.emitter.on("change",C),A.emitter.listenerCount("disconnect")||A.emitter.on("disconnect",w),{...E,connections:new Map(E.connections).set(x.uid,{accounts:x.accounts,chainId:x.chainId,connector:A}),current:x.uid,status:"connected"}):E})}function w(x){b.setState(E=>{const A=E.connections.get(x.uid);if(A){const S=A.connector;S.emitter.listenerCount("change")&&A.connector.emitter.off("change",C),S.emitter.listenerCount("disconnect")&&A.connector.emitter.off("disconnect",w),S.emitter.listenerCount("connect")||A.connector.emitter.on("connect",v)}if(E.connections.delete(x.uid),E.connections.size===0)return{...E,connections:new Map,current:null,status:"disconnected"};const I=E.connections.values().next().value;return{...E,connections:new Map(E.connections),current:I.connector.uid}})}return{get chains(){return a.getState()},get connectors(){return c.getState()},storage:n,getClient:d,get state(){return b.getState()},setState(x){let E;typeof x=="function"?E=x(b.getState()):E=x;const A=h();typeof E!="object"&&(E=A),Object.keys(A).some(S=>!(S in E))&&(E=A),b.setState(E,!0)},subscribe(x,E,A){return b.subscribe(x,E,A?{...A,fireImmediately:A.emitImmediately}:void 0)},_internal:{mipd:i,async revalidate(){const x=b.getState(),E=x.connections;let A=x.current;for(const[,I]of E){const S=I.connector;S.isAuthorized&&await S.isAuthorized()||(E.delete(S.uid),A===S.uid&&(A=null))}b.setState(I=>({...I,connections:E,current:A}))},store:b,ssr:!!o,syncConnectedChain:r,transports:s.transports,chains:{setState(x){const E=typeof x=="function"?x(a.getState()):x;if(E.length!==0)return a.setState(E,!0)},subscribe(x){return a.subscribe(x)}},connectors:{providerDetailToConnector:u,setup:l,setState(x){return c.setState(typeof x=="function"?x(c.getState()):x,!0)},subscribe(x){return c.subscribe(x)}},events:{change:C,connect:v,disconnect:w}}}}function o8(e,t){const{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(o=>o.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(o=>{var c;const s=new Set;for(const l of o??[])if(l.rdns){const u=Array.isArray(l.rdns)?l.rdns:[l.rdns];for(const f of u)s.add(f)}const i=[],a=((c=e._internal.mipd)==null?void 0:c.getProviders())??[];for(const l of a){if(s.has(l.info.rdns))continue;const u=e._internal.connectors.providerDetailToConnector(l),f=e._internal.connectors.setup(u);i.push(f)}return[...o,...i]})),r?Px(e):e.storage&&e.setState(o=>({...o,connections:new Map}))}}}function w1(e){var s,i,a;const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const r=(i=(s=e.transports)==null?void 0:s[t.id])==null?void 0:i.call(s,{chain:t});return(((a=r==null?void 0:r.value)==null?void 0:a.transports)||[r]).map(({value:c})=>(c==null?void 0:c.url)||n)}function s8(e){const{children:t,config:n,initialState:r,reconnectOnMount:o=!0}=e,{onMount:s}=o8(n,{initialState:r,reconnectOnMount:o});n._internal.ssr||s();const i=p.useRef(!0);return p.useEffect(()=>{if(i.current&&n._internal.ssr)return s(),()=>{i.current=!1}},[]),t}const v1=p.createContext(void 0);function i8(e){const{children:t,config:n}=e,r={value:n};return p.createElement(s8,e,p.createElement(v1.Provider,r,t))}const a8="2.19.5",c8=()=>`wagmi@${a8}`;class l8 extends Rn{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return c8()}}class u8 extends l8{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function Ne(e={}){const t=e.config??p.useContext(v1);if(!t)throw new u8;return t}function d8(e,t){const{onChange:n}=t;return e._internal.chains.subscribe((r,o)=>{n(r,o)})}var Il={exports:{}},mc={},Ei={exports:{}},gc={};/**
|
|
75
75
|
* @license React
|
|
76
76
|
* use-sync-external-store-shim.production.js
|
|
77
77
|
*
|
|
@@ -79,7 +79,7 @@ ${i6(h)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
|
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the MIT license found in the
|
|
81
81
|
* LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/var
|
|
82
|
+
*/var Wf;function f8(){if(Wf)return gc;Wf=1;var e=p;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,d){var h=d(),g=r({inst:{value:h,getSnapshot:d}}),m=g[0].inst,b=g[1];return s(function(){m.value=h,m.getSnapshot=d,c(m)&&b({inst:m})},[f,h,d]),o(function(){return c(m)&&b({inst:m}),f(function(){c(m)&&b({inst:m})})},[f]),i(h),h}function c(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function l(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:a;return gc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,gc}var bc={};/**
|
|
83
83
|
* @license React
|
|
84
84
|
* use-sync-external-store-shim.development.js
|
|
85
85
|
*
|
|
@@ -87,7 +87,7 @@ ${i6(h)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
|
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the MIT license found in the
|
|
89
89
|
* LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/var
|
|
90
|
+
*/var qf;function h8(){return qf||(qf=1,process.env.NODE_ENV!=="production"&&function(){function e(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function t(h,g){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=g();if(!f){var b=g();s(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}b=i({inst:{value:m,getSnapshot:g}});var y=b[0].inst,C=b[1];return c(function(){y.value=m,y.getSnapshot=g,n(y)&&C({inst:y})},[h,m,g]),a(function(){return n(y)&&C({inst:y}),h(function(){n(y)&&C({inst:y})})},[h]),l(m),m}function n(h){var g=h.getSnapshot;h=h.value;try{var m=g();return!s(h,m)}catch{return!0}}function r(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=p,s=typeof Object.is=="function"?Object.is:e,i=o.useState,a=o.useEffect,c=o.useLayoutEffect,l=o.useDebugValue,u=!1,f=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;bc.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),bc}var zf;function x1(){return zf||(zf=1,process.env.NODE_ENV==="production"?Ei.exports=f8():Ei.exports=h8()),Ei.exports}/**
|
|
91
91
|
* @license React
|
|
92
92
|
* use-sync-external-store-shim/with-selector.production.js
|
|
93
93
|
*
|
|
@@ -95,7 +95,7 @@ ${i6(h)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
|
|
|
95
95
|
*
|
|
96
96
|
* This source code is licensed under the MIT license found in the
|
|
97
97
|
* LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/var Qf;function
|
|
98
|
+
*/var Qf;function p8(){if(Qf)return mc;Qf=1;var e=p,t=x1();function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,c=e.useDebugValue;return mc.useSyncExternalStoreWithSelector=function(l,u,f,d,h){var g=s(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function y(E){if(!C){if(C=!0,v=E,E=d(E),h!==void 0&&m.hasValue){var A=m.value;if(h(A,E))return w=A}return w=E}if(A=w,r(v,E))return A;var I=d(E);return h!==void 0&&h(A,I)?(v=E,A):(v=E,w=I)}var C=!1,v,w,x=f===void 0?null:f;return[function(){return y(u())},x===null?void 0:function(){return y(x())}]},[u,f,d,h]);var b=o(l,g[0],g[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},mc}var yc={};/**
|
|
99
99
|
* @license React
|
|
100
100
|
* use-sync-external-store-shim/with-selector.development.js
|
|
101
101
|
*
|
|
@@ -103,7 +103,7 @@ ${i6(h)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
|
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the MIT license found in the
|
|
105
105
|
* LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/var Hf;function h8(){return Hf||(Hf=1,process.env.NODE_ENV!=="production"&&function(){function e(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=p,n=v1(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,c=t.useDebugValue;yc.useSyncExternalStoreWithSelector=function(l,u,f,d,h){var g=s(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function y(E){if(!C){if(C=!0,v=E,E=d(E),h!==void 0&&m.hasValue){var A=m.value;if(h(A,E))return w=A}return w=E}if(A=w,r(v,E))return A;var I=d(E);return h!==void 0&&h(A,I)?(v=E,A):(v=E,w=I)}var C=!1,v,w,x=f===void 0?null:f;return[function(){return y(u())},x===null?void 0:function(){return y(x())}]},[u,f,d,h]);var b=o(l,g[0],g[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),yc}process.env.NODE_ENV==="production"?Il.exports=f8():Il.exports=h8();var x1=Il.exports;const wc=e=>typeof e=="object"&&!Array.isArray(e);function p8(e,t,n=t,r=Dr){const o=p.useRef([]),s=x1.useSyncExternalStoreWithSelector(e,t,n,i=>i,(i,a)=>{if(wc(i)&&wc(a)&&o.current.length){for(const c of o.current)if(!r(i[c],a[c]))return!1;return!0}return r(i,a)});return p.useMemo(()=>{if(wc(s)){const i={...s};let a={};for(const[c,l]of Object.entries(i))a={...a,[c]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(c)||o.current.push(c),l)}};return Object.defineProperties(i,a),i}return s},[s])}function nt(e={}){const t=Ne(e);return p8(n=>m1(t,{onChange:n}),()=>h1(t))}function C1(e={}){const{onConnect:t,onDisconnect:n}=e,r=Ne(e);p.useEffect(()=>m1(r,{onChange(o,s){if((s.status==="reconnecting"||s.status==="connecting"&&s.address===void 0)&&o.status==="connected"){const{address:i,addresses:a,chain:c,chainId:l,connector:u}=o,f=s.status==="reconnecting"||s.status===void 0;t==null||t({address:i,addresses:a,chain:c,chainId:l,connector:u,isReconnected:f})}else s.status==="connected"&&o.status==="disconnected"&&(n==null||n())}}),[r,t,n])}var Vo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},m8={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Zt,wr,hh,g8=(hh=class{constructor(){Z(this,Zt,m8);Z(this,wr,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&k(this,wr)&&e!==k(this,Zt)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:k(this,Zt),provider:e}),z(this,Zt,e),process.env.NODE_ENV!=="production"&&z(this,wr,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&z(this,wr,!0),k(this,Zt).setTimeout(e,t)}clearTimeout(e){k(this,Zt).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&z(this,wr,!0),k(this,Zt).setInterval(e,t)}clearInterval(e){k(this,Zt).clearInterval(e)}},Zt=new WeakMap,wr=new WeakMap,hh),br=new g8;function b8(e){setTimeout(e,0)}var Lr=typeof window>"u"||"Deno"in globalThis;function Xe(){}function y8(e,t){return typeof e=="function"?e(t):e}function jl(e){return typeof e=="number"&&e>=0&&e!==1/0}function A1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Kn(e,t){return typeof e=="function"?e(t):e}function St(e,t){return typeof e=="function"?e(t):e}function Vf(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Gu(i,t.options))return!1}else if(!Rs(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Gf(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ur(t.options.mutationKey)!==Ur(s))return!1}else if(!Rs(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Gu(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ur)(e)}function Ur(e){return JSON.stringify(e,(t,n)=>Bl(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Rs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Rs(e[n],t[n])):!1}var w8=Object.prototype.hasOwnProperty;function Zi(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Kf(e)&&Kf(t);if(!r&&!(Bl(e)&&Bl(t)))return t;const s=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),a=i.length,c=r?new Array(a):{};let l=0;for(let u=0;u<a;u++){const f=r?u:i[u],d=e[f],h=t[f];if(d===h){c[f]=d,(r?u<s:w8.call(e,f))&&l++;continue}if(d===null||h===null||typeof d!="object"||typeof h!="object"){c[f]=h;continue}const g=Zi(d,h,n+1);c[f]=g,g===d&&l++}return s===a&&l===s?e:c}function ea(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Kf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bl(e){if(!Jf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Jf(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Jf(e){return Object.prototype.toString.call(e)==="[object Object]"}function v8(e){return new Promise(t=>{br.setTimeout(t,e)})}function Sl(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Zi(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Zi(e,t)}return t}function x8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function C8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ta=Symbol();function E1(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ta&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ta?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ku(e,t){return typeof e=="function"?e(...t):!!e}function A8(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var vr,_n,mo,ph,E8=(ph=class extends Vo{constructor(){super();Z(this,vr);Z(this,_n);Z(this,mo);z(this,mo,t=>{if(!Lr&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,_n)||this.setEventListener(k(this,mo))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,_n))==null||t.call(this),z(this,_n,void 0))}setEventListener(t){var n;z(this,mo,t),(n=k(this,_n))==null||n.call(this),z(this,_n,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,vr)!==t&&(z(this,vr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof k(this,vr)=="boolean"?k(this,vr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},vr=new WeakMap,_n=new WeakMap,mo=new WeakMap,ph),Ju=new E8;function Pl(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var k8=b8;function I8(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=k8;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Me=I8(),go,$n,bo,mh,j8=(mh=class extends Vo{constructor(){super();Z(this,go,!0);Z(this,$n);Z(this,bo);z(this,bo,t=>{if(!Lr&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){k(this,$n)||this.setEventListener(k(this,bo))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,$n))==null||t.call(this),z(this,$n,void 0))}setEventListener(t){var n;z(this,bo,t),(n=k(this,$n))==null||n.call(this),z(this,$n,t(this.setOnline.bind(this)))}setOnline(t){k(this,go)!==t&&(z(this,go,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,go)}},go=new WeakMap,$n=new WeakMap,bo=new WeakMap,mh),na=new j8;function B8(e){return Math.min(1e3*2**e,3e4)}function k1(e){return(e??"online")==="online"?na.isOnline():!0}var Ol=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function I1(e){let t=!1,n=0,r;const o=Pl(),s=()=>o.status!=="pending",i=m=>{var b;if(!s()){const y=new Ol(m);d(y),(b=e.onCancel)==null||b.call(e,y)}},a=()=>{t=!0},c=()=>{t=!1},l=()=>Ju.isFocused()&&(e.networkMode==="always"||na.isOnline())&&e.canRun(),u=()=>k1(e.networkMode)&&e.canRun(),f=m=>{s()||(r==null||r(),o.resolve(m))},d=m=>{s()||(r==null||r(),o.reject(m))},h=()=>new Promise(m=>{var b;r=y=>{(s()||l())&&m(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;r=void 0,s()||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(s())return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var E;if(s())return;const C=e.retry??(Lr?0:3),v=e.retryDelay??B8,w=typeof v=="function"?v(n,y):v,x=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,y);if(t||!x){d(y);return}n++,(E=e.onFail)==null||E.call(e,n,y),v8(w).then(()=>l()?void 0:h()).then(()=>{t?d(y):g()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:c,canStart:u,start:()=>(u()?g():h().then(g),o)}}var xr,gh,j1=(gh=class{constructor(){Z(this,xr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),jl(this.gcTime)&&z(this,xr,br.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Lr?1/0:5*60*1e3))}clearGcTimeout(){k(this,xr)&&(br.clearTimeout(k(this,xr)),z(this,xr,void 0))}},xr=new WeakMap,gh),Cr,yo,Bt,Ar,Le,_s,Er,Lt,gn,bh,S8=(bh=class extends j1{constructor(t){super();Z(this,Lt);Z(this,Cr);Z(this,yo);Z(this,Bt);Z(this,Ar);Z(this,Le);Z(this,_s);Z(this,Er);z(this,Er,!1),z(this,_s,t.defaultOptions),this.setOptions(t.options),this.observers=[],z(this,Ar,t.client),z(this,Bt,k(this,Ar).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,z(this,Cr,Xf(this.options)),this.state=t.state??k(this,Cr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,Le))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,_s),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Xf(this.options);n.data!==void 0&&(this.setState(Yf(n.data,n.dataUpdatedAt)),z(this,Cr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Bt).remove(this)}setData(t,n){const r=Sl(this.state.data,t,this.options);return Y(this,Lt,gn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Y(this,Lt,gn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=k(this,Le))==null?void 0:r.promise;return(o=k(this,Le))==null||o.cancel(t),n?n.then(Xe).catch(Xe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,Cr))}isActive(){return this.observers.some(t=>St(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ta||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Kn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!A1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,Le))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,Le))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Bt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(k(this,Le)&&(k(this,Er)?k(this,Le).cancel({revert:!0}):k(this,Le).cancelRetry()),this.scheduleGc()),k(this,Bt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Y(this,Lt,gn).call(this,{type:"invalidate"})}async fetch(t,n){var c,l,u,f,d,h,g,m,b,y,C,v;if(this.state.fetchStatus!=="idle"&&((c=k(this,Le))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,Le))return k(this,Le).continueRetry(),k(this,Le).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(x=>x.options.queryFn);w&&this.setOptions(w.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(z(this,Er,!0),r.signal)})},s=()=>{const w=E1(this.options,n),E=(()=>{const A={client:k(this,Ar),queryKey:this.queryKey,meta:this.meta};return o(A),A})();return z(this,Er,!1),this.options.persister?this.options.persister(w,E,this):w(E)},a=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:k(this,Ar),state:this.state,fetchFn:s};return o(w),w})();(l=this.options.behavior)==null||l.onFetch(a,this),z(this,yo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&Y(this,Lt,gn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta}),z(this,Le,I1({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:w=>{w instanceof Ol&&w.revert&&this.setState({...k(this,yo),fetchStatus:"idle"}),r.abort()},onFail:(w,x)=>{Y(this,Lt,gn).call(this,{type:"failed",failureCount:w,error:x})},onPause:()=>{Y(this,Lt,gn).call(this,{type:"pause"})},onContinue:()=>{Y(this,Lt,gn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const w=await k(this,Le).start();if(w===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(w),(h=(d=k(this,Bt).config).onSuccess)==null||h.call(d,w,this),(m=(g=k(this,Bt).config).onSettled)==null||m.call(g,w,this.state.error,this),w}catch(w){if(w instanceof Ol){if(w.silent)return k(this,Le).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Y(this,Lt,gn).call(this,{type:"error",error:w}),(y=(b=k(this,Bt).config).onError)==null||y.call(b,w,this),(v=(C=k(this,Bt).config).onSettled)==null||v.call(C,this.state.data,w,this),w}finally{this.scheduleGc()}}},Cr=new WeakMap,yo=new WeakMap,Bt=new WeakMap,Ar=new WeakMap,Le=new WeakMap,_s=new WeakMap,Er=new WeakMap,Lt=new WeakSet,gn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...B1(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...Yf(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return z(this,yo,t.manual?o:void 0),o;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Me.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Bt).notify({query:this,type:"updated",action:t})})},bh);function B1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:k1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Yf(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Xf(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var at,pe,$s,Ke,kr,wo,vn,qn,qs,vo,xo,Ir,jr,Wn,Co,ve,as,Tl,Rl,Nl,Fl,Ml,Dl,Ll,S1,yh,P8=(yh=class extends Vo{constructor(t,n){super();Z(this,ve);Z(this,at);Z(this,pe);Z(this,$s);Z(this,Ke);Z(this,kr);Z(this,wo);Z(this,vn);Z(this,qn);Z(this,qs);Z(this,vo);Z(this,xo);Z(this,Ir);Z(this,jr);Z(this,Wn);Z(this,Co,new Set);this.options=n,z(this,at,t),z(this,qn,null),z(this,vn,Pl()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,pe).addObserver(this),Zf(k(this,pe),this.options)?Y(this,ve,as).call(this):this.updateResult(),Y(this,ve,Fl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ul(k(this,pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ul(k(this,pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Y(this,ve,Ml).call(this),Y(this,ve,Dl).call(this),k(this,pe).removeObserver(this)}setOptions(t){const n=this.options,r=k(this,pe);if(this.options=k(this,at).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof St(this.options.enabled,k(this,pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Y(this,ve,Ll).call(this),k(this,pe).setOptions(this.options),n._defaulted&&!ea(this.options,n)&&k(this,at).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,pe),observer:this});const o=this.hasListeners();o&&e0(k(this,pe),r,this.options,n)&&Y(this,ve,as).call(this),this.updateResult(),o&&(k(this,pe)!==r||St(this.options.enabled,k(this,pe))!==St(n.enabled,k(this,pe))||Kn(this.options.staleTime,k(this,pe))!==Kn(n.staleTime,k(this,pe)))&&Y(this,ve,Tl).call(this);const s=Y(this,ve,Rl).call(this);o&&(k(this,pe)!==r||St(this.options.enabled,k(this,pe))!==St(n.enabled,k(this,pe))||s!==k(this,Wn))&&Y(this,ve,Nl).call(this,s)}getOptimisticResult(t){const n=k(this,at).getQueryCache().build(k(this,at),t),r=this.createResult(n,t);return T8(this,r)&&(z(this,Ke,r),z(this,wo,this.options),z(this,kr,k(this,pe).state)),r}getCurrentResult(){return k(this,Ke)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,vn).status==="pending"&&k(this,vn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){k(this,Co).add(t)}getCurrentQuery(){return k(this,pe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=k(this,at).defaultQueryOptions(t),r=k(this,at).getQueryCache().build(k(this,at),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Y(this,ve,as).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,Ke)))}createResult(t,n){var S;const r=k(this,pe),o=this.options,s=k(this,Ke),i=k(this,kr),a=k(this,wo),l=t!==r?t.state:k(this,$s),{state:u}=t;let f={...u},d=!1,h;if(n._optimisticResults){const T=this.hasListeners(),R=!T&&Zf(t,n),M=T&&e0(t,r,n,o);(R||M)&&(f={...f,...B1(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:b}=f;h=f.data;let y=!1;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let T;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(T=s.data,y=!0):T=typeof n.placeholderData=="function"?n.placeholderData((S=k(this,xo))==null?void 0:S.state.data,k(this,xo)):n.placeholderData,T!==void 0&&(b="success",h=Sl(s==null?void 0:s.data,T,n),d=!0)}if(n.select&&h!==void 0&&!y)if(s&&h===(i==null?void 0:i.data)&&n.select===k(this,qs))h=k(this,vo);else try{z(this,qs,n.select),h=n.select(h),h=Sl(s==null?void 0:s.data,h,n),z(this,vo,h),z(this,qn,null)}catch(T){z(this,qn,T)}k(this,qn)&&(g=k(this,qn),h=k(this,vo),m=Date.now(),b="error");const C=f.fetchStatus==="fetching",v=b==="pending",w=b==="error",x=v&&C,E=h!==void 0,I={status:b,fetchStatus:f.fetchStatus,isPending:v,isSuccess:b==="success",isError:w,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:C,isRefetching:C&&!v,isLoadingError:w&&!E,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&E,isStale:Yu(t,n),refetch:this.refetch,promise:k(this,vn),isEnabled:St(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=I.data!==void 0,R=I.status==="error"&&!T,M=P=>{R?P.reject(I.error):T&&P.resolve(I.data)},N=()=>{const P=z(this,vn,I.promise=Pl());M(P)},W=k(this,vn);switch(W.status){case"pending":t.queryHash===r.queryHash&&M(W);break;case"fulfilled":(R||I.data!==W.value)&&N();break;case"rejected":(!R||I.error!==W.reason)&&N();break}}return I}updateResult(){const t=k(this,Ke),n=this.createResult(k(this,pe),this.options);if(z(this,kr,k(this,pe).state),z(this,wo,this.options),k(this,kr).data!==void 0&&z(this,xo,k(this,pe)),ea(n,t))return;z(this,Ke,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!k(this,Co).size)return!0;const i=new Set(s??k(this,Co));return this.options.throwOnError&&i.add("error"),Object.keys(k(this,Ke)).some(a=>{const c=a;return k(this,Ke)[c]!==t[c]&&i.has(c)})};Y(this,ve,S1).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Y(this,ve,Fl).call(this)}},at=new WeakMap,pe=new WeakMap,$s=new WeakMap,Ke=new WeakMap,kr=new WeakMap,wo=new WeakMap,vn=new WeakMap,qn=new WeakMap,qs=new WeakMap,vo=new WeakMap,xo=new WeakMap,Ir=new WeakMap,jr=new WeakMap,Wn=new WeakMap,Co=new WeakMap,ve=new WeakSet,as=function(t){Y(this,ve,Ll).call(this);let n=k(this,pe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Xe)),n},Tl=function(){Y(this,ve,Ml).call(this);const t=Kn(this.options.staleTime,k(this,pe));if(Lr||k(this,Ke).isStale||!jl(t))return;const r=A1(k(this,Ke).dataUpdatedAt,t)+1;z(this,Ir,br.setTimeout(()=>{k(this,Ke).isStale||this.updateResult()},r))},Rl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,pe)):this.options.refetchInterval)??!1},Nl=function(t){Y(this,ve,Dl).call(this),z(this,Wn,t),!(Lr||St(this.options.enabled,k(this,pe))===!1||!jl(k(this,Wn))||k(this,Wn)===0)&&z(this,jr,br.setInterval(()=>{(this.options.refetchIntervalInBackground||Ju.isFocused())&&Y(this,ve,as).call(this)},k(this,Wn)))},Fl=function(){Y(this,ve,Tl).call(this),Y(this,ve,Nl).call(this,Y(this,ve,Rl).call(this))},Ml=function(){k(this,Ir)&&(br.clearTimeout(k(this,Ir)),z(this,Ir,void 0))},Dl=function(){k(this,jr)&&(br.clearInterval(k(this,jr)),z(this,jr,void 0))},Ll=function(){const t=k(this,at).getQueryCache().build(k(this,at),this.options);if(t===k(this,pe))return;const n=k(this,pe);z(this,pe,t),z(this,$s,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},S1=function(t){Me.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(k(this,Ke))}),k(this,at).getQueryCache().notify({query:k(this,pe),type:"observerResultsUpdated"})})},yh);function O8(e,t){return St(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Zf(e,t){return O8(e,t)||e.state.data!==void 0&&Ul(e,t,t.refetchOnMount)}function Ul(e,t,n){if(St(t.enabled,e)!==!1&&Kn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Yu(e,t)}return!1}function e0(e,t,n,r){return(e!==t||St(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Yu(e,n)}function Yu(e,t){return St(t.enabled,e)!==!1&&e.isStaleByTime(Kn(t.staleTime,e))}function T8(e,t){return!ea(e.getCurrentResult(),t)}function t0(e){return{onFetch:(t,n)=>{var u,f,d,h,g;const r=t.options,o=(d=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],i=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let m=!1;const b=v=>{A8(v,()=>t.signal,()=>m=!0)},y=E1(t.options,t.fetchOptions),C=async(v,w,x)=>{if(m)return Promise.reject();if(w==null&&v.pages.length)return Promise.resolve(v);const A=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:w,direction:x?"backward":"forward",meta:t.options.meta};return b(R),R})(),I=await y(A),{maxPages:S}=t.options,T=x?C8:x8;return{pages:T(v.pages,I,S),pageParams:T(v.pageParams,w,S)}};if(o&&s.length){const v=o==="backward",w=v?R8:n0,x={pages:s,pageParams:i},E=w(r,x);a=await C(x,E,v)}else{const v=e??s.length;do{const w=c===0?i[0]??r.initialPageParam:n0(r,a);if(c>0&&w==null)break;a=await C(a,w),c++}while(c<v)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function n0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function R8(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ws,en,He,Br,tn,Dn,wh,N8=(wh=class extends j1{constructor(t){super();Z(this,tn);Z(this,Ws);Z(this,en);Z(this,He);Z(this,Br);z(this,Ws,t.client),this.mutationId=t.mutationId,z(this,He,t.mutationCache),z(this,en,[]),this.state=t.state||P1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,en).includes(t)||(k(this,en).push(t),this.clearGcTimeout(),k(this,He).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){z(this,en,k(this,en).filter(n=>n!==t)),this.scheduleGc(),k(this,He).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,en).length||(this.state.status==="pending"?this.scheduleGc():k(this,He).remove(this))}continue(){var t;return((t=k(this,Br))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,c,l,u,f,d,h,g,m,b,y,C,v,w,x,E,A;const n=()=>{Y(this,tn,Dn).call(this,{type:"continue"})},r={client:k(this,Ws),meta:this.options.meta,mutationKey:this.options.mutationKey};z(this,Br,I1({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(I,S)=>{Y(this,tn,Dn).call(this,{type:"failed",failureCount:I,error:S})},onPause:()=>{Y(this,tn,Dn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,He).canRun(this)}));const o=this.state.status==="pending",s=!k(this,Br).canStart();try{if(o)n();else{Y(this,tn,Dn).call(this,{type:"pending",variables:t,isPaused:s}),k(this,He).config.onMutate&&await k(this,He).config.onMutate(t,this,r);const S=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,t,r));S!==this.state.context&&Y(this,tn,Dn).call(this,{type:"pending",context:S,variables:t,isPaused:s})}const I=await k(this,Br).start();return await((l=(c=k(this,He).config).onSuccess)==null?void 0:l.call(c,I,t,this.state.context,this,r)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,I,t,this.state.context,r)),await((h=(d=k(this,He).config).onSettled)==null?void 0:h.call(d,I,null,this.state.variables,this.state.context,this,r)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,I,null,t,this.state.context,r)),Y(this,tn,Dn).call(this,{type:"success",data:I}),I}catch(I){try{await((y=(b=k(this,He).config).onError)==null?void 0:y.call(b,I,t,this.state.context,this,r))}catch(S){Promise.reject(S)}try{await((v=(C=this.options).onError)==null?void 0:v.call(C,I,t,this.state.context,r))}catch(S){Promise.reject(S)}try{await((x=(w=k(this,He).config).onSettled)==null?void 0:x.call(w,void 0,I,this.state.variables,this.state.context,this,r))}catch(S){Promise.reject(S)}try{await((A=(E=this.options).onSettled)==null?void 0:A.call(E,void 0,I,t,this.state.context,r))}catch(S){Promise.reject(S)}throw Y(this,tn,Dn).call(this,{type:"error",error:I}),I}finally{k(this,He).runNext(this)}}},Ws=new WeakMap,en=new WeakMap,He=new WeakMap,Br=new WeakMap,tn=new WeakSet,Dn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Me.batch(()=>{k(this,en).forEach(r=>{r.onMutationUpdate(t)}),k(this,He).notify({mutation:this,type:"updated",action:t})})},wh);function P1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xn,Ut,zs,vh,F8=(vh=class extends Vo{constructor(t={}){super();Z(this,xn);Z(this,Ut);Z(this,zs);this.config=t,z(this,xn,new Set),z(this,Ut,new Map),z(this,zs,0)}build(t,n,r){const o=new N8({client:t,mutationCache:this,mutationId:++hi(this,zs)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){k(this,xn).add(t);const n=ki(t);if(typeof n=="string"){const r=k(this,Ut).get(n);r?r.push(t):k(this,Ut).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,xn).delete(t)){const n=ki(t);if(typeof n=="string"){const r=k(this,Ut).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&k(this,Ut).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ki(t);if(typeof n=="string"){const r=k(this,Ut).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=ki(t);if(typeof n=="string"){const o=(r=k(this,Ut).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Me.batch(()=>{k(this,xn).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,xn).clear(),k(this,Ut).clear()})}getAll(){return Array.from(k(this,xn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Gf(n,r))}findAll(t={}){return this.getAll().filter(n=>Gf(t,n))}notify(t){Me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Me.batch(()=>Promise.all(t.map(n=>n.continue().catch(Xe))))}},xn=new WeakMap,Ut=new WeakMap,zs=new WeakMap,vh);function ki(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Cn,zn,ct,An,Sn,Fi,_l,xh,M8=(xh=class extends Vo{constructor(t,n){super();Z(this,Sn);Z(this,Cn);Z(this,zn);Z(this,ct);Z(this,An);z(this,Cn,t),this.setOptions(n),this.bindMethods(),Y(this,Sn,Fi).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=k(this,Cn).defaultMutationOptions(t),ea(this.options,n)||k(this,Cn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,ct),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ur(n.mutationKey)!==Ur(this.options.mutationKey)?this.reset():((r=k(this,ct))==null?void 0:r.state.status)==="pending"&&k(this,ct).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=k(this,ct))==null||t.removeObserver(this)}onMutationUpdate(t){Y(this,Sn,Fi).call(this),Y(this,Sn,_l).call(this,t)}getCurrentResult(){return k(this,zn)}reset(){var t;(t=k(this,ct))==null||t.removeObserver(this),z(this,ct,void 0),Y(this,Sn,Fi).call(this),Y(this,Sn,_l).call(this)}mutate(t,n){var r;return z(this,An,n),(r=k(this,ct))==null||r.removeObserver(this),z(this,ct,k(this,Cn).getMutationCache().build(k(this,Cn),this.options)),k(this,ct).addObserver(this),k(this,ct).execute(t)}},Cn=new WeakMap,zn=new WeakMap,ct=new WeakMap,An=new WeakMap,Sn=new WeakSet,Fi=function(){var n;const t=((n=k(this,ct))==null?void 0:n.state)??P1();z(this,zn,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},_l=function(t){Me.batch(()=>{var n,r,o,s,i,a,c,l;if(k(this,An)&&this.hasListeners()){const u=k(this,zn).variables,f=k(this,zn).context,d={client:k(this,Cn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(n=k(this,An)).onSuccess)==null||r.call(n,t.data,u,f,d)}catch(h){Promise.reject(h)}try{(s=(o=k(this,An)).onSettled)==null||s.call(o,t.data,null,u,f,d)}catch(h){Promise.reject(h)}}else if((t==null?void 0:t.type)==="error"){try{(a=(i=k(this,An)).onError)==null||a.call(i,t.error,u,f,d)}catch(h){Promise.reject(h)}try{(l=(c=k(this,An)).onSettled)==null||l.call(c,void 0,t.error,u,f,d)}catch(h){Promise.reject(h)}}}this.listeners.forEach(u=>{u(k(this,zn))})})},xh),nn,Ch,D8=(Ch=class extends Vo{constructor(t={}){super();Z(this,nn);this.config=t,z(this,nn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Gu(o,n);let i=this.get(s);return i||(i=new S8({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){k(this,nn).has(t.queryHash)||(k(this,nn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=k(this,nn).get(t.queryHash);n&&(t.destroy(),n===t&&k(this,nn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,nn).get(t)}getAll(){return[...k(this,nn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Vf(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Vf(t,r)):n}notify(t){Me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nn=new WeakMap,Ch),je,Qn,Hn,Ao,Eo,Vn,ko,Io,Ah,L8=(Ah=class{constructor(e={}){Z(this,je);Z(this,Qn);Z(this,Hn);Z(this,Ao);Z(this,Eo);Z(this,Vn);Z(this,ko);Z(this,Io);z(this,je,e.queryCache||new D8),z(this,Qn,e.mutationCache||new F8),z(this,Hn,e.defaultOptions||{}),z(this,Ao,new Map),z(this,Eo,new Map),z(this,Vn,0)}mount(){hi(this,Vn)._++,k(this,Vn)===1&&(z(this,ko,Ju.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,je).onFocus())})),z(this,Io,na.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,je).onOnline())})))}unmount(){var e,t;hi(this,Vn)._--,k(this,Vn)===0&&((e=k(this,ko))==null||e.call(this),z(this,ko,void 0),(t=k(this,Io))==null||t.call(this),z(this,Io,void 0))}isFetching(e){return k(this,je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,Qn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=k(this,je).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Kn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return k(this,je).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=k(this,je).get(r.queryHash),s=o==null?void 0:o.state.data,i=y8(t,s);if(i!==void 0)return k(this,je).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Me.batch(()=>k(this,je).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=k(this,je);Me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=k(this,je);return Me.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Me.batch(()=>k(this,je).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Xe).catch(Xe)}invalidateQueries(e,t={}){return Me.batch(()=>(k(this,je).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Me.batch(()=>k(this,je).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Xe)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Xe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=k(this,je).build(this,t);return n.isStaleByTime(Kn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xe).catch(Xe)}fetchInfiniteQuery(e){return e.behavior=t0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xe).catch(Xe)}ensureInfiniteQueryData(e){return e.behavior=t0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return na.isOnline()?k(this,Qn).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,je)}getMutationCache(){return k(this,Qn)}getDefaultOptions(){return k(this,Hn)}setDefaultOptions(e){z(this,Hn,e)}setQueryDefaults(e,t){k(this,Ao).set(Ur(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Ao).values()],n={};return t.forEach(r=>{Rs(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){k(this,Eo).set(Ur(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Eo).values()],n={};return t.forEach(r=>{Rs(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,Hn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Gu(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ta&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,Hn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,je).clear(),k(this,Qn).clear()}},je=new WeakMap,Qn=new WeakMap,Hn=new WeakMap,Ao=new WeakMap,Eo=new WeakMap,Vn=new WeakMap,ko=new WeakMap,Io=new WeakMap,Ah);function U8(e,t){return Zi(e,t)}function _8(e){return JSON.stringify(e,(t,n)=>$8(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):typeof n=="bigint"?n.toString():n)}function $8(e){if(!r0(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!r0(n)||!n.hasOwnProperty("isPrototypeOf"))}function r0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pa(e){const{_defaulted:t,behavior:n,gcTime:r,initialData:o,initialDataUpdatedAt:s,maxPages:i,meta:a,networkMode:c,queryFn:l,queryHash:u,queryKey:f,queryKeyHashFn:d,retry:h,retryDelay:g,structuralSharing:m,getPreviousPageParam:b,getNextPageParam:y,initialPageParam:C,_optimisticResults:v,enabled:w,notifyOnChangeProps:x,placeholderData:E,refetchInterval:A,refetchIntervalInBackground:I,refetchOnMount:S,refetchOnReconnect:T,refetchOnWindowFocus:R,retryOnMount:M,select:N,staleTime:W,suspense:P,throwOnError:D,config:_,connector:F,query:U,...q}=e;return q}function q8(e){return{mutationFn(t){return fx(e,t)},mutationKey:["connect"]}}function W8(e){return{mutationFn(t){return xx(e,t)},mutationKey:["disconnect"]}}function z8(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...s}=n[1];if(!r)throw new Error("address is required");return await Ex(e,{...s,address:r})??null},queryKey:Q8(t)}}function Q8(e={}){return["balance",Pa(e)]}function H8(e,t={}){return{async queryFn({queryKey:n}){const{name:r,scopeKey:o,...s}=n[1];if(!r)throw new Error("name is required");return Ix(e,{...s,name:r})},queryKey:V8(t)}}function V8(e={}){return["ensAvatar",Pa(e)]}function G8(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...s}=n[1];if(!r)throw new Error("address is required");return jx(e,{...s,address:r})},queryKey:K8(t)}}function K8(e={}){return["ensName",Pa(e)]}function J8(e,t={}){return{async queryFn({queryKey:n}){const r=t.abi;if(!r)throw new Error("abi is required");const{functionName:o,scopeKey:s,...i}=n[1],a=(()=>{const c=n[1];if(c.address)return{address:c.address};if(c.code)return{code:c.code};throw new Error("address or code is required")})();if(!o)throw new Error("functionName is required");return p1(e,{abi:r,functionName:o,args:i.args,...a,...i})},queryKey:Y8(t)}}function Y8(e={}){const{abi:t,...n}=e;return["readContract",Pa(n)]}function X8(e){return{mutationFn(t){return Sx(e,t)},mutationKey:["signMessage"]}}function Z8(e){return{mutationFn(t){return Ox(e,t)},mutationKey:["switchChain"]}}function eC(e){return{mutationFn(t){return Mx(e,t)},mutationKey:["writeContract"]}}var O1=J.createContext(void 0),T1=e=>{const t=J.useContext(O1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tC=({client:e,children:t})=>(J.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),O.jsx(O1.Provider,{value:e,children:t})),R1=J.createContext(!1),nC=()=>J.useContext(R1);R1.Provider;function rC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var oC=J.createContext(rC()),sC=()=>J.useContext(oC),iC=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Ku(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},aC=e=>{J.useEffect(()=>{e.clearReset()},[e])},cC=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ku(n,[e.error,r])),lC=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},uC=(e,t)=>e.isLoading&&e.isFetching&&!t,dC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,o0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function fC(e,t,n){var d,h,g,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=nC(),o=sC(),s=T1(),i=s.defaultQueryOptions(e);(h=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,i);const a=s.getQueryCache().get(i.queryHash);process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),i._optimisticResults=r?"isRestoring":"optimistic",lC(i),iC(i,o,a),aC(o);const c=!s.getQueryCache().get(i.queryHash),[l]=J.useState(()=>new t(s,i)),u=l.getOptimisticResult(i),f=!r&&e.subscribed!==!1;if(J.useSyncExternalStore(J.useCallback(b=>{const y=f?l.subscribe(Me.batchCalls(b)):Xe;return l.updateResult(),y},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),J.useEffect(()=>{l.setOptions(i)},[i,l]),dC(i,u))throw o0(i,l,o);if(cC({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw u.error;if((m=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||m.call(g,i,u),i.experimental_prefetchInRender&&!Lr&&uC(u,r)){const b=c?o0(i,l,o):a==null?void 0:a.promise;b==null||b.catch(Xe).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function N1(e,t){return fC(e,P8)}function ai(e,t){const n=T1(),[r]=J.useState(()=>new M8(n,e));J.useEffect(()=>{r.setOptions(e)},[r,e]);const o=J.useSyncExternalStore(J.useCallback(i=>r.subscribe(Me.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=J.useCallback((i,a)=>{r.mutate(i,a).catch(Xe)},[r]);if(o.error&&Ku(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function Oa(e){const t=N1({...e,queryKeyHashFn:_8});return t.queryKey=e.queryKey,t}function Ta(e={}){const t=Ne(e);return p.useSyncExternalStore(n=>Tx(t,{onChange:n}),()=>Mf(t),()=>Mf(t))}function Xu(e={}){const{address:t,query:n={}}=e,r=Ne(e),o=Ta({config:r}),s=z8(r,{...e,chainId:e.chainId??o}),i=!!(t&&(n.enabled??!0));return Oa({...n,...s,enabled:i})}function hC(e={}){const t=Ne(e);return p.useSyncExternalStore(n=>l8(t,{onChange:n}),()=>Df(t),()=>Df(t))}function pC(e={}){const t=Ne(e);return p.useSyncExternalStore(n=>Nx(t,{onChange:n}),()=>Lf(t),()=>Lf(t))}function mC(e={}){const{mutation:t}=e,n=Ne(e),r=q8(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return p.useEffect(()=>n.subscribe(({status:a})=>a,(a,c)=>{c==="connected"&&a==="disconnected"&&i.reset()}),[n,i.reset]),{...i,connect:o,connectAsync:s,connectors:pC({config:n})}}function gC(e={}){const t=Ne(e);return p.useSyncExternalStore(n=>Rx(t,{onChange:n}),()=>Cl(t),()=>Cl(t))}function Zu(e={}){const{mutation:t}=e,n=Ne(e),r=W8(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return{...i,connectors:gC({config:n}).map(a=>a.connector),disconnect:o,disconnectAsync:s}}function bC(e={}){const{name:t,query:n={}}=e,r=Ne(e),o=Ta({config:r}),s=H8(r,{...e,chainId:e.chainId??o}),i=!!(t&&(n.enabled??!0));return Oa({...n,...s,enabled:i})}function yC(e={}){const{address:t,query:n={}}=e,r=Ne(e),o=Ta({config:r}),s=G8(r,{...e,chainId:e.chainId??o}),i=!!(t&&(n.enabled??!0));return Oa({...n,...s,enabled:i})}function wC(e={}){const t=Ne(e);return x1.useSyncExternalStoreWithSelector(n=>Fx(t,{onChange:n}),()=>Al(t,e),()=>Al(t,e),n=>n,(n,r)=>(n==null?void 0:n.uid)===(r==null?void 0:r.uid))}function vC(e={}){const{abi:t,address:n,functionName:r,query:o={}}=e,s=e.code,i=Ne(e),a=Ta({config:i}),c=J8(i,{...e,chainId:e.chainId??a}),l=!!((n||s)&&t&&r&&(o.enabled??!0));return Oa({...o,...c,enabled:l,structuralSharing:o.structuralSharing??U8})}function xC(e={}){const{mutation:t}=e,n=Ne(e),r=X8(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return{...i,signMessage:o,signMessageAsync:s}}function CC(e={}){const{mutation:t}=e,n=Ne(e),r=Z8(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return{...i,chains:hC({config:n}),switchChain:o,switchChainAsync:s}}function AC(e={}){const{mutation:t}=e,n=Ne(e),r=eC(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return{...i,writeContract:o,writeContractAsync:s}}var s0='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',EC={rounded:`SFRounded, ui-rounded, "SF Pro Rounded", ${s0}`,system:s0},rs={large:{actionButton:"9999px",connectButton:"12px",modal:"24px",modalMobile:"28px"},medium:{actionButton:"10px",connectButton:"8px",modal:"16px",modalMobile:"18px"},none:{actionButton:"0px",connectButton:"0px",modal:"0px",modalMobile:"0px"},small:{actionButton:"4px",connectButton:"4px",modal:"8px",modalMobile:"8px"}},kC={large:{modalOverlay:"blur(20px)"},none:{modalOverlay:"blur(0px)"},small:{modalOverlay:"blur(4px)"}},F1=({borderRadius:e="large",fontStack:t="rounded",overlayBlur:n="none"})=>({blurs:{modalOverlay:kC[n].modalOverlay},fonts:{body:EC[t]},radii:{actionButton:rs[e].actionButton,connectButton:rs[e].connectButton,menuButton:rs[e].connectButton,modal:rs[e].modal,modalMobile:rs[e].modalMobile}}),Mi="#1A1B1F",M1={blue:{accentColor:"#3898FF",accentColorForeground:"#FFF"},green:{accentColor:"#4BD166",accentColorForeground:Mi},orange:{accentColor:"#FF983D",accentColorForeground:Mi},pink:{accentColor:"#FF7AB8",accentColorForeground:Mi},purple:{accentColor:"#7A70FF",accentColorForeground:"#FFF"},red:{accentColor:"#FF6257",accentColorForeground:"#FFF"}},i0=M1.blue,D1=({accentColor:e=i0.accentColor,accentColorForeground:t=i0.accentColorForeground,...n}={})=>({...F1(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(255, 255, 255, 0.04)",actionButtonBorderMobile:"rgba(255, 255, 255, 0.08)",actionButtonSecondaryBackground:"rgba(255, 255, 255, 0.08)",closeButton:"rgba(224, 232, 255, 0.6)",closeButtonBackground:"rgba(255, 255, 255, 0.08)",connectButtonBackground:Mi,connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.15))",connectButtonText:"#FFF",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(0, 0, 0, 0) 9.49%, rgba(120, 120, 120, 0.2) 71.04%), #1A1B1F",downloadTopCardBackground:"linear-gradient(126deg, rgba(120, 120, 120, 0.2) 9.49%, rgba(0, 0, 0, 0) 71.04%), #1A1B1F",error:"#FF494A",generalBorder:"rgba(255, 255, 255, 0.08)",generalBorderDim:"rgba(255, 255, 255, 0.04)",menuItemBackground:"rgba(224, 232, 255, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.5)",modalBackground:"#1A1B1F",modalBorder:"rgba(255, 255, 255, 0.08)",modalText:"#FFF",modalTextDim:"rgba(224, 232, 255, 0.3)",modalTextSecondary:"rgba(255, 255, 255, 0.6)",profileAction:"rgba(224, 232, 255, 0.1)",profileActionHover:"rgba(224, 232, 255, 0.2)",profileForeground:"rgba(224, 232, 255, 0.05)",selectedOptionBorder:"rgba(224, 232, 255, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.24)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});D1.accentColors=M1;var L1={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},a0=L1.blue,ed=({accentColor:e=a0.accentColor,accentColorForeground:t=a0.accentColorForeground,...n}={})=>({...F1(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackground:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});ed.accentColors=L1;var $l=`{
|
|
106
|
+
*/var Hf;function m8(){return Hf||(Hf=1,process.env.NODE_ENV!=="production"&&function(){function e(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=p,n=x1(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,c=t.useDebugValue;yc.useSyncExternalStoreWithSelector=function(l,u,f,d,h){var g=s(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function y(E){if(!C){if(C=!0,v=E,E=d(E),h!==void 0&&m.hasValue){var A=m.value;if(h(A,E))return w=A}return w=E}if(A=w,r(v,E))return A;var I=d(E);return h!==void 0&&h(A,I)?(v=E,A):(v=E,w=I)}var C=!1,v,w,x=f===void 0?null:f;return[function(){return y(u())},x===null?void 0:function(){return y(x())}]},[u,f,d,h]);var b=o(l,g[0],g[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),yc}process.env.NODE_ENV==="production"?Il.exports=p8():Il.exports=m8();var C1=Il.exports;const wc=e=>typeof e=="object"&&!Array.isArray(e);function g8(e,t,n=t,r=Dr){const o=p.useRef([]),s=C1.useSyncExternalStoreWithSelector(e,t,n,i=>i,(i,a)=>{if(wc(i)&&wc(a)&&o.current.length){for(const c of o.current)if(!r(i[c],a[c]))return!1;return!0}return r(i,a)});return p.useMemo(()=>{if(wc(s)){const i={...s};let a={};for(const[c,l]of Object.entries(i))a={...a,[c]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(c)||o.current.push(c),l)}};return Object.defineProperties(i,a),i}return s},[s])}function nt(e={}){const t=Ne(e);return g8(n=>g1(t,{onChange:n}),()=>p1(t))}function A1(e={}){const{onConnect:t,onDisconnect:n}=e,r=Ne(e);p.useEffect(()=>g1(r,{onChange(o,s){if((s.status==="reconnecting"||s.status==="connecting"&&s.address===void 0)&&o.status==="connected"){const{address:i,addresses:a,chain:c,chainId:l,connector:u}=o,f=s.status==="reconnecting"||s.status===void 0;t==null||t({address:i,addresses:a,chain:c,chainId:l,connector:u,isReconnected:f})}else s.status==="connected"&&o.status==="disconnected"&&(n==null||n())}}),[r,t,n])}var Go=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},b8={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Zt,wr,ph,y8=(ph=class{constructor(){Z(this,Zt,b8);Z(this,wr,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&k(this,wr)&&e!==k(this,Zt)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:k(this,Zt),provider:e}),z(this,Zt,e),process.env.NODE_ENV!=="production"&&z(this,wr,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&z(this,wr,!0),k(this,Zt).setTimeout(e,t)}clearTimeout(e){k(this,Zt).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&z(this,wr,!0),k(this,Zt).setInterval(e,t)}clearInterval(e){k(this,Zt).clearInterval(e)}},Zt=new WeakMap,wr=new WeakMap,ph),br=new y8;function w8(e){setTimeout(e,0)}var Lr=typeof window>"u"||"Deno"in globalThis;function Xe(){}function v8(e,t){return typeof e=="function"?e(t):e}function jl(e){return typeof e=="number"&&e>=0&&e!==1/0}function E1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Kn(e,t){return typeof e=="function"?e(t):e}function Pt(e,t){return typeof e=="function"?e(t):e}function Gf(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Vu(i,t.options))return!1}else if(!Rs(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Vf(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ur(t.options.mutationKey)!==Ur(s))return!1}else if(!Rs(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Vu(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ur)(e)}function Ur(e){return JSON.stringify(e,(t,n)=>Bl(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Rs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Rs(e[n],t[n])):!1}var x8=Object.prototype.hasOwnProperty;function Zi(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Kf(e)&&Kf(t);if(!r&&!(Bl(e)&&Bl(t)))return t;const s=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),a=i.length,c=r?new Array(a):{};let l=0;for(let u=0;u<a;u++){const f=r?u:i[u],d=e[f],h=t[f];if(d===h){c[f]=d,(r?u<s:x8.call(e,f))&&l++;continue}if(d===null||h===null||typeof d!="object"||typeof h!="object"){c[f]=h;continue}const g=Zi(d,h,n+1);c[f]=g,g===d&&l++}return s===a&&l===s?e:c}function ea(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Kf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bl(e){if(!Jf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Jf(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Jf(e){return Object.prototype.toString.call(e)==="[object Object]"}function C8(e){return new Promise(t=>{br.setTimeout(t,e)})}function Sl(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Zi(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Zi(e,t)}return t}function A8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function E8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ta=Symbol();function k1(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ta&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ta?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ku(e,t){return typeof e=="function"?e(...t):!!e}function k8(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var vr,_n,mo,mh,I8=(mh=class extends Go{constructor(){super();Z(this,vr);Z(this,_n);Z(this,mo);z(this,mo,t=>{if(!Lr&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,_n)||this.setEventListener(k(this,mo))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,_n))==null||t.call(this),z(this,_n,void 0))}setEventListener(t){var n;z(this,mo,t),(n=k(this,_n))==null||n.call(this),z(this,_n,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,vr)!==t&&(z(this,vr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof k(this,vr)=="boolean"?k(this,vr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},vr=new WeakMap,_n=new WeakMap,mo=new WeakMap,mh),Ju=new I8;function Pl(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var j8=w8;function B8(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=j8;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Me=B8(),go,$n,bo,gh,S8=(gh=class extends Go{constructor(){super();Z(this,go,!0);Z(this,$n);Z(this,bo);z(this,bo,t=>{if(!Lr&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){k(this,$n)||this.setEventListener(k(this,bo))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,$n))==null||t.call(this),z(this,$n,void 0))}setEventListener(t){var n;z(this,bo,t),(n=k(this,$n))==null||n.call(this),z(this,$n,t(this.setOnline.bind(this)))}setOnline(t){k(this,go)!==t&&(z(this,go,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,go)}},go=new WeakMap,$n=new WeakMap,bo=new WeakMap,gh),na=new S8;function P8(e){return Math.min(1e3*2**e,3e4)}function I1(e){return(e??"online")==="online"?na.isOnline():!0}var Ol=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function j1(e){let t=!1,n=0,r;const o=Pl(),s=()=>o.status!=="pending",i=m=>{var b;if(!s()){const y=new Ol(m);d(y),(b=e.onCancel)==null||b.call(e,y)}},a=()=>{t=!0},c=()=>{t=!1},l=()=>Ju.isFocused()&&(e.networkMode==="always"||na.isOnline())&&e.canRun(),u=()=>I1(e.networkMode)&&e.canRun(),f=m=>{s()||(r==null||r(),o.resolve(m))},d=m=>{s()||(r==null||r(),o.reject(m))},h=()=>new Promise(m=>{var b;r=y=>{(s()||l())&&m(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;r=void 0,s()||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(s())return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var E;if(s())return;const C=e.retry??(Lr?0:3),v=e.retryDelay??P8,w=typeof v=="function"?v(n,y):v,x=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,y);if(t||!x){d(y);return}n++,(E=e.onFail)==null||E.call(e,n,y),C8(w).then(()=>l()?void 0:h()).then(()=>{t?d(y):g()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:c,canStart:u,start:()=>(u()?g():h().then(g),o)}}var xr,bh,B1=(bh=class{constructor(){Z(this,xr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),jl(this.gcTime)&&z(this,xr,br.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Lr?1/0:5*60*1e3))}clearGcTimeout(){k(this,xr)&&(br.clearTimeout(k(this,xr)),z(this,xr,void 0))}},xr=new WeakMap,bh),Cr,yo,St,Ar,Le,_s,Er,Lt,gn,yh,O8=(yh=class extends B1{constructor(t){super();Z(this,Lt);Z(this,Cr);Z(this,yo);Z(this,St);Z(this,Ar);Z(this,Le);Z(this,_s);Z(this,Er);z(this,Er,!1),z(this,_s,t.defaultOptions),this.setOptions(t.options),this.observers=[],z(this,Ar,t.client),z(this,St,k(this,Ar).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,z(this,Cr,Xf(this.options)),this.state=t.state??k(this,Cr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,Le))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,_s),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Xf(this.options);n.data!==void 0&&(this.setState(Yf(n.data,n.dataUpdatedAt)),z(this,Cr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,St).remove(this)}setData(t,n){const r=Sl(this.state.data,t,this.options);return Y(this,Lt,gn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Y(this,Lt,gn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=k(this,Le))==null?void 0:r.promise;return(o=k(this,Le))==null||o.cancel(t),n?n.then(Xe).catch(Xe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,Cr))}isActive(){return this.observers.some(t=>Pt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ta||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Kn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!E1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,Le))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,Le))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,St).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(k(this,Le)&&(k(this,Er)?k(this,Le).cancel({revert:!0}):k(this,Le).cancelRetry()),this.scheduleGc()),k(this,St).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Y(this,Lt,gn).call(this,{type:"invalidate"})}async fetch(t,n){var c,l,u,f,d,h,g,m,b,y,C,v;if(this.state.fetchStatus!=="idle"&&((c=k(this,Le))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,Le))return k(this,Le).continueRetry(),k(this,Le).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(x=>x.options.queryFn);w&&this.setOptions(w.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(z(this,Er,!0),r.signal)})},s=()=>{const w=k1(this.options,n),E=(()=>{const A={client:k(this,Ar),queryKey:this.queryKey,meta:this.meta};return o(A),A})();return z(this,Er,!1),this.options.persister?this.options.persister(w,E,this):w(E)},a=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:k(this,Ar),state:this.state,fetchFn:s};return o(w),w})();(l=this.options.behavior)==null||l.onFetch(a,this),z(this,yo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&Y(this,Lt,gn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta}),z(this,Le,j1({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:w=>{w instanceof Ol&&w.revert&&this.setState({...k(this,yo),fetchStatus:"idle"}),r.abort()},onFail:(w,x)=>{Y(this,Lt,gn).call(this,{type:"failed",failureCount:w,error:x})},onPause:()=>{Y(this,Lt,gn).call(this,{type:"pause"})},onContinue:()=>{Y(this,Lt,gn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const w=await k(this,Le).start();if(w===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(w),(h=(d=k(this,St).config).onSuccess)==null||h.call(d,w,this),(m=(g=k(this,St).config).onSettled)==null||m.call(g,w,this.state.error,this),w}catch(w){if(w instanceof Ol){if(w.silent)return k(this,Le).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Y(this,Lt,gn).call(this,{type:"error",error:w}),(y=(b=k(this,St).config).onError)==null||y.call(b,w,this),(v=(C=k(this,St).config).onSettled)==null||v.call(C,this.state.data,w,this),w}finally{this.scheduleGc()}}},Cr=new WeakMap,yo=new WeakMap,St=new WeakMap,Ar=new WeakMap,Le=new WeakMap,_s=new WeakMap,Er=new WeakMap,Lt=new WeakSet,gn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...S1(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...Yf(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return z(this,yo,t.manual?o:void 0),o;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Me.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,St).notify({query:this,type:"updated",action:t})})},yh);function S1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Yf(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Xf(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var at,he,$s,Ke,kr,wo,vn,Wn,Ws,vo,xo,Ir,jr,qn,Co,ve,as,Tl,Rl,Nl,Fl,Ml,Dl,Ll,P1,wh,T8=(wh=class extends Go{constructor(t,n){super();Z(this,ve);Z(this,at);Z(this,he);Z(this,$s);Z(this,Ke);Z(this,kr);Z(this,wo);Z(this,vn);Z(this,Wn);Z(this,Ws);Z(this,vo);Z(this,xo);Z(this,Ir);Z(this,jr);Z(this,qn);Z(this,Co,new Set);this.options=n,z(this,at,t),z(this,Wn,null),z(this,vn,Pl()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,he).addObserver(this),Zf(k(this,he),this.options)?Y(this,ve,as).call(this):this.updateResult(),Y(this,ve,Fl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ul(k(this,he),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ul(k(this,he),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Y(this,ve,Ml).call(this),Y(this,ve,Dl).call(this),k(this,he).removeObserver(this)}setOptions(t){const n=this.options,r=k(this,he);if(this.options=k(this,at).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pt(this.options.enabled,k(this,he))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Y(this,ve,Ll).call(this),k(this,he).setOptions(this.options),n._defaulted&&!ea(this.options,n)&&k(this,at).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,he),observer:this});const o=this.hasListeners();o&&e0(k(this,he),r,this.options,n)&&Y(this,ve,as).call(this),this.updateResult(),o&&(k(this,he)!==r||Pt(this.options.enabled,k(this,he))!==Pt(n.enabled,k(this,he))||Kn(this.options.staleTime,k(this,he))!==Kn(n.staleTime,k(this,he)))&&Y(this,ve,Tl).call(this);const s=Y(this,ve,Rl).call(this);o&&(k(this,he)!==r||Pt(this.options.enabled,k(this,he))!==Pt(n.enabled,k(this,he))||s!==k(this,qn))&&Y(this,ve,Nl).call(this,s)}getOptimisticResult(t){const n=k(this,at).getQueryCache().build(k(this,at),t),r=this.createResult(n,t);return N8(this,r)&&(z(this,Ke,r),z(this,wo,this.options),z(this,kr,k(this,he).state)),r}getCurrentResult(){return k(this,Ke)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,vn).status==="pending"&&k(this,vn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){k(this,Co).add(t)}getCurrentQuery(){return k(this,he)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=k(this,at).defaultQueryOptions(t),r=k(this,at).getQueryCache().build(k(this,at),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Y(this,ve,as).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,Ke)))}createResult(t,n){var S;const r=k(this,he),o=this.options,s=k(this,Ke),i=k(this,kr),a=k(this,wo),l=t!==r?t.state:k(this,$s),{state:u}=t;let f={...u},d=!1,h;if(n._optimisticResults){const T=this.hasListeners(),R=!T&&Zf(t,n),M=T&&e0(t,r,n,o);(R||M)&&(f={...f,...S1(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:b}=f;h=f.data;let y=!1;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let T;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(T=s.data,y=!0):T=typeof n.placeholderData=="function"?n.placeholderData((S=k(this,xo))==null?void 0:S.state.data,k(this,xo)):n.placeholderData,T!==void 0&&(b="success",h=Sl(s==null?void 0:s.data,T,n),d=!0)}if(n.select&&h!==void 0&&!y)if(s&&h===(i==null?void 0:i.data)&&n.select===k(this,Ws))h=k(this,vo);else try{z(this,Ws,n.select),h=n.select(h),h=Sl(s==null?void 0:s.data,h,n),z(this,vo,h),z(this,Wn,null)}catch(T){z(this,Wn,T)}k(this,Wn)&&(g=k(this,Wn),h=k(this,vo),m=Date.now(),b="error");const C=f.fetchStatus==="fetching",v=b==="pending",w=b==="error",x=v&&C,E=h!==void 0,I={status:b,fetchStatus:f.fetchStatus,isPending:v,isSuccess:b==="success",isError:w,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:C,isRefetching:C&&!v,isLoadingError:w&&!E,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&E,isStale:Yu(t,n),refetch:this.refetch,promise:k(this,vn),isEnabled:Pt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=I.data!==void 0,R=I.status==="error"&&!T,M=P=>{R?P.reject(I.error):T&&P.resolve(I.data)},N=()=>{const P=z(this,vn,I.promise=Pl());M(P)},q=k(this,vn);switch(q.status){case"pending":t.queryHash===r.queryHash&&M(q);break;case"fulfilled":(R||I.data!==q.value)&&N();break;case"rejected":(!R||I.error!==q.reason)&&N();break}}return I}updateResult(){const t=k(this,Ke),n=this.createResult(k(this,he),this.options);if(z(this,kr,k(this,he).state),z(this,wo,this.options),k(this,kr).data!==void 0&&z(this,xo,k(this,he)),ea(n,t))return;z(this,Ke,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!k(this,Co).size)return!0;const i=new Set(s??k(this,Co));return this.options.throwOnError&&i.add("error"),Object.keys(k(this,Ke)).some(a=>{const c=a;return k(this,Ke)[c]!==t[c]&&i.has(c)})};Y(this,ve,P1).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Y(this,ve,Fl).call(this)}},at=new WeakMap,he=new WeakMap,$s=new WeakMap,Ke=new WeakMap,kr=new WeakMap,wo=new WeakMap,vn=new WeakMap,Wn=new WeakMap,Ws=new WeakMap,vo=new WeakMap,xo=new WeakMap,Ir=new WeakMap,jr=new WeakMap,qn=new WeakMap,Co=new WeakMap,ve=new WeakSet,as=function(t){Y(this,ve,Ll).call(this);let n=k(this,he).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Xe)),n},Tl=function(){Y(this,ve,Ml).call(this);const t=Kn(this.options.staleTime,k(this,he));if(Lr||k(this,Ke).isStale||!jl(t))return;const r=E1(k(this,Ke).dataUpdatedAt,t)+1;z(this,Ir,br.setTimeout(()=>{k(this,Ke).isStale||this.updateResult()},r))},Rl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,he)):this.options.refetchInterval)??!1},Nl=function(t){Y(this,ve,Dl).call(this),z(this,qn,t),!(Lr||Pt(this.options.enabled,k(this,he))===!1||!jl(k(this,qn))||k(this,qn)===0)&&z(this,jr,br.setInterval(()=>{(this.options.refetchIntervalInBackground||Ju.isFocused())&&Y(this,ve,as).call(this)},k(this,qn)))},Fl=function(){Y(this,ve,Tl).call(this),Y(this,ve,Nl).call(this,Y(this,ve,Rl).call(this))},Ml=function(){k(this,Ir)&&(br.clearTimeout(k(this,Ir)),z(this,Ir,void 0))},Dl=function(){k(this,jr)&&(br.clearInterval(k(this,jr)),z(this,jr,void 0))},Ll=function(){const t=k(this,at).getQueryCache().build(k(this,at),this.options);if(t===k(this,he))return;const n=k(this,he);z(this,he,t),z(this,$s,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},P1=function(t){Me.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(k(this,Ke))}),k(this,at).getQueryCache().notify({query:k(this,he),type:"observerResultsUpdated"})})},wh);function R8(e,t){return Pt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Zf(e,t){return R8(e,t)||e.state.data!==void 0&&Ul(e,t,t.refetchOnMount)}function Ul(e,t,n){if(Pt(t.enabled,e)!==!1&&Kn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Yu(e,t)}return!1}function e0(e,t,n,r){return(e!==t||Pt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Yu(e,n)}function Yu(e,t){return Pt(t.enabled,e)!==!1&&e.isStaleByTime(Kn(t.staleTime,e))}function N8(e,t){return!ea(e.getCurrentResult(),t)}function t0(e){return{onFetch:(t,n)=>{var u,f,d,h,g;const r=t.options,o=(d=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],i=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let m=!1;const b=v=>{k8(v,()=>t.signal,()=>m=!0)},y=k1(t.options,t.fetchOptions),C=async(v,w,x)=>{if(m)return Promise.reject();if(w==null&&v.pages.length)return Promise.resolve(v);const A=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:w,direction:x?"backward":"forward",meta:t.options.meta};return b(R),R})(),I=await y(A),{maxPages:S}=t.options,T=x?E8:A8;return{pages:T(v.pages,I,S),pageParams:T(v.pageParams,w,S)}};if(o&&s.length){const v=o==="backward",w=v?F8:n0,x={pages:s,pageParams:i},E=w(r,x);a=await C(x,E,v)}else{const v=e??s.length;do{const w=c===0?i[0]??r.initialPageParam:n0(r,a);if(c>0&&w==null)break;a=await C(a,w),c++}while(c<v)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function n0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function F8(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var qs,en,He,Br,tn,Dn,vh,M8=(vh=class extends B1{constructor(t){super();Z(this,tn);Z(this,qs);Z(this,en);Z(this,He);Z(this,Br);z(this,qs,t.client),this.mutationId=t.mutationId,z(this,He,t.mutationCache),z(this,en,[]),this.state=t.state||O1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,en).includes(t)||(k(this,en).push(t),this.clearGcTimeout(),k(this,He).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){z(this,en,k(this,en).filter(n=>n!==t)),this.scheduleGc(),k(this,He).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,en).length||(this.state.status==="pending"?this.scheduleGc():k(this,He).remove(this))}continue(){var t;return((t=k(this,Br))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,c,l,u,f,d,h,g,m,b,y,C,v,w,x,E,A;const n=()=>{Y(this,tn,Dn).call(this,{type:"continue"})},r={client:k(this,qs),meta:this.options.meta,mutationKey:this.options.mutationKey};z(this,Br,j1({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(I,S)=>{Y(this,tn,Dn).call(this,{type:"failed",failureCount:I,error:S})},onPause:()=>{Y(this,tn,Dn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,He).canRun(this)}));const o=this.state.status==="pending",s=!k(this,Br).canStart();try{if(o)n();else{Y(this,tn,Dn).call(this,{type:"pending",variables:t,isPaused:s}),k(this,He).config.onMutate&&await k(this,He).config.onMutate(t,this,r);const S=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,t,r));S!==this.state.context&&Y(this,tn,Dn).call(this,{type:"pending",context:S,variables:t,isPaused:s})}const I=await k(this,Br).start();return await((l=(c=k(this,He).config).onSuccess)==null?void 0:l.call(c,I,t,this.state.context,this,r)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,I,t,this.state.context,r)),await((h=(d=k(this,He).config).onSettled)==null?void 0:h.call(d,I,null,this.state.variables,this.state.context,this,r)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,I,null,t,this.state.context,r)),Y(this,tn,Dn).call(this,{type:"success",data:I}),I}catch(I){try{await((y=(b=k(this,He).config).onError)==null?void 0:y.call(b,I,t,this.state.context,this,r))}catch(S){Promise.reject(S)}try{await((v=(C=this.options).onError)==null?void 0:v.call(C,I,t,this.state.context,r))}catch(S){Promise.reject(S)}try{await((x=(w=k(this,He).config).onSettled)==null?void 0:x.call(w,void 0,I,this.state.variables,this.state.context,this,r))}catch(S){Promise.reject(S)}try{await((A=(E=this.options).onSettled)==null?void 0:A.call(E,void 0,I,t,this.state.context,r))}catch(S){Promise.reject(S)}throw Y(this,tn,Dn).call(this,{type:"error",error:I}),I}finally{k(this,He).runNext(this)}}},qs=new WeakMap,en=new WeakMap,He=new WeakMap,Br=new WeakMap,tn=new WeakSet,Dn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Me.batch(()=>{k(this,en).forEach(r=>{r.onMutationUpdate(t)}),k(this,He).notify({mutation:this,type:"updated",action:t})})},vh);function O1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xn,Ut,zs,xh,D8=(xh=class extends Go{constructor(t={}){super();Z(this,xn);Z(this,Ut);Z(this,zs);this.config=t,z(this,xn,new Set),z(this,Ut,new Map),z(this,zs,0)}build(t,n,r){const o=new M8({client:t,mutationCache:this,mutationId:++hi(this,zs)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){k(this,xn).add(t);const n=ki(t);if(typeof n=="string"){const r=k(this,Ut).get(n);r?r.push(t):k(this,Ut).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,xn).delete(t)){const n=ki(t);if(typeof n=="string"){const r=k(this,Ut).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&k(this,Ut).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ki(t);if(typeof n=="string"){const r=k(this,Ut).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=ki(t);if(typeof n=="string"){const o=(r=k(this,Ut).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Me.batch(()=>{k(this,xn).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,xn).clear(),k(this,Ut).clear()})}getAll(){return Array.from(k(this,xn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Vf(n,r))}findAll(t={}){return this.getAll().filter(n=>Vf(t,n))}notify(t){Me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Me.batch(()=>Promise.all(t.map(n=>n.continue().catch(Xe))))}},xn=new WeakMap,Ut=new WeakMap,zs=new WeakMap,xh);function ki(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Cn,zn,ct,An,Sn,Fi,_l,Ch,L8=(Ch=class extends Go{constructor(t,n){super();Z(this,Sn);Z(this,Cn);Z(this,zn);Z(this,ct);Z(this,An);z(this,Cn,t),this.setOptions(n),this.bindMethods(),Y(this,Sn,Fi).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=k(this,Cn).defaultMutationOptions(t),ea(this.options,n)||k(this,Cn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,ct),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ur(n.mutationKey)!==Ur(this.options.mutationKey)?this.reset():((r=k(this,ct))==null?void 0:r.state.status)==="pending"&&k(this,ct).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=k(this,ct))==null||t.removeObserver(this)}onMutationUpdate(t){Y(this,Sn,Fi).call(this),Y(this,Sn,_l).call(this,t)}getCurrentResult(){return k(this,zn)}reset(){var t;(t=k(this,ct))==null||t.removeObserver(this),z(this,ct,void 0),Y(this,Sn,Fi).call(this),Y(this,Sn,_l).call(this)}mutate(t,n){var r;return z(this,An,n),(r=k(this,ct))==null||r.removeObserver(this),z(this,ct,k(this,Cn).getMutationCache().build(k(this,Cn),this.options)),k(this,ct).addObserver(this),k(this,ct).execute(t)}},Cn=new WeakMap,zn=new WeakMap,ct=new WeakMap,An=new WeakMap,Sn=new WeakSet,Fi=function(){var n;const t=((n=k(this,ct))==null?void 0:n.state)??O1();z(this,zn,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},_l=function(t){Me.batch(()=>{var n,r,o,s,i,a,c,l;if(k(this,An)&&this.hasListeners()){const u=k(this,zn).variables,f=k(this,zn).context,d={client:k(this,Cn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(n=k(this,An)).onSuccess)==null||r.call(n,t.data,u,f,d)}catch(h){Promise.reject(h)}try{(s=(o=k(this,An)).onSettled)==null||s.call(o,t.data,null,u,f,d)}catch(h){Promise.reject(h)}}else if((t==null?void 0:t.type)==="error"){try{(a=(i=k(this,An)).onError)==null||a.call(i,t.error,u,f,d)}catch(h){Promise.reject(h)}try{(l=(c=k(this,An)).onSettled)==null||l.call(c,void 0,t.error,u,f,d)}catch(h){Promise.reject(h)}}}this.listeners.forEach(u=>{u(k(this,zn))})})},Ch),nn,Ah,U8=(Ah=class extends Go{constructor(t={}){super();Z(this,nn);this.config=t,z(this,nn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Vu(o,n);let i=this.get(s);return i||(i=new O8({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){k(this,nn).has(t.queryHash)||(k(this,nn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=k(this,nn).get(t.queryHash);n&&(t.destroy(),n===t&&k(this,nn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,nn).get(t)}getAll(){return[...k(this,nn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Gf(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Gf(t,r)):n}notify(t){Me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nn=new WeakMap,Ah),je,Qn,Hn,Ao,Eo,Gn,ko,Io,Eh,_8=(Eh=class{constructor(e={}){Z(this,je);Z(this,Qn);Z(this,Hn);Z(this,Ao);Z(this,Eo);Z(this,Gn);Z(this,ko);Z(this,Io);z(this,je,e.queryCache||new U8),z(this,Qn,e.mutationCache||new D8),z(this,Hn,e.defaultOptions||{}),z(this,Ao,new Map),z(this,Eo,new Map),z(this,Gn,0)}mount(){hi(this,Gn)._++,k(this,Gn)===1&&(z(this,ko,Ju.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,je).onFocus())})),z(this,Io,na.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,je).onOnline())})))}unmount(){var e,t;hi(this,Gn)._--,k(this,Gn)===0&&((e=k(this,ko))==null||e.call(this),z(this,ko,void 0),(t=k(this,Io))==null||t.call(this),z(this,Io,void 0))}isFetching(e){return k(this,je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,Qn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=k(this,je).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Kn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return k(this,je).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=k(this,je).get(r.queryHash),s=o==null?void 0:o.state.data,i=v8(t,s);if(i!==void 0)return k(this,je).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Me.batch(()=>k(this,je).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=k(this,je);Me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=k(this,je);return Me.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Me.batch(()=>k(this,je).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Xe).catch(Xe)}invalidateQueries(e,t={}){return Me.batch(()=>(k(this,je).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Me.batch(()=>k(this,je).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Xe)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Xe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=k(this,je).build(this,t);return n.isStaleByTime(Kn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xe).catch(Xe)}fetchInfiniteQuery(e){return e.behavior=t0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xe).catch(Xe)}ensureInfiniteQueryData(e){return e.behavior=t0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return na.isOnline()?k(this,Qn).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,je)}getMutationCache(){return k(this,Qn)}getDefaultOptions(){return k(this,Hn)}setDefaultOptions(e){z(this,Hn,e)}setQueryDefaults(e,t){k(this,Ao).set(Ur(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Ao).values()],n={};return t.forEach(r=>{Rs(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){k(this,Eo).set(Ur(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Eo).values()],n={};return t.forEach(r=>{Rs(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,Hn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Vu(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ta&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,Hn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,je).clear(),k(this,Qn).clear()}},je=new WeakMap,Qn=new WeakMap,Hn=new WeakMap,Ao=new WeakMap,Eo=new WeakMap,Gn=new WeakMap,ko=new WeakMap,Io=new WeakMap,Eh);function $8(e,t){return Zi(e,t)}function W8(e){return JSON.stringify(e,(t,n)=>q8(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):typeof n=="bigint"?n.toString():n)}function q8(e){if(!r0(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!r0(n)||!n.hasOwnProperty("isPrototypeOf"))}function r0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pa(e){const{_defaulted:t,behavior:n,gcTime:r,initialData:o,initialDataUpdatedAt:s,maxPages:i,meta:a,networkMode:c,queryFn:l,queryHash:u,queryKey:f,queryKeyHashFn:d,retry:h,retryDelay:g,structuralSharing:m,getPreviousPageParam:b,getNextPageParam:y,initialPageParam:C,_optimisticResults:v,enabled:w,notifyOnChangeProps:x,placeholderData:E,refetchInterval:A,refetchIntervalInBackground:I,refetchOnMount:S,refetchOnReconnect:T,refetchOnWindowFocus:R,retryOnMount:M,select:N,staleTime:q,suspense:P,throwOnError:D,config:_,connector:F,query:U,...W}=e;return W}function z8(e){return{mutationFn(t){return px(e,t)},mutationKey:["connect"]}}function Q8(e){return{mutationFn(t){return Ax(e,t)},mutationKey:["disconnect"]}}function H8(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...s}=n[1];if(!r)throw new Error("address is required");return await Ix(e,{...s,address:r})??null},queryKey:G8(t)}}function G8(e={}){return["balance",Pa(e)]}function V8(e,t={}){return{async queryFn({queryKey:n}){const{name:r,scopeKey:o,...s}=n[1];if(!r)throw new Error("name is required");return Bx(e,{...s,name:r})},queryKey:K8(t)}}function K8(e={}){return["ensAvatar",Pa(e)]}function J8(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...s}=n[1];if(!r)throw new Error("address is required");return Sx(e,{...s,address:r})},queryKey:Y8(t)}}function Y8(e={}){return["ensName",Pa(e)]}function X8(e,t={}){return{async queryFn({queryKey:n}){const r=t.abi;if(!r)throw new Error("abi is required");const{functionName:o,scopeKey:s,...i}=n[1],a=(()=>{const c=n[1];if(c.address)return{address:c.address};if(c.code)return{code:c.code};throw new Error("address or code is required")})();if(!o)throw new Error("functionName is required");return m1(e,{abi:r,functionName:o,args:i.args,...a,...i})},queryKey:Z8(t)}}function Z8(e={}){const{abi:t,...n}=e;return["readContract",Pa(n)]}function eC(e){return{mutationFn(t){return Ox(e,t)},mutationKey:["signMessage"]}}function tC(e){return{mutationFn(t){return Rx(e,t)},mutationKey:["switchChain"]}}function nC(e){return{mutationFn(t){return Lx(e,t)},mutationKey:["writeContract"]}}var T1=J.createContext(void 0),R1=e=>{const t=J.useContext(T1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rC=({client:e,children:t})=>(J.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),O.jsx(T1.Provider,{value:e,children:t})),N1=J.createContext(!1),oC=()=>J.useContext(N1);N1.Provider;function sC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var iC=J.createContext(sC()),aC=()=>J.useContext(iC),cC=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Ku(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},lC=e=>{J.useEffect(()=>{e.clearReset()},[e])},uC=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ku(n,[e.error,r])),dC=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},fC=(e,t)=>e.isLoading&&e.isFetching&&!t,hC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,o0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function pC(e,t,n){var d,h,g,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=oC(),o=aC(),s=R1(),i=s.defaultQueryOptions(e);(h=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,i);const a=s.getQueryCache().get(i.queryHash);process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),i._optimisticResults=r?"isRestoring":"optimistic",dC(i),cC(i,o,a),lC(o);const c=!s.getQueryCache().get(i.queryHash),[l]=J.useState(()=>new t(s,i)),u=l.getOptimisticResult(i),f=!r&&e.subscribed!==!1;if(J.useSyncExternalStore(J.useCallback(b=>{const y=f?l.subscribe(Me.batchCalls(b)):Xe;return l.updateResult(),y},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),J.useEffect(()=>{l.setOptions(i)},[i,l]),hC(i,u))throw o0(i,l,o);if(uC({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw u.error;if((m=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||m.call(g,i,u),i.experimental_prefetchInRender&&!Lr&&fC(u,r)){const b=c?o0(i,l,o):a==null?void 0:a.promise;b==null||b.catch(Xe).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function F1(e,t){return pC(e,T8)}function ai(e,t){const n=R1(),[r]=J.useState(()=>new L8(n,e));J.useEffect(()=>{r.setOptions(e)},[r,e]);const o=J.useSyncExternalStore(J.useCallback(i=>r.subscribe(Me.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=J.useCallback((i,a)=>{r.mutate(i,a).catch(Xe)},[r]);if(o.error&&Ku(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function Oa(e){const t=F1({...e,queryKeyHashFn:W8});return t.queryKey=e.queryKey,t}function Ta(e={}){const t=Ne(e);return p.useSyncExternalStore(n=>Nx(t,{onChange:n}),()=>Mf(t),()=>Mf(t))}function Xu(e={}){const{address:t,query:n={}}=e,r=Ne(e),o=Ta({config:r}),s=H8(r,{...e,chainId:e.chainId??o}),i=!!(t&&(n.enabled??!0));return Oa({...n,...s,enabled:i})}function mC(e={}){const t=Ne(e);return p.useSyncExternalStore(n=>d8(t,{onChange:n}),()=>Df(t),()=>Df(t))}function gC(e={}){const t=Ne(e);return p.useSyncExternalStore(n=>Mx(t,{onChange:n}),()=>Lf(t),()=>Lf(t))}function bC(e={}){const{mutation:t}=e,n=Ne(e),r=z8(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return p.useEffect(()=>n.subscribe(({status:a})=>a,(a,c)=>{c==="connected"&&a==="disconnected"&&i.reset()}),[n,i.reset]),{...i,connect:o,connectAsync:s,connectors:gC({config:n})}}function yC(e={}){const t=Ne(e);return p.useSyncExternalStore(n=>Fx(t,{onChange:n}),()=>Cl(t),()=>Cl(t))}function Zu(e={}){const{mutation:t}=e,n=Ne(e),r=Q8(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return{...i,connectors:yC({config:n}).map(a=>a.connector),disconnect:o,disconnectAsync:s}}function wC(e={}){const{name:t,query:n={}}=e,r=Ne(e),o=Ta({config:r}),s=V8(r,{...e,chainId:e.chainId??o}),i=!!(t&&(n.enabled??!0));return Oa({...n,...s,enabled:i})}function vC(e={}){const{address:t,query:n={}}=e,r=Ne(e),o=Ta({config:r}),s=J8(r,{...e,chainId:e.chainId??o}),i=!!(t&&(n.enabled??!0));return Oa({...n,...s,enabled:i})}function xC(e={}){const t=Ne(e);return C1.useSyncExternalStoreWithSelector(n=>Dx(t,{onChange:n}),()=>Al(t,e),()=>Al(t,e),n=>n,(n,r)=>(n==null?void 0:n.uid)===(r==null?void 0:r.uid))}function CC(e={}){const{abi:t,address:n,functionName:r,query:o={}}=e,s=e.code,i=Ne(e),a=Ta({config:i}),c=X8(i,{...e,chainId:e.chainId??a}),l=!!((n||s)&&t&&r&&(o.enabled??!0));return Oa({...o,...c,enabled:l,structuralSharing:o.structuralSharing??$8})}function AC(e={}){const{mutation:t}=e,n=Ne(e),r=eC(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return{...i,signMessage:o,signMessageAsync:s}}function EC(e={}){const{mutation:t}=e,n=Ne(e),r=tC(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return{...i,chains:mC({config:n}),switchChain:o,switchChainAsync:s}}function kC(e={}){const{mutation:t}=e,n=Ne(e),r=nC(n),{mutate:o,mutateAsync:s,...i}=ai({...t,...r});return{...i,writeContract:o,writeContractAsync:s}}var s0='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',IC={rounded:`SFRounded, ui-rounded, "SF Pro Rounded", ${s0}`,system:s0},rs={large:{actionButton:"9999px",connectButton:"12px",modal:"24px",modalMobile:"28px"},medium:{actionButton:"10px",connectButton:"8px",modal:"16px",modalMobile:"18px"},none:{actionButton:"0px",connectButton:"0px",modal:"0px",modalMobile:"0px"},small:{actionButton:"4px",connectButton:"4px",modal:"8px",modalMobile:"8px"}},jC={large:{modalOverlay:"blur(20px)"},none:{modalOverlay:"blur(0px)"},small:{modalOverlay:"blur(4px)"}},M1=({borderRadius:e="large",fontStack:t="rounded",overlayBlur:n="none"})=>({blurs:{modalOverlay:jC[n].modalOverlay},fonts:{body:IC[t]},radii:{actionButton:rs[e].actionButton,connectButton:rs[e].connectButton,menuButton:rs[e].connectButton,modal:rs[e].modal,modalMobile:rs[e].modalMobile}}),Mi="#1A1B1F",D1={blue:{accentColor:"#3898FF",accentColorForeground:"#FFF"},green:{accentColor:"#4BD166",accentColorForeground:Mi},orange:{accentColor:"#FF983D",accentColorForeground:Mi},pink:{accentColor:"#FF7AB8",accentColorForeground:Mi},purple:{accentColor:"#7A70FF",accentColorForeground:"#FFF"},red:{accentColor:"#FF6257",accentColorForeground:"#FFF"}},i0=D1.blue,L1=({accentColor:e=i0.accentColor,accentColorForeground:t=i0.accentColorForeground,...n}={})=>({...M1(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(255, 255, 255, 0.04)",actionButtonBorderMobile:"rgba(255, 255, 255, 0.08)",actionButtonSecondaryBackground:"rgba(255, 255, 255, 0.08)",closeButton:"rgba(224, 232, 255, 0.6)",closeButtonBackground:"rgba(255, 255, 255, 0.08)",connectButtonBackground:Mi,connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.15))",connectButtonText:"#FFF",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(0, 0, 0, 0) 9.49%, rgba(120, 120, 120, 0.2) 71.04%), #1A1B1F",downloadTopCardBackground:"linear-gradient(126deg, rgba(120, 120, 120, 0.2) 9.49%, rgba(0, 0, 0, 0) 71.04%), #1A1B1F",error:"#FF494A",generalBorder:"rgba(255, 255, 255, 0.08)",generalBorderDim:"rgba(255, 255, 255, 0.04)",menuItemBackground:"rgba(224, 232, 255, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.5)",modalBackground:"#1A1B1F",modalBorder:"rgba(255, 255, 255, 0.08)",modalText:"#FFF",modalTextDim:"rgba(224, 232, 255, 0.3)",modalTextSecondary:"rgba(255, 255, 255, 0.6)",profileAction:"rgba(224, 232, 255, 0.1)",profileActionHover:"rgba(224, 232, 255, 0.2)",profileForeground:"rgba(224, 232, 255, 0.05)",selectedOptionBorder:"rgba(224, 232, 255, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.24)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});L1.accentColors=D1;var U1={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},a0=U1.blue,ed=({accentColor:e=a0.accentColor,accentColorForeground:t=a0.accentColorForeground,...n}={})=>({...M1(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackground:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});ed.accentColors=U1;var $l=`{
|
|
107
107
|
"connect_wallet": {
|
|
108
108
|
"label": "Connect Wallet",
|
|
109
109
|
"wrong_network": {
|
|
@@ -1672,8 +1672,8 @@ ${i6(h)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
|
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
|
-
`;function IC(e,t){return Object.defineProperty(e,"__recipe__",{value:t,writable:!1}),e}var U1=IC;function _1(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");function n(r){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return{[t.defaultCondition]:r}}if(Array.isArray(r)){if(!("responsiveArray"in t))throw new Error("Responsive arrays are not supported");var o={};for(var s in t.responsiveArray)r[s]!=null&&(o[t.responsiveArray[s]]=r[s]);return o}return r}return U1(n,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:e.conditions}]})}function jC(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");var n=_1(e);function r(o,s){if(typeof o=="string"||typeof o=="number"||typeof o=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return s(o,t.defaultCondition)}var i=Array.isArray(o)?n(o):o,a={};for(var c in i)i[c]!=null&&(a[c]=s(i[c],c));return a}return U1(r,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:e.conditions}]})}function BC(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SC(e){var t=BC(e,"string");return typeof t=="symbol"?t:String(t)}function PC(e,t,n){return t=SC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c0(Object(n),!0).forEach(function(r){PC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var OC=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map(c=>c.styles)),s=Object.keys(o),i=s.filter(c=>"mappings"in o[c]),a=c=>{var l=[],u={},f=vc({},c),d=!1;for(var h of i){var g=c[h];if(g!=null){var m=o[h];d=!0;for(var b of m.mappings)u[b]=g,f[b]==null&&delete f[b]}}var y=d?vc(vc({},u),f):c,C=function(){var x=y[v],E=o[v];try{if(E.mappings)return 1;if(typeof x=="string"||typeof x=="number"){if(process.env.NODE_ENV!=="production"&&!E.values[x].defaultClass)throw new Error;l.push(E.values[x].defaultClass)}else if(Array.isArray(x))for(var A=0;A<x.length;A++){var I=x[A];if(I!=null){var S=E.responsiveArray[A];if(process.env.NODE_ENV!=="production"&&!E.values[I].conditions[S])throw new Error;l.push(E.values[I].conditions[S])}}else for(var T in x){var R=x[T];if(R!=null){if(process.env.NODE_ENV!=="production"&&!E.values[R].conditions[T])throw new Error;l.push(E.values[R].conditions[T])}}}catch(F){if(process.env.NODE_ENV!=="production"){class U extends Error{constructor(ne){super(ne),this.name="SprinklesError"}}var M=q=>typeof q=="string"?'"'.concat(q,'"'):q,N=(q,ne,ce)=>{throw new U('"'.concat(q,'" has no value ').concat(M(ne),". Possible values are ").concat(Object.keys(ce).map(M).join(", ")))};if(!E)throw new U('"'.concat(v,'" is not a valid sprinkle'));if((typeof x=="string"||typeof x=="number")&&(x in E.values||N(v,x,E.values),!E.values[x].defaultClass))throw new U('"'.concat(v,'" has no default condition. You must specify which conditions to target explicitly. Possible options are ').concat(Object.keys(E.values[x].conditions).map(M).join(", ")));if(typeof x=="object"){if(!("conditions"in E.values[Object.keys(E.values)[0]]))throw new U('"'.concat(v,'" is not a conditional property'));if(Array.isArray(x)){if(!("responsiveArray"in E))throw new U('"'.concat(v,'" does not support responsive arrays'));var W=E.responsiveArray.length;if(W<x.length)throw new U('"'.concat(v,'" only supports up to ').concat(W," breakpoints. You passed ").concat(x.length));for(var P of x)E.values[P]||N(v,P,E.values)}else for(var D in x){var _=x[D];if(_!=null&&(E.values[_]||N(v,_,E.values),!E.values[_].conditions[D]))throw new U('"'.concat(v,'" has no condition named ').concat(M(D),". Possible values are ").concat(Object.keys(E.values[_].conditions).map(M).join(", ")))}}}throw F}};for(var v in y)C();return e(l.join(" "))};return Object.assign(a,{properties:new Set(s)})},TC=e=>e,RC=function(){return OC(TC)(...arguments)};function $1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=$1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function q1(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=$1(e))&&(r&&(r+=" "),r+=t);return r}var NC="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";const l0=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),u0=4;function FC(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),o=1,s=[0,1];for(let x=1;x<r;x++)s.push(o+=n());let i=n(),a=t;t+=i;let c=0,l=0;function u(){return c==0&&(l=l<<8|e[t++],c=8),l>>--c&1}const f=31,d=2**f,h=d>>>1,g=h>>1,m=d-1;let b=0;for(let x=0;x<f;x++)b=b<<1|u();let y=[],C=0,v=d;for(;;){let x=Math.floor(((b-C+1)*o-1)/v),E=0,A=r;for(;A-E>1;){let T=E+A>>>1;x<s[T]?A=T:E=T}if(E==0)break;y.push(E);let I=C+Math.floor(v*s[E]/o),S=C+Math.floor(v*s[E+1]/o)-1;for(;!((I^S)&h);)b=b<<1&m|u(),I=I<<1&m,S=S<<1&m|1;for(;I&~S&g;)b=b&h|b<<1&m>>>1|u(),I=I<<1^h,S=(S^h)<<1|h|1;C=I,v=1+S-I}let w=r-4;return y.map(x=>{switch(x-w){case 3:return w+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return w+256+(e[a++]<<8|e[a++]);case 1:return w+e[a++];default:return x-1}})}function MC(e){let t=0;return()=>e[t++]}function W1(e){return MC(FC(DC(e)))}function DC(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((o,s)=>t[o.charCodeAt(0)]=s);let n=e.length,r=new Uint8Array(6*n>>3);for(let o=0,s=0,i=0,a=0;o<n;o++)a=a<<6|t[e.charCodeAt(o)],i+=6,i>=8&&(r[s++]=a>>(i-=8));return r}function LC(e){return e&1?~e>>1:e>>1}function UC(e,t){let n=Array(e);for(let r=0,o=0;r<e;r++)n[r]=o+=LC(t());return n}function Ns(e,t=0){let n=[];for(;;){let r=e(),o=e();if(!o)break;t+=r;for(let s=0;s<o;s++)n.push(t+s);t+=o+1}return n}function z1(e){return Fs(()=>{let t=Ns(e);if(t.length)return t})}function Q1(e){let t=[];for(;;){let n=e();if(n==0)break;t.push(_C(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push($C(n,e))}return t.flat()}function Fs(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function H1(e,t,n){let r=Array(e).fill().map(()=>[]);for(let o=0;o<t;o++)UC(e,n).forEach((s,i)=>r[i].push(s));return r}function _C(e,t){let n=1+t(),r=t(),o=Fs(t);return H1(o.length,1+e,t).flatMap((i,a)=>{let[c,...l]=i;return Array(o[a]).fill().map((u,f)=>{let d=f*r;return[c+f*n,l.map(h=>h+d)]})})}function $C(e,t){let n=1+t();return H1(n,1+e,t).map(o=>[o[0],o.slice(1)])}function qC(e){let t=[],n=Ns(e);return o(r([]),[]),t;function r(s){let i=e(),a=Fs(()=>{let c=Ns(e).map(l=>n[l]);if(c.length)return r(c)});return{S:i,B:a,Q:s}}function o({S:s,B:i},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&t.push(a);for(let l of i)for(let u of l.Q)o(l,[...a,u],c)}}}function WC(e){return e.toString(16).toUpperCase().padStart(2,"0")}function V1(e){return`{${WC(e)}}`}function zC(e){let t=[];for(let n=0,r=e.length;n<r;){let o=e.codePointAt(n);n+=o<65536?1:2,t.push(o)}return t}function Lo(e){let n=e.length;if(n<4096)return String.fromCodePoint(...e);let r=[];for(let o=0;o<n;)r.push(String.fromCodePoint(...e.slice(o,o+=4096)));return r.join("")}function QC(e,t){let n=e.length,r=n-t.length;for(let o=0;r==0&&o<n;o++)r=e[o]-t[o];return r}var HC="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";const Ms=44032,ra=4352,oa=4449,sa=4519,G1=19,K1=21,Uo=28,ia=K1*Uo,VC=G1*ia,GC=Ms+VC,KC=ra+G1,JC=oa+K1,YC=sa+Uo;function cs(e){return e>>24&255}function J1(e){return e&16777215}let ql,d0,Wl,Di;function XC(){let e=W1(HC);ql=new Map(z1(e).flatMap((t,n)=>t.map(r=>[r,n+1<<24]))),d0=new Set(Ns(e)),Wl=new Map,Di=new Map;for(let[t,n]of Q1(e)){if(!d0.has(t)&&n.length==2){let[r,o]=n,s=Di.get(r);s||(s=new Map,Di.set(r,s)),s.set(o,t)}Wl.set(t,n.reverse())}}function Y1(e){return e>=Ms&&e<GC}function ZC(e,t){if(e>=ra&&e<KC&&t>=oa&&t<JC)return Ms+(e-ra)*ia+(t-oa)*Uo;if(Y1(e)&&t>sa&&t<YC&&(e-Ms)%Uo==0)return e+(t-sa);{let n=Di.get(e);return n&&(n=n.get(t),n)?n:-1}}function X1(e){ql||XC();let t=[],n=[],r=!1;function o(s){let i=ql.get(s);i&&(r=!0,s|=i),t.push(s)}for(let s of e)for(;;){if(s<128)t.push(s);else if(Y1(s)){let i=s-Ms,a=i/ia|0,c=i%ia/Uo|0,l=i%Uo;o(ra+a),o(oa+c),l>0&&o(sa+l)}else{let i=Wl.get(s);i?n.push(...i):o(s)}if(!n.length)break;s=n.pop()}if(r&&t.length>1){let s=cs(t[0]);for(let i=1;i<t.length;i++){let a=cs(t[i]);if(a==0||s<=a){s=a;continue}let c=i-1;for(;;){let l=t[c+1];if(t[c+1]=t[c],t[c]=l,!c||(s=cs(t[--c]),s<=a))break}s=cs(t[i])}}return t}function eA(e){let t=[],n=[],r=-1,o=0;for(let s of e){let i=cs(s),a=J1(s);if(r==-1)i==0?r=a:t.push(a);else if(o>0&&o>=i)i==0?(t.push(r,...n),n.length=0,r=a):n.push(a),o=i;else{let c=ZC(r,a);c>=0?r=c:o==0&&i==0?(t.push(r),r=a):(n.push(a),o=i)}}return r>=0&&t.push(r,...n),t}function Z1(e){return X1(e).map(J1)}function tA(e){return eA(X1(e))}const f0=45,eg=".",tg=65039,ng=1,aa=e=>Array.from(e);function Ds(e,t){return e.P.has(t)||e.Q.has(t)}class nA extends Array{get is_emoji(){return!0}}let zl,rg,yr,Ql,og,fo,xc,eo,fr,h0,Hl;function td(){if(zl)return;let e=W1(NC);const t=()=>Ns(e),n=()=>new Set(t()),r=(u,f)=>f.forEach(d=>u.add(d));zl=new Map(Q1(e)),rg=n(),yr=t(),Ql=new Set(t().map(u=>yr[u])),yr=new Set(yr),og=n(),n();let o=z1(e),s=e();const i=()=>{let u=new Set;return t().forEach(f=>r(u,o[f])),r(u,t()),u};fo=Fs(u=>{let f=Fs(e).map(d=>d+96);if(f.length){let d=u>=s;f[0]-=32,f=Lo(f),d&&(f=`Restricted[${f}]`);let h=i(),g=i(),m=!e();return{N:f,P:h,Q:g,M:m,R:d}}}),xc=n(),eo=new Map;let a=t().concat(aa(xc)).sort((u,f)=>u-f);a.forEach((u,f)=>{let d=e(),h=a[f]=d?a[f-d]:{V:[],M:new Map};h.V.push(u),xc.has(u)||eo.set(u,h)});for(let{V:u,M:f}of new Set(eo.values())){let d=[];for(let g of u){let m=fo.filter(y=>Ds(y,g)),b=d.find(({G:y})=>m.some(C=>y.has(C)));b||(b={G:new Set,V:[]},d.push(b)),b.V.push(g),r(b.G,m)}let h=d.flatMap(g=>aa(g.G));for(let{G:g,V:m}of d){let b=new Set(h.filter(y=>!g.has(y)));for(let y of m)f.set(y,b)}}fr=new Set;let c=new Set;const l=u=>fr.has(u)?c.add(u):fr.add(u);for(let u of fo){for(let f of u.P)l(f);for(let f of u.Q)l(f)}for(let u of fr)!eo.has(u)&&!c.has(u)&&eo.set(u,ng);r(fr,Z1(fr)),h0=qC(e).map(u=>nA.from(u)).sort(QC),Hl=new Map;for(let u of h0){let f=[Hl];for(let d of u){let h=f.map(g=>{let m=g.get(d);return m||(m=new Map,g.set(d,m)),m});d===tg?f.push(...h):f=h}for(let d of f)d.V=u}}function nd(e){return(sg(e)?"":`${rd(Ra([e]))} `)+V1(e)}function rd(e){return`"${e}"`}function rA(e){if(e.length>=4&&e[2]==f0&&e[3]==f0)throw new Error(`invalid label extension: "${Lo(e.slice(0,4))}"`)}function oA(e){for(let n=e.lastIndexOf(95);n>0;)if(e[--n]!==95)throw new Error("underscore allowed only at start")}function sA(e){let t=e[0],n=l0.get(t);if(n)throw us(`leading ${n}`);let r=e.length,o=-1;for(let s=1;s<r;s++){t=e[s];let i=l0.get(t);if(i){if(o==s)throw us(`${n} + ${i}`);o=s+1,n=i}}if(o==r)throw us(`trailing ${n}`)}function Ra(e,t=1/0,n=V1){let r=[];iA(e[0])&&r.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let o=0,s=e.length;for(let i=0;i<s;i++){let a=e[i];sg(a)&&(r.push(Lo(e.slice(o,i))),r.push(n(a)),o=i+1)}return r.push(Lo(e.slice(o,s))),r.join("")}function iA(e,t){return td(),yr.has(e)}function sg(e){return td(),og.has(e)}function aA(e){return dA(cA(e,tA,pA))}function cA(e,t,n){if(!e)return[];td();let r=0;return e.split(eg).map(o=>{let s=zC(o),i={input:s,offset:r};r+=s.length+1;try{let a=i.tokens=hA(s,t,n),c=a.length,l;if(!c)throw new Error("empty label");let u=i.output=a.flat();if(oA(u),!(i.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))rA(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(yr.has(u[0]))throw us("leading combining mark");for(let m=1;m<c;m++){let b=a[m];if(!b.is_emoji&&yr.has(b[0]))throw us(`emoji + combining mark: "${Lo(a[m-1])} + ${Ra([b[0]])}"`)}sA(u);let h=aa(new Set(d)),[g]=uA(h);fA(g,d),lA(g,h),l=g.N}}i.type=l}catch(a){i.error=a}return i})}function lA(e,t){let n,r=[];for(let o of t){let s=eo.get(o);if(s===ng)return;if(s){let i=s.M.get(o);if(n=n?n.filter(a=>i.has(a)):aa(i),!n.length)return}else r.push(o)}if(n){for(let o of n)if(r.every(s=>Ds(o,s)))throw new Error(`whole-script confusable: ${e.N}/${o.N}`)}}function uA(e){let t=fo;for(let n of e){let r=t.filter(o=>Ds(o,n));if(!r.length)throw fo.some(o=>Ds(o,n))?ag(t[0],n):ig(n);if(t=r,r.length==1)break}return t}function dA(e){return e.map(({input:t,error:n,output:r})=>{if(n){let o=n.message;throw new Error(e.length==1?o:`Invalid label ${rd(Ra(t,63))}: ${o}`)}return Lo(r)}).join(eg)}function ig(e){return new Error(`disallowed character: ${nd(e)}`)}function ag(e,t){let n=nd(t),r=fo.find(o=>o.P.has(t));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function us(e){return new Error(`illegal placement: ${e}`)}function fA(e,t){for(let n of t)if(!Ds(e,n))throw ag(e,n);if(e.M){let n=Z1(t);for(let r=1,o=n.length;r<o;r++)if(Ql.has(n[r])){let s=r+1;for(let i;s<o&&Ql.has(i=n[s]);s++)for(let a=r;a<s;a++)if(n[a]==i)throw new Error(`duplicate non-spacing marks: ${nd(i)}`);if(s-r>u0)throw new Error(`excessive non-spacing marks: ${rd(Ra(n.slice(r-1,s)))} (${s-r}/${u0})`);r=s}}}function hA(e,t,n){let r=[],o=[];for(e=e.slice().reverse();e.length;){let s=mA(e);if(s)o.length&&(r.push(t(o)),o=[]),r.push(n(s));else{let i=e.pop();if(fr.has(i))o.push(i);else{let a=zl.get(i);if(a)o.push(...a);else if(!rg.has(i))throw ig(i)}}}return o.length&&r.push(t(o)),r}function pA(e){return e.filter(t=>t!=tg)}function mA(e,t){let n=Hl,r,o=e.length;for(;o&&(n=n.get(e[--o]),!!n);){let{V:s}=n;s&&(r=s,e.length=o)}return r}function gA(e){return aA(e)}function bA(e){return gA(e)}const p0=fm({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),od=fm({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});var Un=function(){return Un=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Un.apply(this,arguments)};function yA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function wA(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Li="right-scroll-bar-position",Ui="width-before-scroll-bar",vA="with-scroll-bars-hidden",xA="--removed-body-scroll-bar-size";function Cc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function CA(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var AA=typeof window<"u"?J.useLayoutEffect:J.useEffect,m0=new WeakMap;function EA(e,t){var n=CA(null,function(r){return e.forEach(function(o){return Cc(o,r)})});return AA(function(){var r=m0.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Cc(a,null)}),s.forEach(function(a){o.has(a)||Cc(a,i)})}m0.set(n,e)},[e]),n}var ca=function(){return ca=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ca.apply(this,arguments)};function kA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function IA(e){return e}function jA(e,t){t===void 0&&(t=IA);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var u=i;i=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){i.push(u),l()},filter:function(u){return i=i.filter(u),n}}}};return o}function BA(e){e===void 0&&(e={});var t=jA(null);return t.options=ca({async:!0,ssr:!1},e),t}var cg=function(e){var t=e.sideCar,n=kA(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return J.createElement(r,ca({},n))};cg.isSideCarExport=!0;function SA(e,t){return e.useMedium(t),cg}var lg=BA(),Ac=function(){},Na=J.forwardRef(function(e,t){var n=J.useRef(null),r=J.useState({onScrollCapture:Ac,onWheelCapture:Ac,onTouchMoveCapture:Ac}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,h=e.noIsolation,g=e.inert,m=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,C=e.gapMode,v=yA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,x=EA([n,t]),E=Un(Un({},v),o);return J.createElement(J.Fragment,null,u&&J.createElement(w,{sideCar:lg,removeScrollBar:l,shards:f,noIsolation:h,inert:g,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:C}),i?J.cloneElement(J.Children.only(a),Un(Un({},E),{ref:x})):J.createElement(y,Un({},E,{className:c,ref:x}),a))});Na.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Na.classNames={fullWidth:Ui,zeroRight:Li};var PA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function OA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=PA();return t&&e.setAttribute("nonce",t),e}function TA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function RA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var NA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=OA())&&(TA(t,n),RA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},FA=function(){var e=NA();return function(t,n){J.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ug=function(){var e=FA(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},MA={left:0,top:0,right:0,gap:0},Ec=function(e){return parseInt(e||"",10)||0},DA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ec(n),Ec(r),Ec(o)]},LA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return MA;var t=DA(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},UA=ug(),ho="data-scroll-locked",_A=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
1676
|
-
.`.concat(
|
|
1675
|
+
`;function BC(e,t){return Object.defineProperty(e,"__recipe__",{value:t,writable:!1}),e}var _1=BC;function $1(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");function n(r){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return{[t.defaultCondition]:r}}if(Array.isArray(r)){if(!("responsiveArray"in t))throw new Error("Responsive arrays are not supported");var o={};for(var s in t.responsiveArray)r[s]!=null&&(o[t.responsiveArray[s]]=r[s]);return o}return r}return _1(n,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:e.conditions}]})}function SC(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");var n=$1(e);function r(o,s){if(typeof o=="string"||typeof o=="number"||typeof o=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return s(o,t.defaultCondition)}var i=Array.isArray(o)?n(o):o,a={};for(var c in i)i[c]!=null&&(a[c]=s(i[c],c));return a}return _1(r,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:e.conditions}]})}function PC(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OC(e){var t=PC(e,"string");return typeof t=="symbol"?t:String(t)}function TC(e,t,n){return t=OC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c0(Object(n),!0).forEach(function(r){TC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var RC=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map(c=>c.styles)),s=Object.keys(o),i=s.filter(c=>"mappings"in o[c]),a=c=>{var l=[],u={},f=vc({},c),d=!1;for(var h of i){var g=c[h];if(g!=null){var m=o[h];d=!0;for(var b of m.mappings)u[b]=g,f[b]==null&&delete f[b]}}var y=d?vc(vc({},u),f):c,C=function(){var x=y[v],E=o[v];try{if(E.mappings)return 1;if(typeof x=="string"||typeof x=="number"){if(process.env.NODE_ENV!=="production"&&!E.values[x].defaultClass)throw new Error;l.push(E.values[x].defaultClass)}else if(Array.isArray(x))for(var A=0;A<x.length;A++){var I=x[A];if(I!=null){var S=E.responsiveArray[A];if(process.env.NODE_ENV!=="production"&&!E.values[I].conditions[S])throw new Error;l.push(E.values[I].conditions[S])}}else for(var T in x){var R=x[T];if(R!=null){if(process.env.NODE_ENV!=="production"&&!E.values[R].conditions[T])throw new Error;l.push(E.values[R].conditions[T])}}}catch(F){if(process.env.NODE_ENV!=="production"){class U extends Error{constructor(ne){super(ne),this.name="SprinklesError"}}var M=W=>typeof W=="string"?'"'.concat(W,'"'):W,N=(W,ne,ce)=>{throw new U('"'.concat(W,'" has no value ').concat(M(ne),". Possible values are ").concat(Object.keys(ce).map(M).join(", ")))};if(!E)throw new U('"'.concat(v,'" is not a valid sprinkle'));if((typeof x=="string"||typeof x=="number")&&(x in E.values||N(v,x,E.values),!E.values[x].defaultClass))throw new U('"'.concat(v,'" has no default condition. You must specify which conditions to target explicitly. Possible options are ').concat(Object.keys(E.values[x].conditions).map(M).join(", ")));if(typeof x=="object"){if(!("conditions"in E.values[Object.keys(E.values)[0]]))throw new U('"'.concat(v,'" is not a conditional property'));if(Array.isArray(x)){if(!("responsiveArray"in E))throw new U('"'.concat(v,'" does not support responsive arrays'));var q=E.responsiveArray.length;if(q<x.length)throw new U('"'.concat(v,'" only supports up to ').concat(q," breakpoints. You passed ").concat(x.length));for(var P of x)E.values[P]||N(v,P,E.values)}else for(var D in x){var _=x[D];if(_!=null&&(E.values[_]||N(v,_,E.values),!E.values[_].conditions[D]))throw new U('"'.concat(v,'" has no condition named ').concat(M(D),". Possible values are ").concat(Object.keys(E.values[_].conditions).map(M).join(", ")))}}}throw F}};for(var v in y)C();return e(l.join(" "))};return Object.assign(a,{properties:new Set(s)})},NC=e=>e,FC=function(){return RC(NC)(...arguments)};function W1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=W1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function q1(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=W1(e))&&(r&&(r+=" "),r+=t);return r}var MC="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";const l0=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),u0=4;function DC(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),o=1,s=[0,1];for(let x=1;x<r;x++)s.push(o+=n());let i=n(),a=t;t+=i;let c=0,l=0;function u(){return c==0&&(l=l<<8|e[t++],c=8),l>>--c&1}const f=31,d=2**f,h=d>>>1,g=h>>1,m=d-1;let b=0;for(let x=0;x<f;x++)b=b<<1|u();let y=[],C=0,v=d;for(;;){let x=Math.floor(((b-C+1)*o-1)/v),E=0,A=r;for(;A-E>1;){let T=E+A>>>1;x<s[T]?A=T:E=T}if(E==0)break;y.push(E);let I=C+Math.floor(v*s[E]/o),S=C+Math.floor(v*s[E+1]/o)-1;for(;!((I^S)&h);)b=b<<1&m|u(),I=I<<1&m,S=S<<1&m|1;for(;I&~S&g;)b=b&h|b<<1&m>>>1|u(),I=I<<1^h,S=(S^h)<<1|h|1;C=I,v=1+S-I}let w=r-4;return y.map(x=>{switch(x-w){case 3:return w+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return w+256+(e[a++]<<8|e[a++]);case 1:return w+e[a++];default:return x-1}})}function LC(e){let t=0;return()=>e[t++]}function z1(e){return LC(DC(UC(e)))}function UC(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((o,s)=>t[o.charCodeAt(0)]=s);let n=e.length,r=new Uint8Array(6*n>>3);for(let o=0,s=0,i=0,a=0;o<n;o++)a=a<<6|t[e.charCodeAt(o)],i+=6,i>=8&&(r[s++]=a>>(i-=8));return r}function _C(e){return e&1?~e>>1:e>>1}function $C(e,t){let n=Array(e);for(let r=0,o=0;r<e;r++)n[r]=o+=_C(t());return n}function Ns(e,t=0){let n=[];for(;;){let r=e(),o=e();if(!o)break;t+=r;for(let s=0;s<o;s++)n.push(t+s);t+=o+1}return n}function Q1(e){return Fs(()=>{let t=Ns(e);if(t.length)return t})}function H1(e){let t=[];for(;;){let n=e();if(n==0)break;t.push(WC(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(qC(n,e))}return t.flat()}function Fs(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function G1(e,t,n){let r=Array(e).fill().map(()=>[]);for(let o=0;o<t;o++)$C(e,n).forEach((s,i)=>r[i].push(s));return r}function WC(e,t){let n=1+t(),r=t(),o=Fs(t);return G1(o.length,1+e,t).flatMap((i,a)=>{let[c,...l]=i;return Array(o[a]).fill().map((u,f)=>{let d=f*r;return[c+f*n,l.map(h=>h+d)]})})}function qC(e,t){let n=1+t();return G1(n,1+e,t).map(o=>[o[0],o.slice(1)])}function zC(e){let t=[],n=Ns(e);return o(r([]),[]),t;function r(s){let i=e(),a=Fs(()=>{let c=Ns(e).map(l=>n[l]);if(c.length)return r(c)});return{S:i,B:a,Q:s}}function o({S:s,B:i},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&t.push(a);for(let l of i)for(let u of l.Q)o(l,[...a,u],c)}}}function QC(e){return e.toString(16).toUpperCase().padStart(2,"0")}function V1(e){return`{${QC(e)}}`}function HC(e){let t=[];for(let n=0,r=e.length;n<r;){let o=e.codePointAt(n);n+=o<65536?1:2,t.push(o)}return t}function Lo(e){let n=e.length;if(n<4096)return String.fromCodePoint(...e);let r=[];for(let o=0;o<n;)r.push(String.fromCodePoint(...e.slice(o,o+=4096)));return r.join("")}function GC(e,t){let n=e.length,r=n-t.length;for(let o=0;r==0&&o<n;o++)r=e[o]-t[o];return r}var VC="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";const Ms=44032,ra=4352,oa=4449,sa=4519,K1=19,J1=21,Uo=28,ia=J1*Uo,KC=K1*ia,JC=Ms+KC,YC=ra+K1,XC=oa+J1,ZC=sa+Uo;function cs(e){return e>>24&255}function Y1(e){return e&16777215}let Wl,d0,ql,Di;function eA(){let e=z1(VC);Wl=new Map(Q1(e).flatMap((t,n)=>t.map(r=>[r,n+1<<24]))),d0=new Set(Ns(e)),ql=new Map,Di=new Map;for(let[t,n]of H1(e)){if(!d0.has(t)&&n.length==2){let[r,o]=n,s=Di.get(r);s||(s=new Map,Di.set(r,s)),s.set(o,t)}ql.set(t,n.reverse())}}function X1(e){return e>=Ms&&e<JC}function tA(e,t){if(e>=ra&&e<YC&&t>=oa&&t<XC)return Ms+(e-ra)*ia+(t-oa)*Uo;if(X1(e)&&t>sa&&t<ZC&&(e-Ms)%Uo==0)return e+(t-sa);{let n=Di.get(e);return n&&(n=n.get(t),n)?n:-1}}function Z1(e){Wl||eA();let t=[],n=[],r=!1;function o(s){let i=Wl.get(s);i&&(r=!0,s|=i),t.push(s)}for(let s of e)for(;;){if(s<128)t.push(s);else if(X1(s)){let i=s-Ms,a=i/ia|0,c=i%ia/Uo|0,l=i%Uo;o(ra+a),o(oa+c),l>0&&o(sa+l)}else{let i=ql.get(s);i?n.push(...i):o(s)}if(!n.length)break;s=n.pop()}if(r&&t.length>1){let s=cs(t[0]);for(let i=1;i<t.length;i++){let a=cs(t[i]);if(a==0||s<=a){s=a;continue}let c=i-1;for(;;){let l=t[c+1];if(t[c+1]=t[c],t[c]=l,!c||(s=cs(t[--c]),s<=a))break}s=cs(t[i])}}return t}function nA(e){let t=[],n=[],r=-1,o=0;for(let s of e){let i=cs(s),a=Y1(s);if(r==-1)i==0?r=a:t.push(a);else if(o>0&&o>=i)i==0?(t.push(r,...n),n.length=0,r=a):n.push(a),o=i;else{let c=tA(r,a);c>=0?r=c:o==0&&i==0?(t.push(r),r=a):(n.push(a),o=i)}}return r>=0&&t.push(r,...n),t}function eg(e){return Z1(e).map(Y1)}function rA(e){return nA(Z1(e))}const f0=45,tg=".",ng=65039,rg=1,aa=e=>Array.from(e);function Ds(e,t){return e.P.has(t)||e.Q.has(t)}class oA extends Array{get is_emoji(){return!0}}let zl,og,yr,Ql,sg,fo,xc,eo,fr,h0,Hl;function td(){if(zl)return;let e=z1(MC);const t=()=>Ns(e),n=()=>new Set(t()),r=(u,f)=>f.forEach(d=>u.add(d));zl=new Map(H1(e)),og=n(),yr=t(),Ql=new Set(t().map(u=>yr[u])),yr=new Set(yr),sg=n(),n();let o=Q1(e),s=e();const i=()=>{let u=new Set;return t().forEach(f=>r(u,o[f])),r(u,t()),u};fo=Fs(u=>{let f=Fs(e).map(d=>d+96);if(f.length){let d=u>=s;f[0]-=32,f=Lo(f),d&&(f=`Restricted[${f}]`);let h=i(),g=i(),m=!e();return{N:f,P:h,Q:g,M:m,R:d}}}),xc=n(),eo=new Map;let a=t().concat(aa(xc)).sort((u,f)=>u-f);a.forEach((u,f)=>{let d=e(),h=a[f]=d?a[f-d]:{V:[],M:new Map};h.V.push(u),xc.has(u)||eo.set(u,h)});for(let{V:u,M:f}of new Set(eo.values())){let d=[];for(let g of u){let m=fo.filter(y=>Ds(y,g)),b=d.find(({G:y})=>m.some(C=>y.has(C)));b||(b={G:new Set,V:[]},d.push(b)),b.V.push(g),r(b.G,m)}let h=d.flatMap(g=>aa(g.G));for(let{G:g,V:m}of d){let b=new Set(h.filter(y=>!g.has(y)));for(let y of m)f.set(y,b)}}fr=new Set;let c=new Set;const l=u=>fr.has(u)?c.add(u):fr.add(u);for(let u of fo){for(let f of u.P)l(f);for(let f of u.Q)l(f)}for(let u of fr)!eo.has(u)&&!c.has(u)&&eo.set(u,rg);r(fr,eg(fr)),h0=zC(e).map(u=>oA.from(u)).sort(GC),Hl=new Map;for(let u of h0){let f=[Hl];for(let d of u){let h=f.map(g=>{let m=g.get(d);return m||(m=new Map,g.set(d,m)),m});d===ng?f.push(...h):f=h}for(let d of f)d.V=u}}function nd(e){return(ig(e)?"":`${rd(Ra([e]))} `)+V1(e)}function rd(e){return`"${e}"`}function sA(e){if(e.length>=4&&e[2]==f0&&e[3]==f0)throw new Error(`invalid label extension: "${Lo(e.slice(0,4))}"`)}function iA(e){for(let n=e.lastIndexOf(95);n>0;)if(e[--n]!==95)throw new Error("underscore allowed only at start")}function aA(e){let t=e[0],n=l0.get(t);if(n)throw us(`leading ${n}`);let r=e.length,o=-1;for(let s=1;s<r;s++){t=e[s];let i=l0.get(t);if(i){if(o==s)throw us(`${n} + ${i}`);o=s+1,n=i}}if(o==r)throw us(`trailing ${n}`)}function Ra(e,t=1/0,n=V1){let r=[];cA(e[0])&&r.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let o=0,s=e.length;for(let i=0;i<s;i++){let a=e[i];ig(a)&&(r.push(Lo(e.slice(o,i))),r.push(n(a)),o=i+1)}return r.push(Lo(e.slice(o,s))),r.join("")}function cA(e,t){return td(),yr.has(e)}function ig(e){return td(),sg.has(e)}function lA(e){return hA(uA(e,rA,gA))}function uA(e,t,n){if(!e)return[];td();let r=0;return e.split(tg).map(o=>{let s=HC(o),i={input:s,offset:r};r+=s.length+1;try{let a=i.tokens=mA(s,t,n),c=a.length,l;if(!c)throw new Error("empty label");let u=i.output=a.flat();if(iA(u),!(i.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))sA(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(yr.has(u[0]))throw us("leading combining mark");for(let m=1;m<c;m++){let b=a[m];if(!b.is_emoji&&yr.has(b[0]))throw us(`emoji + combining mark: "${Lo(a[m-1])} + ${Ra([b[0]])}"`)}aA(u);let h=aa(new Set(d)),[g]=fA(h);pA(g,d),dA(g,h),l=g.N}}i.type=l}catch(a){i.error=a}return i})}function dA(e,t){let n,r=[];for(let o of t){let s=eo.get(o);if(s===rg)return;if(s){let i=s.M.get(o);if(n=n?n.filter(a=>i.has(a)):aa(i),!n.length)return}else r.push(o)}if(n){for(let o of n)if(r.every(s=>Ds(o,s)))throw new Error(`whole-script confusable: ${e.N}/${o.N}`)}}function fA(e){let t=fo;for(let n of e){let r=t.filter(o=>Ds(o,n));if(!r.length)throw fo.some(o=>Ds(o,n))?cg(t[0],n):ag(n);if(t=r,r.length==1)break}return t}function hA(e){return e.map(({input:t,error:n,output:r})=>{if(n){let o=n.message;throw new Error(e.length==1?o:`Invalid label ${rd(Ra(t,63))}: ${o}`)}return Lo(r)}).join(tg)}function ag(e){return new Error(`disallowed character: ${nd(e)}`)}function cg(e,t){let n=nd(t),r=fo.find(o=>o.P.has(t));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function us(e){return new Error(`illegal placement: ${e}`)}function pA(e,t){for(let n of t)if(!Ds(e,n))throw cg(e,n);if(e.M){let n=eg(t);for(let r=1,o=n.length;r<o;r++)if(Ql.has(n[r])){let s=r+1;for(let i;s<o&&Ql.has(i=n[s]);s++)for(let a=r;a<s;a++)if(n[a]==i)throw new Error(`duplicate non-spacing marks: ${nd(i)}`);if(s-r>u0)throw new Error(`excessive non-spacing marks: ${rd(Ra(n.slice(r-1,s)))} (${s-r}/${u0})`);r=s}}}function mA(e,t,n){let r=[],o=[];for(e=e.slice().reverse();e.length;){let s=bA(e);if(s)o.length&&(r.push(t(o)),o=[]),r.push(n(s));else{let i=e.pop();if(fr.has(i))o.push(i);else{let a=zl.get(i);if(a)o.push(...a);else if(!og.has(i))throw ag(i)}}}return o.length&&r.push(t(o)),r}function gA(e){return e.filter(t=>t!=ng)}function bA(e,t){let n=Hl,r,o=e.length;for(;o&&(n=n.get(e[--o]),!!n);){let{V:s}=n;s&&(r=s,e.length=o)}return r}function yA(e){return lA(e)}function wA(e){return yA(e)}const p0=hm({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),od=hm({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});var Un=function(){return Un=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Un.apply(this,arguments)};function vA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function xA(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Li="right-scroll-bar-position",Ui="width-before-scroll-bar",CA="with-scroll-bars-hidden",AA="--removed-body-scroll-bar-size";function Cc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function EA(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var kA=typeof window<"u"?J.useLayoutEffect:J.useEffect,m0=new WeakMap;function IA(e,t){var n=EA(null,function(r){return e.forEach(function(o){return Cc(o,r)})});return kA(function(){var r=m0.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Cc(a,null)}),s.forEach(function(a){o.has(a)||Cc(a,i)})}m0.set(n,e)},[e]),n}var ca=function(){return ca=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ca.apply(this,arguments)};function jA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function BA(e){return e}function SA(e,t){t===void 0&&(t=BA);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var u=i;i=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){i.push(u),l()},filter:function(u){return i=i.filter(u),n}}}};return o}function PA(e){e===void 0&&(e={});var t=SA(null);return t.options=ca({async:!0,ssr:!1},e),t}var lg=function(e){var t=e.sideCar,n=jA(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return J.createElement(r,ca({},n))};lg.isSideCarExport=!0;function OA(e,t){return e.useMedium(t),lg}var ug=PA(),Ac=function(){},Na=J.forwardRef(function(e,t){var n=J.useRef(null),r=J.useState({onScrollCapture:Ac,onWheelCapture:Ac,onTouchMoveCapture:Ac}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,h=e.noIsolation,g=e.inert,m=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,C=e.gapMode,v=vA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,x=IA([n,t]),E=Un(Un({},v),o);return J.createElement(J.Fragment,null,u&&J.createElement(w,{sideCar:ug,removeScrollBar:l,shards:f,noIsolation:h,inert:g,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:C}),i?J.cloneElement(J.Children.only(a),Un(Un({},E),{ref:x})):J.createElement(y,Un({},E,{className:c,ref:x}),a))});Na.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Na.classNames={fullWidth:Ui,zeroRight:Li};var TA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function RA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=TA();return t&&e.setAttribute("nonce",t),e}function NA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function FA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var MA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=RA())&&(NA(t,n),FA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},DA=function(){var e=MA();return function(t,n){J.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dg=function(){var e=DA(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},LA={left:0,top:0,right:0,gap:0},Ec=function(e){return parseInt(e||"",10)||0},UA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ec(n),Ec(r),Ec(o)]},_A=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return LA;var t=UA(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$A=dg(),ho="data-scroll-locked",WA=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
1676
|
+
.`.concat(CA,` {
|
|
1677
1677
|
overflow: hidden `).concat(r,`;
|
|
1678
1678
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
1679
1679
|
}
|
|
@@ -1707,12 +1707,12 @@ ${i6(h)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
|
|
|
1707
1707
|
}
|
|
1708
1708
|
|
|
1709
1709
|
body[`).concat(ho,`] {
|
|
1710
|
-
`).concat(
|
|
1710
|
+
`).concat(AA,": ").concat(a,`px;
|
|
1711
1711
|
}
|
|
1712
|
-
`)},g0=function(){var e=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(e)?e:0}
|
|
1712
|
+
`)},g0=function(){var e=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(e)?e:0},qA=function(){J.useEffect(function(){return document.body.setAttribute(ho,(g0()+1).toString()),function(){var e=g0()-1;e<=0?document.body.removeAttribute(ho):document.body.setAttribute(ho,e.toString())}},[])},zA=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;qA();var s=J.useMemo(function(){return _A(o)},[o]);return J.createElement($A,{styles:WA(s,!t,o,n?"":"!important")})},Gl=!1;if(typeof window<"u")try{var Ii=Object.defineProperty({},"passive",{get:function(){return Gl=!0,!0}});window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch{Gl=!1}var Kr=Gl?{passive:!1}:!1,QA=function(e){return e.tagName==="TEXTAREA"},fg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!QA(e)&&n[t]==="visible")},HA=function(e){return fg(e,"overflowY")},GA=function(e){return fg(e,"overflowX")},b0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=hg(e,r);if(o){var s=pg(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},VA=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},KA=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hg=function(e,t){return e==="v"?HA(t):GA(t)},pg=function(e,t){return e==="v"?VA(t):KA(t)},JA=function(e,t){return e==="h"&&t==="rtl"?-1:1},YA=function(e,t,n,r,o){var s=JA(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,u=i>0,f=0,d=0;do{var h=pg(e,a),g=h[0],m=h[1],b=h[2],y=m-b-s*g;(g||y)&&hg(e,a)&&(f+=y,d+=g),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(f)<1||!u&&Math.abs(d)<1)&&(l=!0),l},ji=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},y0=function(e){return[e.deltaX,e.deltaY]},w0=function(e){return e&&"current"in e?e.current:e},XA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ZA=function(e){return`
|
|
1713
1713
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
1714
1714
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
1715
|
-
`)},XA=0,Jr=[];function ZA(e){var t=J.useRef([]),n=J.useRef([0,0]),r=J.useRef(),o=J.useState(XA++)[0],s=J.useState(ug)[0],i=J.useRef(e);J.useEffect(function(){i.current=e},[e]),J.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=wA([e.lockRef.current],(e.shards||[]).map(w0),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=J.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=ji(m),C=n.current,v="deltaX"in m?m.deltaX:C[0]-y[0],w="deltaY"in m?m.deltaY:C[1]-y[1],x,E=m.target,A=Math.abs(v)>Math.abs(w)?"h":"v";if("touches"in m&&A==="h"&&E.type==="range")return!1;var I=b0(A,E);if(!I)return!0;if(I?x=A:(x=A==="v"?"h":"v",I=b0(A,E)),!I)return!1;if(!r.current&&"changedTouches"in m&&(v||w)&&(r.current=x),!x)return!0;var S=r.current||x;return KA(S,b,m,S==="h"?v:w)},[]),c=J.useCallback(function(m){var b=m;if(!(!Jr.length||Jr[Jr.length-1]!==s)){var y="deltaY"in b?y0(b):ji(b),C=t.current.filter(function(x){return x.name===b.type&&(x.target===b.target||b.target===x.shadowParent)&&JA(x.delta,y)})[0];if(C&&C.should){b.cancelable&&b.preventDefault();return}if(!C){var v=(i.current.shards||[]).map(w0).filter(Boolean).filter(function(x){return x.contains(b.target)}),w=v.length>0?a(b,v[0]):!i.current.noIsolation;w&&b.cancelable&&b.preventDefault()}}},[]),l=J.useCallback(function(m,b,y,C){var v={name:m,delta:b,target:y,should:C,shadowParent:eE(y)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(w){return w!==v})},1)},[]),u=J.useCallback(function(m){n.current=ji(m),r.current=void 0},[]),f=J.useCallback(function(m){l(m.type,y0(m),m.target,a(m,e.lockRef.current))},[]),d=J.useCallback(function(m){l(m.type,ji(m),m.target,a(m,e.lockRef.current))},[]);J.useEffect(function(){return Jr.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Kr),document.addEventListener("touchmove",c,Kr),document.addEventListener("touchstart",u,Kr),function(){Jr=Jr.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,Kr),document.removeEventListener("touchmove",c,Kr),document.removeEventListener("touchstart",u,Kr)}},[]);var h=e.removeScrollBar,g=e.inert;return J.createElement(J.Fragment,null,g?J.createElement(s,{styles:YA(o)}):null,h?J.createElement(qA,{gapMode:e.gapMode}):null)}function eE(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tE=SA(lg,ZA);var pg=J.forwardRef(function(e,t){return J.createElement(Na,Un({},e,{ref:t,sideCar:tE}))});pg.classNames=Na.classNames;function v0(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function nE(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function mg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r={};for(var o in e){var s=e[o],i=[...n,o];typeof s=="string"||typeof s=="number"||s==null?r[o]=t(s,i):typeof s=="object"&&!Array.isArray(s)?r[o]=mg(s,t,i):console.warn('Skipping invalid key "'.concat(i.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return r}function x0(e,t){var n={};if(typeof t=="object"){var r=e;mg(t,(a,c)=>{if(a!=null){var l=nE(r,c);n[v0(l)]=String(a)}})}else{var o=e;for(var s in o){var i=o[s];i!=null&&(n[v0(s)]=i)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(c=>"".concat(c,":").concat(this[c])).join(";")},writable:!1}),n}var Gl={exports:{}};(function(e,t){(function(n,r){var o="1.0.41",s="",i="?",a="function",c="undefined",l="object",u="string",f="major",d="model",h="name",g="type",m="vendor",b="version",y="architecture",C="console",v="mobile",w="tablet",x="smarttv",E="wearable",A="embedded",I=500,S="Amazon",T="Apple",R="ASUS",M="BlackBerry",N="Browser",W="Chrome",P="Edge",D="Firefox",_="Google",F="Honor",U="Huawei",q="Lenovo",ne="LG",ce="Microsoft",xe="Motorola",Q="Nvidia",G="OnePlus",oe="Opera",ae="OPPO",Ie="Samsung",Oe="Sharp",Se="Sony",Nt="Xiaomi",rt="Zebra",ot="Facebook",At="Chromium OS",K="Mac OS",de=" Browser",Ft=function(ue,ge){var ie={};for(var Ce in ue)ge[Ce]&&ge[Ce].length%2===0?ie[Ce]=ge[Ce].concat(ue[Ce]):ie[Ce]=ue[Ce];return ie},st=function(ue){for(var ge={},ie=0;ie<ue.length;ie++)ge[ue[ie].toUpperCase()]=ue[ie];return ge},tr=function(ue,ge){return typeof ue===u?nr(ge).indexOf(nr(ue))!==-1:!1},nr=function(ue){return ue.toLowerCase()},Ua=function(ue){return typeof ue===u?ue.replace(/[^\d\.]/g,s).split(".")[0]:r},rr=function(ue,ge){if(typeof ue===u)return ue=ue.replace(/^\s\s*/,s),typeof ge===c?ue:ue.substring(0,I)},or=function(ue,ge){for(var ie=0,Ce,Mt,Et,be,re,gt;ie<ge.length&&!re;){var Gt=ge[ie],Qr=ge[ie+1];for(Ce=Mt=0;Ce<Gt.length&&!re&&Gt[Ce];)if(re=Gt[Ce++].exec(ue),re)for(Et=0;Et<Qr.length;Et++)gt=re[++Mt],be=Qr[Et],typeof be===l&&be.length>0?be.length===2?typeof be[1]==a?this[be[0]]=be[1].call(this,gt):this[be[0]]=be[1]:be.length===3?typeof be[1]===a&&!(be[1].exec&&be[1].test)?this[be[0]]=gt?be[1].call(this,gt,be[2]):r:this[be[0]]=gt?gt.replace(be[1],be[2]):r:be.length===4&&(this[be[0]]=gt?be[3].call(this,gt.replace(be[1],be[2])):r):this[be]=gt||r;ie+=2}},sr=function(ue,ge){for(var ie in ge)if(typeof ge[ie]===l&&ge[ie].length>0){for(var Ce=0;Ce<ge[ie].length;Ce++)if(tr(ge[ie][Ce],ue))return ie===i?r:ie}else if(tr(ge[ie],ue))return ie===i?r:ie;return ge.hasOwnProperty("*")?ge["*"]:ue},fi={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ko={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Jo={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,b],[/opios[\/ ]+([\w\.]+)/i],[b,[h,oe+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[b,[h,oe+" GX"]],[/\bopr\/([\w\.]+)/i],[b,[h,oe]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[b,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,b],[/quark(?:pc)?\/([-\w\.]+)/i],[b,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[b,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[h,"UC"+N]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[h,"Smart Lenovo "+N]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+N],b],[/\bfocus\/([\w\.]+)/i],[b,[h,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[h,oe+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[h,oe+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[h,"MIUI"+de]],[/fxios\/([\w\.-]+)/i],[b,[h,D]],[/\bqihoobrowser\/?([\w\.]*)/i],[b,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],b],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+de],b],[/samsungbrowser\/([\w\.]+)/i],[b,[h,Ie+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[b,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,b],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[b,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,ot],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[h,W+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,W+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[h,"Android "+N]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[b,sr,fi]],[/(webkit|khtml)\/([\w\.]+)/i],[h,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],b],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[h,D+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[h,[b,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[b,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,s,nr]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,nr]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[m,Ie],[g,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[m,Ie],[g,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[m,T],[g,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[m,T],[g,w]],[/(macintosh);/i],[d,[m,T]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[m,Oe],[g,v]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[d,[m,F],[g,w]],[/honor([-\w ]+)[;\)]/i],[d,[m,F],[g,v]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[d,[m,U],[g,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[m,U],[g,v]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[d,/_/g," "],[m,Nt],[g,w]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[d,/_/g," "],[m,Nt],[g,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[m,ae],[g,v]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[d,[m,sr,{OnePlus:["304","403","203"],"*":ae}],[g,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[m,"Vivo"],[g,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[m,"Realme"],[g,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[m,xe],[g,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[m,xe],[g,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[m,ne],[g,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[m,ne],[g,v]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[d,[m,q],[g,w]],[/(nokia) (t[12][01])/i],[m,d,[g,w]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[d,/_/g," "],[g,v],[m,"Nokia"]],[/(pixel (c|tablet))\b/i],[d,[m,_],[g,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[m,_],[g,v]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[m,Se],[g,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[m,Se],[g,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[m,G],[g,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[m,S],[g,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[m,S],[g,v]],[/(playbook);[-\w\),; ]+(rim)/i],[d,m,[g,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[m,M],[g,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[m,R],[g,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[m,R],[g,v]],[/(nexus 9)/i],[d,[m,"HTC"],[g,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[d,/_/g," "],[g,v]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[m,"TCL"],[g,w]],[/(itel) ((\w+))/i],[[m,nr],d,[g,sr,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[m,"Acer"],[g,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[m,"Meizu"],[g,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[m,"Ulefone"],[g,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[m,"Energizer"],[g,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[m,"Cat"],[g,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[m,"Smartfren"],[g,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[m,"Nothing"],[g,v]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[d,[m,"Archos"],[g,w]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[d,[m,"Archos"],[g,v]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[m,d,[g,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[m,d,[g,v]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,d,[g,w]],[/(surface duo)/i],[d,[m,ce],[g,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[m,"Fairphone"],[g,v]],[/(u304aa)/i],[d,[m,"AT&T"],[g,v]],[/\bsie-(\w*)/i],[d,[m,"Siemens"],[g,v]],[/\b(rct\w+) b/i],[d,[m,"RCA"],[g,w]],[/\b(venue[\d ]{2,7}) b/i],[d,[m,"Dell"],[g,w]],[/\b(q(?:mv|ta)\w+) b/i],[d,[m,"Verizon"],[g,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[m,"Barnes & Noble"],[g,w]],[/\b(tm\d{3}\w+) b/i],[d,[m,"NuVision"],[g,w]],[/\b(k88) b/i],[d,[m,"ZTE"],[g,w]],[/\b(nx\d{3}j) b/i],[d,[m,"ZTE"],[g,v]],[/\b(gen\d{3}) b.+49h/i],[d,[m,"Swiss"],[g,v]],[/\b(zur\d{3}) b/i],[d,[m,"Swiss"],[g,w]],[/\b((zeki)?tb.*\b) b/i],[d,[m,"Zeki"],[g,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,"Dragon Touch"],d,[g,w]],[/\b(ns-?\w{0,9}) b/i],[d,[m,"Insignia"],[g,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[m,"NextBook"],[g,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,"Voice"],d,[g,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,"LvTel"],d,[g,v]],[/\b(ph-1) /i],[d,[m,"Essential"],[g,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[m,"Envizen"],[g,w]],[/\b(trio[-\w\. ]+) b/i],[d,[m,"MachSpeed"],[g,w]],[/\btu_(1491) b/i],[d,[m,"Rotor"],[g,w]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[d,[m,Q],[g,w]],[/(sprint) (\w+)/i],[m,d,[g,v]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[m,ce],[g,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[m,rt],[g,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[m,rt],[g,v]],[/smart-tv.+(samsung)/i],[m,[g,x]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[m,Ie],[g,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,ne],[g,x]],[/(apple) ?tv/i],[m,[d,T+" TV"],[g,x]],[/crkey/i],[[d,W+"cast"],[m,_],[g,x]],[/droid.+aft(\w+)( bui|\))/i],[d,[m,S],[g,x]],[/(shield \w+ tv)/i],[d,[m,Q],[g,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[m,Oe],[g,x]],[/(bravia[\w ]+)( bui|\))/i],[d,[m,Se],[g,x]],[/(mi(tv|box)-?\w+) bui/i],[d,[m,Nt],[g,x]],[/Hbbtv.*(technisat) (.*);/i],[m,d,[g,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,rr],[d,rr],[g,x]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[d,[g,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,d,[g,C]],[/droid.+; (shield)( bui|\))/i],[d,[m,Q],[g,C]],[/(playstation \w+)/i],[d,[m,Se],[g,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[m,ce],[g,C]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[d,[m,Ie],[g,E]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[m,d,[g,E]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[d,[m,ae],[g,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[m,T],[g,E]],[/(opwwe\d{3})/i],[d,[m,G],[g,E]],[/(moto 360)/i],[d,[m,xe],[g,E]],[/(smartwatch 3)/i],[d,[m,Se],[g,E]],[/(g watch r)/i],[d,[m,ne],[g,E]],[/droid.+; (wt63?0{2,3})\)/i],[d,[m,rt],[g,E]],[/droid.+; (glass) \d/i],[d,[m,_],[g,E]],[/(pico) (4|neo3(?: link|pro)?)/i],[m,d,[g,E]],[/; (quest( \d| pro)?)/i],[d,[m,ot],[g,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[g,A]],[/(aeobc)\b/i],[d,[m,S],[g,A]],[/(homepod).+mac os/i],[d,[m,T],[g,A]],[/windows iot/i],[[g,A]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[g,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[g,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,v]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[d,[m,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[h,P+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[h,b],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,b],[/ladybird\//i],[[h,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,b],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[h,[b,sr,Ko]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,sr,Ko],[h,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,K],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,h],[/(ubuntu) ([\w\.]+) like android/i],[[h,/(.+)/,"$1 Touch"],b],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[h,b],[/\(bb(10);/i],[b,[h,M]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[b,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[h,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[h,W+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,At],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,b],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,b]]},mt=function(ue,ge){if(typeof ue===l&&(ge=ue,ue=r),!(this instanceof mt))return new mt(ue,ge).getResult();var ie=typeof n!==c&&n.navigator?n.navigator:r,Ce=ue||(ie&&ie.userAgent?ie.userAgent:s),Mt=ie&&ie.userAgentData?ie.userAgentData:r,Et=ge?Ft(Jo,ge):Jo,be=ie&&ie.userAgent==Ce;return this.getBrowser=function(){var re={};return re[h]=r,re[b]=r,or.call(re,Ce,Et.browser),re[f]=Ua(re[b]),be&&ie&&ie.brave&&typeof ie.brave.isBrave==a&&(re[h]="Brave"),re},this.getCPU=function(){var re={};return re[y]=r,or.call(re,Ce,Et.cpu),re},this.getDevice=function(){var re={};return re[m]=r,re[d]=r,re[g]=r,or.call(re,Ce,Et.device),be&&!re[g]&&Mt&&Mt.mobile&&(re[g]=v),be&&re[d]=="Macintosh"&&ie&&typeof ie.standalone!==c&&ie.maxTouchPoints&&ie.maxTouchPoints>2&&(re[d]="iPad",re[g]=w),re},this.getEngine=function(){var re={};return re[h]=r,re[b]=r,or.call(re,Ce,Et.engine),re},this.getOS=function(){var re={};return re[h]=r,re[b]=r,or.call(re,Ce,Et.os),be&&!re[h]&&Mt&&Mt.platform&&Mt.platform!="Unknown"&&(re[h]=Mt.platform.replace(/chrome os/i,At).replace(/macos/i,K)),re},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ce},this.setUA=function(re){return Ce=typeof re===u&&re.length>I?rr(re,I):re,this},this.setUA(Ce),this};mt.VERSION=o,mt.BROWSER=st([h,b,f]),mt.CPU=st([y]),mt.DEVICE=st([d,m,g,C,v,x,w,E,A]),mt.ENGINE=mt.OS=st([h,b]),e.exports&&(t=e.exports=mt),t.UAParser=mt;var dn=typeof n!==c&&(n.jQuery||n.Zepto);if(dn&&!dn.ua){var ir=new mt;dn.ua=ir.getResult(),dn.ua.get=function(){return ir.getUA()},dn.ua.set=function(ue){ir.setUA(ue);var ge=ir.getResult();for(var ie in ge)dn.ua[ie]=ge[ie]}}})(typeof window=="object"?window:Eh)})(Gl,Gl.exports);var rE=Gl.exports;/*!
|
|
1715
|
+
`)},eE=0,Jr=[];function tE(e){var t=J.useRef([]),n=J.useRef([0,0]),r=J.useRef(),o=J.useState(eE++)[0],s=J.useState(dg)[0],i=J.useRef(e);J.useEffect(function(){i.current=e},[e]),J.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=xA([e.lockRef.current],(e.shards||[]).map(w0),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=J.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=ji(m),C=n.current,v="deltaX"in m?m.deltaX:C[0]-y[0],w="deltaY"in m?m.deltaY:C[1]-y[1],x,E=m.target,A=Math.abs(v)>Math.abs(w)?"h":"v";if("touches"in m&&A==="h"&&E.type==="range")return!1;var I=b0(A,E);if(!I)return!0;if(I?x=A:(x=A==="v"?"h":"v",I=b0(A,E)),!I)return!1;if(!r.current&&"changedTouches"in m&&(v||w)&&(r.current=x),!x)return!0;var S=r.current||x;return YA(S,b,m,S==="h"?v:w)},[]),c=J.useCallback(function(m){var b=m;if(!(!Jr.length||Jr[Jr.length-1]!==s)){var y="deltaY"in b?y0(b):ji(b),C=t.current.filter(function(x){return x.name===b.type&&(x.target===b.target||b.target===x.shadowParent)&&XA(x.delta,y)})[0];if(C&&C.should){b.cancelable&&b.preventDefault();return}if(!C){var v=(i.current.shards||[]).map(w0).filter(Boolean).filter(function(x){return x.contains(b.target)}),w=v.length>0?a(b,v[0]):!i.current.noIsolation;w&&b.cancelable&&b.preventDefault()}}},[]),l=J.useCallback(function(m,b,y,C){var v={name:m,delta:b,target:y,should:C,shadowParent:nE(y)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(w){return w!==v})},1)},[]),u=J.useCallback(function(m){n.current=ji(m),r.current=void 0},[]),f=J.useCallback(function(m){l(m.type,y0(m),m.target,a(m,e.lockRef.current))},[]),d=J.useCallback(function(m){l(m.type,ji(m),m.target,a(m,e.lockRef.current))},[]);J.useEffect(function(){return Jr.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Kr),document.addEventListener("touchmove",c,Kr),document.addEventListener("touchstart",u,Kr),function(){Jr=Jr.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,Kr),document.removeEventListener("touchmove",c,Kr),document.removeEventListener("touchstart",u,Kr)}},[]);var h=e.removeScrollBar,g=e.inert;return J.createElement(J.Fragment,null,g?J.createElement(s,{styles:ZA(o)}):null,h?J.createElement(zA,{gapMode:e.gapMode}):null)}function nE(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rE=OA(ug,tE);var mg=J.forwardRef(function(e,t){return J.createElement(Na,Un({},e,{ref:t,sideCar:rE}))});mg.classNames=Na.classNames;function v0(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function oE(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function gg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r={};for(var o in e){var s=e[o],i=[...n,o];typeof s=="string"||typeof s=="number"||s==null?r[o]=t(s,i):typeof s=="object"&&!Array.isArray(s)?r[o]=gg(s,t,i):console.warn('Skipping invalid key "'.concat(i.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return r}function x0(e,t){var n={};if(typeof t=="object"){var r=e;gg(t,(a,c)=>{if(a!=null){var l=oE(r,c);n[v0(l)]=String(a)}})}else{var o=e;for(var s in o){var i=o[s];i!=null&&(n[v0(s)]=i)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(c=>"".concat(c,":").concat(this[c])).join(";")},writable:!1}),n}var Vl={exports:{}};(function(e,t){(function(n,r){var o="1.0.41",s="",i="?",a="function",c="undefined",l="object",u="string",f="major",d="model",h="name",g="type",m="vendor",b="version",y="architecture",C="console",v="mobile",w="tablet",x="smarttv",E="wearable",A="embedded",I=500,S="Amazon",T="Apple",R="ASUS",M="BlackBerry",N="Browser",q="Chrome",P="Edge",D="Firefox",_="Google",F="Honor",U="Huawei",W="Lenovo",ne="LG",ce="Microsoft",xe="Motorola",H="Nvidia",Q="OnePlus",oe="Opera",ae="OPPO",Ie="Samsung",Oe="Sharp",Se="Sony",Ft="Xiaomi",rt="Zebra",ot="Facebook",At="Chromium OS",G="Mac OS",pe=" Browser",Et=function(ue,ge){var ie={};for(var Ce in ue)ge[Ce]&&ge[Ce].length%2===0?ie[Ce]=ge[Ce].concat(ue[Ce]):ie[Ce]=ue[Ce];return ie},st=function(ue){for(var ge={},ie=0;ie<ue.length;ie++)ge[ue[ie].toUpperCase()]=ue[ie];return ge},tr=function(ue,ge){return typeof ue===u?nr(ge).indexOf(nr(ue))!==-1:!1},nr=function(ue){return ue.toLowerCase()},Ua=function(ue){return typeof ue===u?ue.replace(/[^\d\.]/g,s).split(".")[0]:r},rr=function(ue,ge){if(typeof ue===u)return ue=ue.replace(/^\s\s*/,s),typeof ge===c?ue:ue.substring(0,I)},or=function(ue,ge){for(var ie=0,Ce,Mt,kt,be,re,gt;ie<ge.length&&!re;){var Vt=ge[ie],Qr=ge[ie+1];for(Ce=Mt=0;Ce<Vt.length&&!re&&Vt[Ce];)if(re=Vt[Ce++].exec(ue),re)for(kt=0;kt<Qr.length;kt++)gt=re[++Mt],be=Qr[kt],typeof be===l&&be.length>0?be.length===2?typeof be[1]==a?this[be[0]]=be[1].call(this,gt):this[be[0]]=be[1]:be.length===3?typeof be[1]===a&&!(be[1].exec&&be[1].test)?this[be[0]]=gt?be[1].call(this,gt,be[2]):r:this[be[0]]=gt?gt.replace(be[1],be[2]):r:be.length===4&&(this[be[0]]=gt?be[3].call(this,gt.replace(be[1],be[2])):r):this[be]=gt||r;ie+=2}},sr=function(ue,ge){for(var ie in ge)if(typeof ge[ie]===l&&ge[ie].length>0){for(var Ce=0;Ce<ge[ie].length;Ce++)if(tr(ge[ie][Ce],ue))return ie===i?r:ie}else if(tr(ge[ie],ue))return ie===i?r:ie;return ge.hasOwnProperty("*")?ge["*"]:ue},fi={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ko={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Jo={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,b],[/opios[\/ ]+([\w\.]+)/i],[b,[h,oe+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[b,[h,oe+" GX"]],[/\bopr\/([\w\.]+)/i],[b,[h,oe]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[b,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,b],[/quark(?:pc)?\/([-\w\.]+)/i],[b,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[b,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[h,"UC"+N]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[h,"Smart Lenovo "+N]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+N],b],[/\bfocus\/([\w\.]+)/i],[b,[h,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[h,oe+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[h,oe+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[h,"MIUI"+pe]],[/fxios\/([\w\.-]+)/i],[b,[h,D]],[/\bqihoobrowser\/?([\w\.]*)/i],[b,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],b],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+pe],b],[/samsungbrowser\/([\w\.]+)/i],[b,[h,Ie+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[b,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,b],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[b,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,ot],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[h,q+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,q+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[h,"Android "+N]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[b,sr,fi]],[/(webkit|khtml)\/([\w\.]+)/i],[h,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],b],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[h,D+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[h,[b,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[b,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,s,nr]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,nr]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[m,Ie],[g,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[m,Ie],[g,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[m,T],[g,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[m,T],[g,w]],[/(macintosh);/i],[d,[m,T]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[m,Oe],[g,v]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[d,[m,F],[g,w]],[/honor([-\w ]+)[;\)]/i],[d,[m,F],[g,v]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[d,[m,U],[g,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[m,U],[g,v]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[d,/_/g," "],[m,Ft],[g,w]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[d,/_/g," "],[m,Ft],[g,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[m,ae],[g,v]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[d,[m,sr,{OnePlus:["304","403","203"],"*":ae}],[g,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[m,"Vivo"],[g,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[m,"Realme"],[g,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[m,xe],[g,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[m,xe],[g,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[m,ne],[g,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[m,ne],[g,v]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[d,[m,W],[g,w]],[/(nokia) (t[12][01])/i],[m,d,[g,w]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[d,/_/g," "],[g,v],[m,"Nokia"]],[/(pixel (c|tablet))\b/i],[d,[m,_],[g,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[m,_],[g,v]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[m,Se],[g,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[m,Se],[g,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[m,Q],[g,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[m,S],[g,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[m,S],[g,v]],[/(playbook);[-\w\),; ]+(rim)/i],[d,m,[g,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[m,M],[g,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[m,R],[g,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[m,R],[g,v]],[/(nexus 9)/i],[d,[m,"HTC"],[g,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[d,/_/g," "],[g,v]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[m,"TCL"],[g,w]],[/(itel) ((\w+))/i],[[m,nr],d,[g,sr,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[m,"Acer"],[g,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[m,"Meizu"],[g,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[m,"Ulefone"],[g,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[m,"Energizer"],[g,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[m,"Cat"],[g,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[m,"Smartfren"],[g,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[m,"Nothing"],[g,v]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[d,[m,"Archos"],[g,w]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[d,[m,"Archos"],[g,v]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[m,d,[g,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[m,d,[g,v]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,d,[g,w]],[/(surface duo)/i],[d,[m,ce],[g,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[m,"Fairphone"],[g,v]],[/(u304aa)/i],[d,[m,"AT&T"],[g,v]],[/\bsie-(\w*)/i],[d,[m,"Siemens"],[g,v]],[/\b(rct\w+) b/i],[d,[m,"RCA"],[g,w]],[/\b(venue[\d ]{2,7}) b/i],[d,[m,"Dell"],[g,w]],[/\b(q(?:mv|ta)\w+) b/i],[d,[m,"Verizon"],[g,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[m,"Barnes & Noble"],[g,w]],[/\b(tm\d{3}\w+) b/i],[d,[m,"NuVision"],[g,w]],[/\b(k88) b/i],[d,[m,"ZTE"],[g,w]],[/\b(nx\d{3}j) b/i],[d,[m,"ZTE"],[g,v]],[/\b(gen\d{3}) b.+49h/i],[d,[m,"Swiss"],[g,v]],[/\b(zur\d{3}) b/i],[d,[m,"Swiss"],[g,w]],[/\b((zeki)?tb.*\b) b/i],[d,[m,"Zeki"],[g,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,"Dragon Touch"],d,[g,w]],[/\b(ns-?\w{0,9}) b/i],[d,[m,"Insignia"],[g,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[m,"NextBook"],[g,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,"Voice"],d,[g,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,"LvTel"],d,[g,v]],[/\b(ph-1) /i],[d,[m,"Essential"],[g,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[m,"Envizen"],[g,w]],[/\b(trio[-\w\. ]+) b/i],[d,[m,"MachSpeed"],[g,w]],[/\btu_(1491) b/i],[d,[m,"Rotor"],[g,w]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[d,[m,H],[g,w]],[/(sprint) (\w+)/i],[m,d,[g,v]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[m,ce],[g,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[m,rt],[g,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[m,rt],[g,v]],[/smart-tv.+(samsung)/i],[m,[g,x]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[m,Ie],[g,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,ne],[g,x]],[/(apple) ?tv/i],[m,[d,T+" TV"],[g,x]],[/crkey/i],[[d,q+"cast"],[m,_],[g,x]],[/droid.+aft(\w+)( bui|\))/i],[d,[m,S],[g,x]],[/(shield \w+ tv)/i],[d,[m,H],[g,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[m,Oe],[g,x]],[/(bravia[\w ]+)( bui|\))/i],[d,[m,Se],[g,x]],[/(mi(tv|box)-?\w+) bui/i],[d,[m,Ft],[g,x]],[/Hbbtv.*(technisat) (.*);/i],[m,d,[g,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,rr],[d,rr],[g,x]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[d,[g,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,d,[g,C]],[/droid.+; (shield)( bui|\))/i],[d,[m,H],[g,C]],[/(playstation \w+)/i],[d,[m,Se],[g,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[m,ce],[g,C]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[d,[m,Ie],[g,E]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[m,d,[g,E]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[d,[m,ae],[g,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[m,T],[g,E]],[/(opwwe\d{3})/i],[d,[m,Q],[g,E]],[/(moto 360)/i],[d,[m,xe],[g,E]],[/(smartwatch 3)/i],[d,[m,Se],[g,E]],[/(g watch r)/i],[d,[m,ne],[g,E]],[/droid.+; (wt63?0{2,3})\)/i],[d,[m,rt],[g,E]],[/droid.+; (glass) \d/i],[d,[m,_],[g,E]],[/(pico) (4|neo3(?: link|pro)?)/i],[m,d,[g,E]],[/; (quest( \d| pro)?)/i],[d,[m,ot],[g,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[g,A]],[/(aeobc)\b/i],[d,[m,S],[g,A]],[/(homepod).+mac os/i],[d,[m,T],[g,A]],[/windows iot/i],[[g,A]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[g,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[g,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,v]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[d,[m,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[h,P+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[h,b],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,b],[/ladybird\//i],[[h,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,b],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[h,[b,sr,Ko]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,sr,Ko],[h,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,G],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,h],[/(ubuntu) ([\w\.]+) like android/i],[[h,/(.+)/,"$1 Touch"],b],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[h,b],[/\(bb(10);/i],[b,[h,M]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[b,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[h,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[h,q+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,At],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,b],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,b]]},mt=function(ue,ge){if(typeof ue===l&&(ge=ue,ue=r),!(this instanceof mt))return new mt(ue,ge).getResult();var ie=typeof n!==c&&n.navigator?n.navigator:r,Ce=ue||(ie&&ie.userAgent?ie.userAgent:s),Mt=ie&&ie.userAgentData?ie.userAgentData:r,kt=ge?Et(Jo,ge):Jo,be=ie&&ie.userAgent==Ce;return this.getBrowser=function(){var re={};return re[h]=r,re[b]=r,or.call(re,Ce,kt.browser),re[f]=Ua(re[b]),be&&ie&&ie.brave&&typeof ie.brave.isBrave==a&&(re[h]="Brave"),re},this.getCPU=function(){var re={};return re[y]=r,or.call(re,Ce,kt.cpu),re},this.getDevice=function(){var re={};return re[m]=r,re[d]=r,re[g]=r,or.call(re,Ce,kt.device),be&&!re[g]&&Mt&&Mt.mobile&&(re[g]=v),be&&re[d]=="Macintosh"&&ie&&typeof ie.standalone!==c&&ie.maxTouchPoints&&ie.maxTouchPoints>2&&(re[d]="iPad",re[g]=w),re},this.getEngine=function(){var re={};return re[h]=r,re[b]=r,or.call(re,Ce,kt.engine),re},this.getOS=function(){var re={};return re[h]=r,re[b]=r,or.call(re,Ce,kt.os),be&&!re[h]&&Mt&&Mt.platform&&Mt.platform!="Unknown"&&(re[h]=Mt.platform.replace(/chrome os/i,At).replace(/macos/i,G)),re},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ce},this.setUA=function(re){return Ce=typeof re===u&&re.length>I?rr(re,I):re,this},this.setUA(Ce),this};mt.VERSION=o,mt.BROWSER=st([h,b,f]),mt.CPU=st([y]),mt.DEVICE=st([d,m,g,C,v,x,w,E,A]),mt.ENGINE=mt.OS=st([h,b]),e.exports&&(t=e.exports=mt),t.UAParser=mt;var dn=typeof n!==c&&(n.jQuery||n.Zepto);if(dn&&!dn.ua){var ir=new mt;dn.ua=ir.getResult(),dn.ua.get=function(){return ir.getUA()},dn.ua.set=function(ue){ir.setUA(ue);var ge=ir.getResult();for(var ie in ge)dn.ua[ie]=ge[ie]}}})(typeof window=="object"?window:kh)})(Vl,Vl.exports);var sE=Vl.exports;/*!
|
|
1716
1716
|
Copyright (c) 2023 Paul Miller (paulmillr.com)
|
|
1717
1717
|
The library paulmillr-qr is dual-licensed under the Apache 2.0 OR MIT license.
|
|
1718
1718
|
You can select a license of your choice.
|
|
@@ -1727,8 +1727,8 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
1727
1727
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1728
1728
|
See the License for the specific language governing permissions and
|
|
1729
1729
|
limitations under the License.
|
|
1730
|
-
*/const os={newline:10,reset:27};function oE(e){if(!Number.isSafeInteger(e))throw new Error(`integer expected: ${e}`)}function sE(e){if(!Number.isSafeInteger(e)||e<1||e>40)throw new Error(`Invalid version=${e}. Expected number [1..40]`)}function cr(e,t){return e.toString(2).padStart(t,"0")}function C0(e,t){const n=e%t;return n>=0?n:t+n}function Xt(e,t){return new Array(e).fill(t)}function kc(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}function A0(e){let t=0,n=0;for(const s of e)t=Math.max(t,s.length),n+=s.length;const r=new Uint8Array(n);let o=0;for(let s=0;s<t;s++)for(const i of e)s<i.length&&(r[o++]=i[s]);return r}function iE(){let e,t=1/0;return{add(n,r){n>=t||(e=r,t=n)},get:()=>e,score:()=>t}}function E0(e){return{has:t=>e.includes(t),decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})},encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(oE(n),n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})}}}function k0(e){if(e.length!==32)throw new Error("expects 32 element matrix");const t=[1431655765,858993459,252645135,16711935,65535];for(let n=0;n<5;n++){const r=t[n]>>>0,o=1<<n,s=o<<1;for(let i=0;i<32;i+=s)for(let a=0;a<o;a++){const c=i+a,l=c+o,u=e[c]>>>0,f=e[l]>>>0,d=(u>>>o^f)&r;e[c]=(u^d<<o)>>>0,e[l]=(f^d)>>>0}}}const ss=e=>1<<(e&31)>>>0,lr=(e,t)=>t===0?0:t===32?4294967295:(1<<t)-1<<e>>>0;class Ye{constructor(t,n){Kt(this,"defined");Kt(this,"value");Kt(this,"tailMask");Kt(this,"words");Kt(this,"fullWords");Kt(this,"height");Kt(this,"width");const{height:r,width:o}=Ye.size(t);if(this.height=r,this.width=o,this.tailMask=lr(0,o&31||32),this.words=Math.ceil(o/32)|0,this.fullWords=Math.floor(o/32)|0,this.value=new Uint32Array(this.words*r),this.defined=new Uint32Array(this.value.length),n){if(n.length!==r)throw new Error(`Bitmap: data height mismatch: exp=${r} got=${n.length}`);for(let s=0;s<r;s++){const i=n[s];if(!i||i.length!==o)throw new Error(`Bitmap: data width mismatch at y=${s}: exp=${o} got=${i==null?void 0:i.length}`);for(let a=0;a<o;a++)this.set(a,s,i[a])}}}static size(t,n){if(typeof t=="number"&&(t={height:t,width:t}),!Number.isSafeInteger(t.height)&&t.height!==1/0)throw new Error(`Bitmap: invalid height=${t.height} (${typeof t.height})`);if(!Number.isSafeInteger(t.width)&&t.width!==1/0)throw new Error(`Bitmap: invalid width=${t.width} (${typeof t.width})`);return n!==void 0&&(t={width:Math.min(t.width,n.width),height:Math.min(t.height,n.height)}),t}static fromString(t){t=t.replace(/^\n+/g,"").replace(/\n+$/g,"");const n=t.split(String.fromCharCode(os.newline)),r=n.length;let o;const s=[];for(const i of n){const a=i.split("").map(c=>{if(c==="X")return!0;if(c===" ")return!1;if(c!=="?")throw new Error(`Bitmap.fromString: unknown symbol=${c}`)});if(o!==void 0&&a.length!==o)throw new Error(`Bitmap.fromString different row sizes: width=${o} cur=${a.length}`);o=a.length,s.push(a)}return o===void 0&&(o=0),new Ye({height:r,width:o},s)}point(t){return this.get(t.x,t.y)}isInside(t){return 0<=t.x&&t.x<this.width&&0<=t.y&&t.y<this.height}size(t){if(!t)return{height:this.height,width:this.width};const{x:n,y:r}=this.xy(t);return{height:this.height-r,width:this.width-n}}xy(t){if(typeof t=="number"&&(t={x:t,y:t}),!Number.isSafeInteger(t.x))throw new Error(`Bitmap: invalid x=${t.x}`);if(!Number.isSafeInteger(t.y))throw new Error(`Bitmap: invalid y=${t.y}`);return t.x=C0(t.x,this.width),t.y=C0(t.y,this.height),t}wordIndex(t,n){return n*this.words+(t>>>5)}bitIndex(t,n){return{word:this.wordIndex(t,n),bit:t&31}}isDefined(t,n){const r=this.wordIndex(t,n),o=ss(t);return(this.defined[r]&o)!==0}get(t,n){const r=this.wordIndex(t,n),o=ss(t);return(this.value[r]&o)!==0}maskWord(t,n,r){const{defined:o,value:s}=this;o[t]|=n,s[t]=s[t]&~n|-r&n}set(t,n,r){r!==void 0&&this.maskWord(this.wordIndex(t,n),ss(t),r)}fillRectConst(t,n,r,o,s){if(r<=0||o<=0||s===void 0)return;const{value:i,defined:a,words:c}=this,l=t>>>5,u=t+r-1>>>5,f=t&31,d=t+r-1&31;for(let h=0;h<o;h++){const g=(n+h)*c;if(l===u){const m=lr(f,d-f+1);this.maskWord(g+l,m,s);continue}this.maskWord(g+l,lr(f,32-f),s);for(let m=l+1;m<u;m++)a[g+m]=4294967295,i[g+m]=s?4294967295:0;this.maskWord(g+u,lr(0,d+1),s)}}rectWords(t,n,r,o,s){for(let i=0;i<o;i++){const a=n+i;for(let c=0;c<r;){const l=t+c,{bit:u,word:f}=this.bitIndex(l,a),d=Math.min(32-u,r-c);s(f,l,c,i,d),c+=d}}}rect(t,n,r){const{x:o,y:s}=this.xy(t),{height:i,width:a}=Ye.size(n,this.size({x:o,y:s}));if(typeof r!="function")return this.fillRectConst(o,s,a,i,r),this;const{defined:c,value:l}=this;return this.rectWords(o,s,a,i,(u,f,d,h,g)=>{let m=0,b=l[u];for(let y=0;y<g;y++){const C=ss(f+y),v=r({x:d+y,y:h},(b&C)!==0);v!==void 0&&(m|=C,b=b&~C|-v&C)}c[u]|=m,l[u]=b}),this}rectRead(t,n,r){const{x:o,y:s}=this.xy(t),{height:i,width:a}=Ye.size(n,this.size({x:o,y:s})),{value:c}=this;return this.rectWords(o,s,a,i,(l,u,f,d,h)=>{const g=c[l];for(let m=0;m<h;m++){const b=ss(u+m);r({x:f+m,y:d},(g&b)!==0)}}),this}hLine(t,n,r){return this.rect(t,{width:n,height:1},r)}vLine(t,n,r){return this.rect(t,{width:1,height:n},r)}border(t=2,n){const r=this.height+2*t,o=this.width+2*t,s=new Ye({height:r,width:o});return s.rect(0,1/0,n),s.embed({x:t,y:t},this),s}embed(t,n){const{x:r,y:o}=this.xy(t),{height:s,width:i}=Ye.size(n.size(),this.size({x:r,y:o}));if(i<=0||s<=0)return this;const{value:a,defined:c}=this,{words:l,value:u}=n;for(let f=0;f<s;f++){const d=f*l;for(let h=0;h<i;){const g=r+h,{word:m,bit:b}=this.bitIndex(g,o+f),{word:y,bit:C}=n.bitIndex(h,f),v=Math.min(32-b,i-h),w=u[y],x=C&&y+1<d+l?u[y+1]:0,E=C?(w>>>C|x<<32-C)>>>0:w,A=lr(b,v),I=(E&lr(0,v))<<b>>>0;c[m]|=A,a[m]=a[m]&~A|I,h+=v}}return this}rectSlice(t,n=this.size()){const{x:r,y:o}=this.xy(t),{height:s,width:i}=Ye.size(n,this.size({x:r,y:o})),a=new Ye({height:s,width:i});return this.rectRead({x:r,y:o},{height:s,width:i},(c,l)=>{this.isDefined(r+c.x,o+c.y)&&a.set(c.x,c.y,l)}),a}transpose(){const{height:t,width:n,value:r,defined:o,words:s}=this,i=new Ye({height:n,width:t}),{words:a,value:c,defined:l,tailMask:u}=i,f=new Uint32Array(32),d=new Uint32Array(32);for(let h=0;h<t;h+=32)for(let g=0;g<s;g++){const m=Math.min(32,t-h);for(let b=0;b<m;b++){const y=this.wordIndex(32*g,h+b);f[b]=r[y],d[b]=o[y]}f.fill(0,m),d.fill(0,m),k0(f),k0(d);for(let b=0;b<32;b++){const y=g*32+b;if(y>=n)break;const C=i.wordIndex(h,y),v=h>>>5===a-1?u:4294967295;c[C]=f[b]&v,l[C]=d[b]&v}}return i}negate(){const t=this.defined.length;for(let n=0;n<t;n++)this.value[n]=~this.value[n],this.defined[n]=4294967295;return this}scale(t){if(!Number.isSafeInteger(t)||t>1024)throw new Error(`invalid scale factor: ${t}`);const{height:n,width:r}=this;return new Ye({height:t*n,width:t*r}).rect({x:0,y:0},1/0,({x:s,y:i})=>this.get(s/t|0,i/t|0))}clone(){const t=new Ye(this.size());return t.defined.set(this.defined),t.value.set(this.value),t}assertDrawn(){const{height:t,width:n,defined:r,tailMask:o,fullWords:s,words:i}=this;if(!(!t||!n))for(let a=0;a<t;a++){const c=a*i;for(let l=0;l<s;l++)if(r[c+l]!==4294967295)throw new Error("Invalid color type=undefined");if(i!==s&&(r[c+s]&o)!==o)throw new Error("Invalid color type=undefined")}}countPatternInRow(t,n,...r){if(n<=0||n>=32)throw new Error("wrong patternLen");const o=(1<<n)-1,{width:s,value:i,words:a}=this;let c=0;const l=this.wordIndex(0,t);for(let u=0,f=0;u<a;u++){const d=i[l+u],h=u===a-1&&s&31||32;for(let g=0;g<h;g++)if(f=(f<<1|d>>>g&1)&o,!(u*32+g+1<n)){for(const m of r)if(f===m){c++;break}}}return c}getRuns(t,n){const{width:r,value:o,words:s}=this;if(r===0)return;let i=0,a;const c=this.wordIndex(0,t);for(let l=0;l<s;l++){const u=o[c+l],f=l===s-1&&r&31||32;for(let d=0;d<f;d++){const h=(u&1<<d)!==0;if(h===a){i++;continue}a!==void 0&&n(i,a),a=h,i=1}}a!==void 0&&n(i,a)}popcnt(){const{height:t,width:n,words:r,fullWords:o,tailMask:s}=this;if(!t||!n)return 0;let i=0;for(let a=0;a<t;a++){const c=a*r;for(let l=0;l<o;l++)i+=kc(this.value[c+l]);r!==o&&(i+=kc(this.value[c+o]&s))}return i}countBoxes2x2(t){const{width:n,words:r}=this;if(n<2||(t|0)<0||t+1>=this.height)return 0;const o=this.wordIndex(0,t)|0,s=this.wordIndex(0,t+1)|0,a=(n&31)===0?2147483647:lr(0,n-1&31);let c=0;for(let l=0;l<r;l++){const u=this.value[o+l],f=this.value[s+l],d=~(u^f)>>>0,h=l+1<r?this.value[o+l+1]>>>0:0,g=~(u^(u>>>1|(h&1)<<31)>>>0)>>>0,m=l+1<r?this.value[s+l+1]>>>0:0,b=~(f^(f>>>1|(m&1)<<31)>>>0)>>>0;let y=(d&g&b)>>>0;l===r-1&&(y&=a),c+=kc(y)}return c}toString(){const t=String.fromCharCode(os.newline);let n="";for(let r=0;r<this.height;r++){let o="";for(let s=0;s<this.width;s++){const i=this.get(s,r);o+=this.isDefined(s,r)?i?"X":" ":"?"}n+=o+(r+1===this.height?"":t)}return n}toRaw(){const t=Array.from({length:this.height},()=>new Array(this.width));for(let n=0;n<this.height;n++){const r=t[n];for(let o=0;o<this.width;o++)r[o]=this.get(o,n)}return t}toASCII(){const{height:t,width:n}=this;let r="";for(let o=0;o<t;o+=2){for(let s=0;s<n;s++){const i=this.get(s,o),a=o+1>=t?!0:this.get(s,o+1);!i&&!a?r+="█":!i&&a?r+="▀":i&&!a?r+="▄":i&&a&&(r+=" ")}r+=String.fromCharCode(os.newline)}return r}toTerm(){const t=String.fromCharCode(os.reset),n=t+"[0m",r=t+"[1;47m "+n,o=t+"[40m "+n,s=String.fromCharCode(os.newline);let i="";for(let a=0;a<this.height;a++){for(let c=0;c<this.width;c++){const l=this.get(c,a);i+=l?o:r}i+=s}return i}toSVG(t=!0){let n=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,r="",o;return this.rectRead(0,1/0,(s,i)=>{if(!i)return;const{x:a,y:c}=s;if(!t){n+=`<rect x="${a}" y="${c}" width="1" height="1" />`;return}let l=`M${a} ${c}`;if(o){const f=`m${a-o.x} ${c-o.y}`;f.length<=l.length&&(l=f)}const u=a<10?`H${a}`:"h-1";r+=`${l}h1v1${u}Z`,o=s}),t&&(n+=`<path d="${r}"/>`),n+="</svg>",n}toGIF(){const t=a=>[a&255,a>>>8&255],n=[...t(this.width),...t(this.height)],r=[];this.rectRead(0,1/0,(a,c)=>r.push(+(c===!0)));const o=126,s=[71,73,70,56,55,97,...n,246,0,0,255,255,255,...Xt(3*127,0),44,0,0,0,0,...n,0,7],i=Math.floor(r.length/o);for(let a=0;a<i;a++)s.push(o+1,128,...r.slice(o*a,o*(a+1)).map(c=>+c));return s.push(r.length%o+1,128,...r.slice(i*o).map(a=>+a)),s.push(1,129,0,59),new Uint8Array(s)}toImage(t=!1){const{height:n,width:r}=this.size(),o=new Uint8Array(n*r*(t?3:4));let s=0;for(let i=0;i<n;i++)for(let a=0;a<r;a++){const c=this.get(a,i)?0:255;o[s++]=c,o[s++]=c,o[s++]=c,t||(o[s++]=255)}return{height:n,width:r,data:o}}}const I0=["low","medium","quartile","high"],j0=["numeric","alphanumeric","byte","kanji","eci"],aE=[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],cE={low:[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],medium:[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],quartile:[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],high:[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]},lE={low:[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],medium:[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],quartile:[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],high:[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]},Ve={size:{encode:e=>21+4*(e-1),decode:e=>(e-17)/4},sizeType:e=>Math.floor((e+7)/17),alignmentPatterns(e){if(e===1)return[];const t=6,n=Ve.size.encode(e)-t-1,r=n-t,o=Math.ceil(r/28);let s=Math.floor(r/o);s%2?s+=1:r%o*2>=o&&(s+=2);const i=[t];for(let a=1;a<o;a++)i.push(n-(o-a)*s);return i.push(n),i},ECCode:{low:1,medium:0,quartile:3,high:2},formatMask:21522,formatBits(e,t){const n=Ve.ECCode[e]<<3|t;let r=n;for(let o=0;o<10;o++)r=r<<1^(r>>9)*1335;return(n<<10|r)^Ve.formatMask},versionBits(e){let t=e;for(let n=0;n<12;n++)t=t<<1^(t>>11)*7973;return e<<12|t},alphabet:{numeric:E0("0123456789"),alphanumerc:E0("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")},lengthBits(e,t){return{numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]}[t][Ve.sizeType(e)]},modeBits:{numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"},capacity(e,t){const n=aE[e-1],r=cE[t][e-1],o=lE[t][e-1],s=Math.floor(n/o)-r,i=o-n%o;return{words:r,numBlocks:o,shortBlocks:i,blockLen:s,capacity:(n-r*o)*8,total:(r+s)*o+o-i}}},sd=[(e,t)=>(e+t)%2==0,(e,t)=>t%2==0,(e,t)=>e%3==0,(e,t)=>(e+t)%3==0,(e,t)=>(Math.floor(t/2)+Math.floor(e/3))%2==0,(e,t)=>e*t%2+e*t%3==0,(e,t)=>(e*t%2+e*t%3)%2==0,(e,t)=>((e+t)%2+e*t%3)%2==0],V={tables:(e=>{const t=Xt(256,0),n=Xt(256,0);for(let r=0,o=1;r<256;r++)t[r]=o,n[o]=r,o<<=1,o&256&&(o^=e);return{exp:t,log:n}})(285),exp:e=>V.tables.exp[e],log(e){if(e===0)throw new Error(`GF.log: invalid arg=${e}`);return V.tables.log[e]%255},mul(e,t){return e===0||t===0?0:V.tables.exp[(V.tables.log[e]+V.tables.log[t])%255]},add:(e,t)=>e^t,pow:(e,t)=>V.tables.exp[V.tables.log[e]*t%255],inv(e){if(e===0)throw new Error(`GF.inverse: invalid arg=${e}`);return V.tables.exp[255-V.tables.log[e]]},polynomial(e){if(e.length==0)throw new Error("GF.polymomial: invalid length");if(e[0]!==0)return e;let t=0;for(;t<e.length-1&&e[t]==0;t++);return e.slice(t)},monomial(e,t){if(e<0)throw new Error(`GF.monomial: invalid degree=${e}`);if(t==0)return[0];let n=Xt(e+1,0);return n[0]=t,V.polynomial(n)},degree:e=>e.length-1,coefficient:(e,t)=>e[V.degree(e)-t],mulPoly(e,t){if(e[0]===0||t[0]===0)return[0];const n=Xt(e.length+t.length-1,0);for(let r=0;r<e.length;r++)for(let o=0;o<t.length;o++)n[r+o]=V.add(n[r+o],V.mul(e[r],t[o]));return V.polynomial(n)},mulPolyScalar(e,t){if(t==0)return[0];if(t==1)return e;const n=Xt(e.length,0);for(let r=0;r<e.length;r++)n[r]=V.mul(e[r],t);return V.polynomial(n)},mulPolyMonomial(e,t,n){if(t<0)throw new Error("GF.mulPolyMonomial: invalid degree");if(n==0)return[0];const r=Xt(e.length+t,0);for(let o=0;o<e.length;o++)r[o]=V.mul(e[o],n);return V.polynomial(r)},addPoly(e,t){if(e[0]===0)return t;if(t[0]===0)return e;let n=e,r=t;n.length>r.length&&([n,r]=[r,n]);let o=Xt(r.length,0),s=r.length-n.length,i=r.slice(0,s);for(let a=0;a<i.length;a++)o[a]=i[a];for(let a=s;a<r.length;a++)o[a]=V.add(n[a-s],r[a]);return V.polynomial(o)},remainderPoly(e,t){const n=Array.from(e);for(let r=0;r<e.length-t.length+1;r++){const o=n[r];if(o!==0)for(let s=1;s<t.length;s++)t[s]!==0&&(n[r+s]=V.add(n[r+s],V.mul(t[s],o)))}return n.slice(e.length-t.length+1,n.length)},divisorPoly(e){let t=[1];for(let n=0;n<e;n++)t=V.mulPoly(t,[1,V.pow(2,n)]);return t},evalPoly(e,t){if(t==0)return V.coefficient(e,0);let n=e[0];for(let r=1;r<e.length;r++)n=V.add(V.mul(t,n),e[r]);return n},euclidian(e,t,n){V.degree(e)<V.degree(t)&&([e,t]=[t,e]);let r=e,o=t,s=[0],i=[1];for(;2*V.degree(o)>=n;){let l=r,u=s;if(r=o,s=i,r[0]===0)throw new Error("rLast[0] === 0");o=l;let f=[0];const d=V.inv(r[0]);for(;V.degree(o)>=V.degree(r)&&o[0]!==0;){const h=V.degree(o)-V.degree(r),g=V.mul(o[0],d);f=V.addPoly(f,V.monomial(h,g)),o=V.addPoly(o,V.mulPolyMonomial(r,h,g))}if(f=V.mulPoly(f,s),i=V.addPoly(f,u),V.degree(o)>=V.degree(r))throw new Error(`Division failed r: ${o}, rLast: ${r}`)}const a=V.coefficient(i,0);if(a==0)throw new Error("sigmaTilde(0) was zero");const c=V.inv(a);return[V.mulPolyScalar(i,c),V.mulPolyScalar(o,c)]}};function uE(e){return{encode(t){const n=V.divisorPoly(e),r=Array.from(t);return r.push(...n.slice(0,-1).fill(0)),Uint8Array.from(V.remainderPoly(r,n))},decode(t){const n=t.slice(),r=V.polynomial(Array.from(t));let o=Xt(e,0),s=!1;for(let f=0;f<e;f++){const d=V.evalPoly(r,V.exp(f));o[o.length-1-f]=d,d!==0&&(s=!0)}if(!s)return n;o=V.polynomial(o);const i=V.monomial(e,1),[a,c]=V.euclidian(i,o,e),l=Xt(V.degree(a),0);let u=0;for(let f=1;f<256&&u<l.length;f++)V.evalPoly(a,f)===0&&(l[u++]=V.inv(f));if(u!==l.length)throw new Error("RS.decode: invalid errors number");for(let f=0;f<l.length;f++){const d=n.length-1-V.log(l[f]);if(d<0)throw new Error("RS.decode: invalid error location");const h=V.inv(l[f]);let g=1;for(let m=0;m<l.length;m++)f!==m&&(g=V.mul(g,V.add(1,V.mul(l[m],h))));n[d]=V.add(n[d],V.mul(V.evalPoly(c,h),V.inv(g)))}return n}}}function dE(e,t){const{words:n,shortBlocks:r,numBlocks:o,blockLen:s,total:i}=Ve.capacity(e,t),a=uE(n);return{encode(c){const l=[],u=[];for(let g=0;g<o;g++){const m=g<r,b=s+(m?0:1);l.push(c.subarray(0,b)),u.push(a.encode(c.subarray(0,b))),c=c.subarray(b)}const f=A0(l),d=A0(u),h=new Uint8Array(f.length+d.length);return h.set(f),h.set(d,f.length),h},decode(c){if(c.length!==i)throw new Error(`interleave.decode: len(data)=${c.length}, total=${i}`);const l=[];for(let d=0;d<o;d++){const h=d<r;l.push(new Uint8Array(n+s+(h?0:1)))}let u=0;for(let d=0;d<s;d++)for(let h=0;h<o;h++)l[h][d]=c[u++];for(let d=r;d<o;d++)l[d][s]=c[u++];for(let d=s;d<s+n;d++)for(let h=0;h<o;h++){const g=h<r;l[h][d+(g?0:1)]=c[u++]}const f=[];for(const d of l)f.push(...Array.from(a.decode(d)).slice(0,-n));return Uint8Array.from(f)}}}function fE(e,t,n,r=!1){const o=Ve.size.encode(e);let s=new Ye(o+2);const i=new Ye(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);s=s.embed(0,i).embed({x:-i.width,y:0},i).embed({x:0,y:-i.height},i),s=s.rectSlice(1,o);const a=new Ye(1).rect(0,1,!0).border(1,!1).border(1,!0),c=Ve.alignmentPatterns(e);for(const l of c)for(const u of c)s.isDefined(u,l)||s.embed({x:u-2,y:l-2},a);s=s.hLine({x:0,y:6},1/0,({x:l})=>s.isDefined(l,6)?void 0:l%2==0).vLine({x:6,y:0},1/0,({y:l})=>s.isDefined(6,l)?void 0:l%2==0);{const l=Ve.formatBits(t,n),u=f=>!r&&(l>>f&1)==1;for(let f=0;f<6;f++)s.set(8,f,u(f));for(let f=6;f<8;f++)s.set(8,f+1,u(f));for(let f=8;f<15;f++)s.set(8,o-15+f,u(f));for(let f=0;f<8;f++)s.set(o-f-1,8,u(f));for(let f=8;f<9;f++)s.set(15-f-1+1,8,u(f));for(let f=9;f<15;f++)s.set(15-f-1,8,u(f));s.set(8,o-8,!r)}if(e>=7){const l=Ve.versionBits(e);for(let u=0;u<18;u+=1){const f=!r&&(l>>u&1)==1,d=Math.floor(u/3),h=u%3+o-8-3;s.set(h,d,f),s.set(d,h,f)}}return s}function hE(e,t,n){const r=e.height,o=sd[t];let s=-1,i=r-1;for(let a=r-1;a>0;a-=2){for(a==6&&(a=5);;i+=s){for(let c=0;c<2;c+=1){const l=a-c;e.isDefined(l,i)||n(l,i,o(l,i))}if(i+s<0||i+s>=r)break}s=-s}}function pE(e){let t="numeric";for(let n of e)if(!Ve.alphabet.numeric.has(n)&&(t="alphanumeric",!Ve.alphabet.alphanumerc.has(n)))return"byte";return t}function mE(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function B0(e,t,n,r,o=mE){let s="",i=n.length;if(r==="numeric"){const d=Ve.alphabet.numeric.decode(n.split("")),h=d.length;for(let g=0;g<h-2;g+=3)s+=cr(d[g]*100+d[g+1]*10+d[g+2],10);h%3===1?s+=cr(d[h-1],4):h%3===2&&(s+=cr(d[h-2]*10+d[h-1],7))}else if(r==="alphanumeric"){const d=Ve.alphabet.alphanumerc.decode(n.split("")),h=d.length;for(let g=0;g<h-1;g+=2)s+=cr(d[g]*45+d[g+1],11);h%2==1&&(s+=cr(d[h-1],6))}else if(r==="byte"){const d=o(n);i=d.length,s=Array.from(d).map(h=>cr(h,8)).join("")}else throw new Error("encode: unsupported type");const{capacity:a}=Ve.capacity(e,t),c=cr(i,Ve.lengthBits(e,r));let l=Ve.modeBits[r]+c+s;if(l.length>a)throw new Error("Capacity overflow");l+="0".repeat(Math.min(4,Math.max(0,a-l.length))),l.length%8&&(l+="0".repeat(8-l.length%8));const u="1110110000010001";for(let d=0;l.length!==a;d++)l+=u[d%u.length];const f=Uint8Array.from(l.match(/(.{8})/g).map(d=>+`0b${d}`));return dE(e,t).encode(f)}function S0(e,t,n,r,o=!1){const s=fE(e,t,r,o);let i=0;const a=8*n.length;if(hE(s,r,(c,l,u)=>{let f=!1;i<a&&(f=(n[i>>>3]>>(7-i&7)&1)!==0,i++),s.set(c,l,f!==u)}),i!==a)throw new Error("QR: bytes left after draw");return s}const gg=e=>{const t=e.map(n=>n?"1":"0").join("");return{len:t.length,n:+`0b${t}`}},bg=[!0,!1,!0,!0,!0,!1,!0],yg=[!1,!1,!1,!1],Bi=gg([...bg,...yg]),P0=gg([...yg,...bg]);function gE(e){const{width:t,height:n}=e,r=e.transpose();let o=0;for(let u=0;u<n;u++)e.getRuns(u,f=>{f>=5&&(o+=3+(f-5))});for(let u=0;u<t;u++)r.getRuns(u,f=>{f>=5&&(o+=3+(f-5))});let s=0;for(let u=0;u<n-1;u++)s+=3*e.countBoxes2x2(u);let i=0;for(let u=0;u<n;u++)i+=40*e.countPatternInRow(u,Bi.len,Bi.n,P0.n);for(let u=0;u<t;u++)i+=40*r.countPatternInRow(u,Bi.len,Bi.n,P0.n);let a=0;a=e.popcnt();const c=a/(n*t)*100,l=10*Math.floor(Math.abs(c-50)/5);return o+s+i+l}function bE(e,t,n,r){if(r===void 0){const o=iE();for(let s=0;s<sd.length;s++)o.add(gE(S0(e,t,n,s,!0)),s);r=o.get()}if(r===void 0)throw new Error("Cannot find mask");return S0(e,t,n,r)}function yE(e){if(!I0.includes(e))throw new Error(`Invalid error correction mode=${e}. Expected: ${I0}`)}function wE(e){if(!j0.includes(e))throw new Error(`Encoding: invalid mode=${e}. Expected: ${j0}`);if(e==="kanji"||e==="eci")throw new Error(`Encoding: ${e} is not supported (yet?).`)}function vE(e){if(![0,1,2,3,4,5,6,7].includes(e)||!sd[e])throw new Error(`Invalid mask=${e}. Expected number [0..7]`)}function xE(e,t="raw",n={}){const r=n.ecc!==void 0?n.ecc:"medium";yE(r);const o=n.encoding!==void 0?n.encoding:pE(e);wE(o),n.mask!==void 0&&vE(n.mask);let s=n.version,i,a=new Error("Unknown error");if(s!==void 0)sE(s),i=B0(s,r,e,o,n.textEncoder);else for(let u=1;u<=40;u++)try{i=B0(u,r,e,o,n.textEncoder),s=u;break}catch(f){a=f}if(!s||!i)throw a;let c=bE(s,r,i,n.mask);c.assertDrawn();const l=n.border===void 0?2:n.border;if(!Number.isSafeInteger(l))throw new Error(`invalid border type=${typeof l}`);if(c=c.border(l,!1),n.scale!==void 0&&(c=c.scale(n.scale)),t==="raw")return c.toRaw();if(t==="ascii")return c.toASCII();if(t==="svg")return c.toSVG(n.optimize);if(t==="gif")return c.toGIF();if(t==="term")return c.toTerm();throw new Error(`Unknown output: ${t}`)}function CE(e,t={}){const{errorCorrection:n,version:r}=t,o=xE(e,"raw",{border:0,ecc:n,scale:1,version:r});return{edgeLength:o.length,finderLength:7,grid:o,value:e}}function rn(e){const{arena:t,...n}=e;return O.jsxs(rn.Root,{...n,children:[O.jsx(rn.Finder,{}),O.jsx(rn.Cells,{}),t&&O.jsx(rn.Arena,{children:typeof t=="string"?O.jsx("img",{alt:"Arena",src:t,style:{borderRadius:1,height:"100%",objectFit:"cover",width:"100%"}}):t})]})}(function(e){e.Context=J.createContext(null);function t(s){const{children:i,size:a="100%",value:c,version:l,errorCorrection:u,...f}=s,d=J.useMemo(()=>(J.Children.map(i,v=>!J.isValidElement(v)||typeof v.type=="string"?null:"displayName"in v.type&&v.type.displayName==="Arena"?!0:null)??[]).some(Boolean),[i]),h=J.useMemo(()=>{let v=u;return d&&u==="low"&&(v="medium"),CE(c,{errorCorrection:v,version:l})},[c,d,u,l]),g=1,m=h.edgeLength*g,b=h.finderLength*g/2,y=d?Math.floor(m/4):0,C=J.useMemo(()=>({arenaSize:y,cellSize:g,edgeSize:m,qrcode:h,finderSize:b}),[y,m,h,b]);return O.jsx(e.Context.Provider,{value:C,children:O.jsxs("svg",{...f,width:a,height:a,viewBox:`0 0 ${m} ${m}`,xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("title",{children:"QR Code"}),i]})})}e.Root=t,function(s){s.displayName="Root"}(t=e.Root||(e.Root={}));function n(s){const{className:i,fill:a,innerClassName:c,radius:l=.25}=s,{cellSize:u,edgeSize:f,finderSize:d}=J.useContext(e.Context);function h({position:g}){let m=d-(d-u)-u/2;g==="top-right"&&(m=f-d-(d-u)-u/2);let b=d-(d-u)-u/2;g==="bottom-left"&&(b=f-d-(d-u)-u/2);let y=d-u*1.5;g==="top-right"&&(y=f-d-u*1.5);let C=d-u*1.5;return g==="bottom-left"&&(C=f-d-u*1.5),O.jsxs(O.Fragment,{children:[O.jsx("rect",{className:i,stroke:a??"currentColor",fill:"transparent",x:m,y:b,width:u+(d-u)*2,height:u+(d-u)*2,rx:2*l*(d-u),ry:2*l*(d-u),strokeWidth:u}),O.jsx("rect",{className:c,fill:a??"currentColor",x:y,y:C,width:u*3,height:u*3,rx:2*l*u,ry:2*l*u})]})}return O.jsxs(O.Fragment,{children:[O.jsx(h,{position:"top-left"}),O.jsx(h,{position:"top-right"}),O.jsx(h,{position:"bottom-left"})]})}e.Finder=n,function(s){s.displayName="Finder"}(n=e.Finder||(e.Finder={}));function r(s){const{className:i,fill:a="currentColor",inset:c=!0,radius:l=1}=s,{arenaSize:u,cellSize:f,qrcode:d}=J.useContext(e.Context),{edgeLength:h,finderLength:g}=d,m=J.useMemo(()=>{let b="";for(let y=0;y<d.grid.length;y++){const C=d.grid[y];if(C)for(let v=0;v<C.length;v++){if(!C[v])continue;const x=h/2-u/2,E=x+u;if(y>=x&&y<=E&&v>=x&&v<=E)continue;const A=y<g&&v<g,I=y<g&&v>=h-g,S=y>=h-g&&v<g;if(A||I||S)continue;const T=c?f*.1:0,R=(f-T*2)/2,M=v*f+f/2,N=y*f+f/2,W=M-R,P=M+R,D=N-R,_=N+R,F=l*R;b+=[`M ${W+F},${D}`,`L ${P-F},${D}`,`A ${F},${F} 0 0,1 ${P},${D+F}`,`L ${P},${_-F}`,`A ${F},${F} 0 0,1 ${P-F},${_}`,`L ${W+F},${_}`,`A ${F},${F} 0 0,1 ${W},${_-F}`,`L ${W},${D+F}`,`A ${F},${F} 0 0,1 ${W+F},${D}`,"z"].join(" ")}}return b},[u,f,h,g,d.grid,c,l]);return O.jsx("path",{className:i,d:m,fill:a})}e.Cells=r,function(s){s.displayName="Cells"}(r=e.Cells||(e.Cells={}));function o(s){const{children:i}=s,{arenaSize:a,cellSize:c,edgeSize:l}=J.useContext(e.Context),u=Math.ceil(l/2-a/2),f=a+a%2,d=c/2;return O.jsx("foreignObject",{x:u,y:u,width:f,height:f,children:O.jsx("div",{style:{alignItems:"center",display:"flex",fontSize:1,justifyContent:"center",height:"100%",overflow:"hidden",width:"100%",padding:d,boxSizing:"border-box"},children:i})})}e.Arena=o,function(s){s.displayName="Arena"}(o=e.Arena||(e.Arena={}))})(rn||(rn={}));id.type="metaMask";function id(e={}){let t,n,r,o,s,i,a,c;return l=>({id:"metaMaskSDK",name:"MetaMask",rdns:["io.metamask","io.metamask.mobile"],type:id.type,async setup(){const u=await this.getProvider();u!=null&&u.on&&(i||(i=this.onConnect.bind(this),u.on("connect",i)),o||(o=this.onAccountsChanged.bind(this),u.on("accountsChanged",o)))},async connect({chainId:u,isReconnecting:f,withCapabilities:d}={}){const h=await this.getProvider();a||(a=this.onDisplayUri,h.on("display_uri",a));let g=[];f&&(g=await this.getAccounts().catch(()=>[]));try{let m,b;g!=null&&g.length||(e.connectAndSign||e.connectWith?(e.connectAndSign?m=await t.connectAndSign({msg:e.connectAndSign}):e.connectWith&&(b=await t.connectWith({method:e.connectWith.method,params:e.connectWith.params})),g=await this.getAccounts()):g=(await t.connect()).map(v=>yt(v)));let y=await this.getChainId();if(u&&y!==u){const C=await this.switchChain({chainId:u}).catch(v=>{if(v.code===Ee.code)throw v;return{id:y}});y=(C==null?void 0:C.id)??y}return a&&(h.removeListener("display_uri",a),a=void 0),m?h.emit("connectAndSign",{accounts:g,chainId:y,signResponse:m}):b&&h.emit("connectWith",{accounts:g,chainId:y,connectWithResponse:b}),i&&(h.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),h.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),h.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),h.on("disconnect",c)),{accounts:d?g.map(C=>({address:C,capabilities:{}})):g,chainId:y}}catch(m){const b=m;throw b.code===Ee.code?new Ee(b):b.code===on.code?new on(b):b}},async disconnect(){const u=await this.getProvider();s&&(u.removeListener("chainChanged",s),s=void 0),c&&(u.removeListener("disconnect",c),c=void 0),i||(i=this.onConnect.bind(this),u.on("connect",i)),await t.terminate()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(d=>yt(d))},async getChainId(){const u=await this.getProvider(),f=u.getChainId()||await(u==null?void 0:u.request({method:"eth_chainId"}));return Number(f)},async getProvider(){async function u(){var m,b,y,C,v;const f=await(async()=>{const{default:w}=await Promise.resolve().then(()=>require("./metamask-sdk-5m3nvPtB.js"));return typeof w!="function"&&typeof w.default=="function"?w.default:w})(),d={};for(const w of l.chains)d[ee(w.id)]=(m=y1({chain:w,transports:l.transports}))==null?void 0:m[0];t=new f({_source:"wagmi",forceDeleteProvider:!1,forceInjectProvider:!1,injectProvider:!1,...e,readonlyRPCMap:d,dappMetadata:{...e.dappMetadata,name:(b=e.dappMetadata)!=null&&b.name?(y=e.dappMetadata)==null?void 0:y.name:"wagmi",url:(C=e.dappMetadata)!=null&&C.url?(v=e.dappMetadata)==null?void 0:v.url:typeof window<"u"?window.location.origin:"https://wagmi.sh"},useDeeplink:e.useDeeplink??!0});const h=await t.init(),g=h!=null&&h.activeProvider?h.activeProvider:t.getProvider();if(!g)throw new wn;return g}return n||(r||(r=u()),n=await r),n},async isAuthorized(){try{return!!(await Mo(()=>Tu(()=>this.getAccounts(),{timeout:200}),{delay:201,retryCount:3})).length}catch{return!1}},async switchChain({addEthereumChainParameter:u,chainId:f}){var b,y;const d=await this.getProvider(),h=l.chains.find(C=>C.id===f);if(!h)throw new qt(new Do);try{return await d.request({method:"wallet_switchEthereumChain",params:[{chainId:ee(f)}]}),await g(),await m(f),h}catch(C){const v=C;if(v.code===Ee.code)throw new Ee(v);if(v.code===4902||((y=(b=v==null?void 0:v.data)==null?void 0:b.originalError)==null?void 0:y.code)===4902)try{return await d.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(()=>{const{default:w,...x}=h.blockExplorers??{};if(u!=null&&u.blockExplorerUrls)return u.blockExplorerUrls;if(w)return[w.url,...Object.values(x).map(E=>E.url)]})(),chainId:ee(f),chainName:(u==null?void 0:u.chainName)??h.name,iconUrls:u==null?void 0:u.iconUrls,nativeCurrency:(u==null?void 0:u.nativeCurrency)??h.nativeCurrency,rpcUrls:(()=>{var w,x;return(w=u==null?void 0:u.rpcUrls)!=null&&w.length?u.rpcUrls:[((x=h.rpcUrls.default)==null?void 0:x.http[0])??""]})()}]}),await g(),await m(f),h}catch(w){const x=w;throw x.code===Ee.code?new Ee(x):new qt(x)}throw new qt(v)}async function g(){await Mo(async()=>{const C=cn(await d.request({method:"eth_chainId"}));if(C!==f)throw new Error("User rejected switch after adding network.");return C},{delay:50,retryCount:20})}async function m(C){await new Promise(v=>{const w=x=>{"chainId"in x&&x.chainId===C&&(l.emitter.off("change",w),v())};l.emitter.on("change",w),l.emitter.emit("change",{chainId:C})})}},async onAccountsChanged(u){if(u.length===0)if(t.isExtensionActive())this.onDisconnect();else return;else if(l.emitter.listenerCount("connect")){const f=(await this.getChainId()).toString();this.onConnect({chainId:f})}else l.emitter.emit("change",{accounts:u.map(f=>yt(f))})},onChainChanged(u){const f=Number(u);l.emitter.emit("change",{chainId:f})},async onConnect(u){const f=await this.getAccounts();if(f.length===0)return;const d=Number(u.chainId);l.emitter.emit("connect",{accounts:f,chainId:d});const h=await this.getProvider();i&&(h.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),h.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),h.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),h.on("disconnect",c))},async onDisconnect(u){const f=await this.getProvider();u&&u.code===1013&&f&&(await this.getAccounts()).length||(l.emitter.emit("disconnect"),s&&(f.removeListener("chainChanged",s),s=void 0),c&&(f.removeListener("disconnect",c),c=void 0),i||(i=this.onConnect.bind(this),f.on("connect",i)))},onDisplayUri(u){l.emitter.emit("message",{type:"display_uri",data:u})}})}ad.type="walletConnect";function ad(e){const t=e.isNewChainsStale??!0;let n,r;const o="eip155";let s,i,a,c,l,u;return f=>({id:"walletConnect",name:"WalletConnect",type:ad.type,async setup(){const d=await this.getProvider().catch(()=>null);d&&(a||(a=this.onConnect.bind(this),d.on("connect",a)),l||(l=this.onSessionDelete.bind(this),d.on("session_delete",l)))},async connect({chainId:d,withCapabilities:h,...g}={}){var m,b;try{const y=await this.getProvider();if(!y)throw new wn;c||(c=this.onDisplayUri,y.on("display_uri",c));let C=d;if(!C){const E=await((m=f.storage)==null?void 0:m.getItem("state"))??{};f.chains.some(I=>I.id===E.chainId)?C=E.chainId:C=(b=f.chains[0])==null?void 0:b.id}if(!C)throw new Error("No chains found on connector.");const v=await this.isChainsStale();if(y.session&&v&&await y.disconnect(),!y.session||v){const E=f.chains.filter(A=>A.id!==C).map(A=>A.id);await y.connect({optionalChains:[C,...E],..."pairingTopic"in g?{pairingTopic:g.pairingTopic}:{}}),this.setRequestedChainsIds(f.chains.map(A=>A.id))}const w=(await y.enable()).map(E=>yt(E));let x=await this.getChainId();if(d&&x!==d){const E=await this.switchChain({chainId:d}).catch(A=>{var I;if(A.code===Ee.code&&((I=A.cause)==null?void 0:I.message)!=="Missing or invalid. request() method: wallet_addEthereumChain")throw A;return{id:x}});x=(E==null?void 0:E.id)??x}return c&&(y.removeListener("display_uri",c),c=void 0),a&&(y.removeListener("connect",a),a=void 0),s||(s=this.onAccountsChanged.bind(this),y.on("accountsChanged",s)),i||(i=this.onChainChanged.bind(this),y.on("chainChanged",i)),u||(u=this.onDisconnect.bind(this),y.on("disconnect",u)),l||(l=this.onSessionDelete.bind(this),y.on("session_delete",l)),{accounts:h?w.map(E=>({address:E,capabilities:{}})):w,chainId:x}}catch(y){throw/(user rejected|connection request reset)/i.test(y==null?void 0:y.message)?new Ee(y):y}},async disconnect(){const d=await this.getProvider();try{await(d==null?void 0:d.disconnect())}catch(h){if(!/No matching key/i.test(h.message))throw h}finally{i&&(d==null||d.removeListener("chainChanged",i),i=void 0),u&&(d==null||d.removeListener("disconnect",u),u=void 0),a||(a=this.onConnect.bind(this),d==null||d.on("connect",a)),s&&(d==null||d.removeListener("accountsChanged",s),s=void 0),l&&(d==null||d.removeListener("session_delete",l),l=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(h=>yt(h))},async getProvider({chainId:d}={}){var g;async function h(){const m=f.chains.map(y=>y.id);if(!m.length)return;const{EthereumProvider:b}=await Promise.resolve().then(()=>require("./index.es-APae9KBk.js")).then(y=>y.index_es);return await b.init({...e,disableProviderPing:!0,optionalChains:m,projectId:e.projectId,rpcMap:Object.fromEntries(f.chains.map(y=>{const[C]=y1({chain:y,transports:f.transports});return[y.id,C]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=h()),n=await r,n==null||n.events.setMaxListeners(Number.POSITIVE_INFINITY)),d&&await((g=this.switchChain)==null?void 0:g.call(this,{chainId:d})),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[d,h]=await Promise.all([this.getAccounts(),this.getProvider()]);return d.length?await this.isChainsStale()&&h.session?(await h.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:d,chainId:h}){var b,y,C;const g=await this.getProvider();if(!g)throw new wn;const m=f.chains.find(v=>v.id===h);if(!m)throw new qt(new Do);try{await Promise.all([new Promise(w=>{const x=({chainId:E})=>{E===h&&(f.emitter.off("change",x),w())};f.emitter.on("change",x)}),g.request({method:"wallet_switchEthereumChain",params:[{chainId:ee(h)}]})]);const v=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...v,h]),m}catch(v){const w=v;if(/(user rejected)/i.test(w.message))throw new Ee(w);try{let x;d!=null&&d.blockExplorerUrls?x=d.blockExplorerUrls:x=(b=m.blockExplorers)!=null&&b.default.url?[(y=m.blockExplorers)==null?void 0:y.default.url]:[];let E;(C=d==null?void 0:d.rpcUrls)!=null&&C.length?E=d.rpcUrls:E=[...m.rpcUrls.default.http];const A={blockExplorerUrls:x,chainId:ee(h),chainName:(d==null?void 0:d.chainName)??m.name,iconUrls:d==null?void 0:d.iconUrls,nativeCurrency:(d==null?void 0:d.nativeCurrency)??m.nativeCurrency,rpcUrls:E};await g.request({method:"wallet_addEthereumChain",params:[A]});const I=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...I,h]),m}catch(x){throw new Ee(x)}}},onAccountsChanged(d){d.length===0?this.onDisconnect():f.emitter.emit("change",{accounts:d.map(h=>yt(h))})},onChainChanged(d){const h=Number(d);f.emitter.emit("change",{chainId:h})},async onConnect(d){const h=Number(d.chainId),g=await this.getAccounts();f.emitter.emit("connect",{accounts:g,chainId:h})},async onDisconnect(d){this.setRequestedChainsIds([]),f.emitter.emit("disconnect");const h=await this.getProvider();s&&(h.removeListener("accountsChanged",s),s=void 0),i&&(h.removeListener("chainChanged",i),i=void 0),u&&(h.removeListener("disconnect",u),u=void 0),l&&(h.removeListener("session_delete",l),l=void 0),a||(a=this.onConnect.bind(this),h.on("connect",a))},onDisplayUri(d){f.emitter.emit("message",{type:"display_uri",data:d})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var h,g,m;return n?((m=(g=(h=n.session)==null?void 0:h.namespaces[o])==null?void 0:g.accounts)==null?void 0:m.map(b=>Number.parseInt(b.split(":")[1]||"",10)))??[]:[]},async getRequestedChainsIds(){var d;return await((d=f.storage)==null?void 0:d.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(!t)return!1;const d=f.chains.map(m=>m.id),h=this.getNamespaceChainsIds();if(h.length&&!h.some(m=>d.includes(m)))return!1;const g=await this.getRequestedChainsIds();return!d.every(m=>g.includes(m))},async setRequestedChainsIds(d){var h;await((h=f.storage)==null?void 0:h.setItem(this.requestedChainsStorageKey,d))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}var AE=768,Yr=jC({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),wg=_1({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),Kl=RC({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},accentColorForeground:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonBorder:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},actionButtonBorderMobile:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},closeButton:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},closeButtonBackground:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonBackgroundError:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonInnerBackground:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectButtonText:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},connectButtonTextError:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},connectionIndicator:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},downloadBottomCardBackground:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"},downloadTopCardBackground:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},error:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},generalBorder:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},generalBorderDim:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},menuItemBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBackdrop:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalBackground:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalBorder:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalText:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},modalTextDim:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},modalTextSecondary:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileAction:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},profileActionHover:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},profileForeground:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"},selectedOptionBorder:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},standby:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},accentColorForeground:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonBorder:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},actionButtonBorderMobile:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},closeButton:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},closeButtonBackground:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonBackgroundError:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonInnerBackground:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectButtonText:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},connectButtonTextError:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},connectionIndicator:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},downloadBottomCardBackground:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},downloadTopCardBackground:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},error:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},generalBorder:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},generalBorderDim:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"},menuItemBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBackdrop:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalBackground:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalBorder:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalText:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},modalTextDim:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},modalTextSecondary:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileAction:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},profileActionHover:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},profileForeground:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"},selectedOptionBorder:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},standby:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},dialog:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},profileDetailsAction:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},selectedOption:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"},selectedWallet:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},walletLogo:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"}}},color:{values:{accentColor:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},accentColorForeground:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonBorder:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},actionButtonBorderMobile:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},closeButton:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},closeButtonBackground:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonBackgroundError:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonInnerBackground:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectButtonText:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},connectButtonTextError:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},connectionIndicator:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},downloadBottomCardBackground:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},downloadTopCardBackground:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},error:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},generalBorder:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},generalBorderDim:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"},menuItemBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBackdrop:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalBackground:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalBorder:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalText:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},modalTextDim:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},modalTextSecondary:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileAction:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},profileActionHover:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},profileForeground:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"},selectedOptionBorder:{conditions:{base:"ju367vhc",hover:"ju367vhd",active:"ju367vhe"},defaultClass:"ju367vhc"},standby:{conditions:{base:"ju367vhf",hover:"ju367vhg",active:"ju367vhh"},defaultClass:"ju367vhf"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"},none:{defaultClass:"ju367vz"}}},pointerEvents:{values:{none:{defaultClass:"ju367v10"},all:{defaultClass:"ju367v11"}}},minHeight:{values:{8:{defaultClass:"ju367v12"},44:{defaultClass:"ju367v13"}}},flexDirection:{values:{row:{defaultClass:"ju367v14"},column:{defaultClass:"ju367v15"}}},fontFamily:{values:{body:{defaultClass:"ju367v16"}}},fontSize:{values:{12:{defaultClass:"ju367v17"},13:{defaultClass:"ju367v18"},14:{defaultClass:"ju367v19"},16:{defaultClass:"ju367v1a"},18:{defaultClass:"ju367v1b"},20:{defaultClass:"ju367v1c"},23:{defaultClass:"ju367v1d"}}},fontWeight:{values:{regular:{defaultClass:"ju367v1e"},medium:{defaultClass:"ju367v1f"},semibold:{defaultClass:"ju367v1g"},bold:{defaultClass:"ju367v1h"},heavy:{defaultClass:"ju367v1i"}}},gap:{values:{0:{defaultClass:"ju367v1j"},1:{defaultClass:"ju367v1k"},2:{defaultClass:"ju367v1l"},3:{defaultClass:"ju367v1m"},4:{defaultClass:"ju367v1n"},5:{defaultClass:"ju367v1o"},6:{defaultClass:"ju367v1p"},8:{defaultClass:"ju367v1q"},10:{defaultClass:"ju367v1r"},12:{defaultClass:"ju367v1s"},14:{defaultClass:"ju367v1t"},16:{defaultClass:"ju367v1u"},18:{defaultClass:"ju367v1v"},20:{defaultClass:"ju367v1w"},24:{defaultClass:"ju367v1x"},28:{defaultClass:"ju367v1y"},32:{defaultClass:"ju367v1z"},36:{defaultClass:"ju367v20"},44:{defaultClass:"ju367v21"},64:{defaultClass:"ju367v22"},"-1":{defaultClass:"ju367v23"}}},height:{values:{1:{defaultClass:"ju367v24"},2:{defaultClass:"ju367v25"},4:{defaultClass:"ju367v26"},8:{defaultClass:"ju367v27"},12:{defaultClass:"ju367v28"},20:{defaultClass:"ju367v29"},24:{defaultClass:"ju367v2a"},28:{defaultClass:"ju367v2b"},30:{defaultClass:"ju367v2c"},32:{defaultClass:"ju367v2d"},34:{defaultClass:"ju367v2e"},36:{defaultClass:"ju367v2f"},40:{defaultClass:"ju367v2g"},44:{defaultClass:"ju367v2h"},48:{defaultClass:"ju367v2i"},54:{defaultClass:"ju367v2j"},60:{defaultClass:"ju367v2k"},200:{defaultClass:"ju367v2l"},full:{defaultClass:"ju367v2m"},max:{defaultClass:"ju367v2n"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2o"},"flex-end":{defaultClass:"ju367v2p"},center:{defaultClass:"ju367v2q"},"space-between":{defaultClass:"ju367v2r"},"space-around":{defaultClass:"ju367v2s"}}},textAlign:{values:{left:{defaultClass:"ju367v2t"},center:{defaultClass:"ju367v2u"},inherit:{defaultClass:"ju367v2v"}}},marginBottom:{values:{0:{defaultClass:"ju367v2w"},1:{defaultClass:"ju367v2x"},2:{defaultClass:"ju367v2y"},3:{defaultClass:"ju367v2z"},4:{defaultClass:"ju367v30"},5:{defaultClass:"ju367v31"},6:{defaultClass:"ju367v32"},8:{defaultClass:"ju367v33"},10:{defaultClass:"ju367v34"},12:{defaultClass:"ju367v35"},14:{defaultClass:"ju367v36"},16:{defaultClass:"ju367v37"},18:{defaultClass:"ju367v38"},20:{defaultClass:"ju367v39"},24:{defaultClass:"ju367v3a"},28:{defaultClass:"ju367v3b"},32:{defaultClass:"ju367v3c"},36:{defaultClass:"ju367v3d"},44:{defaultClass:"ju367v3e"},64:{defaultClass:"ju367v3f"},"-1":{defaultClass:"ju367v3g"}}},marginLeft:{values:{0:{defaultClass:"ju367v3h"},1:{defaultClass:"ju367v3i"},2:{defaultClass:"ju367v3j"},3:{defaultClass:"ju367v3k"},4:{defaultClass:"ju367v3l"},5:{defaultClass:"ju367v3m"},6:{defaultClass:"ju367v3n"},8:{defaultClass:"ju367v3o"},10:{defaultClass:"ju367v3p"},12:{defaultClass:"ju367v3q"},14:{defaultClass:"ju367v3r"},16:{defaultClass:"ju367v3s"},18:{defaultClass:"ju367v3t"},20:{defaultClass:"ju367v3u"},24:{defaultClass:"ju367v3v"},28:{defaultClass:"ju367v3w"},32:{defaultClass:"ju367v3x"},36:{defaultClass:"ju367v3y"},44:{defaultClass:"ju367v3z"},64:{defaultClass:"ju367v40"},"-1":{defaultClass:"ju367v41"}}},marginRight:{values:{0:{defaultClass:"ju367v42"},1:{defaultClass:"ju367v43"},2:{defaultClass:"ju367v44"},3:{defaultClass:"ju367v45"},4:{defaultClass:"ju367v46"},5:{defaultClass:"ju367v47"},6:{defaultClass:"ju367v48"},8:{defaultClass:"ju367v49"},10:{defaultClass:"ju367v4a"},12:{defaultClass:"ju367v4b"},14:{defaultClass:"ju367v4c"},16:{defaultClass:"ju367v4d"},18:{defaultClass:"ju367v4e"},20:{defaultClass:"ju367v4f"},24:{defaultClass:"ju367v4g"},28:{defaultClass:"ju367v4h"},32:{defaultClass:"ju367v4i"},36:{defaultClass:"ju367v4j"},44:{defaultClass:"ju367v4k"},64:{defaultClass:"ju367v4l"},"-1":{defaultClass:"ju367v4m"}}},marginTop:{values:{0:{defaultClass:"ju367v4n"},1:{defaultClass:"ju367v4o"},2:{defaultClass:"ju367v4p"},3:{defaultClass:"ju367v4q"},4:{defaultClass:"ju367v4r"},5:{defaultClass:"ju367v4s"},6:{defaultClass:"ju367v4t"},8:{defaultClass:"ju367v4u"},10:{defaultClass:"ju367v4v"},12:{defaultClass:"ju367v4w"},14:{defaultClass:"ju367v4x"},16:{defaultClass:"ju367v4y"},18:{defaultClass:"ju367v4z"},20:{defaultClass:"ju367v50"},24:{defaultClass:"ju367v51"},28:{defaultClass:"ju367v52"},32:{defaultClass:"ju367v53"},36:{defaultClass:"ju367v54"},44:{defaultClass:"ju367v55"},64:{defaultClass:"ju367v56"},"-1":{defaultClass:"ju367v57"}}},maxWidth:{values:{1:{defaultClass:"ju367v58"},2:{defaultClass:"ju367v59"},4:{defaultClass:"ju367v5a"},8:{defaultClass:"ju367v5b"},12:{defaultClass:"ju367v5c"},20:{defaultClass:"ju367v5d"},24:{defaultClass:"ju367v5e"},28:{defaultClass:"ju367v5f"},30:{defaultClass:"ju367v5g"},32:{defaultClass:"ju367v5h"},34:{defaultClass:"ju367v5i"},36:{defaultClass:"ju367v5j"},40:{defaultClass:"ju367v5k"},44:{defaultClass:"ju367v5l"},48:{defaultClass:"ju367v5m"},54:{defaultClass:"ju367v5n"},60:{defaultClass:"ju367v5o"},200:{defaultClass:"ju367v5p"},full:{defaultClass:"ju367v5q"},max:{defaultClass:"ju367v5r"}}},minWidth:{values:{1:{defaultClass:"ju367v5s"},2:{defaultClass:"ju367v5t"},4:{defaultClass:"ju367v5u"},8:{defaultClass:"ju367v5v"},12:{defaultClass:"ju367v5w"},20:{defaultClass:"ju367v5x"},24:{defaultClass:"ju367v5y"},28:{defaultClass:"ju367v5z"},30:{defaultClass:"ju367v60"},32:{defaultClass:"ju367v61"},34:{defaultClass:"ju367v62"},36:{defaultClass:"ju367v63"},40:{defaultClass:"ju367v64"},44:{defaultClass:"ju367v65"},48:{defaultClass:"ju367v66"},54:{defaultClass:"ju367v67"},60:{defaultClass:"ju367v68"},200:{defaultClass:"ju367v69"},full:{defaultClass:"ju367v6a"},max:{defaultClass:"ju367v6b"}}},overflow:{values:{hidden:{defaultClass:"ju367v6c"}}},paddingBottom:{values:{0:{defaultClass:"ju367v6d"},1:{defaultClass:"ju367v6e"},2:{defaultClass:"ju367v6f"},3:{defaultClass:"ju367v6g"},4:{defaultClass:"ju367v6h"},5:{defaultClass:"ju367v6i"},6:{defaultClass:"ju367v6j"},8:{defaultClass:"ju367v6k"},10:{defaultClass:"ju367v6l"},12:{defaultClass:"ju367v6m"},14:{defaultClass:"ju367v6n"},16:{defaultClass:"ju367v6o"},18:{defaultClass:"ju367v6p"},20:{defaultClass:"ju367v6q"},24:{defaultClass:"ju367v6r"},28:{defaultClass:"ju367v6s"},32:{defaultClass:"ju367v6t"},36:{defaultClass:"ju367v6u"},44:{defaultClass:"ju367v6v"},64:{defaultClass:"ju367v6w"},"-1":{defaultClass:"ju367v6x"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6y"},1:{defaultClass:"ju367v6z"},2:{defaultClass:"ju367v70"},3:{defaultClass:"ju367v71"},4:{defaultClass:"ju367v72"},5:{defaultClass:"ju367v73"},6:{defaultClass:"ju367v74"},8:{defaultClass:"ju367v75"},10:{defaultClass:"ju367v76"},12:{defaultClass:"ju367v77"},14:{defaultClass:"ju367v78"},16:{defaultClass:"ju367v79"},18:{defaultClass:"ju367v7a"},20:{defaultClass:"ju367v7b"},24:{defaultClass:"ju367v7c"},28:{defaultClass:"ju367v7d"},32:{defaultClass:"ju367v7e"},36:{defaultClass:"ju367v7f"},44:{defaultClass:"ju367v7g"},64:{defaultClass:"ju367v7h"},"-1":{defaultClass:"ju367v7i"}}},paddingRight:{values:{0:{defaultClass:"ju367v7j"},1:{defaultClass:"ju367v7k"},2:{defaultClass:"ju367v7l"},3:{defaultClass:"ju367v7m"},4:{defaultClass:"ju367v7n"},5:{defaultClass:"ju367v7o"},6:{defaultClass:"ju367v7p"},8:{defaultClass:"ju367v7q"},10:{defaultClass:"ju367v7r"},12:{defaultClass:"ju367v7s"},14:{defaultClass:"ju367v7t"},16:{defaultClass:"ju367v7u"},18:{defaultClass:"ju367v7v"},20:{defaultClass:"ju367v7w"},24:{defaultClass:"ju367v7x"},28:{defaultClass:"ju367v7y"},32:{defaultClass:"ju367v7z"},36:{defaultClass:"ju367v80"},44:{defaultClass:"ju367v81"},64:{defaultClass:"ju367v82"},"-1":{defaultClass:"ju367v83"}}},paddingTop:{values:{0:{defaultClass:"ju367v84"},1:{defaultClass:"ju367v85"},2:{defaultClass:"ju367v86"},3:{defaultClass:"ju367v87"},4:{defaultClass:"ju367v88"},5:{defaultClass:"ju367v89"},6:{defaultClass:"ju367v8a"},8:{defaultClass:"ju367v8b"},10:{defaultClass:"ju367v8c"},12:{defaultClass:"ju367v8d"},14:{defaultClass:"ju367v8e"},16:{defaultClass:"ju367v8f"},18:{defaultClass:"ju367v8g"},20:{defaultClass:"ju367v8h"},24:{defaultClass:"ju367v8i"},28:{defaultClass:"ju367v8j"},32:{defaultClass:"ju367v8k"},36:{defaultClass:"ju367v8l"},44:{defaultClass:"ju367v8m"},64:{defaultClass:"ju367v8n"},"-1":{defaultClass:"ju367v8o"}}},position:{values:{absolute:{defaultClass:"ju367v8p"},fixed:{defaultClass:"ju367v8q"},relative:{defaultClass:"ju367v8r"}}},WebkitUserSelect:{values:{none:{defaultClass:"ju367v8s"}}},right:{values:{0:{defaultClass:"ju367v8t"}}},transition:{values:{default:{defaultClass:"ju367v8u"},transform:{defaultClass:"ju367v8v"}}},userSelect:{values:{none:{defaultClass:"ju367v8w"}}},width:{values:{1:{defaultClass:"ju367v8x"},2:{defaultClass:"ju367v8y"},4:{defaultClass:"ju367v8z"},8:{defaultClass:"ju367v90"},12:{defaultClass:"ju367v91"},20:{defaultClass:"ju367v92"},24:{defaultClass:"ju367v93"},28:{defaultClass:"ju367v94"},30:{defaultClass:"ju367v95"},32:{defaultClass:"ju367v96"},34:{defaultClass:"ju367v97"},36:{defaultClass:"ju367v98"},40:{defaultClass:"ju367v99"},44:{defaultClass:"ju367v9a"},48:{defaultClass:"ju367v9b"},54:{defaultClass:"ju367v9c"},60:{defaultClass:"ju367v9d"},200:{defaultClass:"ju367v9e"},full:{defaultClass:"ju367v9f"},max:{defaultClass:"ju367v9g"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9h"}}}}}),O0={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackground:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},EE={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},kE="_12cbo8i3 ju367v8r",IE={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function Re({active:e,hover:t}){return[kE,t&&IE[t],EE[e]]}var vg=p.createContext(null);function jE(){const{adapter:e}=p.useContext(vg)??{};if(!e)throw new Error("No authentication adapter found");return e}function Fa(){const e=p.useContext(vg);return(e==null?void 0:e.status)??null}function cd(){const e=Fa(),{isConnected:t}=nt();return t?e&&(e==="loading"||e==="unauthenticated")?e:"connected":"disconnected"}function BE(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function SE(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function PE(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function Ma(){return SE()||PE()}function qe(){return BE()||Ma()}var OE="iekbcc0",TE={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},RE=({reset:e,...t})=>{if(!e)return Kl(t);const n=TE[e],r=Kl(t);return q1(OE,n,r)},j=p.forwardRef(({as:e="div",className:t,testId:n,...r},o)=>{const s={},i={};for(const c in r)Kl.properties.has(c)?s[c]=r[c]:i[c]=r[c];const a=RE({reset:typeof e=="string"?e:"div",...s});return p.createElement(e,{className:q1(a,t),...i,"data-testid":n?`rk-${n.replace(/^rk-/,"")}`:void 0,ref:o})});j.displayName="Box";var xg=new Map,Ic=new Map;async function Cg(e){const t=Ic.get(e);if(t)return t;const n=async()=>e().then(async o=>(xg.set(e,o),o)),r=n().catch(o=>n().catch(s=>{Ic.delete(e)}));return Ic.set(e,r),r}async function un(...e){return await Promise.all(e.map(t=>typeof t=="function"?Cg(t):t))}function NE(){const[,e]=p.useReducer(t=>t+1,0);return e}function Da(e){const t=typeof e=="function"?xg.get(e):void 0,n=NE();return p.useEffect(()=>{typeof e=="function"&&!t&&Cg(e).then(n)},[e,t,n]),typeof e=="function"?t:e}function $e({alt:e,background:t,borderColor:n,borderRadius:r,useAsImage:o,boxShadow:s,height:i,src:a,width:c,testId:l}){const u=Ma(),f=Da(a),d=f&&/^http/.test(f),[h,g]=p.useReducer(()=>!0,!1);return p.createElement(j,{"aria-label":e,borderRadius:r,boxShadow:s,height:typeof i=="string"?i:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:t,height:typeof i=="number"?i:void 0,width:typeof c=="number"?c:void 0},width:typeof c=="string"?c:void 0,testId:l},p.createElement(j,{...d?{"aria-hidden":!0,as:"img",onLoad:g,src:f}:{"aria-hidden":!0,as:"img",src:f},height:"full",position:"absolute",...u?{WebkitUserSelect:"none"}:{},style:{WebkitTouchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...!o&&d?{opacity:h?1:0}:{}},width:"full"}),n?p.createElement(j,{...typeof n=="object"&&"custom"in n?{style:{borderColor:n.custom}}:{borderColor:n},borderRadius:r,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var FE="_1luule42",ME="_1luule43",DE=e=>p.useMemo(()=>`${e}_${Math.round(Math.random()*1e9)}`,[e]),Ls=({height:e=21,width:t=21})=>{const n=DE("spinner");return p.createElement("svg",{className:FE,fill:"none",height:e,viewBox:"0 0 21 21",width:t,xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Loading"),p.createElement("clipPath",{id:n},p.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),p.createElement("foreignObject",{clipPath:`url(#${n})`,height:"21",width:"21",x:"0",y:"0"},p.createElement("div",{className:ME})))},he=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],T0=[{color:he[0],emoji:"🌶"},{color:he[1],emoji:"🤑"},{color:he[2],emoji:"🐙"},{color:he[3],emoji:"🫐"},{color:he[4],emoji:"🐳"},{color:he[0],emoji:"🤶"},{color:he[5],emoji:"🌲"},{color:he[6],emoji:"🌞"},{color:he[7],emoji:"🐒"},{color:he[8],emoji:"🐵"},{color:he[9],emoji:"🦊"},{color:he[10],emoji:"🐼"},{color:he[11],emoji:"🦄"},{color:he[12],emoji:"🐷"},{color:he[13],emoji:"🐧"},{color:he[8],emoji:"🦩"},{color:he[14],emoji:"👽"},{color:he[0],emoji:"🎈"},{color:he[8],emoji:"🍉"},{color:he[1],emoji:"🎉"},{color:he[15],emoji:"🐲"},{color:he[16],emoji:"🌎"},{color:he[17],emoji:"🍊"},{color:he[18],emoji:"🐭"},{color:he[19],emoji:"🍣"},{color:he[1],emoji:"🐥"},{color:he[20],emoji:"👾"},{color:he[15],emoji:"🥦"},{color:he[0],emoji:"👹"},{color:he[17],emoji:"🙀"},{color:he[4],emoji:"⛱"},{color:he[21],emoji:"⛵️"},{color:he[17],emoji:"🥳"},{color:he[8],emoji:"🤯"},{color:he[22],emoji:"🤠"}];function LE(e){let t=0;if(e.length===0)return t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t}function UE(e){const n=Math.abs(LE((typeof e=="string"?e:"").toLowerCase())%T0.length);return T0[n??0]}var _E=({address:e,ensImage:t,size:n})=>{const[r,o]=p.useState(!1);p.useEffect(()=>{if(t){const a=new Image;a.src=t,a.onload=()=>o(!0)}},[t]);const{color:s,emoji:i}=p.useMemo(()=>UE(e),[e]);return t?r?p.createElement(j,{backgroundSize:"cover",borderRadius:"full",position:"absolute",style:{backgroundImage:`url(${t})`,backgroundPosition:"center",height:n,width:n}}):p.createElement(j,{alignItems:"center",backgroundSize:"cover",borderRadius:"full",color:"modalText",display:"flex",justifyContent:"center",position:"absolute",style:{height:n,width:n}},p.createElement(Ls,null)):p.createElement(j,{alignItems:"center",display:"flex",justifyContent:"center",overflow:"hidden",style:{...!t&&{backgroundColor:s},height:n,width:n}},i)},Ag=_E,Eg=p.createContext(Ag);function kg({address:e,imageUrl:t,loading:n,size:r}){const o=p.useContext(Eg);return p.createElement(j,{"aria-hidden":!0,borderRadius:"full",overflow:"hidden",position:"relative",style:{height:`${r}px`,width:`${r}px`},userSelect:"none"},p.createElement(j,{alignItems:"center",borderRadius:"full",display:"flex",justifyContent:"center",overflow:"hidden",position:"absolute",style:{fontSize:`${Math.round(r*.55)}px`,height:`${r}px`,transform:n?"scale(0.72)":void 0,transition:".25s ease",transitionDelay:n?void 0:".1s",width:`${r}px`,willChange:"transform"},userSelect:"none"},p.createElement(o,{address:e,ensImage:t,size:r})),n&&p.createElement(j,{color:"accentColor",display:"flex",height:"full",position:"absolute",width:"full"},p.createElement(Ls,{height:"100%",width:"100%"})))}var R0=()=>p.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Dropdown"),p.createElement("path",{d:"M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"})),N0={defaultLocale:"en",locale:"en"},$E=class{constructor(e){this.listeners=new Set,this.defaultLocale=N0.defaultLocale,this.enableFallback=!1,this.locale=N0.locale,this.cachedLocales=[],this.translations={};for(const[t,n]of Object.entries(e))this.cachedLocales=[...this.cachedLocales,t],this.translations={...this.translations,...this.flattenTranslation(n,t)}}missingMessage(e){return`[missing: "${this.locale}.${e}" translation]`}flattenTranslation(e,t){const n={},r=(o,s)=>{for(const i of Object.keys(o)){const a=`${s}.${i}`,c=o[i];typeof c=="object"&&c!==null?r(c,a):n[a]=c}};return r(e,t),n}translateWithReplacements(e,t={}){let n=e;for(const r in t){const o=t[r];n=n.replace(`%{${r}}`,o)}return n}t(e,t,n){const r=`${this.locale}.${e}`,o=this.translations[r];if(!o){if(this.enableFallback){const s=`${this.defaultLocale}.${e}`,i=this.translations[s];if(i)return this.translateWithReplacements(i,t)}return n!=null&&n.rawKeyIfTranslationMissing?e:this.missingMessage(e)}return this.translateWithReplacements(o,t)}isLocaleCached(e){return this.cachedLocales.includes(e)}updateLocale(e){this.locale=e,this.notifyListeners()}setTranslations(e,t){this.isLocaleCached(e)||(this.cachedLocales=[...this.cachedLocales,e],this.translations={...this.translations,...this.flattenTranslation(t,e)}),this.locale=e,this.notifyListeners()}notifyListeners(){for(const e of this.listeners)e()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},Ot=new $E({en:JSON.parse($l),"en-US":JSON.parse($l)});Ot.defaultLocale="en-US";Ot.locale="en-US";Ot.enableFallback=!0;var qE=async e=>{switch(e){case"ar":case"ar-AR":return(await Promise.resolve().then(()=>require("./ar_AR-44JUQ6EW-DSQ9qcs_.js"))).default;case"de":case"de-DE":return(await Promise.resolve().then(()=>require("./de_DE-PYAO5YD6-Dd1WvOtn.js"))).default;case"en":case"en-US":return(await Promise.resolve().then(()=>require("./en_US-Y4ZOVFV4-Dn3zitY_.js"))).default;case"es":case"es-419":return(await Promise.resolve().then(()=>require("./es_419-HRGOJ6VT-B7E9BfQ6.js"))).default;case"fr":case"fr-FR":return(await Promise.resolve().then(()=>require("./fr_FR-IGGVC6RM-DaW0iy2_.js"))).default;case"hi":case"hi-IN":return(await Promise.resolve().then(()=>require("./hi_IN-XSKAA3MF-C9xFkabi.js"))).default;case"id":case"id-ID":return(await Promise.resolve().then(()=>require("./id_ID-KUOB4UAL-B3IV2Afs.js"))).default;case"ja":case"ja-JP":return(await Promise.resolve().then(()=>require("./ja_JP-4WRQ63RX-DPg57Jtp.js"))).default;case"ko":case"ko-KR":return(await Promise.resolve().then(()=>require("./ko_KR-I2K7AIEP-DTiN0Tki.js"))).default;case"ms":case"ms-MY":return(await Promise.resolve().then(()=>require("./ms_MY-6VZW6Q3Z-GeT8A_9b.js"))).default;case"pt":case"pt-BR":return(await Promise.resolve().then(()=>require("./pt_BR-N3XOZ4SV-E_1oHsgd.js"))).default;case"ru":case"ru-RU":return(await Promise.resolve().then(()=>require("./ru_RU-IITAPRET-DWVtNBKa.js"))).default;case"th":case"th-TH":return(await Promise.resolve().then(()=>require("./th_TH-3ZQCKCQE-Da2m2LPy.js"))).default;case"tr":case"tr-TR":return(await Promise.resolve().then(()=>require("./tr_TR-QUPUGMUF-s63Tz8WP.js"))).default;case"ua":case"uk-UA":return(await Promise.resolve().then(()=>require("./uk_UA-SSN6SV5E-IfMgDbzS.js"))).default;case"vi":case"vi-VN":return(await Promise.resolve().then(()=>require("./vi_VN-7BUVRNYY-Ba1mpr-F.js"))).default;case"zh":case"zh-CN":case"zh-Hans":return(await Promise.resolve().then(()=>require("./zh_CN-HJBN674C-Vu7Wn9i6.js"))).default;case"zh-HK":return(await Promise.resolve().then(()=>require("./zh_HK-JW3WLRKE-COIwuLIC.js"))).default;case"zh-Hant":case"zh-TW":return(await Promise.resolve().then(()=>require("./zh_TW-VNNRNXY7-DKIN8H5Y.js"))).default;default:return(await Promise.resolve().then(()=>require("./en_US-Y4ZOVFV4-Dn3zitY_.js"))).default}};async function F0(e){if(Ot.isLocaleCached(e)){Ot.updateLocale(e);return}const n=await qE(e);Ot.setTranslations(e,JSON.parse(n))}var WE=()=>{var e;if(typeof window<"u"&&typeof navigator<"u"){if((e=navigator.languages)!=null&&e.length)return navigator.languages[0];if(navigator.language)return navigator.language}},Fe=p.createContext({i18n:Ot}),zE=({children:e,locale:t})=>{const[n,r]=p.useState(0),o=p.useMemo(()=>WE(),[]);p.useEffect(()=>Ot.onChange(()=>{r(a=>a+1)}),[]),p.useEffect(()=>{t&&t!==Ot.locale?F0(t):!t&&o&&o!==Ot.locale&&F0(o)},[t,o]);const s=p.useMemo(()=>({t:(a,c)=>Ot.t(a,c),i18n:Ot}),[n]);return p.createElement(Fe.Provider,{value:s},e)};function Ig(e){return e!=null}var M0={iconBackground:"#7290CC",iconUrl:async()=>(await Promise.resolve().then(()=>require("./apechain-SX5YFU6N-BP98RVDs.js"))).default},jc={iconBackground:"#96bedc",iconUrl:async()=>(await Promise.resolve().then(()=>require("./arbitrum-WURIBY6W-BS2MH6mu.js"))).default},D0={iconBackground:"#e84141",iconUrl:async()=>(await Promise.resolve().then(()=>require("./avalanche-KOMJD3XY-Df8RTmnR.js"))).default},Bc={iconBackground:"#0052ff",iconUrl:async()=>(await Promise.resolve().then(()=>require("./base-OAXLRA4F-iT9zH1Kj.js"))).default},Sc={iconBackground:"#814625",iconUrl:async()=>(await Promise.resolve().then(()=>require("./berachain-NJECWIVC-BMZnNAq4.js"))).default},L0={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./blast-V555OVXZ-Bbwv3H8h.js"))).default},U0={iconBackground:"#ebac0e",iconUrl:async()=>(await Promise.resolve().then(()=>require("./bsc-N647EYR2-B1LUNwWi.js"))).default},_0={iconBackground:"#FCFF52",iconUrl:async()=>(await Promise.resolve().then(()=>require("./celo-GEP4TUHG-DGNZBO1F.js"))).default},$0={iconBackground:"#002D74",iconUrl:async()=>(await Promise.resolve().then(()=>require("./cronos-HJPAQTAE-CYNBJWpC.js"))).default},QE={iconBackground:"#A36EFD",iconUrl:async()=>(await Promise.resolve().then(()=>require("./degen-FQQ4XGHB-B0iCWKkK.js"))).default},Mn={iconBackground:"#484c50",iconUrl:async()=>(await Promise.resolve().then(()=>require("./ethereum-RGGVA4PY-D0PFo6qh.js"))).default},q0={iconBackground:"transparent",iconUrl:async()=>(await Promise.resolve().then(()=>require("./flow-5FQJFCTK-zNre9dGJ.js"))).default},HE={iconBackground:"#04795c",iconUrl:async()=>(await Promise.resolve().then(()=>require("./gnosis-37ZC4RBL-DpsuNYS1.js"))).default},W0={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./gravity-J5YQHTYH-CnR8N36w.js"))).default},VE={iconBackground:"#f9f7ec",iconUrl:async()=>(await Promise.resolve().then(()=>require("./hardhat-TX56IT5N-Mh0k0VUo.js"))).default},GE={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./hyperevm-VKPAA4SA-BrvLj9LS.js"))).default},z0={iconBackground:"#7132F5",iconUrl:async()=>(await Promise.resolve().then(()=>require("./ink-FZMYZWHG-BuNtRfvY.js"))).default},Q0={iconBackground:"transparent",iconUrl:async()=>(await Promise.resolve().then(()=>require("./kaia-65D2U3PU-C3iOW87N.js"))).default},Pc={iconBackground:"#ffffff",iconUrl:async()=>(await Promise.resolve().then(()=>require("./linea-QRMVQ5DY-C2d1pHrg.js"))).default},Oc={iconBackground:"#ffffff",iconUrl:async()=>(await Promise.resolve().then(()=>require("./manta-SI27YFEJ-CBE6iXtC.js"))).default},H0={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./mantle-CKIUT334-CPiUOpgj.js"))).default},KE={iconBackground:"transparent",iconUrl:async()=>(await Promise.resolve().then(()=>require("./monad-4KWC6TSS-BnWBHM2V.js"))).default},Si={iconBackground:"#ff5a57",iconUrl:async()=>(await Promise.resolve().then(()=>require("./optimism-HAF2GUT7-BT_Mx-dr.js"))).default},Tc={iconBackground:"#9f71ec",iconUrl:async()=>(await Promise.resolve().then(()=>require("./polygon-WW6ZI7PM-DGanIpKH.js"))).default},JE={iconBackground:"#1273EA",iconUrl:async()=>(await Promise.resolve().then(()=>require("./ronin-EMCPYXZT-BVeW22BA.js"))).default},YE={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./sanko-RHQYXGM5-t_EneLtZ.js"))).default},XE={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./superposition-HG6MMR2Y-CUrWVrH0.js"))).default},V0={iconBackground:"#FFEEDA",iconUrl:async()=>(await Promise.resolve().then(()=>require("./scroll-5OBGQVOV-DYo31pKm.js"))).default},G0={iconBackground:"#F50DB4",iconUrl:async()=>(await Promise.resolve().then(()=>require("./unichain-C5BWO2ZY-DrmDCV2p.js"))).default},K0={iconBackground:"#f9f7ec",iconUrl:async()=>(await Promise.resolve().then(()=>require("./xdc-KJ3TDBYO-DjnCHm47.js"))).default},J0={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./zetachain-TLDS5IPW-BRdUItmm.js"))).default},Y0={iconBackground:"#f9f7ec",iconUrl:async()=>(await Promise.resolve().then(()=>require("./zksync-DH7HK5U4-DVKzLGnB.js"))).default},Rc={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./zora-FYL5H3IO-BSEkA2hF.js"))).default},ZE={apechain:{chainId:33139,name:"ApeChain",...M0},apechainCurtis:{chainId:33111,name:"ApeChain Curtis",...M0},arbitrum:{chainId:42161,name:"Arbitrum",...jc},arbitrumGoerli:{chainId:421613,...jc},arbitrumSepolia:{chainId:421614,...jc},avalanche:{chainId:43114,...D0},avalancheFuji:{chainId:43113,...D0},base:{chainId:8453,name:"Base",...Bc},baseGoerli:{chainId:84531,...Bc},baseSepolia:{chainId:84532,...Bc},berachain:{chainId:80094,name:"Berachain",...Sc},berachainArtio:{chainId:80085,name:"Berachain Artio",...Sc},berachainBArtio:{chainId:80084,name:"Berachain bArtio",...Sc},blast:{chainId:81457,name:"Blast",...L0},blastSepolia:{chainId:168587773,...L0},bsc:{chainId:56,name:"BSC",...U0},bscTestnet:{chainId:97,...U0},celo:{chainId:42220,name:"Celo",..._0},celoAlfajores:{chainId:44787,name:"Celo Alfajores",..._0},cronos:{chainId:25,...$0},cronosTestnet:{chainId:338,...$0},degen:{chainId:666666666,name:"Degen",...QE},flow:{chainId:747,...q0},flowTestnet:{chainId:545,...q0},gnosis:{chainId:100,name:"Gnosis",...HE},goerli:{chainId:5,...Mn},gravity:{chainId:1625,name:"Gravity",...W0},gravitySepolia:{chainId:13505,name:"Gravity Sepolia",...W0},hardhat:{chainId:31337,...VE},holesky:{chainId:17e3,...Mn},hyperevm:{chainId:999,...GE},ink:{chainId:57073,...z0},inkSepolia:{chainId:763373,...z0},kaia:{chainId:8217,name:"Kaia",...Q0},kairos:{chainId:1001,name:"Kairos",...Q0},kovan:{chainId:42,...Mn},linea:{chainId:59144,name:"Linea",...Pc},lineaGoerli:{chainId:59140,name:"Linea Goerli",...Pc},lineaSepolia:{chainId:59141,name:"Linea Sepolia",...Pc},localhost:{chainId:1337,...Mn},mainnet:{chainId:1,name:"Ethereum",...Mn},manta:{chainId:169,name:"Manta",...Oc},mantaSepolia:{chainId:3441006,...Oc},mantaTestnet:{chainId:3441005,...Oc},mantle:{chainId:5e3,...H0},mantleTestnet:{chainId:5001,...H0},monadTestnet:{chainId:10143,name:"Monad Testnet",...KE},optimism:{chainId:10,name:"Optimism",...Si},optimismGoerli:{chainId:420,...Si},optimismKovan:{chainId:69,...Si},optimismSepolia:{chainId:11155420,...Si},polygon:{chainId:137,name:"Polygon",...Tc},polygonAmoy:{chainId:80002,...Tc},polygonMumbai:{chainId:80001,...Tc},rinkeby:{chainId:4,...Mn},ronin:{chainId:2020,...JE},ropsten:{chainId:3,...Mn},sanko:{chainId:1996,name:"Sanko",...YE},scroll:{chainId:534352,...V0},scrollSepolia:{chainId:534351,...V0},sepolia:{chainId:11155111,...Mn},superposition:{chainId:55244,name:"Superposition",...XE},unichain:{chainId:130,...G0},unichainSepolia:{chainId:1301,...G0},xdc:{chainId:50,name:"XDC",...K0},xdcTestnet:{chainId:51,...K0},zetachain:{chainId:7e3,name:"ZetaChain",...J0},zetachainAthensTestnet:{chainId:7001,name:"Zeta Athens",...J0},zkSync:{chainId:324,name:"zkSync",...Y0},zkSyncTestnet:{chainId:280,...Y0},zora:{chainId:7777777,name:"Zora",...Rc},zoraSepolia:{chainId:999999999,...Rc},zoraTestnet:{chainId:999,...Rc}},e7=Object.fromEntries(Object.values(ZE).filter(Ig).map(({chainId:e,...t})=>[e,t])),t7=e=>e.map(t=>{const n=e7[t.id]??{};return{...t,name:n.name??t.name,iconUrl:t.iconUrl??n.iconUrl,iconBackground:t.iconBackground??n.iconBackground}}),ld=p.createContext({chains:[]});function n7({children:e,initialChain:t}){const{chains:n}=Ne();return p.createElement(ld.Provider,{value:p.useMemo(()=>({chains:t7(n),initialChainId:typeof t=="number"?t:t==null?void 0:t.id}),[n,t])},e)}var zr=()=>p.useContext(ld).chains,r7=()=>p.useContext(ld).initialChainId,o7=()=>{const e=zr();return p.useMemo(()=>{const t={};for(const n of e)t[n.id]=n;return t},[e])},jg=p.createContext({showBalance:void 0,setShowBalance:()=>{}});function s7({children:e}){const[t,n]=p.useState();return p.createElement(jg.Provider,{value:{showBalance:t,setShowBalance:n}},e)}var Bg=()=>p.useContext(jg);function i7(){const[e,t]=p.useState(!1);return p.useEffect(()=>(t(!0),()=>{t(!1)}),[]),p.useCallback(()=>e,[e])}function Sg(){const e=zr(),t=od.id;return e.some(r=>r.id===t)}function a7(e){const t=Sg(),n=o=>{try{return bA(o)}catch{}},{data:r}=bC({chainId:od.id,name:e?n(e):void 0,query:{enabled:t}});return r}async function ur(e,t){if(t={headers:{},method:"get",...t,timeout:t.timeout??1e4},!e)throw new Error("rainbowFetch: Missing url argument");const n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout),{body:o,params:s,headers:i,...a}=t,c=o&&typeof o=="object"?JSON.stringify(t.body):t.body,l=await fetch(`${e}${l7(s)}`,{...a,body:c,headers:{Accept:"application/json","Content-Type":"application/json",...i},signal:n.signal});clearTimeout(r);const u=await c7(l);if(l.ok){const{headers:h,status:g}=l;return{data:u,headers:h,status:g}}throw u7({requestBody:o,response:l,responseBody:typeof u=="string"?{error:u}:u})}function c7(e){const t=e.headers.get("Content-Type");return t!=null&&t.startsWith("application/json")?e.json():e.text()}function l7(e){return e&&Object.keys(e).length?`?${new URLSearchParams(e)}`:""}function u7({requestBody:e,response:t,responseBody:n}){const r=(n==null?void 0:n.error)||(t==null?void 0:t.statusText)||"There was an error with the request.",o=new Error(r);return o.response=t,o.responseBody=n,o.requestBody=e,o}var d7=class{constructor(e={}){const{baseUrl:t="",...n}=e;this.baseUrl=t,this.opts=n}get(e,t){return ur(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"get"})}delete(e,t){return ur(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"delete"})}head(e,t){return ur(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"head"})}options(e,t){return ur(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"options"})}post(e,t,n){return ur(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"post"})}put(e,t,n){return ur(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"put"})}patch(e,t,n){return ur(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"patch"})}};function f7({baseUrl:e,headers:t,params:n,timeout:r}){return new d7({baseUrl:e,headers:t,params:n,timeout:r})}var h7=!!(typeof process<"u"&&typeof process.env<"u"&&process.env.RAINBOW_PROVIDER_API_KEY),p7=f7({baseUrl:"https://enhanced-provider.rainbow.me",headers:{"x-api-key":typeof process<"u"&&typeof process.env<"u"&&process.env.RAINBOW_PROVIDER_API_KEY||"LzbasoBiLqltex3VkcQ7LRmL4PtfiiZ1EMJrizrgfonWN6byJReu/l6yrUoo3zLW"}});function m7(e,t,n={}){return[e,t,n]}function _i(e){return`rk-ens-name-${e}`}function g7(e){try{const t=e?JSON.parse(e):null;return typeof t=="object"?t:null}catch{return null}}function b7(e,t){if(!wt(e))return;const n=new Date,r=new Date(n.getTime()+180*6e4);localStorage.setItem(_i(e),JSON.stringify({ensName:t,expires:r.getTime()}))}function y7(e){const t=g7(localStorage.getItem(_i(e)));if(!t)return null;const{ensName:n,expires:r}=t;return typeof n!="string"||Number.isNaN(Number(r))||new Date().getTime()>Number(r)?(localStorage.removeItem(_i(e)),null):n}async function w7({address:e}){const t=y7(e);if(t)return t;const r=(await p7.get("/v1/resolve-ens",{params:{address:e}})).data.data;return r&&b7(e,r),r}function v7(e){const t=Sg(),{data:n}=yC({chainId:od.id,address:e,query:{enabled:t}}),{data:r}=N1({queryKey:m7("address",e),queryFn:()=>w7({address:e}),enabled:!t&&!!e&&h7,staleTime:10*(60*1e3),retry:1});return n||r}function Pg({address:e,includeBalance:t}){const n=v7(e),r=a7(n),{data:o}=Xu({address:t?e:void 0});return{ensName:n,ensAvatar:r,balance:o}}function ud(){const{chain:e}=nt();return(e==null?void 0:e.id)??null}var Og="rk-transactions";function x7(e){try{const t=e?JSON.parse(e):{};return typeof t=="object"?t:{}}catch{return{}}}function X0(){return x7(typeof localStorage<"u"?localStorage.getItem(Og):null)}var C7=/^0x([A-Fa-f0-9]{64})$/;function A7(e){const t=[];return C7.test(e.hash)||t.push("Invalid transaction hash"),typeof e.description!="string"&&t.push("Transaction must have a description"),typeof e.confirmations<"u"&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}function E7({provider:e}){let t=X0(),n=e;const r=new Set,o=new Set,s=new Map;function i(C){n=C}function a(C,v){var w;return((w=t[C])==null?void 0:w[v])??[]}function c(C,v,w){const x=A7(w);if(x.length>0)throw new Error(["Unable to add transaction",...x].join(`
|
|
1731
|
-
`));d(C,v,E=>[{...w,status:"pending"},...E.filter(({hash:A})=>A!==w.hash)])}function l(C,v){d(C,v,()=>[])}function u(C,v,w,x){d(C,v,E=>E.map(A=>A.hash===w?{...A,status:x}:A))}async function f(C,v){await Promise.all(a(C,v).filter(w=>w.status==="pending").map(async w=>{const{confirmations:x,hash:E}=w,A=s.get(E);if(A)return await A;const I=n.waitForTransactionReceipt({confirmations:x,hash:E,timeout:3e5}).then(({status:S})=>{s.delete(E),S!==void 0&&(u(C,v,E,S===0||S==="reverted"?"failed":"confirmed"),m(S))}).catch(()=>{u(C,v,E,"failed")});return s.set(E,I),await I}))}function d(C,v,w){t=X0(),t[C]=t[C]??{};let x=0;const E=10,A=w(t[C][v]??[]).filter(({status:I})=>I==="pending"?!0:x++<=E);t[C][v]=A.length>0?A:void 0,h(),g(),f(C,v)}function h(){localStorage.setItem(Og,JSON.stringify(t))}function g(){for(const C of r)C()}function m(C){for(const v of o)v(C)}function b(C){return r.add(C),()=>{r.delete(C)}}function y(C){return o.add(C),()=>{o.delete(C)}}return{addTransaction:c,clearTransactions:l,getTransactions:a,onTransactionStatus:y,onChange:b,setProvider:i,waitForPendingTransactions:f}}var Z0,Tg=p.createContext(null);function k7({children:e}){const t=wC(),{address:n}=nt(),r=ud(),{refetch:o}=Xu({address:n,query:{enabled:!1}}),[s]=p.useState(()=>Z0??(Z0=E7({provider:t}))),i=p.useCallback(a=>{a==="success"&&o()},[o]);return p.useEffect(()=>{s.setProvider(t)},[s,t]),p.useEffect(()=>{n&&r&&s.waitForPendingTransactions(n,r)},[s,n,r]),p.useEffect(()=>{if(s&&n&&r)return s.onTransactionStatus(i)},[s,n,r,i]),p.createElement(Tg.Provider,{value:s},e)}function Rg(){const e=p.useContext(Tg);if(!e)throw new Error("Transaction hooks must be used within RainbowKitProvider");return e}function Ng(){const e=Rg(),{address:t}=nt(),n=ud(),[r,o]=p.useState(()=>e&&t&&n?e.getTransactions(t,n):[]);return p.useEffect(()=>{if(e&&t&&n)return o(e.getTransactions(t,n)),e.onChange(()=>{o(e.getTransactions(t,n))})},[e,t,n]),r}var eh=e=>typeof e=="function"?e():e;function I7(e,{extends:t}={}){const n={...x0(O0,eh(e))};if(!t)return n;const r=x0(O0,eh(t));return Object.fromEntries(Object.entries(n).filter(([s,i])=>i!==r[s]))}function th(e,t={}){return Object.entries(I7(e,t)).map(([n,r])=>`${n}:${r.replace(/[:;{}</>]/g,"")};`).join("")}var Fg={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},ci=p.createContext(Fg),Mg=p.createContext(!1);function j7(e,t){let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,e()},t)}}var Dg=()=>{const[e,t]=p.useState({height:void 0,width:void 0});return p.useEffect(()=>{const n=j7(()=>{t({height:window.innerHeight,width:window.innerWidth})},500);return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),e},li=p.createContext({connector:null,setConnector:()=>{}});function B7({children:e}){const[t,n]=p.useState(null);return p.createElement(li.Provider,{value:p.useMemo(()=>({connector:t,setConnector:n}),[t])},e)}var ui={COMPACT:"compact",WIDE:"wide"},La=p.createContext(ui.WIDE);function S7({children:e,modalSize:t}){const{width:n}=Dg(),r=n&&n<AE,{connector:o}=p.useContext(li);return p.createElement(La.Provider,{value:r||o?ui.COMPACT:t},e)}var dd=p.createContext(!1),P7="rk-version";function O7({version:e}){localStorage.setItem(P7,e)}function T7(){const e=p.useCallback(()=>{O7({version:"2.2.10"})},[]);p.useEffect(()=>{e()},[e])}function R7(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]=r)}return n}function fd(){return typeof navigator<"u"&&typeof navigator.userAgent<"u"&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function N7(){return typeof document<"u"&&getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")!==""}function hd(){var t,n;if(typeof navigator>"u")return"Browser";const e=(t=navigator.userAgent)==null?void 0:t.toLowerCase();return(n=navigator.brave)!=null&&n.isBrave?"Brave":(e==null?void 0:e.indexOf("edg/"))>-1?"Edge":(e==null?void 0:e.indexOf("op"))>-1?"Opera":N7()?"Arc":(e==null?void 0:e.indexOf("chrome"))>-1?"Chrome":(e==null?void 0:e.indexOf("firefox"))>-1?"Firefox":fd()?"Safari":"Browser"}var F7=rE.UAParser(),{os:pd}=F7;function M7(){return pd.name==="Windows"}function D7(){return pd.name==="Mac OS"}function L7(){return["Ubuntu","Mint","Fedora","Debian","Arch","Linux"].includes(pd.name)}function md(){return M7()?"Windows":D7()?"macOS":L7()?"Linux":"Desktop"}var U7=e=>{var n,r,o,s,i,a,c,l,u,f,d;const t=hd();return{Arc:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.chrome,Brave:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.chrome,Chrome:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.chrome,Edge:((s=e==null?void 0:e.downloadUrls)==null?void 0:s.edge)||((i=e==null?void 0:e.downloadUrls)==null?void 0:i.chrome),Firefox:(a=e==null?void 0:e.downloadUrls)==null?void 0:a.firefox,Opera:((c=e==null?void 0:e.downloadUrls)==null?void 0:c.opera)||((l=e==null?void 0:e.downloadUrls)==null?void 0:l.chrome),Safari:(u=e==null?void 0:e.downloadUrls)==null?void 0:u.safari,Browser:(f=e==null?void 0:e.downloadUrls)==null?void 0:f.browserExtension}[t]??((d=e==null?void 0:e.downloadUrls)==null?void 0:d.browserExtension)},_7=e=>{var n,r,o;return(Ma()?(n=e==null?void 0:e.downloadUrls)==null?void 0:n.ios:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.android)??((o=e==null?void 0:e.downloadUrls)==null?void 0:o.mobile)},$7=e=>{var n,r,o,s,i;const t=md();return{Windows:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.windows,macOS:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.macos,Linux:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.linux,Desktop:(s=e==null?void 0:e.downloadUrls)==null?void 0:s.desktop}[t]??((i=e==null?void 0:e.downloadUrls)==null?void 0:i.desktop)},Lg=(e,t)=>e.some(n=>n.id===t),q7=e=>!!e.isRainbowKitConnector,nh=e=>{var t;return!!(!e.isRainbowKitConnector&&((t=e.icon)!=null&&t.replace(/\n/g,"").startsWith("data:image"))&&e.uid&&e.name)},W7=(e,t)=>e.id==="walletConnect"&&t?{...e,walletConnectModalConnector:t}:e,z7=({wallets:e,recentWallets:t})=>[...t,...e.filter(n=>!Lg(t,n.id))],Ug="rk-recent";function Q7(e){try{const t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}}function _g(){return typeof localStorage<"u"?Q7(localStorage.getItem(Ug)):[]}function H7(e){return[...new Set(e)]}function V7(e){const t=H7([e,..._g()]);localStorage.setItem(Ug,JSON.stringify(t))}function Us(e=!1){var w,x,E;const t=zr(),n=r7(),{connectAsync:r,connectors:o}=mC(),s=o,{setIsWalletConnectModalOpen:i}=db(),a=s.map(A=>({...A,...A.rkDetails||{}}));async function c(A,I){var R,M;const S=await A.getChainId(),T=await r({...I,chainId:(I==null?void 0:I.chainId)??n??((R=t.find(({id:N})=>N===S))==null?void 0:R.id)??((M=t[0])==null?void 0:M.id),connector:A});return T&&V7(A.id),T}async function l(A){try{i(!0),await c(A),i(!1)}catch(I){const S=I.name==="UserRejectedRequestError"||I.message==="Connection request reset. Please try again.";if(i(!1),!S)throw I}}const u=async(A,I)=>{const S=await A.getProvider();return A.id==="coinbase"?S.qrUrl:new Promise(T=>S.once("display_uri",R=>{T(I(R))}))},f=a.find(A=>A.id==="walletConnect"&&A.isWalletConnectModalConnector),d=a.filter(nh).map(A=>({...A,groupIndex:0})),h=a.filter(q7).filter(A=>!A.isWalletConnectModalConnector).filter(A=>e?!d.some(S=>S.id===A.rdns):!0).map(A=>W7(A,f)),g=[...d,...h],m=R7(g,A=>A.id),y=_g().map(A=>m[A]).filter(Boolean).slice(0,3),C=[],v=z7({wallets:g,recentWallets:y});for(const A of v){if(!A)continue;const I=nh(A),S=Lg(y,A.id);if(I){C.push({...A,iconUrl:A.icon,ready:!0,connect:c.bind(null,A),groupName:"Installed",recent:S});continue}C.push({...A,ready:A.installed??!0,connect:c.bind(null,A),desktopDownloadUrl:$7(A),extensionDownloadUrl:U7(A),groupName:A.groupName,mobileDownloadUrl:_7(A),getQrCodeUri:(w=A.qrCode)!=null&&w.getUri?()=>u(A,A.qrCode.getUri):void 0,getDesktopUri:(x=A.desktop)!=null&&x.getUri?()=>u(A,A.desktop.getUri):void 0,getMobileUri:(E=A.mobile)!=null&&E.getUri?()=>{var T;return u(A,(T=A.mobile)==null?void 0:T.getUri)}:void 0,recent:S,showWalletConnectModal:A.walletConnectModalConnector?()=>l(A.walletConnectModalConnector):void 0})}return C}var $g=async()=>(await Promise.resolve().then(()=>require("./assets-Q6ZU7ZJ5-Dy7quYMC.js"))).default,G7=()=>un($g),K7=()=>p.createElement($e,{background:"#d0d5de",borderRadius:"10",height:"48",src:$g,width:"48"}),qg=async()=>(await Promise.resolve().then(()=>require("./login-UP3DZBGS-C-c6uz2H.js"))).default,J7=()=>un(qg),Y7=()=>p.createElement($e,{background:"#d0d5de",borderRadius:"10",height:"48",src:qg,width:"48"}),X=p.forwardRef(({as:e="div",children:t,className:n,color:r,display:o,font:s="body",id:i,size:a="16",style:c,tabIndex:l,textAlign:u="inherit",weight:f="regular",testId:d},h)=>p.createElement(j,{as:e,className:n,color:r,display:o,fontFamily:s,fontSize:a,fontWeight:f,id:i,ref:h,style:c,tabIndex:l,textAlign:u,testId:d},t));X.displayName="Text";var X7={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function tt({disabled:e=!1,href:t,label:n,onClick:r,rel:o="noreferrer noopener",size:s="medium",target:i="_blank",testId:a,type:c="primary"}){const l=c==="primary",u=s!=="large",f=qe(),d=e?"actionButtonSecondaryBackground":l?"accentColor":u?"actionButtonSecondaryBackground":null,{fontSize:h,height:g,paddingX:m,paddingY:b}=X7[s],y=!f||!u;return p.createElement(j,{...t?e?{}:{as:"a",href:t,rel:o,target:i}:{as:"button",type:"button"},onClick:e?void 0:r,...y?{borderColor:f&&!u&&!l?"actionButtonBorderMobile":"actionButtonBorder",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!e&&Re({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:m,paddingY:b,style:{willChange:"transform"},testId:a,textAlign:"center",transition:"transform",...d?{background:d}:{},...g?{height:g}:{}},p.createElement(X,{color:e?"modalTextSecondary":l?"accentColorForeground":"accentColor",size:h,weight:"bold"},n))}var Z7=()=>qe()?p.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Close"),p.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):p.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Close"),p.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),_r=({"aria-label":e="Close",onClose:t})=>{const n=qe();return p.createElement(j,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:Re({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},p.createElement(Z7,null))},Wg=async()=>(await Promise.resolve().then(()=>require("./sign-A7IJEUT5-BI5zSXW6.js"))).default;function e4({onClose:e,onCloseModal:t}){const{i18n:n}=p.useContext(Fe),[{status:r,...o},s]=p.useState({status:"idle"}),i=jE(),a=p.useCallback(async()=>{try{const g=await i.getNonce();s(m=>({...m,nonce:g}))}catch{s(g=>({...g,errorMessage:n.t("sign_in.message.preparing_error"),status:"idle"}))}},[i,n.t]),c=p.useRef(!1);p.useEffect(()=>{c.current||(c.current=!0,a())},[a]);const l=qe(),{address:u,chain:f}=nt(),{signMessageAsync:d}=xC(),h=async()=>{try{const g=f==null?void 0:f.id,{nonce:m}=o;if(!u||!g||!m)return;s(C=>({...C,errorMessage:void 0,status:"signing"}));const b=i.createMessage({address:u,chainId:g,nonce:m});let y;try{y=await d({message:b})}catch(C){return C instanceof Ee?s(v=>({...v,status:"idle"})):s(v=>({...v,errorMessage:n.t("sign_in.signature.signing_error"),status:"idle"}))}s(C=>({...C,status:"verifying"}));try{if(await i.verify({message:b,signature:y})){t();return}throw new Error}catch{return s(C=>({...C,errorMessage:n.t("sign_in.signature.verifying_error"),status:"idle"}))}}catch{s({errorMessage:n.t("sign_in.signature.oops_error"),status:"idle"})}};return p.createElement(j,{position:"relative"},p.createElement(j,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},p.createElement(_r,{onClose:e})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:l?"60px":"36px"}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"6":"4",style:{maxWidth:l?320:280}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"32":"16"},p.createElement($e,{height:40,src:Wg,width:40}),p.createElement(X,{color:"modalText",size:l?"20":"18",textAlign:"center",weight:"heavy"},n.t("sign_in.label"))),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"16":"12"},p.createElement(X,{color:"modalTextSecondary",size:l?"16":"14",textAlign:"center"},n.t("sign_in.description")),r==="idle"&&o.errorMessage?p.createElement(X,{color:"error",size:l?"16":"14",textAlign:"center",weight:"bold"},o.errorMessage):null)),p.createElement(j,{alignItems:l?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},p.createElement(tt,{disabled:!o.nonce||r==="signing"||r==="verifying",label:o.nonce?r==="signing"?n.t("sign_in.signature.waiting"):r==="verifying"?n.t("sign_in.signature.verifying"):n.t("sign_in.message.send"):n.t("sign_in.message.preparing"),onClick:h,size:l?"large":"medium",testId:"auth-message-button"}),l?p.createElement(tt,{label:"Cancel",onClick:e,size:"large",type:"secondary"}):p.createElement(j,{as:"button",borderRadius:"full",className:Re({active:"shrink",hover:"grow"}),display:"block",onClick:e,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"closeButton",size:l?"16":"14",weight:"bold"},n.t("sign_in.message.cancel"))))))}function t4(){const e=zr(),t=Us(),n=Fa()==="unauthenticated",r=p.useCallback(()=>{un(...t.map(o=>o.iconUrl),...e.map(o=>o.iconUrl).filter(Ig)),qe()||(G7(),J7()),n&&un(Wg)},[t,e,n]);p.useEffect(()=>{r()},[r])}var zg="WALLETCONNECT_DEEPLINK_CHOICE";function n4({mobileUri:e,name:t}){localStorage.setItem(zg,JSON.stringify({href:e.split("?")[0],name:t}))}function r4(){localStorage.removeItem(zg)}var Qg=p.createContext(void 0),Jl="data-rk",Hg=e=>({[Jl]:e||""}),o4=e=>{if(e&&!/^[a-zA-Z0-9_]+$/.test(e))throw new Error(`Invalid ID: ${e}`);return e?`[${Jl}="${e}"]`:`[${Jl}]`},s4=()=>{const e=p.useContext(Qg);return Hg(e)},i4=ed();function a4({appInfo:e,avatar:t,children:n,coolMode:r=!1,id:o,initialChain:s,locale:i,modalSize:a=ui.WIDE,showRecentTransactions:c=!1,theme:l=i4}){if(t4(),T7(),C1({onDisconnect:r4}),typeof l=="function")throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const u=o4(o),f={...Fg,...e},d=t??Ag;return p.createElement(n7,{initialChain:s},p.createElement(B7,null,p.createElement(zE,{locale:i},p.createElement(Mg.Provider,{value:r},p.createElement(S7,{modalSize:a},p.createElement(dd.Provider,{value:c},p.createElement(k7,null,p.createElement(Eg.Provider,{value:d},p.createElement(ci.Provider,{value:f},p.createElement(Qg.Provider,{value:o},p.createElement(s7,null,p.createElement(x9,null,l?p.createElement("div",{...Hg(o)},p.createElement("style",{dangerouslySetInnerHTML:{__html:[`${u}{${th("lightMode"in l?l.lightMode:l)}}`,"darkMode"in l?`@media(prefers-color-scheme:dark){${u}{${th(l.darkMode,{extends:l.lightMode})}}}`:null].join("")}}),n):n))))))))))))}var c4="_9pm4ki5 ju367va ju367v15 ju367v8r",l4="_9pm4ki3 ju367v9h ju367vb3 ju367va ju367v2q ju367v8q",rh=(e,t)=>{const n=e.querySelectorAll("button:not(:disabled), a[href]");n.length!==0&&n[t==="end"?n.length-1:0].focus()};function u4(e){const t=p.useRef(null);return p.useEffect(()=>{const n=document.activeElement;return()=>{var r;(r=n.focus)==null||r.call(n)}},[]),p.useEffect(()=>{if(t.current){const n=t.current.querySelector("[data-auto-focus]");n?n.focus():t.current.focus()}},[]),p.createElement(p.Fragment,null,p.createElement("div",{onFocus:p.useCallback(()=>t.current&&rh(t.current,"end"),[]),tabIndex:0}),p.createElement("div",{ref:t,style:{outline:"none"},tabIndex:-1,...e}),p.createElement("div",{onFocus:p.useCallback(()=>t.current&&rh(t.current,"start"),[]),tabIndex:0}))}var d4=e=>e.stopPropagation();function la({children:e,onClose:t,open:n,titleId:r}){p.useEffect(()=>{const l=u=>n&&u.key==="Escape"&&t();return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[n,t]);const[o,s]=p.useState(!0);p.useEffect(()=>{s(getComputedStyle(window.document.body).overflow!=="hidden")},[]);const i=p.useCallback(()=>t(),[t]),a=s4(),c=qe();return p.createElement(p.Fragment,null,n?Tb.createPortal(p.createElement(pg,{enabled:o},p.createElement(j,{...a},p.createElement(j,{...a,alignItems:c?"flex-end":"center","aria-labelledby":r,"aria-modal":!0,className:l4,onClick:i,position:"fixed",role:"dialog"},p.createElement(u4,{className:c4,onClick:d4,role:"document"},e)))),document.body):null)}var f4="_1ckjpok7",h4="_1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",p4="_1ckjpok4 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",m4="_1ckjpok6 ju367vq",g4="_1ckjpok3 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",b4="_1ckjpok2 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r";function ua({bottomSheetOnMobile:e=!1,children:t,marginTop:n,padding:r="16",paddingBottom:o,wide:s=!1}){const i=qe(),c=p.useContext(La)===ui.COMPACT;return p.createElement(j,{marginTop:n},p.createElement(j,{className:[s?i?b4:c?p4:g4:h4,i?m4:null,i&&e?f4:null].join(" ")},p.createElement(j,{padding:r,paddingBottom:o??r},t)))}var oh=["k","m","b","t"];function Pi(e,t=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${t}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function Vg(e){if(e<1)return Pi(e,3);if(e<10**2)return Pi(e,2);if(e<10**4)return new Intl.NumberFormat().format(Number.parseFloat(Pi(e,1)));const t=10**1;let n=String(e);for(let r=oh.length-1;r>=0;r--){const o=10**((r+1)*3);if(o<=e){e=e*t/o/t,n=Pi(e,1)+oh[r];break}}return n}function Gg(e){return e.length<8?e:`${e.substring(0,4)}…${e.substring(e.length-4)}`}function Kg(e){if(!e)return"";const t=e.split("."),n=t.pop();return t.join(".").length>24?`${t.join(".").substring(0,24)}...`:`${t.join(".")}.${n}`}var y4=()=>p.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Copied"),p.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),w4=()=>p.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Copy"),p.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),v4=()=>p.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Disconnect"),p.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));function x4(){const e=Rg(),{address:t}=nt(),n=ud();return p.useCallback(()=>{if(!t||!n)throw new Error("No address or chain ID found");e.clearTransactions(t,n)},[e,t,n])}var Jg=e=>{var t,n;return(n=(t=e==null?void 0:e.blockExplorers)==null?void 0:t.default)==null?void 0:n.url},Yg=()=>p.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Link"),p.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),C4=()=>p.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Cancel"),p.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),A4=()=>p.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Success"),p.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"})),E4=e=>{switch(e){case"pending":return Ls;case"confirmed":return A4;case"failed":return C4;default:return Ls}};function k4({tx:e}){const t=qe(),n=E4(e.status),r=e.status==="failed"?"error":"accentColor",{chain:o}=nt(),s=e.status==="confirmed"?"Confirmed":e.status==="failed"?"Failed":"Pending",i=Jg(o);return p.createElement(p.Fragment,null,p.createElement(j,{...i?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:Re({active:"shrink"}),href:`${i}/tx/${e.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:t?"16":"14"},p.createElement(j,{color:r},p.createElement(n,null)),p.createElement(j,{display:"flex",flexDirection:"column",gap:t?"3":"1"},p.createElement(j,null,p.createElement(X,{color:"modalText",font:"body",size:t?"16":"14",weight:"bold"},e==null?void 0:e.description)),p.createElement(j,null,p.createElement(X,{color:e.status==="pending"?"modalTextSecondary":r,font:"body",size:"14",weight:t?"medium":"regular"},s)))),i&&p.createElement(j,{alignItems:"center",color:"modalTextDim",display:"flex"},p.createElement(Yg,null))))}var I4=3;function j4({address:e}){const t=Ng(),n=x4(),{chain:r}=nt(),o=Jg(r),s=t.slice(0,I4),i=s.length>0,a=qe(),{appName:c}=p.useContext(ci),{i18n:l}=p.useContext(Fe);return p.createElement(p.Fragment,null,p.createElement(j,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:a?"8":"18"},i&&p.createElement(j,{paddingBottom:a?"4":"0",paddingTop:"8",paddingX:a?"12":"6"},p.createElement(j,{display:"flex",justifyContent:"space-between"},p.createElement(X,{color:"modalTextSecondary",size:a?"16":"14",weight:"semibold"},l.t("profile.transactions.recent.title")),p.createElement(j,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},p.createElement(j,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:Re({active:"shrink"}),onClick:n,paddingX:a?"8":"12",paddingY:a?"4":"5",transition:"default",type:"button"},p.createElement(X,{color:"modalTextSecondary",size:a?"16":"14",weight:"semibold"},l.t("profile.transactions.clear.label")))))),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},i?s.map(u=>p.createElement(k4,{key:u.hash,tx:u})):p.createElement(p.Fragment,null,p.createElement(j,{padding:a?"12":"8"},p.createElement(X,{color:"modalTextDim",size:a?"16":"14",weight:a?"medium":"bold"},c?l.t("profile.transactions.description",{appName:c}):l.t("profile.transactions.description_fallback"))),a&&p.createElement(j,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),o&&p.createElement(j,{paddingBottom:"18",paddingX:a?"8":"18"},p.createElement(j,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:Re({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${o}/address/${e}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...a?{paddingLeft:"12"}:{}},p.createElement(X,{color:"modalText",font:"body",size:a?"16":"14",weight:a?"semibold":"bold"},l.t("profile.explorer.label")),p.createElement(Yg,null))))}function sh({action:e,icon:t,label:n,testId:r,url:o}){const s=qe();return p.createElement(j,{...o?{as:"a",href:o,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...s?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:Re({active:"shrinkSm",hover:s?void 0:"grow"}),display:"flex",onClick:e,padding:s?"6":"8",style:{willChange:"transform"},testId:r,transition:"default",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},p.createElement(j,{color:"modalText",height:"max"},t),p.createElement(j,null,p.createElement(X,{color:"modalText",size:s?"12":"13",weight:"semibold"},n))))}function B4({address:e,ensAvatar:t,ensName:n,balance:r,onClose:o,onDisconnect:s}){const i=p.useContext(dd),[a,c]=p.useState(!1),l=p.useCallback(()=>{e&&(navigator.clipboard.writeText(e),c(!0))},[e]);if(p.useEffect(()=>{if(a){const b=setTimeout(()=>{c(!1)},1500);return()=>clearTimeout(b)}},[a]),!e)return null;const u=n?Kg(n):Gg(e),f=r==null?void 0:r.formatted,d=f?Vg(Number.parseFloat(f)):void 0,h="rk_profile_title",g=qe(),{i18n:m}=p.useContext(Fe);return p.createElement(p.Fragment,null,p.createElement(j,{display:"flex",flexDirection:"column"},p.createElement(j,{background:"profileForeground",padding:"16"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:g?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},p.createElement(j,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},p.createElement(_r,{onClose:o}))," ",p.createElement(j,{marginTop:g?"24":"0"},p.createElement(kg,{address:e,imageUrl:t,size:g?82:74})),p.createElement(j,{display:"flex",flexDirection:"column",gap:g?"4":"0",textAlign:"center"},p.createElement(j,{textAlign:"center"},p.createElement(X,{as:"h1",color:"modalText",id:h,size:g?"20":"18",weight:"heavy"},u)),!!r&&p.createElement(j,{textAlign:"center"},p.createElement(X,{as:"h1",color:"modalTextSecondary",id:h,size:g?"16":"14",weight:"semibold"},d," ",r.symbol)))),p.createElement(j,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},p.createElement(sh,{action:l,icon:a?p.createElement(y4,null):p.createElement(w4,null),label:a?m.t("profile.copy_address.copied"):m.t("profile.copy_address.label")}),p.createElement(sh,{action:s,icon:p.createElement(v4,null),label:m.t("profile.disconnect.label"),testId:"disconnect-button"}))),i&&p.createElement(p.Fragment,null,p.createElement(j,{background:"generalBorder",height:"1",marginTop:"-1"}),p.createElement(j,null,p.createElement(j4,{address:e})))))}function S4({onClose:e,open:t}){const{address:n}=nt(),{balance:r,ensAvatar:o,ensName:s}=Pg({address:n,includeBalance:t}),{disconnect:i}=Zu();return n?p.createElement(p.Fragment,null,n&&p.createElement(la,{onClose:e,open:t,titleId:"rk_account_modal_title"},p.createElement(ua,{bottomSheetOnMobile:!0,padding:"0"},p.createElement(B4,{address:n,ensAvatar:o,ensName:s,balance:r,onClose:e,onDisconnect:i})))):null}var P4=({size:e})=>p.createElement("svg",{fill:"none",height:e,viewBox:"0 0 28 28",width:e,xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Disconnect"),p.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),O4="v9horb0",gd=p.forwardRef(({children:e,currentlySelected:t=!1,onClick:n,testId:r,...o},s)=>{const i=qe();return p.createElement(j,{as:"button",borderRadius:"menuButton",disabled:t,display:"flex",onClick:n,ref:s,testId:r,type:"button"},p.createElement(j,{borderRadius:"menuButton",className:[i?O4:void 0,!t&&Re({active:"shrink"})],padding:i?"8":"6",transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...o},e))});gd.displayName="MenuButton";var T4=({chainId:e,currentChainId:t,switchChain:n,chainIconSize:r,isLoading:o,src:s,name:i,iconBackground:a,idx:c})=>{const l=qe(),{i18n:u}=p.useContext(Fe),f=zr(),d=t===e;return p.createElement(p.Fragment,null,p.createElement(gd,{currentlySelected:d,onClick:d?void 0:()=>n({chainId:e}),testId:`chain-option-${e}`},p.createElement(j,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:r},s&&p.createElement(j,{height:"full",marginRight:"8"},p.createElement($e,{alt:i,background:a,borderRadius:"full",height:r,src:s,width:r,testId:`chain-option-${e}-icon`})),p.createElement("div",null,i??i)),d&&p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},p.createElement(X,{color:"accentColorForeground",size:"14",weight:"medium"},u.t("chains.connected")),p.createElement(j,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),o&&p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},p.createElement(X,{color:"modalText",size:"14",weight:"medium"},u.t("chains.confirm")),p.createElement(j,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),l&&c<f.length-1&&p.createElement(j,{background:"generalBorderDim",height:"1",marginX:"8"}))},R4=T4,N4="_18dqw9x0",F4="_18dqw9x1";function M4({onClose:e,open:t}){const{chainId:n}=nt(),{chains:r}=Ne(),[o,s]=p.useState(null),{switchChain:i}=CC({mutation:{onMutate:({chainId:g})=>{s(g)},onSuccess:()=>{o&&s(null)},onError:()=>{o&&s(null)},onSettled:()=>{e()}}}),{i18n:a}=p.useContext(Fe),{disconnect:c}=Zu(),l="rk_chain_modal_title",u=qe(),f=r.some(g=>g.id===n),d=u?"36":"28",h=zr();return n?p.createElement(la,{onClose:e,open:t,titleId:l},p.createElement(ua,{bottomSheetOnMobile:!0,paddingBottom:"0"},p.createElement(j,{display:"flex",flexDirection:"column",gap:"14"},p.createElement(j,{display:"flex",flexDirection:"row",justifyContent:"space-between"},u&&p.createElement(j,{width:"30"}),p.createElement(j,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},p.createElement(X,{as:"h1",color:"modalText",id:l,size:u?"20":"18",weight:"heavy"},a.t("chains.title"))),p.createElement(_r,{onClose:e})),!f&&p.createElement(j,{marginX:"8",textAlign:u?"center":"left"},p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},a.t("chains.wrong_network"))),p.createElement(j,{className:u?F4:N4,display:"flex",flexDirection:"column",gap:"4",padding:"2",paddingBottom:"16"},h.map(({iconBackground:g,iconUrl:m,id:b,name:y},C)=>p.createElement(R4,{key:b,chainId:b,currentChainId:n,switchChain:i,chainIconSize:d,isLoading:o===b,src:m,name:y,iconBackground:g,idx:C})),!f&&p.createElement(p.Fragment,null,p.createElement(j,{background:"generalBorderDim",height:"1",marginX:"8"}),p.createElement(gd,{onClick:()=>c(),testId:"chain-option-disconnect"},p.createElement(j,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:d},p.createElement(j,{alignItems:"center",color:"error",height:d,justifyContent:"center",marginRight:"8"},p.createElement(P4,{size:Number(d)})),p.createElement("div",null,a.t("chains.disconnect"))))))))))):null}function D4(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]||(n[o]=[]),n[o].push(r))}return n}var bd=({children:e,href:t})=>p.createElement(j,{as:"a",color:"accentColor",href:t,rel:"noreferrer",target:"_blank"},e),yd=({children:e})=>p.createElement(X,{color:"modalTextSecondary",size:"12",weight:"medium"},e);function ih({compactModeEnabled:e=!1,getWallet:t}){const{disclaimer:n,learnMoreUrl:r}=p.useContext(ci),{i18n:o}=p.useContext(Fe);return p.createElement(p.Fragment,null,p.createElement(j,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},p.createElement(j,{marginBottom:"10"},!e&&p.createElement(X,{color:"modalText",size:"18",weight:"heavy"},o.t("intro.title"))),p.createElement(j,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},p.createElement(j,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},p.createElement(K7,null)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},o.t("intro.digital_asset.title")),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.digital_asset.description")))),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},p.createElement(j,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},p.createElement(Y7,null)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},o.t("intro.login.title")),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.login.description"))))),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},p.createElement(tt,{label:o.t("intro.get.label"),onClick:t}),p.createElement(j,{as:"a",className:Re({active:"shrink",hover:"grow"}),display:"block",href:r,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},o.t("intro.learn_more.label")))),n&&!e&&p.createElement(j,{marginBottom:"8",marginTop:"12",textAlign:"center"},p.createElement(n,{Link:bd,Text:yd}))))}var Xg=()=>p.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Back"),p.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),L4=()=>p.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Info"),p.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),U4=({"aria-label":e="Info",onClick:t})=>{const n=qe();return p.createElement(j,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:Re({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},p.createElement(L4,null))},Zg=e=>{const t=p.useRef(null),n=p.useContext(Mg),r=Da(e);return p.useEffect(()=>{if(n&&t.current&&r)return $4(t.current,r)},[n,r]),t},_4=()=>{const e="_rk_coolMode",t=document.getElementById(e);if(t)return t;const n=document.createElement("div");return n.setAttribute("id",e),n.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(n),n},ah=0;function $4(e,t){ah++;const n=[15,20,25,35,45],r=35;let o=[],s=!1,i=0,a=0;const c=_4();function l(){const w=n[Math.floor(Math.random()*n.length)],x=Math.random()*10,E=Math.random()*25,A=Math.random()*360,I=Math.random()*35*(Math.random()<=.5?-1:1),S=a-w/2,T=i-w/2,R=Math.random()<=.5?-1:1,M=document.createElement("div");M.innerHTML=`<img src="${t}" width="${w}" height="${w}" style="border-radius: 25%">`,M.setAttribute("style",["position:absolute","will-change:transform",`top:${S}px`,`left:${T}px`,`transform:rotate(${A}deg)`].join(";")),c.appendChild(M),o.push({direction:R,element:M,left:T,size:w,speedHorz:x,speedUp:E,spinSpeed:I,spinVal:A,top:S})}function u(){for(const w of o)w.left=w.left-w.speedHorz*w.direction,w.top=w.top-w.speedUp,w.speedUp=Math.min(w.size,w.speedUp-1),w.spinVal=w.spinVal+w.spinSpeed,w.top>=Math.max(window.innerHeight,document.body.clientHeight)+w.size&&(o=o.filter(x=>x!==w),w.element.remove()),w.element.setAttribute("style",["position:absolute","will-change:transform",`top:${w.top}px`,`left:${w.left}px`,`transform:rotate(${w.spinVal}deg)`].join(";"))}let f;function d(){s&&o.length<r&&l(),u(),f=requestAnimationFrame(d)}d();const h="ontouchstart"in window||navigator.msMaxTouchPoints,g=h?"touchstart":"mousedown",m=h?"touchend":"mouseup",b=h?"touchmove":"mousemove",y=w=>{var x,E;"touches"in w?(i=(x=w.touches)==null?void 0:x[0].clientX,a=(E=w.touches)==null?void 0:E[0].clientY):(i=w.clientX,a=w.clientY)},C=w=>{y(w),s=!0},v=()=>{s=!1};return e.addEventListener(b,y,{passive:!1}),e.addEventListener(g,C),e.addEventListener(m,v),e.addEventListener("mouseleave",v),()=>{e.removeEventListener(b,y),e.removeEventListener(g,C),e.removeEventListener(m,v),e.removeEventListener("mouseleave",v);const w=setInterval(()=>{f&&o.length===0&&(cancelAnimationFrame(f),clearInterval(w),--ah===0&&c.remove())},500)}}var q4="g5kl0l0",eb=({as:e="button",currentlySelected:t=!1,iconBackground:n,iconUrl:r,name:o,onClick:s,ready:i,recent:a,testId:c,isRainbowKitConnector:l,...u})=>{const f=Zg(r),[d,h]=p.useState(!1),{i18n:g}=p.useContext(Fe);return p.createElement(j,{display:"flex",flexDirection:"column",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),ref:f},p.createElement(j,{as:e,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:t?void 0:[q4,Re({active:"shrink"})],disabled:t,onClick:s,padding:"5",style:{willChange:"transform"},testId:c,transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...u},p.createElement(j,{color:t?"accentColorForeground":"modalText",disabled:!i,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},p.createElement($e,{background:n,...!d&&l?{borderColor:"actionButtonBorder"}:{},useAsImage:!l,borderRadius:"6",height:"28",src:r,width:"28"}),p.createElement(j,null,p.createElement(j,{style:{marginTop:a?-2:void 0},maxWidth:"200"},o),a&&p.createElement(X,{color:t?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"medium"},g.t("connect.recent")))))))};eb.displayName="ModalSelection";var W4="rk-latest-id";function z4(e){localStorage.setItem(W4,e)}var Nc=(e,t=1)=>{let n=e.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=Number.parseInt(n.substring(0,2),16),o=Number.parseInt(n.substring(2,4),16),s=Number.parseInt(n.substring(4,6),16);return t>1&&t<=100&&(t=t/100),`rgba(${r},${o},${s},${t})`},Q4=e=>e?[Nc(e,.2),Nc(e,.14),Nc(e,.1)]:null,H4=e=>/^#([0-9a-f]{3}){1,2}$/i.test(e),tb=async()=>(await Promise.resolve().then(()=>require("./connect-UA7M4XW6-BCDqQn-T.js"))).default,V4=()=>un(tb),G4=()=>p.createElement($e,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:tb,width:"48"}),nb=async()=>(await Promise.resolve().then(()=>require("./create-FASO7PVG-DaZC1z5H.js"))).default,rb=()=>un(nb),K4=()=>p.createElement($e,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:nb,width:"48"}),ob=async()=>(await Promise.resolve().then(()=>require("./refresh-S4T5V5GX-BZCZ2pAn.js"))).default,J4=()=>un(ob),Y4=()=>p.createElement($e,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:ob,width:"48"}),sb=async()=>(await Promise.resolve().then(()=>require("./scan-4UYSQ56Q-DqVlbE3J.js"))).default,ib=()=>un(sb),X4=()=>p.createElement($e,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:sb,width:"48"}),Z4="_1vwt0cg0",e9="_1vwt0cg2 ju367v7a ju367v7v",t9="_1vwt0cg3",n9="_1vwt0cg4";function ab({ecc:e="medium",logoBackground:t,logoSize:n=50,logoUrl:r,size:o=200,uri:s}){const i="20",a=o-Number.parseInt(i,10)*2,c=Da(r);return p.createElement(j,{borderColor:"generalBorder",borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:Z4,padding:i,width:"max"},p.createElement(j,{style:{height:a,userSelect:"none",width:a},userSelect:"none"},p.createElement(rn.Root,{errorCorrection:e,size:a,value:s},p.createElement(rn.Cells,{radius:1}),p.createElement(rn.Finder,{radius:.25}),c&&p.createElement(rn.Arena,null,p.createElement("img",{alt:"Wallet Logo",src:c,style:{objectFit:"cover",height:"88%",width:"88%",borderRadius:"22.5%",backgroundColor:t}})))))}var cb=async()=>{switch(hd()){case"Arc":return(await Promise.resolve().then(()=>require("./Arc-VDBY7LNS-m3oU4SFX.js"))).default;case"Brave":return(await Promise.resolve().then(()=>require("./Brave-BRAKJXDS-B9q28yrX.js"))).default;case"Chrome":return(await Promise.resolve().then(()=>require("./Chrome-65Q5P54Y-9eqcWmOm.js"))).default;case"Edge":return(await Promise.resolve().then(()=>require("./Edge-XSPUTORV-B8kHPG9e.js"))).default;case"Firefox":return(await Promise.resolve().then(()=>require("./Firefox-AAHGJQIP-BtlH2zVc.js"))).default;case"Opera":return(await Promise.resolve().then(()=>require("./Opera-KQZLSACL-BY-yTZwm.js"))).default;case"Safari":return(await Promise.resolve().then(()=>require("./Safari-ZPL37GXR-BAHe1sxY.js"))).default;default:return(await Promise.resolve().then(()=>require("./Browser-76IHF3Y2-BR3yRO0Q.js"))).default}},r9=()=>un(cb),lb=async()=>{switch(md()){case"Windows":return(await Promise.resolve().then(()=>require("./Windows-PPTHQER6-BtXwY24K.js"))).default;case"macOS":return(await Promise.resolve().then(()=>require("./Macos-MW4AE7LN-34pmNxSL.js"))).default;case"Linux":return(await Promise.resolve().then(()=>require("./Linux-OO4TNCLJ-BzSRqE5q.js"))).default;default:return(await Promise.resolve().then(()=>require("./Linux-OO4TNCLJ-BzSRqE5q.js"))).default}},o9=()=>un(lb);function s9({getWalletDownload:e,compactModeEnabled:t}){const r=Us().filter(s=>s.isRainbowKitConnector).splice(0,5),{i18n:o}=p.useContext(Fe);return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},r==null?void 0:r.filter(s=>{var i;return s.extensionDownloadUrl||s.desktopDownloadUrl||s.qrCode&&((i=s.downloadUrls)==null?void 0:i.qrCode)}).map(s=>{const{downloadUrls:i,iconBackground:a,iconUrl:c,id:l,name:u,qrCode:f}=s,d=(i==null?void 0:i.qrCode)&&f,h=!!s.extensionDownloadUrl,g=(i==null?void 0:i.qrCode)&&h,m=(i==null?void 0:i.qrCode)&&!!s.desktopDownloadUrl;return p.createElement(j,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:s.id,width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},p.createElement($e,{background:a,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:c,width:"48"}),p.createElement(j,{display:"flex",flexDirection:"column",gap:"2"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},u),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},g?o.t("get.mobile_and_extension.description"):m?o.t("get.mobile_and_desktop.description"):d?o.t("get.mobile.description"):h?o.t("get.extension.description"):null))),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(tt,{label:o.t("get.action.label"),onClick:()=>e(l),type:"secondary"})))})),p.createElement(j,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},o.t("get.looking_for.title")),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},t?o.t("get.looking_for.desktop.compact_description"):o.t("get.looking_for.desktop.wide_description"))))}var Fc="44";function i9({changeWalletStep:e,compactModeEnabled:t,connectionError:n,onClose:r,qrCodeUri:o,reconnect:s,wallet:i}){const{downloadUrls:a,iconBackground:c,iconUrl:l,name:u,qrCode:f,ready:d,showWalletConnectModal:h,getDesktopUri:g}=i,m=!!g,b=fd(),{i18n:y}=p.useContext(Fe),C=!!i.extensionDownloadUrl,v=(a==null?void 0:a.qrCode)&&C,w=(a==null?void 0:a.qrCode)&&!!i.desktopDownloadUrl,x=f&&o,E=async()=>{const T=await(g==null?void 0:g());window.open(T,b?"_blank":"_self")},A=h?{description:t?y.t("connect.walletconnect.description.compact"):y.t("connect.walletconnect.description.full"),label:y.t("connect.walletconnect.open.label"),onClick:()=>{r(),h()}}:x?{description:y.t("connect.secondary_action.get.description",{wallet:u}),label:y.t("connect.secondary_action.get.label"),onClick:()=>e(v||w?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:I}=Dg(),S=I&&I<768;return p.useEffect(()=>{r9(),o9()},[]),p.createElement(j,{display:"flex",flexDirection:"column",height:"full",width:"full"},x?p.createElement(j,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},p.createElement(ab,{logoBackground:c,logoSize:t?60:72,logoUrl:l,size:t?318:S?Math.max(280,Math.min(I-308,382)):382,uri:o})):p.createElement(j,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},p.createElement(j,{borderRadius:"10",height:Fc,overflow:"hidden"},p.createElement($e,{useAsImage:!i.isRainbowKitConnector,height:Fc,src:l,width:Fc})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},p.createElement(X,{color:"modalText",size:"18",weight:"bold"},d?y.t("connect.status.opening",{wallet:u}):C?y.t("connect.status.not_installed",{wallet:u}):y.t("connect.status.not_available",{wallet:u})),!d&&C?p.createElement(j,{paddingTop:"20"},p.createElement(tt,{href:i.extensionDownloadUrl,label:y.t("connect.secondary_action.install.label"),type:"secondary"})):null,d&&!x&&p.createElement(p.Fragment,null,p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},p.createElement(X,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"medium"},y.t("connect.status.confirm"))),p.createElement(j,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},n?p.createElement(tt,{label:y.t("connect.secondary_action.retry.label"),onClick:async()=>{m&&E(),s(i)}}):p.createElement(j,{color:"modalTextSecondary"},p.createElement(Ls,null))))))),p.createElement(j,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},d&&A&&p.createElement(p.Fragment,null,p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},A.description),p.createElement(tt,{label:A.label,onClick:A.onClick,type:"secondary"}))))}var Mc=({actionLabel:e,description:t,iconAccent:n,iconBackground:r,iconUrl:o,isCompact:s,onAction:i,title:a,url:c,variant:l})=>{const u=l==="browser",f=!u&&n&&Q4(n);return p.createElement(j,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:s?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},p.createElement(j,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),u&&p.createElement(j,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},p.createElement(j,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},p.createElement(j,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},p.createElement($e,{borderRadius:"full",height:"200",src:o,width:"200"})),p.createElement(j,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},p.createElement($e,{borderRadius:"full",height:"200",src:o,width:"200"})))),!u&&f&&p.createElement(j,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},p.createElement(j,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[0]} 0%, ${f[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),p.createElement(j,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),p.createElement(j,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},p.createElement(j,null,p.createElement($e,{height:"60",src:o,width:"60",...r?{background:r,borderColor:"generalBorder",borderRadius:"10"}:null})),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},a),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},t),p.createElement(j,{marginTop:"14",width:"max"},p.createElement(tt,{href:c,label:e,onClick:i,size:"medium"})))))};function a9({changeWalletStep:e,wallet:t}){const n=hd(),r=md(),s=p.useContext(La)==="compact",{desktop:i,desktopDownloadUrl:a,extension:c,extensionDownloadUrl:l,mobileDownloadUrl:u}=t,{i18n:f}=p.useContext(Fe);return p.useEffect(()=>{rb(),ib(),J4(),V4()},[]),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},l&&p.createElement(Mc,{actionLabel:f.t("get_options.extension.download.label",{browser:n}),description:f.t("get_options.extension.description"),iconUrl:cb,isCompact:s,onAction:()=>e(c!=null&&c.instructions?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:f.t("get_options.extension.title",{wallet:t.name,browser:n}),url:l,variant:"browser"}),a&&p.createElement(Mc,{actionLabel:f.t("get_options.desktop.download.label",{platform:r}),description:f.t("get_options.desktop.description"),iconUrl:lb,isCompact:s,onAction:()=>e(i!=null&&i.instructions?"INSTRUCTIONS_DESKTOP":"CONNECT"),title:f.t("get_options.desktop.title",{wallet:t.name,platform:r}),url:a,variant:"desktop"}),u&&p.createElement(Mc,{actionLabel:f.t("get_options.mobile.download.label",{wallet:t.name}),description:f.t("get_options.mobile.description"),iconAccent:t.iconAccent,iconBackground:t.iconBackground,iconUrl:t.iconUrl,isCompact:s,onAction:()=>{e("DOWNLOAD")},title:f.t("get_options.mobile.title",{wallet:t.name}),variant:"app"})))}function c9({changeWalletStep:e,wallet:t}){const{downloadUrls:n,qrCode:r}=t,{i18n:o}=p.useContext(Fe);return p.useEffect(()=>{rb(),ib()},[]),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},p.createElement(j,{style:{maxWidth:220,textAlign:"center"}},p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"semibold"},o.t("get_mobile.description"))),p.createElement(j,{height:"full"},n!=null&&n.qrCode?p.createElement(ab,{logoSize:0,size:268,uri:n.qrCode}):null),p.createElement(j,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},p.createElement(tt,{label:o.t("get_mobile.continue.label"),onClick:()=>e(r!=null&&r.instructions?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var Bn={connect:()=>p.createElement(G4,null),create:()=>p.createElement(K4,null),install:e=>p.createElement($e,{background:e.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:e.iconUrl,width:"48"}),refresh:()=>p.createElement(Y4,null),scan:()=>p.createElement(X4,null)};function l9({connectWallet:e,wallet:t}){var r,o,s,i;const{i18n:n}=p.useContext(Fe);return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},p.createElement(j,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.qrCode)==null?void 0:r.instructions)==null?void 0:o.steps.map((a,c)=>{var l;return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:c},p.createElement(j,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(l=Bn[a.step])==null?void 0:l.call(Bn,t)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},n.t(a.title,void 0,{rawKeyIfTranslationMissing:!0})),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(a.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},p.createElement(tt,{label:n.t("get_instructions.mobile.connect.label"),onClick:()=>e(t)}),p.createElement(j,{as:"a",className:Re({active:"shrink",hover:"grow"}),display:"block",href:(i=(s=t==null?void 0:t.qrCode)==null?void 0:s.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.mobile.learn_more.label")))))}function u9({wallet:e}){var n,r,o,s;const{i18n:t}=p.useContext(Fe);return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},p.createElement(j,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(r=(n=e==null?void 0:e.extension)==null?void 0:n.instructions)==null?void 0:r.steps.map((i,a)=>{var c;return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:a},p.createElement(j,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(c=Bn[i.step])==null?void 0:c.call(Bn,e)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},t.t(i.title,void 0,{rawKeyIfTranslationMissing:!0})),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},t.t(i.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},p.createElement(tt,{label:t.t("get_instructions.extension.refresh.label"),onClick:window.location.reload.bind(window.location)}),p.createElement(j,{as:"a",className:Re({active:"shrink",hover:"grow"}),display:"block",href:(s=(o=e==null?void 0:e.extension)==null?void 0:o.instructions)==null?void 0:s.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},t.t("get_instructions.extension.learn_more.label")))))}function d9({connectWallet:e,wallet:t}){var r,o,s,i;const{i18n:n}=p.useContext(Fe);return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},p.createElement(j,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.desktop)==null?void 0:r.instructions)==null?void 0:o.steps.map((a,c)=>{var l;return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:c},p.createElement(j,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(l=Bn[a.step])==null?void 0:l.call(Bn,t)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},n.t(a.title,void 0,{rawKeyIfTranslationMissing:!0})),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(a.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},p.createElement(tt,{label:n.t("get_instructions.desktop.connect.label"),onClick:()=>e(t)}),p.createElement(j,{as:"a",className:Re({active:"shrink",hover:"grow"}),display:"block",href:(i=(s=t==null?void 0:t.desktop)==null?void 0:s.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.desktop.learn_more.label")))))}function f9({onClose:e}){const t="rk_connect_title",[n,r]=p.useState(),[o,s]=p.useState(),[i,a]=p.useState(),c=!!(o!=null&&o.qrCode)&&i,[l,u]=p.useState(!1),d=p.useContext(La)===ui.COMPACT,{disclaimer:h}=p.useContext(ci),{i18n:g}=p.useContext(Fe),m=fd(),b=p.useRef(!1),{connector:y}=p.useContext(li),v=Us(!y).filter(Q=>Q.ready||!!Q.extensionDownloadUrl).sort((Q,G)=>Q.groupIndex-G.groupIndex),w=Us(),x=D4(v,Q=>Q.groupName),E=["Recommended","Other","Popular","More","Others","Installed"];p.useEffect(()=>{y&&!b.current&&(N("CONNECT"),T(y),b.current=!0)},[y]);const A=Q=>{var G,oe;u(!1),Q.ready&&((oe=(G=Q==null?void 0:Q.connect)==null?void 0:G.call(Q))==null||oe.catch(()=>{u(!0)}))},I=async Q=>{const G=v.find(oe=>Q.id===oe.id);G!=null&&G.getDesktopUri&&setTimeout(async()=>{var ae;const oe=await((ae=G==null?void 0:G.getDesktopUri)==null?void 0:ae.call(G));oe&&window.open(oe,m?"_blank":"_self")},0)},S=async Q=>{var ae;const G=v.find(Ie=>Q.id===Ie.id),oe=await((ae=G==null?void 0:G.getQrCodeUri)==null?void 0:ae.call(G));a(oe),setTimeout(()=>{s(G),N("CONNECT")},oe?0:50)},T=async Q=>{z4(Q.id),Q.ready&&(S(Q),I(Q)),A(Q),r(Q.id),Q.ready||(s(Q),N(Q!=null&&Q.extensionDownloadUrl?"DOWNLOAD_OPTIONS":"CONNECT"))},R=Q=>{var Oe;const G=w.find(Se=>Q===Se.id),oe=(Oe=G==null?void 0:G.downloadUrls)==null?void 0:Oe.qrCode,ae=!!(G!=null&&G.desktopDownloadUrl),Ie=!!(G!=null&&G.extensionDownloadUrl);s(G),N(oe&&(Ie||ae)?"DOWNLOAD_OPTIONS":oe?"DOWNLOAD":ae?"INSTRUCTIONS_DESKTOP":"INSTRUCTIONS_EXTENSION")},M=()=>{r(void 0),s(void 0),a(void 0)},N=(Q,G=!1)=>{G&&Q==="GET"&&W==="GET"?M():!G&&Q==="GET"?P("GET"):!G&&Q==="CONNECT"&&P("CONNECT"),_(Q)},[W,P]=p.useState("NONE"),[D,_]=p.useState("NONE");let F=null,U=null,q=null,ne;p.useEffect(()=>{u(!1)},[D,o]);const xe=!!(!!(o!=null&&o.extensionDownloadUrl)&&(o!=null&&o.mobileDownloadUrl));switch(D){case"NONE":F=p.createElement(ih,{getWallet:()=>N("GET")});break;case"LEARN_COMPACT":F=p.createElement(ih,{compactModeEnabled:d,getWallet:()=>N("GET")}),U=g.t("intro.title"),q="NONE";break;case"GET":F=p.createElement(s9,{getWalletDownload:R,compactModeEnabled:d}),U=g.t("get.title"),q=d?"LEARN_COMPACT":"NONE";break;case"CONNECT":F=o&&p.createElement(i9,{changeWalletStep:N,compactModeEnabled:d,connectionError:l,onClose:e,qrCodeUri:i,reconnect:A,wallet:o}),U=c&&(o.name==="WalletConnect"?g.t("connect_scan.fallback_title"):g.t("connect_scan.title",{wallet:o.name})),q=d?y?null:"NONE":null,ne=d?y?()=>{}:M:()=>{};break;case"DOWNLOAD_OPTIONS":F=o&&p.createElement(a9,{changeWalletStep:N,wallet:o}),U=o&&g.t("get_options.short_title",{wallet:o.name}),q=y?"CONNECT":d?"NONE":W;break;case"DOWNLOAD":F=o&&p.createElement(c9,{changeWalletStep:N,wallet:o}),U=o&&g.t("get_mobile.title",{wallet:o.name}),q=xe?"DOWNLOAD_OPTIONS":W;break;case"INSTRUCTIONS_MOBILE":F=o&&p.createElement(l9,{connectWallet:T,wallet:o}),U=o&&g.t("get_options.title",{wallet:d&&o.shortName||o.name}),q="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":F=o&&p.createElement(u9,{wallet:o}),U=o&&g.t("get_options.title",{wallet:d&&o.shortName||o.name}),q="DOWNLOAD_OPTIONS";break;case"INSTRUCTIONS_DESKTOP":F=o&&p.createElement(d9,{connectWallet:T,wallet:o}),U=o&&g.t("get_options.title",{wallet:d&&o.shortName||o.name}),q="DOWNLOAD_OPTIONS";break}return p.createElement(j,{display:"flex",flexDirection:"row",style:{maxHeight:d?468:504}},(d?D==="NONE":!0)&&p.createElement(j,{className:d?n9:t9,display:"flex",flexDirection:"column",marginTop:"16"},p.createElement(j,{display:"flex",justifyContent:"space-between"},d&&h&&p.createElement(j,{marginLeft:"16",width:"28"},p.createElement(U4,{onClick:()=>N("LEARN_COMPACT")})),d&&!h&&p.createElement(j,{marginLeft:"16",width:"28"}),p.createElement(j,{marginLeft:d?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},p.createElement(X,{as:"h1",color:"modalText",id:t,size:"18",weight:"heavy",testId:"connect-header-label"},g.t("connect.title"))),d&&p.createElement(j,{marginRight:"16"},p.createElement(_r,{onClose:e}))),p.createElement(j,{className:e9,paddingBottom:"18"},Object.entries(x).map(([Q,G],oe)=>G.length>0&&p.createElement(p.Fragment,{key:oe},Q?p.createElement(j,{marginBottom:"8",marginTop:"16",marginX:"6"},p.createElement(X,{color:Q==="Installed"?"accentColor":"modalTextSecondary",size:"14",weight:"bold"},E.includes(Q)?g.t(`connector_group.${Q.toLowerCase()}`):Q)):null,p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},G.map(ae=>p.createElement(eb,{currentlySelected:ae.id===n,iconBackground:ae.iconBackground,iconUrl:ae.iconUrl,key:ae.id,name:ae.name,onClick:()=>T(ae),ready:ae.ready,recent:ae.recent,testId:`wallet-option-${ae.id}`,isRainbowKitConnector:ae.isRainbowKitConnector})))))),d&&p.createElement(p.Fragment,null,p.createElement(j,{background:"generalBorder",height:"1",marginTop:"-1"}),h?p.createElement(j,{paddingX:"24",paddingY:"16",textAlign:"center"},p.createElement(h,{Link:bd,Text:yd})):p.createElement(j,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},p.createElement(j,{paddingY:"4"},p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},g.t("connect.new_to_ethereum.description"))),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},p.createElement(j,{className:Re({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>N("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},g.t("connect.new_to_ethereum.learn_more.label"))))))),(d?D!=="NONE":!0)&&p.createElement(p.Fragment,null,!d&&p.createElement(j,{background:"generalBorder",minWidth:"1",width:"1"}),p.createElement(j,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},p.createElement(j,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},p.createElement(j,{width:"28"},q&&p.createElement(j,{as:"button",className:Re({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{q&&N(q,!0),ne==null||ne()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},p.createElement(Xg,null))),p.createElement(j,{display:"flex",justifyContent:"center",style:{flexGrow:1}},U&&p.createElement(X,{color:"modalText",size:"18",textAlign:"center",weight:"heavy"},U)),p.createElement(_r,{onClose:e})),p.createElement(j,{display:"flex",flexDirection:"column",style:{minHeight:d?396:432}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},F)))))}var h9="_1am14412",p9="_1am14410",m9="_1am14413",g9=({wallet:e})=>p.createElement("svg",{className:m9,viewBox:"0 0 86 86",width:"86",height:"86"},p.createElement("title",null,"Loading"),p.createElement("rect",{x:"3",y:"3",width:80,height:80,rx:20,ry:20,strokeDasharray:`${160/3} ${2*160/3}`,strokeDashoffset:160,className:h9,style:{stroke:(e==null?void 0:e.iconAccent)||"#0D3887"}}));function ub({onClose:e,wallet:t,connecting:n}){const{connect:r,iconBackground:o,iconUrl:s,id:i,name:a,getMobileUri:c,ready:l,shortName:u,showWalletConnectModal:f}=t,d=Zg(s),h=p.useRef(!1),{i18n:g}=p.useContext(Fe),m=p.useCallback(async()=>{if(i!=="walletConnect"&&(async()=>{const y=await(c==null?void 0:c());if(y)if(y&&n4({mobileUri:y,name:a}),y.startsWith("http")){const C=document.createElement("a");C.href=y,C.target="_blank",C.rel="noreferrer noopener",C.click()}else window.location.href=y})(),f){f(),e==null||e();return}try{await(r==null?void 0:r())}catch{}},[r,c,f,e,a,i]);return p.useEffect(()=>{n&&!h.current&&(m(),h.current=!0)},[n,m]),p.createElement(j,{as:"button",color:l?"modalText":"modalTextSecondary",disabled:!l,fontFamily:"body",key:i,onClick:m,ref:d,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${i}`,type:"button",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},p.createElement(j,{display:"flex",alignItems:"center",justifyContent:"center",paddingBottom:"8",paddingTop:"10",position:"relative"},n?p.createElement(g9,{wallet:t}):null,p.createElement($e,{background:o,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:s,width:"60"})),n?null:p.createElement(j,{display:"flex",flexDirection:"column",textAlign:"center"},p.createElement(X,{as:"h2",color:t.ready?"modalText":"modalTextSecondary",size:"13",weight:"medium"},p.createElement(j,{as:"span",position:"relative"},u??a,!t.ready&&" (unsupported)")),t.recent&&p.createElement(X,{color:"accentColor",size:"12",weight:"medium"},g.t("connect.recent")))))}function b9({onClose:e}){var h;const t="rk_connect_title",n=Us().filter(g=>g.isRainbowKitConnector),{disclaimer:r,learnMoreUrl:o}=p.useContext(ci);let s=null,i=null,a=!1,c=null;const[l,u]=p.useState("CONNECT"),{i18n:f}=p.useContext(Fe),d=Ma();switch(l){case"CONNECT":{s=f.t("connect.title"),a=!0,i=p.createElement(j,null,p.createElement(j,{background:"profileForeground",className:p9,display:"flex",paddingBottom:"20",paddingTop:"6",paddingX:"20",style:{gap:"calc((100% - 40px - 240px + 47px) / 4)"}},n.filter(g=>g.ready).map(g=>p.createElement(j,{key:g.id,width:"60"},p.createElement(ub,{onClose:e,wallet:g})))),p.createElement(j,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},p.createElement(j,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},p.createElement(X,{color:"modalText",size:"16",weight:"bold"},f.t("intro.title")),p.createElement(X,{color:"modalTextSecondary",size:"16"},f.t("intro.description")))),p.createElement(j,{paddingTop:"32",paddingX:"20"},p.createElement(j,{display:"flex",gap:"14",justifyContent:"center"},p.createElement(tt,{label:f.t("intro.get.label"),onClick:()=>u("GET"),size:"large",type:"secondary"}),p.createElement(tt,{href:o,label:f.t("intro.learn_more.label"),size:"large",type:"secondary"}))),r&&p.createElement(j,{marginTop:"28",marginX:"32",textAlign:"center"},p.createElement(r,{Link:bd,Text:yd})));break}case"GET":{s=f.t("get.title"),c="CONNECT";const g=(h=n==null?void 0:n.filter(m=>{var b,y,C;return((b=m.downloadUrls)==null?void 0:b.ios)||((y=m.downloadUrls)==null?void 0:y.android)||((C=m.downloadUrls)==null?void 0:C.mobile)}))==null?void 0:h.splice(0,3);i=p.createElement(j,null,p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},g.map((m,b)=>{const{downloadUrls:y,iconBackground:C,iconUrl:v,name:w}=m;return!(y!=null&&y.ios)&&!(y!=null&&y.android)&&!(y!=null&&y.mobile)?null:p.createElement(j,{display:"flex",gap:"16",key:m.id,paddingX:"20",width:"full"},p.createElement(j,{style:{minHeight:48,minWidth:48}},p.createElement($e,{background:C,borderColor:"generalBorder",borderRadius:"10",height:"48",src:v,width:"48"})),p.createElement(j,{display:"flex",flexDirection:"column",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",height:"48"},p.createElement(j,{width:"full"},p.createElement(X,{color:"modalText",size:"18",weight:"bold"},w)),p.createElement(tt,{href:(d?y==null?void 0:y.ios:y==null?void 0:y.android)||(y==null?void 0:y.mobile),label:f.t("get.action.label"),size:"small",type:"secondary"})),b<g.length-1&&p.createElement(j,{background:"generalBorderDim",height:"1",marginY:"10",width:"full"})))})),p.createElement(j,{style:{marginBottom:"42px"}}),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"36",paddingX:"36",style:{textAlign:"center"}},p.createElement(j,{display:"flex",flexDirection:"column",gap:"12",textAlign:"center"},p.createElement(X,{color:"modalText",size:"16",weight:"bold"},f.t("get.looking_for.title")),p.createElement(X,{color:"modalTextSecondary",size:"16"},f.t("get.looking_for.mobile.description")))));break}}return p.createElement(j,{display:"flex",flexDirection:"column",paddingBottom:"36"},p.createElement(j,{background:a?"profileForeground":"modalBackground",display:"flex",flexDirection:"column",paddingBottom:"4",paddingTop:"14"},p.createElement(j,{display:"flex",justifyContent:"center",paddingBottom:"6",paddingX:"20",position:"relative"},c&&p.createElement(j,{display:"flex",position:"absolute",style:{left:0,marginBottom:-20,marginTop:-20}},p.createElement(j,{alignItems:"center",as:"button",className:Re({active:"shrinkSm",hover:"growLg"}),color:"accentColor",display:"flex",marginLeft:"4",marginTop:"20",onClick:()=>u(c),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},p.createElement(Xg,null))),p.createElement(j,{marginTop:"4",textAlign:"center",width:"full"},p.createElement(X,{as:"h1",color:"modalText",id:t,size:"20",weight:"bold"},s)),p.createElement(j,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},p.createElement(j,{style:{marginBottom:-20,marginTop:-20}},p.createElement(_r,{onClose:e}))))),p.createElement(j,{display:"flex",flexDirection:"column"},i))}var y9=({onClose:e})=>{const{connector:t}=p.useContext(li),{i18n:n}=p.useContext(Fe),r=(t==null?void 0:t.name)||"";return p.createElement(j,null,p.createElement(j,{display:"flex",paddingBottom:"32",justifyContent:"center",alignItems:"center",background:"profileForeground",flexDirection:"column"},p.createElement(j,{width:"full",display:"flex",justifyContent:"flex-end",marginTop:"18",marginRight:"24"},p.createElement(_r,{onClose:e})),p.createElement(j,{width:"60"},p.createElement(ub,{onClose:e,wallet:t,connecting:!0})),p.createElement(j,{marginTop:"20"},p.createElement(X,{textAlign:"center",color:"modalText",size:"18",weight:"semibold"},n.t("connect.status.connect_mobile",{wallet:r}))),p.createElement(j,{maxWidth:"full",marginTop:"8"},p.createElement(X,{textAlign:"center",color:"modalText",size:"16",weight:"medium"},n.t("connect.status.confirm_mobile",{wallet:r})))))};function w9({onClose:e}){const{connector:t}=p.useContext(li);return qe()?t?p.createElement(y9,{onClose:e}):p.createElement(b9,{onClose:e}):p.createElement(f9,{onClose:e})}function v9({onClose:e,open:t}){const n="rk_connect_title",r=cd(),{disconnect:o}=Zu(),{isConnecting:s}=nt(),i=p.useCallback(()=>{e(),o()},[e,o]),a=p.useCallback(()=>{s&&o(),e()},[e,o,s]);return r==="disconnected"?p.createElement(la,{onClose:a,open:t,titleId:n},p.createElement(ua,{bottomSheetOnMobile:!0,padding:"0",wide:!0},p.createElement(w9,{onClose:a}))):r==="unauthenticated"?p.createElement(la,{onClose:i,open:t,titleId:n},p.createElement(ua,{bottomSheetOnMobile:!0,padding:"0"},p.createElement(e4,{onClose:i,onCloseModal:e}))):null}function Dc(){const[e,t]=p.useState(!1);return{closeModal:p.useCallback(()=>t(!1),[]),isModalOpen:e,openModal:p.useCallback(()=>t(!0),[])}}var Go=p.createContext({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1,isWalletConnectModalOpen:!1,setIsWalletConnectModalOpen:()=>{}});function x9({children:e}){const{closeModal:t,isModalOpen:n,openModal:r}=Dc(),{closeModal:o,isModalOpen:s,openModal:i}=Dc(),{closeModal:a,isModalOpen:c,openModal:l}=Dc(),[u,f]=p.useState(!1),d=cd(),{chainId:h}=nt(),{chains:g}=Ne(),m=g.some(C=>C.id===h),b=p.useCallback(({keepConnectModalOpen:C=!1}={})=>{C||t(),o(),a()},[t,o,a]),y=Fa()==="unauthenticated";return C1({onConnect:()=>b({keepConnectModalOpen:y}),onDisconnect:()=>b()}),p.useEffect(()=>{y&&b()},[y,b]),p.createElement(Go.Provider,{value:p.useMemo(()=>({accountModalOpen:s,chainModalOpen:c,connectModalOpen:n,isWalletConnectModalOpen:u,openAccountModal:m&&d==="connected"?i:void 0,openChainModal:d==="connected"?l:void 0,openConnectModal:d==="disconnected"||d==="unauthenticated"?r:void 0,setIsWalletConnectModalOpen:f}),[d,s,c,n,i,l,r,m,u])},e,p.createElement(v9,{onClose:t,open:n}),p.createElement(S4,{onClose:o,open:s}),p.createElement(M4,{onClose:a,open:c}))}function C9(){const{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}=p.useContext(Go);return{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}}function A9(){const{accountModalOpen:e,openAccountModal:t}=p.useContext(Go);return{accountModalOpen:e,openAccountModal:t}}function E9(){const{chainModalOpen:e,openChainModal:t}=p.useContext(Go);return{chainModalOpen:e,openChainModal:t}}function db(){const{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}=p.useContext(Go);return{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}}function k9(){const{connectModalOpen:e,openConnectModal:t}=p.useContext(Go),{isWalletConnectModalOpen:n}=db();return{connectModalOpen:e||n,openConnectModal:t}}var Lc=()=>{};function wd({children:e}){const t=i7(),{address:n}=nt(),{chainId:r}=nt(),{chains:o}=Ne(),s=o.some(M=>M.id===r),i=o7(),a=Fa()??void 0,c=r?i[r]:void 0,l=(c==null?void 0:c.name)??void 0,u=(c==null?void 0:c.iconUrl)??void 0,f=(c==null?void 0:c.iconBackground)??void 0,d=Da(u),h=p.useContext(dd),g=Ng().some(({status:M})=>M==="pending")&&h,{showBalance:m}=Bg(),y=typeof m=="boolean"?m:m?wg(m)[qe()?"smallScreen":"largeScreen"]:!0,{balance:C,ensAvatar:v,ensName:w}=Pg({address:n,includeBalance:y}),x=C?`${Vg(Number.parseFloat(C.formatted))} ${C.symbol}`:void 0,{openConnectModal:E}=k9(),{openChainModal:A}=E9(),{openAccountModal:I}=A9(),{accountModalOpen:S,chainModalOpen:T,connectModalOpen:R}=C9();return p.createElement(p.Fragment,null,e({account:n?{address:n,balanceDecimals:C==null?void 0:C.decimals,balanceFormatted:C==null?void 0:C.formatted,balanceSymbol:C==null?void 0:C.symbol,displayBalance:x,displayName:w?Kg(w):Gg(n),ensAvatar:v??void 0,ensName:w??void 0,hasPendingTransactions:g}:void 0,accountModalOpen:S,authenticationStatus:a,chain:r?{hasIcon:!!u,iconBackground:f,iconUrl:d,id:r,name:l,unsupported:!s}:void 0,chainModalOpen:T,connectModalOpen:R,mounted:t(),openAccountModal:I??Lc,openChainModal:A??Lc,openConnectModal:E??Lc}))}wd.displayName="ConnectButton.Custom";var ls={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function vd({accountStatus:e=ls.accountStatus,chainStatus:t=ls.chainStatus,label:n=ls.label,showBalance:r=ls.showBalance}){const o=zr(),s=cd(),{setShowBalance:i}=Bg(),[a,c]=p.useState(!1),{i18n:l}=p.useContext(Fe);return p.useEffect(()=>{i(r),a||c(!0)},[r,i]),a?p.createElement(wd,null,({account:u,chain:f,mounted:d,openAccountModal:h,openChainModal:g,openConnectModal:m})=>{const b=d&&s!=="loading",y=(f==null?void 0:f.unsupported)??!1;return p.createElement(j,{display:"flex",gap:"12",...!b&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},b&&u&&s==="connected"?p.createElement(p.Fragment,null,f&&(o.length>1||y)&&p.createElement(j,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:y?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:Re({active:"shrink",hover:"grow"}),color:y?"connectButtonTextError":"connectButtonText",display:Yr(t,C=>C==="none"?"none":"flex"),fontFamily:"body",fontWeight:"bold",gap:"6",key:y?"unsupported":"supported",onClick:g,paddingX:"10",paddingY:"8",testId:y?"wrong-network-button":"chain-button",transition:"default",type:"button"},y?p.createElement(j,{alignItems:"center",display:"flex",height:"24",paddingX:"4"},l.t("connect_wallet.wrong_network.label")):p.createElement(j,{alignItems:"center",display:"flex",gap:"6"},f.hasIcon?p.createElement(j,{display:Yr(t,C=>C==="full"||C==="icon"?"block":"none"),height:"24",width:"24"},p.createElement($e,{alt:f.name??"Chain icon",background:f.iconBackground,borderRadius:"full",height:"24",src:f.iconUrl,width:"24"})):null,p.createElement(j,{display:Yr(t,C=>C==="icon"&&!f.iconUrl||C==="full"||C==="name"?"block":"none")},f.name??f.id)),p.createElement(R0,null)),!y&&p.createElement(j,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:Re({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:h,testId:"account-button",transition:"default",type:"button"},u.displayBalance&&p.createElement(j,{display:Yr(r,C=>C?"block":"none"),padding:"8",paddingLeft:"12"},u.displayBalance),p.createElement(j,{background:wg(r)[qe()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},p.createElement(j,{alignItems:"center",display:"flex",gap:"6",height:"24"},p.createElement(j,{display:Yr(e,C=>C==="full"||C==="avatar"?"block":"none")},p.createElement(kg,{address:u.address,imageUrl:u.ensAvatar,loading:u.hasPendingTransactions,size:24})),p.createElement(j,{alignItems:"center",display:"flex",gap:"6"},p.createElement(j,{display:Yr(e,C=>C==="full"||C==="address"?"block":"none")},u.displayName),p.createElement(R0,null)))))):p.createElement(j,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:Re({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:m,paddingX:"14",testId:"connect-button",transition:"default",type:"button"},d&&n==="Connect Wallet"?l.t("connect_wallet.label"):n))}):p.createElement(p.Fragment,null)}vd.__defaultProps=ls;vd.Custom=wd;var I9=({appName:e,appDescription:t,appUrl:n,appIcon:r})=>({name:e,description:t??e,url:n??(typeof window<"u"?window.location.origin:""),icons:[...r?[r]:[]]});function j9(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0))}function B9(e,t){const n=[];for(const r of e)n.some(o=>o[t]===r[t])||n.push(r);return n}var S9=(e,{projectId:t,walletConnectParameters:n,appName:r,appDescription:o,appUrl:s,appIcon:i})=>{if(!e.length)throw new Error("No wallet list was provided");for(const{wallets:h,groupName:g}of e)if(!h.length)throw new Error(`No wallets provided for group: ${g}`);let a=-1;const c=[],l=[],u=[],f=I9({appName:r,appDescription:o,appUrl:s,appIcon:i});for(const[h,{groupName:g,wallets:m}]of e.entries())for(const b of m){a++;const y=b({projectId:t,appName:r,appIcon:i,options:{metadata:f,...n},walletConnectParameters:{metadata:f,...n}});if(y!=null&&y.iconAccent&&!H4(y==null?void 0:y.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${y.name}`);const C={...y,groupIndex:h+1,groupName:g,index:a};typeof y.hidden=="function"?u.push(C):l.push(C)}const d=B9([...l,...u],"id");for(const{createConnector:h,groupIndex:g,groupName:m,hidden:b,...y}of d){if(typeof b=="function"&&b())continue;const C=x=>({rkDetails:j9({...y,groupIndex:g,groupName:m,isRainbowKitConnector:!0,...x||{}})});y.id==="walletConnect"&&c.push(h(C({isWalletConnectModalConnector:!0,showQrModal:!0})));const w=h(C());c.push(w)}return c};const P9="6.16.0";function Yl(e,t,n){for(let r in t){let o=t[r];Object.defineProperty(e,r,{enumerable:!0,value:o,writable:!1})}}function ro(e,t){if(e==null)return"null";if(t==null&&(t=new Set),typeof e=="object"){if(t.has(e))return"[Circular]";t.add(e)}if(Array.isArray(e))return"[ "+e.map(n=>ro(n,t)).join(", ")+" ]";if(e instanceof Uint8Array){const n="0123456789abcdef";let r="0x";for(let o=0;o<e.length;o++)r+=n[e[o]>>4],r+=n[e[o]&15];return r}if(typeof e=="object"&&typeof e.toJSON=="function")return ro(e.toJSON(),t);switch(typeof e){case"boolean":case"number":case"symbol":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const n=Object.keys(e);return n.sort(),"{ "+n.map(r=>`${ro(r,t)}: ${ro(e[r],t)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function O9(e,t,n){let r=e;{const s=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${ro(n)}`);for(const i in n){if(i==="shortMessage")continue;const a=n[i];s.push(i+"="+ro(a))}}s.push(`code=${t}`),s.push(`version=${P9}`),s.length&&(e+=" ("+s.join(", ")+")")}let o;switch(t){case"INVALID_ARGUMENT":o=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":o=new RangeError(e);break;default:o=new Error(e)}return Yl(o,{code:t}),n&&Object.assign(o,n),o.shortMessage==null&&Yl(o,{shortMessage:r}),o}function Pt(e,t,n,r){if(!e)throw O9(t,n,r)}function We(e,t,n,r){Pt(e,t,"INVALID_ARGUMENT",{argument:n,value:r})}["NFD","NFC","NFKD","NFKC"].reduce((e,t)=>{try{if("test".normalize(t)!=="test")throw new Error("bad");if(t==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");e.push(t)}catch{}return e},[]);function T9(e,t,n){if(e!==t){let r=n,o="new";r+=".",o+=" "+n,Pt(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:o})}}function R9(e,t,n){if(e instanceof Uint8Array)return e;if(typeof e=="string"&&e.length%2===0&&e.match(/^0x[0-9a-f]*$/i)){const r=new Uint8Array((e.length-2)/2);let o=2;for(let s=0;s<r.length;s++)r[s]=parseInt(e.substring(o,o+2),16),o+=2;return r}We(!1,"invalid BytesLike value",t,e)}function N9(e,t){return R9(e,t)}const fb=BigInt(0),oo=BigInt(1),so=9007199254740991;function Xl(e,t){const n=hb(e,"value"),r=BigInt(di(t,"width"));if(Pt(n>>r===fb,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),n>>r-oo){const o=(oo<<r)-oo;return-((~n&o)+oo)}return n}function ch(e,t){const n=hb(e,"value"),r=BigInt(di(t,"bits"));return n&(oo<<r)-oo}function xd(e,t){switch(typeof e){case"bigint":return e;case"number":return We(Number.isInteger(e),"underflow",t||"value",e),We(e>=-so&&e<=so,"overflow",t||"value",e),BigInt(e);case"string":try{if(e==="")throw new Error("empty string");return e[0]==="-"&&e[1]!=="-"?-BigInt(e.substring(1)):BigInt(e)}catch(n){We(!1,`invalid BigNumberish string: ${n.message}`,t||"value",e)}}We(!1,"invalid BigNumberish value",t||"value",e)}function hb(e,t){const n=xd(e,t);return Pt(n>=fb,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),n}const lh="0123456789abcdef";function F9(e){if(e instanceof Uint8Array){let t="0x0";for(const n of e)t+=lh[n>>4],t+=lh[n&15];return BigInt(t)}return xd(e)}function di(e,t){switch(typeof e){case"bigint":return We(e>=-so&&e<=so,"overflow",t||"value",e),Number(e);case"number":return We(Number.isInteger(e),"underflow",t||"value",e),We(e>=-so&&e<=so,"overflow",t||"value",e),e;case"string":try{if(e==="")throw new Error("empty string");return di(BigInt(e),t)}catch(n){We(!1,`invalid numeric string: ${n.message}`,t||"value",e)}}We(!1,"invalid numeric value",t||"value",e)}const M9=BigInt(-1),Dt=BigInt(0),io=BigInt(1),D9=BigInt(5),Xr={};let po="0000";for(;po.length<80;)po+=po;function dr(e){let t=po;for(;t.length<e;)t+=t;return BigInt("1"+t.substring(0,e))}function is(e,t,n){const r=BigInt(t.width);if(t.signed){const o=io<<r-io;Pt(n==null||e>=-o&&e<o,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:e}),e>Dt?e=Xl(ch(e,r),r):e=-Xl(ch(-e,r),r)}else{const o=io<<r;Pt(n==null||e>=0&&e<o,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:e}),e=(e%o+o)%o&o-io}return e}function Uc(e){typeof e=="number"&&(e=`fixed128x${e}`);let t=!0,n=128,r=18;if(typeof e=="string"){if(e!=="fixed")if(e==="ufixed")t=!1;else{const s=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);We(s,"invalid fixed format","format",e),t=s[1]!=="u",n=parseInt(s[2]),r=parseInt(s[3])}}else if(e){const s=e,i=(a,c,l)=>s[a]==null?l:(We(typeof s[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,s[a]),s[a]);t=i("signed","boolean",t),n=i("width","number",n),r=i("decimals","number",r)}We(n%8===0,"invalid FixedNumber width (not byte aligned)","format.width",n),We(r<=80,"invalid FixedNumber decimals (too large)","format.decimals",r);const o=(t?"":"u")+"fixed"+String(n)+"x"+String(r);return{signed:t,width:n,decimals:r,name:o}}function L9(e,t){let n="";e<Dt&&(n="-",e*=M9);let r=e.toString();if(t===0)return n+r;for(;r.length<=t;)r=po+r;const o=r.length-t;for(r=r.substring(0,o)+"."+r.substring(o);r[0]==="0"&&r[1]!==".";)r=r.substring(1);for(;r[r.length-1]==="0"&&r[r.length-2]!==".";)r=r.substring(0,r.length-1);return n+r}var _t,Ae,Je,we,hr,bn,eu,tu,nu,ru;const Ln=class Ln{constructor(t,n,r){Z(this,we);Kt(this,"format");Z(this,_t);Z(this,Ae);Z(this,Je);Kt(this,"_value");T9(t,Xr,"FixedNumber"),z(this,Ae,n),z(this,_t,r);const o=L9(n,r.decimals);Yl(this,{format:r.name,_value:o}),z(this,Je,dr(r.decimals))}get signed(){return k(this,_t).signed}get width(){return k(this,_t).width}get decimals(){return k(this,_t).decimals}get value(){return k(this,Ae)}addUnsafe(t){return Y(this,we,eu).call(this,t)}add(t){return Y(this,we,eu).call(this,t,"add")}subUnsafe(t){return Y(this,we,tu).call(this,t)}sub(t){return Y(this,we,tu).call(this,t,"sub")}mulUnsafe(t){return Y(this,we,nu).call(this,t)}mul(t){return Y(this,we,nu).call(this,t,"mul")}mulSignal(t){Y(this,we,hr).call(this,t);const n=k(this,Ae)*k(t,Ae);return Pt(n%k(this,Je)===Dt,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),Y(this,we,bn).call(this,n/k(this,Je),"mulSignal")}divUnsafe(t){return Y(this,we,ru).call(this,t)}div(t){return Y(this,we,ru).call(this,t,"div")}divSignal(t){Pt(k(t,Ae)!==Dt,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),Y(this,we,hr).call(this,t);const n=k(this,Ae)*k(this,Je);return Pt(n%k(t,Ae)===Dt,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),Y(this,we,bn).call(this,n/k(t,Ae),"divSignal")}cmp(t){let n=this.value,r=t.value;const o=this.decimals-t.decimals;return o>0?r*=dr(o):o<0&&(n*=dr(-o)),n<r?-1:n>r?1:0}eq(t){return this.cmp(t)===0}lt(t){return this.cmp(t)<0}lte(t){return this.cmp(t)<=0}gt(t){return this.cmp(t)>0}gte(t){return this.cmp(t)>=0}floor(){let t=k(this,Ae);return k(this,Ae)<Dt&&(t-=k(this,Je)-io),t=k(this,Ae)/k(this,Je)*k(this,Je),Y(this,we,bn).call(this,t,"floor")}ceiling(){let t=k(this,Ae);return k(this,Ae)>Dt&&(t+=k(this,Je)-io),t=k(this,Ae)/k(this,Je)*k(this,Je),Y(this,we,bn).call(this,t,"ceiling")}round(t){if(t==null&&(t=0),t>=this.decimals)return this;const n=this.decimals-t,r=D9*dr(n-1);let o=this.value+r;const s=dr(n);return o=o/s*s,is(o,k(this,_t),"round"),new Ln(Xr,o,k(this,_t))}isZero(){return k(this,Ae)===Dt}isNegative(){return k(this,Ae)<Dt}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return Ln.fromString(this.toString(),t)}static fromValue(t,n,r){const o=n==null?0:di(n),s=Uc(r);let i=xd(t,"value");const a=o-s.decimals;if(a>0){const c=dr(a);Pt(i%c===Dt,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:t}),i/=c}else a<0&&(i*=dr(-a));return is(i,s,"fromValue"),new Ln(Xr,i,s)}static fromString(t,n){const r=t.match(/^(-?)([0-9]*)\.?([0-9]*)$/);We(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",t);const o=Uc(n);let s=r[2]||"0",i=r[3]||"";for(;i.length<o.decimals;)i+=po;Pt(i.substring(o.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:t}),i=i.substring(0,o.decimals);const a=BigInt(r[1]+s+i);return is(a,o,"fromString"),new Ln(Xr,a,o)}static fromBytes(t,n){let r=F9(N9(t,"value"));const o=Uc(n);return o.signed&&(r=Xl(r,o.width)),is(r,o,"fromBytes"),new Ln(Xr,r,o)}};_t=new WeakMap,Ae=new WeakMap,Je=new WeakMap,we=new WeakSet,hr=function(t){We(this.format===t.format,"incompatible format; use fixedNumber.toFormat","other",t)},bn=function(t,n){return t=is(t,k(this,_t),n),new Ln(Xr,t,k(this,_t))},eu=function(t,n){return Y(this,we,hr).call(this,t),Y(this,we,bn).call(this,k(this,Ae)+k(t,Ae),n)},tu=function(t,n){return Y(this,we,hr).call(this,t),Y(this,we,bn).call(this,k(this,Ae)-k(t,Ae),n)},nu=function(t,n){return Y(this,we,hr).call(this,t),Y(this,we,bn).call(this,k(this,Ae)*k(t,Ae)/k(this,Je),n)},ru=function(t,n){return Pt(k(t,Ae)!==Dt,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),Y(this,we,hr).call(this,t),Y(this,we,bn).call(this,k(this,Ae)*k(this,Je)/k(t,Ae),n)};let Zl=Ln;const U9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function _9(e,t){let n=18;if(typeof t=="string"){const r=U9.indexOf(t);We(r>=0,"invalid unit","unit",t),n=3*r}else t!=null&&(n=di(t,"unit"));return Zl.fromValue(e,n,{decimals:n,width:512}).toString()}const uh=[{name:"approve",type:"function",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{name:"balanceOf",type:"function",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]}],$9=[{name:"swapBestRoute",type:"function",stateMutability:"nonpayable",inputs:[{name:"tokenIn",type:"address"},{name:"tokenOut",type:"address"},{name:"amountIn",type:"uint256"},{name:"minAmountOut",type:"uint256"},{name:"recipient",type:"address"}],outputs:[{name:"amountOut",type:"uint256"}]}],q9=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]}],W9=({theme:e="dark",primaryColor:t="#E84142",borderRadius:n="lg",width:r="default",defaultTokenIn:o,defaultTokenOut:s,tokenList:i="default",slippage:a=Ih,hideRouteInfo:c=!1,hideSettings:l=!1,partnerId:u,apiUrl:f=jh,onSwapStart:d,onSwapSuccess:h,onSwapError:g})=>{const[m,b]=p.useState(null),[y,C]=p.useState(null),[v,w]=p.useState(""),[x,E]=p.useState(null),[A,I]=p.useState(!1),[S,T]=p.useState(null),[R,M]=p.useState(!1),[N,W]=p.useState(a),[P,D]=p.useState(null),[_,F]=p.useState(""),[U,q]=p.useState(null),{isConnected:ne,address:ce}=nt(),{writeContractAsync:xe,isPending:Q}=AC(),{data:G}=Xu({address:ce,token:(m==null?void 0:m.symbol)==="AVAX"||m==null?void 0:m.address}),{data:oe}=vC({address:m==null?void 0:m.address,abi:uh,functionName:"allowance",args:ce&&(m==null?void 0:m.symbol)!=="AVAX"?[ce,Oi]:void 0}),ae=(m==null?void 0:m.symbol)!=="AVAX"&&oe!==void 0&&x!==void 0&&BigInt((oe==null?void 0:oe.toString())||"0")<BigInt(Math.floor(parseFloat(v||"0")*Math.pow(10,(m==null?void 0:m.decimals)||18))),Ie=i==="default"?$c:Array.isArray(i)?i:$c;p.useEffect(()=>{if(o){const K=Ie.find(de=>de.address.toLowerCase()===o.toLowerCase()||de.symbol.toLowerCase()===o.toLowerCase());K&&b(K)}if(s){const K=Ie.find(de=>de.address.toLowerCase()===s.toLowerCase()||de.symbol.toLowerCase()===s.toLowerCase());K&&C(K)}},[o,s,Ie]);const Oe=p.useCallback(async()=>{if(!m||!y||!v||parseFloat(v)===0){E(null);return}I(!0),T(null);try{const K=(parseFloat(v)*Math.pow(10,m.decimals)).toLocaleString("fullwide",{useGrouping:!1}),de=new URLSearchParams({tokenIn:m.address,tokenOut:y.address,amountIn:K,...u&&{partnerId:u}});console.log("Fetching quote with params:",{tokenIn:m.address,tokenOut:y.address,amountIn:K,url:`${f}/quote/best?${de}`});const st=await(await fetch(`${f}/quote/best?${de}`)).json();if(st.error)throw new Error(st.message);E(st)}catch(K){T(K instanceof Error?K.message:"Failed to fetch quote"),E(null)}finally{I(!1)}},[m,y,v,f,u]);p.useEffect(()=>{const K=setTimeout(Oe,500);return()=>clearTimeout(K)},[Oe]);const Se=()=>{b(y),C(m),w((x==null?void 0:x.amountOut)||""),E(null)},Nt=()=>{w("100")},rt=async()=>{if(!(!x||!m||!y||!ce)){I(!0),T(null);try{d==null||d(x);const K=BigInt(Math.floor(parseFloat(v)*Math.pow(10,m.decimals))),de=BigInt(x.amountOut)*BigInt(Math.floor((1-N/100)*1e4))/10000n;m.symbol==="AVAX"&&(console.log("Wrapping native AVAX to WAVAX..."),T("Step 1/3: Wrapping AVAX..."),await xe({address:m.address,abi:q9,functionName:"deposit",value:K})),(ae||m.symbol==="AVAX")&&(console.log("Requesting approval..."),T("Step 2/3: Authorizing Router..."),await xe({address:m.address,abi:uh,functionName:"approve",args:[Oi,K]})),console.log("Executing swap on-chain..."),T("Step 3/3: Executing Swap...");const Ft=await xe({address:Oi,abi:$9,functionName:"swapBestRoute",args:[m.address,y.address,K,de,ce]});console.log("Swap transaction sent:",Ft),q(Ft),h==null||h({hash:Ft}),w(""),E(null)}catch(K){console.error("Swap execution failed:",K);const de=K.shortMessage||K.message||"Swap failed";T(de),g==null||g(new Error(de))}finally{I(!1)}}},ot={compact:"w-80",default:"w-96",wide:"w-[480px]"}[r],At={sm:"rounded-lg",md:"rounded-xl",lg:"rounded-2xl",full:"rounded-3xl"}[n];return O.jsxs("div",{className:`${ot} ${At} overflow-hidden font-sans transition-all duration-300`,style:{backgroundColor:e==="dark"?"#0F0F0F":"#FFFFFF",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)"}`,boxShadow:e==="dark"?"0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05)":"0 20px 50px rgba(0, 0, 100, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:[O.jsxs("div",{className:"px-6 py-5 flex items-center justify-between relative overflow-hidden",style:{background:e==="dark"?"linear-gradient(to bottom, rgba(232, 65, 66, 0.05), transparent)":"linear-gradient(to bottom, rgba(232, 65, 66, 0.02), transparent)",borderBottom:`1px solid ${e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}`},children:[O.jsxs("div",{className:"z-10",children:[O.jsxs("h2",{className:"text-xl font-black tracking-tight flex items-center gap-2",style:{color:e==="dark"?"#FFFFFF":"#1A1A1A"},children:[O.jsx("span",{style:{color:t},children:"AVAX"})," ROUTER",O.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-500 font-bold ml-1 uppercase tracking-widest",children:"Live"})]}),O.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest mt-0.5",style:{color:e==="dark"?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.4)"},children:"0.05% Fee • Aggregated Liquidity"})]}),O.jsxs("div",{className:"flex items-center gap-2 z-10",children:[ne&&ce&&O.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-xl border",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.03)",borderColor:e==="dark"?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.08)"},children:[O.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"}),O.jsxs("span",{className:"text-[10px] font-mono font-bold opacity-60",children:[ce.slice(0,6),"...",ce.slice(-4)]})]}),!l&&O.jsx("button",{onClick:()=>M(!R),className:"p-2 rounded-xl transition-all duration-200 hover:scale-110 active:scale-95",style:{color:e==="dark"?"rgba(255,255,255,0.6)":"rgba(0,0,0,0.6)",backgroundColor:R?e==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.05)":"transparent"},children:O.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M12.22 2h-.44a2 2 0 00-2 2v.18a2 2 0 01-1 1.73l-.43.25a2 2 0 01-2 0l-.15-.08a2 2 0 00-2.73.73l-.22.38a2 2 0 00.73 2.73l.15.1a2 2 0 011 1.72v.51a2 2 0 01-1 1.74l-.15.09a2 2 0 00-.73 2.73l.22.38a2 2 0 002.73.73l.15-.08a2 2 0 012 0l.43.25a2 2 0 011 1.73V20a2 2 0 002 2h.44a2 2 0 002-2v-.18a2 2 0 011-1.73l.43-.25a2 2 0 012 0l.15.08a2 2 0 002.73-.73l.22-.39a2 2 0 00-.73-2.73l-.15-.1a2 2 0 01-1-1.72v-.51a2 2 0 011-1.74l.15-.09a2 2 0 00.73-2.73l-.22-.38a2 2 0 00-2.73-.73l-.15.08a2 2 0 01-2 0l-.43-.25a2 2 0 01-1-1.73V4a2 2 0 00-2-2z"}),O.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]})]}),R&&!l&&O.jsxs("div",{className:"px-6 py-5 space-y-3",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.01)",borderBottom:`1px solid ${e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}`},children:[O.jsxs("div",{className:"flex justify-between items-center",children:[O.jsx("span",{className:"text-xs font-bold uppercase tracking-widest",style:{color:e==="dark"?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.4)"},children:"Slippage Tolerance"}),O.jsxs("span",{className:"text-xs font-mono font-bold",style:{color:t},children:[N,"%"]})]}),O.jsx("div",{className:"flex gap-2",children:[.5,1,2,3].map(K=>O.jsxs("button",{onClick:()=>W(K),className:"flex-1 py-2 rounded-xl text-xs font-bold transition-all duration-200",style:{backgroundColor:N===K?t:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)",color:N===K?"#FFFFFF":e==="dark"?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.4)",boxShadow:N===K?`0 4px 12px ${t}44`:"none"},children:[K,"%"]},K))})]}),O.jsxs("div",{className:"p-4 space-y-2",children:[O.jsxs("div",{className:"p-5 rounded-3xl transition-all duration-300 group relative",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)"}`},children:[O.jsxs("div",{className:"flex items-center justify-between mb-4",children:[O.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest",style:{color:e==="dark"?"rgba(255,255,255,0.3)":"rgba(0,0,0,0.3)"},children:"Sell"}),O.jsx("div",{className:"flex items-center gap-2",children:O.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-white/5 cursor-pointer hover:bg-white/10 transition-colors",style:{color:t},onClick:Nt,children:"MAX"})})]}),O.jsxs("div",{className:"flex items-center justify-between gap-4",children:[O.jsx("div",{className:"flex-shrink-0",children:O.jsxs("button",{onClick:()=>D("in"),className:"flex items-center gap-2 px-3 py-2 rounded-2xl transition-all duration-200 hover:bg-white/10",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.04)"},children:[m!=null&&m.logoURI?O.jsx("img",{src:m.logoURI,alt:m.symbol,className:"w-6 h-6 rounded-full"}):O.jsx("div",{className:"w-6 h-6 rounded-full bg-red-500/20 flex items-center justify-center text-[10px] font-bold",children:"?"}),O.jsx("span",{className:"text-lg font-black",children:(m==null?void 0:m.symbol)||"Select"}),O.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",children:O.jsx("path",{d:"M6 9l6 6 6-6"})})]})}),O.jsx("div",{className:"flex-1 min-w-0",children:O.jsx("input",{type:"number",value:v,onChange:K=>w(K.target.value),placeholder:"0.0",className:"w-full bg-transparent text-3xl font-black outline-none text-right placeholder:opacity-20",style:{color:e==="dark"?"#FFFFFF":"#1A1A1A"}})})]}),O.jsxs("div",{className:"flex justify-between items-center mt-3",children:[m&&O.jsxs("p",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",style:{color:e==="dark"?"#FFFFFF":"#000000"},children:["Balance: ",G?`${parseFloat(_9(G.value,G.decimals)).toFixed(4)}`:"0.0000"," ",m.symbol]}),O.jsx("p",{className:"text-[10px] font-bold opacity-20",children:"$0.00"})]})]}),O.jsx("div",{className:"flex justify-center -my-6 relative z-10",children:O.jsx("button",{onClick:Se,className:"p-3 rounded-2xl transition-all duration-300 hover:rotate-180 group active:scale-95 shadow-xl",style:{backgroundColor:e==="dark"?"#1A1A1A":"#FFFFFF",border:`4px solid ${e==="dark"?"#0F0F0F":"#F4F4F4"}`,color:t},children:O.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:O.jsx("path",{d:"M7 16V4M7 4L3 8M7 4L11 8M17 8v12M17 20l4-4M17 20l-4-4"})})})}),O.jsxs("div",{className:"p-5 rounded-3xl transition-all duration-300 relative overflow-hidden",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)"}`},children:[O.jsx("div",{className:"flex items-center justify-between mb-4",children:O.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest",style:{color:e==="dark"?"rgba(255,255,255,0.3)":"rgba(0,0,0,0.3)"},children:"Buy"})}),O.jsxs("div",{className:"flex items-center justify-between gap-4",children:[O.jsx("div",{className:"flex-shrink-0",children:O.jsxs("button",{onClick:()=>D("out"),className:"flex items-center gap-2 px-3 py-2 rounded-2xl transition-all duration-200 hover:bg-white/10",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.04)"},children:[y!=null&&y.logoURI?O.jsx("img",{src:y.logoURI,alt:y.symbol,className:"w-6 h-6 rounded-full"}):O.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-500/20 flex items-center justify-center text-[10px] font-bold",children:"?"}),O.jsx("span",{className:"text-lg font-black",children:(y==null?void 0:y.symbol)||"Select"}),O.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",children:O.jsx("path",{d:"M6 9l6 6 6-6"})})]})}),O.jsx("div",{className:"flex-1 min-w-0 text-right h-10 flex items-center justify-end",children:A?O.jsxs("div",{className:"flex gap-1",children:[O.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/20 animate-bounce",style:{animationDelay:"0ms"}}),O.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/20 animate-bounce",style:{animationDelay:"150ms"}}),O.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/20 animate-bounce",style:{animationDelay:"300ms"}})]}):x?O.jsx("span",{className:"text-3xl font-black truncate",style:{color:e==="dark"?"#FFFFFF":"#1A1A1A"},children:(parseFloat(x.amountOut)/Math.pow(10,(y==null?void 0:y.decimals)||18)).toLocaleString(void 0,{maximumFractionDigits:6})}):O.jsx("span",{className:"text-3xl font-black opacity-20",children:"0.0"})})]}),y&&x&&O.jsxs("div",{className:"flex justify-between items-center mt-3",children:[O.jsxs("p",{className:"text-[10px] font-bold opacity-40",children:["~$",(parseFloat(x.amountOut)/Math.pow(10,y.decimals)*1).toFixed(2)]}),O.jsx("span",{className:"text-[10px] font-black text-emerald-500",children:"BEST PRICE"})]})]}),!c&&x&&O.jsxs("div",{className:"space-y-2",children:[O.jsxs("div",{className:"p-4 rounded-3xl",style:{background:e==="dark"?"linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02))":"linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.01))",border:"1px solid rgba(16, 185, 129, 0.1)"},children:[O.jsxs("div",{className:"flex justify-between items-center mb-2",children:[O.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest text-emerald-500/80",children:"Aggregator Path"}),O.jsxs("span",{className:"text-[10px] font-bold font-mono text-emerald-500",children:["VIA ",x.bestDex.toUpperCase()]})]}),O.jsxs("div",{className:"flex justify-between text-[10px] font-bold",children:[O.jsxs("span",{className:"opacity-40",children:["Impact: ",O.jsxs("span",{className:Number(x.priceImpact)>2?"text-red-500":"text-emerald-500",children:[Number(x.priceImpact||0).toFixed(2),"%"]})]}),O.jsxs("span",{className:"opacity-40 text-right",children:["Savings: ",O.jsxs("span",{className:"text-emerald-500",children:["$",Number(x.savings||0).toFixed(2)]})]})]})]}),x.allQuotes&&x.allQuotes.length>1&&O.jsxs("div",{className:"p-4 rounded-3xl space-y-2",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.02)":"rgba(0,0,0,0.01)",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.03)"}`},children:[O.jsx("p",{className:"text-[8px] font-black uppercase tracking-[0.2em] opacity-30 px-1",children:"Market Comparison"}),x.allQuotes.map((K,de)=>O.jsxs("div",{className:"flex justify-between items-center px-1",children:[O.jsx("span",{className:"text-[10px] font-bold opacity-50",children:K.dex}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("span",{className:"text-[10px] font-mono font-bold",children:(parseFloat(K.amountOut)/Math.pow(10,(y==null?void 0:y.decimals)||18)).toFixed(4)}),K.dex.includes(x.bestDex)&&O.jsx("span",{className:"text-[8px] font-black text-emerald-500 bg-emerald-500/10 px-1 rounded",children:"BEST"})]})]},de))]})]}),S&&O.jsxs("div",{className:"p-4 rounded-2xl text-[11px] font-bold text-center flex items-center justify-center gap-2",style:{backgroundColor:"rgba(232, 65, 66, 0.1)",color:"#E84142",border:"1px solid rgba(232, 65, 66, 0.2)"},children:[O.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("circle",{cx:"12",cy:"12",r:"10"}),O.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),O.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),S]}),O.jsx("div",{className:"pt-2",children:U?O.jsxs("div",{className:"p-5 rounded-3xl space-y-3 animate-in fade-in zoom-in duration-300",style:{background:"linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05))",border:"1px solid rgba(16, 185, 129, 0.2)"},children:[O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("div",{className:"w-10 h-10 rounded-full bg-emerald-500/20 flex items-center justify-center text-emerald-500",children:O.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:O.jsx("polyline",{points:"20 6 9 17 4 12"})})}),O.jsxs("div",{children:[O.jsx("h3",{className:"text-sm font-black text-emerald-500 uppercase tracking-tight",children:"Swap Successful!"}),O.jsx("p",{className:"text-[10px] opacity-60 font-bold",children:"Funds have been sent to your wallet."})]})]}),O.jsxs("div",{className:"pt-2 flex flex-col gap-2",children:[O.jsx("a",{href:`https://subnets.avax.network/c-chain/tx/${U}`,target:"_blank",rel:"noopener noreferrer",className:"w-full py-2 rounded-xl bg-emerald-500/10 text-emerald-500 text-[10px] font-black text-center border border-emerald-500/20 hover:bg-emerald-500/20 transition-all uppercase tracking-widest",children:"View on Explorer"}),O.jsx("button",{onClick:()=>q(null),className:"w-full py-2 text-[10px] font-black opacity-40 hover:opacity-100 transition-opacity uppercase tracking-widest",children:"Dismiss"})]})]}):ne?O.jsxs("button",{onClick:rt,disabled:!x||A||!m||!y||Q,className:"w-full py-5 rounded-3xl font-black text-xl transition-all duration-300 disabled:opacity-30 disabled:grayscale disabled:cursor-not-allowed hover:scale-[1.02] active:scale-[0.98] shadow-2xl relative overflow-hidden group",style:{backgroundColor:t,color:"#FFFFFF",boxShadow:`0 15px 35px ${t}44`},children:[O.jsx("div",{className:"relative z-10 flex items-center justify-center gap-2",children:!m||!y?"SELECT TOKENS":v?A||Q?ae?"APPROVING...":"CONFIRMING...":ae?"APPROVE & SWAP":"EXECUTE SWAP":"ENTER AMOUNT"}),O.jsx("div",{className:"absolute inset-0 bg-white/10 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700 slant"})]}):O.jsx(vd.Custom,{children:({account:K,chain:de,openConnectModal:Ft,mounted:st})=>O.jsx("div",{...!st&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}},children:!st||!K||!de?O.jsx("button",{onClick:Ft,style:{backgroundColor:t,boxShadow:`0 10px 30px ${t}44`},className:"w-full py-4 rounded-3xl font-black text-lg text-white transition-all hover:scale-[1.02] active:scale-[0.98]",children:"CONNECT WALLET"}):null})})})]}),P&&O.jsx("div",{className:"absolute inset-0 z-50 p-4 animate-in fade-in duration-200",children:O.jsxs("div",{className:"w-full h-full rounded-3xl flex flex-col overflow-hidden",style:{backgroundColor:e==="dark"?"#121213":"#F9F9F9",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)"}`},children:[O.jsxs("div",{className:"p-4 border-b flex items-center justify-between",style:{borderColor:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"},children:[O.jsx("h3",{className:"text-sm font-black uppercase tracking-widest opacity-60",children:"Select Token"}),O.jsx("button",{onClick:()=>{D(null),F("")},className:"opacity-40 hover:opacity-100 transition-opacity",children:O.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:[O.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),O.jsx("div",{className:"p-4",children:O.jsx("input",{autoFocus:!0,type:"text",placeholder:"Search name or symbol...",value:_,onChange:K=>F(K.target.value),className:"w-full bg-white/5 border border-white/10 rounded-2xl px-4 py-3 text-sm font-bold outline-none focus:border-red-500/50 transition-colors",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)"}})}),O.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:Ie.filter(K=>K.symbol.toLowerCase().includes(_.toLowerCase())||K.name.toLowerCase().includes(_.toLowerCase())).map(K=>{var de;return O.jsxs("button",{onClick:()=>{P==="in"?b(K):C(K),D(null),F("")},className:"w-full flex items-center justify-between p-3 rounded-2xl hover:bg-white/5 transition-colors group",children:[O.jsxs("div",{className:"flex items-center gap-3",children:[K.logoURI?O.jsx("img",{src:K.logoURI,alt:K.symbol,className:"w-8 h-8 rounded-full"}):O.jsx("div",{className:"w-8 h-8 rounded-full bg-white/10 flex items-center justify-center text-xs font-bold",children:"?"}),O.jsxs("div",{className:"text-left",children:[O.jsx("p",{className:"text-sm font-black",children:K.symbol}),O.jsx("p",{className:"text-[10px] font-bold opacity-40",children:K.name})]})]}),((de=P==="in"?m:y)==null?void 0:de.address)===K.address&&O.jsx("div",{style:{color:t},children:O.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"4",children:O.jsx("polyline",{points:"20 6 9 17 4 12"})})})]},K.address)})})]})}),O.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
1730
|
+
*/const os={newline:10,reset:27};function iE(e){if(!Number.isSafeInteger(e))throw new Error(`integer expected: ${e}`)}function aE(e){if(!Number.isSafeInteger(e)||e<1||e>40)throw new Error(`Invalid version=${e}. Expected number [1..40]`)}function cr(e,t){return e.toString(2).padStart(t,"0")}function C0(e,t){const n=e%t;return n>=0?n:t+n}function Xt(e,t){return new Array(e).fill(t)}function kc(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}function A0(e){let t=0,n=0;for(const s of e)t=Math.max(t,s.length),n+=s.length;const r=new Uint8Array(n);let o=0;for(let s=0;s<t;s++)for(const i of e)s<i.length&&(r[o++]=i[s]);return r}function cE(){let e,t=1/0;return{add(n,r){n>=t||(e=r,t=n)},get:()=>e,score:()=>t}}function E0(e){return{has:t=>e.includes(t),decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})},encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(iE(n),n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})}}}function k0(e){if(e.length!==32)throw new Error("expects 32 element matrix");const t=[1431655765,858993459,252645135,16711935,65535];for(let n=0;n<5;n++){const r=t[n]>>>0,o=1<<n,s=o<<1;for(let i=0;i<32;i+=s)for(let a=0;a<o;a++){const c=i+a,l=c+o,u=e[c]>>>0,f=e[l]>>>0,d=(u>>>o^f)&r;e[c]=(u^d<<o)>>>0,e[l]=(f^d)>>>0}}}const ss=e=>1<<(e&31)>>>0,lr=(e,t)=>t===0?0:t===32?4294967295:(1<<t)-1<<e>>>0;class Ye{constructor(t,n){Kt(this,"defined");Kt(this,"value");Kt(this,"tailMask");Kt(this,"words");Kt(this,"fullWords");Kt(this,"height");Kt(this,"width");const{height:r,width:o}=Ye.size(t);if(this.height=r,this.width=o,this.tailMask=lr(0,o&31||32),this.words=Math.ceil(o/32)|0,this.fullWords=Math.floor(o/32)|0,this.value=new Uint32Array(this.words*r),this.defined=new Uint32Array(this.value.length),n){if(n.length!==r)throw new Error(`Bitmap: data height mismatch: exp=${r} got=${n.length}`);for(let s=0;s<r;s++){const i=n[s];if(!i||i.length!==o)throw new Error(`Bitmap: data width mismatch at y=${s}: exp=${o} got=${i==null?void 0:i.length}`);for(let a=0;a<o;a++)this.set(a,s,i[a])}}}static size(t,n){if(typeof t=="number"&&(t={height:t,width:t}),!Number.isSafeInteger(t.height)&&t.height!==1/0)throw new Error(`Bitmap: invalid height=${t.height} (${typeof t.height})`);if(!Number.isSafeInteger(t.width)&&t.width!==1/0)throw new Error(`Bitmap: invalid width=${t.width} (${typeof t.width})`);return n!==void 0&&(t={width:Math.min(t.width,n.width),height:Math.min(t.height,n.height)}),t}static fromString(t){t=t.replace(/^\n+/g,"").replace(/\n+$/g,"");const n=t.split(String.fromCharCode(os.newline)),r=n.length;let o;const s=[];for(const i of n){const a=i.split("").map(c=>{if(c==="X")return!0;if(c===" ")return!1;if(c!=="?")throw new Error(`Bitmap.fromString: unknown symbol=${c}`)});if(o!==void 0&&a.length!==o)throw new Error(`Bitmap.fromString different row sizes: width=${o} cur=${a.length}`);o=a.length,s.push(a)}return o===void 0&&(o=0),new Ye({height:r,width:o},s)}point(t){return this.get(t.x,t.y)}isInside(t){return 0<=t.x&&t.x<this.width&&0<=t.y&&t.y<this.height}size(t){if(!t)return{height:this.height,width:this.width};const{x:n,y:r}=this.xy(t);return{height:this.height-r,width:this.width-n}}xy(t){if(typeof t=="number"&&(t={x:t,y:t}),!Number.isSafeInteger(t.x))throw new Error(`Bitmap: invalid x=${t.x}`);if(!Number.isSafeInteger(t.y))throw new Error(`Bitmap: invalid y=${t.y}`);return t.x=C0(t.x,this.width),t.y=C0(t.y,this.height),t}wordIndex(t,n){return n*this.words+(t>>>5)}bitIndex(t,n){return{word:this.wordIndex(t,n),bit:t&31}}isDefined(t,n){const r=this.wordIndex(t,n),o=ss(t);return(this.defined[r]&o)!==0}get(t,n){const r=this.wordIndex(t,n),o=ss(t);return(this.value[r]&o)!==0}maskWord(t,n,r){const{defined:o,value:s}=this;o[t]|=n,s[t]=s[t]&~n|-r&n}set(t,n,r){r!==void 0&&this.maskWord(this.wordIndex(t,n),ss(t),r)}fillRectConst(t,n,r,o,s){if(r<=0||o<=0||s===void 0)return;const{value:i,defined:a,words:c}=this,l=t>>>5,u=t+r-1>>>5,f=t&31,d=t+r-1&31;for(let h=0;h<o;h++){const g=(n+h)*c;if(l===u){const m=lr(f,d-f+1);this.maskWord(g+l,m,s);continue}this.maskWord(g+l,lr(f,32-f),s);for(let m=l+1;m<u;m++)a[g+m]=4294967295,i[g+m]=s?4294967295:0;this.maskWord(g+u,lr(0,d+1),s)}}rectWords(t,n,r,o,s){for(let i=0;i<o;i++){const a=n+i;for(let c=0;c<r;){const l=t+c,{bit:u,word:f}=this.bitIndex(l,a),d=Math.min(32-u,r-c);s(f,l,c,i,d),c+=d}}}rect(t,n,r){const{x:o,y:s}=this.xy(t),{height:i,width:a}=Ye.size(n,this.size({x:o,y:s}));if(typeof r!="function")return this.fillRectConst(o,s,a,i,r),this;const{defined:c,value:l}=this;return this.rectWords(o,s,a,i,(u,f,d,h,g)=>{let m=0,b=l[u];for(let y=0;y<g;y++){const C=ss(f+y),v=r({x:d+y,y:h},(b&C)!==0);v!==void 0&&(m|=C,b=b&~C|-v&C)}c[u]|=m,l[u]=b}),this}rectRead(t,n,r){const{x:o,y:s}=this.xy(t),{height:i,width:a}=Ye.size(n,this.size({x:o,y:s})),{value:c}=this;return this.rectWords(o,s,a,i,(l,u,f,d,h)=>{const g=c[l];for(let m=0;m<h;m++){const b=ss(u+m);r({x:f+m,y:d},(g&b)!==0)}}),this}hLine(t,n,r){return this.rect(t,{width:n,height:1},r)}vLine(t,n,r){return this.rect(t,{width:1,height:n},r)}border(t=2,n){const r=this.height+2*t,o=this.width+2*t,s=new Ye({height:r,width:o});return s.rect(0,1/0,n),s.embed({x:t,y:t},this),s}embed(t,n){const{x:r,y:o}=this.xy(t),{height:s,width:i}=Ye.size(n.size(),this.size({x:r,y:o}));if(i<=0||s<=0)return this;const{value:a,defined:c}=this,{words:l,value:u}=n;for(let f=0;f<s;f++){const d=f*l;for(let h=0;h<i;){const g=r+h,{word:m,bit:b}=this.bitIndex(g,o+f),{word:y,bit:C}=n.bitIndex(h,f),v=Math.min(32-b,i-h),w=u[y],x=C&&y+1<d+l?u[y+1]:0,E=C?(w>>>C|x<<32-C)>>>0:w,A=lr(b,v),I=(E&lr(0,v))<<b>>>0;c[m]|=A,a[m]=a[m]&~A|I,h+=v}}return this}rectSlice(t,n=this.size()){const{x:r,y:o}=this.xy(t),{height:s,width:i}=Ye.size(n,this.size({x:r,y:o})),a=new Ye({height:s,width:i});return this.rectRead({x:r,y:o},{height:s,width:i},(c,l)=>{this.isDefined(r+c.x,o+c.y)&&a.set(c.x,c.y,l)}),a}transpose(){const{height:t,width:n,value:r,defined:o,words:s}=this,i=new Ye({height:n,width:t}),{words:a,value:c,defined:l,tailMask:u}=i,f=new Uint32Array(32),d=new Uint32Array(32);for(let h=0;h<t;h+=32)for(let g=0;g<s;g++){const m=Math.min(32,t-h);for(let b=0;b<m;b++){const y=this.wordIndex(32*g,h+b);f[b]=r[y],d[b]=o[y]}f.fill(0,m),d.fill(0,m),k0(f),k0(d);for(let b=0;b<32;b++){const y=g*32+b;if(y>=n)break;const C=i.wordIndex(h,y),v=h>>>5===a-1?u:4294967295;c[C]=f[b]&v,l[C]=d[b]&v}}return i}negate(){const t=this.defined.length;for(let n=0;n<t;n++)this.value[n]=~this.value[n],this.defined[n]=4294967295;return this}scale(t){if(!Number.isSafeInteger(t)||t>1024)throw new Error(`invalid scale factor: ${t}`);const{height:n,width:r}=this;return new Ye({height:t*n,width:t*r}).rect({x:0,y:0},1/0,({x:s,y:i})=>this.get(s/t|0,i/t|0))}clone(){const t=new Ye(this.size());return t.defined.set(this.defined),t.value.set(this.value),t}assertDrawn(){const{height:t,width:n,defined:r,tailMask:o,fullWords:s,words:i}=this;if(!(!t||!n))for(let a=0;a<t;a++){const c=a*i;for(let l=0;l<s;l++)if(r[c+l]!==4294967295)throw new Error("Invalid color type=undefined");if(i!==s&&(r[c+s]&o)!==o)throw new Error("Invalid color type=undefined")}}countPatternInRow(t,n,...r){if(n<=0||n>=32)throw new Error("wrong patternLen");const o=(1<<n)-1,{width:s,value:i,words:a}=this;let c=0;const l=this.wordIndex(0,t);for(let u=0,f=0;u<a;u++){const d=i[l+u],h=u===a-1&&s&31||32;for(let g=0;g<h;g++)if(f=(f<<1|d>>>g&1)&o,!(u*32+g+1<n)){for(const m of r)if(f===m){c++;break}}}return c}getRuns(t,n){const{width:r,value:o,words:s}=this;if(r===0)return;let i=0,a;const c=this.wordIndex(0,t);for(let l=0;l<s;l++){const u=o[c+l],f=l===s-1&&r&31||32;for(let d=0;d<f;d++){const h=(u&1<<d)!==0;if(h===a){i++;continue}a!==void 0&&n(i,a),a=h,i=1}}a!==void 0&&n(i,a)}popcnt(){const{height:t,width:n,words:r,fullWords:o,tailMask:s}=this;if(!t||!n)return 0;let i=0;for(let a=0;a<t;a++){const c=a*r;for(let l=0;l<o;l++)i+=kc(this.value[c+l]);r!==o&&(i+=kc(this.value[c+o]&s))}return i}countBoxes2x2(t){const{width:n,words:r}=this;if(n<2||(t|0)<0||t+1>=this.height)return 0;const o=this.wordIndex(0,t)|0,s=this.wordIndex(0,t+1)|0,a=(n&31)===0?2147483647:lr(0,n-1&31);let c=0;for(let l=0;l<r;l++){const u=this.value[o+l],f=this.value[s+l],d=~(u^f)>>>0,h=l+1<r?this.value[o+l+1]>>>0:0,g=~(u^(u>>>1|(h&1)<<31)>>>0)>>>0,m=l+1<r?this.value[s+l+1]>>>0:0,b=~(f^(f>>>1|(m&1)<<31)>>>0)>>>0;let y=(d&g&b)>>>0;l===r-1&&(y&=a),c+=kc(y)}return c}toString(){const t=String.fromCharCode(os.newline);let n="";for(let r=0;r<this.height;r++){let o="";for(let s=0;s<this.width;s++){const i=this.get(s,r);o+=this.isDefined(s,r)?i?"X":" ":"?"}n+=o+(r+1===this.height?"":t)}return n}toRaw(){const t=Array.from({length:this.height},()=>new Array(this.width));for(let n=0;n<this.height;n++){const r=t[n];for(let o=0;o<this.width;o++)r[o]=this.get(o,n)}return t}toASCII(){const{height:t,width:n}=this;let r="";for(let o=0;o<t;o+=2){for(let s=0;s<n;s++){const i=this.get(s,o),a=o+1>=t?!0:this.get(s,o+1);!i&&!a?r+="█":!i&&a?r+="▀":i&&!a?r+="▄":i&&a&&(r+=" ")}r+=String.fromCharCode(os.newline)}return r}toTerm(){const t=String.fromCharCode(os.reset),n=t+"[0m",r=t+"[1;47m "+n,o=t+"[40m "+n,s=String.fromCharCode(os.newline);let i="";for(let a=0;a<this.height;a++){for(let c=0;c<this.width;c++){const l=this.get(c,a);i+=l?o:r}i+=s}return i}toSVG(t=!0){let n=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,r="",o;return this.rectRead(0,1/0,(s,i)=>{if(!i)return;const{x:a,y:c}=s;if(!t){n+=`<rect x="${a}" y="${c}" width="1" height="1" />`;return}let l=`M${a} ${c}`;if(o){const f=`m${a-o.x} ${c-o.y}`;f.length<=l.length&&(l=f)}const u=a<10?`H${a}`:"h-1";r+=`${l}h1v1${u}Z`,o=s}),t&&(n+=`<path d="${r}"/>`),n+="</svg>",n}toGIF(){const t=a=>[a&255,a>>>8&255],n=[...t(this.width),...t(this.height)],r=[];this.rectRead(0,1/0,(a,c)=>r.push(+(c===!0)));const o=126,s=[71,73,70,56,55,97,...n,246,0,0,255,255,255,...Xt(3*127,0),44,0,0,0,0,...n,0,7],i=Math.floor(r.length/o);for(let a=0;a<i;a++)s.push(o+1,128,...r.slice(o*a,o*(a+1)).map(c=>+c));return s.push(r.length%o+1,128,...r.slice(i*o).map(a=>+a)),s.push(1,129,0,59),new Uint8Array(s)}toImage(t=!1){const{height:n,width:r}=this.size(),o=new Uint8Array(n*r*(t?3:4));let s=0;for(let i=0;i<n;i++)for(let a=0;a<r;a++){const c=this.get(a,i)?0:255;o[s++]=c,o[s++]=c,o[s++]=c,t||(o[s++]=255)}return{height:n,width:r,data:o}}}const I0=["low","medium","quartile","high"],j0=["numeric","alphanumeric","byte","kanji","eci"],lE=[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],uE={low:[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],medium:[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],quartile:[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],high:[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]},dE={low:[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],medium:[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],quartile:[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],high:[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]},Ge={size:{encode:e=>21+4*(e-1),decode:e=>(e-17)/4},sizeType:e=>Math.floor((e+7)/17),alignmentPatterns(e){if(e===1)return[];const t=6,n=Ge.size.encode(e)-t-1,r=n-t,o=Math.ceil(r/28);let s=Math.floor(r/o);s%2?s+=1:r%o*2>=o&&(s+=2);const i=[t];for(let a=1;a<o;a++)i.push(n-(o-a)*s);return i.push(n),i},ECCode:{low:1,medium:0,quartile:3,high:2},formatMask:21522,formatBits(e,t){const n=Ge.ECCode[e]<<3|t;let r=n;for(let o=0;o<10;o++)r=r<<1^(r>>9)*1335;return(n<<10|r)^Ge.formatMask},versionBits(e){let t=e;for(let n=0;n<12;n++)t=t<<1^(t>>11)*7973;return e<<12|t},alphabet:{numeric:E0("0123456789"),alphanumerc:E0("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")},lengthBits(e,t){return{numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]}[t][Ge.sizeType(e)]},modeBits:{numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"},capacity(e,t){const n=lE[e-1],r=uE[t][e-1],o=dE[t][e-1],s=Math.floor(n/o)-r,i=o-n%o;return{words:r,numBlocks:o,shortBlocks:i,blockLen:s,capacity:(n-r*o)*8,total:(r+s)*o+o-i}}},sd=[(e,t)=>(e+t)%2==0,(e,t)=>t%2==0,(e,t)=>e%3==0,(e,t)=>(e+t)%3==0,(e,t)=>(Math.floor(t/2)+Math.floor(e/3))%2==0,(e,t)=>e*t%2+e*t%3==0,(e,t)=>(e*t%2+e*t%3)%2==0,(e,t)=>((e+t)%2+e*t%3)%2==0],K={tables:(e=>{const t=Xt(256,0),n=Xt(256,0);for(let r=0,o=1;r<256;r++)t[r]=o,n[o]=r,o<<=1,o&256&&(o^=e);return{exp:t,log:n}})(285),exp:e=>K.tables.exp[e],log(e){if(e===0)throw new Error(`GF.log: invalid arg=${e}`);return K.tables.log[e]%255},mul(e,t){return e===0||t===0?0:K.tables.exp[(K.tables.log[e]+K.tables.log[t])%255]},add:(e,t)=>e^t,pow:(e,t)=>K.tables.exp[K.tables.log[e]*t%255],inv(e){if(e===0)throw new Error(`GF.inverse: invalid arg=${e}`);return K.tables.exp[255-K.tables.log[e]]},polynomial(e){if(e.length==0)throw new Error("GF.polymomial: invalid length");if(e[0]!==0)return e;let t=0;for(;t<e.length-1&&e[t]==0;t++);return e.slice(t)},monomial(e,t){if(e<0)throw new Error(`GF.monomial: invalid degree=${e}`);if(t==0)return[0];let n=Xt(e+1,0);return n[0]=t,K.polynomial(n)},degree:e=>e.length-1,coefficient:(e,t)=>e[K.degree(e)-t],mulPoly(e,t){if(e[0]===0||t[0]===0)return[0];const n=Xt(e.length+t.length-1,0);for(let r=0;r<e.length;r++)for(let o=0;o<t.length;o++)n[r+o]=K.add(n[r+o],K.mul(e[r],t[o]));return K.polynomial(n)},mulPolyScalar(e,t){if(t==0)return[0];if(t==1)return e;const n=Xt(e.length,0);for(let r=0;r<e.length;r++)n[r]=K.mul(e[r],t);return K.polynomial(n)},mulPolyMonomial(e,t,n){if(t<0)throw new Error("GF.mulPolyMonomial: invalid degree");if(n==0)return[0];const r=Xt(e.length+t,0);for(let o=0;o<e.length;o++)r[o]=K.mul(e[o],n);return K.polynomial(r)},addPoly(e,t){if(e[0]===0)return t;if(t[0]===0)return e;let n=e,r=t;n.length>r.length&&([n,r]=[r,n]);let o=Xt(r.length,0),s=r.length-n.length,i=r.slice(0,s);for(let a=0;a<i.length;a++)o[a]=i[a];for(let a=s;a<r.length;a++)o[a]=K.add(n[a-s],r[a]);return K.polynomial(o)},remainderPoly(e,t){const n=Array.from(e);for(let r=0;r<e.length-t.length+1;r++){const o=n[r];if(o!==0)for(let s=1;s<t.length;s++)t[s]!==0&&(n[r+s]=K.add(n[r+s],K.mul(t[s],o)))}return n.slice(e.length-t.length+1,n.length)},divisorPoly(e){let t=[1];for(let n=0;n<e;n++)t=K.mulPoly(t,[1,K.pow(2,n)]);return t},evalPoly(e,t){if(t==0)return K.coefficient(e,0);let n=e[0];for(let r=1;r<e.length;r++)n=K.add(K.mul(t,n),e[r]);return n},euclidian(e,t,n){K.degree(e)<K.degree(t)&&([e,t]=[t,e]);let r=e,o=t,s=[0],i=[1];for(;2*K.degree(o)>=n;){let l=r,u=s;if(r=o,s=i,r[0]===0)throw new Error("rLast[0] === 0");o=l;let f=[0];const d=K.inv(r[0]);for(;K.degree(o)>=K.degree(r)&&o[0]!==0;){const h=K.degree(o)-K.degree(r),g=K.mul(o[0],d);f=K.addPoly(f,K.monomial(h,g)),o=K.addPoly(o,K.mulPolyMonomial(r,h,g))}if(f=K.mulPoly(f,s),i=K.addPoly(f,u),K.degree(o)>=K.degree(r))throw new Error(`Division failed r: ${o}, rLast: ${r}`)}const a=K.coefficient(i,0);if(a==0)throw new Error("sigmaTilde(0) was zero");const c=K.inv(a);return[K.mulPolyScalar(i,c),K.mulPolyScalar(o,c)]}};function fE(e){return{encode(t){const n=K.divisorPoly(e),r=Array.from(t);return r.push(...n.slice(0,-1).fill(0)),Uint8Array.from(K.remainderPoly(r,n))},decode(t){const n=t.slice(),r=K.polynomial(Array.from(t));let o=Xt(e,0),s=!1;for(let f=0;f<e;f++){const d=K.evalPoly(r,K.exp(f));o[o.length-1-f]=d,d!==0&&(s=!0)}if(!s)return n;o=K.polynomial(o);const i=K.monomial(e,1),[a,c]=K.euclidian(i,o,e),l=Xt(K.degree(a),0);let u=0;for(let f=1;f<256&&u<l.length;f++)K.evalPoly(a,f)===0&&(l[u++]=K.inv(f));if(u!==l.length)throw new Error("RS.decode: invalid errors number");for(let f=0;f<l.length;f++){const d=n.length-1-K.log(l[f]);if(d<0)throw new Error("RS.decode: invalid error location");const h=K.inv(l[f]);let g=1;for(let m=0;m<l.length;m++)f!==m&&(g=K.mul(g,K.add(1,K.mul(l[m],h))));n[d]=K.add(n[d],K.mul(K.evalPoly(c,h),K.inv(g)))}return n}}}function hE(e,t){const{words:n,shortBlocks:r,numBlocks:o,blockLen:s,total:i}=Ge.capacity(e,t),a=fE(n);return{encode(c){const l=[],u=[];for(let g=0;g<o;g++){const m=g<r,b=s+(m?0:1);l.push(c.subarray(0,b)),u.push(a.encode(c.subarray(0,b))),c=c.subarray(b)}const f=A0(l),d=A0(u),h=new Uint8Array(f.length+d.length);return h.set(f),h.set(d,f.length),h},decode(c){if(c.length!==i)throw new Error(`interleave.decode: len(data)=${c.length}, total=${i}`);const l=[];for(let d=0;d<o;d++){const h=d<r;l.push(new Uint8Array(n+s+(h?0:1)))}let u=0;for(let d=0;d<s;d++)for(let h=0;h<o;h++)l[h][d]=c[u++];for(let d=r;d<o;d++)l[d][s]=c[u++];for(let d=s;d<s+n;d++)for(let h=0;h<o;h++){const g=h<r;l[h][d+(g?0:1)]=c[u++]}const f=[];for(const d of l)f.push(...Array.from(a.decode(d)).slice(0,-n));return Uint8Array.from(f)}}}function pE(e,t,n,r=!1){const o=Ge.size.encode(e);let s=new Ye(o+2);const i=new Ye(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);s=s.embed(0,i).embed({x:-i.width,y:0},i).embed({x:0,y:-i.height},i),s=s.rectSlice(1,o);const a=new Ye(1).rect(0,1,!0).border(1,!1).border(1,!0),c=Ge.alignmentPatterns(e);for(const l of c)for(const u of c)s.isDefined(u,l)||s.embed({x:u-2,y:l-2},a);s=s.hLine({x:0,y:6},1/0,({x:l})=>s.isDefined(l,6)?void 0:l%2==0).vLine({x:6,y:0},1/0,({y:l})=>s.isDefined(6,l)?void 0:l%2==0);{const l=Ge.formatBits(t,n),u=f=>!r&&(l>>f&1)==1;for(let f=0;f<6;f++)s.set(8,f,u(f));for(let f=6;f<8;f++)s.set(8,f+1,u(f));for(let f=8;f<15;f++)s.set(8,o-15+f,u(f));for(let f=0;f<8;f++)s.set(o-f-1,8,u(f));for(let f=8;f<9;f++)s.set(15-f-1+1,8,u(f));for(let f=9;f<15;f++)s.set(15-f-1,8,u(f));s.set(8,o-8,!r)}if(e>=7){const l=Ge.versionBits(e);for(let u=0;u<18;u+=1){const f=!r&&(l>>u&1)==1,d=Math.floor(u/3),h=u%3+o-8-3;s.set(h,d,f),s.set(d,h,f)}}return s}function mE(e,t,n){const r=e.height,o=sd[t];let s=-1,i=r-1;for(let a=r-1;a>0;a-=2){for(a==6&&(a=5);;i+=s){for(let c=0;c<2;c+=1){const l=a-c;e.isDefined(l,i)||n(l,i,o(l,i))}if(i+s<0||i+s>=r)break}s=-s}}function gE(e){let t="numeric";for(let n of e)if(!Ge.alphabet.numeric.has(n)&&(t="alphanumeric",!Ge.alphabet.alphanumerc.has(n)))return"byte";return t}function bE(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function B0(e,t,n,r,o=bE){let s="",i=n.length;if(r==="numeric"){const d=Ge.alphabet.numeric.decode(n.split("")),h=d.length;for(let g=0;g<h-2;g+=3)s+=cr(d[g]*100+d[g+1]*10+d[g+2],10);h%3===1?s+=cr(d[h-1],4):h%3===2&&(s+=cr(d[h-2]*10+d[h-1],7))}else if(r==="alphanumeric"){const d=Ge.alphabet.alphanumerc.decode(n.split("")),h=d.length;for(let g=0;g<h-1;g+=2)s+=cr(d[g]*45+d[g+1],11);h%2==1&&(s+=cr(d[h-1],6))}else if(r==="byte"){const d=o(n);i=d.length,s=Array.from(d).map(h=>cr(h,8)).join("")}else throw new Error("encode: unsupported type");const{capacity:a}=Ge.capacity(e,t),c=cr(i,Ge.lengthBits(e,r));let l=Ge.modeBits[r]+c+s;if(l.length>a)throw new Error("Capacity overflow");l+="0".repeat(Math.min(4,Math.max(0,a-l.length))),l.length%8&&(l+="0".repeat(8-l.length%8));const u="1110110000010001";for(let d=0;l.length!==a;d++)l+=u[d%u.length];const f=Uint8Array.from(l.match(/(.{8})/g).map(d=>+`0b${d}`));return hE(e,t).encode(f)}function S0(e,t,n,r,o=!1){const s=pE(e,t,r,o);let i=0;const a=8*n.length;if(mE(s,r,(c,l,u)=>{let f=!1;i<a&&(f=(n[i>>>3]>>(7-i&7)&1)!==0,i++),s.set(c,l,f!==u)}),i!==a)throw new Error("QR: bytes left after draw");return s}const bg=e=>{const t=e.map(n=>n?"1":"0").join("");return{len:t.length,n:+`0b${t}`}},yg=[!0,!1,!0,!0,!0,!1,!0],wg=[!1,!1,!1,!1],Bi=bg([...yg,...wg]),P0=bg([...wg,...yg]);function yE(e){const{width:t,height:n}=e,r=e.transpose();let o=0;for(let u=0;u<n;u++)e.getRuns(u,f=>{f>=5&&(o+=3+(f-5))});for(let u=0;u<t;u++)r.getRuns(u,f=>{f>=5&&(o+=3+(f-5))});let s=0;for(let u=0;u<n-1;u++)s+=3*e.countBoxes2x2(u);let i=0;for(let u=0;u<n;u++)i+=40*e.countPatternInRow(u,Bi.len,Bi.n,P0.n);for(let u=0;u<t;u++)i+=40*r.countPatternInRow(u,Bi.len,Bi.n,P0.n);let a=0;a=e.popcnt();const c=a/(n*t)*100,l=10*Math.floor(Math.abs(c-50)/5);return o+s+i+l}function wE(e,t,n,r){if(r===void 0){const o=cE();for(let s=0;s<sd.length;s++)o.add(yE(S0(e,t,n,s,!0)),s);r=o.get()}if(r===void 0)throw new Error("Cannot find mask");return S0(e,t,n,r)}function vE(e){if(!I0.includes(e))throw new Error(`Invalid error correction mode=${e}. Expected: ${I0}`)}function xE(e){if(!j0.includes(e))throw new Error(`Encoding: invalid mode=${e}. Expected: ${j0}`);if(e==="kanji"||e==="eci")throw new Error(`Encoding: ${e} is not supported (yet?).`)}function CE(e){if(![0,1,2,3,4,5,6,7].includes(e)||!sd[e])throw new Error(`Invalid mask=${e}. Expected number [0..7]`)}function AE(e,t="raw",n={}){const r=n.ecc!==void 0?n.ecc:"medium";vE(r);const o=n.encoding!==void 0?n.encoding:gE(e);xE(o),n.mask!==void 0&&CE(n.mask);let s=n.version,i,a=new Error("Unknown error");if(s!==void 0)aE(s),i=B0(s,r,e,o,n.textEncoder);else for(let u=1;u<=40;u++)try{i=B0(u,r,e,o,n.textEncoder),s=u;break}catch(f){a=f}if(!s||!i)throw a;let c=wE(s,r,i,n.mask);c.assertDrawn();const l=n.border===void 0?2:n.border;if(!Number.isSafeInteger(l))throw new Error(`invalid border type=${typeof l}`);if(c=c.border(l,!1),n.scale!==void 0&&(c=c.scale(n.scale)),t==="raw")return c.toRaw();if(t==="ascii")return c.toASCII();if(t==="svg")return c.toSVG(n.optimize);if(t==="gif")return c.toGIF();if(t==="term")return c.toTerm();throw new Error(`Unknown output: ${t}`)}function EE(e,t={}){const{errorCorrection:n,version:r}=t,o=AE(e,"raw",{border:0,ecc:n,scale:1,version:r});return{edgeLength:o.length,finderLength:7,grid:o,value:e}}function rn(e){const{arena:t,...n}=e;return O.jsxs(rn.Root,{...n,children:[O.jsx(rn.Finder,{}),O.jsx(rn.Cells,{}),t&&O.jsx(rn.Arena,{children:typeof t=="string"?O.jsx("img",{alt:"Arena",src:t,style:{borderRadius:1,height:"100%",objectFit:"cover",width:"100%"}}):t})]})}(function(e){e.Context=J.createContext(null);function t(s){const{children:i,size:a="100%",value:c,version:l,errorCorrection:u,...f}=s,d=J.useMemo(()=>(J.Children.map(i,v=>!J.isValidElement(v)||typeof v.type=="string"?null:"displayName"in v.type&&v.type.displayName==="Arena"?!0:null)??[]).some(Boolean),[i]),h=J.useMemo(()=>{let v=u;return d&&u==="low"&&(v="medium"),EE(c,{errorCorrection:v,version:l})},[c,d,u,l]),g=1,m=h.edgeLength*g,b=h.finderLength*g/2,y=d?Math.floor(m/4):0,C=J.useMemo(()=>({arenaSize:y,cellSize:g,edgeSize:m,qrcode:h,finderSize:b}),[y,m,h,b]);return O.jsx(e.Context.Provider,{value:C,children:O.jsxs("svg",{...f,width:a,height:a,viewBox:`0 0 ${m} ${m}`,xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("title",{children:"QR Code"}),i]})})}e.Root=t,function(s){s.displayName="Root"}(t=e.Root||(e.Root={}));function n(s){const{className:i,fill:a,innerClassName:c,radius:l=.25}=s,{cellSize:u,edgeSize:f,finderSize:d}=J.useContext(e.Context);function h({position:g}){let m=d-(d-u)-u/2;g==="top-right"&&(m=f-d-(d-u)-u/2);let b=d-(d-u)-u/2;g==="bottom-left"&&(b=f-d-(d-u)-u/2);let y=d-u*1.5;g==="top-right"&&(y=f-d-u*1.5);let C=d-u*1.5;return g==="bottom-left"&&(C=f-d-u*1.5),O.jsxs(O.Fragment,{children:[O.jsx("rect",{className:i,stroke:a??"currentColor",fill:"transparent",x:m,y:b,width:u+(d-u)*2,height:u+(d-u)*2,rx:2*l*(d-u),ry:2*l*(d-u),strokeWidth:u}),O.jsx("rect",{className:c,fill:a??"currentColor",x:y,y:C,width:u*3,height:u*3,rx:2*l*u,ry:2*l*u})]})}return O.jsxs(O.Fragment,{children:[O.jsx(h,{position:"top-left"}),O.jsx(h,{position:"top-right"}),O.jsx(h,{position:"bottom-left"})]})}e.Finder=n,function(s){s.displayName="Finder"}(n=e.Finder||(e.Finder={}));function r(s){const{className:i,fill:a="currentColor",inset:c=!0,radius:l=1}=s,{arenaSize:u,cellSize:f,qrcode:d}=J.useContext(e.Context),{edgeLength:h,finderLength:g}=d,m=J.useMemo(()=>{let b="";for(let y=0;y<d.grid.length;y++){const C=d.grid[y];if(C)for(let v=0;v<C.length;v++){if(!C[v])continue;const x=h/2-u/2,E=x+u;if(y>=x&&y<=E&&v>=x&&v<=E)continue;const A=y<g&&v<g,I=y<g&&v>=h-g,S=y>=h-g&&v<g;if(A||I||S)continue;const T=c?f*.1:0,R=(f-T*2)/2,M=v*f+f/2,N=y*f+f/2,q=M-R,P=M+R,D=N-R,_=N+R,F=l*R;b+=[`M ${q+F},${D}`,`L ${P-F},${D}`,`A ${F},${F} 0 0,1 ${P},${D+F}`,`L ${P},${_-F}`,`A ${F},${F} 0 0,1 ${P-F},${_}`,`L ${q+F},${_}`,`A ${F},${F} 0 0,1 ${q},${_-F}`,`L ${q},${D+F}`,`A ${F},${F} 0 0,1 ${q+F},${D}`,"z"].join(" ")}}return b},[u,f,h,g,d.grid,c,l]);return O.jsx("path",{className:i,d:m,fill:a})}e.Cells=r,function(s){s.displayName="Cells"}(r=e.Cells||(e.Cells={}));function o(s){const{children:i}=s,{arenaSize:a,cellSize:c,edgeSize:l}=J.useContext(e.Context),u=Math.ceil(l/2-a/2),f=a+a%2,d=c/2;return O.jsx("foreignObject",{x:u,y:u,width:f,height:f,children:O.jsx("div",{style:{alignItems:"center",display:"flex",fontSize:1,justifyContent:"center",height:"100%",overflow:"hidden",width:"100%",padding:d,boxSizing:"border-box"},children:i})})}e.Arena=o,function(s){s.displayName="Arena"}(o=e.Arena||(e.Arena={}))})(rn||(rn={}));id.type="metaMask";function id(e={}){let t,n,r,o,s,i,a,c;return l=>({id:"metaMaskSDK",name:"MetaMask",rdns:["io.metamask","io.metamask.mobile"],type:id.type,async setup(){const u=await this.getProvider();u!=null&&u.on&&(i||(i=this.onConnect.bind(this),u.on("connect",i)),o||(o=this.onAccountsChanged.bind(this),u.on("accountsChanged",o)))},async connect({chainId:u,isReconnecting:f,withCapabilities:d}={}){const h=await this.getProvider();a||(a=this.onDisplayUri,h.on("display_uri",a));let g=[];f&&(g=await this.getAccounts().catch(()=>[]));try{let m,b;g!=null&&g.length||(e.connectAndSign||e.connectWith?(e.connectAndSign?m=await t.connectAndSign({msg:e.connectAndSign}):e.connectWith&&(b=await t.connectWith({method:e.connectWith.method,params:e.connectWith.params})),g=await this.getAccounts()):g=(await t.connect()).map(v=>yt(v)));let y=await this.getChainId();if(u&&y!==u){const C=await this.switchChain({chainId:u}).catch(v=>{if(v.code===Ee.code)throw v;return{id:y}});y=(C==null?void 0:C.id)??y}return a&&(h.removeListener("display_uri",a),a=void 0),m?h.emit("connectAndSign",{accounts:g,chainId:y,signResponse:m}):b&&h.emit("connectWith",{accounts:g,chainId:y,connectWithResponse:b}),i&&(h.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),h.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),h.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),h.on("disconnect",c)),{accounts:d?g.map(C=>({address:C,capabilities:{}})):g,chainId:y}}catch(m){const b=m;throw b.code===Ee.code?new Ee(b):b.code===on.code?new on(b):b}},async disconnect(){const u=await this.getProvider();s&&(u.removeListener("chainChanged",s),s=void 0),c&&(u.removeListener("disconnect",c),c=void 0),i||(i=this.onConnect.bind(this),u.on("connect",i)),await t.terminate()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(d=>yt(d))},async getChainId(){const u=await this.getProvider(),f=u.getChainId()||await(u==null?void 0:u.request({method:"eth_chainId"}));return Number(f)},async getProvider(){async function u(){var m,b,y,C,v;const f=await(async()=>{const{default:w}=await Promise.resolve().then(()=>require("./metamask-sdk-CKwOy3_1.js"));return typeof w!="function"&&typeof w.default=="function"?w.default:w})(),d={};for(const w of l.chains)d[ee(w.id)]=(m=w1({chain:w,transports:l.transports}))==null?void 0:m[0];t=new f({_source:"wagmi",forceDeleteProvider:!1,forceInjectProvider:!1,injectProvider:!1,...e,readonlyRPCMap:d,dappMetadata:{...e.dappMetadata,name:(b=e.dappMetadata)!=null&&b.name?(y=e.dappMetadata)==null?void 0:y.name:"wagmi",url:(C=e.dappMetadata)!=null&&C.url?(v=e.dappMetadata)==null?void 0:v.url:typeof window<"u"?window.location.origin:"https://wagmi.sh"},useDeeplink:e.useDeeplink??!0});const h=await t.init(),g=h!=null&&h.activeProvider?h.activeProvider:t.getProvider();if(!g)throw new wn;return g}return n||(r||(r=u()),n=await r),n},async isAuthorized(){try{return!!(await Mo(()=>Tu(()=>this.getAccounts(),{timeout:200}),{delay:201,retryCount:3})).length}catch{return!1}},async switchChain({addEthereumChainParameter:u,chainId:f}){var b,y;const d=await this.getProvider(),h=l.chains.find(C=>C.id===f);if(!h)throw new Wt(new Do);try{return await d.request({method:"wallet_switchEthereumChain",params:[{chainId:ee(f)}]}),await g(),await m(f),h}catch(C){const v=C;if(v.code===Ee.code)throw new Ee(v);if(v.code===4902||((y=(b=v==null?void 0:v.data)==null?void 0:b.originalError)==null?void 0:y.code)===4902)try{return await d.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(()=>{const{default:w,...x}=h.blockExplorers??{};if(u!=null&&u.blockExplorerUrls)return u.blockExplorerUrls;if(w)return[w.url,...Object.values(x).map(E=>E.url)]})(),chainId:ee(f),chainName:(u==null?void 0:u.chainName)??h.name,iconUrls:u==null?void 0:u.iconUrls,nativeCurrency:(u==null?void 0:u.nativeCurrency)??h.nativeCurrency,rpcUrls:(()=>{var w,x;return(w=u==null?void 0:u.rpcUrls)!=null&&w.length?u.rpcUrls:[((x=h.rpcUrls.default)==null?void 0:x.http[0])??""]})()}]}),await g(),await m(f),h}catch(w){const x=w;throw x.code===Ee.code?new Ee(x):new Wt(x)}throw new Wt(v)}async function g(){await Mo(async()=>{const C=cn(await d.request({method:"eth_chainId"}));if(C!==f)throw new Error("User rejected switch after adding network.");return C},{delay:50,retryCount:20})}async function m(C){await new Promise(v=>{const w=x=>{"chainId"in x&&x.chainId===C&&(l.emitter.off("change",w),v())};l.emitter.on("change",w),l.emitter.emit("change",{chainId:C})})}},async onAccountsChanged(u){if(u.length===0)if(t.isExtensionActive())this.onDisconnect();else return;else if(l.emitter.listenerCount("connect")){const f=(await this.getChainId()).toString();this.onConnect({chainId:f})}else l.emitter.emit("change",{accounts:u.map(f=>yt(f))})},onChainChanged(u){const f=Number(u);l.emitter.emit("change",{chainId:f})},async onConnect(u){const f=await this.getAccounts();if(f.length===0)return;const d=Number(u.chainId);l.emitter.emit("connect",{accounts:f,chainId:d});const h=await this.getProvider();i&&(h.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),h.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),h.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),h.on("disconnect",c))},async onDisconnect(u){const f=await this.getProvider();u&&u.code===1013&&f&&(await this.getAccounts()).length||(l.emitter.emit("disconnect"),s&&(f.removeListener("chainChanged",s),s=void 0),c&&(f.removeListener("disconnect",c),c=void 0),i||(i=this.onConnect.bind(this),f.on("connect",i)))},onDisplayUri(u){l.emitter.emit("message",{type:"display_uri",data:u})}})}ad.type="walletConnect";function ad(e){const t=e.isNewChainsStale??!0;let n,r;const o="eip155";let s,i,a,c,l,u;return f=>({id:"walletConnect",name:"WalletConnect",type:ad.type,async setup(){const d=await this.getProvider().catch(()=>null);d&&(a||(a=this.onConnect.bind(this),d.on("connect",a)),l||(l=this.onSessionDelete.bind(this),d.on("session_delete",l)))},async connect({chainId:d,withCapabilities:h,...g}={}){var m,b;try{const y=await this.getProvider();if(!y)throw new wn;c||(c=this.onDisplayUri,y.on("display_uri",c));let C=d;if(!C){const E=await((m=f.storage)==null?void 0:m.getItem("state"))??{};f.chains.some(I=>I.id===E.chainId)?C=E.chainId:C=(b=f.chains[0])==null?void 0:b.id}if(!C)throw new Error("No chains found on connector.");const v=await this.isChainsStale();if(y.session&&v&&await y.disconnect(),!y.session||v){const E=f.chains.filter(A=>A.id!==C).map(A=>A.id);await y.connect({optionalChains:[C,...E],..."pairingTopic"in g?{pairingTopic:g.pairingTopic}:{}}),this.setRequestedChainsIds(f.chains.map(A=>A.id))}const w=(await y.enable()).map(E=>yt(E));let x=await this.getChainId();if(d&&x!==d){const E=await this.switchChain({chainId:d}).catch(A=>{var I;if(A.code===Ee.code&&((I=A.cause)==null?void 0:I.message)!=="Missing or invalid. request() method: wallet_addEthereumChain")throw A;return{id:x}});x=(E==null?void 0:E.id)??x}return c&&(y.removeListener("display_uri",c),c=void 0),a&&(y.removeListener("connect",a),a=void 0),s||(s=this.onAccountsChanged.bind(this),y.on("accountsChanged",s)),i||(i=this.onChainChanged.bind(this),y.on("chainChanged",i)),u||(u=this.onDisconnect.bind(this),y.on("disconnect",u)),l||(l=this.onSessionDelete.bind(this),y.on("session_delete",l)),{accounts:h?w.map(E=>({address:E,capabilities:{}})):w,chainId:x}}catch(y){throw/(user rejected|connection request reset)/i.test(y==null?void 0:y.message)?new Ee(y):y}},async disconnect(){const d=await this.getProvider();try{await(d==null?void 0:d.disconnect())}catch(h){if(!/No matching key/i.test(h.message))throw h}finally{i&&(d==null||d.removeListener("chainChanged",i),i=void 0),u&&(d==null||d.removeListener("disconnect",u),u=void 0),a||(a=this.onConnect.bind(this),d==null||d.on("connect",a)),s&&(d==null||d.removeListener("accountsChanged",s),s=void 0),l&&(d==null||d.removeListener("session_delete",l),l=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(h=>yt(h))},async getProvider({chainId:d}={}){var g;async function h(){const m=f.chains.map(y=>y.id);if(!m.length)return;const{EthereumProvider:b}=await Promise.resolve().then(()=>require("./index.es-5uEkuPzw.js")).then(y=>y.index_es);return await b.init({...e,disableProviderPing:!0,optionalChains:m,projectId:e.projectId,rpcMap:Object.fromEntries(f.chains.map(y=>{const[C]=w1({chain:y,transports:f.transports});return[y.id,C]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=h()),n=await r,n==null||n.events.setMaxListeners(Number.POSITIVE_INFINITY)),d&&await((g=this.switchChain)==null?void 0:g.call(this,{chainId:d})),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[d,h]=await Promise.all([this.getAccounts(),this.getProvider()]);return d.length?await this.isChainsStale()&&h.session?(await h.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:d,chainId:h}){var b,y,C;const g=await this.getProvider();if(!g)throw new wn;const m=f.chains.find(v=>v.id===h);if(!m)throw new Wt(new Do);try{await Promise.all([new Promise(w=>{const x=({chainId:E})=>{E===h&&(f.emitter.off("change",x),w())};f.emitter.on("change",x)}),g.request({method:"wallet_switchEthereumChain",params:[{chainId:ee(h)}]})]);const v=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...v,h]),m}catch(v){const w=v;if(/(user rejected)/i.test(w.message))throw new Ee(w);try{let x;d!=null&&d.blockExplorerUrls?x=d.blockExplorerUrls:x=(b=m.blockExplorers)!=null&&b.default.url?[(y=m.blockExplorers)==null?void 0:y.default.url]:[];let E;(C=d==null?void 0:d.rpcUrls)!=null&&C.length?E=d.rpcUrls:E=[...m.rpcUrls.default.http];const A={blockExplorerUrls:x,chainId:ee(h),chainName:(d==null?void 0:d.chainName)??m.name,iconUrls:d==null?void 0:d.iconUrls,nativeCurrency:(d==null?void 0:d.nativeCurrency)??m.nativeCurrency,rpcUrls:E};await g.request({method:"wallet_addEthereumChain",params:[A]});const I=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...I,h]),m}catch(x){throw new Ee(x)}}},onAccountsChanged(d){d.length===0?this.onDisconnect():f.emitter.emit("change",{accounts:d.map(h=>yt(h))})},onChainChanged(d){const h=Number(d);f.emitter.emit("change",{chainId:h})},async onConnect(d){const h=Number(d.chainId),g=await this.getAccounts();f.emitter.emit("connect",{accounts:g,chainId:h})},async onDisconnect(d){this.setRequestedChainsIds([]),f.emitter.emit("disconnect");const h=await this.getProvider();s&&(h.removeListener("accountsChanged",s),s=void 0),i&&(h.removeListener("chainChanged",i),i=void 0),u&&(h.removeListener("disconnect",u),u=void 0),l&&(h.removeListener("session_delete",l),l=void 0),a||(a=this.onConnect.bind(this),h.on("connect",a))},onDisplayUri(d){f.emitter.emit("message",{type:"display_uri",data:d})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var h,g,m;return n?((m=(g=(h=n.session)==null?void 0:h.namespaces[o])==null?void 0:g.accounts)==null?void 0:m.map(b=>Number.parseInt(b.split(":")[1]||"",10)))??[]:[]},async getRequestedChainsIds(){var d;return await((d=f.storage)==null?void 0:d.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(!t)return!1;const d=f.chains.map(m=>m.id),h=this.getNamespaceChainsIds();if(h.length&&!h.some(m=>d.includes(m)))return!1;const g=await this.getRequestedChainsIds();return!d.every(m=>g.includes(m))},async setRequestedChainsIds(d){var h;await((h=f.storage)==null?void 0:h.setItem(this.requestedChainsStorageKey,d))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}var kE=768,Yr=SC({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),vg=$1({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),Kl=FC({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},accentColorForeground:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonBorder:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},actionButtonBorderMobile:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},closeButton:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},closeButtonBackground:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonBackgroundError:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonInnerBackground:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectButtonText:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},connectButtonTextError:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},connectionIndicator:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},downloadBottomCardBackground:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"},downloadTopCardBackground:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},error:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},generalBorder:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},generalBorderDim:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},menuItemBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBackdrop:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalBackground:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalBorder:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalText:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},modalTextDim:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},modalTextSecondary:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileAction:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},profileActionHover:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},profileForeground:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"},selectedOptionBorder:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},standby:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},accentColorForeground:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonBorder:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},actionButtonBorderMobile:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},closeButton:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},closeButtonBackground:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonBackgroundError:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonInnerBackground:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectButtonText:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},connectButtonTextError:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},connectionIndicator:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},downloadBottomCardBackground:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},downloadTopCardBackground:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},error:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},generalBorder:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},generalBorderDim:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"},menuItemBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBackdrop:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalBackground:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalBorder:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalText:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},modalTextDim:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},modalTextSecondary:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileAction:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},profileActionHover:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},profileForeground:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"},selectedOptionBorder:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},standby:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},dialog:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},profileDetailsAction:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},selectedOption:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"},selectedWallet:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},walletLogo:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"}}},color:{values:{accentColor:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},accentColorForeground:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonBorder:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},actionButtonBorderMobile:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},closeButton:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},closeButtonBackground:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonBackgroundError:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonInnerBackground:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectButtonText:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},connectButtonTextError:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},connectionIndicator:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},downloadBottomCardBackground:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},downloadTopCardBackground:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},error:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},generalBorder:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},generalBorderDim:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"},menuItemBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBackdrop:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalBackground:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalBorder:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalText:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},modalTextDim:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},modalTextSecondary:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileAction:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},profileActionHover:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},profileForeground:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"},selectedOptionBorder:{conditions:{base:"ju367vhc",hover:"ju367vhd",active:"ju367vhe"},defaultClass:"ju367vhc"},standby:{conditions:{base:"ju367vhf",hover:"ju367vhg",active:"ju367vhh"},defaultClass:"ju367vhf"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"},none:{defaultClass:"ju367vz"}}},pointerEvents:{values:{none:{defaultClass:"ju367v10"},all:{defaultClass:"ju367v11"}}},minHeight:{values:{8:{defaultClass:"ju367v12"},44:{defaultClass:"ju367v13"}}},flexDirection:{values:{row:{defaultClass:"ju367v14"},column:{defaultClass:"ju367v15"}}},fontFamily:{values:{body:{defaultClass:"ju367v16"}}},fontSize:{values:{12:{defaultClass:"ju367v17"},13:{defaultClass:"ju367v18"},14:{defaultClass:"ju367v19"},16:{defaultClass:"ju367v1a"},18:{defaultClass:"ju367v1b"},20:{defaultClass:"ju367v1c"},23:{defaultClass:"ju367v1d"}}},fontWeight:{values:{regular:{defaultClass:"ju367v1e"},medium:{defaultClass:"ju367v1f"},semibold:{defaultClass:"ju367v1g"},bold:{defaultClass:"ju367v1h"},heavy:{defaultClass:"ju367v1i"}}},gap:{values:{0:{defaultClass:"ju367v1j"},1:{defaultClass:"ju367v1k"},2:{defaultClass:"ju367v1l"},3:{defaultClass:"ju367v1m"},4:{defaultClass:"ju367v1n"},5:{defaultClass:"ju367v1o"},6:{defaultClass:"ju367v1p"},8:{defaultClass:"ju367v1q"},10:{defaultClass:"ju367v1r"},12:{defaultClass:"ju367v1s"},14:{defaultClass:"ju367v1t"},16:{defaultClass:"ju367v1u"},18:{defaultClass:"ju367v1v"},20:{defaultClass:"ju367v1w"},24:{defaultClass:"ju367v1x"},28:{defaultClass:"ju367v1y"},32:{defaultClass:"ju367v1z"},36:{defaultClass:"ju367v20"},44:{defaultClass:"ju367v21"},64:{defaultClass:"ju367v22"},"-1":{defaultClass:"ju367v23"}}},height:{values:{1:{defaultClass:"ju367v24"},2:{defaultClass:"ju367v25"},4:{defaultClass:"ju367v26"},8:{defaultClass:"ju367v27"},12:{defaultClass:"ju367v28"},20:{defaultClass:"ju367v29"},24:{defaultClass:"ju367v2a"},28:{defaultClass:"ju367v2b"},30:{defaultClass:"ju367v2c"},32:{defaultClass:"ju367v2d"},34:{defaultClass:"ju367v2e"},36:{defaultClass:"ju367v2f"},40:{defaultClass:"ju367v2g"},44:{defaultClass:"ju367v2h"},48:{defaultClass:"ju367v2i"},54:{defaultClass:"ju367v2j"},60:{defaultClass:"ju367v2k"},200:{defaultClass:"ju367v2l"},full:{defaultClass:"ju367v2m"},max:{defaultClass:"ju367v2n"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2o"},"flex-end":{defaultClass:"ju367v2p"},center:{defaultClass:"ju367v2q"},"space-between":{defaultClass:"ju367v2r"},"space-around":{defaultClass:"ju367v2s"}}},textAlign:{values:{left:{defaultClass:"ju367v2t"},center:{defaultClass:"ju367v2u"},inherit:{defaultClass:"ju367v2v"}}},marginBottom:{values:{0:{defaultClass:"ju367v2w"},1:{defaultClass:"ju367v2x"},2:{defaultClass:"ju367v2y"},3:{defaultClass:"ju367v2z"},4:{defaultClass:"ju367v30"},5:{defaultClass:"ju367v31"},6:{defaultClass:"ju367v32"},8:{defaultClass:"ju367v33"},10:{defaultClass:"ju367v34"},12:{defaultClass:"ju367v35"},14:{defaultClass:"ju367v36"},16:{defaultClass:"ju367v37"},18:{defaultClass:"ju367v38"},20:{defaultClass:"ju367v39"},24:{defaultClass:"ju367v3a"},28:{defaultClass:"ju367v3b"},32:{defaultClass:"ju367v3c"},36:{defaultClass:"ju367v3d"},44:{defaultClass:"ju367v3e"},64:{defaultClass:"ju367v3f"},"-1":{defaultClass:"ju367v3g"}}},marginLeft:{values:{0:{defaultClass:"ju367v3h"},1:{defaultClass:"ju367v3i"},2:{defaultClass:"ju367v3j"},3:{defaultClass:"ju367v3k"},4:{defaultClass:"ju367v3l"},5:{defaultClass:"ju367v3m"},6:{defaultClass:"ju367v3n"},8:{defaultClass:"ju367v3o"},10:{defaultClass:"ju367v3p"},12:{defaultClass:"ju367v3q"},14:{defaultClass:"ju367v3r"},16:{defaultClass:"ju367v3s"},18:{defaultClass:"ju367v3t"},20:{defaultClass:"ju367v3u"},24:{defaultClass:"ju367v3v"},28:{defaultClass:"ju367v3w"},32:{defaultClass:"ju367v3x"},36:{defaultClass:"ju367v3y"},44:{defaultClass:"ju367v3z"},64:{defaultClass:"ju367v40"},"-1":{defaultClass:"ju367v41"}}},marginRight:{values:{0:{defaultClass:"ju367v42"},1:{defaultClass:"ju367v43"},2:{defaultClass:"ju367v44"},3:{defaultClass:"ju367v45"},4:{defaultClass:"ju367v46"},5:{defaultClass:"ju367v47"},6:{defaultClass:"ju367v48"},8:{defaultClass:"ju367v49"},10:{defaultClass:"ju367v4a"},12:{defaultClass:"ju367v4b"},14:{defaultClass:"ju367v4c"},16:{defaultClass:"ju367v4d"},18:{defaultClass:"ju367v4e"},20:{defaultClass:"ju367v4f"},24:{defaultClass:"ju367v4g"},28:{defaultClass:"ju367v4h"},32:{defaultClass:"ju367v4i"},36:{defaultClass:"ju367v4j"},44:{defaultClass:"ju367v4k"},64:{defaultClass:"ju367v4l"},"-1":{defaultClass:"ju367v4m"}}},marginTop:{values:{0:{defaultClass:"ju367v4n"},1:{defaultClass:"ju367v4o"},2:{defaultClass:"ju367v4p"},3:{defaultClass:"ju367v4q"},4:{defaultClass:"ju367v4r"},5:{defaultClass:"ju367v4s"},6:{defaultClass:"ju367v4t"},8:{defaultClass:"ju367v4u"},10:{defaultClass:"ju367v4v"},12:{defaultClass:"ju367v4w"},14:{defaultClass:"ju367v4x"},16:{defaultClass:"ju367v4y"},18:{defaultClass:"ju367v4z"},20:{defaultClass:"ju367v50"},24:{defaultClass:"ju367v51"},28:{defaultClass:"ju367v52"},32:{defaultClass:"ju367v53"},36:{defaultClass:"ju367v54"},44:{defaultClass:"ju367v55"},64:{defaultClass:"ju367v56"},"-1":{defaultClass:"ju367v57"}}},maxWidth:{values:{1:{defaultClass:"ju367v58"},2:{defaultClass:"ju367v59"},4:{defaultClass:"ju367v5a"},8:{defaultClass:"ju367v5b"},12:{defaultClass:"ju367v5c"},20:{defaultClass:"ju367v5d"},24:{defaultClass:"ju367v5e"},28:{defaultClass:"ju367v5f"},30:{defaultClass:"ju367v5g"},32:{defaultClass:"ju367v5h"},34:{defaultClass:"ju367v5i"},36:{defaultClass:"ju367v5j"},40:{defaultClass:"ju367v5k"},44:{defaultClass:"ju367v5l"},48:{defaultClass:"ju367v5m"},54:{defaultClass:"ju367v5n"},60:{defaultClass:"ju367v5o"},200:{defaultClass:"ju367v5p"},full:{defaultClass:"ju367v5q"},max:{defaultClass:"ju367v5r"}}},minWidth:{values:{1:{defaultClass:"ju367v5s"},2:{defaultClass:"ju367v5t"},4:{defaultClass:"ju367v5u"},8:{defaultClass:"ju367v5v"},12:{defaultClass:"ju367v5w"},20:{defaultClass:"ju367v5x"},24:{defaultClass:"ju367v5y"},28:{defaultClass:"ju367v5z"},30:{defaultClass:"ju367v60"},32:{defaultClass:"ju367v61"},34:{defaultClass:"ju367v62"},36:{defaultClass:"ju367v63"},40:{defaultClass:"ju367v64"},44:{defaultClass:"ju367v65"},48:{defaultClass:"ju367v66"},54:{defaultClass:"ju367v67"},60:{defaultClass:"ju367v68"},200:{defaultClass:"ju367v69"},full:{defaultClass:"ju367v6a"},max:{defaultClass:"ju367v6b"}}},overflow:{values:{hidden:{defaultClass:"ju367v6c"}}},paddingBottom:{values:{0:{defaultClass:"ju367v6d"},1:{defaultClass:"ju367v6e"},2:{defaultClass:"ju367v6f"},3:{defaultClass:"ju367v6g"},4:{defaultClass:"ju367v6h"},5:{defaultClass:"ju367v6i"},6:{defaultClass:"ju367v6j"},8:{defaultClass:"ju367v6k"},10:{defaultClass:"ju367v6l"},12:{defaultClass:"ju367v6m"},14:{defaultClass:"ju367v6n"},16:{defaultClass:"ju367v6o"},18:{defaultClass:"ju367v6p"},20:{defaultClass:"ju367v6q"},24:{defaultClass:"ju367v6r"},28:{defaultClass:"ju367v6s"},32:{defaultClass:"ju367v6t"},36:{defaultClass:"ju367v6u"},44:{defaultClass:"ju367v6v"},64:{defaultClass:"ju367v6w"},"-1":{defaultClass:"ju367v6x"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6y"},1:{defaultClass:"ju367v6z"},2:{defaultClass:"ju367v70"},3:{defaultClass:"ju367v71"},4:{defaultClass:"ju367v72"},5:{defaultClass:"ju367v73"},6:{defaultClass:"ju367v74"},8:{defaultClass:"ju367v75"},10:{defaultClass:"ju367v76"},12:{defaultClass:"ju367v77"},14:{defaultClass:"ju367v78"},16:{defaultClass:"ju367v79"},18:{defaultClass:"ju367v7a"},20:{defaultClass:"ju367v7b"},24:{defaultClass:"ju367v7c"},28:{defaultClass:"ju367v7d"},32:{defaultClass:"ju367v7e"},36:{defaultClass:"ju367v7f"},44:{defaultClass:"ju367v7g"},64:{defaultClass:"ju367v7h"},"-1":{defaultClass:"ju367v7i"}}},paddingRight:{values:{0:{defaultClass:"ju367v7j"},1:{defaultClass:"ju367v7k"},2:{defaultClass:"ju367v7l"},3:{defaultClass:"ju367v7m"},4:{defaultClass:"ju367v7n"},5:{defaultClass:"ju367v7o"},6:{defaultClass:"ju367v7p"},8:{defaultClass:"ju367v7q"},10:{defaultClass:"ju367v7r"},12:{defaultClass:"ju367v7s"},14:{defaultClass:"ju367v7t"},16:{defaultClass:"ju367v7u"},18:{defaultClass:"ju367v7v"},20:{defaultClass:"ju367v7w"},24:{defaultClass:"ju367v7x"},28:{defaultClass:"ju367v7y"},32:{defaultClass:"ju367v7z"},36:{defaultClass:"ju367v80"},44:{defaultClass:"ju367v81"},64:{defaultClass:"ju367v82"},"-1":{defaultClass:"ju367v83"}}},paddingTop:{values:{0:{defaultClass:"ju367v84"},1:{defaultClass:"ju367v85"},2:{defaultClass:"ju367v86"},3:{defaultClass:"ju367v87"},4:{defaultClass:"ju367v88"},5:{defaultClass:"ju367v89"},6:{defaultClass:"ju367v8a"},8:{defaultClass:"ju367v8b"},10:{defaultClass:"ju367v8c"},12:{defaultClass:"ju367v8d"},14:{defaultClass:"ju367v8e"},16:{defaultClass:"ju367v8f"},18:{defaultClass:"ju367v8g"},20:{defaultClass:"ju367v8h"},24:{defaultClass:"ju367v8i"},28:{defaultClass:"ju367v8j"},32:{defaultClass:"ju367v8k"},36:{defaultClass:"ju367v8l"},44:{defaultClass:"ju367v8m"},64:{defaultClass:"ju367v8n"},"-1":{defaultClass:"ju367v8o"}}},position:{values:{absolute:{defaultClass:"ju367v8p"},fixed:{defaultClass:"ju367v8q"},relative:{defaultClass:"ju367v8r"}}},WebkitUserSelect:{values:{none:{defaultClass:"ju367v8s"}}},right:{values:{0:{defaultClass:"ju367v8t"}}},transition:{values:{default:{defaultClass:"ju367v8u"},transform:{defaultClass:"ju367v8v"}}},userSelect:{values:{none:{defaultClass:"ju367v8w"}}},width:{values:{1:{defaultClass:"ju367v8x"},2:{defaultClass:"ju367v8y"},4:{defaultClass:"ju367v8z"},8:{defaultClass:"ju367v90"},12:{defaultClass:"ju367v91"},20:{defaultClass:"ju367v92"},24:{defaultClass:"ju367v93"},28:{defaultClass:"ju367v94"},30:{defaultClass:"ju367v95"},32:{defaultClass:"ju367v96"},34:{defaultClass:"ju367v97"},36:{defaultClass:"ju367v98"},40:{defaultClass:"ju367v99"},44:{defaultClass:"ju367v9a"},48:{defaultClass:"ju367v9b"},54:{defaultClass:"ju367v9c"},60:{defaultClass:"ju367v9d"},200:{defaultClass:"ju367v9e"},full:{defaultClass:"ju367v9f"},max:{defaultClass:"ju367v9g"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9h"}}}}}),O0={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackground:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},IE={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},jE="_12cbo8i3 ju367v8r",BE={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function Re({active:e,hover:t}){return[jE,t&&BE[t],IE[e]]}var xg=p.createContext(null);function SE(){const{adapter:e}=p.useContext(xg)??{};if(!e)throw new Error("No authentication adapter found");return e}function Fa(){const e=p.useContext(xg);return(e==null?void 0:e.status)??null}function cd(){const e=Fa(),{isConnected:t}=nt();return t?e&&(e==="loading"||e==="unauthenticated")?e:"connected":"disconnected"}function PE(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function OE(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function TE(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function Ma(){return OE()||TE()}function We(){return PE()||Ma()}var RE="iekbcc0",NE={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},FE=({reset:e,...t})=>{if(!e)return Kl(t);const n=NE[e],r=Kl(t);return q1(RE,n,r)},j=p.forwardRef(({as:e="div",className:t,testId:n,...r},o)=>{const s={},i={};for(const c in r)Kl.properties.has(c)?s[c]=r[c]:i[c]=r[c];const a=FE({reset:typeof e=="string"?e:"div",...s});return p.createElement(e,{className:q1(a,t),...i,"data-testid":n?`rk-${n.replace(/^rk-/,"")}`:void 0,ref:o})});j.displayName="Box";var Cg=new Map,Ic=new Map;async function Ag(e){const t=Ic.get(e);if(t)return t;const n=async()=>e().then(async o=>(Cg.set(e,o),o)),r=n().catch(o=>n().catch(s=>{Ic.delete(e)}));return Ic.set(e,r),r}async function un(...e){return await Promise.all(e.map(t=>typeof t=="function"?Ag(t):t))}function ME(){const[,e]=p.useReducer(t=>t+1,0);return e}function Da(e){const t=typeof e=="function"?Cg.get(e):void 0,n=ME();return p.useEffect(()=>{typeof e=="function"&&!t&&Ag(e).then(n)},[e,t,n]),typeof e=="function"?t:e}function $e({alt:e,background:t,borderColor:n,borderRadius:r,useAsImage:o,boxShadow:s,height:i,src:a,width:c,testId:l}){const u=Ma(),f=Da(a),d=f&&/^http/.test(f),[h,g]=p.useReducer(()=>!0,!1);return p.createElement(j,{"aria-label":e,borderRadius:r,boxShadow:s,height:typeof i=="string"?i:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:t,height:typeof i=="number"?i:void 0,width:typeof c=="number"?c:void 0},width:typeof c=="string"?c:void 0,testId:l},p.createElement(j,{...d?{"aria-hidden":!0,as:"img",onLoad:g,src:f}:{"aria-hidden":!0,as:"img",src:f},height:"full",position:"absolute",...u?{WebkitUserSelect:"none"}:{},style:{WebkitTouchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...!o&&d?{opacity:h?1:0}:{}},width:"full"}),n?p.createElement(j,{...typeof n=="object"&&"custom"in n?{style:{borderColor:n.custom}}:{borderColor:n},borderRadius:r,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var DE="_1luule42",LE="_1luule43",UE=e=>p.useMemo(()=>`${e}_${Math.round(Math.random()*1e9)}`,[e]),Ls=({height:e=21,width:t=21})=>{const n=UE("spinner");return p.createElement("svg",{className:DE,fill:"none",height:e,viewBox:"0 0 21 21",width:t,xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Loading"),p.createElement("clipPath",{id:n},p.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),p.createElement("foreignObject",{clipPath:`url(#${n})`,height:"21",width:"21",x:"0",y:"0"},p.createElement("div",{className:LE})))},fe=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],T0=[{color:fe[0],emoji:"🌶"},{color:fe[1],emoji:"🤑"},{color:fe[2],emoji:"🐙"},{color:fe[3],emoji:"🫐"},{color:fe[4],emoji:"🐳"},{color:fe[0],emoji:"🤶"},{color:fe[5],emoji:"🌲"},{color:fe[6],emoji:"🌞"},{color:fe[7],emoji:"🐒"},{color:fe[8],emoji:"🐵"},{color:fe[9],emoji:"🦊"},{color:fe[10],emoji:"🐼"},{color:fe[11],emoji:"🦄"},{color:fe[12],emoji:"🐷"},{color:fe[13],emoji:"🐧"},{color:fe[8],emoji:"🦩"},{color:fe[14],emoji:"👽"},{color:fe[0],emoji:"🎈"},{color:fe[8],emoji:"🍉"},{color:fe[1],emoji:"🎉"},{color:fe[15],emoji:"🐲"},{color:fe[16],emoji:"🌎"},{color:fe[17],emoji:"🍊"},{color:fe[18],emoji:"🐭"},{color:fe[19],emoji:"🍣"},{color:fe[1],emoji:"🐥"},{color:fe[20],emoji:"👾"},{color:fe[15],emoji:"🥦"},{color:fe[0],emoji:"👹"},{color:fe[17],emoji:"🙀"},{color:fe[4],emoji:"⛱"},{color:fe[21],emoji:"⛵️"},{color:fe[17],emoji:"🥳"},{color:fe[8],emoji:"🤯"},{color:fe[22],emoji:"🤠"}];function _E(e){let t=0;if(e.length===0)return t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t}function $E(e){const n=Math.abs(_E((typeof e=="string"?e:"").toLowerCase())%T0.length);return T0[n??0]}var WE=({address:e,ensImage:t,size:n})=>{const[r,o]=p.useState(!1);p.useEffect(()=>{if(t){const a=new Image;a.src=t,a.onload=()=>o(!0)}},[t]);const{color:s,emoji:i}=p.useMemo(()=>$E(e),[e]);return t?r?p.createElement(j,{backgroundSize:"cover",borderRadius:"full",position:"absolute",style:{backgroundImage:`url(${t})`,backgroundPosition:"center",height:n,width:n}}):p.createElement(j,{alignItems:"center",backgroundSize:"cover",borderRadius:"full",color:"modalText",display:"flex",justifyContent:"center",position:"absolute",style:{height:n,width:n}},p.createElement(Ls,null)):p.createElement(j,{alignItems:"center",display:"flex",justifyContent:"center",overflow:"hidden",style:{...!t&&{backgroundColor:s},height:n,width:n}},i)},Eg=WE,kg=p.createContext(Eg);function Ig({address:e,imageUrl:t,loading:n,size:r}){const o=p.useContext(kg);return p.createElement(j,{"aria-hidden":!0,borderRadius:"full",overflow:"hidden",position:"relative",style:{height:`${r}px`,width:`${r}px`},userSelect:"none"},p.createElement(j,{alignItems:"center",borderRadius:"full",display:"flex",justifyContent:"center",overflow:"hidden",position:"absolute",style:{fontSize:`${Math.round(r*.55)}px`,height:`${r}px`,transform:n?"scale(0.72)":void 0,transition:".25s ease",transitionDelay:n?void 0:".1s",width:`${r}px`,willChange:"transform"},userSelect:"none"},p.createElement(o,{address:e,ensImage:t,size:r})),n&&p.createElement(j,{color:"accentColor",display:"flex",height:"full",position:"absolute",width:"full"},p.createElement(Ls,{height:"100%",width:"100%"})))}var R0=()=>p.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Dropdown"),p.createElement("path",{d:"M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"})),N0={defaultLocale:"en",locale:"en"},qE=class{constructor(e){this.listeners=new Set,this.defaultLocale=N0.defaultLocale,this.enableFallback=!1,this.locale=N0.locale,this.cachedLocales=[],this.translations={};for(const[t,n]of Object.entries(e))this.cachedLocales=[...this.cachedLocales,t],this.translations={...this.translations,...this.flattenTranslation(n,t)}}missingMessage(e){return`[missing: "${this.locale}.${e}" translation]`}flattenTranslation(e,t){const n={},r=(o,s)=>{for(const i of Object.keys(o)){const a=`${s}.${i}`,c=o[i];typeof c=="object"&&c!==null?r(c,a):n[a]=c}};return r(e,t),n}translateWithReplacements(e,t={}){let n=e;for(const r in t){const o=t[r];n=n.replace(`%{${r}}`,o)}return n}t(e,t,n){const r=`${this.locale}.${e}`,o=this.translations[r];if(!o){if(this.enableFallback){const s=`${this.defaultLocale}.${e}`,i=this.translations[s];if(i)return this.translateWithReplacements(i,t)}return n!=null&&n.rawKeyIfTranslationMissing?e:this.missingMessage(e)}return this.translateWithReplacements(o,t)}isLocaleCached(e){return this.cachedLocales.includes(e)}updateLocale(e){this.locale=e,this.notifyListeners()}setTranslations(e,t){this.isLocaleCached(e)||(this.cachedLocales=[...this.cachedLocales,e],this.translations={...this.translations,...this.flattenTranslation(t,e)}),this.locale=e,this.notifyListeners()}notifyListeners(){for(const e of this.listeners)e()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},Tt=new qE({en:JSON.parse($l),"en-US":JSON.parse($l)});Tt.defaultLocale="en-US";Tt.locale="en-US";Tt.enableFallback=!0;var zE=async e=>{switch(e){case"ar":case"ar-AR":return(await Promise.resolve().then(()=>require("./ar_AR-44JUQ6EW-DSQ9qcs_.js"))).default;case"de":case"de-DE":return(await Promise.resolve().then(()=>require("./de_DE-PYAO5YD6-Dd1WvOtn.js"))).default;case"en":case"en-US":return(await Promise.resolve().then(()=>require("./en_US-Y4ZOVFV4-DBqUKfQh.js"))).default;case"es":case"es-419":return(await Promise.resolve().then(()=>require("./es_419-HRGOJ6VT-B7E9BfQ6.js"))).default;case"fr":case"fr-FR":return(await Promise.resolve().then(()=>require("./fr_FR-IGGVC6RM-DaW0iy2_.js"))).default;case"hi":case"hi-IN":return(await Promise.resolve().then(()=>require("./hi_IN-XSKAA3MF-C9xFkabi.js"))).default;case"id":case"id-ID":return(await Promise.resolve().then(()=>require("./id_ID-KUOB4UAL-B3IV2Afs.js"))).default;case"ja":case"ja-JP":return(await Promise.resolve().then(()=>require("./ja_JP-4WRQ63RX-DPg57Jtp.js"))).default;case"ko":case"ko-KR":return(await Promise.resolve().then(()=>require("./ko_KR-I2K7AIEP-DTiN0Tki.js"))).default;case"ms":case"ms-MY":return(await Promise.resolve().then(()=>require("./ms_MY-6VZW6Q3Z-GeT8A_9b.js"))).default;case"pt":case"pt-BR":return(await Promise.resolve().then(()=>require("./pt_BR-N3XOZ4SV-E_1oHsgd.js"))).default;case"ru":case"ru-RU":return(await Promise.resolve().then(()=>require("./ru_RU-IITAPRET-DWVtNBKa.js"))).default;case"th":case"th-TH":return(await Promise.resolve().then(()=>require("./th_TH-3ZQCKCQE-Da2m2LPy.js"))).default;case"tr":case"tr-TR":return(await Promise.resolve().then(()=>require("./tr_TR-QUPUGMUF-s63Tz8WP.js"))).default;case"ua":case"uk-UA":return(await Promise.resolve().then(()=>require("./uk_UA-SSN6SV5E-IfMgDbzS.js"))).default;case"vi":case"vi-VN":return(await Promise.resolve().then(()=>require("./vi_VN-7BUVRNYY-Ba1mpr-F.js"))).default;case"zh":case"zh-CN":case"zh-Hans":return(await Promise.resolve().then(()=>require("./zh_CN-HJBN674C-Vu7Wn9i6.js"))).default;case"zh-HK":return(await Promise.resolve().then(()=>require("./zh_HK-JW3WLRKE-COIwuLIC.js"))).default;case"zh-Hant":case"zh-TW":return(await Promise.resolve().then(()=>require("./zh_TW-VNNRNXY7-DKIN8H5Y.js"))).default;default:return(await Promise.resolve().then(()=>require("./en_US-Y4ZOVFV4-DBqUKfQh.js"))).default}};async function F0(e){if(Tt.isLocaleCached(e)){Tt.updateLocale(e);return}const n=await zE(e);Tt.setTranslations(e,JSON.parse(n))}var QE=()=>{var e;if(typeof window<"u"&&typeof navigator<"u"){if((e=navigator.languages)!=null&&e.length)return navigator.languages[0];if(navigator.language)return navigator.language}},Fe=p.createContext({i18n:Tt}),HE=({children:e,locale:t})=>{const[n,r]=p.useState(0),o=p.useMemo(()=>QE(),[]);p.useEffect(()=>Tt.onChange(()=>{r(a=>a+1)}),[]),p.useEffect(()=>{t&&t!==Tt.locale?F0(t):!t&&o&&o!==Tt.locale&&F0(o)},[t,o]);const s=p.useMemo(()=>({t:(a,c)=>Tt.t(a,c),i18n:Tt}),[n]);return p.createElement(Fe.Provider,{value:s},e)};function jg(e){return e!=null}var M0={iconBackground:"#7290CC",iconUrl:async()=>(await Promise.resolve().then(()=>require("./apechain-SX5YFU6N-BP98RVDs.js"))).default},jc={iconBackground:"#96bedc",iconUrl:async()=>(await Promise.resolve().then(()=>require("./arbitrum-WURIBY6W-BS2MH6mu.js"))).default},D0={iconBackground:"#e84141",iconUrl:async()=>(await Promise.resolve().then(()=>require("./avalanche-KOMJD3XY-Df8RTmnR.js"))).default},Bc={iconBackground:"#0052ff",iconUrl:async()=>(await Promise.resolve().then(()=>require("./base-OAXLRA4F-iT9zH1Kj.js"))).default},Sc={iconBackground:"#814625",iconUrl:async()=>(await Promise.resolve().then(()=>require("./berachain-NJECWIVC-BMZnNAq4.js"))).default},L0={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./blast-V555OVXZ-Bbwv3H8h.js"))).default},U0={iconBackground:"#ebac0e",iconUrl:async()=>(await Promise.resolve().then(()=>require("./bsc-N647EYR2-B1LUNwWi.js"))).default},_0={iconBackground:"#FCFF52",iconUrl:async()=>(await Promise.resolve().then(()=>require("./celo-GEP4TUHG-DGNZBO1F.js"))).default},$0={iconBackground:"#002D74",iconUrl:async()=>(await Promise.resolve().then(()=>require("./cronos-HJPAQTAE-CYNBJWpC.js"))).default},GE={iconBackground:"#A36EFD",iconUrl:async()=>(await Promise.resolve().then(()=>require("./degen-FQQ4XGHB-B0iCWKkK.js"))).default},Mn={iconBackground:"#484c50",iconUrl:async()=>(await Promise.resolve().then(()=>require("./ethereum-RGGVA4PY-D0PFo6qh.js"))).default},W0={iconBackground:"transparent",iconUrl:async()=>(await Promise.resolve().then(()=>require("./flow-5FQJFCTK-zNre9dGJ.js"))).default},VE={iconBackground:"#04795c",iconUrl:async()=>(await Promise.resolve().then(()=>require("./gnosis-37ZC4RBL-DpsuNYS1.js"))).default},q0={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./gravity-J5YQHTYH-CnR8N36w.js"))).default},KE={iconBackground:"#f9f7ec",iconUrl:async()=>(await Promise.resolve().then(()=>require("./hardhat-TX56IT5N-Mh0k0VUo.js"))).default},JE={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./hyperevm-VKPAA4SA-BrvLj9LS.js"))).default},z0={iconBackground:"#7132F5",iconUrl:async()=>(await Promise.resolve().then(()=>require("./ink-FZMYZWHG-BuNtRfvY.js"))).default},Q0={iconBackground:"transparent",iconUrl:async()=>(await Promise.resolve().then(()=>require("./kaia-65D2U3PU-C3iOW87N.js"))).default},Pc={iconBackground:"#ffffff",iconUrl:async()=>(await Promise.resolve().then(()=>require("./linea-QRMVQ5DY-C2d1pHrg.js"))).default},Oc={iconBackground:"#ffffff",iconUrl:async()=>(await Promise.resolve().then(()=>require("./manta-SI27YFEJ-CBE6iXtC.js"))).default},H0={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./mantle-CKIUT334-CPiUOpgj.js"))).default},YE={iconBackground:"transparent",iconUrl:async()=>(await Promise.resolve().then(()=>require("./monad-4KWC6TSS-BnWBHM2V.js"))).default},Si={iconBackground:"#ff5a57",iconUrl:async()=>(await Promise.resolve().then(()=>require("./optimism-HAF2GUT7-BT_Mx-dr.js"))).default},Tc={iconBackground:"#9f71ec",iconUrl:async()=>(await Promise.resolve().then(()=>require("./polygon-WW6ZI7PM-DGanIpKH.js"))).default},XE={iconBackground:"#1273EA",iconUrl:async()=>(await Promise.resolve().then(()=>require("./ronin-EMCPYXZT-BVeW22BA.js"))).default},ZE={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./sanko-RHQYXGM5-t_EneLtZ.js"))).default},e7={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./superposition-HG6MMR2Y-CUrWVrH0.js"))).default},G0={iconBackground:"#FFEEDA",iconUrl:async()=>(await Promise.resolve().then(()=>require("./scroll-5OBGQVOV-DYo31pKm.js"))).default},V0={iconBackground:"#F50DB4",iconUrl:async()=>(await Promise.resolve().then(()=>require("./unichain-C5BWO2ZY-DrmDCV2p.js"))).default},K0={iconBackground:"#f9f7ec",iconUrl:async()=>(await Promise.resolve().then(()=>require("./xdc-KJ3TDBYO-DjnCHm47.js"))).default},J0={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./zetachain-TLDS5IPW-BRdUItmm.js"))).default},Y0={iconBackground:"#f9f7ec",iconUrl:async()=>(await Promise.resolve().then(()=>require("./zksync-DH7HK5U4-DVKzLGnB.js"))).default},Rc={iconBackground:"#000000",iconUrl:async()=>(await Promise.resolve().then(()=>require("./zora-FYL5H3IO-BSEkA2hF.js"))).default},t7={apechain:{chainId:33139,name:"ApeChain",...M0},apechainCurtis:{chainId:33111,name:"ApeChain Curtis",...M0},arbitrum:{chainId:42161,name:"Arbitrum",...jc},arbitrumGoerli:{chainId:421613,...jc},arbitrumSepolia:{chainId:421614,...jc},avalanche:{chainId:43114,...D0},avalancheFuji:{chainId:43113,...D0},base:{chainId:8453,name:"Base",...Bc},baseGoerli:{chainId:84531,...Bc},baseSepolia:{chainId:84532,...Bc},berachain:{chainId:80094,name:"Berachain",...Sc},berachainArtio:{chainId:80085,name:"Berachain Artio",...Sc},berachainBArtio:{chainId:80084,name:"Berachain bArtio",...Sc},blast:{chainId:81457,name:"Blast",...L0},blastSepolia:{chainId:168587773,...L0},bsc:{chainId:56,name:"BSC",...U0},bscTestnet:{chainId:97,...U0},celo:{chainId:42220,name:"Celo",..._0},celoAlfajores:{chainId:44787,name:"Celo Alfajores",..._0},cronos:{chainId:25,...$0},cronosTestnet:{chainId:338,...$0},degen:{chainId:666666666,name:"Degen",...GE},flow:{chainId:747,...W0},flowTestnet:{chainId:545,...W0},gnosis:{chainId:100,name:"Gnosis",...VE},goerli:{chainId:5,...Mn},gravity:{chainId:1625,name:"Gravity",...q0},gravitySepolia:{chainId:13505,name:"Gravity Sepolia",...q0},hardhat:{chainId:31337,...KE},holesky:{chainId:17e3,...Mn},hyperevm:{chainId:999,...JE},ink:{chainId:57073,...z0},inkSepolia:{chainId:763373,...z0},kaia:{chainId:8217,name:"Kaia",...Q0},kairos:{chainId:1001,name:"Kairos",...Q0},kovan:{chainId:42,...Mn},linea:{chainId:59144,name:"Linea",...Pc},lineaGoerli:{chainId:59140,name:"Linea Goerli",...Pc},lineaSepolia:{chainId:59141,name:"Linea Sepolia",...Pc},localhost:{chainId:1337,...Mn},mainnet:{chainId:1,name:"Ethereum",...Mn},manta:{chainId:169,name:"Manta",...Oc},mantaSepolia:{chainId:3441006,...Oc},mantaTestnet:{chainId:3441005,...Oc},mantle:{chainId:5e3,...H0},mantleTestnet:{chainId:5001,...H0},monadTestnet:{chainId:10143,name:"Monad Testnet",...YE},optimism:{chainId:10,name:"Optimism",...Si},optimismGoerli:{chainId:420,...Si},optimismKovan:{chainId:69,...Si},optimismSepolia:{chainId:11155420,...Si},polygon:{chainId:137,name:"Polygon",...Tc},polygonAmoy:{chainId:80002,...Tc},polygonMumbai:{chainId:80001,...Tc},rinkeby:{chainId:4,...Mn},ronin:{chainId:2020,...XE},ropsten:{chainId:3,...Mn},sanko:{chainId:1996,name:"Sanko",...ZE},scroll:{chainId:534352,...G0},scrollSepolia:{chainId:534351,...G0},sepolia:{chainId:11155111,...Mn},superposition:{chainId:55244,name:"Superposition",...e7},unichain:{chainId:130,...V0},unichainSepolia:{chainId:1301,...V0},xdc:{chainId:50,name:"XDC",...K0},xdcTestnet:{chainId:51,...K0},zetachain:{chainId:7e3,name:"ZetaChain",...J0},zetachainAthensTestnet:{chainId:7001,name:"Zeta Athens",...J0},zkSync:{chainId:324,name:"zkSync",...Y0},zkSyncTestnet:{chainId:280,...Y0},zora:{chainId:7777777,name:"Zora",...Rc},zoraSepolia:{chainId:999999999,...Rc},zoraTestnet:{chainId:999,...Rc}},n7=Object.fromEntries(Object.values(t7).filter(jg).map(({chainId:e,...t})=>[e,t])),r7=e=>e.map(t=>{const n=n7[t.id]??{};return{...t,name:n.name??t.name,iconUrl:t.iconUrl??n.iconUrl,iconBackground:t.iconBackground??n.iconBackground}}),ld=p.createContext({chains:[]});function o7({children:e,initialChain:t}){const{chains:n}=Ne();return p.createElement(ld.Provider,{value:p.useMemo(()=>({chains:r7(n),initialChainId:typeof t=="number"?t:t==null?void 0:t.id}),[n,t])},e)}var zr=()=>p.useContext(ld).chains,s7=()=>p.useContext(ld).initialChainId,i7=()=>{const e=zr();return p.useMemo(()=>{const t={};for(const n of e)t[n.id]=n;return t},[e])},Bg=p.createContext({showBalance:void 0,setShowBalance:()=>{}});function a7({children:e}){const[t,n]=p.useState();return p.createElement(Bg.Provider,{value:{showBalance:t,setShowBalance:n}},e)}var Sg=()=>p.useContext(Bg);function c7(){const[e,t]=p.useState(!1);return p.useEffect(()=>(t(!0),()=>{t(!1)}),[]),p.useCallback(()=>e,[e])}function Pg(){const e=zr(),t=od.id;return e.some(r=>r.id===t)}function l7(e){const t=Pg(),n=o=>{try{return wA(o)}catch{}},{data:r}=wC({chainId:od.id,name:e?n(e):void 0,query:{enabled:t}});return r}async function ur(e,t){if(t={headers:{},method:"get",...t,timeout:t.timeout??1e4},!e)throw new Error("rainbowFetch: Missing url argument");const n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout),{body:o,params:s,headers:i,...a}=t,c=o&&typeof o=="object"?JSON.stringify(t.body):t.body,l=await fetch(`${e}${d7(s)}`,{...a,body:c,headers:{Accept:"application/json","Content-Type":"application/json",...i},signal:n.signal});clearTimeout(r);const u=await u7(l);if(l.ok){const{headers:h,status:g}=l;return{data:u,headers:h,status:g}}throw f7({requestBody:o,response:l,responseBody:typeof u=="string"?{error:u}:u})}function u7(e){const t=e.headers.get("Content-Type");return t!=null&&t.startsWith("application/json")?e.json():e.text()}function d7(e){return e&&Object.keys(e).length?`?${new URLSearchParams(e)}`:""}function f7({requestBody:e,response:t,responseBody:n}){const r=(n==null?void 0:n.error)||(t==null?void 0:t.statusText)||"There was an error with the request.",o=new Error(r);return o.response=t,o.responseBody=n,o.requestBody=e,o}var h7=class{constructor(e={}){const{baseUrl:t="",...n}=e;this.baseUrl=t,this.opts=n}get(e,t){return ur(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"get"})}delete(e,t){return ur(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"delete"})}head(e,t){return ur(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"head"})}options(e,t){return ur(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"options"})}post(e,t,n){return ur(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"post"})}put(e,t,n){return ur(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"put"})}patch(e,t,n){return ur(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"patch"})}};function p7({baseUrl:e,headers:t,params:n,timeout:r}){return new h7({baseUrl:e,headers:t,params:n,timeout:r})}var m7=!!(typeof process<"u"&&typeof process.env<"u"&&process.env.RAINBOW_PROVIDER_API_KEY),g7=p7({baseUrl:"https://enhanced-provider.rainbow.me",headers:{"x-api-key":typeof process<"u"&&typeof process.env<"u"&&process.env.RAINBOW_PROVIDER_API_KEY||"LzbasoBiLqltex3VkcQ7LRmL4PtfiiZ1EMJrizrgfonWN6byJReu/l6yrUoo3zLW"}});function b7(e,t,n={}){return[e,t,n]}function _i(e){return`rk-ens-name-${e}`}function y7(e){try{const t=e?JSON.parse(e):null;return typeof t=="object"?t:null}catch{return null}}function w7(e,t){if(!wt(e))return;const n=new Date,r=new Date(n.getTime()+180*6e4);localStorage.setItem(_i(e),JSON.stringify({ensName:t,expires:r.getTime()}))}function v7(e){const t=y7(localStorage.getItem(_i(e)));if(!t)return null;const{ensName:n,expires:r}=t;return typeof n!="string"||Number.isNaN(Number(r))||new Date().getTime()>Number(r)?(localStorage.removeItem(_i(e)),null):n}async function x7({address:e}){const t=v7(e);if(t)return t;const r=(await g7.get("/v1/resolve-ens",{params:{address:e}})).data.data;return r&&w7(e,r),r}function C7(e){const t=Pg(),{data:n}=vC({chainId:od.id,address:e,query:{enabled:t}}),{data:r}=F1({queryKey:b7("address",e),queryFn:()=>x7({address:e}),enabled:!t&&!!e&&m7,staleTime:10*(60*1e3),retry:1});return n||r}function Og({address:e,includeBalance:t}){const n=C7(e),r=l7(n),{data:o}=Xu({address:t?e:void 0});return{ensName:n,ensAvatar:r,balance:o}}function ud(){const{chain:e}=nt();return(e==null?void 0:e.id)??null}var Tg="rk-transactions";function A7(e){try{const t=e?JSON.parse(e):{};return typeof t=="object"?t:{}}catch{return{}}}function X0(){return A7(typeof localStorage<"u"?localStorage.getItem(Tg):null)}var E7=/^0x([A-Fa-f0-9]{64})$/;function k7(e){const t=[];return E7.test(e.hash)||t.push("Invalid transaction hash"),typeof e.description!="string"&&t.push("Transaction must have a description"),typeof e.confirmations<"u"&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}function I7({provider:e}){let t=X0(),n=e;const r=new Set,o=new Set,s=new Map;function i(C){n=C}function a(C,v){var w;return((w=t[C])==null?void 0:w[v])??[]}function c(C,v,w){const x=k7(w);if(x.length>0)throw new Error(["Unable to add transaction",...x].join(`
|
|
1731
|
+
`));d(C,v,E=>[{...w,status:"pending"},...E.filter(({hash:A})=>A!==w.hash)])}function l(C,v){d(C,v,()=>[])}function u(C,v,w,x){d(C,v,E=>E.map(A=>A.hash===w?{...A,status:x}:A))}async function f(C,v){await Promise.all(a(C,v).filter(w=>w.status==="pending").map(async w=>{const{confirmations:x,hash:E}=w,A=s.get(E);if(A)return await A;const I=n.waitForTransactionReceipt({confirmations:x,hash:E,timeout:3e5}).then(({status:S})=>{s.delete(E),S!==void 0&&(u(C,v,E,S===0||S==="reverted"?"failed":"confirmed"),m(S))}).catch(()=>{u(C,v,E,"failed")});return s.set(E,I),await I}))}function d(C,v,w){t=X0(),t[C]=t[C]??{};let x=0;const E=10,A=w(t[C][v]??[]).filter(({status:I})=>I==="pending"?!0:x++<=E);t[C][v]=A.length>0?A:void 0,h(),g(),f(C,v)}function h(){localStorage.setItem(Tg,JSON.stringify(t))}function g(){for(const C of r)C()}function m(C){for(const v of o)v(C)}function b(C){return r.add(C),()=>{r.delete(C)}}function y(C){return o.add(C),()=>{o.delete(C)}}return{addTransaction:c,clearTransactions:l,getTransactions:a,onTransactionStatus:y,onChange:b,setProvider:i,waitForPendingTransactions:f}}var Z0,Rg=p.createContext(null);function j7({children:e}){const t=xC(),{address:n}=nt(),r=ud(),{refetch:o}=Xu({address:n,query:{enabled:!1}}),[s]=p.useState(()=>Z0??(Z0=I7({provider:t}))),i=p.useCallback(a=>{a==="success"&&o()},[o]);return p.useEffect(()=>{s.setProvider(t)},[s,t]),p.useEffect(()=>{n&&r&&s.waitForPendingTransactions(n,r)},[s,n,r]),p.useEffect(()=>{if(s&&n&&r)return s.onTransactionStatus(i)},[s,n,r,i]),p.createElement(Rg.Provider,{value:s},e)}function Ng(){const e=p.useContext(Rg);if(!e)throw new Error("Transaction hooks must be used within RainbowKitProvider");return e}function Fg(){const e=Ng(),{address:t}=nt(),n=ud(),[r,o]=p.useState(()=>e&&t&&n?e.getTransactions(t,n):[]);return p.useEffect(()=>{if(e&&t&&n)return o(e.getTransactions(t,n)),e.onChange(()=>{o(e.getTransactions(t,n))})},[e,t,n]),r}var eh=e=>typeof e=="function"?e():e;function B7(e,{extends:t}={}){const n={...x0(O0,eh(e))};if(!t)return n;const r=x0(O0,eh(t));return Object.fromEntries(Object.entries(n).filter(([s,i])=>i!==r[s]))}function th(e,t={}){return Object.entries(B7(e,t)).map(([n,r])=>`${n}:${r.replace(/[:;{}</>]/g,"")};`).join("")}var Mg={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},ci=p.createContext(Mg),Dg=p.createContext(!1);function S7(e,t){let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,e()},t)}}var Lg=()=>{const[e,t]=p.useState({height:void 0,width:void 0});return p.useEffect(()=>{const n=S7(()=>{t({height:window.innerHeight,width:window.innerWidth})},500);return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),e},li=p.createContext({connector:null,setConnector:()=>{}});function P7({children:e}){const[t,n]=p.useState(null);return p.createElement(li.Provider,{value:p.useMemo(()=>({connector:t,setConnector:n}),[t])},e)}var ui={COMPACT:"compact",WIDE:"wide"},La=p.createContext(ui.WIDE);function O7({children:e,modalSize:t}){const{width:n}=Lg(),r=n&&n<kE,{connector:o}=p.useContext(li);return p.createElement(La.Provider,{value:r||o?ui.COMPACT:t},e)}var dd=p.createContext(!1),T7="rk-version";function R7({version:e}){localStorage.setItem(T7,e)}function N7(){const e=p.useCallback(()=>{R7({version:"2.2.10"})},[]);p.useEffect(()=>{e()},[e])}function F7(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]=r)}return n}function fd(){return typeof navigator<"u"&&typeof navigator.userAgent<"u"&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function M7(){return typeof document<"u"&&getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")!==""}function hd(){var t,n;if(typeof navigator>"u")return"Browser";const e=(t=navigator.userAgent)==null?void 0:t.toLowerCase();return(n=navigator.brave)!=null&&n.isBrave?"Brave":(e==null?void 0:e.indexOf("edg/"))>-1?"Edge":(e==null?void 0:e.indexOf("op"))>-1?"Opera":M7()?"Arc":(e==null?void 0:e.indexOf("chrome"))>-1?"Chrome":(e==null?void 0:e.indexOf("firefox"))>-1?"Firefox":fd()?"Safari":"Browser"}var D7=sE.UAParser(),{os:pd}=D7;function L7(){return pd.name==="Windows"}function U7(){return pd.name==="Mac OS"}function _7(){return["Ubuntu","Mint","Fedora","Debian","Arch","Linux"].includes(pd.name)}function md(){return L7()?"Windows":U7()?"macOS":_7()?"Linux":"Desktop"}var $7=e=>{var n,r,o,s,i,a,c,l,u,f,d;const t=hd();return{Arc:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.chrome,Brave:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.chrome,Chrome:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.chrome,Edge:((s=e==null?void 0:e.downloadUrls)==null?void 0:s.edge)||((i=e==null?void 0:e.downloadUrls)==null?void 0:i.chrome),Firefox:(a=e==null?void 0:e.downloadUrls)==null?void 0:a.firefox,Opera:((c=e==null?void 0:e.downloadUrls)==null?void 0:c.opera)||((l=e==null?void 0:e.downloadUrls)==null?void 0:l.chrome),Safari:(u=e==null?void 0:e.downloadUrls)==null?void 0:u.safari,Browser:(f=e==null?void 0:e.downloadUrls)==null?void 0:f.browserExtension}[t]??((d=e==null?void 0:e.downloadUrls)==null?void 0:d.browserExtension)},W7=e=>{var n,r,o;return(Ma()?(n=e==null?void 0:e.downloadUrls)==null?void 0:n.ios:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.android)??((o=e==null?void 0:e.downloadUrls)==null?void 0:o.mobile)},q7=e=>{var n,r,o,s,i;const t=md();return{Windows:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.windows,macOS:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.macos,Linux:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.linux,Desktop:(s=e==null?void 0:e.downloadUrls)==null?void 0:s.desktop}[t]??((i=e==null?void 0:e.downloadUrls)==null?void 0:i.desktop)},Ug=(e,t)=>e.some(n=>n.id===t),z7=e=>!!e.isRainbowKitConnector,nh=e=>{var t;return!!(!e.isRainbowKitConnector&&((t=e.icon)!=null&&t.replace(/\n/g,"").startsWith("data:image"))&&e.uid&&e.name)},Q7=(e,t)=>e.id==="walletConnect"&&t?{...e,walletConnectModalConnector:t}:e,H7=({wallets:e,recentWallets:t})=>[...t,...e.filter(n=>!Ug(t,n.id))],_g="rk-recent";function G7(e){try{const t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}}function $g(){return typeof localStorage<"u"?G7(localStorage.getItem(_g)):[]}function V7(e){return[...new Set(e)]}function K7(e){const t=V7([e,...$g()]);localStorage.setItem(_g,JSON.stringify(t))}function Us(e=!1){var w,x,E;const t=zr(),n=s7(),{connectAsync:r,connectors:o}=bC(),s=o,{setIsWalletConnectModalOpen:i}=fb(),a=s.map(A=>({...A,...A.rkDetails||{}}));async function c(A,I){var R,M;const S=await A.getChainId(),T=await r({...I,chainId:(I==null?void 0:I.chainId)??n??((R=t.find(({id:N})=>N===S))==null?void 0:R.id)??((M=t[0])==null?void 0:M.id),connector:A});return T&&K7(A.id),T}async function l(A){try{i(!0),await c(A),i(!1)}catch(I){const S=I.name==="UserRejectedRequestError"||I.message==="Connection request reset. Please try again.";if(i(!1),!S)throw I}}const u=async(A,I)=>{const S=await A.getProvider();return A.id==="coinbase"?S.qrUrl:new Promise(T=>S.once("display_uri",R=>{T(I(R))}))},f=a.find(A=>A.id==="walletConnect"&&A.isWalletConnectModalConnector),d=a.filter(nh).map(A=>({...A,groupIndex:0})),h=a.filter(z7).filter(A=>!A.isWalletConnectModalConnector).filter(A=>e?!d.some(S=>S.id===A.rdns):!0).map(A=>Q7(A,f)),g=[...d,...h],m=F7(g,A=>A.id),y=$g().map(A=>m[A]).filter(Boolean).slice(0,3),C=[],v=H7({wallets:g,recentWallets:y});for(const A of v){if(!A)continue;const I=nh(A),S=Ug(y,A.id);if(I){C.push({...A,iconUrl:A.icon,ready:!0,connect:c.bind(null,A),groupName:"Installed",recent:S});continue}C.push({...A,ready:A.installed??!0,connect:c.bind(null,A),desktopDownloadUrl:q7(A),extensionDownloadUrl:$7(A),groupName:A.groupName,mobileDownloadUrl:W7(A),getQrCodeUri:(w=A.qrCode)!=null&&w.getUri?()=>u(A,A.qrCode.getUri):void 0,getDesktopUri:(x=A.desktop)!=null&&x.getUri?()=>u(A,A.desktop.getUri):void 0,getMobileUri:(E=A.mobile)!=null&&E.getUri?()=>{var T;return u(A,(T=A.mobile)==null?void 0:T.getUri)}:void 0,recent:S,showWalletConnectModal:A.walletConnectModalConnector?()=>l(A.walletConnectModalConnector):void 0})}return C}var Wg=async()=>(await Promise.resolve().then(()=>require("./assets-Q6ZU7ZJ5-Dy7quYMC.js"))).default,J7=()=>un(Wg),Y7=()=>p.createElement($e,{background:"#d0d5de",borderRadius:"10",height:"48",src:Wg,width:"48"}),qg=async()=>(await Promise.resolve().then(()=>require("./login-UP3DZBGS-C-c6uz2H.js"))).default,X7=()=>un(qg),Z7=()=>p.createElement($e,{background:"#d0d5de",borderRadius:"10",height:"48",src:qg,width:"48"}),X=p.forwardRef(({as:e="div",children:t,className:n,color:r,display:o,font:s="body",id:i,size:a="16",style:c,tabIndex:l,textAlign:u="inherit",weight:f="regular",testId:d},h)=>p.createElement(j,{as:e,className:n,color:r,display:o,fontFamily:s,fontSize:a,fontWeight:f,id:i,ref:h,style:c,tabIndex:l,textAlign:u,testId:d},t));X.displayName="Text";var e4={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function tt({disabled:e=!1,href:t,label:n,onClick:r,rel:o="noreferrer noopener",size:s="medium",target:i="_blank",testId:a,type:c="primary"}){const l=c==="primary",u=s!=="large",f=We(),d=e?"actionButtonSecondaryBackground":l?"accentColor":u?"actionButtonSecondaryBackground":null,{fontSize:h,height:g,paddingX:m,paddingY:b}=e4[s],y=!f||!u;return p.createElement(j,{...t?e?{}:{as:"a",href:t,rel:o,target:i}:{as:"button",type:"button"},onClick:e?void 0:r,...y?{borderColor:f&&!u&&!l?"actionButtonBorderMobile":"actionButtonBorder",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!e&&Re({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:m,paddingY:b,style:{willChange:"transform"},testId:a,textAlign:"center",transition:"transform",...d?{background:d}:{},...g?{height:g}:{}},p.createElement(X,{color:e?"modalTextSecondary":l?"accentColorForeground":"accentColor",size:h,weight:"bold"},n))}var t4=()=>We()?p.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Close"),p.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):p.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Close"),p.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),_r=({"aria-label":e="Close",onClose:t})=>{const n=We();return p.createElement(j,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:Re({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},p.createElement(t4,null))},zg=async()=>(await Promise.resolve().then(()=>require("./sign-A7IJEUT5-BI5zSXW6.js"))).default;function n4({onClose:e,onCloseModal:t}){const{i18n:n}=p.useContext(Fe),[{status:r,...o},s]=p.useState({status:"idle"}),i=SE(),a=p.useCallback(async()=>{try{const g=await i.getNonce();s(m=>({...m,nonce:g}))}catch{s(g=>({...g,errorMessage:n.t("sign_in.message.preparing_error"),status:"idle"}))}},[i,n.t]),c=p.useRef(!1);p.useEffect(()=>{c.current||(c.current=!0,a())},[a]);const l=We(),{address:u,chain:f}=nt(),{signMessageAsync:d}=AC(),h=async()=>{try{const g=f==null?void 0:f.id,{nonce:m}=o;if(!u||!g||!m)return;s(C=>({...C,errorMessage:void 0,status:"signing"}));const b=i.createMessage({address:u,chainId:g,nonce:m});let y;try{y=await d({message:b})}catch(C){return C instanceof Ee?s(v=>({...v,status:"idle"})):s(v=>({...v,errorMessage:n.t("sign_in.signature.signing_error"),status:"idle"}))}s(C=>({...C,status:"verifying"}));try{if(await i.verify({message:b,signature:y})){t();return}throw new Error}catch{return s(C=>({...C,errorMessage:n.t("sign_in.signature.verifying_error"),status:"idle"}))}}catch{s({errorMessage:n.t("sign_in.signature.oops_error"),status:"idle"})}};return p.createElement(j,{position:"relative"},p.createElement(j,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},p.createElement(_r,{onClose:e})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:l?"60px":"36px"}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"6":"4",style:{maxWidth:l?320:280}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"32":"16"},p.createElement($e,{height:40,src:zg,width:40}),p.createElement(X,{color:"modalText",size:l?"20":"18",textAlign:"center",weight:"heavy"},n.t("sign_in.label"))),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"16":"12"},p.createElement(X,{color:"modalTextSecondary",size:l?"16":"14",textAlign:"center"},n.t("sign_in.description")),r==="idle"&&o.errorMessage?p.createElement(X,{color:"error",size:l?"16":"14",textAlign:"center",weight:"bold"},o.errorMessage):null)),p.createElement(j,{alignItems:l?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},p.createElement(tt,{disabled:!o.nonce||r==="signing"||r==="verifying",label:o.nonce?r==="signing"?n.t("sign_in.signature.waiting"):r==="verifying"?n.t("sign_in.signature.verifying"):n.t("sign_in.message.send"):n.t("sign_in.message.preparing"),onClick:h,size:l?"large":"medium",testId:"auth-message-button"}),l?p.createElement(tt,{label:"Cancel",onClick:e,size:"large",type:"secondary"}):p.createElement(j,{as:"button",borderRadius:"full",className:Re({active:"shrink",hover:"grow"}),display:"block",onClick:e,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"closeButton",size:l?"16":"14",weight:"bold"},n.t("sign_in.message.cancel"))))))}function r4(){const e=zr(),t=Us(),n=Fa()==="unauthenticated",r=p.useCallback(()=>{un(...t.map(o=>o.iconUrl),...e.map(o=>o.iconUrl).filter(jg)),We()||(J7(),X7()),n&&un(zg)},[t,e,n]);p.useEffect(()=>{r()},[r])}var Qg="WALLETCONNECT_DEEPLINK_CHOICE";function o4({mobileUri:e,name:t}){localStorage.setItem(Qg,JSON.stringify({href:e.split("?")[0],name:t}))}function s4(){localStorage.removeItem(Qg)}var Hg=p.createContext(void 0),Jl="data-rk",Gg=e=>({[Jl]:e||""}),i4=e=>{if(e&&!/^[a-zA-Z0-9_]+$/.test(e))throw new Error(`Invalid ID: ${e}`);return e?`[${Jl}="${e}"]`:`[${Jl}]`},a4=()=>{const e=p.useContext(Hg);return Gg(e)},c4=ed();function l4({appInfo:e,avatar:t,children:n,coolMode:r=!1,id:o,initialChain:s,locale:i,modalSize:a=ui.WIDE,showRecentTransactions:c=!1,theme:l=c4}){if(r4(),N7(),A1({onDisconnect:s4}),typeof l=="function")throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const u=i4(o),f={...Mg,...e},d=t??Eg;return p.createElement(o7,{initialChain:s},p.createElement(P7,null,p.createElement(HE,{locale:i},p.createElement(Dg.Provider,{value:r},p.createElement(O7,{modalSize:a},p.createElement(dd.Provider,{value:c},p.createElement(j7,null,p.createElement(kg.Provider,{value:d},p.createElement(ci.Provider,{value:f},p.createElement(Hg.Provider,{value:o},p.createElement(a7,null,p.createElement(A9,null,l?p.createElement("div",{...Gg(o)},p.createElement("style",{dangerouslySetInnerHTML:{__html:[`${u}{${th("lightMode"in l?l.lightMode:l)}}`,"darkMode"in l?`@media(prefers-color-scheme:dark){${u}{${th(l.darkMode,{extends:l.lightMode})}}}`:null].join("")}}),n):n))))))))))))}var u4="_9pm4ki5 ju367va ju367v15 ju367v8r",d4="_9pm4ki3 ju367v9h ju367vb3 ju367va ju367v2q ju367v8q",rh=(e,t)=>{const n=e.querySelectorAll("button:not(:disabled), a[href]");n.length!==0&&n[t==="end"?n.length-1:0].focus()};function f4(e){const t=p.useRef(null);return p.useEffect(()=>{const n=document.activeElement;return()=>{var r;(r=n.focus)==null||r.call(n)}},[]),p.useEffect(()=>{if(t.current){const n=t.current.querySelector("[data-auto-focus]");n?n.focus():t.current.focus()}},[]),p.createElement(p.Fragment,null,p.createElement("div",{onFocus:p.useCallback(()=>t.current&&rh(t.current,"end"),[]),tabIndex:0}),p.createElement("div",{ref:t,style:{outline:"none"},tabIndex:-1,...e}),p.createElement("div",{onFocus:p.useCallback(()=>t.current&&rh(t.current,"start"),[]),tabIndex:0}))}var h4=e=>e.stopPropagation();function la({children:e,onClose:t,open:n,titleId:r}){p.useEffect(()=>{const l=u=>n&&u.key==="Escape"&&t();return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[n,t]);const[o,s]=p.useState(!0);p.useEffect(()=>{s(getComputedStyle(window.document.body).overflow!=="hidden")},[]);const i=p.useCallback(()=>t(),[t]),a=a4(),c=We();return p.createElement(p.Fragment,null,n?Rb.createPortal(p.createElement(mg,{enabled:o},p.createElement(j,{...a},p.createElement(j,{...a,alignItems:c?"flex-end":"center","aria-labelledby":r,"aria-modal":!0,className:d4,onClick:i,position:"fixed",role:"dialog"},p.createElement(f4,{className:u4,onClick:h4,role:"document"},e)))),document.body):null)}var p4="_1ckjpok7",m4="_1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",g4="_1ckjpok4 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",b4="_1ckjpok6 ju367vq",y4="_1ckjpok3 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",w4="_1ckjpok2 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r";function ua({bottomSheetOnMobile:e=!1,children:t,marginTop:n,padding:r="16",paddingBottom:o,wide:s=!1}){const i=We(),c=p.useContext(La)===ui.COMPACT;return p.createElement(j,{marginTop:n},p.createElement(j,{className:[s?i?w4:c?g4:y4:m4,i?b4:null,i&&e?p4:null].join(" ")},p.createElement(j,{padding:r,paddingBottom:o??r},t)))}var oh=["k","m","b","t"];function Pi(e,t=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${t}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function Vg(e){if(e<1)return Pi(e,3);if(e<10**2)return Pi(e,2);if(e<10**4)return new Intl.NumberFormat().format(Number.parseFloat(Pi(e,1)));const t=10**1;let n=String(e);for(let r=oh.length-1;r>=0;r--){const o=10**((r+1)*3);if(o<=e){e=e*t/o/t,n=Pi(e,1)+oh[r];break}}return n}function Kg(e){return e.length<8?e:`${e.substring(0,4)}…${e.substring(e.length-4)}`}function Jg(e){if(!e)return"";const t=e.split("."),n=t.pop();return t.join(".").length>24?`${t.join(".").substring(0,24)}...`:`${t.join(".")}.${n}`}var v4=()=>p.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Copied"),p.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),x4=()=>p.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Copy"),p.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),C4=()=>p.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Disconnect"),p.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));function A4(){const e=Ng(),{address:t}=nt(),n=ud();return p.useCallback(()=>{if(!t||!n)throw new Error("No address or chain ID found");e.clearTransactions(t,n)},[e,t,n])}var Yg=e=>{var t,n;return(n=(t=e==null?void 0:e.blockExplorers)==null?void 0:t.default)==null?void 0:n.url},Xg=()=>p.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Link"),p.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),E4=()=>p.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Cancel"),p.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),k4=()=>p.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Success"),p.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"})),I4=e=>{switch(e){case"pending":return Ls;case"confirmed":return k4;case"failed":return E4;default:return Ls}};function j4({tx:e}){const t=We(),n=I4(e.status),r=e.status==="failed"?"error":"accentColor",{chain:o}=nt(),s=e.status==="confirmed"?"Confirmed":e.status==="failed"?"Failed":"Pending",i=Yg(o);return p.createElement(p.Fragment,null,p.createElement(j,{...i?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:Re({active:"shrink"}),href:`${i}/tx/${e.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:t?"16":"14"},p.createElement(j,{color:r},p.createElement(n,null)),p.createElement(j,{display:"flex",flexDirection:"column",gap:t?"3":"1"},p.createElement(j,null,p.createElement(X,{color:"modalText",font:"body",size:t?"16":"14",weight:"bold"},e==null?void 0:e.description)),p.createElement(j,null,p.createElement(X,{color:e.status==="pending"?"modalTextSecondary":r,font:"body",size:"14",weight:t?"medium":"regular"},s)))),i&&p.createElement(j,{alignItems:"center",color:"modalTextDim",display:"flex"},p.createElement(Xg,null))))}var B4=3;function S4({address:e}){const t=Fg(),n=A4(),{chain:r}=nt(),o=Yg(r),s=t.slice(0,B4),i=s.length>0,a=We(),{appName:c}=p.useContext(ci),{i18n:l}=p.useContext(Fe);return p.createElement(p.Fragment,null,p.createElement(j,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:a?"8":"18"},i&&p.createElement(j,{paddingBottom:a?"4":"0",paddingTop:"8",paddingX:a?"12":"6"},p.createElement(j,{display:"flex",justifyContent:"space-between"},p.createElement(X,{color:"modalTextSecondary",size:a?"16":"14",weight:"semibold"},l.t("profile.transactions.recent.title")),p.createElement(j,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},p.createElement(j,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:Re({active:"shrink"}),onClick:n,paddingX:a?"8":"12",paddingY:a?"4":"5",transition:"default",type:"button"},p.createElement(X,{color:"modalTextSecondary",size:a?"16":"14",weight:"semibold"},l.t("profile.transactions.clear.label")))))),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},i?s.map(u=>p.createElement(j4,{key:u.hash,tx:u})):p.createElement(p.Fragment,null,p.createElement(j,{padding:a?"12":"8"},p.createElement(X,{color:"modalTextDim",size:a?"16":"14",weight:a?"medium":"bold"},c?l.t("profile.transactions.description",{appName:c}):l.t("profile.transactions.description_fallback"))),a&&p.createElement(j,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),o&&p.createElement(j,{paddingBottom:"18",paddingX:a?"8":"18"},p.createElement(j,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:Re({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${o}/address/${e}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...a?{paddingLeft:"12"}:{}},p.createElement(X,{color:"modalText",font:"body",size:a?"16":"14",weight:a?"semibold":"bold"},l.t("profile.explorer.label")),p.createElement(Xg,null))))}function sh({action:e,icon:t,label:n,testId:r,url:o}){const s=We();return p.createElement(j,{...o?{as:"a",href:o,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...s?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:Re({active:"shrinkSm",hover:s?void 0:"grow"}),display:"flex",onClick:e,padding:s?"6":"8",style:{willChange:"transform"},testId:r,transition:"default",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},p.createElement(j,{color:"modalText",height:"max"},t),p.createElement(j,null,p.createElement(X,{color:"modalText",size:s?"12":"13",weight:"semibold"},n))))}function P4({address:e,ensAvatar:t,ensName:n,balance:r,onClose:o,onDisconnect:s}){const i=p.useContext(dd),[a,c]=p.useState(!1),l=p.useCallback(()=>{e&&(navigator.clipboard.writeText(e),c(!0))},[e]);if(p.useEffect(()=>{if(a){const b=setTimeout(()=>{c(!1)},1500);return()=>clearTimeout(b)}},[a]),!e)return null;const u=n?Jg(n):Kg(e),f=r==null?void 0:r.formatted,d=f?Vg(Number.parseFloat(f)):void 0,h="rk_profile_title",g=We(),{i18n:m}=p.useContext(Fe);return p.createElement(p.Fragment,null,p.createElement(j,{display:"flex",flexDirection:"column"},p.createElement(j,{background:"profileForeground",padding:"16"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:g?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},p.createElement(j,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},p.createElement(_r,{onClose:o}))," ",p.createElement(j,{marginTop:g?"24":"0"},p.createElement(Ig,{address:e,imageUrl:t,size:g?82:74})),p.createElement(j,{display:"flex",flexDirection:"column",gap:g?"4":"0",textAlign:"center"},p.createElement(j,{textAlign:"center"},p.createElement(X,{as:"h1",color:"modalText",id:h,size:g?"20":"18",weight:"heavy"},u)),!!r&&p.createElement(j,{textAlign:"center"},p.createElement(X,{as:"h1",color:"modalTextSecondary",id:h,size:g?"16":"14",weight:"semibold"},d," ",r.symbol)))),p.createElement(j,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},p.createElement(sh,{action:l,icon:a?p.createElement(v4,null):p.createElement(x4,null),label:a?m.t("profile.copy_address.copied"):m.t("profile.copy_address.label")}),p.createElement(sh,{action:s,icon:p.createElement(C4,null),label:m.t("profile.disconnect.label"),testId:"disconnect-button"}))),i&&p.createElement(p.Fragment,null,p.createElement(j,{background:"generalBorder",height:"1",marginTop:"-1"}),p.createElement(j,null,p.createElement(S4,{address:e})))))}function O4({onClose:e,open:t}){const{address:n}=nt(),{balance:r,ensAvatar:o,ensName:s}=Og({address:n,includeBalance:t}),{disconnect:i}=Zu();return n?p.createElement(p.Fragment,null,n&&p.createElement(la,{onClose:e,open:t,titleId:"rk_account_modal_title"},p.createElement(ua,{bottomSheetOnMobile:!0,padding:"0"},p.createElement(P4,{address:n,ensAvatar:o,ensName:s,balance:r,onClose:e,onDisconnect:i})))):null}var T4=({size:e})=>p.createElement("svg",{fill:"none",height:e,viewBox:"0 0 28 28",width:e,xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Disconnect"),p.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),R4="v9horb0",gd=p.forwardRef(({children:e,currentlySelected:t=!1,onClick:n,testId:r,...o},s)=>{const i=We();return p.createElement(j,{as:"button",borderRadius:"menuButton",disabled:t,display:"flex",onClick:n,ref:s,testId:r,type:"button"},p.createElement(j,{borderRadius:"menuButton",className:[i?R4:void 0,!t&&Re({active:"shrink"})],padding:i?"8":"6",transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...o},e))});gd.displayName="MenuButton";var N4=({chainId:e,currentChainId:t,switchChain:n,chainIconSize:r,isLoading:o,src:s,name:i,iconBackground:a,idx:c})=>{const l=We(),{i18n:u}=p.useContext(Fe),f=zr(),d=t===e;return p.createElement(p.Fragment,null,p.createElement(gd,{currentlySelected:d,onClick:d?void 0:()=>n({chainId:e}),testId:`chain-option-${e}`},p.createElement(j,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:r},s&&p.createElement(j,{height:"full",marginRight:"8"},p.createElement($e,{alt:i,background:a,borderRadius:"full",height:r,src:s,width:r,testId:`chain-option-${e}-icon`})),p.createElement("div",null,i??i)),d&&p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},p.createElement(X,{color:"accentColorForeground",size:"14",weight:"medium"},u.t("chains.connected")),p.createElement(j,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),o&&p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},p.createElement(X,{color:"modalText",size:"14",weight:"medium"},u.t("chains.confirm")),p.createElement(j,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),l&&c<f.length-1&&p.createElement(j,{background:"generalBorderDim",height:"1",marginX:"8"}))},F4=N4,M4="_18dqw9x0",D4="_18dqw9x1";function L4({onClose:e,open:t}){const{chainId:n}=nt(),{chains:r}=Ne(),[o,s]=p.useState(null),{switchChain:i}=EC({mutation:{onMutate:({chainId:g})=>{s(g)},onSuccess:()=>{o&&s(null)},onError:()=>{o&&s(null)},onSettled:()=>{e()}}}),{i18n:a}=p.useContext(Fe),{disconnect:c}=Zu(),l="rk_chain_modal_title",u=We(),f=r.some(g=>g.id===n),d=u?"36":"28",h=zr();return n?p.createElement(la,{onClose:e,open:t,titleId:l},p.createElement(ua,{bottomSheetOnMobile:!0,paddingBottom:"0"},p.createElement(j,{display:"flex",flexDirection:"column",gap:"14"},p.createElement(j,{display:"flex",flexDirection:"row",justifyContent:"space-between"},u&&p.createElement(j,{width:"30"}),p.createElement(j,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},p.createElement(X,{as:"h1",color:"modalText",id:l,size:u?"20":"18",weight:"heavy"},a.t("chains.title"))),p.createElement(_r,{onClose:e})),!f&&p.createElement(j,{marginX:"8",textAlign:u?"center":"left"},p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},a.t("chains.wrong_network"))),p.createElement(j,{className:u?D4:M4,display:"flex",flexDirection:"column",gap:"4",padding:"2",paddingBottom:"16"},h.map(({iconBackground:g,iconUrl:m,id:b,name:y},C)=>p.createElement(F4,{key:b,chainId:b,currentChainId:n,switchChain:i,chainIconSize:d,isLoading:o===b,src:m,name:y,iconBackground:g,idx:C})),!f&&p.createElement(p.Fragment,null,p.createElement(j,{background:"generalBorderDim",height:"1",marginX:"8"}),p.createElement(gd,{onClick:()=>c(),testId:"chain-option-disconnect"},p.createElement(j,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:d},p.createElement(j,{alignItems:"center",color:"error",height:d,justifyContent:"center",marginRight:"8"},p.createElement(T4,{size:Number(d)})),p.createElement("div",null,a.t("chains.disconnect"))))))))))):null}function U4(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]||(n[o]=[]),n[o].push(r))}return n}var bd=({children:e,href:t})=>p.createElement(j,{as:"a",color:"accentColor",href:t,rel:"noreferrer",target:"_blank"},e),yd=({children:e})=>p.createElement(X,{color:"modalTextSecondary",size:"12",weight:"medium"},e);function ih({compactModeEnabled:e=!1,getWallet:t}){const{disclaimer:n,learnMoreUrl:r}=p.useContext(ci),{i18n:o}=p.useContext(Fe);return p.createElement(p.Fragment,null,p.createElement(j,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},p.createElement(j,{marginBottom:"10"},!e&&p.createElement(X,{color:"modalText",size:"18",weight:"heavy"},o.t("intro.title"))),p.createElement(j,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},p.createElement(j,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},p.createElement(Y7,null)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},o.t("intro.digital_asset.title")),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.digital_asset.description")))),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},p.createElement(j,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},p.createElement(Z7,null)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},o.t("intro.login.title")),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.login.description"))))),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},p.createElement(tt,{label:o.t("intro.get.label"),onClick:t}),p.createElement(j,{as:"a",className:Re({active:"shrink",hover:"grow"}),display:"block",href:r,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},o.t("intro.learn_more.label")))),n&&!e&&p.createElement(j,{marginBottom:"8",marginTop:"12",textAlign:"center"},p.createElement(n,{Link:bd,Text:yd}))))}var Zg=()=>p.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Back"),p.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),_4=()=>p.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,"Info"),p.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),$4=({"aria-label":e="Info",onClick:t})=>{const n=We();return p.createElement(j,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:Re({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},p.createElement(_4,null))},eb=e=>{const t=p.useRef(null),n=p.useContext(Dg),r=Da(e);return p.useEffect(()=>{if(n&&t.current&&r)return q4(t.current,r)},[n,r]),t},W4=()=>{const e="_rk_coolMode",t=document.getElementById(e);if(t)return t;const n=document.createElement("div");return n.setAttribute("id",e),n.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(n),n},ah=0;function q4(e,t){ah++;const n=[15,20,25,35,45],r=35;let o=[],s=!1,i=0,a=0;const c=W4();function l(){const w=n[Math.floor(Math.random()*n.length)],x=Math.random()*10,E=Math.random()*25,A=Math.random()*360,I=Math.random()*35*(Math.random()<=.5?-1:1),S=a-w/2,T=i-w/2,R=Math.random()<=.5?-1:1,M=document.createElement("div");M.innerHTML=`<img src="${t}" width="${w}" height="${w}" style="border-radius: 25%">`,M.setAttribute("style",["position:absolute","will-change:transform",`top:${S}px`,`left:${T}px`,`transform:rotate(${A}deg)`].join(";")),c.appendChild(M),o.push({direction:R,element:M,left:T,size:w,speedHorz:x,speedUp:E,spinSpeed:I,spinVal:A,top:S})}function u(){for(const w of o)w.left=w.left-w.speedHorz*w.direction,w.top=w.top-w.speedUp,w.speedUp=Math.min(w.size,w.speedUp-1),w.spinVal=w.spinVal+w.spinSpeed,w.top>=Math.max(window.innerHeight,document.body.clientHeight)+w.size&&(o=o.filter(x=>x!==w),w.element.remove()),w.element.setAttribute("style",["position:absolute","will-change:transform",`top:${w.top}px`,`left:${w.left}px`,`transform:rotate(${w.spinVal}deg)`].join(";"))}let f;function d(){s&&o.length<r&&l(),u(),f=requestAnimationFrame(d)}d();const h="ontouchstart"in window||navigator.msMaxTouchPoints,g=h?"touchstart":"mousedown",m=h?"touchend":"mouseup",b=h?"touchmove":"mousemove",y=w=>{var x,E;"touches"in w?(i=(x=w.touches)==null?void 0:x[0].clientX,a=(E=w.touches)==null?void 0:E[0].clientY):(i=w.clientX,a=w.clientY)},C=w=>{y(w),s=!0},v=()=>{s=!1};return e.addEventListener(b,y,{passive:!1}),e.addEventListener(g,C),e.addEventListener(m,v),e.addEventListener("mouseleave",v),()=>{e.removeEventListener(b,y),e.removeEventListener(g,C),e.removeEventListener(m,v),e.removeEventListener("mouseleave",v);const w=setInterval(()=>{f&&o.length===0&&(cancelAnimationFrame(f),clearInterval(w),--ah===0&&c.remove())},500)}}var z4="g5kl0l0",tb=({as:e="button",currentlySelected:t=!1,iconBackground:n,iconUrl:r,name:o,onClick:s,ready:i,recent:a,testId:c,isRainbowKitConnector:l,...u})=>{const f=eb(r),[d,h]=p.useState(!1),{i18n:g}=p.useContext(Fe);return p.createElement(j,{display:"flex",flexDirection:"column",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),ref:f},p.createElement(j,{as:e,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:t?void 0:[z4,Re({active:"shrink"})],disabled:t,onClick:s,padding:"5",style:{willChange:"transform"},testId:c,transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...u},p.createElement(j,{color:t?"accentColorForeground":"modalText",disabled:!i,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},p.createElement($e,{background:n,...!d&&l?{borderColor:"actionButtonBorder"}:{},useAsImage:!l,borderRadius:"6",height:"28",src:r,width:"28"}),p.createElement(j,null,p.createElement(j,{style:{marginTop:a?-2:void 0},maxWidth:"200"},o),a&&p.createElement(X,{color:t?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"medium"},g.t("connect.recent")))))))};tb.displayName="ModalSelection";var Q4="rk-latest-id";function H4(e){localStorage.setItem(Q4,e)}var Nc=(e,t=1)=>{let n=e.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=Number.parseInt(n.substring(0,2),16),o=Number.parseInt(n.substring(2,4),16),s=Number.parseInt(n.substring(4,6),16);return t>1&&t<=100&&(t=t/100),`rgba(${r},${o},${s},${t})`},G4=e=>e?[Nc(e,.2),Nc(e,.14),Nc(e,.1)]:null,V4=e=>/^#([0-9a-f]{3}){1,2}$/i.test(e),nb=async()=>(await Promise.resolve().then(()=>require("./connect-UA7M4XW6-BCDqQn-T.js"))).default,K4=()=>un(nb),J4=()=>p.createElement($e,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:nb,width:"48"}),rb=async()=>(await Promise.resolve().then(()=>require("./create-FASO7PVG-DaZC1z5H.js"))).default,ob=()=>un(rb),Y4=()=>p.createElement($e,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:rb,width:"48"}),sb=async()=>(await Promise.resolve().then(()=>require("./refresh-S4T5V5GX-BZCZ2pAn.js"))).default,X4=()=>un(sb),Z4=()=>p.createElement($e,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:sb,width:"48"}),ib=async()=>(await Promise.resolve().then(()=>require("./scan-4UYSQ56Q-DqVlbE3J.js"))).default,ab=()=>un(ib),e9=()=>p.createElement($e,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:ib,width:"48"}),t9="_1vwt0cg0",n9="_1vwt0cg2 ju367v7a ju367v7v",r9="_1vwt0cg3",o9="_1vwt0cg4";function cb({ecc:e="medium",logoBackground:t,logoSize:n=50,logoUrl:r,size:o=200,uri:s}){const i="20",a=o-Number.parseInt(i,10)*2,c=Da(r);return p.createElement(j,{borderColor:"generalBorder",borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:t9,padding:i,width:"max"},p.createElement(j,{style:{height:a,userSelect:"none",width:a},userSelect:"none"},p.createElement(rn.Root,{errorCorrection:e,size:a,value:s},p.createElement(rn.Cells,{radius:1}),p.createElement(rn.Finder,{radius:.25}),c&&p.createElement(rn.Arena,null,p.createElement("img",{alt:"Wallet Logo",src:c,style:{objectFit:"cover",height:"88%",width:"88%",borderRadius:"22.5%",backgroundColor:t}})))))}var lb=async()=>{switch(hd()){case"Arc":return(await Promise.resolve().then(()=>require("./Arc-VDBY7LNS-m3oU4SFX.js"))).default;case"Brave":return(await Promise.resolve().then(()=>require("./Brave-BRAKJXDS-B9q28yrX.js"))).default;case"Chrome":return(await Promise.resolve().then(()=>require("./Chrome-65Q5P54Y-9eqcWmOm.js"))).default;case"Edge":return(await Promise.resolve().then(()=>require("./Edge-XSPUTORV-B8kHPG9e.js"))).default;case"Firefox":return(await Promise.resolve().then(()=>require("./Firefox-AAHGJQIP-BtlH2zVc.js"))).default;case"Opera":return(await Promise.resolve().then(()=>require("./Opera-KQZLSACL-BY-yTZwm.js"))).default;case"Safari":return(await Promise.resolve().then(()=>require("./Safari-ZPL37GXR-BAHe1sxY.js"))).default;default:return(await Promise.resolve().then(()=>require("./Browser-76IHF3Y2-BR3yRO0Q.js"))).default}},s9=()=>un(lb),ub=async()=>{switch(md()){case"Windows":return(await Promise.resolve().then(()=>require("./Windows-PPTHQER6-BtXwY24K.js"))).default;case"macOS":return(await Promise.resolve().then(()=>require("./Macos-MW4AE7LN-34pmNxSL.js"))).default;case"Linux":return(await Promise.resolve().then(()=>require("./Linux-OO4TNCLJ-BzSRqE5q.js"))).default;default:return(await Promise.resolve().then(()=>require("./Linux-OO4TNCLJ-BzSRqE5q.js"))).default}},i9=()=>un(ub);function a9({getWalletDownload:e,compactModeEnabled:t}){const r=Us().filter(s=>s.isRainbowKitConnector).splice(0,5),{i18n:o}=p.useContext(Fe);return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},r==null?void 0:r.filter(s=>{var i;return s.extensionDownloadUrl||s.desktopDownloadUrl||s.qrCode&&((i=s.downloadUrls)==null?void 0:i.qrCode)}).map(s=>{const{downloadUrls:i,iconBackground:a,iconUrl:c,id:l,name:u,qrCode:f}=s,d=(i==null?void 0:i.qrCode)&&f,h=!!s.extensionDownloadUrl,g=(i==null?void 0:i.qrCode)&&h,m=(i==null?void 0:i.qrCode)&&!!s.desktopDownloadUrl;return p.createElement(j,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:s.id,width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},p.createElement($e,{background:a,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:c,width:"48"}),p.createElement(j,{display:"flex",flexDirection:"column",gap:"2"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},u),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},g?o.t("get.mobile_and_extension.description"):m?o.t("get.mobile_and_desktop.description"):d?o.t("get.mobile.description"):h?o.t("get.extension.description"):null))),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(tt,{label:o.t("get.action.label"),onClick:()=>e(l),type:"secondary"})))})),p.createElement(j,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},o.t("get.looking_for.title")),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},t?o.t("get.looking_for.desktop.compact_description"):o.t("get.looking_for.desktop.wide_description"))))}var Fc="44";function c9({changeWalletStep:e,compactModeEnabled:t,connectionError:n,onClose:r,qrCodeUri:o,reconnect:s,wallet:i}){const{downloadUrls:a,iconBackground:c,iconUrl:l,name:u,qrCode:f,ready:d,showWalletConnectModal:h,getDesktopUri:g}=i,m=!!g,b=fd(),{i18n:y}=p.useContext(Fe),C=!!i.extensionDownloadUrl,v=(a==null?void 0:a.qrCode)&&C,w=(a==null?void 0:a.qrCode)&&!!i.desktopDownloadUrl,x=f&&o,E=async()=>{const T=await(g==null?void 0:g());window.open(T,b?"_blank":"_self")},A=h?{description:t?y.t("connect.walletconnect.description.compact"):y.t("connect.walletconnect.description.full"),label:y.t("connect.walletconnect.open.label"),onClick:()=>{r(),h()}}:x?{description:y.t("connect.secondary_action.get.description",{wallet:u}),label:y.t("connect.secondary_action.get.label"),onClick:()=>e(v||w?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:I}=Lg(),S=I&&I<768;return p.useEffect(()=>{s9(),i9()},[]),p.createElement(j,{display:"flex",flexDirection:"column",height:"full",width:"full"},x?p.createElement(j,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},p.createElement(cb,{logoBackground:c,logoSize:t?60:72,logoUrl:l,size:t?318:S?Math.max(280,Math.min(I-308,382)):382,uri:o})):p.createElement(j,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},p.createElement(j,{borderRadius:"10",height:Fc,overflow:"hidden"},p.createElement($e,{useAsImage:!i.isRainbowKitConnector,height:Fc,src:l,width:Fc})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},p.createElement(X,{color:"modalText",size:"18",weight:"bold"},d?y.t("connect.status.opening",{wallet:u}):C?y.t("connect.status.not_installed",{wallet:u}):y.t("connect.status.not_available",{wallet:u})),!d&&C?p.createElement(j,{paddingTop:"20"},p.createElement(tt,{href:i.extensionDownloadUrl,label:y.t("connect.secondary_action.install.label"),type:"secondary"})):null,d&&!x&&p.createElement(p.Fragment,null,p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},p.createElement(X,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"medium"},y.t("connect.status.confirm"))),p.createElement(j,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},n?p.createElement(tt,{label:y.t("connect.secondary_action.retry.label"),onClick:async()=>{m&&E(),s(i)}}):p.createElement(j,{color:"modalTextSecondary"},p.createElement(Ls,null))))))),p.createElement(j,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},d&&A&&p.createElement(p.Fragment,null,p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},A.description),p.createElement(tt,{label:A.label,onClick:A.onClick,type:"secondary"}))))}var Mc=({actionLabel:e,description:t,iconAccent:n,iconBackground:r,iconUrl:o,isCompact:s,onAction:i,title:a,url:c,variant:l})=>{const u=l==="browser",f=!u&&n&&G4(n);return p.createElement(j,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:s?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},p.createElement(j,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),u&&p.createElement(j,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},p.createElement(j,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},p.createElement(j,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},p.createElement($e,{borderRadius:"full",height:"200",src:o,width:"200"})),p.createElement(j,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},p.createElement($e,{borderRadius:"full",height:"200",src:o,width:"200"})))),!u&&f&&p.createElement(j,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},p.createElement(j,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[0]} 0%, ${f[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),p.createElement(j,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),p.createElement(j,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},p.createElement(j,null,p.createElement($e,{height:"60",src:o,width:"60",...r?{background:r,borderColor:"generalBorder",borderRadius:"10"}:null})),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},a),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},t),p.createElement(j,{marginTop:"14",width:"max"},p.createElement(tt,{href:c,label:e,onClick:i,size:"medium"})))))};function l9({changeWalletStep:e,wallet:t}){const n=hd(),r=md(),s=p.useContext(La)==="compact",{desktop:i,desktopDownloadUrl:a,extension:c,extensionDownloadUrl:l,mobileDownloadUrl:u}=t,{i18n:f}=p.useContext(Fe);return p.useEffect(()=>{ob(),ab(),X4(),K4()},[]),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},l&&p.createElement(Mc,{actionLabel:f.t("get_options.extension.download.label",{browser:n}),description:f.t("get_options.extension.description"),iconUrl:lb,isCompact:s,onAction:()=>e(c!=null&&c.instructions?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:f.t("get_options.extension.title",{wallet:t.name,browser:n}),url:l,variant:"browser"}),a&&p.createElement(Mc,{actionLabel:f.t("get_options.desktop.download.label",{platform:r}),description:f.t("get_options.desktop.description"),iconUrl:ub,isCompact:s,onAction:()=>e(i!=null&&i.instructions?"INSTRUCTIONS_DESKTOP":"CONNECT"),title:f.t("get_options.desktop.title",{wallet:t.name,platform:r}),url:a,variant:"desktop"}),u&&p.createElement(Mc,{actionLabel:f.t("get_options.mobile.download.label",{wallet:t.name}),description:f.t("get_options.mobile.description"),iconAccent:t.iconAccent,iconBackground:t.iconBackground,iconUrl:t.iconUrl,isCompact:s,onAction:()=>{e("DOWNLOAD")},title:f.t("get_options.mobile.title",{wallet:t.name}),variant:"app"})))}function u9({changeWalletStep:e,wallet:t}){const{downloadUrls:n,qrCode:r}=t,{i18n:o}=p.useContext(Fe);return p.useEffect(()=>{ob(),ab()},[]),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},p.createElement(j,{style:{maxWidth:220,textAlign:"center"}},p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"semibold"},o.t("get_mobile.description"))),p.createElement(j,{height:"full"},n!=null&&n.qrCode?p.createElement(cb,{logoSize:0,size:268,uri:n.qrCode}):null),p.createElement(j,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},p.createElement(tt,{label:o.t("get_mobile.continue.label"),onClick:()=>e(r!=null&&r.instructions?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var Bn={connect:()=>p.createElement(J4,null),create:()=>p.createElement(Y4,null),install:e=>p.createElement($e,{background:e.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:e.iconUrl,width:"48"}),refresh:()=>p.createElement(Z4,null),scan:()=>p.createElement(e9,null)};function d9({connectWallet:e,wallet:t}){var r,o,s,i;const{i18n:n}=p.useContext(Fe);return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},p.createElement(j,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.qrCode)==null?void 0:r.instructions)==null?void 0:o.steps.map((a,c)=>{var l;return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:c},p.createElement(j,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(l=Bn[a.step])==null?void 0:l.call(Bn,t)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},n.t(a.title,void 0,{rawKeyIfTranslationMissing:!0})),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(a.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},p.createElement(tt,{label:n.t("get_instructions.mobile.connect.label"),onClick:()=>e(t)}),p.createElement(j,{as:"a",className:Re({active:"shrink",hover:"grow"}),display:"block",href:(i=(s=t==null?void 0:t.qrCode)==null?void 0:s.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.mobile.learn_more.label")))))}function f9({wallet:e}){var n,r,o,s;const{i18n:t}=p.useContext(Fe);return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},p.createElement(j,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(r=(n=e==null?void 0:e.extension)==null?void 0:n.instructions)==null?void 0:r.steps.map((i,a)=>{var c;return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:a},p.createElement(j,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(c=Bn[i.step])==null?void 0:c.call(Bn,e)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},t.t(i.title,void 0,{rawKeyIfTranslationMissing:!0})),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},t.t(i.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},p.createElement(tt,{label:t.t("get_instructions.extension.refresh.label"),onClick:window.location.reload.bind(window.location)}),p.createElement(j,{as:"a",className:Re({active:"shrink",hover:"grow"}),display:"block",href:(s=(o=e==null?void 0:e.extension)==null?void 0:o.instructions)==null?void 0:s.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},t.t("get_instructions.extension.learn_more.label")))))}function h9({connectWallet:e,wallet:t}){var r,o,s,i;const{i18n:n}=p.useContext(Fe);return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},p.createElement(j,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.desktop)==null?void 0:r.instructions)==null?void 0:o.steps.map((a,c)=>{var l;return p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:c},p.createElement(j,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(l=Bn[a.step])==null?void 0:l.call(Bn,t)),p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},p.createElement(X,{color:"modalText",size:"14",weight:"bold"},n.t(a.title,void 0,{rawKeyIfTranslationMissing:!0})),p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(a.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},p.createElement(tt,{label:n.t("get_instructions.desktop.connect.label"),onClick:()=>e(t)}),p.createElement(j,{as:"a",className:Re({active:"shrink",hover:"grow"}),display:"block",href:(i=(s=t==null?void 0:t.desktop)==null?void 0:s.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.desktop.learn_more.label")))))}function p9({onClose:e}){const t="rk_connect_title",[n,r]=p.useState(),[o,s]=p.useState(),[i,a]=p.useState(),c=!!(o!=null&&o.qrCode)&&i,[l,u]=p.useState(!1),d=p.useContext(La)===ui.COMPACT,{disclaimer:h}=p.useContext(ci),{i18n:g}=p.useContext(Fe),m=fd(),b=p.useRef(!1),{connector:y}=p.useContext(li),v=Us(!y).filter(H=>H.ready||!!H.extensionDownloadUrl).sort((H,Q)=>H.groupIndex-Q.groupIndex),w=Us(),x=U4(v,H=>H.groupName),E=["Recommended","Other","Popular","More","Others","Installed"];p.useEffect(()=>{y&&!b.current&&(N("CONNECT"),T(y),b.current=!0)},[y]);const A=H=>{var Q,oe;u(!1),H.ready&&((oe=(Q=H==null?void 0:H.connect)==null?void 0:Q.call(H))==null||oe.catch(()=>{u(!0)}))},I=async H=>{const Q=v.find(oe=>H.id===oe.id);Q!=null&&Q.getDesktopUri&&setTimeout(async()=>{var ae;const oe=await((ae=Q==null?void 0:Q.getDesktopUri)==null?void 0:ae.call(Q));oe&&window.open(oe,m?"_blank":"_self")},0)},S=async H=>{var ae;const Q=v.find(Ie=>H.id===Ie.id),oe=await((ae=Q==null?void 0:Q.getQrCodeUri)==null?void 0:ae.call(Q));a(oe),setTimeout(()=>{s(Q),N("CONNECT")},oe?0:50)},T=async H=>{H4(H.id),H.ready&&(S(H),I(H)),A(H),r(H.id),H.ready||(s(H),N(H!=null&&H.extensionDownloadUrl?"DOWNLOAD_OPTIONS":"CONNECT"))},R=H=>{var Oe;const Q=w.find(Se=>H===Se.id),oe=(Oe=Q==null?void 0:Q.downloadUrls)==null?void 0:Oe.qrCode,ae=!!(Q!=null&&Q.desktopDownloadUrl),Ie=!!(Q!=null&&Q.extensionDownloadUrl);s(Q),N(oe&&(Ie||ae)?"DOWNLOAD_OPTIONS":oe?"DOWNLOAD":ae?"INSTRUCTIONS_DESKTOP":"INSTRUCTIONS_EXTENSION")},M=()=>{r(void 0),s(void 0),a(void 0)},N=(H,Q=!1)=>{Q&&H==="GET"&&q==="GET"?M():!Q&&H==="GET"?P("GET"):!Q&&H==="CONNECT"&&P("CONNECT"),_(H)},[q,P]=p.useState("NONE"),[D,_]=p.useState("NONE");let F=null,U=null,W=null,ne;p.useEffect(()=>{u(!1)},[D,o]);const xe=!!(!!(o!=null&&o.extensionDownloadUrl)&&(o!=null&&o.mobileDownloadUrl));switch(D){case"NONE":F=p.createElement(ih,{getWallet:()=>N("GET")});break;case"LEARN_COMPACT":F=p.createElement(ih,{compactModeEnabled:d,getWallet:()=>N("GET")}),U=g.t("intro.title"),W="NONE";break;case"GET":F=p.createElement(a9,{getWalletDownload:R,compactModeEnabled:d}),U=g.t("get.title"),W=d?"LEARN_COMPACT":"NONE";break;case"CONNECT":F=o&&p.createElement(c9,{changeWalletStep:N,compactModeEnabled:d,connectionError:l,onClose:e,qrCodeUri:i,reconnect:A,wallet:o}),U=c&&(o.name==="WalletConnect"?g.t("connect_scan.fallback_title"):g.t("connect_scan.title",{wallet:o.name})),W=d?y?null:"NONE":null,ne=d?y?()=>{}:M:()=>{};break;case"DOWNLOAD_OPTIONS":F=o&&p.createElement(l9,{changeWalletStep:N,wallet:o}),U=o&&g.t("get_options.short_title",{wallet:o.name}),W=y?"CONNECT":d?"NONE":q;break;case"DOWNLOAD":F=o&&p.createElement(u9,{changeWalletStep:N,wallet:o}),U=o&&g.t("get_mobile.title",{wallet:o.name}),W=xe?"DOWNLOAD_OPTIONS":q;break;case"INSTRUCTIONS_MOBILE":F=o&&p.createElement(d9,{connectWallet:T,wallet:o}),U=o&&g.t("get_options.title",{wallet:d&&o.shortName||o.name}),W="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":F=o&&p.createElement(f9,{wallet:o}),U=o&&g.t("get_options.title",{wallet:d&&o.shortName||o.name}),W="DOWNLOAD_OPTIONS";break;case"INSTRUCTIONS_DESKTOP":F=o&&p.createElement(h9,{connectWallet:T,wallet:o}),U=o&&g.t("get_options.title",{wallet:d&&o.shortName||o.name}),W="DOWNLOAD_OPTIONS";break}return p.createElement(j,{display:"flex",flexDirection:"row",style:{maxHeight:d?468:504}},(d?D==="NONE":!0)&&p.createElement(j,{className:d?o9:r9,display:"flex",flexDirection:"column",marginTop:"16"},p.createElement(j,{display:"flex",justifyContent:"space-between"},d&&h&&p.createElement(j,{marginLeft:"16",width:"28"},p.createElement($4,{onClick:()=>N("LEARN_COMPACT")})),d&&!h&&p.createElement(j,{marginLeft:"16",width:"28"}),p.createElement(j,{marginLeft:d?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},p.createElement(X,{as:"h1",color:"modalText",id:t,size:"18",weight:"heavy",testId:"connect-header-label"},g.t("connect.title"))),d&&p.createElement(j,{marginRight:"16"},p.createElement(_r,{onClose:e}))),p.createElement(j,{className:n9,paddingBottom:"18"},Object.entries(x).map(([H,Q],oe)=>Q.length>0&&p.createElement(p.Fragment,{key:oe},H?p.createElement(j,{marginBottom:"8",marginTop:"16",marginX:"6"},p.createElement(X,{color:H==="Installed"?"accentColor":"modalTextSecondary",size:"14",weight:"bold"},E.includes(H)?g.t(`connector_group.${H.toLowerCase()}`):H)):null,p.createElement(j,{display:"flex",flexDirection:"column",gap:"4"},Q.map(ae=>p.createElement(tb,{currentlySelected:ae.id===n,iconBackground:ae.iconBackground,iconUrl:ae.iconUrl,key:ae.id,name:ae.name,onClick:()=>T(ae),ready:ae.ready,recent:ae.recent,testId:`wallet-option-${ae.id}`,isRainbowKitConnector:ae.isRainbowKitConnector})))))),d&&p.createElement(p.Fragment,null,p.createElement(j,{background:"generalBorder",height:"1",marginTop:"-1"}),h?p.createElement(j,{paddingX:"24",paddingY:"16",textAlign:"center"},p.createElement(h,{Link:bd,Text:yd})):p.createElement(j,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},p.createElement(j,{paddingY:"4"},p.createElement(X,{color:"modalTextSecondary",size:"14",weight:"medium"},g.t("connect.new_to_ethereum.description"))),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},p.createElement(j,{className:Re({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>N("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},p.createElement(X,{color:"accentColor",size:"14",weight:"bold"},g.t("connect.new_to_ethereum.learn_more.label"))))))),(d?D!=="NONE":!0)&&p.createElement(p.Fragment,null,!d&&p.createElement(j,{background:"generalBorder",minWidth:"1",width:"1"}),p.createElement(j,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},p.createElement(j,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},p.createElement(j,{width:"28"},W&&p.createElement(j,{as:"button",className:Re({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{W&&N(W,!0),ne==null||ne()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},p.createElement(Zg,null))),p.createElement(j,{display:"flex",justifyContent:"center",style:{flexGrow:1}},U&&p.createElement(X,{color:"modalText",size:"18",textAlign:"center",weight:"heavy"},U)),p.createElement(_r,{onClose:e})),p.createElement(j,{display:"flex",flexDirection:"column",style:{minHeight:d?396:432}},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},F)))))}var m9="_1am14412",g9="_1am14410",b9="_1am14413",y9=({wallet:e})=>p.createElement("svg",{className:b9,viewBox:"0 0 86 86",width:"86",height:"86"},p.createElement("title",null,"Loading"),p.createElement("rect",{x:"3",y:"3",width:80,height:80,rx:20,ry:20,strokeDasharray:`${160/3} ${2*160/3}`,strokeDashoffset:160,className:m9,style:{stroke:(e==null?void 0:e.iconAccent)||"#0D3887"}}));function db({onClose:e,wallet:t,connecting:n}){const{connect:r,iconBackground:o,iconUrl:s,id:i,name:a,getMobileUri:c,ready:l,shortName:u,showWalletConnectModal:f}=t,d=eb(s),h=p.useRef(!1),{i18n:g}=p.useContext(Fe),m=p.useCallback(async()=>{if(i!=="walletConnect"&&(async()=>{const y=await(c==null?void 0:c());if(y)if(y&&o4({mobileUri:y,name:a}),y.startsWith("http")){const C=document.createElement("a");C.href=y,C.target="_blank",C.rel="noreferrer noopener",C.click()}else window.location.href=y})(),f){f(),e==null||e();return}try{await(r==null?void 0:r())}catch{}},[r,c,f,e,a,i]);return p.useEffect(()=>{n&&!h.current&&(m(),h.current=!0)},[n,m]),p.createElement(j,{as:"button",color:l?"modalText":"modalTextSecondary",disabled:!l,fontFamily:"body",key:i,onClick:m,ref:d,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${i}`,type:"button",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},p.createElement(j,{display:"flex",alignItems:"center",justifyContent:"center",paddingBottom:"8",paddingTop:"10",position:"relative"},n?p.createElement(y9,{wallet:t}):null,p.createElement($e,{background:o,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:s,width:"60"})),n?null:p.createElement(j,{display:"flex",flexDirection:"column",textAlign:"center"},p.createElement(X,{as:"h2",color:t.ready?"modalText":"modalTextSecondary",size:"13",weight:"medium"},p.createElement(j,{as:"span",position:"relative"},u??a,!t.ready&&" (unsupported)")),t.recent&&p.createElement(X,{color:"accentColor",size:"12",weight:"medium"},g.t("connect.recent")))))}function w9({onClose:e}){var h;const t="rk_connect_title",n=Us().filter(g=>g.isRainbowKitConnector),{disclaimer:r,learnMoreUrl:o}=p.useContext(ci);let s=null,i=null,a=!1,c=null;const[l,u]=p.useState("CONNECT"),{i18n:f}=p.useContext(Fe),d=Ma();switch(l){case"CONNECT":{s=f.t("connect.title"),a=!0,i=p.createElement(j,null,p.createElement(j,{background:"profileForeground",className:g9,display:"flex",paddingBottom:"20",paddingTop:"6",paddingX:"20",style:{gap:"calc((100% - 40px - 240px + 47px) / 4)"}},n.filter(g=>g.ready).map(g=>p.createElement(j,{key:g.id,width:"60"},p.createElement(db,{onClose:e,wallet:g})))),p.createElement(j,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},p.createElement(j,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},p.createElement(X,{color:"modalText",size:"16",weight:"bold"},f.t("intro.title")),p.createElement(X,{color:"modalTextSecondary",size:"16"},f.t("intro.description")))),p.createElement(j,{paddingTop:"32",paddingX:"20"},p.createElement(j,{display:"flex",gap:"14",justifyContent:"center"},p.createElement(tt,{label:f.t("intro.get.label"),onClick:()=>u("GET"),size:"large",type:"secondary"}),p.createElement(tt,{href:o,label:f.t("intro.learn_more.label"),size:"large",type:"secondary"}))),r&&p.createElement(j,{marginTop:"28",marginX:"32",textAlign:"center"},p.createElement(r,{Link:bd,Text:yd})));break}case"GET":{s=f.t("get.title"),c="CONNECT";const g=(h=n==null?void 0:n.filter(m=>{var b,y,C;return((b=m.downloadUrls)==null?void 0:b.ios)||((y=m.downloadUrls)==null?void 0:y.android)||((C=m.downloadUrls)==null?void 0:C.mobile)}))==null?void 0:h.splice(0,3);i=p.createElement(j,null,p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},g.map((m,b)=>{const{downloadUrls:y,iconBackground:C,iconUrl:v,name:w}=m;return!(y!=null&&y.ios)&&!(y!=null&&y.android)&&!(y!=null&&y.mobile)?null:p.createElement(j,{display:"flex",gap:"16",key:m.id,paddingX:"20",width:"full"},p.createElement(j,{style:{minHeight:48,minWidth:48}},p.createElement($e,{background:C,borderColor:"generalBorder",borderRadius:"10",height:"48",src:v,width:"48"})),p.createElement(j,{display:"flex",flexDirection:"column",width:"full"},p.createElement(j,{alignItems:"center",display:"flex",height:"48"},p.createElement(j,{width:"full"},p.createElement(X,{color:"modalText",size:"18",weight:"bold"},w)),p.createElement(tt,{href:(d?y==null?void 0:y.ios:y==null?void 0:y.android)||(y==null?void 0:y.mobile),label:f.t("get.action.label"),size:"small",type:"secondary"})),b<g.length-1&&p.createElement(j,{background:"generalBorderDim",height:"1",marginY:"10",width:"full"})))})),p.createElement(j,{style:{marginBottom:"42px"}}),p.createElement(j,{alignItems:"center",display:"flex",flexDirection:"column",gap:"36",paddingX:"36",style:{textAlign:"center"}},p.createElement(j,{display:"flex",flexDirection:"column",gap:"12",textAlign:"center"},p.createElement(X,{color:"modalText",size:"16",weight:"bold"},f.t("get.looking_for.title")),p.createElement(X,{color:"modalTextSecondary",size:"16"},f.t("get.looking_for.mobile.description")))));break}}return p.createElement(j,{display:"flex",flexDirection:"column",paddingBottom:"36"},p.createElement(j,{background:a?"profileForeground":"modalBackground",display:"flex",flexDirection:"column",paddingBottom:"4",paddingTop:"14"},p.createElement(j,{display:"flex",justifyContent:"center",paddingBottom:"6",paddingX:"20",position:"relative"},c&&p.createElement(j,{display:"flex",position:"absolute",style:{left:0,marginBottom:-20,marginTop:-20}},p.createElement(j,{alignItems:"center",as:"button",className:Re({active:"shrinkSm",hover:"growLg"}),color:"accentColor",display:"flex",marginLeft:"4",marginTop:"20",onClick:()=>u(c),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},p.createElement(Zg,null))),p.createElement(j,{marginTop:"4",textAlign:"center",width:"full"},p.createElement(X,{as:"h1",color:"modalText",id:t,size:"20",weight:"bold"},s)),p.createElement(j,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},p.createElement(j,{style:{marginBottom:-20,marginTop:-20}},p.createElement(_r,{onClose:e}))))),p.createElement(j,{display:"flex",flexDirection:"column"},i))}var v9=({onClose:e})=>{const{connector:t}=p.useContext(li),{i18n:n}=p.useContext(Fe),r=(t==null?void 0:t.name)||"";return p.createElement(j,null,p.createElement(j,{display:"flex",paddingBottom:"32",justifyContent:"center",alignItems:"center",background:"profileForeground",flexDirection:"column"},p.createElement(j,{width:"full",display:"flex",justifyContent:"flex-end",marginTop:"18",marginRight:"24"},p.createElement(_r,{onClose:e})),p.createElement(j,{width:"60"},p.createElement(db,{onClose:e,wallet:t,connecting:!0})),p.createElement(j,{marginTop:"20"},p.createElement(X,{textAlign:"center",color:"modalText",size:"18",weight:"semibold"},n.t("connect.status.connect_mobile",{wallet:r}))),p.createElement(j,{maxWidth:"full",marginTop:"8"},p.createElement(X,{textAlign:"center",color:"modalText",size:"16",weight:"medium"},n.t("connect.status.confirm_mobile",{wallet:r})))))};function x9({onClose:e}){const{connector:t}=p.useContext(li);return We()?t?p.createElement(v9,{onClose:e}):p.createElement(w9,{onClose:e}):p.createElement(p9,{onClose:e})}function C9({onClose:e,open:t}){const n="rk_connect_title",r=cd(),{disconnect:o}=Zu(),{isConnecting:s}=nt(),i=p.useCallback(()=>{e(),o()},[e,o]),a=p.useCallback(()=>{s&&o(),e()},[e,o,s]);return r==="disconnected"?p.createElement(la,{onClose:a,open:t,titleId:n},p.createElement(ua,{bottomSheetOnMobile:!0,padding:"0",wide:!0},p.createElement(x9,{onClose:a}))):r==="unauthenticated"?p.createElement(la,{onClose:i,open:t,titleId:n},p.createElement(ua,{bottomSheetOnMobile:!0,padding:"0"},p.createElement(n4,{onClose:i,onCloseModal:e}))):null}function Dc(){const[e,t]=p.useState(!1);return{closeModal:p.useCallback(()=>t(!1),[]),isModalOpen:e,openModal:p.useCallback(()=>t(!0),[])}}var Vo=p.createContext({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1,isWalletConnectModalOpen:!1,setIsWalletConnectModalOpen:()=>{}});function A9({children:e}){const{closeModal:t,isModalOpen:n,openModal:r}=Dc(),{closeModal:o,isModalOpen:s,openModal:i}=Dc(),{closeModal:a,isModalOpen:c,openModal:l}=Dc(),[u,f]=p.useState(!1),d=cd(),{chainId:h}=nt(),{chains:g}=Ne(),m=g.some(C=>C.id===h),b=p.useCallback(({keepConnectModalOpen:C=!1}={})=>{C||t(),o(),a()},[t,o,a]),y=Fa()==="unauthenticated";return A1({onConnect:()=>b({keepConnectModalOpen:y}),onDisconnect:()=>b()}),p.useEffect(()=>{y&&b()},[y,b]),p.createElement(Vo.Provider,{value:p.useMemo(()=>({accountModalOpen:s,chainModalOpen:c,connectModalOpen:n,isWalletConnectModalOpen:u,openAccountModal:m&&d==="connected"?i:void 0,openChainModal:d==="connected"?l:void 0,openConnectModal:d==="disconnected"||d==="unauthenticated"?r:void 0,setIsWalletConnectModalOpen:f}),[d,s,c,n,i,l,r,m,u])},e,p.createElement(C9,{onClose:t,open:n}),p.createElement(O4,{onClose:o,open:s}),p.createElement(L4,{onClose:a,open:c}))}function E9(){const{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}=p.useContext(Vo);return{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}}function k9(){const{accountModalOpen:e,openAccountModal:t}=p.useContext(Vo);return{accountModalOpen:e,openAccountModal:t}}function I9(){const{chainModalOpen:e,openChainModal:t}=p.useContext(Vo);return{chainModalOpen:e,openChainModal:t}}function fb(){const{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}=p.useContext(Vo);return{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}}function j9(){const{connectModalOpen:e,openConnectModal:t}=p.useContext(Vo),{isWalletConnectModalOpen:n}=fb();return{connectModalOpen:e||n,openConnectModal:t}}var Lc=()=>{};function wd({children:e}){const t=c7(),{address:n}=nt(),{chainId:r}=nt(),{chains:o}=Ne(),s=o.some(M=>M.id===r),i=i7(),a=Fa()??void 0,c=r?i[r]:void 0,l=(c==null?void 0:c.name)??void 0,u=(c==null?void 0:c.iconUrl)??void 0,f=(c==null?void 0:c.iconBackground)??void 0,d=Da(u),h=p.useContext(dd),g=Fg().some(({status:M})=>M==="pending")&&h,{showBalance:m}=Sg(),y=typeof m=="boolean"?m:m?vg(m)[We()?"smallScreen":"largeScreen"]:!0,{balance:C,ensAvatar:v,ensName:w}=Og({address:n,includeBalance:y}),x=C?`${Vg(Number.parseFloat(C.formatted))} ${C.symbol}`:void 0,{openConnectModal:E}=j9(),{openChainModal:A}=I9(),{openAccountModal:I}=k9(),{accountModalOpen:S,chainModalOpen:T,connectModalOpen:R}=E9();return p.createElement(p.Fragment,null,e({account:n?{address:n,balanceDecimals:C==null?void 0:C.decimals,balanceFormatted:C==null?void 0:C.formatted,balanceSymbol:C==null?void 0:C.symbol,displayBalance:x,displayName:w?Jg(w):Kg(n),ensAvatar:v??void 0,ensName:w??void 0,hasPendingTransactions:g}:void 0,accountModalOpen:S,authenticationStatus:a,chain:r?{hasIcon:!!u,iconBackground:f,iconUrl:d,id:r,name:l,unsupported:!s}:void 0,chainModalOpen:T,connectModalOpen:R,mounted:t(),openAccountModal:I??Lc,openChainModal:A??Lc,openConnectModal:E??Lc}))}wd.displayName="ConnectButton.Custom";var ls={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function vd({accountStatus:e=ls.accountStatus,chainStatus:t=ls.chainStatus,label:n=ls.label,showBalance:r=ls.showBalance}){const o=zr(),s=cd(),{setShowBalance:i}=Sg(),[a,c]=p.useState(!1),{i18n:l}=p.useContext(Fe);return p.useEffect(()=>{i(r),a||c(!0)},[r,i]),a?p.createElement(wd,null,({account:u,chain:f,mounted:d,openAccountModal:h,openChainModal:g,openConnectModal:m})=>{const b=d&&s!=="loading",y=(f==null?void 0:f.unsupported)??!1;return p.createElement(j,{display:"flex",gap:"12",...!b&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},b&&u&&s==="connected"?p.createElement(p.Fragment,null,f&&(o.length>1||y)&&p.createElement(j,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:y?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:Re({active:"shrink",hover:"grow"}),color:y?"connectButtonTextError":"connectButtonText",display:Yr(t,C=>C==="none"?"none":"flex"),fontFamily:"body",fontWeight:"bold",gap:"6",key:y?"unsupported":"supported",onClick:g,paddingX:"10",paddingY:"8",testId:y?"wrong-network-button":"chain-button",transition:"default",type:"button"},y?p.createElement(j,{alignItems:"center",display:"flex",height:"24",paddingX:"4"},l.t("connect_wallet.wrong_network.label")):p.createElement(j,{alignItems:"center",display:"flex",gap:"6"},f.hasIcon?p.createElement(j,{display:Yr(t,C=>C==="full"||C==="icon"?"block":"none"),height:"24",width:"24"},p.createElement($e,{alt:f.name??"Chain icon",background:f.iconBackground,borderRadius:"full",height:"24",src:f.iconUrl,width:"24"})):null,p.createElement(j,{display:Yr(t,C=>C==="icon"&&!f.iconUrl||C==="full"||C==="name"?"block":"none")},f.name??f.id)),p.createElement(R0,null)),!y&&p.createElement(j,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:Re({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:h,testId:"account-button",transition:"default",type:"button"},u.displayBalance&&p.createElement(j,{display:Yr(r,C=>C?"block":"none"),padding:"8",paddingLeft:"12"},u.displayBalance),p.createElement(j,{background:vg(r)[We()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},p.createElement(j,{alignItems:"center",display:"flex",gap:"6",height:"24"},p.createElement(j,{display:Yr(e,C=>C==="full"||C==="avatar"?"block":"none")},p.createElement(Ig,{address:u.address,imageUrl:u.ensAvatar,loading:u.hasPendingTransactions,size:24})),p.createElement(j,{alignItems:"center",display:"flex",gap:"6"},p.createElement(j,{display:Yr(e,C=>C==="full"||C==="address"?"block":"none")},u.displayName),p.createElement(R0,null)))))):p.createElement(j,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:Re({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:m,paddingX:"14",testId:"connect-button",transition:"default",type:"button"},d&&n==="Connect Wallet"?l.t("connect_wallet.label"):n))}):p.createElement(p.Fragment,null)}vd.__defaultProps=ls;vd.Custom=wd;var B9=({appName:e,appDescription:t,appUrl:n,appIcon:r})=>({name:e,description:t??e,url:n??(typeof window<"u"?window.location.origin:""),icons:[...r?[r]:[]]});function S9(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0))}function P9(e,t){const n=[];for(const r of e)n.some(o=>o[t]===r[t])||n.push(r);return n}var O9=(e,{projectId:t,walletConnectParameters:n,appName:r,appDescription:o,appUrl:s,appIcon:i})=>{if(!e.length)throw new Error("No wallet list was provided");for(const{wallets:h,groupName:g}of e)if(!h.length)throw new Error(`No wallets provided for group: ${g}`);let a=-1;const c=[],l=[],u=[],f=B9({appName:r,appDescription:o,appUrl:s,appIcon:i});for(const[h,{groupName:g,wallets:m}]of e.entries())for(const b of m){a++;const y=b({projectId:t,appName:r,appIcon:i,options:{metadata:f,...n},walletConnectParameters:{metadata:f,...n}});if(y!=null&&y.iconAccent&&!V4(y==null?void 0:y.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${y.name}`);const C={...y,groupIndex:h+1,groupName:g,index:a};typeof y.hidden=="function"?u.push(C):l.push(C)}const d=P9([...l,...u],"id");for(const{createConnector:h,groupIndex:g,groupName:m,hidden:b,...y}of d){if(typeof b=="function"&&b())continue;const C=x=>({rkDetails:S9({...y,groupIndex:g,groupName:m,isRainbowKitConnector:!0,...x||{}})});y.id==="walletConnect"&&c.push(h(C({isWalletConnectModalConnector:!0,showQrModal:!0})));const w=h(C());c.push(w)}return c};const T9="6.16.0";function Yl(e,t,n){for(let r in t){let o=t[r];Object.defineProperty(e,r,{enumerable:!0,value:o,writable:!1})}}function ro(e,t){if(e==null)return"null";if(t==null&&(t=new Set),typeof e=="object"){if(t.has(e))return"[Circular]";t.add(e)}if(Array.isArray(e))return"[ "+e.map(n=>ro(n,t)).join(", ")+" ]";if(e instanceof Uint8Array){const n="0123456789abcdef";let r="0x";for(let o=0;o<e.length;o++)r+=n[e[o]>>4],r+=n[e[o]&15];return r}if(typeof e=="object"&&typeof e.toJSON=="function")return ro(e.toJSON(),t);switch(typeof e){case"boolean":case"number":case"symbol":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const n=Object.keys(e);return n.sort(),"{ "+n.map(r=>`${ro(r,t)}: ${ro(e[r],t)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function R9(e,t,n){let r=e;{const s=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${ro(n)}`);for(const i in n){if(i==="shortMessage")continue;const a=n[i];s.push(i+"="+ro(a))}}s.push(`code=${t}`),s.push(`version=${T9}`),s.length&&(e+=" ("+s.join(", ")+")")}let o;switch(t){case"INVALID_ARGUMENT":o=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":o=new RangeError(e);break;default:o=new Error(e)}return Yl(o,{code:t}),n&&Object.assign(o,n),o.shortMessage==null&&Yl(o,{shortMessage:r}),o}function Ot(e,t,n,r){if(!e)throw R9(t,n,r)}function qe(e,t,n,r){Ot(e,t,"INVALID_ARGUMENT",{argument:n,value:r})}["NFD","NFC","NFKD","NFKC"].reduce((e,t)=>{try{if("test".normalize(t)!=="test")throw new Error("bad");if(t==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");e.push(t)}catch{}return e},[]);function N9(e,t,n){if(e!==t){let r=n,o="new";r+=".",o+=" "+n,Ot(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:o})}}function F9(e,t,n){if(e instanceof Uint8Array)return e;if(typeof e=="string"&&e.length%2===0&&e.match(/^0x[0-9a-f]*$/i)){const r=new Uint8Array((e.length-2)/2);let o=2;for(let s=0;s<r.length;s++)r[s]=parseInt(e.substring(o,o+2),16),o+=2;return r}qe(!1,"invalid BytesLike value",t,e)}function M9(e,t){return F9(e,t)}const hb=BigInt(0),oo=BigInt(1),so=9007199254740991;function Xl(e,t){const n=pb(e,"value"),r=BigInt(di(t,"width"));if(Ot(n>>r===hb,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),n>>r-oo){const o=(oo<<r)-oo;return-((~n&o)+oo)}return n}function ch(e,t){const n=pb(e,"value"),r=BigInt(di(t,"bits"));return n&(oo<<r)-oo}function xd(e,t){switch(typeof e){case"bigint":return e;case"number":return qe(Number.isInteger(e),"underflow",t||"value",e),qe(e>=-so&&e<=so,"overflow",t||"value",e),BigInt(e);case"string":try{if(e==="")throw new Error("empty string");return e[0]==="-"&&e[1]!=="-"?-BigInt(e.substring(1)):BigInt(e)}catch(n){qe(!1,`invalid BigNumberish string: ${n.message}`,t||"value",e)}}qe(!1,"invalid BigNumberish value",t||"value",e)}function pb(e,t){const n=xd(e,t);return Ot(n>=hb,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),n}const lh="0123456789abcdef";function D9(e){if(e instanceof Uint8Array){let t="0x0";for(const n of e)t+=lh[n>>4],t+=lh[n&15];return BigInt(t)}return xd(e)}function di(e,t){switch(typeof e){case"bigint":return qe(e>=-so&&e<=so,"overflow",t||"value",e),Number(e);case"number":return qe(Number.isInteger(e),"underflow",t||"value",e),qe(e>=-so&&e<=so,"overflow",t||"value",e),e;case"string":try{if(e==="")throw new Error("empty string");return di(BigInt(e),t)}catch(n){qe(!1,`invalid numeric string: ${n.message}`,t||"value",e)}}qe(!1,"invalid numeric value",t||"value",e)}const L9=BigInt(-1),Dt=BigInt(0),io=BigInt(1),U9=BigInt(5),Xr={};let po="0000";for(;po.length<80;)po+=po;function dr(e){let t=po;for(;t.length<e;)t+=t;return BigInt("1"+t.substring(0,e))}function is(e,t,n){const r=BigInt(t.width);if(t.signed){const o=io<<r-io;Ot(n==null||e>=-o&&e<o,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:e}),e>Dt?e=Xl(ch(e,r),r):e=-Xl(ch(-e,r),r)}else{const o=io<<r;Ot(n==null||e>=0&&e<o,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:e}),e=(e%o+o)%o&o-io}return e}function Uc(e){typeof e=="number"&&(e=`fixed128x${e}`);let t=!0,n=128,r=18;if(typeof e=="string"){if(e!=="fixed")if(e==="ufixed")t=!1;else{const s=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);qe(s,"invalid fixed format","format",e),t=s[1]!=="u",n=parseInt(s[2]),r=parseInt(s[3])}}else if(e){const s=e,i=(a,c,l)=>s[a]==null?l:(qe(typeof s[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,s[a]),s[a]);t=i("signed","boolean",t),n=i("width","number",n),r=i("decimals","number",r)}qe(n%8===0,"invalid FixedNumber width (not byte aligned)","format.width",n),qe(r<=80,"invalid FixedNumber decimals (too large)","format.decimals",r);const o=(t?"":"u")+"fixed"+String(n)+"x"+String(r);return{signed:t,width:n,decimals:r,name:o}}function _9(e,t){let n="";e<Dt&&(n="-",e*=L9);let r=e.toString();if(t===0)return n+r;for(;r.length<=t;)r=po+r;const o=r.length-t;for(r=r.substring(0,o)+"."+r.substring(o);r[0]==="0"&&r[1]!==".";)r=r.substring(1);for(;r[r.length-1]==="0"&&r[r.length-2]!==".";)r=r.substring(0,r.length-1);return n+r}var _t,Ae,Je,we,hr,bn,eu,tu,nu,ru;const Ln=class Ln{constructor(t,n,r){Z(this,we);Kt(this,"format");Z(this,_t);Z(this,Ae);Z(this,Je);Kt(this,"_value");N9(t,Xr,"FixedNumber"),z(this,Ae,n),z(this,_t,r);const o=_9(n,r.decimals);Yl(this,{format:r.name,_value:o}),z(this,Je,dr(r.decimals))}get signed(){return k(this,_t).signed}get width(){return k(this,_t).width}get decimals(){return k(this,_t).decimals}get value(){return k(this,Ae)}addUnsafe(t){return Y(this,we,eu).call(this,t)}add(t){return Y(this,we,eu).call(this,t,"add")}subUnsafe(t){return Y(this,we,tu).call(this,t)}sub(t){return Y(this,we,tu).call(this,t,"sub")}mulUnsafe(t){return Y(this,we,nu).call(this,t)}mul(t){return Y(this,we,nu).call(this,t,"mul")}mulSignal(t){Y(this,we,hr).call(this,t);const n=k(this,Ae)*k(t,Ae);return Ot(n%k(this,Je)===Dt,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),Y(this,we,bn).call(this,n/k(this,Je),"mulSignal")}divUnsafe(t){return Y(this,we,ru).call(this,t)}div(t){return Y(this,we,ru).call(this,t,"div")}divSignal(t){Ot(k(t,Ae)!==Dt,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),Y(this,we,hr).call(this,t);const n=k(this,Ae)*k(this,Je);return Ot(n%k(t,Ae)===Dt,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),Y(this,we,bn).call(this,n/k(t,Ae),"divSignal")}cmp(t){let n=this.value,r=t.value;const o=this.decimals-t.decimals;return o>0?r*=dr(o):o<0&&(n*=dr(-o)),n<r?-1:n>r?1:0}eq(t){return this.cmp(t)===0}lt(t){return this.cmp(t)<0}lte(t){return this.cmp(t)<=0}gt(t){return this.cmp(t)>0}gte(t){return this.cmp(t)>=0}floor(){let t=k(this,Ae);return k(this,Ae)<Dt&&(t-=k(this,Je)-io),t=k(this,Ae)/k(this,Je)*k(this,Je),Y(this,we,bn).call(this,t,"floor")}ceiling(){let t=k(this,Ae);return k(this,Ae)>Dt&&(t+=k(this,Je)-io),t=k(this,Ae)/k(this,Je)*k(this,Je),Y(this,we,bn).call(this,t,"ceiling")}round(t){if(t==null&&(t=0),t>=this.decimals)return this;const n=this.decimals-t,r=U9*dr(n-1);let o=this.value+r;const s=dr(n);return o=o/s*s,is(o,k(this,_t),"round"),new Ln(Xr,o,k(this,_t))}isZero(){return k(this,Ae)===Dt}isNegative(){return k(this,Ae)<Dt}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return Ln.fromString(this.toString(),t)}static fromValue(t,n,r){const o=n==null?0:di(n),s=Uc(r);let i=xd(t,"value");const a=o-s.decimals;if(a>0){const c=dr(a);Ot(i%c===Dt,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:t}),i/=c}else a<0&&(i*=dr(-a));return is(i,s,"fromValue"),new Ln(Xr,i,s)}static fromString(t,n){const r=t.match(/^(-?)([0-9]*)\.?([0-9]*)$/);qe(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",t);const o=Uc(n);let s=r[2]||"0",i=r[3]||"";for(;i.length<o.decimals;)i+=po;Ot(i.substring(o.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:t}),i=i.substring(0,o.decimals);const a=BigInt(r[1]+s+i);return is(a,o,"fromString"),new Ln(Xr,a,o)}static fromBytes(t,n){let r=D9(M9(t,"value"));const o=Uc(n);return o.signed&&(r=Xl(r,o.width)),is(r,o,"fromBytes"),new Ln(Xr,r,o)}};_t=new WeakMap,Ae=new WeakMap,Je=new WeakMap,we=new WeakSet,hr=function(t){qe(this.format===t.format,"incompatible format; use fixedNumber.toFormat","other",t)},bn=function(t,n){return t=is(t,k(this,_t),n),new Ln(Xr,t,k(this,_t))},eu=function(t,n){return Y(this,we,hr).call(this,t),Y(this,we,bn).call(this,k(this,Ae)+k(t,Ae),n)},tu=function(t,n){return Y(this,we,hr).call(this,t),Y(this,we,bn).call(this,k(this,Ae)-k(t,Ae),n)},nu=function(t,n){return Y(this,we,hr).call(this,t),Y(this,we,bn).call(this,k(this,Ae)*k(t,Ae)/k(this,Je),n)},ru=function(t,n){return Ot(k(t,Ae)!==Dt,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),Y(this,we,hr).call(this,t),Y(this,we,bn).call(this,k(this,Ae)*k(this,Je)/k(t,Ae),n)};let Zl=Ln;const $9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function uh(e,t){let n=18;if(typeof t=="string"){const r=$9.indexOf(t);qe(r>=0,"invalid unit","unit",t),n=3*r}else t!=null&&(n=di(t,"unit"));return Zl.fromValue(e,n,{decimals:n,width:512}).toString()}const dh=[{name:"approve",type:"function",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{name:"balanceOf",type:"function",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]}],W9=[{name:"swapBestRoute",type:"function",stateMutability:"nonpayable",inputs:[{name:"tokenIn",type:"address"},{name:"tokenOut",type:"address"},{name:"amountIn",type:"uint256"},{name:"minAmountOut",type:"uint256"},{name:"recipient",type:"address"}],outputs:[{name:"amountOut",type:"uint256"}]},{name:"swapBestRouteWithPartner",type:"function",stateMutability:"nonpayable",inputs:[{name:"tokenIn",type:"address"},{name:"tokenOut",type:"address"},{name:"amountIn",type:"uint256"},{name:"minAmountOut",type:"uint256"},{name:"recipient",type:"address"},{name:"partnerId",type:"string"},{name:"partnerFeeBps",type:"uint256"}],outputs:[{name:"amountOut",type:"uint256"}]}],q9=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]}],z9=({theme:e="dark",primaryColor:t="#E84142",borderRadius:n="lg",width:r="default",defaultTokenIn:o,defaultTokenOut:s,tokenList:i="default",slippage:a=jh,hideRouteInfo:c=!1,hideSettings:l=!1,partnerId:u,apiUrl:f=Bh,onSwapStart:d,onSwapSuccess:h,onSwapError:g})=>{const[m,b]=p.useState(null),[y,C]=p.useState(null),[v,w]=p.useState(""),[x,E]=p.useState(null),[A,I]=p.useState(!1),[S,T]=p.useState(null),[R,M]=p.useState(!1),[N,q]=p.useState(a),[P,D]=p.useState(null),[_,F]=p.useState(""),[U,W]=p.useState(null),{isConnected:ne,address:ce}=nt(),{writeContractAsync:xe,isPending:H}=kC(),{data:Q}=Xu({address:ce,token:(m==null?void 0:m.symbol)==="AVAX"||m==null?void 0:m.address}),{data:oe}=CC({address:m==null?void 0:m.address,abi:dh,functionName:"allowance",args:ce&&(m==null?void 0:m.symbol)!=="AVAX"?[ce,Oi]:void 0}),ae=(m==null?void 0:m.symbol)!=="AVAX"&&oe!==void 0&&x!==void 0&&BigInt((oe==null?void 0:oe.toString())||"0")<BigInt(Math.floor(parseFloat(v||"0")*Math.pow(10,(m==null?void 0:m.decimals)||18))),Ie=i==="default"?$c:Array.isArray(i)?i:$c;p.useEffect(()=>{if(o){const G=Ie.find(pe=>pe.address.toLowerCase()===o.toLowerCase()||pe.symbol.toLowerCase()===o.toLowerCase());G&&b(G)}if(s){const G=Ie.find(pe=>pe.address.toLowerCase()===s.toLowerCase()||pe.symbol.toLowerCase()===s.toLowerCase());G&&C(G)}},[o,s,Ie]);const Oe=p.useCallback(async()=>{if(!m||!y||!v||parseFloat(v)===0){E(null);return}I(!0),T(null);try{const G=new URLSearchParams({tokenIn:m.address,tokenOut:y.address,amountIn:v,...u&&{partnerId:u}});console.log("Fetching quote with params:",{tokenIn:m.address,tokenOut:y.address,amountIn:v,url:`${f}/quote/best?${G}`});const Et=await(await fetch(`${f}/quote/best?${G}`)).json();if(Et.error)throw new Error(Et.message);E(Et)}catch(G){T(G instanceof Error?G.message:"Failed to fetch quote"),E(null)}finally{I(!1)}},[m,y,v,f,u]);p.useEffect(()=>{const G=setTimeout(Oe,500);return()=>clearTimeout(G)},[Oe]);const Se=()=>{var G;b(y),C(m),w(((G=x==null?void 0:x.amountOutFormatted)==null?void 0:G.toString())||""),E(null)},Ft=()=>{Q&&w(uh(Q.value,Q.decimals))},rt=async()=>{if(!(!x||!m||!y||!ce)){I(!0),T(null);try{d==null||d(x);const G=BigInt(Math.floor(parseFloat(v)*Math.pow(10,m.decimals))),pe=BigInt(x.amountOut)*BigInt(Math.floor((1-N/100)*1e4))/10000n;m.symbol==="AVAX"&&(console.log("Wrapping native AVAX to WAVAX..."),T("Step 1/3: Wrapping AVAX..."),await xe({address:m.address,abi:q9,functionName:"deposit",value:G})),(ae||m.symbol==="AVAX")&&(console.log("Requesting approval..."),T("Step 2/3: Authorizing Router..."),await xe({address:m.address,abi:dh,functionName:"approve",args:[Oi,G]})),console.log("Executing swap on-chain with partner fees..."),T("Step 3/3: Executing Swap...");const Et=BigInt(Lb),st=await xe({address:Oi,abi:W9,functionName:"swapBestRouteWithPartner",args:[m.address,y.address,G,pe,ce,u||"owner",Et]});console.log("Swap transaction sent:",st),W(st),h==null||h({hash:st}),w(""),E(null)}catch(G){console.error("Swap execution failed:",G);const pe=G.shortMessage||G.message||"Swap failed";T(pe),g==null||g(new Error(pe))}finally{I(!1)}}},ot={compact:"w-80",default:"w-96",wide:"w-[480px]"}[r],At={sm:"rounded-lg",md:"rounded-xl",lg:"rounded-2xl",full:"rounded-3xl"}[n];return O.jsxs("div",{className:`${ot} ${At} overflow-hidden font-sans transition-all duration-300`,style:{backgroundColor:e==="dark"?"#0F0F0F":"#FFFFFF",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)"}`,boxShadow:e==="dark"?"0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05)":"0 20px 50px rgba(0, 0, 100, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:[O.jsxs("div",{className:"px-6 py-5 flex items-center justify-between relative overflow-hidden",style:{background:e==="dark"?"linear-gradient(to bottom, rgba(232, 65, 66, 0.05), transparent)":"linear-gradient(to bottom, rgba(232, 65, 66, 0.02), transparent)",borderBottom:`1px solid ${e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}`},children:[O.jsxs("div",{className:"z-10",children:[O.jsxs("h2",{className:"text-xl font-black tracking-tight flex items-center gap-2",style:{color:e==="dark"?"#FFFFFF":"#1A1A1A"},children:[O.jsx("span",{style:{color:t},children:"AVAX"})," ROUTER",O.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-500 font-bold ml-1 uppercase tracking-widest",children:"Live"})]}),O.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest mt-0.5",style:{color:e==="dark"?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.4)"},children:"0.05% Fee • Top DEX Aggregator"})]}),O.jsxs("div",{className:"flex items-center gap-2 z-10",children:[ne&&ce&&O.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-xl border",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.03)",borderColor:e==="dark"?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.08)"},children:[O.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"}),O.jsxs("span",{className:"text-[10px] font-mono font-bold opacity-60",children:[ce.slice(0,6),"...",ce.slice(-4)]})]}),!l&&O.jsx("button",{onClick:()=>M(!R),className:"p-2 rounded-xl transition-all duration-200 hover:scale-110 active:scale-95",style:{color:e==="dark"?"rgba(255,255,255,0.6)":"rgba(0,0,0,0.6)",backgroundColor:R?e==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.05)":"transparent"},children:O.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M12.22 2h-.44a2 2 0 00-2 2v.18a2 2 0 01-1 1.73l-.43.25a2 2 0 01-2 0l-.15-.08a2 2 0 00-2.73.73l-.22.38a2 2 0 00.73 2.73l.15.1a2 2 0 011 1.72v.51a2 2 0 01-1 1.74l-.15.09a2 2 0 00-.73 2.73l.22.38a2 2 0 002.73.73l.15-.08a2 2 0 012 0l.43.25a2 2 0 011 1.73V20a2 2 0 002 2h.44a2 2 0 002-2v-.18a2 2 0 011-1.73l.43-.25a2 2 0 012 0l.15.08a2 2 0 002.73-.73l.22-.39a2 2 0 00-.73-2.73l-.15-.1a2 2 0 01-1-1.72v-.51a2 2 0 011-1.74l.15-.09a2 2 0 00.73-2.73l-.22-.38a2 2 0 00-2.73-.73l-.15.08a2 2 0 01-2 0l-.43-.25a2 2 0 01-1-1.73V4a2 2 0 00-2-2z"}),O.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]})]}),R&&!l&&O.jsxs("div",{className:"px-6 py-5 space-y-3",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.01)",borderBottom:`1px solid ${e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}`},children:[O.jsxs("div",{className:"flex justify-between items-center",children:[O.jsx("span",{className:"text-xs font-bold uppercase tracking-widest",style:{color:e==="dark"?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.4)"},children:"Slippage Tolerance"}),O.jsxs("span",{className:"text-xs font-mono font-bold",style:{color:t},children:[N,"%"]})]}),O.jsx("div",{className:"flex gap-2",children:[.5,1,2,3].map(G=>O.jsxs("button",{onClick:()=>q(G),className:"flex-1 py-2 rounded-xl text-xs font-bold transition-all duration-200",style:{backgroundColor:N===G?t:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)",color:N===G?"#FFFFFF":e==="dark"?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.4)",boxShadow:N===G?`0 4px 12px ${t}44`:"none"},children:[G,"%"]},G))})]}),O.jsxs("div",{className:"p-4 space-y-2",children:[O.jsxs("div",{className:"p-5 rounded-3xl transition-all duration-300 group relative",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)"}`},children:[O.jsxs("div",{className:"flex items-center justify-between mb-4",children:[O.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest",style:{color:e==="dark"?"rgba(255,255,255,0.3)":"rgba(0,0,0,0.3)"},children:"Sell"}),O.jsx("div",{className:"flex items-center gap-2",children:O.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-white/5 cursor-pointer hover:bg-white/10 transition-colors",style:{color:t},onClick:Ft,children:"MAX"})})]}),O.jsxs("div",{className:"flex items-center justify-between gap-4",children:[O.jsx("div",{className:"flex-shrink-0",children:O.jsxs("button",{onClick:()=>D("in"),className:"flex items-center gap-2 px-3 py-2 rounded-2xl transition-all duration-200 hover:bg-white/10",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.04)"},children:[m!=null&&m.logoURI?O.jsx("img",{src:m.logoURI,alt:m.symbol,className:"w-6 h-6 rounded-full"}):O.jsx("div",{className:"w-6 h-6 rounded-full bg-red-500/20 flex items-center justify-center text-[10px] font-bold",children:"?"}),O.jsx("span",{className:"text-lg font-black",children:(m==null?void 0:m.symbol)||"Select"}),O.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",children:O.jsx("path",{d:"M6 9l6 6 6-6"})})]})}),O.jsx("div",{className:"flex-1 min-w-0",children:O.jsx("input",{type:"number",value:v,onChange:G=>w(G.target.value),placeholder:"0.0",className:"w-full bg-transparent text-3xl font-black outline-none text-right placeholder:opacity-20",style:{color:e==="dark"?"#FFFFFF":"#1A1A1A"}})})]}),O.jsxs("div",{className:"flex justify-between items-center mt-3",children:[m&&O.jsxs("p",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",style:{color:e==="dark"?"#FFFFFF":"#000000"},children:["Balance: ",Q?`${parseFloat(uh(Q.value,Q.decimals)).toFixed(4)}`:"0.0000"," ",m.symbol]}),O.jsx("p",{className:"text-[10px] font-bold opacity-20",children:"$0.00"})]})]}),O.jsx("div",{className:"flex justify-center -my-6 relative z-10",children:O.jsx("button",{onClick:Se,className:"p-3 rounded-2xl transition-all duration-300 hover:rotate-180 group active:scale-95 shadow-xl",style:{backgroundColor:e==="dark"?"#1A1A1A":"#FFFFFF",border:`4px solid ${e==="dark"?"#0F0F0F":"#F4F4F4"}`,color:t},children:O.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:O.jsx("path",{d:"M7 16V4M7 4L3 8M7 4L11 8M17 8v12M17 20l4-4M17 20l-4-4"})})})}),O.jsxs("div",{className:"p-5 rounded-3xl transition-all duration-300 relative overflow-hidden",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)"}`},children:[O.jsx("div",{className:"flex items-center justify-between mb-4",children:O.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest",style:{color:e==="dark"?"rgba(255,255,255,0.3)":"rgba(0,0,0,0.3)"},children:"Buy"})}),O.jsxs("div",{className:"flex items-center justify-between gap-4",children:[O.jsx("div",{className:"flex-shrink-0",children:O.jsxs("button",{onClick:()=>D("out"),className:"flex items-center gap-2 px-3 py-2 rounded-2xl transition-all duration-200 hover:bg-white/10",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.04)"},children:[y!=null&&y.logoURI?O.jsx("img",{src:y.logoURI,alt:y.symbol,className:"w-6 h-6 rounded-full"}):O.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-500/20 flex items-center justify-center text-[10px] font-bold",children:"?"}),O.jsx("span",{className:"text-lg font-black",children:(y==null?void 0:y.symbol)||"Select"}),O.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",children:O.jsx("path",{d:"M6 9l6 6 6-6"})})]})}),O.jsx("div",{className:"flex-1 min-w-0 text-right h-10 flex items-center justify-end",children:A?O.jsxs("div",{className:"flex gap-1",children:[O.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/20 animate-bounce",style:{animationDelay:"0ms"}}),O.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/20 animate-bounce",style:{animationDelay:"150ms"}}),O.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/20 animate-bounce",style:{animationDelay:"300ms"}})]}):x?O.jsx("span",{className:"text-3xl font-black truncate",style:{color:e==="dark"?"#FFFFFF":"#1A1A1A"},children:(parseFloat(x.amountOut)/Math.pow(10,(y==null?void 0:y.decimals)||18)).toLocaleString(void 0,{maximumFractionDigits:6})}):O.jsx("span",{className:"text-3xl font-black opacity-20",children:"0.0"})})]}),y&&x&&O.jsxs("div",{className:"flex justify-between items-center mt-3",children:[O.jsxs("p",{className:"text-[10px] font-bold opacity-40",children:["~$",(parseFloat(x.amountOut)/Math.pow(10,y.decimals)*1).toFixed(2)]}),O.jsx("span",{className:"text-[10px] font-black text-emerald-500",children:"BEST PRICE"})]})]}),!c&&x&&O.jsxs("div",{className:"space-y-2",children:[O.jsxs("div",{className:"p-4 rounded-3xl",style:{background:e==="dark"?"linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02))":"linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.01))",border:"1px solid rgba(16, 185, 129, 0.1)"},children:[O.jsxs("div",{className:"flex justify-between items-center mb-2",children:[O.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest text-emerald-500/80",children:"Aggregator Path"}),O.jsxs("span",{className:"text-[10px] font-bold font-mono text-emerald-500",children:["VIA ",x.bestDex.toUpperCase()]})]}),O.jsxs("div",{className:"flex justify-between text-[10px] font-bold",children:[O.jsxs("span",{className:"opacity-40",children:["Impact: ",O.jsxs("span",{className:Number(x.priceImpact)>2?"text-red-500":"text-emerald-500",children:[Number(x.priceImpact||0).toFixed(2),"%"]})]}),O.jsxs("span",{className:"opacity-40 text-right",children:["Savings: ",O.jsxs("span",{className:"text-emerald-500",children:["$",Number(x.savings||0).toFixed(2)]})]})]})]}),x.allQuotes&&x.allQuotes.length>1&&O.jsxs("div",{className:"p-4 rounded-3xl space-y-2",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.02)":"rgba(0,0,0,0.01)",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.03)"}`},children:[O.jsx("p",{className:"text-[8px] font-black uppercase tracking-[0.2em] opacity-30 px-1",children:"Market Comparison"}),x.allQuotes.map((G,pe)=>O.jsxs("div",{className:"flex justify-between items-center px-1",children:[O.jsx("span",{className:"text-[10px] font-bold opacity-50",children:G.dex}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("span",{className:"text-[10px] font-mono font-bold",children:(parseFloat(G.amountOut)/Math.pow(10,(y==null?void 0:y.decimals)||18)).toFixed(4)}),G.dex.includes(x.bestDex)&&O.jsx("span",{className:"text-[8px] font-black text-emerald-500 bg-emerald-500/10 px-1 rounded",children:"BEST"})]})]},pe))]})]}),S&&O.jsxs("div",{className:"p-4 rounded-2xl text-[11px] font-bold text-center flex items-center justify-center gap-2",style:{backgroundColor:"rgba(232, 65, 66, 0.1)",color:"#E84142",border:"1px solid rgba(232, 65, 66, 0.2)"},children:[O.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("circle",{cx:"12",cy:"12",r:"10"}),O.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),O.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),S]}),O.jsx("div",{className:"pt-2",children:U?O.jsxs("div",{className:"p-5 rounded-3xl space-y-3 animate-in fade-in zoom-in duration-300",style:{background:"linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05))",border:"1px solid rgba(16, 185, 129, 0.2)"},children:[O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("div",{className:"w-10 h-10 rounded-full bg-emerald-500/20 flex items-center justify-center text-emerald-500",children:O.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:O.jsx("polyline",{points:"20 6 9 17 4 12"})})}),O.jsxs("div",{children:[O.jsx("h3",{className:"text-sm font-black text-emerald-500 uppercase tracking-tight",children:"Swap Successful!"}),O.jsx("p",{className:"text-[10px] opacity-60 font-bold",children:"Funds have been sent to your wallet."})]})]}),O.jsxs("div",{className:"pt-2 flex flex-col gap-2",children:[O.jsx("a",{href:`https://subnets.avax.network/c-chain/tx/${U}`,target:"_blank",rel:"noopener noreferrer",className:"w-full py-2 rounded-xl bg-emerald-500/10 text-emerald-500 text-[10px] font-black text-center border border-emerald-500/20 hover:bg-emerald-500/20 transition-all uppercase tracking-widest",children:"View on Explorer"}),O.jsx("button",{onClick:()=>W(null),className:"w-full py-2 text-[10px] font-black opacity-40 hover:opacity-100 transition-opacity uppercase tracking-widest",children:"Dismiss"})]})]}):ne?O.jsxs("button",{onClick:rt,disabled:!x||A||!m||!y||H,className:"w-full py-5 rounded-3xl font-black text-xl transition-all duration-300 disabled:opacity-30 disabled:grayscale disabled:cursor-not-allowed hover:scale-[1.02] active:scale-[0.98] shadow-2xl relative overflow-hidden group",style:{backgroundColor:t,color:"#FFFFFF",boxShadow:`0 15px 35px ${t}44`},children:[O.jsx("div",{className:"relative z-10 flex items-center justify-center gap-2",children:!m||!y?"SELECT TOKENS":v?A||H?ae?"APPROVING...":"CONFIRMING...":ae?"APPROVE & SWAP":"EXECUTE SWAP":"ENTER AMOUNT"}),O.jsx("div",{className:"absolute inset-0 bg-white/10 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700 slant"})]}):O.jsx(vd.Custom,{children:({account:G,chain:pe,openConnectModal:Et,mounted:st})=>O.jsx("div",{...!st&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}},children:!st||!G||!pe?O.jsx("button",{onClick:Et,style:{backgroundColor:t,boxShadow:`0 10px 30px ${t}44`},className:"w-full py-4 rounded-3xl font-black text-lg text-white transition-all hover:scale-[1.02] active:scale-[0.98]",children:"CONNECT WALLET"}):null})})})]}),P&&O.jsx("div",{className:"absolute inset-0 z-50 p-4 animate-in fade-in duration-200",children:O.jsxs("div",{className:"w-full h-full rounded-3xl flex flex-col overflow-hidden",style:{backgroundColor:e==="dark"?"#121213":"#F9F9F9",border:`1px solid ${e==="dark"?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)"}`},children:[O.jsxs("div",{className:"p-4 border-b flex items-center justify-between",style:{borderColor:e==="dark"?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"},children:[O.jsx("h3",{className:"text-sm font-black uppercase tracking-widest opacity-60",children:"Select Token"}),O.jsx("button",{onClick:()=>{D(null),F("")},className:"opacity-40 hover:opacity-100 transition-opacity",children:O.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:[O.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),O.jsx("div",{className:"p-4",children:O.jsx("input",{autoFocus:!0,type:"text",placeholder:"Search name or symbol...",value:_,onChange:G=>F(G.target.value),className:"w-full bg-white/5 border border-white/10 rounded-2xl px-4 py-3 text-sm font-bold outline-none focus:border-red-500/50 transition-colors",style:{backgroundColor:e==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)"}})}),O.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:Ie.filter(G=>G.symbol.toLowerCase().includes(_.toLowerCase())||G.name.toLowerCase().includes(_.toLowerCase())).map(G=>{var pe;return O.jsxs("button",{onClick:()=>{P==="in"?b(G):C(G),D(null),F("")},className:"w-full flex items-center justify-between p-3 rounded-2xl hover:bg-white/5 transition-colors group",children:[O.jsxs("div",{className:"flex items-center gap-3",children:[G.logoURI?O.jsx("img",{src:G.logoURI,alt:G.symbol,className:"w-8 h-8 rounded-full"}):O.jsx("div",{className:"w-8 h-8 rounded-full bg-white/10 flex items-center justify-center text-xs font-bold",children:"?"}),O.jsxs("div",{className:"text-left",children:[O.jsx("p",{className:"text-sm font-black",children:G.symbol}),O.jsx("p",{className:"text-[10px] font-bold opacity-40",children:G.name})]})]}),((pe=P==="in"?m:y)==null?void 0:pe.address)===G.address&&O.jsx("div",{style:{color:t},children:O.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"4",children:O.jsx("polyline",{points:"20 6 9 17 4 12"})})})]},G.address)})})]})}),O.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
1732
1732
|
.slant {
|
|
1733
1733
|
clip-path: polygon(20% 0, 100% 0, 80% 100%, 0% 100%);
|
|
1734
1734
|
}
|
|
@@ -1747,4 +1747,4 @@ limitations under the License.
|
|
|
1747
1747
|
from { opacity: 0; transform: scale(0.95); }
|
|
1748
1748
|
to { opacity: 1; transform: scale(1); }
|
|
1749
1749
|
}
|
|
1750
|
-
`}})]})};function
|
|
1750
|
+
`}})]})};function mb(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function Q9(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function H9(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function gb(){return Q9()||H9()}function fh(){return mb()||gb()}var hh=new Map,G9=({projectId:e,walletConnectParameters:t,rkDetailsShowQrModal:n,rkDetailsIsWalletConnectModalConnector:r})=>{let o={telemetryEnabled:!1,...t||{},projectId:e,showQrModal:!1};n&&(o={...o,showQrModal:!0}),"customStoragePrefix"in o||(o={...o,customStoragePrefix:r?"clientOne":"clientTwo"});const s=JSON.stringify(o),i=hh.get(s);if(i)return i;const a=ad(o);return hh.set(s,a),a};function V9({projectId:e,walletDetails:t,walletConnectParameters:n}){return r=>({...G9({projectId:e,walletConnectParameters:n,rkDetailsShowQrModal:t.rkDetails.showQrModal,rkDetailsIsWalletConnectModalConnector:t.rkDetails.isWalletConnectModalConnector})(r),...t})}function Cd({projectId:e,walletConnectParameters:t}){const n="21fef48091f12692cad574a6f7753643";if(!e||e==="")throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");return e==="YOUR_PROJECT_ID"&&(e=n),r=>V9({projectId:e,walletDetails:r,walletConnectParameters:t})}function bb(e){const t=typeof window<"u"?window:void 0;if(typeof t>"u"||typeof t.ethereum>"u")return;const n=t.ethereum.providers;return n?n.find(r=>r[e]):t.ethereum[e]?t.ethereum:void 0}function yb(e){const t=(n,r)=>{const[o,...s]=r.split("."),i=n[o];if(i)return s.length===0?i:t(i,s.join("."))};if(typeof window<"u")return t(window,e)}function K9({flag:e,namespace:t}){return!!(t&&typeof yb(t)<"u"||typeof bb(e)<"u")}function J9({flag:e,namespace:t}){var o;const n=typeof window<"u"?window:void 0;if(typeof n>"u")return;if(t){const s=yb(t);if(s)return s}const r=(o=n.ethereum)==null?void 0:o.providers;if(e){const s=bb(e);if(s)return s}return typeof r<"u"&&r.length>0?r[0]:n.ethereum}function Y9(e){return t=>{const n=e?{target:()=>({id:t.rkDetails.id,name:t.rkDetails.name,provider:e})}:{};return r=>({...Sa(n)(r),...t})}}function wb({flag:e,namespace:t,target:n}){const r=n||J9({flag:e,namespace:t});return Y9(r)}var X9=({projectId:e,options:t})=>({id:"walletConnect",name:"WalletConnect",installed:void 0,iconUrl:async()=>(await Promise.resolve().then(()=>require("./walletConnectWallet-YHWKVTDY-k9TO_fWs.js"))).default,iconBackground:"#3b99fc",qrCode:{getUri:r=>r},createConnector:Cd({projectId:e,walletConnectParameters:t})}),Z9=({projectId:e,walletConnectParameters:t})=>{const n=K9({flag:"isRainbow"}),r=!n,o=s=>mb()?s:gb()?`rainbow://wc?uri=${encodeURIComponent(s)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(s)}&connector=rainbowkit`;return{id:"rainbow",name:"Rainbow",rdns:"me.rainbow",iconUrl:async()=>(await Promise.resolve().then(()=>require("./rainbowWallet-O26YNBMX-CqPvjISh.js"))).default,iconBackground:"#0c2f78",installed:r?void 0:n,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},mobile:{getUri:r?o:void 0},qrCode:r?{getUri:o,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"wallet_connectors.rainbow.qr_code.step1.description",step:"install",title:"wallet_connectors.rainbow.qr_code.step1.title"},{description:"wallet_connectors.rainbow.qr_code.step2.description",step:"create",title:"wallet_connectors.rainbow.qr_code.step2.title"},{description:"wallet_connectors.rainbow.qr_code.step3.description",step:"scan",title:"wallet_connectors.rainbow.qr_code.step3.title"}]}}:void 0,createConnector:r?Cd({projectId:e,walletConnectParameters:t}):wb({flag:"isRainbow"})}};function ek(e){return!(!(e!=null&&e.isMetaMask)||e.isBraveWallet&&!e._events&&!e._state||e.isApexWallet||e.isAvalanche||e.isBackpack||e.isBifrost||e.isBitKeep||e.isBitski||e.isBinance||e.isBlockWallet||e.isCoinbaseWallet||e.isDawn||e.isEnkrypt||e.isExodus||e.isFrame||e.isFrontier||e.isGamestop||e.isHyperPay||e.isImToken||e.isKuCoinWallet||e.isMathWallet||e.isNestWallet||e.isOkxWallet||e.isOKExWallet||e.isOneInchIOSWallet||e.isOneInchAndroidWallet||e.isOpera||e.isPhantom||e.isZilPay||e.isPortal||e.isxPortal||e.isRabby||e.isRainbow||e.isStatus||e.isTalisman||e.isTally||e.isTokenPocket||e.isTokenary||e.isTrust||e.isTrustWallet||e.isCTRL||e.isZeal||e.isCoin98||e.isMEWwallet||e.isSafeheron||e.isSafePal||e.isWigwam||e.isZerion||e.__seif)}var vb=({projectId:e,walletConnectParameters:t})=>{const{...n}=vb,r=typeof window<"u"?ek(window.ethereum):!1,o=!r&&!fh(),s=r||fh();return{id:"metaMask",name:"MetaMask",rdns:"io.metamask",iconUrl:async()=>(await Promise.resolve().then(()=>require("./metaMaskWallet-SITXT2FV-CubKW4M9.js"))).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:r||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},mobile:{getUri:s?i=>i:void 0},qrCode:o?{getUri:i=>`https://metamask.app.link/wc?uri=${encodeURIComponent(i)}`,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.qr_code.step1.description",step:"install",title:"wallet_connectors.metamask.qr_code.step1.title"},{description:"wallet_connectors.metamask.qr_code.step2.description",step:"create",title:"wallet_connectors.metamask.qr_code.step2.title"},{description:"wallet_connectors.metamask.qr_code.step3.description",step:"refresh",title:"wallet_connectors.metamask.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.extension.step1.description",step:"install",title:"wallet_connectors.metamask.extension.step1.title"},{description:"wallet_connectors.metamask.extension.step2.description",step:"create",title:"wallet_connectors.metamask.extension.step2.title"},{description:"wallet_connectors.metamask.extension.step3.description",step:"refresh",title:"wallet_connectors.metamask.extension.step3.title"}]}},createConnector:o?Cd({projectId:e,walletConnectParameters:t}):i=>a=>{var l,u,f;const c=id({dappMetadata:{connector:"rainbowkit",name:(l=t==null?void 0:t.metadata)==null?void 0:l.name,iconUrl:(u=t==null?void 0:t.metadata)==null?void 0:u.icons[0],url:(f=t==null?void 0:t.metadata)==null?void 0:f.url},headless:!0,checkInstallationImmediately:!1,enableAnalytics:!1,...n})(a);return{...c,...i,getChainId:async()=>{var d;try{return await c.getChainId()}catch{return((d=a.chains[0])==null?void 0:d.id)??1}}}}}},tk=()=>({id:"injected",name:"Browser Wallet",iconUrl:async()=>(await Promise.resolve().then(()=>require("./injectedWallet-AWJSZPMG-BDdjxTfh.js"))).default,iconBackground:"#fff",createConnector:wb({})});const nk="YOUR_PROJECT_ID",rk=O9([{groupName:"Recommended",wallets:[tk,vb,Z9,X9]}],{appName:"Avalanche DEX Router",projectId:nk}),ok=r8({connectors:rk,chains:[p0],transports:{[p0.id]:d1()}}),sk=new _8,ik=({children:e,theme:t="dark"})=>O.jsx(i8,{config:ok,children:O.jsx(rC,{client:sk,children:O.jsx(l4,{theme:t==="dark"?L1({accentColor:"#E84142",borderRadius:"large"}):ed({accentColor:"#E84142",borderRadius:"large"}),children:e})})});exports.API_BASE_URL=Bh;exports.AVALANCHE_TOKENS=$c;exports.BaseError=L;exports.DEFAULT_SLIPPAGE=jh;exports.DEX_ROUTER_ADDRESS=Oi;exports.DexRouterWidget=z9;exports.ExecutionRevertedError=mr;exports.HttpRequestError=co;exports.TransactionRejectedRpcError=Ro;exports.UserRejectedRequestError=Ee;exports.WalletConnectSessionSettlementError=Fo;exports.Web3Provider=ik;exports.call=Ho;exports.commonjsGlobal=kh;exports.concat=vt;exports.createTransport=Gu;exports.decodeErrorResult=mp;exports.en_US_default=$l;exports.encodeAbiParameters=Zn;exports.formatUnits=Ks;exports.getAugmentedNamespace=Fb;exports.getDefaultExportFromCjs=Ih;exports.getUrl=ga;exports.http=d1;exports.isAddressEqual=ri;exports.isHex=zt;exports.localBatchGatewayRequest=vp;exports.localBatchGatewayUrl=Ys;exports.stringify=_e;exports.toHex=ln;exports.wait=Hi;
|