@dcl/explore-site 0.0.1-24506067692.commit-7cbe267 → 0.0.1-24533810684.commit-08f2d1e

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.
Files changed (171) hide show
  1. package/assets/HomePage-DPGatVCF.js +3 -0
  2. package/assets/{QueryClientProvider-S2cSmCUs.js → QueryClientProvider-diWVe5Kl.js} +1 -1
  3. package/assets/{SensorsRounded-TwgeIrvl.js → SensorsRounded-B5CYaxPg.js} +1 -1
  4. package/assets/Web3Inner-z-tSs8sf.js +1 -0
  5. package/assets/Web3SyncProvider-CypbX7iI.js +3 -0
  6. package/assets/__federation_expose_App-Bndnzp1U.js +1 -0
  7. package/assets/__federation_fn_import-BPa8h49G.js +1 -0
  8. package/assets/__federation_shared_@dcl/core-web3/lazy-BxXRMbjM.js +1 -0
  9. package/assets/__federation_shared_@dcl/core-web3-Bg69b_qh.js +2 -0
  10. package/assets/__federation_shared_@dcl/{hooks-DWUL36eR.js → hooks-mIJ2xjF0.js} +3 -3
  11. package/assets/__federation_shared_@emotion/react-CyrdJVjV.js +1 -0
  12. package/assets/__federation_shared_@emotion/{styled-CutIM4hd.js → styled--75jFTzr.js} +1 -1
  13. package/assets/{__federation_shared_decentraland-ui2-OcYWz3BJ.js → __federation_shared_decentraland-ui2-dJS9Vwj5.js} +6 -6
  14. package/assets/{__federation_shared_react-redux-BsRWKqZd.js → __federation_shared_react-redux-PotGTJzf.js} +1 -1
  15. package/assets/{__federation_shared_react-router-dom-D6fN_MPs.js → __federation_shared_react-router-dom-BOdQQ4Uh.js} +1 -1
  16. package/assets/__federation_shared_viem-DDBJYZTJ.js +2 -0
  17. package/assets/{__federation_shared_wagmi-V68qkOak.js → __federation_shared_wagmi-CgLPXn48.js} +1 -1
  18. package/assets/{add-DYSzlqDi.js → add-B6OUNwc7.js} +1 -1
  19. package/assets/{all-wallets-Cz1_BP21.js → all-wallets-BwSwHRpq.js} +1 -1
  20. package/assets/{app-store-DJD6if64.js → app-store-CF95uJ5u.js} +1 -1
  21. package/assets/{apple-ONzgQNZb.js → apple-D-T8pMcm.js} +1 -1
  22. package/assets/{arrow-bottom-CS4hUU5K.js → arrow-bottom-DdhQXQwO.js} +1 -1
  23. package/assets/{arrow-bottom-circle-tskAwsAe.js → arrow-bottom-circle-CFQGU7p7.js} +1 -1
  24. package/assets/{arrow-left-lVGPT4Ol.js → arrow-left-BD_NkLWm.js} +1 -1
  25. package/assets/{arrow-right-DCzkLJ85.js → arrow-right-DkGqRZiP.js} +1 -1
  26. package/assets/{arrow-top-BfoirqVJ.js → arrow-top-moQ8S34l.js} +1 -1
  27. package/assets/{auto-track-ylAeu8GC.js → auto-track-DWK83jm7.js} +1 -1
  28. package/assets/{bank-C3Dt70oH.js → bank-wlox9c4u.js} +1 -1
  29. package/assets/{basic-t1j5X-od.js → basic-FS2Z04Mz.js} +1 -1
  30. package/assets/{biconomy-BA_1W9dm.js → biconomy-BrXNiP4h.js} +1 -1
  31. package/assets/{browser-CJ0usHLI.js → browser-CUQ2zQTB.js} +1 -1
  32. package/assets/{card-Cz1gdgq-.js → card-NrYjwqUv.js} +1 -1
  33. package/assets/{ccip-D79frVW8.js → ccip-B5vuDNHH.js} +1 -1
  34. package/assets/{checkmark-C5jp9GGl.js → checkmark-566o88C-.js} +1 -1
  35. package/assets/{checkmark-bold-BTecpTuR.js → checkmark-bold-3uwTX7px.js} +1 -1
  36. package/assets/{chevron-bottom-BkF7oESa.js → chevron-bottom-CfzwLSb9.js} +1 -1
  37. package/assets/{chevron-left-D1L-jaav.js → chevron-left-ClLgeGWx.js} +1 -1
  38. package/assets/{chevron-right-D5rt8sAi.js → chevron-right-aRPuH5to.js} +1 -1
  39. package/assets/{chevron-top-hc8gcFpH.js → chevron-top-YRpl4M0m.js} +1 -1
  40. package/assets/{chrome-store-ChFX3FT3.js → chrome-store-DsmdHqVO.js} +1 -1
  41. package/assets/{clock-CzLodk_r.js → clock-CZ7NDF6g.js} +1 -1
  42. package/assets/{close-BuQlpuUL.js → close-B5lXMNNb.js} +1 -1
  43. package/assets/{coinPlaceholder-B2Z6-yue.js → coinPlaceholder-BjCnyfne.js} +1 -1
  44. package/assets/{compass-CZUlvUVM.js → compass-CS_Os52w.js} +1 -1
  45. package/assets/{controller-BtDVd_aq.js → controller-DvdeaE6y.js} +2 -2
  46. package/assets/{copy-DJv2Nr5v.js → copy-fG_5Fn5Z.js} +1 -1
  47. package/assets/{core-C4Q-G7Te.js → core-D1JqYuOS.js} +15 -15
  48. package/assets/{createBundlerClient-Br8fYUWc.js → createBundlerClient-CubtDgsV.js} +1 -1
  49. package/assets/{createClient-C3MOjVgY.js → createClient-CR8DDHzD.js} +1 -1
  50. package/assets/{cursor-K6zf8P8P.js → cursor-CxCHAFeZ.js} +1 -1
  51. package/assets/{cursor-transparent-BEmzJfXZ.js → cursor-transparent-Cv37G82O.js} +1 -1
  52. package/assets/{decimals-CfK2GdYT.js → decimals-CM2j75PQ.js} +1 -1
  53. package/assets/{decimals-BZqhR7BL.js → decimals-oozSYzUv.js} +1 -1
  54. package/assets/{desktop-CR4ncbsC.js → desktop-CQ5gYxno.js} +1 -1
  55. package/assets/{detectExtension-DQJnzr-F.js → detectExtension-Cd7CtJnn.js} +1 -1
  56. package/assets/{disconnect-Cxy_6Sd8.js → disconnect-BWSZMzR2.js} +1 -1
  57. package/assets/{discord-CJNZyUSm.js → discord-CUDtk8iW.js} +1 -1
  58. package/assets/{emotion-react.browser.esm-IRopa27p.js → emotion-react.browser.esm-C8ovg3zA.js} +1 -1
  59. package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-Dek7Kpe6.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-ZrBNnPxm.js} +1 -1
  60. package/assets/{engine-mOtmwA6L.js → engine-BKFHNloO.js} +1 -1
  61. package/assets/{estimate-l1-fee-k8yGsKsO.js → estimate-l1-fee-CiVfMTJb.js} +1 -1
  62. package/assets/{eth_estimateGas-CmhCqkRZ.js → eth_estimateGas-DXVJK7bi.js} +1 -1
  63. package/assets/{eth_getStorageAt-CGBucoOx.js → eth_getStorageAt-BiqM4f8H.js} +1 -1
  64. package/assets/{eth_getTransactionCount-y2QsTvLw.js → eth_getTransactionCount-CWjm-hBg.js} +1 -1
  65. package/assets/{etherscan-b5mqHDR2.js → etherscan-C0HSXHEU.js} +1 -1
  66. package/assets/{exclamation-triangle-Bg5fRZpy.js → exclamation-triangle-cVJGZMmD.js} +1 -1
  67. package/assets/{extension-D1_3D1KE.js → extension-D5mTVlMf.js} +1 -1
  68. package/assets/{external-link-DUCz1m1z.js → external-link-nqqrcr3l.js} +1 -1
  69. package/assets/{extractIPFS-BeKSWGjo.js → extractIPFS-Q-wepBuj.js} +1 -1
  70. package/assets/{facebook-CvV-xdYv.js → facebook-BD0Z6bjG.js} +1 -1
  71. package/assets/{farcaster-DMlzK8Ar.js → farcaster-D5t_BpGY.js} +1 -1
  72. package/assets/{fetchTokenMetadata-C4NefnOo.js → fetchTokenMetadata-D7lU3SIa.js} +2 -2
  73. package/assets/{filters-DHyStwez.js → filters-DgOMNkF7.js} +1 -1
  74. package/assets/{get-ecosystem-wallet-info-CbWTwKG3.js → get-ecosystem-wallet-info-C7wEYhAI.js} +1 -1
  75. package/assets/{getBalance-D8M0DbBu.js → getBalance-D2STxyF1.js} +1 -1
  76. package/assets/{getInstalledModules-BurEvMNK.js → getInstalledModules-DCfjvoma.js} +1 -1
  77. package/assets/{getNFT-DQZppzzw.js → getNFT-9G3EvIo6.js} +2 -2
  78. package/assets/{getNFT-CH18R735.js → getNFT-C-zNHqto.js} +1 -1
  79. package/assets/{github-IilSsxgO.js → github-EgnJPOkx.js} +1 -1
  80. package/assets/{google-CCs_wu3I.js → google-ChAeFwWG.js} +1 -1
  81. package/assets/{help-circle-D_kmea0Q.js → help-circle-HHwusGfv.js} +1 -1
  82. package/assets/{id-CEDDxPyO.js → id-C3aQusJ1.js} +1 -1
  83. package/assets/{image-CacISnw5.js → image-DCBEX8iI.js} +1 -1
  84. package/assets/{in-app-wallet-calls-ZBHxiKkB.js → in-app-wallet-calls-BeM3jls_.js} +1 -1
  85. package/assets/{index-D0B01M8T.js → index-BNo5TVn1.js} +1 -1
  86. package/assets/{index-CeMOFIJl.js → index-BTcCF8pz.js} +1 -1
  87. package/assets/{index-C_nL-yLJ.js → index-C8369Kt3.js} +1 -1
  88. package/assets/{index-DSbNI5uF.js → index-CJxT02Ns.js} +1 -1
  89. package/assets/{index-BXOfMki0.js → index-CZsU5YW3.js} +1 -1
  90. package/assets/{index-BH6zTRml.js → index-CvY3anJm.js} +1 -1
  91. package/assets/index-Cxm_S31E.js +1 -0
  92. package/assets/{index-Bm1VTLe0.js → index-D1OpWHUo.js} +1 -1
  93. package/assets/index-DIcECrTc.js +2 -0
  94. package/assets/{index-BSdPSW5L.js → index-DRyfynLp.js} +2 -2
  95. package/assets/{index-DP4gqdTC.js → index-Dd7Rwv7H.js} +2 -2
  96. package/assets/index-Dy0yjznp.js +1 -1
  97. package/assets/index-VfkM29PH.js +1 -1
  98. package/assets/{index-DCzaGJ0h.js → index-nPgQlNn6.js} +3 -3
  99. package/assets/{index.es-f9VeuVCb.js → index.es-DNUnpMVo.js} +3 -3
  100. package/assets/{index.es-CvfHWDxQ.js → index.es-qiXhv63q.js} +1 -1
  101. package/assets/{info-DZvM_7Tg.js → info-Cg-tEK6c.js} +1 -1
  102. package/assets/{info-circle-CbTMexJv.js → info-circle-A5OoaMHb.js} +1 -1
  103. package/assets/jsx-runtime-B1l0k91v.js +1 -1
  104. package/assets/{lightbulb-yx2Mb3EV.js → lightbulb-DklKm46X.js} +1 -1
  105. package/assets/{mail-Dr3LWsa7.js → mail-BSh1g2Jd.js} +1 -1
  106. package/assets/{mobile-cqKuurbN.js → mobile-DY0gT7mE.js} +1 -1
  107. package/assets/{more-B2cKG2Cj.js → more-BMDmshJx.js} +1 -1
  108. package/assets/{network-placeholder-3q6GFkiF.js → network-placeholder-DU1RU4mB.js} +1 -1
  109. package/assets/{nftPlaceholder-PhYi3Gz0.js → nftPlaceholder-ZQBNuzRA.js} +1 -1
  110. package/assets/{off-DUI09dYV.js → off-DworvT8U.js} +1 -1
  111. package/assets/{openzeppelin-BX7BOYoL.js → openzeppelin-Cwt7PzKv.js} +1 -1
  112. package/assets/{ownerOf-BC019JN1.js → ownerOf-C-ehsDvS.js} +1 -1
  113. package/assets/{parseNft-B8R4kPQV.js → parseNft-CW2Wd1uX.js} +2 -2
  114. package/assets/{play-store-JeT38BY2.js → play-store-BUEXP4Ts.js} +1 -1
  115. package/assets/{plus--DWdZlCp.js → plus-BSLABLbR.js} +1 -1
  116. package/assets/preload-helper-rvnS1VMA.js +1 -0
  117. package/assets/{qr-code-BJDvJfO3.js → qr-code-Bhv4LYqU.js} +1 -1
  118. package/assets/{qr-overlay-ClttGQRf.js → qr-overlay-CEcTSSu9.js} +1 -1
  119. package/assets/{recycle-horizontal-Lkcjnn5n.js → recycle-horizontal-DKMdpTCz.js} +1 -1
  120. package/assets/{refresh-BT1jR4Dn.js → refresh-87LbOihu.js} +1 -1
  121. package/assets/remoteEntry.js +1 -1
  122. package/assets/{reown-logo-BS-2dm8x.js → reown-logo-BtZP1pGS.js} +1 -1
  123. package/assets/{resolveImplementation-DhbopK-R.js → resolveImplementation-Bq8n-Bjt.js} +1 -1
  124. package/assets/{search-BSl5mmgI.js → search-D5S6Hyhz.js} +1 -1
  125. package/assets/{send-CHeQ9oTi.js → send-DpgbB-mt.js} +1 -1
  126. package/assets/{send-batch-transaction-D1oj-0uI.js → send-batch-transaction-BALEJgO_.js} +1 -1
  127. package/assets/{send-eip712-transaction-RoGj1xEp.js → send-eip712-transaction-Dhph80lu.js} +2 -2
  128. package/assets/{send-gasless-transaction-BA1ne_Zw.js → send-gasless-transaction-BKHuNzKw.js} +2 -2
  129. package/assets/serializeAuthorizationList-thWU7FBF.js +1 -0
  130. package/assets/{session-proposal-D3Df17qP.js → session-proposal-HTjdwE7s.js} +1 -1
  131. package/assets/{session-request-FSnknvu5.js → session-request-BfWU2VwD.js} +2 -2
  132. package/assets/{signing-CJBbgcWH.js → signing-CPQmF9YX.js} +5 -5
  133. package/assets/slice-Dr1G42o6.js +1 -0
  134. package/assets/{swapHorizontal-cske8D4e.js → swapHorizontal-CQZjmlYk.js} +1 -1
  135. package/assets/{swapHorizontalBold-b6nHPenD.js → swapHorizontalBold-DYoOkH_7.js} +1 -1
  136. package/assets/{swapHorizontalMedium-DV93kJ8d.js → swapHorizontalMedium-GdF4wR0W.js} +1 -1
  137. package/assets/{swapHorizontalRoundedBold-B-tUcUDQ.js → swapHorizontalRoundedBold-CLPmazpV.js} +1 -1
  138. package/assets/{swapVertical-b60outJ9.js → swapVertical-Cz87s-yZ.js} +1 -1
  139. package/assets/{telegram-DYtfIm5p.js → telegram-DZICyDKX.js} +1 -1
  140. package/assets/{thirdweb-CSjGe06A.js → thirdweb-84h-CMUL.js} +3 -3
  141. package/assets/{three-dots-BEq0F5FJ.js → three-dots-BNuEs7h-.js} +1 -1
  142. package/assets/{totalSupply-CqPmrflK.js → totalSupply-Cf3-EivY.js} +1 -1
  143. package/assets/{twitch-VNmCX4fc.js → twitch-EZfFCvsb.js} +1 -1
  144. package/assets/{twitterIcon-DQdyBmm7.js → twitterIcon-D-EPzD6z.js} +1 -1
  145. package/assets/uid-Cg2-wLF5.js +44 -0
  146. package/assets/{verify-Ch-jj4sL.js → verify-C66JnFn0.js} +1 -1
  147. package/assets/{verify-filled-DAsUJrHR.js → verify-filled-CTRYZAWt.js} +1 -1
  148. package/assets/{w3m-modal-CwL-F657.js → w3m-modal-C_eW6nP7.js} +1 -1
  149. package/assets/{wait-for-tx-receipt-8QHIPUR1.js → wait-for-tx-receipt-D0woCUzS.js} +1 -1
  150. package/assets/{wallet-VPqOEzNs.js → wallet-CfN0W2cy.js} +1 -1
  151. package/assets/{wallet-placeholder-x8qRsSsI.js → wallet-placeholder-3kYYEaa5.js} +1 -1
  152. package/assets/{walletconnect-CQuMWn29.js → walletconnect-bmCQ7zYa.js} +1 -1
  153. package/assets/{wallets-DA1wJowE.js → wallets-DPgFGNNu.js} +5 -5
  154. package/assets/{warning-circle-BJ1YmKtQ.js → warning-circle-DTFLsDBk.js} +1 -1
  155. package/assets/{web-connector-C73Vanyj.js → web-connector-B-b80tlH.js} +3 -3
  156. package/assets/webSocket-CO2AWAe6.js +3 -0
  157. package/assets/{x-C855X9Jf.js → x-Btssr2Ai.js} +1 -1
  158. package/index.html +14 -16
  159. package/package.json +3 -3
  160. package/assets/HomePage-DuWKLuFD.js +0 -3
  161. package/assets/__federation_expose_App-B4QxDAu7.js +0 -1
  162. package/assets/__federation_fn_import-chtkoWq_.js +0 -1
  163. package/assets/__federation_shared_@dcl/core-web3-CqeOHBSV.js +0 -2
  164. package/assets/__federation_shared_@emotion/react-ClHMF0dJ.js +0 -1
  165. package/assets/__federation_shared_viem-CX1dsuPM.js +0 -2
  166. package/assets/index-Dr-PyceS.js +0 -2
  167. package/assets/index-qLRO6nWB.js +0 -1
  168. package/assets/preload-helper-B1n3wPb0.js +0 -1
  169. package/assets/serializeTransaction-gwTERWWq.js +0 -1
  170. package/assets/uid-BU7APsHa.js +0 -44
  171. package/assets/webSocket-G5Mbc2fm.js +0 -3
@@ -1,4 +1,4 @@
1
- import{importShared as Pe}from"./__federation_fn_import-chtkoWq_.js";import{r as he}from"./index-Dy0yjznp.js";var ie={exports:{}},le={};/**
1
+ import{importShared as Pe}from"./__federation_fn_import-BPa8h49G.js";import{r as he}from"./index-Dy0yjznp.js";var ie={exports:{}},le={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-with-selector.production.js
4
4
  *
@@ -1,4 +1,4 @@
1
- import{importShared as le}from"./__federation_fn_import-chtkoWq_.js";/**
1
+ import{importShared as le}from"./__federation_fn_import-BPa8h49G.js";/**
2
2
  * react-router v7.9.6
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
@@ -0,0 +1,2 @@
1
+ import{ch as Pt,ag as zt,ah as Dt,ci as ze,af as St,cj as De,aj as Ft,c5 as yt,u as C,c7 as tt,c8 as Mt,ck as Me,N as z,a2 as bt,O as F,cl as Gt,bO as Ht,B as et,V as xt,a5 as J,cm as Ge,r as Ot,f as wt,h as Vt,R as Y,aW as He,cn as Oe,co as Ve,cp as je,cq as We,cr as Ke,cs as Ze,aw as U,aU as q,U as X,t as Ye,l as Je,a as jt,ct as Xe,K as G,cu as ft,w as M,b as E,j as Qe,cv as tn,cw as en,cx as W,bE as Bt,G as nn,cy as Wt,an as Kt,bT as nt,S as an,i as at,k as B,cz as sn,cA as H,a1 as P,A as rn,C as on,D as cn,cB as kt,cC as un,cD as dn,cE as fn,a4 as ln,cF as mn,aI as hn,bR as pn,bS as gn,cG as yn,cH as bn,aA as Et,bq as xn,br as Zt,bz as wn,cI as lt,bu as Yt,cJ as En,s as In,a7 as Tn,a8 as vn,aS as An,aP as Cn,bf as Pn,cK as Sn,M as Jt,cb as Fn,P as It,c6 as Bn,c as kn,c0 as Rn,X as Rt,a3 as Nn,cL as _n,cM as qn,cN as Xt,J as Un,c9 as Qt,cO as te,cP as $n,c3 as Ln,c2 as zn,ad as Dn,bc as Mn,aZ as Gn,cQ as Hn,cR as On,cS as Vn,cT as Nt,cU as jn}from"./uid-Cg2-wLF5.js";import{eI as so,aQ as ro,eJ as oo,eK as io,aq as co,ap as uo,eL as fo,aL as lo,aN as mo,aO as ho,ar as po,as as go,am as yo,fe as bo,a$ as xo,a_ as wo,f1 as Eo,c1 as Io,eQ as To,b0 as vo,bY as Ao,b6 as Co,eR as Po,eS as So,eT as Fo,cV as Bo,eU as ko,a0 as Ro,$ as No,_ as _o,eV as qo,b2 as Uo,f2 as $o,f0 as Lo,F as zo,f4 as Do,fg as Mo,H as Go,f5 as Ho,eY as Oo,bg as Vo,f6 as jo,f7 as Wo,eM as Ko,eN as Zo,ai as Yo,cW as Jo,at as Xo,eZ as Qo,I as ti,eO as ei,fj as ni,cX as ai,e_ as si,cY as ri,cZ as oi,bh as ii,c_ as ci,fk as ui,bj as di,fh as fi,c$ as li,p as mi,d0 as hi,fl as pi,ba as gi,bb as yi,f3 as bi,bi as xi,aV as wi,f8 as Ei,f9 as Ii,fa as Ti,bk as vi,b7 as Ai,fc as Ci,be as Pi,bd as Si,fd as Fi,cg as Bi,eW as ki,e$ as Ri,eX as Ni,bn as _i,d1 as qi,ff as Ui,b5 as $i,bl as Li,T as zi,fi as Di,bM as Mi,bN as Gi,fb as Hi,b9 as Oi,b1 as Vi,aY as ji,d2 as Wi,d3 as Ki,b3 as Zi,b4 as Yi,b8 as Ji,d4 as Xi,b$ as Qi,bo as tc,x as ec,z as nc,fy as ac,fr as sc,fs as rc,ft as oc,fA as ic,fu as cc,y as uc,fo as dc,d as fc,a9 as lc,ab as mc,ac as hc,fD as pc,da as gc,fL as yc,e as bc,bW as xc,d8 as wc,d5 as Ec,d6 as Ic,d9 as Tc,bV as vc,bX as Ac,d7 as Cc,fM as Pc,Z as Sc,aa as Fc,a6 as Bc,fN as kc,fv as Rc,fw as Nc,ao as _c,aF as qc,aM as Uc,fH as $c,ak as Lc,fH as zc,q as Dc,cd as Mc,fI as Gc,fJ as Hc,bZ as Oc,fB as Vc,fx as jc,dn as Wc,dp as Kc,dq as Zc,dr as Yc,ds as Jc,dt as Xc,du as Qc,dc as tu,dv as eu,dw as nu,dx as au,dy as su,dz as ru,dA as ou,dB as iu,dC as cu,dD as uu,dE as du,dd as fu,dF as lu,dG as mu,dH as hu,de as pu,df as gu,dg as yu,dh as bu,di as xu,dj as wu,db as Eu,dk as Iu,dl as Tu,dm as vu,dU as Au,dV as Cu,dW as Pu,dX as Su,dY as Fu,dZ as Bu,d_ as ku,dJ as Ru,d$ as Nu,e0 as _u,e1 as qu,e2 as Uu,e3 as $u,e4 as Lu,e5 as zu,e6 as Du,e7 as Mu,e8 as Gu,dK as Hu,e9 as Ou,ea as Vu,m as ju,dL as Wu,dM as Ku,dN as Zu,dO as Yu,dP as Ju,dQ as Xu,dI as Qu,dR as td,dS as ed,dT as nd,en as ad,eo as sd,ep as rd,eq as od,er as id,es as cd,et as ud,ec as dd,eu as fd,ev as ld,ew as md,ex as hd,ey as pd,ez as gd,eA as yd,eB as bd,eC as xd,eD as wd,ed as Ed,eE as Id,eF as Td,eG as vd,ee as Ad,ef as Cd,eg as Pd,eh as Sd,ei as Fd,ej as Bd,eb as kd,ek as Rd,el as Nd,em as _d,bQ as qd,fz as Ud,fp as $d,W as Ld,fm as zd,fK as Dd,fE as Md,cf as Gd,eP as Hd,fF as Od,fq as Vd,ax as jd,fn as Wd,fG as Kd,aM as Zd,fH as Yd,fG as Jd,ak as Xd,fH as Qd,fC as tf,bV as ef,bX as nf,ce as af,eH as sf,aX as rf}from"./uid-Cg2-wLF5.js";import{c as ee,e as ne,p as Wn,v as Kn,u as Zn,h as ae,w as Yn,b as mt,k as Jn,d as se,f as Xn,g as re,i as oe,j as ie,m as ce,n as Tt,s as ue,o as de,q as fe,r as le,t as me,x as he,y as Qn,z as ta,A as ea,B as na,C as aa,D as sa,E as ra,F as oa,G as ia,H as ca,I as ua,J as da,K as fa,L as la,M as ma,N as pe,O as ha,P as pa,Q as ga,R as ya,S as ba,T as xa,U as wa,V as Ea,W as Ia,X as Ta,Y as va,Z as Aa,_ as Ca,$ as Pa,a0 as Sa,a1 as vt}from"./webSocket-CO2AWAe6.js";import{a7 as cf,a8 as uf,a9 as df,aa as ff,ab as lf,a3 as mf,ac as hf,ad as pf,ae as gf,a4 as yf,af as bf,ag as xf,a2 as wf,a6 as Ef,aj as If,aj as Tf,ak as vf,a5 as Af,ah as Cf,ai as Pf}from"./webSocket-CO2AWAe6.js";import{e as Fa,p as ge,a as At}from"./createClient-CR8DDHzD.js";import{c as Ff,n as Bf,r as kf,s as Rf,z as Nf}from"./createClient-CR8DDHzD.js";import{ccipRequest as qf,ccipRequest as Uf,offchainLookup as $f,offchainLookupAbiItem as Lf,offchainLookupSignature as zf}from"./ccip-B5vuDNHH.js";import{d as Mf,e as Gf}from"./defineChain-7I0Ce1VT.js";import{a as Ba,b as ka,c as Ra,d as Na,e as _a,s as qa}from"./serializeAuthorizationList-thWU7FBF.js";import{f as Of}from"./serializeAuthorizationList-thWU7FBF.js";function _t(t){let e;if(typeof t=="string")e=Pt(t);else{const n=zt(t),a=t.length;for(let s=0;s<a;s++){const r=t[s];if(!Dt(r)){e=Pt(r,n);break}}}if(!e)throw new ze({signature:t});return e}function Cr(t){let e;if(typeof t=="string")e=St(t,{modifiers:Ft});else{const n=zt(t),a=t.length;for(let s=0;s<a;s++){const r=t[s];if(!Dt(r)){e=St(r,{modifiers:Ft,structs:n});break}}}if(!e)throw new De({param:t});return e}async function ye(t,e){const{account:n=t.account,blockNumber:a,blockTag:s="latest",blobs:r,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:f,to:h,value:d,...p}=e,m=n?z(n):void 0;try{yt(e);const b=(typeof a=="bigint"?C(a):void 0)||s,w=t.chain?.formatters?.transactionRequest?.format,v=(w||tt)({...Mt(p,{format:w}),account:m,blobs:r,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:f,to:h,value:d},"createAccessList"),I=await t.request({method:"eth_createAccessList",params:[v,b]});return{accessList:I.accessList,gasUsed:BigInt(I.gasUsed)}}catch(g){throw Me(g,{...e,account:m,chain:t.chain})}}async function Ua(t){const e=ee(t,{method:"eth_newBlockFilter"}),n=await t.request({method:"eth_newBlockFilter"});return{id:n,request:e(n),type:"block"}}async function be(t,{address:e,args:n,event:a,events:s,fromBlock:r,strict:o,toBlock:i}={}){const c=s??(a?[a]:void 0),u=ee(t,{method:"eth_newFilter"});let l=[];c&&(l=[c.flatMap(d=>ne({abi:[d],eventName:d.name,args:n}))],a&&(l=l[0]));const f=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof r=="bigint"?C(r):r,toBlock:typeof i=="bigint"?C(i):i,...l.length?{topics:l}:{}}]});return{abi:c,args:n,eventName:a?a.name:void 0,fromBlock:r,id:f,request:u(f),strict:!!o,toBlock:i,type:"event"}}async function xe(t,e){const{abi:n,address:a,args:s,functionName:r,dataSuffix:o,...i}=e,c=bt({abi:n,args:s,functionName:r});try{return await F(t,Gt,"estimateGas")({data:`${c}${o?o.replace("0x",""):""}`,to:a,...i})}catch(u){const l=i.account?z(i.account):void 0;throw Ht(u,{abi:n,address:a,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:r,sender:l?.address})}}async function $a(t){const e=await t.request({method:"eth_blobBaseFee"});return BigInt(e)}class La extends et{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function za(t,e){const{address:n,factory:a,factoryData:s}=e;try{const[r,o,i,c,u,l,f]=await F(t,xt,"readContract")({abi:Da,address:n,functionName:"eip712Domain",factory:a,factoryData:s});return{domain:{name:o,version:i,chainId:Number(c),verifyingContract:u,salt:l},extensions:f,fields:r}}catch(r){const o=r;throw o.name==="ContractFunctionExecutionError"&&o.cause.name==="ContractFunctionZeroDataError"?new La({address:n}):o}}const Da=[{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"}];async function Ma(t,{filter:e}){const n=e.strict??!1,s=(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(r=>J(r));return e.abi?Wn({abi:e.abi,logs:s,strict:n}):s}function Pr(t,e){if(t.length!==e.length)throw new Ge({expectedLength:t.length,givenLength:e.length});const n=[];for(let a=0;a<t.length;a++){const s=t[a],r=e[a];n.push(we(s,r))}return Ot(n)}function we(t,e,n=!1){if(t==="address"){const o=e;if(!wt(o))throw new Vt({address:o});return Y(o.toLowerCase(),{size:n?32:null})}if(t==="string")return He(e);if(t==="bytes")return e;if(t==="bool")return Y(Oe(e),{size:n?32:1});const a=t.match(Ve);if(a){const[o,i,c="256"]=a,u=Number.parseInt(c,10)/8;return C(e,{size:n?32:u,signed:i==="int"})}const s=t.match(je);if(s){const[o,i]=s;if(Number.parseInt(i,10)!==(e.length-2)/2)throw new We({expectedSize:Number.parseInt(i,10),givenSize:(e.length-2)/2});return Y(e,{dir:"right",size:n?32:null})}const r=t.match(Ke);if(r&&Array.isArray(e)){const[o,i]=r,c=[];for(let u=0;u<e.length;u++)c.push(we(i,e[u],!0));return c.length===0?"0x":Ot(c)}throw new Ze(t)}function qt(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Sr(t){return t.opcode==="CREATE2"?Ha(t):Ga(t)}function Ga(t){const e=U(q(t.from));let n=U(t.nonce);return n[0]===0&&(n=new Uint8Array([])),q(`0x${X(Ye([e,n],"bytes")).slice(26)}`)}function Ha(t){const e=U(q(t.from)),n=Y(qt(t.salt)?t.salt:U(t.salt),{size:32}),a="bytecodeHash"in t?qt(t.bytecodeHash)?t.bytecodeHash:U(t.bytecodeHash):X(t.bytecode,"bytes");return q(Je(X(jt([U("0xff"),e,n,a])),12))}function Fr({chains:t,id:e}){return t.find(n=>n.id===e)}function Ee(t,e="hex"){const n=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Xe(t);return G(t)}return t})(),a=ft(n,{recursiveReadLimit:Number.POSITIVE_INFINITY});return Ie(a,e)}function Ie(t,e="hex"){if(t.bytes.length===0)return e==="hex"?M(t.bytes):t.bytes;const n=t.readByte();if(n<128&&t.decrementPosition(1),n<192){const s=Ut(t,n,128),r=t.readBytes(s);return e==="hex"?M(r):r}const a=Ut(t,n,192);return Oa(t,a,e)}function Ut(t,e,n){if(n===128&&e<128)return 1;if(e<=n+55)return e-n;if(e===n+55+1)return t.readUint8();if(e===n+55+2)return t.readUint16();if(e===n+55+3)return t.readUint24();if(e===n+55+4)return t.readUint32();throw new et("Invalid RLP prefix")}function Oa(t,e,n){const a=t.position,s=[];for(;t.position-a<e;)s.push(Ie(t,n));return s}function Va(t){return E(t)&&Qe(t)===32}const ja=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Te=Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)),Wa=Te.map(t=>(9*t+5)%16),ve=(()=>{const n=[[Te],[Wa]];for(let a=0;a<4;a++)for(let s of n)s.push(s[a].map(r=>ja[r]));return n})(),Ae=ve[0],Ce=ve[1],Pe=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),Ka=Ae.map((t,e)=>t.map(n=>Pe[e][n])),Za=Ce.map((t,e)=>t.map(n=>Pe[e][n])),Ya=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),Ja=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function $t(t,e,n,a){return t===0?e^n^a:t===1?e&n|~e&a:t===2?(e|~n)^a:t===3?e&a|n&~a:e^(n|~a)}const K=new Uint32Array(16);class Xa extends en{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:n,h2:a,h3:s,h4:r}=this;return[e,n,a,s,r]}set(e,n,a,s,r){this.h0=e|0,this.h1=n|0,this.h2=a|0,this.h3=s|0,this.h4=r|0}process(e,n){for(let d=0;d<16;d++,n+=4)K[d]=e.getUint32(n,!0);let a=this.h0|0,s=a,r=this.h1|0,o=r,i=this.h2|0,c=i,u=this.h3|0,l=u,f=this.h4|0,h=f;for(let d=0;d<5;d++){const p=4-d,m=Ya[d],g=Ja[d],b=Ae[d],w=Ce[d],T=Ka[d],v=Za[d];for(let I=0;I<16;I++){const y=W(a+$t(d,r,i,u)+K[b[I]]+m,T[I])+f|0;a=f,f=u,u=W(i,10)|0,i=r,r=y}for(let I=0;I<16;I++){const y=W(s+$t(p,o,c,l)+K[w[I]]+g,v[I])+h|0;s=h,h=l,l=W(c,10)|0,c=o,o=y}}this.set(this.h1+i+l|0,this.h2+u+h|0,this.h3+f+s|0,this.h4+a+o|0,this.h0+r+c|0)}roundClean(){Bt(K)}destroy(){this.destroyed=!0,Bt(this.buffer),this.set(0,0,0,0,0)}}const Qa=tn(()=>new Xa),ts=Qa;function Br(t,e){const n=e||"hex",a=ts(E(t,{strict:!1})?U(t):t);return n==="bytes"?a:nn(a)}function es(t){return Wt(t,-32)===Fa}function ns(t){return Kn(t)}function kr(t){if(!es(t))return{signature:t};const[e,n,a]=Kt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:n,signature:a}}function Rr(t){if(!ns(t))return{signature:t};const{authorization:e,to:n,...a}=Zn(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:C(e.r,{size:32}),s:C(e.s,{size:32}),yParity:e.yParity},...n?{address:n}:{},...a}}async function as({message:t,signature:e}){return nt({hash:ae(t),signature:e})}async function ss(t){const{domain:e,message:n,primaryType:a,signature:s,types:r}=t;return nt({hash:an({domain:e,message:n,primaryType:a,types:r}),signature:s})}function Nr(t){const{address:e,data:n,signature:a,to:s="hex"}=t,r=Yn({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:n,signature:a,to:e});return s==="hex"?r:G(r)}async function _r({address:t,hash:e,signature:n}){return at(q(t),await nt({hash:e,signature:n}))}async function qr({address:t,message:e,signature:n}){return at(q(t),await as({message:e,signature:n}))}async function Ur(t){const{address:e,domain:n,message:a,primaryType:s,signature:r,types:o}=t;return at(q(e),await ss({domain:n,message:a,primaryType:s,signature:r,types:o}))}function rs(t){const e=Wt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&B(e)>=192)return"legacy";throw new sn({serializedType:e})}function os(t){const e=rs(t);return e==="eip1559"?us(t):e==="eip2930"?ds(t):e==="eip4844"?cs(t):e==="eip7702"?is(t):fs(t)}function is(t){const e=st(t),[n,a,s,r,o,i,c,u,l,f,h,d,p]=e;if(e.length!==10&&e.length!==13)throw new H({attributes:{chainId:n,nonce:a,maxPriorityFeePerGas:s,maxFeePerGas:r,gas:o,to:i,value:c,data:u,accessList:l,authorizationList:f,...e.length>9?{v:h,r:d,s:p}:{}},serializedTransaction:t,type:"eip7702"});const m={chainId:B(n),type:"eip7702"};return E(i)&&i!=="0x"&&(m.to=i),E(o)&&o!=="0x"&&(m.gas=P(o)),E(u)&&u!=="0x"&&(m.data=u),E(a)&&(m.nonce=a==="0x"?0:B(a)),E(c)&&c!=="0x"&&(m.value=P(c)),E(r)&&r!=="0x"&&(m.maxFeePerGas=P(r)),E(s)&&s!=="0x"&&(m.maxPriorityFeePerGas=P(s)),l.length!==0&&l!=="0x"&&(m.accessList=rt(l)),f.length!==0&&f!=="0x"&&(m.authorizationList=ls(f)),Ba(m),{...e.length===13?O(e):void 0,...m}}function cs(t){const e=st(t),n=e.length===4,a=n?e[0]:e,s=n?e.slice(1):[],[r,o,i,c,u,l,f,h,d,p,m,g,b,w]=a,[T,v,I]=s;if(!(a.length===11||a.length===14))throw new H({attributes:{chainId:r,nonce:o,maxPriorityFeePerGas:i,maxFeePerGas:c,gas:u,to:l,value:f,data:h,accessList:d,...a.length>9?{v:g,r:b,s:w}:{}},serializedTransaction:t,type:"eip4844"});const y={blobVersionedHashes:m,chainId:B(r),to:l,type:"eip4844"};return E(u)&&u!=="0x"&&(y.gas=P(u)),E(h)&&h!=="0x"&&(y.data=h),E(o)&&(y.nonce=o==="0x"?0:B(o)),E(f)&&f!=="0x"&&(y.value=P(f)),E(p)&&p!=="0x"&&(y.maxFeePerBlobGas=P(p)),E(c)&&c!=="0x"&&(y.maxFeePerGas=P(c)),E(i)&&i!=="0x"&&(y.maxPriorityFeePerGas=P(i)),d.length!==0&&d!=="0x"&&(y.accessList=rt(d)),T&&v&&I&&(y.sidecars=rn({blobs:T,commitments:v,proofs:I})),ka(y),{...a.length===14?O(a):void 0,...y}}function us(t){const e=st(t),[n,a,s,r,o,i,c,u,l,f,h,d]=e;if(!(e.length===9||e.length===12))throw new H({attributes:{chainId:n,nonce:a,maxPriorityFeePerGas:s,maxFeePerGas:r,gas:o,to:i,value:c,data:u,accessList:l,...e.length>9?{v:f,r:h,s:d}:{}},serializedTransaction:t,type:"eip1559"});const p={chainId:B(n),type:"eip1559"};return E(i)&&i!=="0x"&&(p.to=i),E(o)&&o!=="0x"&&(p.gas=P(o)),E(u)&&u!=="0x"&&(p.data=u),E(a)&&(p.nonce=a==="0x"?0:B(a)),E(c)&&c!=="0x"&&(p.value=P(c)),E(r)&&r!=="0x"&&(p.maxFeePerGas=P(r)),E(s)&&s!=="0x"&&(p.maxPriorityFeePerGas=P(s)),l.length!==0&&l!=="0x"&&(p.accessList=rt(l)),Ra(p),{...e.length===12?O(e):void 0,...p}}function ds(t){const e=st(t),[n,a,s,r,o,i,c,u,l,f,h]=e;if(!(e.length===8||e.length===11))throw new H({attributes:{chainId:n,nonce:a,gasPrice:s,gas:r,to:o,value:i,data:c,accessList:u,...e.length>8?{v:l,r:f,s:h}:{}},serializedTransaction:t,type:"eip2930"});const d={chainId:B(n),type:"eip2930"};return E(o)&&o!=="0x"&&(d.to=o),E(r)&&r!=="0x"&&(d.gas=P(r)),E(c)&&c!=="0x"&&(d.data=c),E(a)&&(d.nonce=a==="0x"?0:B(a)),E(i)&&i!=="0x"&&(d.value=P(i)),E(s)&&s!=="0x"&&(d.gasPrice=P(s)),u.length!==0&&u!=="0x"&&(d.accessList=rt(u)),Na(d),{...e.length===11?O(e):void 0,...d}}function fs(t){const e=Ee(t,"hex"),[n,a,s,r,o,i,c,u,l]=e;if(!(e.length===6||e.length===9))throw new H({attributes:{nonce:n,gasPrice:a,gas:s,to:r,value:o,data:i,...e.length>6?{v:c,r:u,s:l}:{}},serializedTransaction:t,type:"legacy"});const f={type:"legacy"};if(E(r)&&r!=="0x"&&(f.to=r),E(s)&&s!=="0x"&&(f.gas=P(s)),E(i)&&i!=="0x"&&(f.data=i),E(n)&&(f.nonce=n==="0x"?0:B(n)),E(o)&&o!=="0x"&&(f.value=P(o)),E(a)&&a!=="0x"&&(f.gasPrice=P(a)),_a(f),e.length===6)return f;const h=E(c)&&c!=="0x"?P(c):0n;if(l==="0x"&&u==="0x")return h>0&&(f.chainId=Number(h)),f;const d=h,p=Number((d-35n)/2n);if(p>0)f.chainId=p;else if(d!==27n&&d!==28n)throw new on({v:d});return f.v=d,f.s=l,f.r=u,f.yParity=d%2n===0n?1:0,f}function st(t){return Ee(`0x${t.slice(4)}`,"hex")}function rt(t){const e=[];for(let n=0;n<t.length;n++){const[a,s]=t[n];if(!wt(a,{strict:!1}))throw new Vt({address:a});e.push({address:a,storageKeys:s.map(r=>Va(r)?r:cn(r))})}return e}function ls(t){const e=[];for(let n=0;n<t.length;n++){const[a,s,r,o,i,c]=t[n];e.push({address:s,chainId:a==="0x"?0:B(a),nonce:r==="0x"?0:B(r),...O([o,i,c])})}return e}function O(t){const e=t.slice(-3),n=e[0]==="0x"||P(e[0])===0n?27n:28n;return{r:kt(e[1],{size:32}),s:kt(e[2],{size:32}),v:n,yParity:n===27n?0:1}}class ms extends et{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Se(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new ms({value:t});let[n,a="0"]=t.split(".");const s=n.startsWith("-");if(s&&(n=n.slice(1)),a=a.replace(/(0+)$/,""),e===0)Math.round(+`.${a}`)===1&&(n=`${BigInt(n)+1n}`),a="";else if(a.length>e){const[r,o,i]=[a.slice(0,e-1),a.slice(e-1,e),a.slice(e)],c=Math.round(+`${o}.${i}`);c>9?a=`${BigInt(r)+BigInt(1)}0`.padStart(r.length+1,"0"):a=`${r}${c}`,a.length>e&&(a=a.slice(1),n=`${BigInt(n)+1n}`),a=a.slice(0,e)}else a=a.padEnd(e,"0");return BigInt(`${s?"-":""}${n}${a}`)}function $r(t,e="wei"){return Se(t,un[e])}function Lr(t,e="wei"){return Se(t,dn[e])}async function ht(t,e){const{blockNumber:n,blockTag:a=t.experimental_blockTag??"latest",blocks:s,returnFullTransactions:r,traceTransfers:o,validation:i}=e;try{const c=[];for(const h of s){const d=h.blockOverrides?fn(h.blockOverrides):void 0,p=h.calls.map(g=>{const b=g,w=b.account?z(b.account):void 0,T=b.abi?bt(b):b.data,v={...b,account:w,data:b.dataSuffix?jt([T||"0x",b.dataSuffix]):T,from:b.from??w?.address};return yt(v),tt(v)}),m=h.stateOverrides?ln(h.stateOverrides):void 0;c.push({blockOverrides:d,calls:p,stateOverrides:m})}const l=(typeof n=="bigint"?C(n):void 0)||a;return(await t.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:r,traceTransfers:o,validation:i},l]})).map((h,d)=>({...mn(h),calls:h.calls.map((p,m)=>{const{abi:g,args:b,functionName:w,to:T}=s[d].calls[m],v=p.error?.data??p.returnData,I=BigInt(p.gasUsed),y=p.logs?.map(R=>J(R)),A=p.status==="0x1"?"success":"failure",k=g&&A==="success"&&v!=="0x"?hn({abi:g,data:v,functionName:w}):null,_=(()=>{if(A==="success")return;let R;if(p.error?.data==="0x"?R=new pn:p.error&&(R=new gn(p.error)),!!R)return Ht(R,{abi:g??[],address:T??"0x",args:b,functionName:w??"<unknown>"})})();return{data:v,gasUsed:I,logs:y,status:A,...A==="success"?{result:k}:{error:_}}})}))}catch(c){const u=c,l=yn(u,{});throw l instanceof bn?u:l}}function pt(t){let e=!0,n="",a=0,s="",r=!1;for(let o=0;o<t.length;o++){const i=t[o];if(["(",")",","].includes(i)&&(e=!0),i==="("&&a++,i===")"&&a--,!!e){if(a===0){if(i===" "&&["event","function","error",""].includes(s))s="";else if(s+=i,i===")"){r=!0;break}continue}if(i===" "){t[o-1]!==","&&n!==","&&n!==",("&&(n="",e=!1);continue}s+=i,n+=i}}if(!r)throw new Et("Unable to normalize signature.");return s}function gt(t,e){const n=typeof t,a=e.type;switch(a){case"address":return mt(t,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return a==="tuple"&&"components"in e?Object.values(e.components).every((s,r)=>gt(Object.values(t)[r],s)):/^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(a)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(a)?n==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(a)?Array.isArray(t)&&t.every(s=>gt(s,{...e,type:a.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Fe(t,e,n){for(const a in t){const s=t[a],r=e[a];if(s.type==="tuple"&&r.type==="tuple"&&"components"in s&&"components"in r)return Fe(s.components,r.components,n[a]);const o=[s.type,r.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?mt(n[a],{strict:!1}):o.includes("address")&&o.includes("bytes")?mt(n[a],{strict:!1}):!1)return o}}function Be(t,e={}){const{prepare:n=!0}=e,a=Array.isArray(t)||typeof t=="string"?_t(t):t;return{...a,...n?{hash:L(a)}:{}}}function ot(t,e,n){const{args:a=[],prepare:s=!0}=n??{},r=xn(e,{strict:!1}),o=t.filter(u=>r?u.type==="function"||u.type==="error"?ke(u)===Zt(e,0,4):u.type==="event"?L(u)===e:!1:"name"in u&&u.name===e);if(o.length===0)throw new Q({name:e});if(o.length===1)return{...o[0],...s?{hash:L(o[0])}:{}};let i;for(const u of o){if(!("inputs"in u))continue;if(!a||a.length===0){if(!u.inputs||u.inputs.length===0)return{...u,...s?{hash:L(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==a.length)continue;if(a.every((f,h)=>{const d="inputs"in u&&u.inputs[h];return d?gt(f,d):!1})){if(i&&"inputs"in i&&i.inputs){const f=Fe(u.inputs,i.inputs,a);if(f)throw new ps({abiItem:u,type:f[0]},{abiItem:i,type:f[1]})}i=u}}const c=(()=>{if(i)return i;const[u,...l]=o;return{...u,overloads:l}})();if(!c)throw new Q({name:e});return{...c,...s?{hash:L(c)}:{}}}function ke(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,a]=t;return ot(n,a)}return t[0]})();return Zt(L(e),0,4)}function hs(...t){const e=(()=>{if(Array.isArray(t[0])){const[a,s]=t;return ot(a,s)}return t[0]})(),n=typeof e=="string"?e:lt(e);return pt(n)}function L(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,a]=t;return ot(n,a)}return t[0]})();return typeof e!="string"&&"hash"in e&&e.hash?e.hash:Jn(wn(hs(e)))}class ps extends Et{constructor(e,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${pt(lt(e.abiItem))}\`, and`,`\`${n.type}\` in \`${pt(lt(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 Q extends Et{constructor({name:e,data:n,type:a="item"}){const s=e?` with name "${e}"`:n?` with data "${n}"`:"";super(`ABI ${a}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function gs(...t){const[e,n]=(()=>{if(Array.isArray(t[0])){const[r,o]=t;return[bs(r),o]}return t})(),{bytecode:a,args:s}=n;return Yt(a,e.inputs?.length&&s?.length?se(e.inputs,s):"0x")}function ys(t){return Be(t)}function bs(t){const e=t.find(n=>n.type==="constructor");if(!e)throw new Q({name:"constructor"});return e}function xs(...t){const[e,n=[]]=(()=>{if(Array.isArray(t[0])){const[u,l,f]=t;return[Lt(u,l,{args:f}),f]}const[i,c]=t;return[i,c]})(),{overloads:a}=e,s=a?Lt([e,...a],e.name,{args:n}):e,r=ws(s),o=n.length>0?se(s.inputs,n):void 0;return o?Yt(r,o):r}function $(t,e={}){return Be(t,e)}function Lt(t,e,n){const a=ot(t,e,n);if(a.type!=="function")throw new Q({name:e,type:"function"});return a}function ws(t){return ke(t)}const Es="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",N="0x0000000000000000000000000000000000000000",Is="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function Ts(t,e){const{blockNumber:n,blockTag:a,calls:s,stateOverrides:r,traceAssetChanges:o,traceTransfers:i,validation:c}=e,u=e.account?z(e.account):void 0;if(o&&!u)throw new et("`account` is required when `traceAssetChanges` is true");const l=u?gs(ys("constructor(bytes, bytes)"),{bytecode:En,args:[Is,xs($("function getBalance(address)"),[u.address])]}):void 0,f=o?await Promise.all(e.calls.map(async x=>{if(!x.data&&!x.abi)return;const{accessList:S}=await ye(t,{account:u.address,...x,data:x.abi?bt(x):x.data});return S.map(({address:D,storageKeys:j})=>j.length>0?D:null)})).then(x=>x.flat().filter(Boolean)):[],h=await ht(t,{blockNumber:n,blockTag:a,blocks:[...o?[{calls:[{data:l}],stateOverrides:r},{calls:f.map((x,S)=>({abi:[$("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:x,from:N,nonce:S})),stateOverrides:[{address:N,nonce:0}]}]:[],{calls:[...s,{}].map(x=>({...x,from:u?.address})),stateOverrides:r},...o?[{calls:[{data:l}]},{calls:f.map((x,S)=>({abi:[$("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:x,from:N,nonce:S})),stateOverrides:[{address:N,nonce:0}]},{calls:f.map((x,S)=>({to:x,abi:[$("function decimals() returns (uint256)")],functionName:"decimals",from:N,nonce:S})),stateOverrides:[{address:N,nonce:0}]},{calls:f.map((x,S)=>({to:x,abi:[$("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:N,nonce:S})),stateOverrides:[{address:N,nonce:0}]},{calls:f.map((x,S)=>({to:x,abi:[$("function symbol() returns (string)")],functionName:"symbol",from:N,nonce:S})),stateOverrides:[{address:N,nonce:0}]}]:[]],traceTransfers:i,validation:c}),d=o?h[2]:h[0],[p,m,,g,b,w,T,v]=o?h:[],{calls:I,...y}=d,A=I.slice(0,-1)??[],k=p?.calls??[],_=m?.calls??[],R=[...k,..._].map(x=>x.status==="success"?P(x.data):null),it=g?.calls??[],V=b?.calls??[],Re=[...it,...V].map(x=>x.status==="success"?P(x.data):null),Ne=(w?.calls??[]).map(x=>x.status==="success"?x.result:null),_e=(v?.calls??[]).map(x=>x.status==="success"?x.result:null),qe=(T?.calls??[]).map(x=>x.status==="success"?x.result:null),ct=[];for(const[x,S]of Re.entries()){const D=R[x];if(typeof S!="bigint"||typeof D!="bigint")continue;const j=Ne[x-1],Ue=_e[x-1],$e=qe[x-1],Ct=x===0?{address:Es,decimals:18,symbol:"ETH"}:{address:f[x-1],decimals:$e||j?Number(j??1):void 0,symbol:Ue??void 0};ct.some(Le=>Le.token.address===Ct.address)||ct.push({token:Ct,value:{pre:D,post:S,diff:S-D}})}return{assetChanges:ct,block:y,results:A}}function vs(t,{address:e,args:n,batch:a=!0,event:s,events:r,fromBlock:o,onError:i,onLogs:c,poll:u,pollingInterval:l=t.pollingInterval,strict:f}){const h=typeof u<"u"?u:typeof o=="bigint"?!0:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].config.type==="webSocket"||t.transport.transports[0].config.type==="ipc")),d=f??!1;return h?(()=>{const g=In(["watchEvent",e,n,a,t.uid,s,l,o]);return Tn(g,{onLogs:c,onError:i},b=>{let w;o!==void 0&&(w=o-1n);let T,v=!1;const I=vn(async()=>{if(!v){try{T=await F(t,be,"createEventFilter")({address:e,args:n,event:s,events:r,strict:d,fromBlock:o})}catch{}v=!0;return}try{let y;if(T)y=await F(t,oe,"getFilterChanges")({filter:T});else{const A=await F(t,ie,"getBlockNumber")({});w&&w!==A?y=await F(t,ce,"getLogs")({address:e,args:n,event:s,events:r,fromBlock:w+1n,toBlock:A}):y=[],w=A}if(y.length===0)return;if(a)b.onLogs(y);else for(const A of y)b.onLogs([A])}catch(y){T&&y instanceof Pn&&(v=!1),b.onError?.(y)}},{emitOnBegin:!0,interval:l});return async()=>{T&&await F(t,re,"uninstallFilter")({filter:T}),I()}})})():(()=>{let g=!0,b=()=>g=!1;return(async()=>{try{const w=(()=>{if(t.transport.type==="fallback"){const y=t.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return y?y.value:t.transport}return t.transport})(),T=r??(s?[s]:void 0);let v=[];T&&(v=[T.flatMap(A=>ne({abi:[A],eventName:A.name,args:n}))],s&&(v=v[0]));const{unsubscribe:I}=await w.subscribe({params:["logs",{address:e,topics:v}],onData(y){if(!g)return;const A=y.result;try{const{eventName:k,args:_}=Xn({abi:T??[],data:A.data,topics:A.topics,strict:d}),R=J(A,{args:_,eventName:k});c([R])}catch(k){let _,R;if(k instanceof An||k instanceof Cn){if(f)return;_=k.abiItem.name,R=k.abiItem.inputs?.some(V=>!("name"in V&&V.name))}const it=J(A,{args:R?[]:{},eventName:_});c([it])}},onError(y){i?.(y)}});b=I,g||b()}catch(w){i?.(w)}})(),()=>b()})()}async function As(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function Cs(t){return t.request({method:`${t.mode}_dumpState`})}async function Ps(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function Ss(t){return await t.request({method:"txpool_content"})}async function Fs(t){const{pending:e,queued:n}=await t.request({method:"txpool_status"});return{pending:B(e),queued:B(n)}}async function Bs(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function ks(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[C(e)]})}async function Rs(t){return await t.request({method:"txpool_inspect"})}async function Ns(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function _s(t,{blocks:e,interval:n}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:C(e)}]}):await t.request({method:`${t.mode}_mine`,params:[C(e),C(n||0)]})}async function qs(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Us(t,{blockNumber:e,jsonRpcUrl:n}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:n}}]})}async function $s(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ls(t,e){const{accessList:n,data:a,from:s,gas:r,gasPrice:o,maxFeePerGas:i,maxPriorityFeePerGas:c,nonce:u,to:l,value:f,...h}=e,d=t.chain?.formatters?.transactionRequest?.format,m=(d||tt)({...Mt(h,{format:d}),accessList:n,data:a,from:s,gas:r,gasPrice:o,maxFeePerGas:i,maxPriorityFeePerGas:c,nonce:u,to:l,value:f},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[m]})}async function zs(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Ds(t,{address:e,value:n}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,C(n)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,C(n)]})}async function Ms(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[C(e)]})}async function Gs(t,{interval:e}){const n=t.mode==="hardhat"?e*1e3:e;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[n]})}async function Hs(t,{address:e,bytecode:n}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,n]}):await t.request({method:`${t.mode}_setCode`,params:[e,n]})}async function Os(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function Vs(t,{interval:e}){const n=t.mode==="hardhat"?e*1e3:e;await t.request({method:"evm_setIntervalMining",params:[n]})}async function js(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function Ws(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[C(e)]})}async function Ks(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[C(e)]})}async function Zs(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[C(e)]})}async function Ys(t,{address:e,nonce:n}){await t.request({method:`${t.mode}_setNonce`,params:[e,C(n)]})}async function Js(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function Xs(t,{address:e,index:n,value:a}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof n=="number"?C(n):n,a]})}async function Qs(t){return await t.request({method:"evm_snapshot"})}async function tr(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}async function er(t,{chain:e}){const{id:n,name:a,nativeCurrency:s,rpcUrls:r,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:C(n),chainName:a,nativeCurrency:s,rpcUrls:r.default.http,blockExplorerUrls:o?Object.values(o).map(({url:i})=>i):void 0}]},{dedupe:!0,retryCount:0})}async function nr(t){return t.account?.type==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Sn(n))}async function ar(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function sr(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>q(n))}async function rr(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function or(t,e){const{account:n=t.account}=e;if(!n)throw new Jt({docsPath:"/docs/eip7702/signAuthorization"});const a=z(n);if(!a.signAuthorization)throw new Fn({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:a.type});const s=await ge(t,e);return a.signAuthorization(s)}async function ir(t,e){const{account:n=t.account,chain:a=t.chain,...s}=e;if(!n)throw new Jt({docsPath:"/docs/actions/wallet/signTransaction"});const r=z(n);yt({account:r,...e});const o=await F(t,It,"getChainId")({});a!==null&&Bn({currentChainId:o,chain:a});const c=(a?.formatters||t.chain?.formatters)?.transactionRequest?.format||tt;return r.signTransaction?r.signTransaction({...s,chainId:o},{serializer:t.chain?.serializers?.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...s,account:r},"signTransaction"),chainId:C(o),from:r.address}]},{retryCount:0})}async function cr(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:C(e)}]},{retryCount:0})}async function ur(t,e){return Tt.internal(t,ue,"sendTransactionSync",e)}function zr({abi:t,address:e,client:n}){const a=n,[s,r]=a?"public"in a&&"wallet"in a?[a.public,a.wallet]:"public"in a?[a.public,void 0]:"wallet"in a?[void 0,a.wallet]:[a,a]:[void 0,void 0],o=s!=null,i=r!=null,c={};let u=!1,l=!1,f=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?u=!0:l=!0:h.type==="event"&&(f=!0),u&&l&&f)break;return o&&(u&&(c.read=new Proxy({},{get(h,d){return(...p)=>{const{args:m,options:g}=Z(p);return F(s,xt,"readContract")({abi:t,address:e,functionName:d,args:m,...g})}}})),l&&(c.simulate=new Proxy({},{get(h,d){return(...p)=>{const{args:m,options:g}=Z(p);return F(s,de,"simulateContract")({abi:t,address:e,functionName:d,args:m,...g})}}})),f&&(c.createEventFilter=new Proxy({},{get(h,d){return(...p)=>{const m=t.find(w=>w.type==="event"&&w.name===d),{args:g,options:b}=ut(p,m);return F(s,fe,"createContractEventFilter")({abi:t,address:e,eventName:d,args:g,...b})}}}),c.getEvents=new Proxy({},{get(h,d){return(...p)=>{const m=t.find(w=>w.type==="event"&&w.name===d),{args:g,options:b}=ut(p,m);return F(s,le,"getContractEvents")({abi:t,address:e,eventName:d,args:g,...b})}}}),c.watchEvent=new Proxy({},{get(h,d){return(...p)=>{const m=t.find(w=>w.type==="event"&&w.name===d),{args:g,options:b}=ut(p,m);return F(s,me,"watchContractEvent")({abi:t,address:e,eventName:d,args:g,...b})}}}))),i&&l&&(c.write=new Proxy({},{get(h,d){return(...p)=>{const{args:m,options:g}=Z(p);return F(r,Tt,"writeContract")({abi:t,address:e,functionName:d,args:m,...g})}}})),(o||i)&&l&&(c.estimateGas=new Proxy({},{get(h,d){return(...p)=>{const{args:m,options:g}=Z(p);return F(s??r,xe,"estimateContractGas")({abi:t,address:e,functionName:d,args:m,...g,account:g.account??r.account})}}})),c.address=e,c.abi=t,c}function Z(t){const e=t.length&&Array.isArray(t[0]),n=e?t[0]:[],a=(e?t[1]:t[0])??{};return{args:n,options:a}}function ut(t,e){let n=!1;Array.isArray(t[0])?n=!0:t.length===1?n=e.inputs.some(r=>r.indexed):t.length===2&&(n=!0);const a=n?t[0]:void 0,s=(n?t[1]:t[0])??{};return{args:a,options:s}}function dr(t){const{scheme:e,statement:n,...a}=t.match(fr)?.groups??{},{chainId:s,expirationTime:r,issuedAt:o,notBefore:i,requestId:c,...u}=t.match(lr)?.groups??{},l=t.split("Resources:")[1]?.split(`
2
+ - `).slice(1);return{...a,...u,...s?{chainId:Number(s)}:{},...r?{expirationTime:new Date(r)}:{},...o?{issuedAt:new Date(o)}:{},...i?{notBefore:new Date(i)}:{},...c?{requestId:c}:{},...l?{resources:l}:{},...e?{scheme:e}:{},...n?{statement:n}:{}}}const fr=/^(?:(?<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)?/,lr=/(?: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 mr(t){const{address:e,domain:n,message:a,nonce:s,scheme:r,time:o=new Date}=t;if(n&&a.domain!==n||s&&a.nonce!==s||r&&a.scheme!==r||a.expirationTime&&o>=a.expirationTime||a.notBefore&&o<a.notBefore)return!1;try{if(!a.address||!wt(a.address,{strict:!1})||e&&!at(a.address,e))return!1}catch{return!1}return!0}async function hr(t,e){const{address:n,domain:a,message:s,nonce:r,scheme:o,signature:i,time:c=new Date,...u}=e,l=dr(s);if(!l.address||!mr({address:n,domain:a,message:l,nonce:r,scheme:o,time:c}))return!1;const h=ae(s);return he(t,{address:l.address,hash:h,signature:i,...u})}function pr(t){return{call:e=>kn(t,e),createAccessList:e=>ye(t,e),createBlockFilter:()=>Ua(t),createContractEventFilter:e=>fe(t,e),createEventFilter:e=>be(t,e),createPendingTransactionFilter:()=>Qn(t),estimateContractGas:e=>xe(t,e),estimateGas:e=>Gt(t,e),getBalance:e=>ta(t,e),getBlobBaseFee:()=>$a(t),getBlock:e=>Rn(t,e),getBlockNumber:e=>ie(t,e),getBlockTransactionCount:e=>ea(t,e),getBytecode:e=>Rt(t,e),getChainId:()=>It(t),getCode:e=>Rt(t,e),getContractEvents:e=>le(t,e),getEip712Domain:e=>za(t,e),getEnsAddress:e=>na(t,e),getEnsAvatar:e=>aa(t,e),getEnsName:e=>sa(t,e),getEnsResolver:e=>ra(t,e),getEnsText:e=>oa(t,e),getFeeHistory:e=>ia(t,e),estimateFeesPerGas:e=>Nn(t,e),getFilterChanges:e=>oe(t,e),getFilterLogs:e=>Ma(t,e),getGasPrice:()=>_n(t),getLogs:e=>ce(t,e),getProof:e=>ca(t,e),estimateMaxPriorityFeePerGas:e=>qn(t,e),fillTransaction:e=>Xt(t,e),getStorageAt:e=>ua(t,e),getTransaction:e=>da(t,e),getTransactionConfirmations:e=>fa(t,e),getTransactionCount:e=>Un(t,e),getTransactionReceipt:e=>la(t,e),multicall:e=>ma(t,e),prepareTransactionRequest:e=>Qt(t,e),readContract:e=>xt(t,e),sendRawTransaction:e=>te(t,e),sendRawTransactionSync:e=>pe(t,e),simulate:e=>ht(t,e),simulateBlocks:e=>ht(t,e),simulateCalls:e=>Ts(t,e),simulateContract:e=>de(t,e),verifyHash:e=>he(t,e),verifyMessage:e=>ha(t,e),verifySiweMessage:e=>hr(t,e),verifyTypedData:e=>pa(t,e),uninstallFilter:e=>re(t,e),waitForTransactionReceipt:e=>ga(t,e),watchBlocks:e=>ya(t,e),watchBlockNumber:e=>ba(t,e),watchContractEvent:e=>me(t,e),watchEvent:e=>vs(t,e),watchPendingTransactions:e=>xa(t,e)}}function Dr(t){const{key:e="public",name:n="Public Client"}=t;return At({...t,key:e,name:n,type:"publicClient"}).extend(pr)}function gr({mode:t}){return e=>{const n=e.extend(()=>({mode:t}));return{dropTransaction:a=>As(n,a),dumpState:()=>Cs(n),getAutomine:()=>Ps(n),getTxpoolContent:()=>Ss(n),getTxpoolStatus:()=>Fs(n),impersonateAccount:a=>Bs(n,a),increaseTime:a=>ks(n,a),inspectTxpool:()=>Rs(n),loadState:a=>Ns(n,a),mine:a=>_s(n,a),removeBlockTimestampInterval:()=>qs(n),reset:a=>Us(n,a),revert:a=>$s(n,a),sendUnsignedTransaction:a=>Ls(n,a),setAutomine:a=>zs(n,a),setBalance:a=>Ds(n,a),setBlockGasLimit:a=>Ms(n,a),setBlockTimestampInterval:a=>Gs(n,a),setCode:a=>Hs(n,a),setCoinbase:a=>Os(n,a),setIntervalMining:a=>Vs(n,a),setLoggingEnabled:a=>js(n,a),setMinGasPrice:a=>Ws(n,a),setNextBlockBaseFeePerGas:a=>Ks(n,a),setNextBlockTimestamp:a=>Zs(n,a),setNonce:a=>Ys(n,a),setRpcUrl:a=>Js(n,a),setStorageAt:a=>Xs(n,a),snapshot:()=>Qs(n),stopImpersonatingAccount:a=>tr(n,a)}}}function Mr(t){const{key:e="test",name:n="Test Client",mode:a}=t;return At({...t,key:e,name:n,type:"testClient"}).extend(r=>({mode:a,...gr({mode:a})(r)}))}function yr(t){return{addChain:e=>er(t,e),deployContract:e=>wa(t,e),fillTransaction:e=>Xt(t,e),getAddresses:()=>nr(t),getCallsStatus:e=>$n(t,e),getCapabilities:e=>Ea(t,e),getChainId:()=>It(t),getPermissions:()=>ar(t),prepareAuthorization:e=>ge(t,e),prepareTransactionRequest:e=>Qt(t,e),requestAddresses:()=>sr(t),requestPermissions:e=>rr(t,e),sendCalls:e=>Ln(t,e),sendCallsSync:e=>Ia(t,e),sendRawTransaction:e=>te(t,e),sendRawTransactionSync:e=>pe(t,e),sendTransaction:e=>zn(t,e),sendTransactionSync:e=>ue(t,e),showCallsStatus:e=>Ta(t,e),signAuthorization:e=>or(t,e),signMessage:e=>va(t,e),signTransaction:e=>ir(t,e),signTypedData:e=>Aa(t,e),switchChain:e=>cr(t,e),waitForCallsStatus:e=>Dn(t,e),watchAsset:e=>Ca(t,e),writeContract:e=>Tt(t,e),writeContractSync:e=>ur(t,e)}}function Gr(t){const{key:e="wallet",name:n="Wallet Client",transport:a}=t;return At({...t,key:e,name:n,transport:a,type:"walletClient"}).extend(yr)}function Hr(t,e={}){const{key:n="fallback",name:a="Fallback",rank:s=!1,shouldThrow:r=br,retryCount:o,retryDelay:i}=e;return({chain:c,pollingInterval:u=4e3,timeout:l,...f})=>{let h=t,d=()=>{};const p=Pa({key:n,name:a,async request({method:m,params:g}){let b;const w=async(T=0)=>{const v=h[T]({...f,chain:c,retryCount:0,timeout:l});try{const I=await v.request({method:m,params:g});return d({method:m,params:g,response:I,transport:v,status:"success"}),I}catch(I){if(d({error:I,method:m,params:g,transport:v,status:"error"}),r(I)||T===h.length-1||(b??=h.slice(T+1).some(y=>{const{include:A,exclude:k}=y({chain:c}).config.methods||{};return A?A.includes(m):k?!k.includes(m):!0}),!b))throw I;return w(T+1)}};return w()},retryCount:o,retryDelay:i,type:"fallback"},{onResponse:m=>d=m,transports:h.map(m=>m({chain:c,retryCount:0}))});if(s){const m=typeof s=="object"?s:{};xr({chain:c,interval:m.interval??u,onTransports:g=>h=g,ping:m.ping,sampleCount:m.sampleCount,timeout:m.timeout,transports:h,weights:m.weights})}return p}}function br(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===Mn.code||t.code===Gn.code||Hn.nodeMessage.test(t.message)||t.code===5e3))}function xr({chain:t,interval:e=4e3,onTransports:n,ping:a,sampleCount:s=10,timeout:r=1e3,transports:o,weights:i={}}){const{stability:c=.7,latency:u=.3}=i,l=[],f=async()=>{const h=await Promise.all(o.map(async m=>{const g=m({chain:t,retryCount:0,timeout:r}),b=Date.now();let w,T;try{await(a?a({transport:g}):g.request({method:"net_listening"})),T=1}catch{T=0}finally{w=Date.now()}return{latency:w-b,success:T}}));l.push(h),l.length>s&&l.shift();const d=Math.max(...l.map(m=>Math.max(...m.map(({latency:g})=>g)))),p=o.map((m,g)=>{const b=l.map(y=>y[g].latency),T=1-b.reduce((y,A)=>y+A,0)/b.length/d,v=l.map(y=>y[g].success),I=v.reduce((y,A)=>y+A,0)/v.length;return I===0?[0,g]:[u*T+c*I,g]}).sort((m,g)=>g[0]-m[0]);n(p.map(([,m])=>o[m])),await On(e),f()};f()}class Or extends Error{constructor(e,n){super(n),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=n}}const dt="/docs/contract/decodeDeployData";function Vr(t){const{abi:e,bytecode:n,data:a}=t;if(a===n)return{bytecode:n};const s=e.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new Vn({docsPath:dt});if(!("inputs"in s))throw new Nt({docsPath:dt});if(!s.inputs||s.inputs.length===0)throw new Nt({docsPath:dt});return{args:Kt(s.inputs,`0x${a.replace(n,"")}`),bytecode:n}}function jr(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(i=>G(i)):t.blobs,a=n.reduce((i,c)=>i+c.length,0),s=ft(new Uint8Array(a));let r=!0;for(const i of n){const c=ft(i);for(;r&&c.position<i.length;){c.incrementPosition(1);let u=31;i.length-c.position<31&&(u=i.length-c.position);for(const l in Array.from({length:u})){const f=c.readByte();if(f===128&&!c.inspectBytes(c.remaining).includes(128)){r=!1;break}s.pushByte(f)}}}const o=s.bytes.slice(0,s.position);return e==="hex"?M(o):o}function Wr(t){const{sidecars:e,version:n}=t,a=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),s=[];for(const{commitment:r}of e)s.push(jn({commitment:r,to:a,version:n}));return s}const wr=2147483648;function Kr(t){if(t===1)return 60n;if(t>=wr||t<0)throw new Sa({chainId:t});return BigInt((2147483648|t)>>>0)}function Er({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function Zr(t,e){try{t.loadTrustedSetup(e)}catch(n){const a=n;if(!a.message.includes("trusted setup is already loaded"))throw a}return Er(t)}function Yr({r:t,yParityAndS:e}){const n=G(e),a=n[0]&128?1:0,s=n;return a===1&&(s[0]&=127),{r:t,s:M(s),yParity:a}}function Jr(t){const{r:e,s:n}=vt.Signature.fromCompact(t.slice(2,130));return{r:C(e,{size:32}),yParityAndS:C(n,{size:32})}}function Xr(t){const{r:e,s:n}=vt.Signature.fromCompact(t.slice(2,130)),a=+`0x${t.slice(130)}`,[s,r]=(()=>{if(a===0||a===1)return[void 0,a];if(a===27)return[BigInt(a),0];if(a===28)return[BigInt(a),1];throw new Error("Invalid yParityOrV value")})();return typeof s<"u"?{r:C(e,{size:32}),s:C(n,{size:32}),v:s,yParity:r}:{r:C(e,{size:32}),s:C(n,{size:32}),yParity:r}}async function Qr(t){const{serializedTransaction:e,signature:n}=t,a=os(e),s=n??{r:a.r,s:a.s,v:a.v,yParity:a.yParity},r=qa({...a,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await nt({hash:X(r),signature:s})}function to({r:t,yParityAndS:e}){return`0x${new vt.Signature(P(t),P(e)).toCompactHex()}`}function eo(t){const{r:e,s:n,v:a,yParity:s}=t,r=Number(s??a-27n);let o=n;if(r===1){const i=G(n);i[0]|=128,o=M(i)}return{r:e,yParityAndS:o}}export{Vn as AbiConstructorNotFoundError,Nt as AbiConstructorParamsNotFoundError,so as AbiDecodingDataSizeInvalidError,ro as AbiDecodingDataSizeTooSmallError,pn as AbiDecodingZeroDataError,oo as AbiEncodingArrayLengthMismatchError,io as AbiEncodingBytesSizeMismatchError,Ge as AbiEncodingLengthMismatchError,co as AbiErrorInputsNotFoundError,uo as AbiErrorNotFoundError,fo as AbiErrorSignatureNotFoundError,lo as AbiEventNotFoundError,mo as AbiEventSignatureEmptyTopicsError,ho as AbiEventSignatureNotFoundError,po as AbiFunctionNotFoundError,go as AbiFunctionOutputsNotFoundError,yo as AbiFunctionSignatureNotFoundError,bo as AccountStateConflictError,xo as AtomicReadyWalletRejectedUpgradeError,wo as AtomicityNotSupportedError,et as BaseError,Eo as BaseFeeScalarError,Io as BlockNotFoundError,To as BundleFailedError,vo as BundleTooLargeError,We as BytesSizeMismatchError,Ao as CallExecutionError,Co as ChainDisconnectedError,Po as ChainDoesNotSupportContract,So as ChainMismatchError,Fo as ChainNotFoundError,Bo as CircularReferenceError,ko as ClientChainNotConfiguredError,Ro as ContractFunctionExecutionError,No as ContractFunctionRevertedError,_o as ContractFunctionZeroDataError,qo as CounterfactualDeploymentFailedError,An as DecodeLogDataMismatch,Cn as DecodeLogTopicsMismatch,Uo as DuplicateIdError,Or as EIP1193ProviderRpcError,$o as Eip1559FeesNotSupportedError,cf as EnsAvatarInvalidNftUriError,uf as EnsAvatarUnsupportedNamespaceError,df as EnsAvatarUriResolutionError,Sa as EnsInvalidChainIdError,Lo as EstimateGasExecutionError,Hn as ExecutionRevertedError,zo as FeeCapTooHighError,Do as FeeCapTooLowError,Mo as FeeConflictError,ff as FilterTypeNotSupportedError,Go as HttpRequestError,Ho as InsufficientFundsError,Oo as IntegerOutOfRangeError,Vo as InternalRpcError,jo as IntrinsicGasTooHighError,Wo as IntrinsicGasTooLowError,Ko as InvalidAbiDecodingTypeError,Zo as InvalidAbiEncodingTypeError,ze as InvalidAbiItemError,De as InvalidAbiParameterError,Yo as InvalidAbiParametersError,Jo as InvalidAbiTypeParameterError,Vt as InvalidAddressError,Xo as InvalidArrayError,Qo as InvalidBytesBooleanError,ti as InvalidChainIdError,ms as InvalidDecimalNumberError,ei as InvalidDefinitionTypeError,ni as InvalidDomainError,ai as InvalidFunctionModifierError,si as InvalidHexBooleanError,Xe as InvalidHexValueError,Pn as InvalidInputRpcError,on as InvalidLegacyVError,ri as InvalidModifierError,oi as InvalidParameterError,ii as InvalidParamsRpcError,ci as InvalidParenthesisError,ui as InvalidPrimaryTypeError,di as InvalidRequestRpcError,fi as InvalidSerializableTransactionError,H as InvalidSerializedTransactionError,sn as InvalidSerializedTransactionTypeError,li as InvalidSignatureError,mi as InvalidStorageKeySizeError,hi as InvalidStructSignatureError,pi as InvalidStructTypeError,gi as JsonRpcVersionUnsupportedError,yi as LimitExceededRpcError,bi as MaxFeePerGasTooLowError,xi as MethodNotFoundRpcError,wi as MethodNotSupportedRpcError,Ei as NonceMaxValueError,Ii as NonceTooHighError,Ti as NonceTooLowError,vi as ParseRpcError,Ai as ProviderDisconnectedError,Ci as ProviderRpcError,gn as RawContractError,Pi as ResourceNotFoundRpcError,Si as ResourceUnavailableRpcError,Fi as RpcError,Bi as RpcRequestError,ki as SizeExceedsPaddingSizeError,Ri as SizeOverflowError,Ni as SliceOffsetOutOfBoundsError,_i as SocketClosedError,qi as SolidityProtectedKeywordError,Ui as StateAssignmentConflictError,$i as SwitchChainError,Li as TimeoutError,zi as TipAboveFeeCapError,Di as TransactionExecutionError,Mi as TransactionNotFoundError,Gi as TransactionReceiptNotFoundError,Mn as TransactionRejectedRpcError,Hi as TransactionTypeNotSupportedError,Oi as UnauthorizedProviderError,Vi as UnknownBundleIdError,bn as UnknownNodeError,ji as UnknownRpcError,Wi as UnknownSignatureError,Ki as UnknownTypeError,Zi as UnsupportedChainIdError,Yi as UnsupportedNonOptionalCapabilityError,Ze as UnsupportedPackedAbiType,Ji as UnsupportedProviderMethodError,lf as UrlRequiredError,Gn as UserRejectedRequestError,Xi as WaitForCallsStatusTimeoutError,Qi as WaitForTransactionReceiptTimeoutError,tc as WebSocketRequestError,Bn as assertCurrentChain,yt as assertRequest,Ra as assertTransactionEIP1559,Na as assertTransactionEIP2930,_a as assertTransactionLegacy,ec as blobsToCommitments,nc as blobsToProofs,ac as boolToBytes,Oe as boolToHex,sc as bytesToBigInt,rc as bytesToBool,M as bytesToHex,oc as bytesToNumber,ic as bytesToRlp,cc as bytesToString,qf as ccipFetch,Uf as ccipRequest,Sn as checksumAddress,jn as commitmentToVersionedHash,uc as commitmentsToVersionedHashes,to as compactSignatureToHex,Yr as compactSignatureToSignature,jt as concat,dc as concatBytes,Ot as concatHex,At as createClient,Ff as createNonceManager,Dr as createPublicClient,Mr as createTestClient,Pa as createTransport,Gr as createWalletClient,mf as custom,Kt as decodeAbiParameters,Vr as decodeDeployData,fc as decodeErrorResult,Xn as decodeEventLog,hf as decodeFunctionData,hn as decodeFunctionResult,lc as defineBlock,Mf as defineChain,Er as defineKzg,mc as defineTransaction,hc as defineTransactionReceipt,pc as defineTransactionRequest,En as deploylessCallViaBytecodeBytecode,gc as deploylessCallViaFactoryBytecode,yc as domainSeparator,bc as encodeAbiParameters,xc as encodeDeployData,pf as encodeErrorResult,ne as encodeEventTopics,bt as encodeFunctionData,gf as encodeFunctionResult,Pr as encodePacked,wc as erc1155Abi,Ec as erc20Abi,Ic as erc20Abi_bytes32,Tc as erc4626Abi,vc as erc6492SignatureValidatorAbi,Ac as erc6492SignatureValidatorByteCode,Cc as erc721Abi,Es as ethAddress,un as etherUnits,Gf as extendSchema,Fr as extractChain,Hr as fallback,mn as formatBlock,Pc as formatEther,Sc as formatGwei,J as formatLog,Fc as formatTransaction,Bc as formatTransactionReceipt,tt as formatTransactionRequest,kc as formatUnits,jr as fromBlobs,Rc as fromBytes,Nc as fromHex,Ee as fromRlp,_c as getAbiItem,q as getAddress,qc as getChainContractAddress,zr as getContract,Sr as getContractAddress,Ht as getContractError,Ha as getCreate2Address,Ga as getCreateAddress,Uc as getEventSelector,$c as getEventSignature,Lc as getFunctionSelector,zc as getFunctionSignature,rs as getSerializedTransactionType,Dc as getTransactionType,Mc as getTypesForEIP712Domain,dn as gweiUnits,Gc as hashDomain,ae as hashMessage,Hc as hashStruct,an as hashTypedData,P as hexToBigInt,Oc as hexToBool,G as hexToBytes,Jr as hexToCompactSignature,B as hexToNumber,Vc as hexToRlp,Xr as hexToSignature,jc as hexToString,yf as http,wt as isAddress,at as isAddressEqual,qt as isBytes,es as isErc6492Signature,ns as isErc8010Signature,Va as isHash,E as isHex,X as keccak256,bf as labelhash,Wc as maxInt104,Kc as maxInt112,Zc as maxInt120,Yc as maxInt128,Jc as maxInt136,Xc as maxInt144,Qc as maxInt152,tu as maxInt16,eu as maxInt160,nu as maxInt168,au as maxInt176,su as maxInt184,ru as maxInt192,ou as maxInt200,iu as maxInt208,cu as maxInt216,uu as maxInt224,du as maxInt232,fu as maxInt24,lu as maxInt240,mu as maxInt248,hu as maxInt256,pu as maxInt32,gu as maxInt40,yu as maxInt48,bu as maxInt56,xu as maxInt64,wu as maxInt72,Eu as maxInt8,Iu as maxInt80,Tu as maxInt88,vu as maxInt96,Au as maxUint104,Cu as maxUint112,Pu as maxUint120,Su as maxUint128,Fu as maxUint136,Bu as maxUint144,ku as maxUint152,Ru as maxUint16,Nu as maxUint160,_u as maxUint168,qu as maxUint176,Uu as maxUint184,$u as maxUint192,Lu as maxUint200,zu as maxUint208,Du as maxUint216,Mu as maxUint224,Gu as maxUint232,Hu as maxUint24,Ou as maxUint240,Vu as maxUint248,ju as maxUint256,Wu as maxUint32,Ku as maxUint40,Zu as maxUint48,Yu as maxUint56,Ju as maxUint64,Xu as maxUint72,Qu as maxUint8,td as maxUint80,ed as maxUint88,nd as maxUint96,ad as minInt104,sd as minInt112,rd as minInt120,od as minInt128,id as minInt136,cd as minInt144,ud as minInt152,dd as minInt16,fd as minInt160,ld as minInt168,md as minInt176,hd as minInt184,pd as minInt192,gd as minInt200,yd as minInt208,bd as minInt216,xd as minInt224,wd as minInt232,Ed as minInt24,Id as minInt240,Td as minInt248,vd as minInt256,Ad as minInt32,Cd as minInt40,Pd as minInt48,Sd as minInt56,Fd as minInt64,Bd as minInt72,kd as minInt8,Rd as minInt80,Nd as minInt88,_d as minInt96,qd as multicall3Abi,xf as namehash,Bf as nonceManager,Ud as numberToBytes,C as numberToHex,$f as offchainLookup,Lf as offchainLookupAbiItem,zf as offchainLookupSignature,Y as pad,$d as padBytes,kt as padHex,Ld as parseAbi,_t as parseAbiItem,Cr as parseAbiParameter,wf as parseAbiParameters,Jr as parseCompactSignature,kr as parseErc6492Signature,Rr as parseErc8010Signature,$r as parseEther,Wn as parseEventLogs,Lr as parseGwei,Xr as parseSignature,os as parseTransaction,Se as parseUnits,zd as prepareEncodeFunctionData,Ef as presignMessagePrefix,pr as publicActions,nt as recoverAddress,as as recoverMessageAddress,Dd as recoverPublicKey,Qr as recoverTransactionAddress,ss as recoverTypedDataAddress,Br as ripemd160,kf as rpcSchema,Md as rpcTransactionType,Of as serializeAccessList,to as serializeCompactSignature,Rf as serializeErc6492Signature,Nr as serializeErc8010Signature,If as serializeSignature,qa as serializeTransaction,Gd as serializeTypedData,Hd as setErrorConfig,Zr as setupKzg,Od as sha256,br as shouldThrow,Wr as sidecarsToVersionedHashes,eo as signatureToCompactSignature,Tf as signatureToHex,Qe as size,Je as slice,Vd as sliceBytes,Wt as sliceHex,jd as stringToBytes,He as stringToHex,In as stringify,gr as testActions,rn as toBlobSidecars,Wd as toBlobs,U as toBytes,Kr as toCoinType,Kd as toEventHash,Zd as toEventSelector,Yd as toEventSignature,Jd as toFunctionHash,Xd as toFunctionSelector,Qd as toFunctionSignature,nn as toHex,vf as toPrefixedMessage,Ye as toRlp,tf as transactionType,cn as trim,ef as universalSignatureValidatorAbi,nf as universalSignatureValidatorByteCode,af as validateTypedData,_r as verifyHash,qr as verifyMessage,Ur as verifyTypedData,yr as walletActions,Af as webSocket,sf as weiUnits,Cf as withCache,rf as withRetry,Pf as withTimeout,N as zeroAddress,Nf as zeroHash};
@@ -1,4 +1,4 @@
1
- import{importShared as q}from"./__federation_fn_import-chtkoWq_.js";import{k as Rn,l as _n,q as D,t as Fn,u as Kn,v as kn,C as et,e as Mn,w as at,g as An,B as $n,S as nn,x as Ft,y as Q,z as ot,r as W,a as st,A as wt,D as Kt,E as Qn,F as V,f as xn,G as Nn,H as kt,n as ct,i as Mt,I as Bn,J as jn,d as At,K as Dn,L as Un,N as Et,O as U}from"./QueryClientProvider-S2cSmCUs.js";import{R as Ma,P as Aa}from"./QueryClientProvider-S2cSmCUs.js";import{r as en}from"./index-Dy0yjznp.js";import"./jsx-runtime-B1l0k91v.js";import{U as Hn,M as Gn,z as Wn,j as zn,A as Ln,V as Vn,B as Jn,C as Yn,D as Xn,E as Zn,F as te,G as ne,H as ee,I as oe,J as on,K as se,L as re,W as ce,s as ie,X as ae,Y as ue,Z as le,o as de,O as fe,P as he,Q as ye,_ as ge,S as pe,R as me,t as we,T as be,n as Ce,al as ut}from"./webSocket-G5Mbc2fm.js";import{a3 as Qa,a4 as xa,a5 as Na}from"./webSocket-G5Mbc2fm.js";import{c as sn,N as Ie,aP as ve,a3 as Se,cu as Ee,cM as Oe,V as qe,c0 as Pe,X as Te,cP as Re,cL as _e,J as Fe,c9 as Ke,c3 as ke,c2 as Me,ad as Ae}from"./uid-BU7APsHa.js";import{E as $e}from"./index-CdrMQoR6.js";import{c as Qe}from"./store-DOLZnwHk.js";function b(t,n,e){const o=t[n.name];if(typeof o=="function")return o;const s=t[e];return typeof s=="function"?s:r=>n(t,r)}async function xe(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,sn,"call")(o)}async function Ne(t,n){let e;if(typeof n.connector=="function"?e=t._internal.connectors.setup(n.connector):e=n.connector,e.uid===t.state.current)throw new Rn;try{t.setState(c=>({...c,status:"connecting"})),e.emitter.emit("message",{type:"connecting"});const{connector:o,...s}=n,r=await e.connect(s);return e.emitter.off("connect",t._internal.events.connect),e.emitter.on("change",t._internal.events.change),e.emitter.on("disconnect",t._internal.events.disconnect),await t.storage?.setItem("recentConnectorId",e.id),t.setState(c=>({...c,connections:new Map(c.connections).set(e.uid,{accounts:s.withCapabilities?r.accounts.map(i=>typeof i=="object"?i.address:i):r.accounts,chainId:r.chainId,connector:e}),current:e.uid,status:"connected"})),{accounts:s.withCapabilities?r.accounts.map(c=>typeof c=="object"?c:{address:c,capabilities:{}}):r.accounts,chainId:r.chainId}}catch(o){throw t.setState(s=>({...s,status:s.current?"connected":"disconnected"})),o}}const{createClient:Be,custom:je}=await q("viem");async function k(t,n={}){const{assertChainId:e=!0}=n;let o;if(n.connector){const{connector:l}=n;if(t.state.status==="reconnecting"&&!l.getAccounts&&!l.getChainId)throw new _n({connector:l});const[d,h]=await Promise.all([l.getAccounts().catch(g=>{if(n.account===null)return[];throw g}),l.getChainId()]);o={accounts:d,chainId:h,connector:l}}else o=t.state.connections.get(t.state.current);if(!o)throw new D;const s=n.chainId??o.chainId,r=await o.connector.getChainId();if(e&&r!==s)throw new Fn({connectionChainId:s,connectorChainId:r});const c=o.connector;if(c.getClient)return c.getClient({chainId:s});const i=Ie(n.account??o.accounts[0]);if(i&&(i.address=ve(i.address)),n.account&&!o.accounts.some(l=>l.toLowerCase()===i.address.toLowerCase()))throw new Kn({address:i.address,connector:c});const a=t.chains.find(l=>l.id===s),u=await o.connector.getProvider({chainId:s});return Be({account:i,chain:a,name:"Connector Client",transport:l=>je(u)({...l,retryCount:0})})}async function De(t,n){const{account:e,chainId:o,connector:s,...r}=n;let c;return typeof e=="object"&&e?.type==="local"?c=t.getClient({chainId:o}):c=await k(t,{account:e??void 0,assertChainId:!1,chainId:o,connector:s}),await b(c,Hn,"deployContract")({...r,...e?{account:e}:{},chain:o?{id:o}:null})}async function Ue(t,n={}){let e;if(n.connector)e=n.connector;else{const{connections:s,current:r}=t.state;e=s.get(r)?.connector}const o=t.state.connections;e&&(await e.disconnect(),e.emitter.off("change",t._internal.events.change),e.emitter.off("disconnect",t._internal.events.disconnect),e.emitter.on("connect",t._internal.events.connect),o.delete(e.uid)),t.setState(s=>{if(o.size===0)return{...s,connections:new Map,current:null,status:"disconnected"};const r=o.values().next().value;return{...s,connections:new Map(o),current:r.connector.uid}});{const s=t.state.current;if(!s)return;const r=t.state.connections.get(s)?.connector;if(!r)return;await t.storage?.setItem("recentConnectorId",r.id)}}const{weiUnits:He}=await q("viem");function z(t){return typeof t=="number"?t:t==="wei"?0:Math.abs(He[t])}const{formatUnits:lt}=await q("viem");async function Ge(t,n={}){const{chainId:e,formatUnits:o="gwei",...s}=n,r=t.getClient({chainId:e}),c=b(r,Se,"estimateFeesPerGas"),{gasPrice:i,maxFeePerGas:a,maxPriorityFeePerGas:u}=await c({...s,chain:r.chain}),l=z(o);return{formatted:{gasPrice:i?lt(i,l):void 0,maxFeePerGas:a?lt(a,l):void 0,maxPriorityFeePerGas:u?lt(u,l):void 0},gasPrice:i,maxFeePerGas:a,maxPriorityFeePerGas:u}}async function We(t,n){const{chainId:e,connector:o,...s}=n;let r;n.account?r=n.account:r=(await k(t,{account:n.account,assertChainId:!1,chainId:e,connector:o})).account;const c=t.getClient({chainId:e});return b(c,Ee,"estimateGas")({...s,account:r})}async function ze(t,n={}){const{chainId:e}=n,o=t.getClient({chainId:e});return b(o,Oe,"estimateMaxPriorityFeePerGas")({chain:o.chain})}function Ot(t){const n=t.state.current,e=t.state.connections.get(n),o=e?.accounts,s=o?.[0],r=t.chains.find(i=>i.id===e?.chainId),c=t.state.status;switch(c){case"connected":return{address:s,addresses:o,chain:r,chainId:e?.chainId,connector:e?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:c};case"reconnecting":return{address:s,addresses:o,chain:r,chainId:e?.chainId,connector:e?.connector,isConnected:!!s,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:c};case"connecting":return{address:s,addresses:o,chain:r,chainId:e?.chainId,connector:e?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:c};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:c}}}async function Le(t,n){const{allowFailure:e=!0,chainId:o,contracts:s,...r}=n,c=t.getClient({chainId:o});return b(c,Gn,"multicall")({allowFailure:e,contracts:s,...r})}function rn(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,qe,"readContract")(o)}const{ContractFunctionExecutionError:Ve}=await q("viem");async function L(t,n){const{allowFailure:e=!0,blockNumber:o,blockTag:s,...r}=n,c=n.contracts;try{const i={};for(const[d,h]of c.entries()){const g=h.chainId??t.state.chainId;i[g]||(i[g]=[]),i[g]?.push({contract:h,index:d})}const a=()=>Object.entries(i).map(([d,h])=>Le(t,{...r,allowFailure:e,blockNumber:o,blockTag:s,chainId:Number.parseInt(d,10),contracts:h.map(({contract:g})=>g)})),u=(await Promise.all(a())).flat(),l=Object.values(i).flatMap(d=>d.map(({index:h})=>h));return u.reduce((d,h,g)=>(d&&(d[l[g]]=h),d),[])}catch(i){if(i instanceof Ve)throw i;const a=()=>c.map(u=>rn(t,{...u,blockNumber:o,blockTag:s}));return e?(await Promise.allSettled(a())).map(u=>u.status==="fulfilled"?{result:u.value,status:"success"}:{error:u.reason,result:void 0,status:"failure"}):await Promise.all(a())}}const{formatUnits:cn,hexToString:Je,trim:Ye}=await q("viem");async function Xe(t,n){const{address:e,blockNumber:o,blockTag:s,chainId:r,token:c,unit:i="ether"}=n;if(c)try{return await $t(t,{balanceAddress:e,chainId:r,symbolType:"string",tokenAddress:c})}catch(h){if(h.name==="ContractFunctionExecutionError"){const g=await $t(t,{balanceAddress:e,chainId:r,symbolType:"bytes32",tokenAddress:c}),S=Je(Ye(g.symbol,{dir:"right"}));return{...g,symbol:S}}throw h}const a=t.getClient({chainId:r}),l=await b(a,Wn,"getBalance")(o?{address:e,blockNumber:o}:{address:e,blockTag:s}),d=t.chains.find(h=>h.id===r)??a.chain;return{decimals:d.nativeCurrency.decimals,formatted:cn(l,z(i)),symbol:d.nativeCurrency.symbol,value:l}}async function $t(t,n){const{balanceAddress:e,chainId:o,symbolType:s,tokenAddress:r,unit:c}=n,i={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:s}]}],address:r},[a,u,l]=await L(t,{allowFailure:!1,contracts:[{...i,functionName:"balanceOf",args:[e],chainId:o},{...i,functionName:"decimals",chainId:o},{...i,functionName:"symbol",chainId:o}]}),d=cn(a??"0",z(c??u));return{decimals:u,formatted:d,symbol:l,value:a}}async function Ze(t,n={}){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return{...await b(s,Pe,"getBlock")(o),chainId:s.chain.id}}function to(t,n={}){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,zn,"getBlockNumber")(o)}function no(t,n={}){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Ln,"getBlockTransactionCount")(o)}async function eo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Te,"getBytecode")(o)}async function oo(t,n){const{connector:e,id:o}=n,s=await k(t,{connector:e});return b(s,Re,"getCallsStatus")({id:o})}async function so(t,n={}){const{account:e,chainId:o,connector:s}=n,r=await k(t,{account:e,connector:s});return Vn(r,{account:e,chainId:o})}function Qt(t){return t.state.chainId}function B(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;let e,o;if(Array.isArray(t)&&Array.isArray(n)){if(e=t.length,e!==n.length)return!1;for(o=e;o--!==0;)if(!B(t[o],n[o]))return!1;return!0}if(typeof t.valueOf=="function"&&t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString)return t.toString()===n.toString();const s=Object.keys(t);if(e=s.length,e!==Object.keys(n).length)return!1;for(o=e;o--!==0;)if(!Object.hasOwn(n,s[o]))return!1;for(o=e;o--!==0;){const r=s[o];if(r&&!B(t[r],n[r]))return!1}return!0}return t!==t&&n!==n}let dt=[];function xt(t){const n=t.chains;return B(dt,n)?dt:(dt=n,n)}function rt(t,n={}){try{return t.getClient(n)}catch{return}}let J=[];function bt(t){const n=[...t.state.connections.values()];return t.state.status==="reconnecting"||B(J,n)?J:(J=n,n)}let Y=[];function Nt(t){const n=t.connectors;return Y.length===n.length&&Y.every((e,o)=>e===n[o])?Y:(Y=n,n)}function ro(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Jn,"getEnsAddress")(o)}function co(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Yn,"getEnsAvatar")(o)}function io(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Xn,"getEnsName")(o)}function ao(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Zn,"getEnsResolver")(o)}function uo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,te,"getEnsText")(o)}function lo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,ne,"getFeeHistory")(o)}function fo(t,n={}){const{chainId:e}=n,o=t.getClient({chainId:e});return b(o,_e,"getGasPrice")({})}async function ho(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,ee,"getProof")(o)}const{publicActions:yo}=await q("viem");function Ct(t,n={}){return rt(t,n)?.extend(yo)}async function go(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,oe,"getStorageAt")(o)}const{ContractFunctionExecutionError:ft,formatUnits:Bt,hexToString:jt,trim:Dt}=await q("viem");async function po(t,n){const{address:e,chainId:o,formatUnits:s=18}=n;function r(c){return[{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:c}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:c}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]}]}try{const c=r("string"),i={address:e,abi:c,chainId:o},[a,u,l,d]=await L(t,{allowFailure:!0,contracts:[{...i,functionName:"decimals"},{...i,functionName:"name"},{...i,functionName:"symbol"},{...i,functionName:"totalSupply"}]});if(u.error instanceof ft)throw u.error;if(l.error instanceof ft)throw l.error;if(a.error)throw a.error;if(d.error)throw d.error;return{address:e,decimals:a.result,name:u.result,symbol:l.result,totalSupply:{formatted:Bt(d.result,z(s)),value:d.result}}}catch(c){if(c instanceof ft){const i=r("bytes32"),a={address:e,abi:i,chainId:o},[u,l,d,h]=await L(t,{allowFailure:!1,contracts:[{...a,functionName:"decimals"},{...a,functionName:"name"},{...a,functionName:"symbol"},{...a,functionName:"totalSupply"}]});return{address:e,decimals:u,name:jt(Dt(l,{dir:"right"})),symbol:jt(Dt(d,{dir:"right"})),totalSupply:{formatted:Bt(h,z(s)),value:h}}}throw c}}function mo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,on,"getTransaction")(o)}function wo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,se,"getTransactionConfirmations")(o)}async function bo(t,n){const{address:e,blockNumber:o,blockTag:s,chainId:r}=n,c=t.getClient({chainId:r});return b(c,Fe,"getTransactionCount")(o?{address:e,blockNumber:o}:{address:e,blockTag:s})}async function Co(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,re,"getTransactionReceipt")(o)}const{walletActions:Io}=await q("viem");async function vo(t,n={}){return(await k(t,n)).extend(Io)}async function So(t,n){const{account:e,chainId:o,...s}=n,r=e??Ot(t).address,c=t.getClient({chainId:o});return b(c,Ke,"prepareTransactionRequest")({...s,...r?{account:r}:{}})}let ht=!1;async function an(t,n={}){if(ht)return[];ht=!0,t.setState(u=>({...u,status:u.current?"reconnecting":"connecting"}));const e=[];if(n.connectors?.length)for(const u of n.connectors){let l;typeof u=="function"?l=t._internal.connectors.setup(u):l=u,e.push(l)}else e.push(...t.connectors);let o;try{o=await t.storage?.getItem("recentConnectorId")}catch{}const s={};for(const[,u]of t.state.connections)s[u.connector.id]=1;o&&(s[o]=0);const r=Object.keys(s).length>0?[...e].sort((u,l)=>(s[u.id]??10)-(s[l.id]??10)):e;let c=!1;const i=[],a=[];for(const u of r){const l=await u.getProvider().catch(()=>{});if(!l||a.some(g=>g===l)||!await u.isAuthorized())continue;const h=await u.connect({isReconnecting:!0}).catch(()=>null);h&&(u.emitter.off("connect",t._internal.events.connect),u.emitter.on("change",t._internal.events.change),u.emitter.on("disconnect",t._internal.events.disconnect),t.setState(g=>{const S=new Map(c?g.connections:new Map).set(u.uid,{accounts:h.accounts,chainId:h.chainId,connector:u});return{...g,current:c?g.current:u.uid,connections:S}}),i.push({accounts:h.accounts,chainId:h.chainId,connector:u}),a.push(l),c=!0)}return(t.state.status==="reconnecting"||t.state.status==="connecting")&&(c?t.setState(u=>({...u,status:"connected"})):t.setState(u=>({...u,connections:new Map,current:null,status:"disconnected"}))),ht=!1,i}async function Eo(t,n){const{account:e,chainId:o,connector:s,calls:r,...c}=n,i=await k(t,{account:e,assertChainId:!1,chainId:o,connector:s});return b(i,ke,"sendCalls")({...c,...typeof e<"u"?{account:e}:{},calls:r,chain:o?{id:o}:void 0})}async function Oo(t,n){const{account:e,chainId:o,connector:s,calls:r,...c}=n,i=await k(t,{account:e,assertChainId:!1,chainId:o,connector:s});return b(i,ce,"sendCallsSync")({...c,...typeof e<"u"?{account:e}:{},calls:r,chain:o?{id:o}:void 0})}async function qo(t,n){const{account:e,chainId:o,connector:s,...r}=n;let c;return typeof e=="object"&&e?.type==="local"?c=t.getClient({chainId:o}):c=await k(t,{account:e??void 0,assertChainId:!1,chainId:o,connector:s}),await b(c,Me,"sendTransaction")({...r,...e?{account:e}:{},chain:o?{id:o}:null,gas:r.gas??void 0})}async function Po(t,n){const{account:e,chainId:o,connector:s,...r}=n;let c;return typeof e=="object"&&e?.type==="local"?c=t.getClient({chainId:o}):c=await k(t,{account:e??void 0,assertChainId:!1,chainId:o,connector:s}),await b(c,ie,"sendTransactionSync")({...r,...e?{account:e}:{},chain:o?{id:o}:null,gas:r.gas??void 0})}async function To(t,n){const{connector:e,id:o}=n,s=await k(t,{connector:e});return ae(s,{id:o})}async function Ro(t,n){const{account:e,connector:o,...s}=n;let r;return typeof e=="object"&&e.type==="local"?r=t.getClient():r=await k(t,{account:e,connector:o}),b(r,ue,"signMessage")({...s,...e?{account:e}:{}})}async function _o(t,n){const{account:e,connector:o,...s}=n;let r;return typeof e=="object"&&e.type==="local"?r=t.getClient():r=await k(t,{account:e,connector:o}),b(r,le,"signTypedData")({...s,...e?{account:e}:{}})}async function Fo(t,n){const{abi:e,chainId:o,connector:s,...r}=n;let c;n.account?c=n.account:c=(await k(t,{assertChainId:!1,chainId:o,connector:s})).account;const i=t.getClient({chainId:o}),a=b(i,de,"simulateContract"),{result:u,request:l}=await a({...r,abi:e,account:c});return{chainId:i.chain.id,result:u,request:{...l,chainId:o}}}async function Ko(t,n){const{connector:e}=n,o=t.state.connections.get(e.uid);if(!o)throw new D;return await t.storage?.setItem("recentConnectorId",e.id),t.setState(s=>({...s,current:e.uid})),{accounts:o.accounts,chainId:o.chainId}}async function ko(t,n){const{addEthereumChainParameter:e,chainId:o}=n,s=t.state.connections.get(n.connector?.uid??t.state.current);if(s){const c=s.connector;if(!c.switchChain)throw new kn({connector:c});return await c.switchChain({addEthereumChainParameter:e,chainId:o})}const r=t.chains.find(c=>c.id===o);if(!r)throw new et;return t.setState(c=>({...c,chainId:o})),r}async function Mo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,fe,"verifyMessage")(o)}async function Ao(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,he,"verifyTypedData")(o)}async function $o(t,n){const{connector:e}=n,o=await k(t,{connector:e});return Ae(o,n)}const{hexToString:Qo}=await q("viem");async function xo(t,n){const{chainId:e,timeout:o=0,...s}=n,r=t.getClient({chainId:e}),i=await b(r,ye,"waitForTransactionReceipt")({...s,timeout:o});if(i.status==="reverted"){const a=b(r,on,"getTransaction"),{from:u,...l}=await a({hash:i.transactionHash}),h=await b(r,sn,"call")({...l,account:u,data:l.input,gasPrice:l.type!=="eip1559"?l.gasPrice:void 0,maxFeePerGas:l.type==="eip1559"?l.maxFeePerGas:void 0,maxPriorityFeePerGas:l.type==="eip1559"?l.maxPriorityFeePerGas:void 0}),g=h?.data?Qo(`0x${h.data.substring(138)}`):"unknown reason";throw new Error(g)}return{...i,chainId:r.chain.id}}function un(t,n){const{onChange:e}=n;return t.subscribe(()=>Ot(t),e,{equalityFn(o,s){const{connector:r,...c}=o,{connector:i,...a}=s;return B(c,a)&&r?.id===i?.id&&r?.uid===i?.uid}})}async function No(t,n){const{connector:e,...o}=n,s=await k(t,{connector:e});return b(s,ge,"watchAsset")(o)}function Bo(t,n){const{syncConnectedChain:e=t._internal.syncConnectedChain,...o}=n;let s;const r=a=>{s&&s();const u=t.getClient({chainId:a});return s=b(u,pe,"watchBlockNumber")(o),s},c=r(n.chainId);let i;return e&&!n.chainId&&(i=t.subscribe(({chainId:a})=>a,async a=>r(a))),()=>{c?.(),i?.()}}function jo(t,n){const{syncConnectedChain:e=t._internal.syncConnectedChain,...o}=n;let s;const r=a=>{s&&s();const u=t.getClient({chainId:a});return s=b(u,me,"watchBlocks")(o),s},c=r(n.chainId);let i;return e&&!n.chainId&&(i=t.subscribe(({chainId:a})=>a,async a=>r(a))),()=>{c?.(),i?.()}}function Do(t,n){const{onChange:e}=n;return t.subscribe(o=>o.chainId,e)}function Uo(t,n){const{onChange:e}=n;return t.subscribe(()=>rt(t),e,{equalityFn(o,s){return o?.uid===s?.uid}})}function Ho(t,n){const{onChange:e}=n;return t.subscribe(()=>bt(t),e,{equalityFn:B})}function Go(t,n){const{onChange:e}=n;return t._internal.connectors.subscribe((o,s)=>{e(Object.values(o),s)})}function Wo(t,n){const{syncConnectedChain:e=t._internal.syncConnectedChain,...o}=n;let s;const r=a=>{s&&s();const u=t.getClient({chainId:a});return s=b(u,we,"watchContractEvent")(o),s},c=r(n.chainId);let i;return e&&!n.chainId&&(i=t.subscribe(({chainId:a})=>a,async a=>r(a))),()=>{c?.(),i?.()}}function zo(t,n){const{syncConnectedChain:e=t._internal.syncConnectedChain,...o}=n;let s;const r=a=>{s&&s();const u=t.getClient({chainId:a});return s=b(u,be,"watchPendingTransactions")(o),s},c=r(n.chainId);let i;return e&&!n.chainId&&(i=t.subscribe(({chainId:a})=>a,async a=>r(a))),()=>{c?.(),i?.()}}function Lo(t,n){const{onChange:e}=n;return t.subscribe(()=>Ct(t),e,{equalityFn(o,s){return o?.uid===s?.uid}})}async function Vo(t,n){const{account:e,chainId:o,connector:s,...r}=n;let c;return typeof e=="object"&&e?.type==="local"?c=t.getClient({chainId:o}):c=await k(t,{account:e??void 0,assertChainId:!1,chainId:o,connector:s}),await b(c,Ce,"writeContract")({...r,...e?{account:e}:{},chain:o?{id:o}:null})}const{custom:Jo,fromHex:Ut,getAddress:X,keccak256:Yo,numberToHex:Ht,RpcRequestError:yt,SwitchChainError:Xo,stringToHex:Zo,UserRejectedRequestError:H}=await q("viem");ln.type="mock";function ln(t){const n=new Map,e=t.features??{defaultConnected:!1};let o=e.defaultConnected,s;return Mn(r=>({id:"mock",name:"Mock Connector",type:ln.type,async setup(){s=r.chains[0].id},async connect({chainId:c,withCapabilities:i}={}){if(e.connectError)throw typeof e.connectError=="boolean"?new H(new Error("Failed to connect.")):e.connectError;const u=await(await this.getProvider()).request({method:"eth_requestAccounts"});let l=await this.getChainId();return c&&l!==c&&(l=(await this.switchChain({chainId:c})).id),o=!0,{accounts:i?u.map(d=>({address:X(d),capabilities:{foo:{bar:d}}})):u.map(d=>X(d)),chainId:l}},async disconnect(){o=!1},async getAccounts(){if(!o)throw new D;return(await(await this.getProvider()).request({method:"eth_accounts"})).map(a=>X(a))},async getChainId(){const i=await(await this.getProvider()).request({method:"eth_chainId"});return Ut(i,"number")},async isAuthorized(){return!e.reconnect||!o?!1:!!(await this.getAccounts()).length},async switchChain({chainId:c}){const i=await this.getProvider(),a=r.chains.find(u=>u.id===c);if(!a)throw new Xo(new et);return await i.request({method:"wallet_switchEthereumChain",params:[{chainId:Ht(c)}]}),a},onAccountsChanged(c){c.length===0?this.onDisconnect():r.emitter.emit("change",{accounts:c.map(i=>X(i))})},onChainChanged(c){const i=Number(c);r.emitter.emit("change",{chainId:i})},async onDisconnect(c){r.emitter.emit("disconnect"),o=!1},async getProvider({chainId:c}={}){const a=(r.chains.find(l=>l.id===c)??r.chains[0]).rpcUrls.default.http[0];return Jo({request:async({method:l,params:d})=>{if(l==="eth_chainId")return Ht(s);if(l==="eth_requestAccounts")return t.accounts;if(l==="eth_signTypedData_v4"&&e.signTypedDataError)throw typeof e.signTypedDataError=="boolean"?new H(new Error("Failed to sign typed data.")):e.signTypedDataError;if(l==="wallet_switchEthereumChain"){if(e.switchChainError)throw typeof e.switchChainError=="boolean"?new H(new Error("Failed to switch chain.")):e.switchChainError;s=Ut(d[0].chainId,"number"),this.onChainChanged(s.toString());return}if(l==="wallet_watchAsset"){if(e.watchAssetError)throw typeof e.watchAssetError=="boolean"?new H(new Error("Failed to switch chain.")):e.watchAssetError;return o}if(l==="wallet_getCapabilities")return{"0x2105":{paymasterService:{supported:d[0]==="0x95132632579b073D12a6673e18Ab05777a6B86f8"},sessionKeys:{supported:!0}},"0x14A34":{paymasterService:{supported:d[0]==="0x95132632579b073D12a6673e18Ab05777a6B86f8"}}};if(l==="wallet_sendCalls"){const w=[],O=d[0].calls,_=d[0].from;for(const R of O){const{result:A,error:f}=await ut.http(a,{body:{method:"eth_sendTransaction",params:[{...R,...typeof _<"u"?{from:_}:{}}]}});if(f)throw new yt({body:{method:l,params:d},error:f,url:a});w.push(A)}const T=Yo(Zo(JSON.stringify(O)));return n.set(T,w),{id:T}}if(l==="wallet_getCallsStatus"){const w=n.get(d[0]);if(!w)return{atomic:!1,chainId:"0x1",id:d[0],status:100,receipts:[],version:"2.0.0"};const _=(await Promise.all(w.map(async T=>{const{result:R,error:A}=await ut.http(a,{body:{method:"eth_getTransactionReceipt",params:[T],id:0}});if(A)throw new yt({body:{method:l,params:d},error:A,url:a});return R?{blockHash:R.blockHash,blockNumber:R.blockNumber,gasUsed:R.gasUsed,logs:R.logs,status:R.status,transactionHash:R.transactionHash}:null}))).filter(T=>T!==null);return _.length===0?{atomic:!1,chainId:"0x1",id:d[0],status:100,receipts:[],version:"2.0.0"}:{atomic:!1,chainId:"0x1",id:d[0],status:200,receipts:_,version:"2.0.0"}}if(l==="wallet_showCallsStatus")return;if(l==="personal_sign"){if(e.signMessageError)throw typeof e.signMessageError=="boolean"?new H(new Error("Failed to sign message.")):e.signMessageError;l="eth_sign",d=[d[1],d[0]]}const h={method:l,params:d},{error:g,result:S}=await ut.http(a,{body:h});if(g)throw new yt({body:h,error:g,url:a});return S}})({retryCount:0})}}))}const ts=t=>(n,e,o)=>{const s=o.subscribe;return o.subscribe=(c,i,a)=>{let u=c;if(i){const l=a?.equalityFn||Object.is;let d=c(o.getState());u=h=>{const g=c(h);if(!l(d,g)){const S=d;i(d=g,S)}},a?.fireImmediately&&i(d,d)}return s(u)},t(n,e,o)},ns=ts;function es(t,n){let e;try{e=t()}catch{return}return{getItem:s=>{var r;const c=a=>a===null?null:JSON.parse(a,void 0),i=(r=e.getItem(s))!=null?r:null;return i instanceof Promise?i.then(c):c(i)},setItem:(s,r)=>e.setItem(s,JSON.stringify(r,void 0)),removeItem:s=>e.removeItem(s)}}const It=t=>n=>{try{const e=t(n);return e instanceof Promise?e:{then(o){return It(o)(e)},catch(o){return this}}}catch(e){return{then(o){return this},catch(o){return It(o)(e)}}}},os=(t,n)=>(e,o,s)=>{let r={storage:es(()=>localStorage),partialize:w=>w,version:0,merge:(w,O)=>({...O,...w}),...n},c=!1;const i=new Set,a=new Set;let u=r.storage;if(!u)return t((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),e(...w)},o,s);const l=()=>{const w=r.partialize({...o()});return u.setItem(r.name,{state:w,version:r.version})},d=s.setState;s.setState=(w,O)=>{d(w,O),l()};const h=t((...w)=>{e(...w),l()},o,s);s.getInitialState=()=>h;let g;const S=()=>{var w,O;if(!u)return;c=!1,i.forEach(T=>{var R;return T((R=o())!=null?R:h)});const _=((O=r.onRehydrateStorage)==null?void 0:O.call(r,(w=o())!=null?w:h))||void 0;return It(u.getItem.bind(u))(r.name).then(T=>{if(T)if(typeof T.version=="number"&&T.version!==r.version){if(r.migrate)return[!0,r.migrate(T.state,T.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,T.state];return[!1,void 0]}).then(T=>{var R;const[A,f]=T;if(g=r.merge(f,(R=o())!=null?R:h),e(g,!0),A)return l()}).then(()=>{_?.(g,void 0),g=o(),c=!0,a.forEach(T=>T(g))}).catch(T=>{_?.(void 0,T)})};return s.persist={setOptions:w=>{r={...r,...w},w.storage&&(u=w.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>S(),hasHydrated:()=>c,onHydrate:w=>(i.add(w),()=>{i.delete(w)}),onFinishHydration:w=>(a.add(w),()=>{a.delete(w)})},r.skipHydration||S(),g||h},ss=os,Gt=t=>{let n;const e=new Set,o=(u,l)=>{const d=typeof u=="function"?u(n):u;if(!Object.is(d,n)){const h=n;n=l??(typeof d!="object"||d===null)?d:Object.assign({},n,d),e.forEach(g=>g(n,h))}},s=()=>n,i={setState:o,getState:s,getInitialState:()=>a,subscribe:u=>(e.add(u),()=>e.delete(u))},a=n=t(o,s,i);return i},gt=t=>t?Gt(t):Gt;class rs{constructor(n){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new $e})}on(n,e){this._emitter.on(n,e)}once(n,e){this._emitter.once(n,e)}off(n,e){this._emitter.off(n,e)}emit(n,...e){const o=e[0];this._emitter.emit(n,{uid:this.uid,...o})}listenerCount(n){return this._emitter.listenerCount(n)}}function cs(t){return new rs(t)}function dn(t,n){return JSON.parse(t,(e,o)=>{let s=o;return s?.__type==="bigint"&&(s=BigInt(s.value)),s?.__type==="Map"&&(s=new Map(s.value)),n?.(e,s)??s})}function Wt(t,n){return t.slice(0,n).join(".")||"."}function zt(t,n){const{length:e}=t;for(let o=0;o<e;++o)if(t[o]===n)return o+1;return 0}function is(t,n){const e=typeof t=="function",o=typeof n=="function",s=[],r=[];return function(i,a){if(typeof a=="object")if(s.length){const u=zt(s,this);u===0?s[s.length]=this:(s.splice(u),r.splice(u)),r[r.length]=i;const l=zt(s,a);if(l!==0)return o?n.call(this,i,a,Wt(r,l)):`[ref=${Wt(r,l)}]`}else s[0]=a,r[0]=i;return e?t.call(this,i,a):a}}function as(t,n,e,o){return JSON.stringify(t,is((s,r)=>{let c=r;return typeof c=="bigint"&&(c={__type:"bigint",value:r.toString()}),c instanceof Map&&(c={__type:"Map",value:Array.from(r.entries())}),n?.(s,c)??c},o),e??void 0)}function us(t){const{deserialize:n=dn,key:e="wagmi",serialize:o=as,storage:s=fn}=t;function r(c){return c instanceof Promise?c.then(i=>i).catch(()=>null):c}return{...s,key:e,async getItem(c,i){const a=s.getItem(`${e}.${c}`),u=await r(a);return u?n(u)??null:i??null},async setItem(c,i){const a=`${e}.${c}`;i===null?await r(s.removeItem(a)):await r(s.setItem(a,o(i)))},async removeItem(c){await r(s.removeItem(`${e}.${c}`))}}}const fn={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function ls(){const t=typeof window<"u"&&window.localStorage?window.localStorage:fn;return{getItem(n){return t.getItem(n)},removeItem(n){t.removeItem(n)},setItem(n,e){try{t.setItem(n,e)}catch{}}}}const vt=256;let Z=vt,tt;function ds(t=11){if(!tt||Z+t>vt*2){tt="",Z=0;for(let n=0;n<vt;n++)tt+=(256+Math.random()*256|0).toString(16).substring(1)}return tt.substring(Z,Z+++t)}const{createClient:fs}=await q("viem");function Ei(t){const{multiInjectedProviderDiscovery:n=!0,storage:e=us({storage:ls()}),syncConnectedChain:o=!0,ssr:s=!1,...r}=t,c=typeof window<"u"&&n?Qe():void 0,i=gt(()=>r.chains),a=gt(()=>{const f=[],p=new Set;for(const y of r.connectors??[]){const I=u(y);if(f.push(I),!s&&I.rdns){const C=typeof I.rdns=="string"?[I.rdns]:I.rdns;for(const F of C)p.add(F)}}if(!s&&c){const y=c.getProviders();for(const I of y)p.has(I.info.rdns)||f.push(u(l(I)))}return f});function u(f){const p=cs(ds()),y={...f({emitter:p,chains:i.getState(),storage:e,transports:r.transports}),emitter:p,uid:p.uid};return p.on("connect",R),y.setup?.(),y}function l(f){const{info:p}=f,y=f.provider;return An({target:{...p,id:p.rdns,provider:y}})}const d=new Map;function h(f={}){const p=f.chainId??O.getState().chainId,y=i.getState().find(C=>C.id===p);if(f.chainId&&!y)throw new et;{const C=d.get(O.getState().chainId);if(C&&!y)return C;if(!y)throw new et}{const C=d.get(p);if(C)return C}let I;if(r.client)I=r.client({chain:y});else{const C=y.id,F=i.getState().map(K=>K.id),$={},x=Object.entries(r);for(const[K,N]of x)if(!(K==="chains"||K==="client"||K==="connectors"||K==="transports"))if(typeof N=="object")if(C in N)$[K]=N[C];else{if(F.some(_t=>_t in N))continue;$[K]=N}else $[K]=N;I=fs({...$,chain:y,batch:$.batch??{multicall:!0},transport:K=>r.transports[C]({...K,connectors:a})})}return d.set(p,I),I}function g(){return{chainId:i.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let S;const w="0.0.0-canary-";at.startsWith(w)?S=Number.parseInt(at.replace(w,""),10):S=Number.parseInt(at.split(".")[0]??"0",10);const O=gt(ns(e?ss(g,{migrate(f,p){if(p===S)return f;const y=g(),I=_(f,y.chainId);return{...y,chainId:I}},name:"store",partialize(f){return{connections:{__type:"Map",value:Array.from(f.connections.entries()).map(([p,y])=>{const{id:I,name:C,type:F,uid:$}=y.connector;return[p,{...y,connector:{id:I,name:C,type:F,uid:$}}]})},chainId:f.chainId,current:f.current}},merge(f,p){typeof f=="object"&&f&&"status"in f&&delete f.status;const y=_(f,p.chainId);return{...p,...f,chainId:y}},skipHydration:s,storage:e,version:S}):g));O.setState(g());function _(f,p){return f&&typeof f=="object"&&"chainId"in f&&typeof f.chainId=="number"&&i.getState().some(y=>y.id===f.chainId)?f.chainId:p}o&&O.subscribe(({connections:f,current:p})=>p?f.get(p)?.chainId:void 0,f=>{if(i.getState().some(y=>y.id===f))return O.setState(y=>({...y,chainId:f??y.chainId}))}),c?.subscribe(f=>{const p=new Set,y=new Set;for(const C of a.getState())if(p.add(C.id),C.rdns){const F=typeof C.rdns=="string"?[C.rdns]:C.rdns;for(const $ of F)y.add($)}const I=[];for(const C of f){if(y.has(C.info.rdns))continue;const F=u(l(C));p.has(F.id)||I.push(F)}e&&!O.persist.hasHydrated()||a.setState(C=>[...C,...I],!0)});function T(f){O.setState(p=>{const y=p.connections.get(f.uid);return y?{...p,connections:new Map(p.connections).set(f.uid,{accounts:f.accounts??y.accounts,chainId:f.chainId??y.chainId,connector:y.connector})}:p})}function R(f){O.getState().status==="connecting"||O.getState().status==="reconnecting"||O.setState(p=>{const y=a.getState().find(I=>I.uid===f.uid);return y?(y.emitter.listenerCount("connect")&&y.emitter.off("connect",T),y.emitter.listenerCount("change")||y.emitter.on("change",T),y.emitter.listenerCount("disconnect")||y.emitter.on("disconnect",A),{...p,connections:new Map(p.connections).set(f.uid,{accounts:f.accounts,chainId:f.chainId,connector:y}),current:f.uid,status:"connected"}):p})}function A(f){O.setState(p=>{const y=p.connections.get(f.uid);if(y){const C=y.connector;C.emitter.listenerCount("change")&&y.connector.emitter.off("change",T),C.emitter.listenerCount("disconnect")&&y.connector.emitter.off("disconnect",A),C.emitter.listenerCount("connect")||y.connector.emitter.on("connect",R)}if(p.connections.delete(f.uid),p.connections.size===0)return{...p,connections:new Map,current:null,status:"disconnected"};const I=p.connections.values().next().value;return{...p,connections:new Map(p.connections),current:I.connector.uid}})}return{get chains(){return i.getState()},get connectors(){return a.getState()},storage:e,getClient:h,get state(){return O.getState()},setState(f){let p;typeof f=="function"?p=f(O.getState()):p=f;const y=g();typeof p!="object"&&(p=y),Object.keys(y).some(C=>!(C in p))&&(p=y),O.setState(p,!0)},subscribe(f,p,y){return O.subscribe(f,p,y?{...y,fireImmediately:y.emitImmediately}:void 0)},_internal:{mipd:c,async revalidate(){const f=O.getState(),p=f.connections;let y=f.current;for(const[,I]of p){const C=I.connector;C.isAuthorized&&await C.isAuthorized()||(p.delete(C.uid),y===C.uid&&(y=null))}O.setState(I=>({...I,connections:p,current:y}))},store:O,ssr:!!s,syncConnectedChain:o,transports:r.transports,chains:{setState(f){const p=typeof f=="function"?f(i.getState()):f;if(p.length!==0)return i.setState(p,!0)},subscribe(f){return i.subscribe(f)}},connectors:{providerDetailToConnector:l,setup:u,setState(f){return a.setState(typeof f=="function"?f(a.getState()):f,!0)},subscribe(f){return a.subscribe(f)}},events:{change:T,connect:R,disconnect:A}}}}function hs(t,n){const{initialState:e,reconnectOnMount:o}=n;return e&&!t._internal.store.persist.hasHydrated()&&t.setState({...e,chainId:t.chains.some(s=>s.id===e.chainId)?e.chainId:t.chains[0].id,connections:o?e.connections:new Map,status:o?"reconnecting":"disconnected"}),{async onMount(){t._internal.ssr&&(await t._internal.store.persist.rehydrate(),t._internal.mipd&&t._internal.connectors.setState(s=>{const r=new Set;for(const a of s??[])if(a.rdns){const u=Array.isArray(a.rdns)?a.rdns:[a.rdns];for(const l of u)r.add(l)}const c=[],i=t._internal.mipd?.getProviders()??[];for(const a of i){if(r.has(a.info.rdns))continue;const u=t._internal.connectors.providerDetailToConnector(a),l=t._internal.connectors.setup(u);c.push(l)}return[...s,...c]})),o?an(t):t.storage&&t.setState(s=>({...s,connections:new Map}))}}}const{ChainDisconnectedError:ys,createTransport:gs,hexToNumber:ps,ProviderDisconnectedError:Lt,withRetry:ms,withTimeout:ws}=await q("viem");function Oi(t,n={}){const{type:e}=t,{key:o="connector",name:s="Connector",retryDelay:r}=n;return c=>{const{chain:i,connectors:a}=c,u=n.retryCount??c.retryCount;return gs({key:o,name:s,request:async({method:d,params:h})=>{const g=a?.getState().find(_=>_.type===e);if(!g)throw new Lt(new Error(`Could not find connector of type "${e}" in \`connectors\` passed to \`createConfig\`.`));const S=await g.getProvider({chainId:i?.id});if(!S)throw new Lt(new Error("Provider is disconnected."));const w=ps(await ms(()=>ws(()=>S.request({method:"eth_chainId"}),{timeout:100})));if(i&&w!==i.id)throw new ys(new Error(`The current chain of the connector (id: ${w}) does not match the target chain for the request (id: ${i.id} – ${i.name}).`));const O={method:d,params:h};return S.request(O)},retryCount:u,retryDelay:r,type:"connector"})}}const{fallback:bs}=await q("viem");function qi(t,n){return bs(t,n)}const Pi={getItem(t){return typeof window>"u"?null:hn(document.cookie,t)??null},setItem(t,n){typeof window>"u"||(document.cookie=`${t}=${n};path=/;samesite=Lax`)},removeItem(t){typeof window>"u"||(document.cookie=`${t}=;max-age=-1;path=/`)}};function Ti(t,n){if(!n)return;const e=`${t.storage?.key}.store`,o=hn(n,e);if(o)return dn(o).state}function hn(t,n){const e=t.split("; ").find(o=>o.startsWith(`${n}=`));if(e)return e.substring(n.length+1)}function Ri(t){if(typeof t=="string")return Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10);if(typeof t=="bigint")return Number(t);if(typeof t=="number")return t;throw new Error(`Cannot normalize chainId "${t}" of type "${typeof t}"`)}const{useEffect:Cs,useRef:Is}=await q("react");function vs(t){const{children:n,config:e,initialState:o,reconnectOnMount:s=!0}=t,{onMount:r}=hs(e,{initialState:o,reconnectOnMount:s});e._internal.ssr||r();const c=Is(!0);return Cs(()=>{if(c.current&&e._internal.ssr)return r(),()=>{c.current=!1}},[]),n}const{createContext:Ss,createElement:Vt}=await q("react"),yn=Ss(void 0);function _i(t){const{children:n,config:e}=t,o={value:e};return Vt(vs,t,Vt(yn.Provider,o,n))}const Es="2.19.5",Os=()=>`wagmi@${Es}`;class qs extends $n{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 Os()}}class Ps extends qs{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}const{useContext:Ts}=await q("react");function m(t={}){const n=t.config??Ts(yn);if(!n)throw new Ps;return n}function Rs(t,n){const{onChange:e}=n;return t._internal.chains.subscribe((o,s)=>{e(o,s)})}var gn={exports:{}},pn={},mn={exports:{}},wn={};/**
1
+ import{importShared as q}from"./__federation_fn_import-BPa8h49G.js";import{k as Rn,l as _n,q as D,t as Fn,u as Kn,v as kn,C as et,e as Mn,w as at,g as An,B as $n,S as nn,x as Ft,y as Q,z as ot,r as W,a as st,A as wt,D as Kt,E as Qn,F as V,f as xn,G as Nn,H as kt,n as ct,i as Mt,I as Bn,J as jn,d as At,K as Dn,L as Un,N as Et,O as U}from"./QueryClientProvider-diWVe5Kl.js";import{R as Ma,P as Aa}from"./QueryClientProvider-diWVe5Kl.js";import{r as en}from"./index-Dy0yjznp.js";import"./jsx-runtime-B1l0k91v.js";import{U as Hn,M as Gn,z as Wn,j as zn,A as Ln,V as Vn,B as Jn,C as Yn,D as Xn,E as Zn,F as te,G as ne,H as ee,I as oe,J as on,K as se,L as re,W as ce,s as ie,X as ae,Y as ue,Z as le,o as de,O as fe,P as he,Q as ye,_ as ge,S as pe,R as me,t as we,T as be,n as Ce,al as ut}from"./webSocket-CO2AWAe6.js";import{a3 as Qa,a4 as xa,a5 as Na}from"./webSocket-CO2AWAe6.js";import{c as sn,N as Ie,aU as ve,a3 as Se,cl as Ee,cM as Oe,V as qe,c0 as Pe,X as Te,cP as Re,cL as _e,J as Fe,c9 as Ke,c3 as ke,c2 as Me,ad as Ae}from"./uid-Cg2-wLF5.js";import{E as $e}from"./index-CdrMQoR6.js";import{c as Qe}from"./store-DOLZnwHk.js";function b(t,n,e){const o=t[n.name];if(typeof o=="function")return o;const s=t[e];return typeof s=="function"?s:r=>n(t,r)}async function xe(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,sn,"call")(o)}async function Ne(t,n){let e;if(typeof n.connector=="function"?e=t._internal.connectors.setup(n.connector):e=n.connector,e.uid===t.state.current)throw new Rn;try{t.setState(c=>({...c,status:"connecting"})),e.emitter.emit("message",{type:"connecting"});const{connector:o,...s}=n,r=await e.connect(s);return e.emitter.off("connect",t._internal.events.connect),e.emitter.on("change",t._internal.events.change),e.emitter.on("disconnect",t._internal.events.disconnect),await t.storage?.setItem("recentConnectorId",e.id),t.setState(c=>({...c,connections:new Map(c.connections).set(e.uid,{accounts:s.withCapabilities?r.accounts.map(i=>typeof i=="object"?i.address:i):r.accounts,chainId:r.chainId,connector:e}),current:e.uid,status:"connected"})),{accounts:s.withCapabilities?r.accounts.map(c=>typeof c=="object"?c:{address:c,capabilities:{}}):r.accounts,chainId:r.chainId}}catch(o){throw t.setState(s=>({...s,status:s.current?"connected":"disconnected"})),o}}const{createClient:Be,custom:je}=await q("viem");async function k(t,n={}){const{assertChainId:e=!0}=n;let o;if(n.connector){const{connector:l}=n;if(t.state.status==="reconnecting"&&!l.getAccounts&&!l.getChainId)throw new _n({connector:l});const[d,h]=await Promise.all([l.getAccounts().catch(g=>{if(n.account===null)return[];throw g}),l.getChainId()]);o={accounts:d,chainId:h,connector:l}}else o=t.state.connections.get(t.state.current);if(!o)throw new D;const s=n.chainId??o.chainId,r=await o.connector.getChainId();if(e&&r!==s)throw new Fn({connectionChainId:s,connectorChainId:r});const c=o.connector;if(c.getClient)return c.getClient({chainId:s});const i=Ie(n.account??o.accounts[0]);if(i&&(i.address=ve(i.address)),n.account&&!o.accounts.some(l=>l.toLowerCase()===i.address.toLowerCase()))throw new Kn({address:i.address,connector:c});const a=t.chains.find(l=>l.id===s),u=await o.connector.getProvider({chainId:s});return Be({account:i,chain:a,name:"Connector Client",transport:l=>je(u)({...l,retryCount:0})})}async function De(t,n){const{account:e,chainId:o,connector:s,...r}=n;let c;return typeof e=="object"&&e?.type==="local"?c=t.getClient({chainId:o}):c=await k(t,{account:e??void 0,assertChainId:!1,chainId:o,connector:s}),await b(c,Hn,"deployContract")({...r,...e?{account:e}:{},chain:o?{id:o}:null})}async function Ue(t,n={}){let e;if(n.connector)e=n.connector;else{const{connections:s,current:r}=t.state;e=s.get(r)?.connector}const o=t.state.connections;e&&(await e.disconnect(),e.emitter.off("change",t._internal.events.change),e.emitter.off("disconnect",t._internal.events.disconnect),e.emitter.on("connect",t._internal.events.connect),o.delete(e.uid)),t.setState(s=>{if(o.size===0)return{...s,connections:new Map,current:null,status:"disconnected"};const r=o.values().next().value;return{...s,connections:new Map(o),current:r.connector.uid}});{const s=t.state.current;if(!s)return;const r=t.state.connections.get(s)?.connector;if(!r)return;await t.storage?.setItem("recentConnectorId",r.id)}}const{weiUnits:He}=await q("viem");function z(t){return typeof t=="number"?t:t==="wei"?0:Math.abs(He[t])}const{formatUnits:lt}=await q("viem");async function Ge(t,n={}){const{chainId:e,formatUnits:o="gwei",...s}=n,r=t.getClient({chainId:e}),c=b(r,Se,"estimateFeesPerGas"),{gasPrice:i,maxFeePerGas:a,maxPriorityFeePerGas:u}=await c({...s,chain:r.chain}),l=z(o);return{formatted:{gasPrice:i?lt(i,l):void 0,maxFeePerGas:a?lt(a,l):void 0,maxPriorityFeePerGas:u?lt(u,l):void 0},gasPrice:i,maxFeePerGas:a,maxPriorityFeePerGas:u}}async function We(t,n){const{chainId:e,connector:o,...s}=n;let r;n.account?r=n.account:r=(await k(t,{account:n.account,assertChainId:!1,chainId:e,connector:o})).account;const c=t.getClient({chainId:e});return b(c,Ee,"estimateGas")({...s,account:r})}async function ze(t,n={}){const{chainId:e}=n,o=t.getClient({chainId:e});return b(o,Oe,"estimateMaxPriorityFeePerGas")({chain:o.chain})}function Ot(t){const n=t.state.current,e=t.state.connections.get(n),o=e?.accounts,s=o?.[0],r=t.chains.find(i=>i.id===e?.chainId),c=t.state.status;switch(c){case"connected":return{address:s,addresses:o,chain:r,chainId:e?.chainId,connector:e?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:c};case"reconnecting":return{address:s,addresses:o,chain:r,chainId:e?.chainId,connector:e?.connector,isConnected:!!s,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:c};case"connecting":return{address:s,addresses:o,chain:r,chainId:e?.chainId,connector:e?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:c};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:c}}}async function Le(t,n){const{allowFailure:e=!0,chainId:o,contracts:s,...r}=n,c=t.getClient({chainId:o});return b(c,Gn,"multicall")({allowFailure:e,contracts:s,...r})}function rn(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,qe,"readContract")(o)}const{ContractFunctionExecutionError:Ve}=await q("viem");async function L(t,n){const{allowFailure:e=!0,blockNumber:o,blockTag:s,...r}=n,c=n.contracts;try{const i={};for(const[d,h]of c.entries()){const g=h.chainId??t.state.chainId;i[g]||(i[g]=[]),i[g]?.push({contract:h,index:d})}const a=()=>Object.entries(i).map(([d,h])=>Le(t,{...r,allowFailure:e,blockNumber:o,blockTag:s,chainId:Number.parseInt(d,10),contracts:h.map(({contract:g})=>g)})),u=(await Promise.all(a())).flat(),l=Object.values(i).flatMap(d=>d.map(({index:h})=>h));return u.reduce((d,h,g)=>(d&&(d[l[g]]=h),d),[])}catch(i){if(i instanceof Ve)throw i;const a=()=>c.map(u=>rn(t,{...u,blockNumber:o,blockTag:s}));return e?(await Promise.allSettled(a())).map(u=>u.status==="fulfilled"?{result:u.value,status:"success"}:{error:u.reason,result:void 0,status:"failure"}):await Promise.all(a())}}const{formatUnits:cn,hexToString:Je,trim:Ye}=await q("viem");async function Xe(t,n){const{address:e,blockNumber:o,blockTag:s,chainId:r,token:c,unit:i="ether"}=n;if(c)try{return await $t(t,{balanceAddress:e,chainId:r,symbolType:"string",tokenAddress:c})}catch(h){if(h.name==="ContractFunctionExecutionError"){const g=await $t(t,{balanceAddress:e,chainId:r,symbolType:"bytes32",tokenAddress:c}),S=Je(Ye(g.symbol,{dir:"right"}));return{...g,symbol:S}}throw h}const a=t.getClient({chainId:r}),l=await b(a,Wn,"getBalance")(o?{address:e,blockNumber:o}:{address:e,blockTag:s}),d=t.chains.find(h=>h.id===r)??a.chain;return{decimals:d.nativeCurrency.decimals,formatted:cn(l,z(i)),symbol:d.nativeCurrency.symbol,value:l}}async function $t(t,n){const{balanceAddress:e,chainId:o,symbolType:s,tokenAddress:r,unit:c}=n,i={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:s}]}],address:r},[a,u,l]=await L(t,{allowFailure:!1,contracts:[{...i,functionName:"balanceOf",args:[e],chainId:o},{...i,functionName:"decimals",chainId:o},{...i,functionName:"symbol",chainId:o}]}),d=cn(a??"0",z(c??u));return{decimals:u,formatted:d,symbol:l,value:a}}async function Ze(t,n={}){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return{...await b(s,Pe,"getBlock")(o),chainId:s.chain.id}}function to(t,n={}){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,zn,"getBlockNumber")(o)}function no(t,n={}){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Ln,"getBlockTransactionCount")(o)}async function eo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Te,"getBytecode")(o)}async function oo(t,n){const{connector:e,id:o}=n,s=await k(t,{connector:e});return b(s,Re,"getCallsStatus")({id:o})}async function so(t,n={}){const{account:e,chainId:o,connector:s}=n,r=await k(t,{account:e,connector:s});return Vn(r,{account:e,chainId:o})}function Qt(t){return t.state.chainId}function B(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;let e,o;if(Array.isArray(t)&&Array.isArray(n)){if(e=t.length,e!==n.length)return!1;for(o=e;o--!==0;)if(!B(t[o],n[o]))return!1;return!0}if(typeof t.valueOf=="function"&&t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString)return t.toString()===n.toString();const s=Object.keys(t);if(e=s.length,e!==Object.keys(n).length)return!1;for(o=e;o--!==0;)if(!Object.hasOwn(n,s[o]))return!1;for(o=e;o--!==0;){const r=s[o];if(r&&!B(t[r],n[r]))return!1}return!0}return t!==t&&n!==n}let dt=[];function xt(t){const n=t.chains;return B(dt,n)?dt:(dt=n,n)}function rt(t,n={}){try{return t.getClient(n)}catch{return}}let J=[];function bt(t){const n=[...t.state.connections.values()];return t.state.status==="reconnecting"||B(J,n)?J:(J=n,n)}let Y=[];function Nt(t){const n=t.connectors;return Y.length===n.length&&Y.every((e,o)=>e===n[o])?Y:(Y=n,n)}function ro(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Jn,"getEnsAddress")(o)}function co(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Yn,"getEnsAvatar")(o)}function io(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Xn,"getEnsName")(o)}function ao(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,Zn,"getEnsResolver")(o)}function uo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,te,"getEnsText")(o)}function lo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,ne,"getFeeHistory")(o)}function fo(t,n={}){const{chainId:e}=n,o=t.getClient({chainId:e});return b(o,_e,"getGasPrice")({})}async function ho(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,ee,"getProof")(o)}const{publicActions:yo}=await q("viem");function Ct(t,n={}){return rt(t,n)?.extend(yo)}async function go(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,oe,"getStorageAt")(o)}const{ContractFunctionExecutionError:ft,formatUnits:Bt,hexToString:jt,trim:Dt}=await q("viem");async function po(t,n){const{address:e,chainId:o,formatUnits:s=18}=n;function r(c){return[{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:c}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:c}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]}]}try{const c=r("string"),i={address:e,abi:c,chainId:o},[a,u,l,d]=await L(t,{allowFailure:!0,contracts:[{...i,functionName:"decimals"},{...i,functionName:"name"},{...i,functionName:"symbol"},{...i,functionName:"totalSupply"}]});if(u.error instanceof ft)throw u.error;if(l.error instanceof ft)throw l.error;if(a.error)throw a.error;if(d.error)throw d.error;return{address:e,decimals:a.result,name:u.result,symbol:l.result,totalSupply:{formatted:Bt(d.result,z(s)),value:d.result}}}catch(c){if(c instanceof ft){const i=r("bytes32"),a={address:e,abi:i,chainId:o},[u,l,d,h]=await L(t,{allowFailure:!1,contracts:[{...a,functionName:"decimals"},{...a,functionName:"name"},{...a,functionName:"symbol"},{...a,functionName:"totalSupply"}]});return{address:e,decimals:u,name:jt(Dt(l,{dir:"right"})),symbol:jt(Dt(d,{dir:"right"})),totalSupply:{formatted:Bt(h,z(s)),value:h}}}throw c}}function mo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,on,"getTransaction")(o)}function wo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,se,"getTransactionConfirmations")(o)}async function bo(t,n){const{address:e,blockNumber:o,blockTag:s,chainId:r}=n,c=t.getClient({chainId:r});return b(c,Fe,"getTransactionCount")(o?{address:e,blockNumber:o}:{address:e,blockTag:s})}async function Co(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,re,"getTransactionReceipt")(o)}const{walletActions:Io}=await q("viem");async function vo(t,n={}){return(await k(t,n)).extend(Io)}async function So(t,n){const{account:e,chainId:o,...s}=n,r=e??Ot(t).address,c=t.getClient({chainId:o});return b(c,Ke,"prepareTransactionRequest")({...s,...r?{account:r}:{}})}let ht=!1;async function an(t,n={}){if(ht)return[];ht=!0,t.setState(u=>({...u,status:u.current?"reconnecting":"connecting"}));const e=[];if(n.connectors?.length)for(const u of n.connectors){let l;typeof u=="function"?l=t._internal.connectors.setup(u):l=u,e.push(l)}else e.push(...t.connectors);let o;try{o=await t.storage?.getItem("recentConnectorId")}catch{}const s={};for(const[,u]of t.state.connections)s[u.connector.id]=1;o&&(s[o]=0);const r=Object.keys(s).length>0?[...e].sort((u,l)=>(s[u.id]??10)-(s[l.id]??10)):e;let c=!1;const i=[],a=[];for(const u of r){const l=await u.getProvider().catch(()=>{});if(!l||a.some(g=>g===l)||!await u.isAuthorized())continue;const h=await u.connect({isReconnecting:!0}).catch(()=>null);h&&(u.emitter.off("connect",t._internal.events.connect),u.emitter.on("change",t._internal.events.change),u.emitter.on("disconnect",t._internal.events.disconnect),t.setState(g=>{const S=new Map(c?g.connections:new Map).set(u.uid,{accounts:h.accounts,chainId:h.chainId,connector:u});return{...g,current:c?g.current:u.uid,connections:S}}),i.push({accounts:h.accounts,chainId:h.chainId,connector:u}),a.push(l),c=!0)}return(t.state.status==="reconnecting"||t.state.status==="connecting")&&(c?t.setState(u=>({...u,status:"connected"})):t.setState(u=>({...u,connections:new Map,current:null,status:"disconnected"}))),ht=!1,i}async function Eo(t,n){const{account:e,chainId:o,connector:s,calls:r,...c}=n,i=await k(t,{account:e,assertChainId:!1,chainId:o,connector:s});return b(i,ke,"sendCalls")({...c,...typeof e<"u"?{account:e}:{},calls:r,chain:o?{id:o}:void 0})}async function Oo(t,n){const{account:e,chainId:o,connector:s,calls:r,...c}=n,i=await k(t,{account:e,assertChainId:!1,chainId:o,connector:s});return b(i,ce,"sendCallsSync")({...c,...typeof e<"u"?{account:e}:{},calls:r,chain:o?{id:o}:void 0})}async function qo(t,n){const{account:e,chainId:o,connector:s,...r}=n;let c;return typeof e=="object"&&e?.type==="local"?c=t.getClient({chainId:o}):c=await k(t,{account:e??void 0,assertChainId:!1,chainId:o,connector:s}),await b(c,Me,"sendTransaction")({...r,...e?{account:e}:{},chain:o?{id:o}:null,gas:r.gas??void 0})}async function Po(t,n){const{account:e,chainId:o,connector:s,...r}=n;let c;return typeof e=="object"&&e?.type==="local"?c=t.getClient({chainId:o}):c=await k(t,{account:e??void 0,assertChainId:!1,chainId:o,connector:s}),await b(c,ie,"sendTransactionSync")({...r,...e?{account:e}:{},chain:o?{id:o}:null,gas:r.gas??void 0})}async function To(t,n){const{connector:e,id:o}=n,s=await k(t,{connector:e});return ae(s,{id:o})}async function Ro(t,n){const{account:e,connector:o,...s}=n;let r;return typeof e=="object"&&e.type==="local"?r=t.getClient():r=await k(t,{account:e,connector:o}),b(r,ue,"signMessage")({...s,...e?{account:e}:{}})}async function _o(t,n){const{account:e,connector:o,...s}=n;let r;return typeof e=="object"&&e.type==="local"?r=t.getClient():r=await k(t,{account:e,connector:o}),b(r,le,"signTypedData")({...s,...e?{account:e}:{}})}async function Fo(t,n){const{abi:e,chainId:o,connector:s,...r}=n;let c;n.account?c=n.account:c=(await k(t,{assertChainId:!1,chainId:o,connector:s})).account;const i=t.getClient({chainId:o}),a=b(i,de,"simulateContract"),{result:u,request:l}=await a({...r,abi:e,account:c});return{chainId:i.chain.id,result:u,request:{...l,chainId:o}}}async function Ko(t,n){const{connector:e}=n,o=t.state.connections.get(e.uid);if(!o)throw new D;return await t.storage?.setItem("recentConnectorId",e.id),t.setState(s=>({...s,current:e.uid})),{accounts:o.accounts,chainId:o.chainId}}async function ko(t,n){const{addEthereumChainParameter:e,chainId:o}=n,s=t.state.connections.get(n.connector?.uid??t.state.current);if(s){const c=s.connector;if(!c.switchChain)throw new kn({connector:c});return await c.switchChain({addEthereumChainParameter:e,chainId:o})}const r=t.chains.find(c=>c.id===o);if(!r)throw new et;return t.setState(c=>({...c,chainId:o})),r}async function Mo(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,fe,"verifyMessage")(o)}async function Ao(t,n){const{chainId:e,...o}=n,s=t.getClient({chainId:e});return b(s,he,"verifyTypedData")(o)}async function $o(t,n){const{connector:e}=n,o=await k(t,{connector:e});return Ae(o,n)}const{hexToString:Qo}=await q("viem");async function xo(t,n){const{chainId:e,timeout:o=0,...s}=n,r=t.getClient({chainId:e}),i=await b(r,ye,"waitForTransactionReceipt")({...s,timeout:o});if(i.status==="reverted"){const a=b(r,on,"getTransaction"),{from:u,...l}=await a({hash:i.transactionHash}),h=await b(r,sn,"call")({...l,account:u,data:l.input,gasPrice:l.type!=="eip1559"?l.gasPrice:void 0,maxFeePerGas:l.type==="eip1559"?l.maxFeePerGas:void 0,maxPriorityFeePerGas:l.type==="eip1559"?l.maxPriorityFeePerGas:void 0}),g=h?.data?Qo(`0x${h.data.substring(138)}`):"unknown reason";throw new Error(g)}return{...i,chainId:r.chain.id}}function un(t,n){const{onChange:e}=n;return t.subscribe(()=>Ot(t),e,{equalityFn(o,s){const{connector:r,...c}=o,{connector:i,...a}=s;return B(c,a)&&r?.id===i?.id&&r?.uid===i?.uid}})}async function No(t,n){const{connector:e,...o}=n,s=await k(t,{connector:e});return b(s,ge,"watchAsset")(o)}function Bo(t,n){const{syncConnectedChain:e=t._internal.syncConnectedChain,...o}=n;let s;const r=a=>{s&&s();const u=t.getClient({chainId:a});return s=b(u,pe,"watchBlockNumber")(o),s},c=r(n.chainId);let i;return e&&!n.chainId&&(i=t.subscribe(({chainId:a})=>a,async a=>r(a))),()=>{c?.(),i?.()}}function jo(t,n){const{syncConnectedChain:e=t._internal.syncConnectedChain,...o}=n;let s;const r=a=>{s&&s();const u=t.getClient({chainId:a});return s=b(u,me,"watchBlocks")(o),s},c=r(n.chainId);let i;return e&&!n.chainId&&(i=t.subscribe(({chainId:a})=>a,async a=>r(a))),()=>{c?.(),i?.()}}function Do(t,n){const{onChange:e}=n;return t.subscribe(o=>o.chainId,e)}function Uo(t,n){const{onChange:e}=n;return t.subscribe(()=>rt(t),e,{equalityFn(o,s){return o?.uid===s?.uid}})}function Ho(t,n){const{onChange:e}=n;return t.subscribe(()=>bt(t),e,{equalityFn:B})}function Go(t,n){const{onChange:e}=n;return t._internal.connectors.subscribe((o,s)=>{e(Object.values(o),s)})}function Wo(t,n){const{syncConnectedChain:e=t._internal.syncConnectedChain,...o}=n;let s;const r=a=>{s&&s();const u=t.getClient({chainId:a});return s=b(u,we,"watchContractEvent")(o),s},c=r(n.chainId);let i;return e&&!n.chainId&&(i=t.subscribe(({chainId:a})=>a,async a=>r(a))),()=>{c?.(),i?.()}}function zo(t,n){const{syncConnectedChain:e=t._internal.syncConnectedChain,...o}=n;let s;const r=a=>{s&&s();const u=t.getClient({chainId:a});return s=b(u,be,"watchPendingTransactions")(o),s},c=r(n.chainId);let i;return e&&!n.chainId&&(i=t.subscribe(({chainId:a})=>a,async a=>r(a))),()=>{c?.(),i?.()}}function Lo(t,n){const{onChange:e}=n;return t.subscribe(()=>Ct(t),e,{equalityFn(o,s){return o?.uid===s?.uid}})}async function Vo(t,n){const{account:e,chainId:o,connector:s,...r}=n;let c;return typeof e=="object"&&e?.type==="local"?c=t.getClient({chainId:o}):c=await k(t,{account:e??void 0,assertChainId:!1,chainId:o,connector:s}),await b(c,Ce,"writeContract")({...r,...e?{account:e}:{},chain:o?{id:o}:null})}const{custom:Jo,fromHex:Ut,getAddress:X,keccak256:Yo,numberToHex:Ht,RpcRequestError:yt,SwitchChainError:Xo,stringToHex:Zo,UserRejectedRequestError:H}=await q("viem");ln.type="mock";function ln(t){const n=new Map,e=t.features??{defaultConnected:!1};let o=e.defaultConnected,s;return Mn(r=>({id:"mock",name:"Mock Connector",type:ln.type,async setup(){s=r.chains[0].id},async connect({chainId:c,withCapabilities:i}={}){if(e.connectError)throw typeof e.connectError=="boolean"?new H(new Error("Failed to connect.")):e.connectError;const u=await(await this.getProvider()).request({method:"eth_requestAccounts"});let l=await this.getChainId();return c&&l!==c&&(l=(await this.switchChain({chainId:c})).id),o=!0,{accounts:i?u.map(d=>({address:X(d),capabilities:{foo:{bar:d}}})):u.map(d=>X(d)),chainId:l}},async disconnect(){o=!1},async getAccounts(){if(!o)throw new D;return(await(await this.getProvider()).request({method:"eth_accounts"})).map(a=>X(a))},async getChainId(){const i=await(await this.getProvider()).request({method:"eth_chainId"});return Ut(i,"number")},async isAuthorized(){return!e.reconnect||!o?!1:!!(await this.getAccounts()).length},async switchChain({chainId:c}){const i=await this.getProvider(),a=r.chains.find(u=>u.id===c);if(!a)throw new Xo(new et);return await i.request({method:"wallet_switchEthereumChain",params:[{chainId:Ht(c)}]}),a},onAccountsChanged(c){c.length===0?this.onDisconnect():r.emitter.emit("change",{accounts:c.map(i=>X(i))})},onChainChanged(c){const i=Number(c);r.emitter.emit("change",{chainId:i})},async onDisconnect(c){r.emitter.emit("disconnect"),o=!1},async getProvider({chainId:c}={}){const a=(r.chains.find(l=>l.id===c)??r.chains[0]).rpcUrls.default.http[0];return Jo({request:async({method:l,params:d})=>{if(l==="eth_chainId")return Ht(s);if(l==="eth_requestAccounts")return t.accounts;if(l==="eth_signTypedData_v4"&&e.signTypedDataError)throw typeof e.signTypedDataError=="boolean"?new H(new Error("Failed to sign typed data.")):e.signTypedDataError;if(l==="wallet_switchEthereumChain"){if(e.switchChainError)throw typeof e.switchChainError=="boolean"?new H(new Error("Failed to switch chain.")):e.switchChainError;s=Ut(d[0].chainId,"number"),this.onChainChanged(s.toString());return}if(l==="wallet_watchAsset"){if(e.watchAssetError)throw typeof e.watchAssetError=="boolean"?new H(new Error("Failed to switch chain.")):e.watchAssetError;return o}if(l==="wallet_getCapabilities")return{"0x2105":{paymasterService:{supported:d[0]==="0x95132632579b073D12a6673e18Ab05777a6B86f8"},sessionKeys:{supported:!0}},"0x14A34":{paymasterService:{supported:d[0]==="0x95132632579b073D12a6673e18Ab05777a6B86f8"}}};if(l==="wallet_sendCalls"){const w=[],O=d[0].calls,_=d[0].from;for(const R of O){const{result:A,error:f}=await ut.http(a,{body:{method:"eth_sendTransaction",params:[{...R,...typeof _<"u"?{from:_}:{}}]}});if(f)throw new yt({body:{method:l,params:d},error:f,url:a});w.push(A)}const T=Yo(Zo(JSON.stringify(O)));return n.set(T,w),{id:T}}if(l==="wallet_getCallsStatus"){const w=n.get(d[0]);if(!w)return{atomic:!1,chainId:"0x1",id:d[0],status:100,receipts:[],version:"2.0.0"};const _=(await Promise.all(w.map(async T=>{const{result:R,error:A}=await ut.http(a,{body:{method:"eth_getTransactionReceipt",params:[T],id:0}});if(A)throw new yt({body:{method:l,params:d},error:A,url:a});return R?{blockHash:R.blockHash,blockNumber:R.blockNumber,gasUsed:R.gasUsed,logs:R.logs,status:R.status,transactionHash:R.transactionHash}:null}))).filter(T=>T!==null);return _.length===0?{atomic:!1,chainId:"0x1",id:d[0],status:100,receipts:[],version:"2.0.0"}:{atomic:!1,chainId:"0x1",id:d[0],status:200,receipts:_,version:"2.0.0"}}if(l==="wallet_showCallsStatus")return;if(l==="personal_sign"){if(e.signMessageError)throw typeof e.signMessageError=="boolean"?new H(new Error("Failed to sign message.")):e.signMessageError;l="eth_sign",d=[d[1],d[0]]}const h={method:l,params:d},{error:g,result:S}=await ut.http(a,{body:h});if(g)throw new yt({body:h,error:g,url:a});return S}})({retryCount:0})}}))}const ts=t=>(n,e,o)=>{const s=o.subscribe;return o.subscribe=(c,i,a)=>{let u=c;if(i){const l=a?.equalityFn||Object.is;let d=c(o.getState());u=h=>{const g=c(h);if(!l(d,g)){const S=d;i(d=g,S)}},a?.fireImmediately&&i(d,d)}return s(u)},t(n,e,o)},ns=ts;function es(t,n){let e;try{e=t()}catch{return}return{getItem:s=>{var r;const c=a=>a===null?null:JSON.parse(a,void 0),i=(r=e.getItem(s))!=null?r:null;return i instanceof Promise?i.then(c):c(i)},setItem:(s,r)=>e.setItem(s,JSON.stringify(r,void 0)),removeItem:s=>e.removeItem(s)}}const It=t=>n=>{try{const e=t(n);return e instanceof Promise?e:{then(o){return It(o)(e)},catch(o){return this}}}catch(e){return{then(o){return this},catch(o){return It(o)(e)}}}},os=(t,n)=>(e,o,s)=>{let r={storage:es(()=>localStorage),partialize:w=>w,version:0,merge:(w,O)=>({...O,...w}),...n},c=!1;const i=new Set,a=new Set;let u=r.storage;if(!u)return t((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),e(...w)},o,s);const l=()=>{const w=r.partialize({...o()});return u.setItem(r.name,{state:w,version:r.version})},d=s.setState;s.setState=(w,O)=>{d(w,O),l()};const h=t((...w)=>{e(...w),l()},o,s);s.getInitialState=()=>h;let g;const S=()=>{var w,O;if(!u)return;c=!1,i.forEach(T=>{var R;return T((R=o())!=null?R:h)});const _=((O=r.onRehydrateStorage)==null?void 0:O.call(r,(w=o())!=null?w:h))||void 0;return It(u.getItem.bind(u))(r.name).then(T=>{if(T)if(typeof T.version=="number"&&T.version!==r.version){if(r.migrate)return[!0,r.migrate(T.state,T.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,T.state];return[!1,void 0]}).then(T=>{var R;const[A,f]=T;if(g=r.merge(f,(R=o())!=null?R:h),e(g,!0),A)return l()}).then(()=>{_?.(g,void 0),g=o(),c=!0,a.forEach(T=>T(g))}).catch(T=>{_?.(void 0,T)})};return s.persist={setOptions:w=>{r={...r,...w},w.storage&&(u=w.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>S(),hasHydrated:()=>c,onHydrate:w=>(i.add(w),()=>{i.delete(w)}),onFinishHydration:w=>(a.add(w),()=>{a.delete(w)})},r.skipHydration||S(),g||h},ss=os,Gt=t=>{let n;const e=new Set,o=(u,l)=>{const d=typeof u=="function"?u(n):u;if(!Object.is(d,n)){const h=n;n=l??(typeof d!="object"||d===null)?d:Object.assign({},n,d),e.forEach(g=>g(n,h))}},s=()=>n,i={setState:o,getState:s,getInitialState:()=>a,subscribe:u=>(e.add(u),()=>e.delete(u))},a=n=t(o,s,i);return i},gt=t=>t?Gt(t):Gt;class rs{constructor(n){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new $e})}on(n,e){this._emitter.on(n,e)}once(n,e){this._emitter.once(n,e)}off(n,e){this._emitter.off(n,e)}emit(n,...e){const o=e[0];this._emitter.emit(n,{uid:this.uid,...o})}listenerCount(n){return this._emitter.listenerCount(n)}}function cs(t){return new rs(t)}function dn(t,n){return JSON.parse(t,(e,o)=>{let s=o;return s?.__type==="bigint"&&(s=BigInt(s.value)),s?.__type==="Map"&&(s=new Map(s.value)),n?.(e,s)??s})}function Wt(t,n){return t.slice(0,n).join(".")||"."}function zt(t,n){const{length:e}=t;for(let o=0;o<e;++o)if(t[o]===n)return o+1;return 0}function is(t,n){const e=typeof t=="function",o=typeof n=="function",s=[],r=[];return function(i,a){if(typeof a=="object")if(s.length){const u=zt(s,this);u===0?s[s.length]=this:(s.splice(u),r.splice(u)),r[r.length]=i;const l=zt(s,a);if(l!==0)return o?n.call(this,i,a,Wt(r,l)):`[ref=${Wt(r,l)}]`}else s[0]=a,r[0]=i;return e?t.call(this,i,a):a}}function as(t,n,e,o){return JSON.stringify(t,is((s,r)=>{let c=r;return typeof c=="bigint"&&(c={__type:"bigint",value:r.toString()}),c instanceof Map&&(c={__type:"Map",value:Array.from(r.entries())}),n?.(s,c)??c},o),e??void 0)}function us(t){const{deserialize:n=dn,key:e="wagmi",serialize:o=as,storage:s=fn}=t;function r(c){return c instanceof Promise?c.then(i=>i).catch(()=>null):c}return{...s,key:e,async getItem(c,i){const a=s.getItem(`${e}.${c}`),u=await r(a);return u?n(u)??null:i??null},async setItem(c,i){const a=`${e}.${c}`;i===null?await r(s.removeItem(a)):await r(s.setItem(a,o(i)))},async removeItem(c){await r(s.removeItem(`${e}.${c}`))}}}const fn={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function ls(){const t=typeof window<"u"&&window.localStorage?window.localStorage:fn;return{getItem(n){return t.getItem(n)},removeItem(n){t.removeItem(n)},setItem(n,e){try{t.setItem(n,e)}catch{}}}}const vt=256;let Z=vt,tt;function ds(t=11){if(!tt||Z+t>vt*2){tt="",Z=0;for(let n=0;n<vt;n++)tt+=(256+Math.random()*256|0).toString(16).substring(1)}return tt.substring(Z,Z+++t)}const{createClient:fs}=await q("viem");function Ei(t){const{multiInjectedProviderDiscovery:n=!0,storage:e=us({storage:ls()}),syncConnectedChain:o=!0,ssr:s=!1,...r}=t,c=typeof window<"u"&&n?Qe():void 0,i=gt(()=>r.chains),a=gt(()=>{const f=[],p=new Set;for(const y of r.connectors??[]){const I=u(y);if(f.push(I),!s&&I.rdns){const C=typeof I.rdns=="string"?[I.rdns]:I.rdns;for(const F of C)p.add(F)}}if(!s&&c){const y=c.getProviders();for(const I of y)p.has(I.info.rdns)||f.push(u(l(I)))}return f});function u(f){const p=cs(ds()),y={...f({emitter:p,chains:i.getState(),storage:e,transports:r.transports}),emitter:p,uid:p.uid};return p.on("connect",R),y.setup?.(),y}function l(f){const{info:p}=f,y=f.provider;return An({target:{...p,id:p.rdns,provider:y}})}const d=new Map;function h(f={}){const p=f.chainId??O.getState().chainId,y=i.getState().find(C=>C.id===p);if(f.chainId&&!y)throw new et;{const C=d.get(O.getState().chainId);if(C&&!y)return C;if(!y)throw new et}{const C=d.get(p);if(C)return C}let I;if(r.client)I=r.client({chain:y});else{const C=y.id,F=i.getState().map(K=>K.id),$={},x=Object.entries(r);for(const[K,N]of x)if(!(K==="chains"||K==="client"||K==="connectors"||K==="transports"))if(typeof N=="object")if(C in N)$[K]=N[C];else{if(F.some(_t=>_t in N))continue;$[K]=N}else $[K]=N;I=fs({...$,chain:y,batch:$.batch??{multicall:!0},transport:K=>r.transports[C]({...K,connectors:a})})}return d.set(p,I),I}function g(){return{chainId:i.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let S;const w="0.0.0-canary-";at.startsWith(w)?S=Number.parseInt(at.replace(w,""),10):S=Number.parseInt(at.split(".")[0]??"0",10);const O=gt(ns(e?ss(g,{migrate(f,p){if(p===S)return f;const y=g(),I=_(f,y.chainId);return{...y,chainId:I}},name:"store",partialize(f){return{connections:{__type:"Map",value:Array.from(f.connections.entries()).map(([p,y])=>{const{id:I,name:C,type:F,uid:$}=y.connector;return[p,{...y,connector:{id:I,name:C,type:F,uid:$}}]})},chainId:f.chainId,current:f.current}},merge(f,p){typeof f=="object"&&f&&"status"in f&&delete f.status;const y=_(f,p.chainId);return{...p,...f,chainId:y}},skipHydration:s,storage:e,version:S}):g));O.setState(g());function _(f,p){return f&&typeof f=="object"&&"chainId"in f&&typeof f.chainId=="number"&&i.getState().some(y=>y.id===f.chainId)?f.chainId:p}o&&O.subscribe(({connections:f,current:p})=>p?f.get(p)?.chainId:void 0,f=>{if(i.getState().some(y=>y.id===f))return O.setState(y=>({...y,chainId:f??y.chainId}))}),c?.subscribe(f=>{const p=new Set,y=new Set;for(const C of a.getState())if(p.add(C.id),C.rdns){const F=typeof C.rdns=="string"?[C.rdns]:C.rdns;for(const $ of F)y.add($)}const I=[];for(const C of f){if(y.has(C.info.rdns))continue;const F=u(l(C));p.has(F.id)||I.push(F)}e&&!O.persist.hasHydrated()||a.setState(C=>[...C,...I],!0)});function T(f){O.setState(p=>{const y=p.connections.get(f.uid);return y?{...p,connections:new Map(p.connections).set(f.uid,{accounts:f.accounts??y.accounts,chainId:f.chainId??y.chainId,connector:y.connector})}:p})}function R(f){O.getState().status==="connecting"||O.getState().status==="reconnecting"||O.setState(p=>{const y=a.getState().find(I=>I.uid===f.uid);return y?(y.emitter.listenerCount("connect")&&y.emitter.off("connect",T),y.emitter.listenerCount("change")||y.emitter.on("change",T),y.emitter.listenerCount("disconnect")||y.emitter.on("disconnect",A),{...p,connections:new Map(p.connections).set(f.uid,{accounts:f.accounts,chainId:f.chainId,connector:y}),current:f.uid,status:"connected"}):p})}function A(f){O.setState(p=>{const y=p.connections.get(f.uid);if(y){const C=y.connector;C.emitter.listenerCount("change")&&y.connector.emitter.off("change",T),C.emitter.listenerCount("disconnect")&&y.connector.emitter.off("disconnect",A),C.emitter.listenerCount("connect")||y.connector.emitter.on("connect",R)}if(p.connections.delete(f.uid),p.connections.size===0)return{...p,connections:new Map,current:null,status:"disconnected"};const I=p.connections.values().next().value;return{...p,connections:new Map(p.connections),current:I.connector.uid}})}return{get chains(){return i.getState()},get connectors(){return a.getState()},storage:e,getClient:h,get state(){return O.getState()},setState(f){let p;typeof f=="function"?p=f(O.getState()):p=f;const y=g();typeof p!="object"&&(p=y),Object.keys(y).some(C=>!(C in p))&&(p=y),O.setState(p,!0)},subscribe(f,p,y){return O.subscribe(f,p,y?{...y,fireImmediately:y.emitImmediately}:void 0)},_internal:{mipd:c,async revalidate(){const f=O.getState(),p=f.connections;let y=f.current;for(const[,I]of p){const C=I.connector;C.isAuthorized&&await C.isAuthorized()||(p.delete(C.uid),y===C.uid&&(y=null))}O.setState(I=>({...I,connections:p,current:y}))},store:O,ssr:!!s,syncConnectedChain:o,transports:r.transports,chains:{setState(f){const p=typeof f=="function"?f(i.getState()):f;if(p.length!==0)return i.setState(p,!0)},subscribe(f){return i.subscribe(f)}},connectors:{providerDetailToConnector:l,setup:u,setState(f){return a.setState(typeof f=="function"?f(a.getState()):f,!0)},subscribe(f){return a.subscribe(f)}},events:{change:T,connect:R,disconnect:A}}}}function hs(t,n){const{initialState:e,reconnectOnMount:o}=n;return e&&!t._internal.store.persist.hasHydrated()&&t.setState({...e,chainId:t.chains.some(s=>s.id===e.chainId)?e.chainId:t.chains[0].id,connections:o?e.connections:new Map,status:o?"reconnecting":"disconnected"}),{async onMount(){t._internal.ssr&&(await t._internal.store.persist.rehydrate(),t._internal.mipd&&t._internal.connectors.setState(s=>{const r=new Set;for(const a of s??[])if(a.rdns){const u=Array.isArray(a.rdns)?a.rdns:[a.rdns];for(const l of u)r.add(l)}const c=[],i=t._internal.mipd?.getProviders()??[];for(const a of i){if(r.has(a.info.rdns))continue;const u=t._internal.connectors.providerDetailToConnector(a),l=t._internal.connectors.setup(u);c.push(l)}return[...s,...c]})),o?an(t):t.storage&&t.setState(s=>({...s,connections:new Map}))}}}const{ChainDisconnectedError:ys,createTransport:gs,hexToNumber:ps,ProviderDisconnectedError:Lt,withRetry:ms,withTimeout:ws}=await q("viem");function Oi(t,n={}){const{type:e}=t,{key:o="connector",name:s="Connector",retryDelay:r}=n;return c=>{const{chain:i,connectors:a}=c,u=n.retryCount??c.retryCount;return gs({key:o,name:s,request:async({method:d,params:h})=>{const g=a?.getState().find(_=>_.type===e);if(!g)throw new Lt(new Error(`Could not find connector of type "${e}" in \`connectors\` passed to \`createConfig\`.`));const S=await g.getProvider({chainId:i?.id});if(!S)throw new Lt(new Error("Provider is disconnected."));const w=ps(await ms(()=>ws(()=>S.request({method:"eth_chainId"}),{timeout:100})));if(i&&w!==i.id)throw new ys(new Error(`The current chain of the connector (id: ${w}) does not match the target chain for the request (id: ${i.id} – ${i.name}).`));const O={method:d,params:h};return S.request(O)},retryCount:u,retryDelay:r,type:"connector"})}}const{fallback:bs}=await q("viem");function qi(t,n){return bs(t,n)}const Pi={getItem(t){return typeof window>"u"?null:hn(document.cookie,t)??null},setItem(t,n){typeof window>"u"||(document.cookie=`${t}=${n};path=/;samesite=Lax`)},removeItem(t){typeof window>"u"||(document.cookie=`${t}=;max-age=-1;path=/`)}};function Ti(t,n){if(!n)return;const e=`${t.storage?.key}.store`,o=hn(n,e);if(o)return dn(o).state}function hn(t,n){const e=t.split("; ").find(o=>o.startsWith(`${n}=`));if(e)return e.substring(n.length+1)}function Ri(t){if(typeof t=="string")return Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10);if(typeof t=="bigint")return Number(t);if(typeof t=="number")return t;throw new Error(`Cannot normalize chainId "${t}" of type "${typeof t}"`)}const{useEffect:Cs,useRef:Is}=await q("react");function vs(t){const{children:n,config:e,initialState:o,reconnectOnMount:s=!0}=t,{onMount:r}=hs(e,{initialState:o,reconnectOnMount:s});e._internal.ssr||r();const c=Is(!0);return Cs(()=>{if(c.current&&e._internal.ssr)return r(),()=>{c.current=!1}},[]),n}const{createContext:Ss,createElement:Vt}=await q("react"),yn=Ss(void 0);function _i(t){const{children:n,config:e}=t,o={value:e};return Vt(vs,t,Vt(yn.Provider,o,n))}const Es="2.19.5",Os=()=>`wagmi@${Es}`;class qs extends $n{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 Os()}}class Ps extends qs{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}const{useContext:Ts}=await q("react");function m(t={}){const n=t.config??Ts(yn);if(!n)throw new Ps;return n}function Rs(t,n){const{onChange:e}=n;return t._internal.chains.subscribe((o,s)=>{e(o,s)})}var gn={exports:{}},pn={},mn={exports:{}},wn={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.js
4
4
  *
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const o=l`<svg
1
+ import{w as l}from"./core-D1JqYuOS.js";const o=l`<svg
2
2
  width="14"
3
3
  height="14"
4
4
  viewBox="0 0 14 14"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const o=l`<svg fill="none" viewBox="0 0 24 24">
1
+ import{w as l}from"./core-D1JqYuOS.js";const o=l`<svg fill="none" viewBox="0 0 24 24">
2
2
  <path
3
3
  style="fill: var(--wui-color-accent-100);"
4
4
  d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
@@ -1,4 +1,4 @@
1
- import{w as t}from"./core-C4Q-G7Te.js";const e=t`
1
+ import{w as t}from"./core-D1JqYuOS.js";const e=t`
2
2
  <svg width="36" height="36">
3
3
  <path
4
4
  d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const f=l`<svg fill="none" viewBox="0 0 40 40">
1
+ import{w as l}from"./core-D1JqYuOS.js";const f=l`<svg fill="none" viewBox="0 0 40 40">
2
2
  <g clip-path="url(#a)">
3
3
  <g clip-path="url(#b)">
4
4
  <circle cx="20" cy="19.89" r="20" fill="#000" />
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-C4Q-G7Te.js";const e=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as o}from"./core-D1JqYuOS.js";const e=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as C}from"./core-C4Q-G7Te.js";const e=C`<svg
1
+ import{w as C}from"./core-D1JqYuOS.js";const e=C`<svg
2
2
  fill="none"
3
3
  viewBox="0 0 21 20"
4
4
  >
@@ -1,4 +1,4 @@
1
- import{w as e}from"./core-C4Q-G7Te.js";const o=e`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as e}from"./core-D1JqYuOS.js";const o=e`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const e=l`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as l}from"./core-D1JqYuOS.js";const e=l`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-C4Q-G7Te.js";const e=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as o}from"./core-D1JqYuOS.js";const e=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1 +1 @@
1
- import{p as d}from"./index-DP4gqdTC.js";function b(t){var r=t;return!!(r.ctrlKey||r.shiftKey||r.metaKey||r.button&&r.button==1)}function w(t,r){return!!(t.target==="_blank"&&r)}function g(t,r,e,a){var f=this,o=[];return t?(t instanceof Element?o=[t]:"toArray"in t?o=t.toArray():o=t,o.forEach(function(n){n.addEventListener("click",function(i){var c,u,s=r instanceof Function?r(n):r,v=e instanceof Function?e(n):e,h=n.getAttribute("href")||n.getAttributeNS("http://www.w3.org/1999/xlink","href")||n.getAttribute("xlink:href")||((c=n.getElementsByTagName("a")[0])===null||c===void 0?void 0:c.getAttribute("href")),l=d(f.track(s,v,a??{}),(u=f.settings.timeout)!==null&&u!==void 0?u:500);!w(n,h)&&!b(i)&&h&&(i.preventDefault?i.preventDefault():i.returnValue=!1,l.catch(console.error).then(function(){window.location.href=h}).catch(console.error))},!1)}),this):this}function y(t,r,e,a){var f=this;if(!t)return this;t instanceof HTMLFormElement&&(t=[t]);var o=t;return o.forEach(function(n){if(!(n instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var i=function(u){var s;u.preventDefault?u.preventDefault():u.returnValue=!1;var v=r instanceof Function?r(n):r,h=e instanceof Function?e(n):e,l=d(f.track(v,h,a??{}),(s=f.settings.timeout)!==null&&s!==void 0?s:500);l.catch(console.error).then(function(){n.submit()}).catch(console.error)},c=window.jQuery||window.Zepto;c?c(n).submit(i):n.addEventListener("submit",i,!1)}),this}export{y as form,g as link};
1
+ import{p as d}from"./index-Dd7Rwv7H.js";function b(t){var r=t;return!!(r.ctrlKey||r.shiftKey||r.metaKey||r.button&&r.button==1)}function w(t,r){return!!(t.target==="_blank"&&r)}function g(t,r,e,a){var f=this,o=[];return t?(t instanceof Element?o=[t]:"toArray"in t?o=t.toArray():o=t,o.forEach(function(n){n.addEventListener("click",function(i){var c,u,s=r instanceof Function?r(n):r,v=e instanceof Function?e(n):e,h=n.getAttribute("href")||n.getAttributeNS("http://www.w3.org/1999/xlink","href")||n.getAttribute("xlink:href")||((c=n.getElementsByTagName("a")[0])===null||c===void 0?void 0:c.getAttribute("href")),l=d(f.track(s,v,a??{}),(u=f.settings.timeout)!==null&&u!==void 0?u:500);!w(n,h)&&!b(i)&&h&&(i.preventDefault?i.preventDefault():i.returnValue=!1,l.catch(console.error).then(function(){window.location.href=h}).catch(console.error))},!1)}),this):this}function y(t,r,e,a){var f=this;if(!t)return this;t instanceof HTMLFormElement&&(t=[t]);var o=t;return o.forEach(function(n){if(!(n instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var i=function(u){var s;u.preventDefault?u.preventDefault():u.returnValue=!1;var v=r instanceof Function?r(n):r,h=e instanceof Function?e(n):e,l=d(f.track(v,h,a??{}),(s=f.settings.timeout)!==null&&s!==void 0?s:500);l.catch(console.error).then(function(){n.submit()}).catch(console.error)},c=window.jQuery||window.Zepto;c?c(n).submit(i):n.addEventListener("submit",i,!1)}),this}export{y as form,g as link};
@@ -1,4 +1,4 @@
1
- import{w as e}from"./core-C4Q-G7Te.js";const o=e`<svg
1
+ import{w as e}from"./core-D1JqYuOS.js";const o=e`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="12"
4
4
  height="13"
@@ -1,4 +1,4 @@
1
- import{i as v,e as L,r as R,c as h,d as l,k as y,n as m,q as w,E as N,R as W,O as U,z as xe,g as E,B as g,D as Ge,t as At,W as Ke,C as nt,h as vt,T as ot,m as je,M as Ot,F as St,w as ve,x as xt,f as Ut}from"./core-C4Q-G7Te.js";import{n as c,c as p,o as d,r as u,U as Y,e as Nt,f as qt,a as Mt}from"./index-DCzaGJ0h.js";import{a as Vt}from"./browser-DEaANxMP.js";const Gt=v`
1
+ import{i as v,e as L,r as R,c as h,d as l,k as y,n as m,q as w,E as N,R as W,O as U,z as xe,g as E,B as g,D as Ge,t as At,W as Ke,C as nt,h as vt,T as ot,m as je,M as Ot,F as St,w as ve,x as xt,f as Ut}from"./core-D1JqYuOS.js";import{n as c,c as p,o as d,r as u,U as Y,e as Nt,f as qt,a as Mt}from"./index-nPgQlNn6.js";import{a as Vt}from"./browser-DEaANxMP.js";const Gt=v`
2
2
  :host {
3
3
  position: relative;
4
4
  background-color: var(--wui-color-gray-glass-002);
@@ -1 +1 @@
1
- import{importShared as m}from"./__federation_fn_import-chtkoWq_.js";import{j as c,l as y,b as u,r as f,Z as g,g as i,m as l}from"./signing-CJBbgcWH.js";const{encodeAbiParameters:x}=await m("viem"),d=0n;async function k({account:a,serializableTransaction:e,transaction:s,gasless:n}){const r=u({address:n.relayerForwarderAddress,chain:s.chain,client:s.client}),o=await f({contract:r,method:"function getNonce(address,uint256) view returns (uint256)",params:[a.address,d]}),h=Math.floor(Date.now()/1e3)+(n.deadlineSeconds??3600),t={batchId:d,batchNonce:o,data:e.data,deadline:h,from:a.address,to:e.to,token:g,tokenGasPrice:0n,txGas:e.gas};if(!t.to)throw new Error("Cannot send a transaction without a `to` address");if(!t.txGas)throw new Error("Cannot send a transaction without a `gas` value");if(!t.data)throw new Error("Cannot send a transaction without a `data` value");const w=x([{type:"address"},{type:"address"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[i(t.from),i(t.to),i(t.token),t.txGas,t.tokenGasPrice,t.batchId,t.batchNonce,l(t.data)]),p=await a.signMessage({message:w});return[t,p]}async function E(a){const[e,s]=await k(a),n=await fetch("https://api.biconomy.io/api/v2/meta-tx/native",{body:c({apiId:a.gasless.apiId,from:e.from,gasLimit:e.txGas,params:[e,s],to:e.to}),headers:{"Content-Type":"application/json;charset=utf-8","x-api-key":a.gasless.apiKey},method:"POST"});if(!n.ok)throw new Error(`Failed to send transaction: ${await n.text()}`);const r=await n.json(),o=r.txHash;if(y(o))return{chain:a.transaction.chain,client:a.transaction.client,transactionHash:o};throw new Error(`Failed to send transaction: ${c(r)}`)}export{k as prepareBiconomyTransaction,E as relayBiconomyTransaction};
1
+ import{importShared as m}from"./__federation_fn_import-BPa8h49G.js";import{j as c,l as y,b as u,r as f,Z as g,g as i,m as l}from"./signing-CPQmF9YX.js";const{encodeAbiParameters:x}=await m("viem"),d=0n;async function k({account:a,serializableTransaction:e,transaction:s,gasless:n}){const r=u({address:n.relayerForwarderAddress,chain:s.chain,client:s.client}),o=await f({contract:r,method:"function getNonce(address,uint256) view returns (uint256)",params:[a.address,d]}),h=Math.floor(Date.now()/1e3)+(n.deadlineSeconds??3600),t={batchId:d,batchNonce:o,data:e.data,deadline:h,from:a.address,to:e.to,token:g,tokenGasPrice:0n,txGas:e.gas};if(!t.to)throw new Error("Cannot send a transaction without a `to` address");if(!t.txGas)throw new Error("Cannot send a transaction without a `gas` value");if(!t.data)throw new Error("Cannot send a transaction without a `data` value");const w=x([{type:"address"},{type:"address"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[i(t.from),i(t.to),i(t.token),t.txGas,t.tokenGasPrice,t.batchId,t.batchNonce,l(t.data)]),p=await a.signMessage({message:w});return[t,p]}async function E(a){const[e,s]=await k(a),n=await fetch("https://api.biconomy.io/api/v2/meta-tx/native",{body:c({apiId:a.gasless.apiId,from:e.from,gasLimit:e.txGas,params:[e,s],to:e.to}),headers:{"Content-Type":"application/json;charset=utf-8","x-api-key":a.gasless.apiKey},method:"POST"});if(!n.ok)throw new Error(`Failed to send transaction: ${await n.text()}`);const r=await n.json(),o=r.txHash;if(y(o))return{chain:a.transaction.chain,client:a.transaction.client,transactionHash:o};throw new Error(`Failed to send transaction: ${c(r)}`)}export{k as prepareBiconomyTransaction,E as relayBiconomyTransaction};
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const a=l`<svg fill="none" viewBox="0 0 20 20">
1
+ import{w as l}from"./core-D1JqYuOS.js";const a=l`<svg fill="none" viewBox="0 0 20 20">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as C}from"./core-C4Q-G7Te.js";const l=C`<svg
1
+ import{w as C}from"./core-D1JqYuOS.js";const l=C`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="12"
4
4
  height="13"
@@ -1 +1 @@
1
- import{B as p,g as y,s as w,d as k,i as b,c as L,a as O,e as R,H as m,b as E}from"./uid-BU7APsHa.js";import{l as x,a as M}from"./webSocket-G5Mbc2fm.js";class S extends p{constructor({callbackSelector:s,cause:e,data:o,extraData:n,sender:c,urls:t}){super(e.shortMessage||"An error occurred while fetching for an offchain result.",{cause:e,metaMessages:[...e.metaMessages||[],e.metaMessages?.length?"":[],"Offchain Gateway Call:",t&&[" Gateway URL(s):",...t.map(i=>` ${y(i)}`)],` Sender: ${c}`,` Data: ${o}`,` Callback selector: ${s}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"})}}class $ extends p{constructor({result:s,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${y(e)}`,`Response: ${w(s)}`],name:"OffchainLookupResponseMalformedError"})}}class q extends p{constructor({sender:s,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${s}`],name:"OffchainLookupSenderMismatchError"})}}const D="0x556f1830",T={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function B(d,{blockNumber:s,blockTag:e,data:o,to:n}){const{args:c}=k({data:o,abi:[T]}),[t,i,l,a,r]=c,{ccipRead:f}=d,h=f&&typeof f?.request=="function"?f.request:C;try{if(!b(n,t))throw new q({sender:t,to:n});const u=i.includes(x)?await M({data:l,ccipRequest:h}):await h({data:l,sender:t,urls:i}),{data:g}=await L(d,{blockNumber:s,blockTag:e,data:O([a,R([{type:"bytes"},{type:"bytes"}],[u,r])]),to:n});return g}catch(u){throw new S({callbackSelector:a,cause:u,data:o,extraData:r,sender:t,urls:i})}}async function C({data:d,sender:s,urls:e}){let o=new Error("An unknown error occurred.");for(let n=0;n<e.length;n++){const c=e[n],t=c.includes("{data}")?"GET":"POST",i=t==="POST"?{data:d,sender:s}:void 0,l=t==="POST"?{"Content-Type":"application/json"}:{};try{const a=await fetch(c.replace("{sender}",s.toLowerCase()).replace("{data}",d),{body:JSON.stringify(i),headers:l,method:t});let r;if(a.headers.get("Content-Type")?.startsWith("application/json")?r=(await a.json()).data:r=await a.text(),!a.ok){o=new m({body:i,details:r?.error?w(r.error):a.statusText,headers:a.headers,status:a.status,url:c});continue}if(!E(r)){o=new $({result:r,url:c});continue}return r}catch(a){o=new m({body:i,details:a.message,url:c})}}throw o}export{C as ccipRequest,B as offchainLookup,T as offchainLookupAbiItem,D as offchainLookupSignature};
1
+ import{B as p,g as y,s as w,d as k,i as b,c as L,a as O,e as R,H as m,b as E}from"./uid-Cg2-wLF5.js";import{l as x,a as M}from"./webSocket-CO2AWAe6.js";class S extends p{constructor({callbackSelector:s,cause:e,data:o,extraData:n,sender:c,urls:t}){super(e.shortMessage||"An error occurred while fetching for an offchain result.",{cause:e,metaMessages:[...e.metaMessages||[],e.metaMessages?.length?"":[],"Offchain Gateway Call:",t&&[" Gateway URL(s):",...t.map(i=>` ${y(i)}`)],` Sender: ${c}`,` Data: ${o}`,` Callback selector: ${s}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"})}}class $ extends p{constructor({result:s,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${y(e)}`,`Response: ${w(s)}`],name:"OffchainLookupResponseMalformedError"})}}class q extends p{constructor({sender:s,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${s}`],name:"OffchainLookupSenderMismatchError"})}}const D="0x556f1830",T={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function B(d,{blockNumber:s,blockTag:e,data:o,to:n}){const{args:c}=k({data:o,abi:[T]}),[t,i,l,a,r]=c,{ccipRead:f}=d,h=f&&typeof f?.request=="function"?f.request:C;try{if(!b(n,t))throw new q({sender:t,to:n});const u=i.includes(x)?await M({data:l,ccipRequest:h}):await h({data:l,sender:t,urls:i}),{data:g}=await L(d,{blockNumber:s,blockTag:e,data:O([a,R([{type:"bytes"},{type:"bytes"}],[u,r])]),to:n});return g}catch(u){throw new S({callbackSelector:a,cause:u,data:o,extraData:r,sender:t,urls:i})}}async function C({data:d,sender:s,urls:e}){let o=new Error("An unknown error occurred.");for(let n=0;n<e.length;n++){const c=e[n],t=c.includes("{data}")?"GET":"POST",i=t==="POST"?{data:d,sender:s}:void 0,l=t==="POST"?{"Content-Type":"application/json"}:{};try{const a=await fetch(c.replace("{sender}",s.toLowerCase()).replace("{data}",d),{body:JSON.stringify(i),headers:l,method:t});let r;if(a.headers.get("Content-Type")?.startsWith("application/json")?r=(await a.json()).data:r=await a.text(),!a.ok){o=new m({body:i,details:r?.error?w(r.error):a.statusText,headers:a.headers,status:a.status,url:c});continue}if(!E(r)){o=new $({result:r,url:c});continue}return r}catch(a){o=new m({body:i,details:a.message,url:c})}}throw o}export{C as ccipRequest,B as offchainLookup,T as offchainLookupAbiItem,D as offchainLookupSignature};
@@ -1,4 +1,4 @@
1
- import{w as e}from"./core-C4Q-G7Te.js";const o=e`<svg
1
+ import{w as e}from"./core-D1JqYuOS.js";const o=e`<svg
2
2
  width="28"
3
3
  height="28"
4
4
  viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import{w as e}from"./core-C4Q-G7Te.js";const o=e`<svg fill="none" viewBox="0 0 14 14">
1
+ import{w as e}from"./core-D1JqYuOS.js";const o=e`<svg fill="none" viewBox="0 0 14 14">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-C4Q-G7Te.js";const e=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as o}from"./core-D1JqYuOS.js";const e=o`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as e}from"./core-C4Q-G7Te.js";const o=e`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as e}from"./core-D1JqYuOS.js";const o=e`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const o=l`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as l}from"./core-D1JqYuOS.js";const o=l`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const e=l`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as l}from"./core-D1JqYuOS.js";const e=l`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as t}from"./core-C4Q-G7Te.js";const o=t`<svg width="36" height="36" fill="none">
1
+ import{w as t}from"./core-D1JqYuOS.js";const o=t`<svg width="36" height="36" fill="none">
2
2
  <path
3
3
  fill="#fff"
4
4
  fill-opacity=".05"
@@ -1,4 +1,4 @@
1
- import{w as C}from"./core-C4Q-G7Te.js";const l=C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
1
+ import{w as C}from"./core-D1JqYuOS.js";const l=C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
2
2
  <path
3
3
  fill-rule="evenodd"
4
4
  clip-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const o=l`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as l}from"./core-D1JqYuOS.js";const o=l`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const o=l`<svg fill="none" viewBox="0 0 20 20">
1
+ import{w as l}from"./core-D1JqYuOS.js";const o=l`<svg fill="none" viewBox="0 0 20 20">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const e=l`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as l}from"./core-D1JqYuOS.js";const e=l`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"