@antseed/ants 0.1.4 → 0.1.6

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 (251) hide show
  1. package/dist/ants-web/assets/Arc-VDBY7LNS-BChRXCXW.js +1 -0
  2. package/dist/ants-web/assets/Brave-BRAKJXDS-mq-Xo37j.js +1 -0
  3. package/dist/ants-web/assets/Browser-76IHF3Y2-BMhRaC5Z.js +1 -0
  4. package/dist/ants-web/assets/Chrome-65Q5P54Y-DR9MQEVr.js +1 -0
  5. package/dist/ants-web/assets/Edge-XSPUTORV-DEoZslQE.js +1 -0
  6. package/dist/ants-web/assets/Firefox-AAHGJQIP-Bp_Hm04m.js +1 -0
  7. package/dist/ants-web/assets/Linux-OO4TNCLJ-B0aw93n9.js +1 -0
  8. package/dist/ants-web/assets/Macos-MW4AE7LN-Vvm8Drw3.js +1 -0
  9. package/dist/ants-web/assets/Opera-KQZLSACL-Cwv5MDFy.js +1 -0
  10. package/dist/ants-web/assets/Safari-ZPL37GXR-C4Ggg6rz.js +1 -0
  11. package/dist/ants-web/assets/Windows-PPTHQER6-BlyV2p7Y.js +1 -0
  12. package/dist/ants-web/assets/add-1qQ_SVL6.js +15 -0
  13. package/dist/ants-web/assets/all-wallets-D0QF065k.js +6 -0
  14. package/dist/ants-web/assets/apechain-SX5YFU6N-q5qBv-mp.js +1 -0
  15. package/dist/ants-web/assets/app-store-j-2thKGl.js +17 -0
  16. package/dist/ants-web/assets/apple-CCcInWVX.js +18 -0
  17. package/dist/ants-web/assets/ar_AR-44JUQ6EW-BMX-am0v.js +1487 -0
  18. package/dist/ants-web/assets/arbitrum-WURIBY6W-CqVkHBr5.js +1 -0
  19. package/dist/ants-web/assets/arrow-bottom-DVZa97G2.js +8 -0
  20. package/dist/ants-web/assets/arrow-bottom-circle-tt2k5BWG.js +11 -0
  21. package/dist/ants-web/assets/arrow-left-DnjqXMe0.js +8 -0
  22. package/dist/ants-web/assets/arrow-right-De8QMymS.js +8 -0
  23. package/dist/ants-web/assets/arrow-top-BS2oLt_x.js +8 -0
  24. package/dist/ants-web/assets/assets-Q6ZU7ZJ5-P8HioiAD.js +1 -0
  25. package/dist/ants-web/assets/avalanche-KOMJD3XY-Dsn_JPR4.js +1 -0
  26. package/dist/ants-web/assets/bank-DIxCskFM.js +14 -0
  27. package/dist/ants-web/assets/base-OAXLRA4F-CoYTVIiL.js +1 -0
  28. package/dist/ants-web/assets/baseAccount-44UITRK7-CsjdbWCf.js +1 -0
  29. package/dist/ants-web/assets/basic-D0Dg7j2v.js +2128 -0
  30. package/dist/ants-web/assets/berachain-NJECWIVC-DumxnFvf.js +1 -0
  31. package/dist/ants-web/assets/blast-V555OVXZ-BbhJh1tj.js +1 -0
  32. package/dist/ants-web/assets/browser-n9VVPree.js +14 -0
  33. package/dist/ants-web/assets/bsc-N647EYR2-B2nLKXWV.js +1 -0
  34. package/dist/ants-web/assets/card-Bl7AHEuE.js +14 -0
  35. package/dist/ants-web/assets/ccip-C_ifxkiT.js +1 -0
  36. package/dist/ants-web/assets/celo-GEP4TUHG-CenIBYLU.js +1 -0
  37. package/dist/ants-web/assets/checkmark-DXB1SsFx.js +11 -0
  38. package/dist/ants-web/assets/checkmark-bold-CIMnw7st.js +8 -0
  39. package/dist/ants-web/assets/chevron-bottom-DGkVb8CY.js +8 -0
  40. package/dist/ants-web/assets/chevron-left-D8vC6sW_.js +8 -0
  41. package/dist/ants-web/assets/chevron-right-CP8tyhU4.js +8 -0
  42. package/dist/ants-web/assets/chevron-top-DUqp6O8b.js +8 -0
  43. package/dist/ants-web/assets/chrome-store-CDk6Jfiv.js +61 -0
  44. package/dist/ants-web/assets/clock-t0Dwo5ck.js +8 -0
  45. package/dist/ants-web/assets/close-BiTlv6FX.js +8 -0
  46. package/dist/ants-web/assets/coinPlaceholder-PJZCh_De.js +8 -0
  47. package/dist/ants-web/assets/compass-CctP2ZVM.js +8 -0
  48. package/dist/ants-web/assets/connect-UA7M4XW6-IY3X6Bmr.js +1 -0
  49. package/dist/ants-web/assets/copy-b1i5dSZT.js +15 -0
  50. package/dist/ants-web/assets/core-4w9H32as.js +908 -0
  51. package/dist/ants-web/assets/create-FASO7PVG-D_rvSpre.js +1 -0
  52. package/dist/ants-web/assets/cronos-HJPAQTAE-BEOvlOC4.js +1 -0
  53. package/dist/ants-web/assets/cursor-kLCZuRWK.js +3 -0
  54. package/dist/ants-web/assets/cursor-transparent-C1IxvCBs.js +12 -0
  55. package/dist/ants-web/assets/de_DE-PYAO5YD6-BWlqPWgO.js +1487 -0
  56. package/dist/ants-web/assets/degen-FQQ4XGHB-CeHTs88l.js +1 -0
  57. package/dist/ants-web/assets/desktop-Qa_41eha.js +9 -0
  58. package/dist/ants-web/assets/disconnect-7QBZVVG8.js +8 -0
  59. package/dist/ants-web/assets/discord-DuRr0OMy.js +17 -0
  60. package/dist/ants-web/assets/es_419-HRGOJ6VT-D-qzxUM-.js +1487 -0
  61. package/dist/ants-web/assets/ethereum-RGGVA4PY-SWGOlkuk.js +1 -0
  62. package/dist/ants-web/assets/etherscan-BOImzSgC.js +6 -0
  63. package/dist/ants-web/assets/events-DQ172AOg.js +1 -0
  64. package/dist/ants-web/assets/exclamation-triangle-evZ54TSt.js +4 -0
  65. package/dist/ants-web/assets/extension-YSvzNEgu.js +8 -0
  66. package/dist/ants-web/assets/external-link-BukU3aK3.js +8 -0
  67. package/dist/ants-web/assets/facebook-WJZQGI9M.js +26 -0
  68. package/dist/ants-web/assets/farcaster-Dt0XRvlP.js +12 -0
  69. package/dist/ants-web/assets/filters-CFC5g--u.js +8 -0
  70. package/dist/ants-web/assets/flow-5FQJFCTK-CUie2reO.js +1 -0
  71. package/dist/ants-web/assets/fr_FR-IGGVC6RM-D8LpUM75.js +1487 -0
  72. package/dist/ants-web/assets/github-Bhz0AnGj.js +18 -0
  73. package/dist/ants-web/assets/gnosis-37ZC4RBL-B137OtHZ.js +1 -0
  74. package/dist/ants-web/assets/google-CGzSUXjP.js +18 -0
  75. package/dist/ants-web/assets/gravity-J5YQHTYH-Bj6B0uod.js +1 -0
  76. package/dist/ants-web/assets/hardhat-TX56IT5N-CV1FY-wE.js +1 -0
  77. package/dist/ants-web/assets/help-circle-BoGPtVJY.js +12 -0
  78. package/dist/ants-web/assets/hi_IN-XSKAA3MF-C3QUpWyP.js +1487 -0
  79. package/dist/ants-web/assets/hyperevm-VKPAA4SA-CHwraEsx.js +1 -0
  80. package/dist/ants-web/assets/id-ir8rS0J_.js +12 -0
  81. package/dist/ants-web/assets/id_ID-KUOB4UAL-K9y-nRWm.js +1487 -0
  82. package/dist/ants-web/assets/image-DXBUHwz_.js +4 -0
  83. package/dist/ants-web/assets/index-9ALlRD6p.css +1 -0
  84. package/dist/ants-web/assets/index-B7p3jPAJ.js +1 -0
  85. package/dist/ants-web/assets/index-BqWNkBzB.js +395 -0
  86. package/dist/ants-web/assets/index-C-I4ROfT.js +16 -0
  87. package/dist/ants-web/assets/index-Chq8yV_g.js +47 -0
  88. package/dist/ants-web/assets/index-Ci5bF__2.js +1729 -0
  89. package/dist/ants-web/assets/index-kzlEvkEN.js +1 -0
  90. package/dist/ants-web/assets/index.es-D1GdDJUC.js +39 -0
  91. package/dist/ants-web/assets/info-DzGq_QPQ.js +3 -0
  92. package/dist/ants-web/assets/info-circle-z91TqQxH.js +12 -0
  93. package/dist/ants-web/assets/ink-FZMYZWHG-62p-5IK5.js +1 -0
  94. package/dist/ants-web/assets/ja_JP-4WRQ63RX-Ct5pF4ug.js +1487 -0
  95. package/dist/ants-web/assets/kaia-65D2U3PU-JmuLQ4gC.js +1 -0
  96. package/dist/ants-web/assets/ko_KR-I2K7AIEP-B5gw8Mwb.js +1487 -0
  97. package/dist/ants-web/assets/lightbulb-CgYwiQYs.js +3 -0
  98. package/dist/ants-web/assets/linea-QRMVQ5DY-DuI3vv0d.js +1 -0
  99. package/dist/ants-web/assets/login-UP3DZBGS-Db_wM5oQ.js +1 -0
  100. package/dist/ants-web/assets/mail-FLPFIbqi.js +8 -0
  101. package/dist/ants-web/assets/manta-SI27YFEJ-CpVOKa06.js +1 -0
  102. package/dist/ants-web/assets/mantle-CKIUT334-DR2WgqzU.js +1 -0
  103. package/dist/ants-web/assets/metaMaskWallet-SITXT2FV-BlemcphV.js +1 -0
  104. package/dist/ants-web/assets/metamask-sdk-QG4PtQco.js +542 -0
  105. package/dist/ants-web/assets/mobile--kHpa5NK.js +9 -0
  106. package/dist/ants-web/assets/monad-4KWC6TSS-DVXSkpiz.js +1 -0
  107. package/dist/ants-web/assets/more-CJbReLy0.js +11 -0
  108. package/dist/ants-web/assets/ms_MY-6VZW6Q3Z-BtFD07hR.js +1487 -0
  109. package/dist/ants-web/assets/network-placeholder-BfSizFBN.js +14 -0
  110. package/dist/ants-web/assets/nftPlaceholder-BTfly2G8.js +8 -0
  111. package/dist/ants-web/assets/off-DCMXa6Y2.js +8 -0
  112. package/dist/ants-web/assets/optimism-HAF2GUT7-ec6Nqxs9.js +1 -0
  113. package/dist/ants-web/assets/play-store-CbbevixE.js +32 -0
  114. package/dist/ants-web/assets/plus-BxINT2r_.js +13 -0
  115. package/dist/ants-web/assets/polygon-WW6ZI7PM-DXlmm4L1.js +1 -0
  116. package/dist/ants-web/assets/pt_BR-N3XOZ4SV-CvVpfsHb.js +1487 -0
  117. package/dist/ants-web/assets/qr-code-CMEsvGrE.js +6 -0
  118. package/dist/ants-web/assets/rainbowWallet-O26YNBMX-DUhYus-9.js +1 -0
  119. package/dist/ants-web/assets/recycle-horizontal-BldRTXPT.js +9 -0
  120. package/dist/ants-web/assets/refresh-82vLCcdB.js +8 -0
  121. package/dist/ants-web/assets/refresh-S4T5V5GX-CwqIaaxK.js +1 -0
  122. package/dist/ants-web/assets/reown-logo-BPGalyzg.js +12 -0
  123. package/dist/ants-web/assets/ronin-EMCPYXZT-N-QBHZdV.js +1 -0
  124. package/dist/ants-web/assets/ru_RU-IITAPRET-DOj6Jzj7.js +1487 -0
  125. package/dist/ants-web/assets/safeWallet-5MNKTR5Z-D-5imDLD.js +1 -0
  126. package/dist/ants-web/assets/sanko-RHQYXGM5-OX010CbN.js +1 -0
  127. package/dist/ants-web/assets/scan-4UYSQ56Q-CjMz6-XC.js +1 -0
  128. package/dist/ants-web/assets/scroll-5OBGQVOV-DJFECiai.js +1 -0
  129. package/dist/ants-web/assets/search-CADsyV1c.js +8 -0
  130. package/dist/ants-web/assets/secp256k1-B5byVYSZ.js +1 -0
  131. package/dist/ants-web/assets/secp256k1-Cb4vPU9D.js +1 -0
  132. package/dist/ants-web/assets/send-DyAisqGO.js +15 -0
  133. package/dist/ants-web/assets/sign-A7IJEUT5-CGsRnPrd.js +1 -0
  134. package/dist/ants-web/assets/superposition-HG6MMR2Y-bRkgatRO.js +1 -0
  135. package/dist/ants-web/assets/swapHorizontal-BfHwXZPT.js +8 -0
  136. package/dist/ants-web/assets/swapHorizontalBold-FIoCjqnp.js +8 -0
  137. package/dist/ants-web/assets/swapHorizontalMedium-CzDDCY_G.js +16 -0
  138. package/dist/ants-web/assets/swapHorizontalRoundedBold-CvMRJeWj.js +8 -0
  139. package/dist/ants-web/assets/swapVertical-BgSezaow.js +8 -0
  140. package/dist/ants-web/assets/telegram-CsMNhXCs.js +16 -0
  141. package/dist/ants-web/assets/th_TH-3ZQCKCQE-BcHUN2Q4.js +1487 -0
  142. package/dist/ants-web/assets/three-dots-DYf4gmVW.js +5 -0
  143. package/dist/ants-web/assets/tr_TR-QUPUGMUF-CwpF6ZFn.js +1487 -0
  144. package/dist/ants-web/assets/twitch-BtBr-NTg.js +18 -0
  145. package/dist/ants-web/assets/twitterIcon-BmRf6M77.js +6 -0
  146. package/dist/ants-web/assets/uk_UA-SSN6SV5E-IlYYyRC6.js +1487 -0
  147. package/dist/ants-web/assets/unichain-C5BWO2ZY-BfguYsnu.js +1 -0
  148. package/dist/ants-web/assets/verify-cxA8gdP6.js +8 -0
  149. package/dist/ants-web/assets/verify-filled-DHnnW8EE.js +8 -0
  150. package/dist/ants-web/assets/vi_VN-7BUVRNYY-CZ9S75qZ.js +1487 -0
  151. package/dist/ants-web/assets/w3m-modal-D1ucMOAa.js +642 -0
  152. package/dist/ants-web/assets/wallet-BT4Fue1R.js +8 -0
  153. package/dist/ants-web/assets/wallet-placeholder-C2J5s6Yp.js +14 -0
  154. package/dist/ants-web/assets/walletConnectWallet-YHWKVTDY-D3lyiczV.js +1 -0
  155. package/dist/ants-web/assets/walletconnect-B5k8iJl-.js +30 -0
  156. package/dist/ants-web/assets/warning-circle-9rNSUSsX.js +12 -0
  157. package/dist/ants-web/assets/x-CpRc85jR.js +12 -0
  158. package/dist/ants-web/assets/xdc-KJ3TDBYO-DNV6zchh.js +1 -0
  159. package/dist/ants-web/assets/zetachain-TLDS5IPW-Udhyw16T.js +1 -0
  160. package/dist/ants-web/assets/zh_CN-HJBN674C-Baf0GEeT.js +1487 -0
  161. package/dist/ants-web/assets/zh_HK-JW3WLRKE-VztJKXL5.js +1487 -0
  162. package/dist/ants-web/assets/zh_TW-VNNRNXY7-aWfg7Qp4.js +1487 -0
  163. package/dist/ants-web/assets/zksync-DH7HK5U4-Dt4usFw6.js +1 -0
  164. package/dist/ants-web/assets/zora-FYL5H3IO-iB4wygST.js +1 -0
  165. package/dist/ants-web/index.html +2 -2
  166. package/dist/api-types.d.ts +168 -6
  167. package/dist/browser-signer.d.ts +30 -0
  168. package/dist/browser-signer.js +189 -0
  169. package/dist/browser-signer.js.map +1 -0
  170. package/dist/jobs.d.ts +10 -3
  171. package/dist/jobs.js +97 -20
  172. package/dist/jobs.js.map +1 -1
  173. package/dist/position-actions.d.ts +13 -0
  174. package/dist/position-actions.js +25 -0
  175. package/dist/position-actions.js.map +1 -0
  176. package/dist/routes.d.ts +7 -0
  177. package/dist/routes.js +63 -5
  178. package/dist/routes.js.map +1 -1
  179. package/dist/server.d.ts +8 -0
  180. package/dist/server.js +157 -12
  181. package/dist/server.js.map +1 -1
  182. package/dist/service/context.d.ts +13 -2
  183. package/dist/service/context.js +35 -4
  184. package/dist/service/context.js.map +1 -1
  185. package/dist/service/display-snapshot.d.ts +28 -0
  186. package/dist/service/display-snapshot.js +144 -0
  187. package/dist/service/display-snapshot.js.map +1 -0
  188. package/dist/service/emissions.js +11 -19
  189. package/dist/service/emissions.js.map +1 -1
  190. package/dist/service/explorer.js +2 -1
  191. package/dist/service/explorer.js.map +1 -1
  192. package/dist/service/format.d.ts +1 -1
  193. package/dist/service/format.js +2 -0
  194. package/dist/service/format.js.map +1 -1
  195. package/dist/service/indexed-wallet.d.ts +7 -0
  196. package/dist/service/indexed-wallet.js +58 -0
  197. package/dist/service/indexed-wallet.js.map +1 -0
  198. package/dist/service/indexer.d.ts +32 -3
  199. package/dist/service/indexer.js +64 -8
  200. package/dist/service/indexer.js.map +1 -1
  201. package/dist/service/legacy-payout.d.ts +3 -0
  202. package/dist/service/legacy-payout.js +32 -0
  203. package/dist/service/legacy-payout.js.map +1 -0
  204. package/dist/service/network.d.ts +5 -0
  205. package/dist/service/network.js +185 -0
  206. package/dist/service/network.js.map +1 -0
  207. package/dist/service/overview-reads.d.ts +30 -0
  208. package/dist/service/overview-reads.js +69 -0
  209. package/dist/service/overview-reads.js.map +1 -0
  210. package/dist/service/overview.js +14 -36
  211. package/dist/service/overview.js.map +1 -1
  212. package/dist/service/pool-merge.d.ts +2 -1
  213. package/dist/service/pool-merge.js +11 -4
  214. package/dist/service/pool-merge.js.map +1 -1
  215. package/dist/service/pools.d.ts +22 -1
  216. package/dist/service/pools.js +257 -98
  217. package/dist/service/pools.js.map +1 -1
  218. package/dist/service/position-feed.d.ts +73 -0
  219. package/dist/service/position-feed.js +173 -0
  220. package/dist/service/position-feed.js.map +1 -0
  221. package/dist/service/positions.d.ts +3 -5
  222. package/dist/service/positions.js +155 -93
  223. package/dist/service/positions.js.map +1 -1
  224. package/dist/service/rewards.d.ts +1 -0
  225. package/dist/service/rewards.js +117 -56
  226. package/dist/service/rewards.js.map +1 -1
  227. package/dist/service/rpc-provider.d.ts +3 -0
  228. package/dist/service/rpc-provider.js +32 -3
  229. package/dist/service/rpc-provider.js.map +1 -1
  230. package/dist/service/seller-models.d.ts +2 -0
  231. package/dist/service/seller-models.js +94 -0
  232. package/dist/service/seller-models.js.map +1 -0
  233. package/dist/service/seller.js +33 -30
  234. package/dist/service/seller.js.map +1 -1
  235. package/dist/service/stake-eligibility.d.ts +6 -0
  236. package/dist/service/stake-eligibility.js +50 -0
  237. package/dist/service/stake-eligibility.js.map +1 -0
  238. package/dist/service/usage.js +5 -13
  239. package/dist/service/usage.js.map +1 -1
  240. package/dist/service/yield.d.ts +3 -0
  241. package/dist/service/yield.js +12 -0
  242. package/dist/service/yield.js.map +1 -0
  243. package/dist/view-cache.d.ts +5 -10
  244. package/dist/view-cache.js +12 -14
  245. package/dist/view-cache.js.map +1 -1
  246. package/dist/wallet-errors.d.ts +9 -0
  247. package/dist/wallet-errors.js +32 -0
  248. package/dist/wallet-errors.js.map +1 -0
  249. package/package.json +8 -3
  250. package/dist/ants-web/assets/index-BunPfgXh.css +0 -1
  251. package/dist/ants-web/assets/index-zCPoF694.js +0 -40
@@ -0,0 +1,1729 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B7p3jPAJ.js","assets/index-kzlEvkEN.js","assets/index-Chq8yV_g.js","assets/events-DQ172AOg.js","assets/index.es-D1GdDJUC.js"])))=>i.map(i=>d[i]);
2
+ var sj=Object.defineProperty;var Ub=e=>{throw TypeError(e)};var ij=(e,t,n)=>t in e?sj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var er=(e,t,n)=>ij(e,typeof t!="symbol"?t+"":t,n),u0=(e,t,n)=>t.has(e)||Ub("Cannot "+n);var W=(e,t,n)=>(u0(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?Ub("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pe=(e,t,n,r)=>(u0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(u0(e,t,"access private method"),n);var Fd=(e,t,n,r)=>({set _(o){pe(e,t,o,n)},get _(){return W(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var lW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cW(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var d0={exports:{}},Jl={},f0={exports:{}},Le={};/**
3
+ * @license React
4
+ * react.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var $b;function aj(){if($b)return Le;$b=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function g(U){return U===null||typeof U!="object"?null:(U=m&&U[m]||U["@@iterator"],typeof U=="function"?U:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,b={};function C(U,ee,he){this.props=U,this.context=ee,this.refs=b,this.updater=he||v}C.prototype.isReactComponent={},C.prototype.setState=function(U,ee){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,ee,"setState")},C.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function S(){}S.prototype=C.prototype;function I(U,ee,he){this.props=U,this.context=ee,this.refs=b,this.updater=he||v}var A=I.prototype=new S;A.constructor=I,w(A,C.prototype),A.isPureReactComponent=!0;var j=Array.isArray,N=Object.prototype.hasOwnProperty,_={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function R(U,ee,he){var se,ie={},re=null,ue=null;if(ee!=null)for(se in ee.ref!==void 0&&(ue=ee.ref),ee.key!==void 0&&(re=""+ee.key),ee)N.call(ee,se)&&!P.hasOwnProperty(se)&&(ie[se]=ee[se]);var Se=arguments.length-2;if(Se===1)ie.children=he;else if(1<Se){for(var Pe=Array(Se),Oe=0;Oe<Se;Oe++)Pe[Oe]=arguments[Oe+2];ie.children=Pe}if(U&&U.defaultProps)for(se in Se=U.defaultProps,Se)ie[se]===void 0&&(ie[se]=Se[se]);return{$$typeof:e,type:U,key:re,ref:ue,props:ie,_owner:_.current}}function M(U,ee){return{$$typeof:e,type:U.type,key:ee,ref:U.ref,props:U.props,_owner:U._owner}}function Q(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function V(U){var ee={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(he){return ee[he]})}var H=/\/+/g;function L(U,ee){return typeof U=="object"&&U!==null&&U.key!=null?V(""+U.key):ee.toString(36)}function z(U,ee,he,se,ie){var re=typeof U;(re==="undefined"||re==="boolean")&&(U=null);var ue=!1;if(U===null)ue=!0;else switch(re){case"string":case"number":ue=!0;break;case"object":switch(U.$$typeof){case e:case t:ue=!0}}if(ue)return ue=U,ie=ie(ue),U=se===""?"."+L(ue,0):se,j(ie)?(he="",U!=null&&(he=U.replace(H,"$&/")+"/"),z(ie,ee,he,"",function(Oe){return Oe})):ie!=null&&(Q(ie)&&(ie=M(ie,he+(!ie.key||ue&&ue.key===ie.key?"":(""+ie.key).replace(H,"$&/")+"/")+U)),ee.push(ie)),1;if(ue=0,se=se===""?".":se+":",j(U))for(var Se=0;Se<U.length;Se++){re=U[Se];var Pe=se+L(re,Se);ue+=z(re,ee,he,Pe,ie)}else if(Pe=g(U),typeof Pe=="function")for(U=Pe.call(U),Se=0;!(re=U.next()).done;)re=re.value,Pe=se+L(re,Se++),ue+=z(re,ee,he,Pe,ie);else if(re==="object")throw ee=String(U),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return ue}function O(U,ee,he){if(U==null)return U;var se=[],ie=0;return z(U,se,"","",function(re){return ee.call(he,re,ie++)}),se}function K(U){if(U._status===-1){var ee=U._result;ee=ee(),ee.then(function(he){(U._status===0||U._status===-1)&&(U._status=1,U._result=he)},function(he){(U._status===0||U._status===-1)&&(U._status=2,U._result=he)}),U._status===-1&&(U._status=0,U._result=ee)}if(U._status===1)return U._result.default;throw U._result}var J={current:null},F={transition:null},Z={ReactCurrentDispatcher:J,ReactCurrentBatchConfig:F,ReactCurrentOwner:_};function Y(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:O,forEach:function(U,ee,he){O(U,function(){ee.apply(this,arguments)},he)},count:function(U){var ee=0;return O(U,function(){ee++}),ee},toArray:function(U){return O(U,function(ee){return ee})||[]},only:function(U){if(!Q(U))throw Error("React.Children.only expected to receive a single React element child.");return U}},Le.Component=C,Le.Fragment=n,Le.Profiler=o,Le.PureComponent=I,Le.StrictMode=r,Le.Suspense=d,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Le.act=Y,Le.cloneElement=function(U,ee,he){if(U==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+U+".");var se=w({},U.props),ie=U.key,re=U.ref,ue=U._owner;if(ee!=null){if(ee.ref!==void 0&&(re=ee.ref,ue=_.current),ee.key!==void 0&&(ie=""+ee.key),U.type&&U.type.defaultProps)var Se=U.type.defaultProps;for(Pe in ee)N.call(ee,Pe)&&!P.hasOwnProperty(Pe)&&(se[Pe]=ee[Pe]===void 0&&Se!==void 0?Se[Pe]:ee[Pe])}var Pe=arguments.length-2;if(Pe===1)se.children=he;else if(1<Pe){Se=Array(Pe);for(var Oe=0;Oe<Pe;Oe++)Se[Oe]=arguments[Oe+2];se.children=Se}return{$$typeof:e,type:U.type,key:ie,ref:re,props:se,_owner:ue}},Le.createContext=function(U){return U={$$typeof:l,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},U.Provider={$$typeof:i,_context:U},U.Consumer=U},Le.createElement=R,Le.createFactory=function(U){var ee=R.bind(null,U);return ee.type=U,ee},Le.createRef=function(){return{current:null}},Le.forwardRef=function(U){return{$$typeof:c,render:U}},Le.isValidElement=Q,Le.lazy=function(U){return{$$typeof:p,_payload:{_status:-1,_result:U},_init:K}},Le.memo=function(U,ee){return{$$typeof:f,type:U,compare:ee===void 0?null:ee}},Le.startTransition=function(U){var ee=F.transition;F.transition={};try{U()}finally{F.transition=ee}},Le.unstable_act=Y,Le.useCallback=function(U,ee){return J.current.useCallback(U,ee)},Le.useContext=function(U){return J.current.useContext(U)},Le.useDebugValue=function(){},Le.useDeferredValue=function(U){return J.current.useDeferredValue(U)},Le.useEffect=function(U,ee){return J.current.useEffect(U,ee)},Le.useId=function(){return J.current.useId()},Le.useImperativeHandle=function(U,ee,he){return J.current.useImperativeHandle(U,ee,he)},Le.useInsertionEffect=function(U,ee){return J.current.useInsertionEffect(U,ee)},Le.useLayoutEffect=function(U,ee){return J.current.useLayoutEffect(U,ee)},Le.useMemo=function(U,ee){return J.current.useMemo(U,ee)},Le.useReducer=function(U,ee,he){return J.current.useReducer(U,ee,he)},Le.useRef=function(U){return J.current.useRef(U)},Le.useState=function(U){return J.current.useState(U)},Le.useSyncExternalStore=function(U,ee,he){return J.current.useSyncExternalStore(U,ee,he)},Le.useTransition=function(){return J.current.useTransition()},Le.version="18.3.1",Le}var zb;function lu(){return zb||(zb=1,f0.exports=aj()),f0.exports}/**
11
+ * @license React
12
+ * react-jsx-runtime.production.min.js
13
+ *
14
+ * Copyright (c) Facebook, Inc. and its affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var Wb;function lj(){if(Wb)return Jl;Wb=1;var e=lu(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(c,d,f){var p,m={},g=null,v=null;f!==void 0&&(g=""+f),d.key!==void 0&&(g=""+d.key),d.ref!==void 0&&(v=d.ref);for(p in d)r.call(d,p)&&!i.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:g,ref:v,props:m,_owner:o.current}}return Jl.Fragment=n,Jl.jsx=l,Jl.jsxs=l,Jl}var qb;function cj(){return qb||(qb=1,d0.exports=lj()),d0.exports}var h=cj(),B=lu();const E=t5(B);var Ld={},h0={exports:{}},Cn={},p0={exports:{}},m0={};/**
19
+ * @license React
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var Hb;function uj(){return Hb||(Hb=1,(function(e){function t(F,Z){var Y=F.length;F.push(Z);e:for(;0<Y;){var U=Y-1>>>1,ee=F[U];if(0<o(ee,Z))F[U]=Z,F[Y]=ee,Y=U;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var Z=F[0],Y=F.pop();if(Y!==Z){F[0]=Y;e:for(var U=0,ee=F.length,he=ee>>>1;U<he;){var se=2*(U+1)-1,ie=F[se],re=se+1,ue=F[re];if(0>o(ie,Y))re<ee&&0>o(ue,ie)?(F[U]=ue,F[re]=Y,U=re):(F[U]=ie,F[se]=Y,U=se);else if(re<ee&&0>o(ue,Y))F[U]=ue,F[re]=Y,U=re;else break e}}return Z}function o(F,Z){var Y=F.sortIndex-Z.sortIndex;return Y!==0?Y:F.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],p=1,m=null,g=3,v=!1,w=!1,b=!1,C=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(F){for(var Z=n(f);Z!==null;){if(Z.callback===null)r(f);else if(Z.startTime<=F)r(f),Z.sortIndex=Z.expirationTime,t(d,Z);else break;Z=n(f)}}function j(F){if(b=!1,A(F),!w)if(n(d)!==null)w=!0,K(N);else{var Z=n(f);Z!==null&&J(j,Z.startTime-F)}}function N(F,Z){w=!1,b&&(b=!1,S(R),R=-1),v=!0;var Y=g;try{for(A(Z),m=n(d);m!==null&&(!(m.expirationTime>Z)||F&&!V());){var U=m.callback;if(typeof U=="function"){m.callback=null,g=m.priorityLevel;var ee=U(m.expirationTime<=Z);Z=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),A(Z)}else r(d);m=n(d)}if(m!==null)var he=!0;else{var se=n(f);se!==null&&J(j,se.startTime-Z),he=!1}return he}finally{m=null,g=Y,v=!1}}var _=!1,P=null,R=-1,M=5,Q=-1;function V(){return!(e.unstable_now()-Q<M)}function H(){if(P!==null){var F=e.unstable_now();Q=F;var Z=!0;try{Z=P(!0,F)}finally{Z?L():(_=!1,P=null)}}else _=!1}var L;if(typeof I=="function")L=function(){I(H)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,O=z.port2;z.port1.onmessage=H,L=function(){O.postMessage(null)}}else L=function(){C(H,0)};function K(F){P=F,_||(_=!0,L())}function J(F,Z){R=C(function(){F(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){w||v||(w=!0,K(N))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var Z=3;break;default:Z=g}var Y=g;g=Z;try{return F()}finally{g=Y}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,Z){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var Y=g;g=F;try{return Z()}finally{g=Y}},e.unstable_scheduleCallback=function(F,Z,Y){var U=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?U+Y:U):Y=U,F){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=Y+ee,F={id:p++,callback:Z,priorityLevel:F,startTime:Y,expirationTime:ee,sortIndex:-1},Y>U?(F.sortIndex=Y,t(f,F),n(d)===null&&F===n(f)&&(b?(S(R),R=-1):b=!0,J(j,Y-U))):(F.sortIndex=ee,t(d,F),w||v||(w=!0,K(N))),F},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(F){var Z=g;return function(){var Y=g;g=Z;try{return F.apply(this,arguments)}finally{g=Y}}}})(m0)),m0}var Vb;function dj(){return Vb||(Vb=1,p0.exports=uj()),p0.exports}/**
27
+ * @license React
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var Qb;function fj(){if(Qb)return Cn;Qb=1;var e=lu(),t=dj();function n(s){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+s,u=1;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+s+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function i(s,a){l(s,a),l(s+"Capture",a)}function l(s,a){for(o[s]=a,s=0;s<a.length;s++)r.add(a[s])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function g(s){return d.call(m,s)?!0:d.call(p,s)?!1:f.test(s)?m[s]=!0:(p[s]=!0,!1)}function v(s,a,u,y){if(u!==null&&u.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return y?!1:u!==null?!u.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function w(s,a,u,y){if(a===null||typeof a>"u"||v(s,a,u,y))return!0;if(y)return!1;if(u!==null)switch(u.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function b(s,a,u,y,x,k,T){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=y,this.attributeNamespace=x,this.mustUseProperty=u,this.propertyName=s,this.type=a,this.sanitizeURL=k,this.removeEmptyString=T}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){C[s]=new b(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var a=s[0];C[a]=new b(a,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){C[s]=new b(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){C[s]=new b(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){C[s]=new b(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){C[s]=new b(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){C[s]=new b(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){C[s]=new b(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){C[s]=new b(s,5,!1,s.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function I(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var a=s.replace(S,I);C[a]=new b(a,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var a=s.replace(S,I);C[a]=new b(a,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var a=s.replace(S,I);C[a]=new b(a,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){C[s]=new b(s,1,!1,s.toLowerCase(),null,!1,!1)}),C.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){C[s]=new b(s,1,!1,s.toLowerCase(),null,!0,!0)});function A(s,a,u,y){var x=C.hasOwnProperty(a)?C[a]:null;(x!==null?x.type!==0:y||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(w(a,u,x,y)&&(u=null),y||x===null?g(a)&&(u===null?s.removeAttribute(a):s.setAttribute(a,""+u)):x.mustUseProperty?s[x.propertyName]=u===null?x.type===3?!1:"":u:(a=x.attributeName,y=x.attributeNamespace,u===null?s.removeAttribute(a):(x=x.type,u=x===3||x===4&&u===!0?"":""+u,y?s.setAttributeNS(y,a,u):s.setAttribute(a,u))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.element"),_=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),Q=Symbol.for("react.provider"),V=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),J=Symbol.for("react.offscreen"),F=Symbol.iterator;function Z(s){return s===null||typeof s!="object"?null:(s=F&&s[F]||s["@@iterator"],typeof s=="function"?s:null)}var Y=Object.assign,U;function ee(s){if(U===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);U=a&&a[1]||""}return`
35
+ `+U+s}var he=!1;function se(s,a){if(!s||he)return"";he=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(ne){var y=ne}Reflect.construct(s,[],a)}else{try{a.call()}catch(ne){y=ne}s.call(a.prototype)}else{try{throw Error()}catch(ne){y=ne}s()}}catch(ne){if(ne&&y&&typeof ne.stack=="string"){for(var x=ne.stack.split(`
36
+ `),k=y.stack.split(`
37
+ `),T=x.length-1,D=k.length-1;1<=T&&0<=D&&x[T]!==k[D];)D--;for(;1<=T&&0<=D;T--,D--)if(x[T]!==k[D]){if(T!==1||D!==1)do if(T--,D--,0>D||x[T]!==k[D]){var q=`
38
+ `+x[T].replace(" at new "," at ");return s.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",s.displayName)),q}while(1<=T&&0<=D);break}}}finally{he=!1,Error.prepareStackTrace=u}return(s=s?s.displayName||s.name:"")?ee(s):""}function ie(s){switch(s.tag){case 5:return ee(s.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return s=se(s.type,!1),s;case 11:return s=se(s.type.render,!1),s;case 1:return s=se(s.type,!0),s;default:return""}}function re(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case P:return"Fragment";case _:return"Portal";case M:return"Profiler";case R:return"StrictMode";case L:return"Suspense";case z:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case V:return(s.displayName||"Context")+".Consumer";case Q:return(s._context.displayName||"Context")+".Provider";case H:var a=s.render;return s=s.displayName,s||(s=a.displayName||a.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case O:return a=s.displayName||null,a!==null?a:re(s.type)||"Memo";case K:a=s._payload,s=s._init;try{return re(s(a))}catch{}}return null}function ue(s){var a=s.type;switch(s.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=a.render,s=s.displayName||s.name||"",a.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(a);case 8:return a===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function Se(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Pe(s){var a=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Oe(s){var a=Pe(s)?"checked":"value",u=Object.getOwnPropertyDescriptor(s.constructor.prototype,a),y=""+s[a];if(!s.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var x=u.get,k=u.set;return Object.defineProperty(s,a,{configurable:!0,get:function(){return x.call(this)},set:function(T){y=""+T,k.call(this,T)}}),Object.defineProperty(s,a,{enumerable:u.enumerable}),{getValue:function(){return y},setValue:function(T){y=""+T},stopTracking:function(){s._valueTracker=null,delete s[a]}}}}function pt(s){s._valueTracker||(s._valueTracker=Oe(s))}function It(s){if(!s)return!1;var a=s._valueTracker;if(!a)return!0;var u=a.getValue(),y="";return s&&(y=Pe(s)?s.checked?"true":"false":s.value),s=y,s!==u?(a.setValue(s),!0):!1}function mt(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Wt(s,a){var u=a.checked;return Y({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??s._wrapperState.initialChecked})}function rn(s,a){var u=a.defaultValue==null?"":a.defaultValue,y=a.checked!=null?a.checked:a.defaultChecked;u=Se(a.value!=null?a.value:u),s._wrapperState={initialChecked:y,initialValue:u,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function rt(s,a){a=a.checked,a!=null&&A(s,"checked",a,!1)}function on(s,a){rt(s,a);var u=Se(a.value),y=a.type;if(u!=null)y==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+u):s.value!==""+u&&(s.value=""+u);else if(y==="submit"||y==="reset"){s.removeAttribute("value");return}a.hasOwnProperty("value")?Ot(s,a.type,u):a.hasOwnProperty("defaultValue")&&Ot(s,a.type,Se(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(s.defaultChecked=!!a.defaultChecked)}function Mt(s,a,u){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var y=a.type;if(!(y!=="submit"&&y!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+s._wrapperState.initialValue,u||a===s.value||(s.value=a),s.defaultValue=a}u=s.name,u!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,u!==""&&(s.name=u)}function Ot(s,a,u){(a!=="number"||mt(s.ownerDocument)!==s)&&(u==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+u&&(s.defaultValue=""+u))}var ye=Array.isArray;function Je(s,a,u,y){if(s=s.options,a){a={};for(var x=0;x<u.length;x++)a["$"+u[x]]=!0;for(u=0;u<s.length;u++)x=a.hasOwnProperty("$"+s[u].value),s[u].selected!==x&&(s[u].selected=x),x&&y&&(s[u].defaultSelected=!0)}else{for(u=""+Se(u),a=null,x=0;x<s.length;x++){if(s[x].value===u){s[x].selected=!0,y&&(s[x].defaultSelected=!0);return}a!==null||s[x].disabled||(a=s[x])}a!==null&&(a.selected=!0)}}function Ir(s,a){if(a.dangerouslySetInnerHTML!=null)throw Error(n(91));return Y({},a,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function Bo(s,a){var u=a.value;if(u==null){if(u=a.children,a=a.defaultValue,u!=null){if(a!=null)throw Error(n(92));if(ye(u)){if(1<u.length)throw Error(n(93));u=u[0]}a=u}a==null&&(a=""),u=a}s._wrapperState={initialValue:Se(u)}}function To(s,a){var u=Se(a.value),y=Se(a.defaultValue);u!=null&&(u=""+u,u!==s.value&&(s.value=u),a.defaultValue==null&&s.defaultValue!==u&&(s.defaultValue=u)),y!=null&&(s.defaultValue=""+y)}function Nu(s){var a=s.textContent;a===s._wrapperState.initialValue&&a!==""&&a!==null&&(s.value=a)}function pl(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Bi(s,a){return s==null||s==="http://www.w3.org/1999/xhtml"?pl(a):s==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var qt,Yr=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,u,y,x){MSApp.execUnsafeLocalFunction(function(){return s(a,u,y,x)})}:s})(function(s,a){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=a;else{for(qt=qt||document.createElement("div"),qt.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=qt.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;a.firstChild;)s.appendChild(a.firstChild)}});function Nr(s,a){if(a){var u=s.firstChild;if(u&&u===s.lastChild&&u.nodeType===3){u.nodeValue=a;return}}s.textContent=a}var Re={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},We=["Webkit","ms","Moz","O"];Object.keys(Re).forEach(function(s){We.forEach(function(a){a=a+s.charAt(0).toUpperCase()+s.substring(1),Re[a]=Re[s]})});function _e(s,a,u){return a==null||typeof a=="boolean"||a===""?"":u||typeof a!="number"||a===0||Re.hasOwnProperty(s)&&Re[s]?(""+a).trim():a+"px"}function Ge(s,a){s=s.style;for(var u in a)if(a.hasOwnProperty(u)){var y=u.indexOf("--")===0,x=_e(u,a[u],y);u==="float"&&(u="cssFloat"),y?s.setProperty(u,x):s[u]=x}}var fr=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function mn(s,a){if(a){if(fr[s]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(n(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(n(61))}if(a.style!=null&&typeof a.style!="object")throw Error(n(62))}}function ze(s,a){if(s.indexOf("-")===-1)return typeof a.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Be=null;function gn(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Ps=null,Jr=null,Ti=null;function rv(s){if(s=Ol(s)){if(typeof Ps!="function")throw Error(n(280));var a=s.stateNode;a&&(a=Zu(a),Ps(s.stateNode,s.type,a))}}function ov(s){Jr?Ti?Ti.push(s):Ti=[s]:Jr=s}function sv(){if(Jr){var s=Jr,a=Ti;if(Ti=Jr=null,rv(s),a)for(s=0;s<a.length;s++)rv(a[s])}}function iv(s,a){return s(a)}function av(){}var jh=!1;function lv(s,a,u){if(jh)return s(a,u);jh=!0;try{return iv(s,a,u)}finally{jh=!1,(Jr!==null||Ti!==null)&&(av(),sv())}}function ml(s,a){var u=s.stateNode;if(u===null)return null;var y=Zu(u);if(y===null)return null;u=y[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break e;default:s=!1}if(s)return null;if(u&&typeof u!="function")throw Error(n(231,a,typeof u));return u}var Ih=!1;if(c)try{var gl={};Object.defineProperty(gl,"passive",{get:function(){Ih=!0}}),window.addEventListener("test",gl,gl),window.removeEventListener("test",gl,gl)}catch{Ih=!1}function dA(s,a,u,y,x,k,T,D,q){var ne=Array.prototype.slice.call(arguments,3);try{a.apply(u,ne)}catch(le){this.onError(le)}}var yl=!1,Pu=null,Bu=!1,Nh=null,fA={onError:function(s){yl=!0,Pu=s}};function hA(s,a,u,y,x,k,T,D,q){yl=!1,Pu=null,dA.apply(fA,arguments)}function pA(s,a,u,y,x,k,T,D,q){if(hA.apply(this,arguments),yl){if(yl){var ne=Pu;yl=!1,Pu=null}else throw Error(n(198));Bu||(Bu=!0,Nh=ne)}}function Bs(s){var a=s,u=s;if(s.alternate)for(;a.return;)a=a.return;else{s=a;do a=s,(a.flags&4098)!==0&&(u=a.return),s=a.return;while(s)}return a.tag===3?u:null}function cv(s){if(s.tag===13){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function uv(s){if(Bs(s)!==s)throw Error(n(188))}function mA(s){var a=s.alternate;if(!a){if(a=Bs(s),a===null)throw Error(n(188));return a!==s?null:s}for(var u=s,y=a;;){var x=u.return;if(x===null)break;var k=x.alternate;if(k===null){if(y=x.return,y!==null){u=y;continue}break}if(x.child===k.child){for(k=x.child;k;){if(k===u)return uv(x),s;if(k===y)return uv(x),a;k=k.sibling}throw Error(n(188))}if(u.return!==y.return)u=x,y=k;else{for(var T=!1,D=x.child;D;){if(D===u){T=!0,u=x,y=k;break}if(D===y){T=!0,y=x,u=k;break}D=D.sibling}if(!T){for(D=k.child;D;){if(D===u){T=!0,u=k,y=x;break}if(D===y){T=!0,y=k,u=x;break}D=D.sibling}if(!T)throw Error(n(189))}}if(u.alternate!==y)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?s:a}function dv(s){return s=mA(s),s!==null?fv(s):null}function fv(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var a=fv(s);if(a!==null)return a;s=s.sibling}return null}var hv=t.unstable_scheduleCallback,pv=t.unstable_cancelCallback,gA=t.unstable_shouldYield,yA=t.unstable_requestPaint,dt=t.unstable_now,vA=t.unstable_getCurrentPriorityLevel,Ph=t.unstable_ImmediatePriority,mv=t.unstable_UserBlockingPriority,Tu=t.unstable_NormalPriority,wA=t.unstable_LowPriority,gv=t.unstable_IdlePriority,_u=null,Pr=null;function bA(s){if(Pr&&typeof Pr.onCommitFiberRoot=="function")try{Pr.onCommitFiberRoot(_u,s,void 0,(s.current.flags&128)===128)}catch{}}var hr=Math.clz32?Math.clz32:kA,xA=Math.log,CA=Math.LN2;function kA(s){return s>>>=0,s===0?32:31-(xA(s)/CA|0)|0}var Ru=64,Mu=4194304;function vl(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Ou(s,a){var u=s.pendingLanes;if(u===0)return 0;var y=0,x=s.suspendedLanes,k=s.pingedLanes,T=u&268435455;if(T!==0){var D=T&~x;D!==0?y=vl(D):(k&=T,k!==0&&(y=vl(k)))}else T=u&~x,T!==0?y=vl(T):k!==0&&(y=vl(k));if(y===0)return 0;if(a!==0&&a!==y&&(a&x)===0&&(x=y&-y,k=a&-a,x>=k||x===16&&(k&4194240)!==0))return a;if((y&4)!==0&&(y|=u&16),a=s.entangledLanes,a!==0)for(s=s.entanglements,a&=y;0<a;)u=31-hr(a),x=1<<u,y|=s[u],a&=~x;return y}function EA(s,a){switch(s){case 1:case 2:case 4:return a+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function AA(s,a){for(var u=s.suspendedLanes,y=s.pingedLanes,x=s.expirationTimes,k=s.pendingLanes;0<k;){var T=31-hr(k),D=1<<T,q=x[T];q===-1?((D&u)===0||(D&y)!==0)&&(x[T]=EA(D,a)):q<=a&&(s.expiredLanes|=D),k&=~D}}function Bh(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function yv(){var s=Ru;return Ru<<=1,(Ru&4194240)===0&&(Ru=64),s}function Th(s){for(var a=[],u=0;31>u;u++)a.push(s);return a}function wl(s,a,u){s.pendingLanes|=a,a!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,a=31-hr(a),s[a]=u}function SA(s,a){var u=s.pendingLanes&~a;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=a,s.mutableReadLanes&=a,s.entangledLanes&=a,a=s.entanglements;var y=s.eventTimes;for(s=s.expirationTimes;0<u;){var x=31-hr(u),k=1<<x;a[x]=0,y[x]=-1,s[x]=-1,u&=~k}}function _h(s,a){var u=s.entangledLanes|=a;for(s=s.entanglements;u;){var y=31-hr(u),x=1<<y;x&a|s[y]&a&&(s[y]|=a),u&=~x}}var Ke=0;function vv(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var wv,Rh,bv,xv,Cv,Mh=!1,Fu=[],_o=null,Ro=null,Mo=null,bl=new Map,xl=new Map,Oo=[],jA="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function kv(s,a){switch(s){case"focusin":case"focusout":_o=null;break;case"dragenter":case"dragleave":Ro=null;break;case"mouseover":case"mouseout":Mo=null;break;case"pointerover":case"pointerout":bl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":xl.delete(a.pointerId)}}function Cl(s,a,u,y,x,k){return s===null||s.nativeEvent!==k?(s={blockedOn:a,domEventName:u,eventSystemFlags:y,nativeEvent:k,targetContainers:[x]},a!==null&&(a=Ol(a),a!==null&&Rh(a)),s):(s.eventSystemFlags|=y,a=s.targetContainers,x!==null&&a.indexOf(x)===-1&&a.push(x),s)}function IA(s,a,u,y,x){switch(a){case"focusin":return _o=Cl(_o,s,a,u,y,x),!0;case"dragenter":return Ro=Cl(Ro,s,a,u,y,x),!0;case"mouseover":return Mo=Cl(Mo,s,a,u,y,x),!0;case"pointerover":var k=x.pointerId;return bl.set(k,Cl(bl.get(k)||null,s,a,u,y,x)),!0;case"gotpointercapture":return k=x.pointerId,xl.set(k,Cl(xl.get(k)||null,s,a,u,y,x)),!0}return!1}function Ev(s){var a=Ts(s.target);if(a!==null){var u=Bs(a);if(u!==null){if(a=u.tag,a===13){if(a=cv(u),a!==null){s.blockedOn=a,Cv(s.priority,function(){bv(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){s.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Lu(s){if(s.blockedOn!==null)return!1;for(var a=s.targetContainers;0<a.length;){var u=Fh(s.domEventName,s.eventSystemFlags,a[0],s.nativeEvent);if(u===null){u=s.nativeEvent;var y=new u.constructor(u.type,u);Be=y,u.target.dispatchEvent(y),Be=null}else return a=Ol(u),a!==null&&Rh(a),s.blockedOn=u,!1;a.shift()}return!0}function Av(s,a,u){Lu(s)&&u.delete(a)}function NA(){Mh=!1,_o!==null&&Lu(_o)&&(_o=null),Ro!==null&&Lu(Ro)&&(Ro=null),Mo!==null&&Lu(Mo)&&(Mo=null),bl.forEach(Av),xl.forEach(Av)}function kl(s,a){s.blockedOn===a&&(s.blockedOn=null,Mh||(Mh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,NA)))}function El(s){function a(x){return kl(x,s)}if(0<Fu.length){kl(Fu[0],s);for(var u=1;u<Fu.length;u++){var y=Fu[u];y.blockedOn===s&&(y.blockedOn=null)}}for(_o!==null&&kl(_o,s),Ro!==null&&kl(Ro,s),Mo!==null&&kl(Mo,s),bl.forEach(a),xl.forEach(a),u=0;u<Oo.length;u++)y=Oo[u],y.blockedOn===s&&(y.blockedOn=null);for(;0<Oo.length&&(u=Oo[0],u.blockedOn===null);)Ev(u),u.blockedOn===null&&Oo.shift()}var _i=j.ReactCurrentBatchConfig,Du=!0;function PA(s,a,u,y){var x=Ke,k=_i.transition;_i.transition=null;try{Ke=1,Oh(s,a,u,y)}finally{Ke=x,_i.transition=k}}function BA(s,a,u,y){var x=Ke,k=_i.transition;_i.transition=null;try{Ke=4,Oh(s,a,u,y)}finally{Ke=x,_i.transition=k}}function Oh(s,a,u,y){if(Du){var x=Fh(s,a,u,y);if(x===null)ep(s,a,y,Uu,u),kv(s,y);else if(IA(x,s,a,u,y))y.stopPropagation();else if(kv(s,y),a&4&&-1<jA.indexOf(s)){for(;x!==null;){var k=Ol(x);if(k!==null&&wv(k),k=Fh(s,a,u,y),k===null&&ep(s,a,y,Uu,u),k===x)break;x=k}x!==null&&y.stopPropagation()}else ep(s,a,y,null,u)}}var Uu=null;function Fh(s,a,u,y){if(Uu=null,s=gn(y),s=Ts(s),s!==null)if(a=Bs(s),a===null)s=null;else if(u=a.tag,u===13){if(s=cv(a),s!==null)return s;s=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;s=null}else a!==s&&(s=null);return Uu=s,null}function Sv(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(vA()){case Ph:return 1;case mv:return 4;case Tu:case wA:return 16;case gv:return 536870912;default:return 16}default:return 16}}var Fo=null,Lh=null,$u=null;function jv(){if($u)return $u;var s,a=Lh,u=a.length,y,x="value"in Fo?Fo.value:Fo.textContent,k=x.length;for(s=0;s<u&&a[s]===x[s];s++);var T=u-s;for(y=1;y<=T&&a[u-y]===x[k-y];y++);return $u=x.slice(s,1<y?1-y:void 0)}function zu(s){var a=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&a===13&&(s=13)):s=a,s===10&&(s=13),32<=s||s===13?s:0}function Wu(){return!0}function Iv(){return!1}function On(s){function a(u,y,x,k,T){this._reactName=u,this._targetInst=x,this.type=y,this.nativeEvent=k,this.target=T,this.currentTarget=null;for(var D in s)s.hasOwnProperty(D)&&(u=s[D],this[D]=u?u(k):k[D]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?Wu:Iv,this.isPropagationStopped=Iv,this}return Y(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Wu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Wu)},persist:function(){},isPersistent:Wu}),a}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dh=On(Ri),Al=Y({},Ri,{view:0,detail:0}),TA=On(Al),Uh,$h,Sl,qu=Y({},Al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wh,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Sl&&(Sl&&s.type==="mousemove"?(Uh=s.screenX-Sl.screenX,$h=s.screenY-Sl.screenY):$h=Uh=0,Sl=s),Uh)},movementY:function(s){return"movementY"in s?s.movementY:$h}}),Nv=On(qu),_A=Y({},qu,{dataTransfer:0}),RA=On(_A),MA=Y({},Al,{relatedTarget:0}),zh=On(MA),OA=Y({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),FA=On(OA),LA=Y({},Ri,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),DA=On(LA),UA=Y({},Ri,{data:0}),Pv=On(UA),$A={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zA={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},WA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qA(s){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(s):(s=WA[s])?!!a[s]:!1}function Wh(){return qA}var HA=Y({},Al,{key:function(s){if(s.key){var a=$A[s.key]||s.key;if(a!=="Unidentified")return a}return s.type==="keypress"?(s=zu(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?zA[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wh,charCode:function(s){return s.type==="keypress"?zu(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?zu(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),VA=On(HA),QA=Y({},qu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bv=On(QA),GA=Y({},Al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wh}),KA=On(GA),YA=Y({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),JA=On(YA),ZA=Y({},qu,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),XA=On(ZA),eS=[9,13,27,32],qh=c&&"CompositionEvent"in window,jl=null;c&&"documentMode"in document&&(jl=document.documentMode);var tS=c&&"TextEvent"in window&&!jl,Tv=c&&(!qh||jl&&8<jl&&11>=jl),_v=" ",Rv=!1;function Mv(s,a){switch(s){case"keyup":return eS.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ov(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Mi=!1;function nS(s,a){switch(s){case"compositionend":return Ov(a);case"keypress":return a.which!==32?null:(Rv=!0,_v);case"textInput":return s=a.data,s===_v&&Rv?null:s;default:return null}}function rS(s,a){if(Mi)return s==="compositionend"||!qh&&Mv(s,a)?(s=jv(),$u=Lh=Fo=null,Mi=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Tv&&a.locale!=="ko"?null:a.data;default:return null}}var oS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fv(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a==="input"?!!oS[s.type]:a==="textarea"}function Lv(s,a,u,y){ov(y),a=Ku(a,"onChange"),0<a.length&&(u=new Dh("onChange","change",null,u,y),s.push({event:u,listeners:a}))}var Il=null,Nl=null;function sS(s){nw(s,0)}function Hu(s){var a=Ui(s);if(It(a))return s}function iS(s,a){if(s==="change")return a}var Dv=!1;if(c){var Hh;if(c){var Vh="oninput"in document;if(!Vh){var Uv=document.createElement("div");Uv.setAttribute("oninput","return;"),Vh=typeof Uv.oninput=="function"}Hh=Vh}else Hh=!1;Dv=Hh&&(!document.documentMode||9<document.documentMode)}function $v(){Il&&(Il.detachEvent("onpropertychange",zv),Nl=Il=null)}function zv(s){if(s.propertyName==="value"&&Hu(Nl)){var a=[];Lv(a,Nl,s,gn(s)),lv(sS,a)}}function aS(s,a,u){s==="focusin"?($v(),Il=a,Nl=u,Il.attachEvent("onpropertychange",zv)):s==="focusout"&&$v()}function lS(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Hu(Nl)}function cS(s,a){if(s==="click")return Hu(a)}function uS(s,a){if(s==="input"||s==="change")return Hu(a)}function dS(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var pr=typeof Object.is=="function"?Object.is:dS;function Pl(s,a){if(pr(s,a))return!0;if(typeof s!="object"||s===null||typeof a!="object"||a===null)return!1;var u=Object.keys(s),y=Object.keys(a);if(u.length!==y.length)return!1;for(y=0;y<u.length;y++){var x=u[y];if(!d.call(a,x)||!pr(s[x],a[x]))return!1}return!0}function Wv(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function qv(s,a){var u=Wv(s);s=0;for(var y;u;){if(u.nodeType===3){if(y=s+u.textContent.length,s<=a&&y>=a)return{node:u,offset:a-s};s=y}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Wv(u)}}function Hv(s,a){return s&&a?s===a?!0:s&&s.nodeType===3?!1:a&&a.nodeType===3?Hv(s,a.parentNode):"contains"in s?s.contains(a):s.compareDocumentPosition?!!(s.compareDocumentPosition(a)&16):!1:!1}function Vv(){for(var s=window,a=mt();a instanceof s.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)s=a.contentWindow;else break;a=mt(s.document)}return a}function Qh(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a&&(a==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||a==="textarea"||s.contentEditable==="true")}function fS(s){var a=Vv(),u=s.focusedElem,y=s.selectionRange;if(a!==u&&u&&u.ownerDocument&&Hv(u.ownerDocument.documentElement,u)){if(y!==null&&Qh(u)){if(a=y.start,s=y.end,s===void 0&&(s=a),"selectionStart"in u)u.selectionStart=a,u.selectionEnd=Math.min(s,u.value.length);else if(s=(a=u.ownerDocument||document)&&a.defaultView||window,s.getSelection){s=s.getSelection();var x=u.textContent.length,k=Math.min(y.start,x);y=y.end===void 0?k:Math.min(y.end,x),!s.extend&&k>y&&(x=y,y=k,k=x),x=qv(u,k);var T=qv(u,y);x&&T&&(s.rangeCount!==1||s.anchorNode!==x.node||s.anchorOffset!==x.offset||s.focusNode!==T.node||s.focusOffset!==T.offset)&&(a=a.createRange(),a.setStart(x.node,x.offset),s.removeAllRanges(),k>y?(s.addRange(a),s.extend(T.node,T.offset)):(a.setEnd(T.node,T.offset),s.addRange(a)))}}for(a=[],s=u;s=s.parentNode;)s.nodeType===1&&a.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<a.length;u++)s=a[u],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var hS=c&&"documentMode"in document&&11>=document.documentMode,Oi=null,Gh=null,Bl=null,Kh=!1;function Qv(s,a,u){var y=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Kh||Oi==null||Oi!==mt(y)||(y=Oi,"selectionStart"in y&&Qh(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Bl&&Pl(Bl,y)||(Bl=y,y=Ku(Gh,"onSelect"),0<y.length&&(a=new Dh("onSelect","select",null,a,u),s.push({event:a,listeners:y}),a.target=Oi)))}function Vu(s,a){var u={};return u[s.toLowerCase()]=a.toLowerCase(),u["Webkit"+s]="webkit"+a,u["Moz"+s]="moz"+a,u}var Fi={animationend:Vu("Animation","AnimationEnd"),animationiteration:Vu("Animation","AnimationIteration"),animationstart:Vu("Animation","AnimationStart"),transitionend:Vu("Transition","TransitionEnd")},Yh={},Gv={};c&&(Gv=document.createElement("div").style,"AnimationEvent"in window||(delete Fi.animationend.animation,delete Fi.animationiteration.animation,delete Fi.animationstart.animation),"TransitionEvent"in window||delete Fi.transitionend.transition);function Qu(s){if(Yh[s])return Yh[s];if(!Fi[s])return s;var a=Fi[s],u;for(u in a)if(a.hasOwnProperty(u)&&u in Gv)return Yh[s]=a[u];return s}var Kv=Qu("animationend"),Yv=Qu("animationiteration"),Jv=Qu("animationstart"),Zv=Qu("transitionend"),Xv=new Map,ew="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Lo(s,a){Xv.set(s,a),i(a,[s])}for(var Jh=0;Jh<ew.length;Jh++){var Zh=ew[Jh],pS=Zh.toLowerCase(),mS=Zh[0].toUpperCase()+Zh.slice(1);Lo(pS,"on"+mS)}Lo(Kv,"onAnimationEnd"),Lo(Yv,"onAnimationIteration"),Lo(Jv,"onAnimationStart"),Lo("dblclick","onDoubleClick"),Lo("focusin","onFocus"),Lo("focusout","onBlur"),Lo(Zv,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tl));function tw(s,a,u){var y=s.type||"unknown-event";s.currentTarget=u,pA(y,a,void 0,s),s.currentTarget=null}function nw(s,a){a=(a&4)!==0;for(var u=0;u<s.length;u++){var y=s[u],x=y.event;y=y.listeners;e:{var k=void 0;if(a)for(var T=y.length-1;0<=T;T--){var D=y[T],q=D.instance,ne=D.currentTarget;if(D=D.listener,q!==k&&x.isPropagationStopped())break e;tw(x,D,ne),k=q}else for(T=0;T<y.length;T++){if(D=y[T],q=D.instance,ne=D.currentTarget,D=D.listener,q!==k&&x.isPropagationStopped())break e;tw(x,D,ne),k=q}}}if(Bu)throw s=Nh,Bu=!1,Nh=null,s}function Xe(s,a){var u=a[ip];u===void 0&&(u=a[ip]=new Set);var y=s+"__bubble";u.has(y)||(rw(a,s,2,!1),u.add(y))}function Xh(s,a,u){var y=0;a&&(y|=4),rw(u,s,y,a)}var Gu="_reactListening"+Math.random().toString(36).slice(2);function _l(s){if(!s[Gu]){s[Gu]=!0,r.forEach(function(u){u!=="selectionchange"&&(gS.has(u)||Xh(u,!1,s),Xh(u,!0,s))});var a=s.nodeType===9?s:s.ownerDocument;a===null||a[Gu]||(a[Gu]=!0,Xh("selectionchange",!1,a))}}function rw(s,a,u,y){switch(Sv(a)){case 1:var x=PA;break;case 4:x=BA;break;default:x=Oh}u=x.bind(null,a,u,s),x=void 0,!Ih||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(x=!0),y?x!==void 0?s.addEventListener(a,u,{capture:!0,passive:x}):s.addEventListener(a,u,!0):x!==void 0?s.addEventListener(a,u,{passive:x}):s.addEventListener(a,u,!1)}function ep(s,a,u,y,x){var k=y;if((a&1)===0&&(a&2)===0&&y!==null)e:for(;;){if(y===null)return;var T=y.tag;if(T===3||T===4){var D=y.stateNode.containerInfo;if(D===x||D.nodeType===8&&D.parentNode===x)break;if(T===4)for(T=y.return;T!==null;){var q=T.tag;if((q===3||q===4)&&(q=T.stateNode.containerInfo,q===x||q.nodeType===8&&q.parentNode===x))return;T=T.return}for(;D!==null;){if(T=Ts(D),T===null)return;if(q=T.tag,q===5||q===6){y=k=T;continue e}D=D.parentNode}}y=y.return}lv(function(){var ne=k,le=gn(u),ce=[];e:{var ae=Xv.get(s);if(ae!==void 0){var me=Dh,Ce=s;switch(s){case"keypress":if(zu(u)===0)break e;case"keydown":case"keyup":me=VA;break;case"focusin":Ce="focus",me=zh;break;case"focusout":Ce="blur",me=zh;break;case"beforeblur":case"afterblur":me=zh;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=Nv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=RA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=KA;break;case Kv:case Yv:case Jv:me=FA;break;case Zv:me=JA;break;case"scroll":me=TA;break;case"wheel":me=XA;break;case"copy":case"cut":case"paste":me=DA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=Bv}var ke=(a&4)!==0,ft=!ke&&s==="scroll",X=ke?ae!==null?ae+"Capture":null:ae;ke=[];for(var G=ne,te;G!==null;){te=G;var de=te.stateNode;if(te.tag===5&&de!==null&&(te=de,X!==null&&(de=ml(G,X),de!=null&&ke.push(Rl(G,de,te)))),ft)break;G=G.return}0<ke.length&&(ae=new me(ae,Ce,null,u,le),ce.push({event:ae,listeners:ke}))}}if((a&7)===0){e:{if(ae=s==="mouseover"||s==="pointerover",me=s==="mouseout"||s==="pointerout",ae&&u!==Be&&(Ce=u.relatedTarget||u.fromElement)&&(Ts(Ce)||Ce[Zr]))break e;if((me||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,me?(Ce=u.relatedTarget||u.toElement,me=ne,Ce=Ce?Ts(Ce):null,Ce!==null&&(ft=Bs(Ce),Ce!==ft||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):(me=null,Ce=ne),me!==Ce)){if(ke=Nv,de="onMouseLeave",X="onMouseEnter",G="mouse",(s==="pointerout"||s==="pointerover")&&(ke=Bv,de="onPointerLeave",X="onPointerEnter",G="pointer"),ft=me==null?ae:Ui(me),te=Ce==null?ae:Ui(Ce),ae=new ke(de,G+"leave",me,u,le),ae.target=ft,ae.relatedTarget=te,de=null,Ts(le)===ne&&(ke=new ke(X,G+"enter",Ce,u,le),ke.target=te,ke.relatedTarget=ft,de=ke),ft=de,me&&Ce)t:{for(ke=me,X=Ce,G=0,te=ke;te;te=Li(te))G++;for(te=0,de=X;de;de=Li(de))te++;for(;0<G-te;)ke=Li(ke),G--;for(;0<te-G;)X=Li(X),te--;for(;G--;){if(ke===X||X!==null&&ke===X.alternate)break t;ke=Li(ke),X=Li(X)}ke=null}else ke=null;me!==null&&ow(ce,ae,me,ke,!1),Ce!==null&&ft!==null&&ow(ce,ft,Ce,ke,!0)}}e:{if(ae=ne?Ui(ne):window,me=ae.nodeName&&ae.nodeName.toLowerCase(),me==="select"||me==="input"&&ae.type==="file")var Ae=iS;else if(Fv(ae))if(Dv)Ae=uS;else{Ae=lS;var Ie=aS}else(me=ae.nodeName)&&me.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Ae=cS);if(Ae&&(Ae=Ae(s,ne))){Lv(ce,Ae,u,le);break e}Ie&&Ie(s,ae,ne),s==="focusout"&&(Ie=ae._wrapperState)&&Ie.controlled&&ae.type==="number"&&Ot(ae,"number",ae.value)}switch(Ie=ne?Ui(ne):window,s){case"focusin":(Fv(Ie)||Ie.contentEditable==="true")&&(Oi=Ie,Gh=ne,Bl=null);break;case"focusout":Bl=Gh=Oi=null;break;case"mousedown":Kh=!0;break;case"contextmenu":case"mouseup":case"dragend":Kh=!1,Qv(ce,u,le);break;case"selectionchange":if(hS)break;case"keydown":case"keyup":Qv(ce,u,le)}var Ne;if(qh)e:{switch(s){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Mi?Mv(s,u)&&(Te="onCompositionEnd"):s==="keydown"&&u.keyCode===229&&(Te="onCompositionStart");Te&&(Tv&&u.locale!=="ko"&&(Mi||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Mi&&(Ne=jv()):(Fo=le,Lh="value"in Fo?Fo.value:Fo.textContent,Mi=!0)),Ie=Ku(ne,Te),0<Ie.length&&(Te=new Pv(Te,s,null,u,le),ce.push({event:Te,listeners:Ie}),Ne?Te.data=Ne:(Ne=Ov(u),Ne!==null&&(Te.data=Ne)))),(Ne=tS?nS(s,u):rS(s,u))&&(ne=Ku(ne,"onBeforeInput"),0<ne.length&&(le=new Pv("onBeforeInput","beforeinput",null,u,le),ce.push({event:le,listeners:ne}),le.data=Ne))}nw(ce,a)})}function Rl(s,a,u){return{instance:s,listener:a,currentTarget:u}}function Ku(s,a){for(var u=a+"Capture",y=[];s!==null;){var x=s,k=x.stateNode;x.tag===5&&k!==null&&(x=k,k=ml(s,u),k!=null&&y.unshift(Rl(s,k,x)),k=ml(s,a),k!=null&&y.push(Rl(s,k,x))),s=s.return}return y}function Li(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function ow(s,a,u,y,x){for(var k=a._reactName,T=[];u!==null&&u!==y;){var D=u,q=D.alternate,ne=D.stateNode;if(q!==null&&q===y)break;D.tag===5&&ne!==null&&(D=ne,x?(q=ml(u,k),q!=null&&T.unshift(Rl(u,q,D))):x||(q=ml(u,k),q!=null&&T.push(Rl(u,q,D)))),u=u.return}T.length!==0&&s.push({event:a,listeners:T})}var yS=/\r\n?/g,vS=/\u0000|\uFFFD/g;function sw(s){return(typeof s=="string"?s:""+s).replace(yS,`
39
+ `).replace(vS,"")}function Yu(s,a,u){if(a=sw(a),sw(s)!==a&&u)throw Error(n(425))}function Ju(){}var tp=null,np=null;function rp(s,a){return s==="textarea"||s==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var op=typeof setTimeout=="function"?setTimeout:void 0,wS=typeof clearTimeout=="function"?clearTimeout:void 0,iw=typeof Promise=="function"?Promise:void 0,bS=typeof queueMicrotask=="function"?queueMicrotask:typeof iw<"u"?function(s){return iw.resolve(null).then(s).catch(xS)}:op;function xS(s){setTimeout(function(){throw s})}function sp(s,a){var u=a,y=0;do{var x=u.nextSibling;if(s.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"){if(y===0){s.removeChild(x),El(a);return}y--}else u!=="$"&&u!=="$?"&&u!=="$!"||y++;u=x}while(u);El(a)}function Do(s){for(;s!=null;s=s.nextSibling){var a=s.nodeType;if(a===1||a===3)break;if(a===8){if(a=s.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return s}function aw(s){s=s.previousSibling;for(var a=0;s;){if(s.nodeType===8){var u=s.data;if(u==="$"||u==="$!"||u==="$?"){if(a===0)return s;a--}else u==="/$"&&a++}s=s.previousSibling}return null}var Di=Math.random().toString(36).slice(2),Br="__reactFiber$"+Di,Ml="__reactProps$"+Di,Zr="__reactContainer$"+Di,ip="__reactEvents$"+Di,CS="__reactListeners$"+Di,kS="__reactHandles$"+Di;function Ts(s){var a=s[Br];if(a)return a;for(var u=s.parentNode;u;){if(a=u[Zr]||u[Br]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(s=aw(s);s!==null;){if(u=s[Br])return u;s=aw(s)}return a}s=u,u=s.parentNode}return null}function Ol(s){return s=s[Br]||s[Zr],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Ui(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function Zu(s){return s[Ml]||null}var ap=[],$i=-1;function Uo(s){return{current:s}}function et(s){0>$i||(s.current=ap[$i],ap[$i]=null,$i--)}function Ze(s,a){$i++,ap[$i]=s.current,s.current=a}var $o={},Ht=Uo($o),yn=Uo(!1),_s=$o;function zi(s,a){var u=s.type.contextTypes;if(!u)return $o;var y=s.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===a)return y.__reactInternalMemoizedMaskedChildContext;var x={},k;for(k in u)x[k]=a[k];return y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=a,s.__reactInternalMemoizedMaskedChildContext=x),x}function vn(s){return s=s.childContextTypes,s!=null}function Xu(){et(yn),et(Ht)}function lw(s,a,u){if(Ht.current!==$o)throw Error(n(168));Ze(Ht,a),Ze(yn,u)}function cw(s,a,u){var y=s.stateNode;if(a=a.childContextTypes,typeof y.getChildContext!="function")return u;y=y.getChildContext();for(var x in y)if(!(x in a))throw Error(n(108,ue(s)||"Unknown",x));return Y({},u,y)}function ed(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||$o,_s=Ht.current,Ze(Ht,s),Ze(yn,yn.current),!0}function uw(s,a,u){var y=s.stateNode;if(!y)throw Error(n(169));u?(s=cw(s,a,_s),y.__reactInternalMemoizedMergedChildContext=s,et(yn),et(Ht),Ze(Ht,s)):et(yn),Ze(yn,u)}var Xr=null,td=!1,lp=!1;function dw(s){Xr===null?Xr=[s]:Xr.push(s)}function ES(s){td=!0,dw(s)}function zo(){if(!lp&&Xr!==null){lp=!0;var s=0,a=Ke;try{var u=Xr;for(Ke=1;s<u.length;s++){var y=u[s];do y=y(!0);while(y!==null)}Xr=null,td=!1}catch(x){throw Xr!==null&&(Xr=Xr.slice(s+1)),hv(Ph,zo),x}finally{Ke=a,lp=!1}}return null}var Wi=[],qi=0,nd=null,rd=0,Gn=[],Kn=0,Rs=null,eo=1,to="";function Ms(s,a){Wi[qi++]=rd,Wi[qi++]=nd,nd=s,rd=a}function fw(s,a,u){Gn[Kn++]=eo,Gn[Kn++]=to,Gn[Kn++]=Rs,Rs=s;var y=eo;s=to;var x=32-hr(y)-1;y&=~(1<<x),u+=1;var k=32-hr(a)+x;if(30<k){var T=x-x%5;k=(y&(1<<T)-1).toString(32),y>>=T,x-=T,eo=1<<32-hr(a)+x|u<<x|y,to=k+s}else eo=1<<k|u<<x|y,to=s}function cp(s){s.return!==null&&(Ms(s,1),fw(s,1,0))}function up(s){for(;s===nd;)nd=Wi[--qi],Wi[qi]=null,rd=Wi[--qi],Wi[qi]=null;for(;s===Rs;)Rs=Gn[--Kn],Gn[Kn]=null,to=Gn[--Kn],Gn[Kn]=null,eo=Gn[--Kn],Gn[Kn]=null}var Fn=null,Ln=null,ot=!1,mr=null;function hw(s,a){var u=Xn(5,null,null,0);u.elementType="DELETED",u.stateNode=a,u.return=s,a=s.deletions,a===null?(s.deletions=[u],s.flags|=16):a.push(u)}function pw(s,a){switch(s.tag){case 5:var u=s.type;return a=a.nodeType!==1||u.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(s.stateNode=a,Fn=s,Ln=Do(a.firstChild),!0):!1;case 6:return a=s.pendingProps===""||a.nodeType!==3?null:a,a!==null?(s.stateNode=a,Fn=s,Ln=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(u=Rs!==null?{id:eo,overflow:to}:null,s.memoizedState={dehydrated:a,treeContext:u,retryLane:1073741824},u=Xn(18,null,null,0),u.stateNode=a,u.return=s,s.child=u,Fn=s,Ln=null,!0):!1;default:return!1}}function dp(s){return(s.mode&1)!==0&&(s.flags&128)===0}function fp(s){if(ot){var a=Ln;if(a){var u=a;if(!pw(s,a)){if(dp(s))throw Error(n(418));a=Do(u.nextSibling);var y=Fn;a&&pw(s,a)?hw(y,u):(s.flags=s.flags&-4097|2,ot=!1,Fn=s)}}else{if(dp(s))throw Error(n(418));s.flags=s.flags&-4097|2,ot=!1,Fn=s}}}function mw(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Fn=s}function od(s){if(s!==Fn)return!1;if(!ot)return mw(s),ot=!0,!1;var a;if((a=s.tag!==3)&&!(a=s.tag!==5)&&(a=s.type,a=a!=="head"&&a!=="body"&&!rp(s.type,s.memoizedProps)),a&&(a=Ln)){if(dp(s))throw gw(),Error(n(418));for(;a;)hw(s,a),a=Do(a.nextSibling)}if(mw(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,a=0;s;){if(s.nodeType===8){var u=s.data;if(u==="/$"){if(a===0){Ln=Do(s.nextSibling);break e}a--}else u!=="$"&&u!=="$!"&&u!=="$?"||a++}s=s.nextSibling}Ln=null}}else Ln=Fn?Do(s.stateNode.nextSibling):null;return!0}function gw(){for(var s=Ln;s;)s=Do(s.nextSibling)}function Hi(){Ln=Fn=null,ot=!1}function hp(s){mr===null?mr=[s]:mr.push(s)}var AS=j.ReactCurrentBatchConfig;function Fl(s,a,u){if(s=u.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var y=u.stateNode}if(!y)throw Error(n(147,s));var x=y,k=""+s;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===k?a.ref:(a=function(T){var D=x.refs;T===null?delete D[k]:D[k]=T},a._stringRef=k,a)}if(typeof s!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,s))}return s}function sd(s,a){throw s=Object.prototype.toString.call(a),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":s))}function yw(s){var a=s._init;return a(s._payload)}function vw(s){function a(X,G){if(s){var te=X.deletions;te===null?(X.deletions=[G],X.flags|=16):te.push(G)}}function u(X,G){if(!s)return null;for(;G!==null;)a(X,G),G=G.sibling;return null}function y(X,G){for(X=new Map;G!==null;)G.key!==null?X.set(G.key,G):X.set(G.index,G),G=G.sibling;return X}function x(X,G){return X=Yo(X,G),X.index=0,X.sibling=null,X}function k(X,G,te){return X.index=te,s?(te=X.alternate,te!==null?(te=te.index,te<G?(X.flags|=2,G):te):(X.flags|=2,G)):(X.flags|=1048576,G)}function T(X){return s&&X.alternate===null&&(X.flags|=2),X}function D(X,G,te,de){return G===null||G.tag!==6?(G=o0(te,X.mode,de),G.return=X,G):(G=x(G,te),G.return=X,G)}function q(X,G,te,de){var Ae=te.type;return Ae===P?le(X,G,te.props.children,de,te.key):G!==null&&(G.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===K&&yw(Ae)===G.type)?(de=x(G,te.props),de.ref=Fl(X,G,te),de.return=X,de):(de=Nd(te.type,te.key,te.props,null,X.mode,de),de.ref=Fl(X,G,te),de.return=X,de)}function ne(X,G,te,de){return G===null||G.tag!==4||G.stateNode.containerInfo!==te.containerInfo||G.stateNode.implementation!==te.implementation?(G=s0(te,X.mode,de),G.return=X,G):(G=x(G,te.children||[]),G.return=X,G)}function le(X,G,te,de,Ae){return G===null||G.tag!==7?(G=Ws(te,X.mode,de,Ae),G.return=X,G):(G=x(G,te),G.return=X,G)}function ce(X,G,te){if(typeof G=="string"&&G!==""||typeof G=="number")return G=o0(""+G,X.mode,te),G.return=X,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case N:return te=Nd(G.type,G.key,G.props,null,X.mode,te),te.ref=Fl(X,null,G),te.return=X,te;case _:return G=s0(G,X.mode,te),G.return=X,G;case K:var de=G._init;return ce(X,de(G._payload),te)}if(ye(G)||Z(G))return G=Ws(G,X.mode,te,null),G.return=X,G;sd(X,G)}return null}function ae(X,G,te,de){var Ae=G!==null?G.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return Ae!==null?null:D(X,G,""+te,de);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case N:return te.key===Ae?q(X,G,te,de):null;case _:return te.key===Ae?ne(X,G,te,de):null;case K:return Ae=te._init,ae(X,G,Ae(te._payload),de)}if(ye(te)||Z(te))return Ae!==null?null:le(X,G,te,de,null);sd(X,te)}return null}function me(X,G,te,de,Ae){if(typeof de=="string"&&de!==""||typeof de=="number")return X=X.get(te)||null,D(G,X,""+de,Ae);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case N:return X=X.get(de.key===null?te:de.key)||null,q(G,X,de,Ae);case _:return X=X.get(de.key===null?te:de.key)||null,ne(G,X,de,Ae);case K:var Ie=de._init;return me(X,G,te,Ie(de._payload),Ae)}if(ye(de)||Z(de))return X=X.get(te)||null,le(G,X,de,Ae,null);sd(G,de)}return null}function Ce(X,G,te,de){for(var Ae=null,Ie=null,Ne=G,Te=G=0,Bt=null;Ne!==null&&Te<te.length;Te++){Ne.index>Te?(Bt=Ne,Ne=null):Bt=Ne.sibling;var He=ae(X,Ne,te[Te],de);if(He===null){Ne===null&&(Ne=Bt);break}s&&Ne&&He.alternate===null&&a(X,Ne),G=k(He,G,Te),Ie===null?Ae=He:Ie.sibling=He,Ie=He,Ne=Bt}if(Te===te.length)return u(X,Ne),ot&&Ms(X,Te),Ae;if(Ne===null){for(;Te<te.length;Te++)Ne=ce(X,te[Te],de),Ne!==null&&(G=k(Ne,G,Te),Ie===null?Ae=Ne:Ie.sibling=Ne,Ie=Ne);return ot&&Ms(X,Te),Ae}for(Ne=y(X,Ne);Te<te.length;Te++)Bt=me(Ne,X,Te,te[Te],de),Bt!==null&&(s&&Bt.alternate!==null&&Ne.delete(Bt.key===null?Te:Bt.key),G=k(Bt,G,Te),Ie===null?Ae=Bt:Ie.sibling=Bt,Ie=Bt);return s&&Ne.forEach(function(Jo){return a(X,Jo)}),ot&&Ms(X,Te),Ae}function ke(X,G,te,de){var Ae=Z(te);if(typeof Ae!="function")throw Error(n(150));if(te=Ae.call(te),te==null)throw Error(n(151));for(var Ie=Ae=null,Ne=G,Te=G=0,Bt=null,He=te.next();Ne!==null&&!He.done;Te++,He=te.next()){Ne.index>Te?(Bt=Ne,Ne=null):Bt=Ne.sibling;var Jo=ae(X,Ne,He.value,de);if(Jo===null){Ne===null&&(Ne=Bt);break}s&&Ne&&Jo.alternate===null&&a(X,Ne),G=k(Jo,G,Te),Ie===null?Ae=Jo:Ie.sibling=Jo,Ie=Jo,Ne=Bt}if(He.done)return u(X,Ne),ot&&Ms(X,Te),Ae;if(Ne===null){for(;!He.done;Te++,He=te.next())He=ce(X,He.value,de),He!==null&&(G=k(He,G,Te),Ie===null?Ae=He:Ie.sibling=He,Ie=He);return ot&&Ms(X,Te),Ae}for(Ne=y(X,Ne);!He.done;Te++,He=te.next())He=me(Ne,X,Te,He.value,de),He!==null&&(s&&He.alternate!==null&&Ne.delete(He.key===null?Te:He.key),G=k(He,G,Te),Ie===null?Ae=He:Ie.sibling=He,Ie=He);return s&&Ne.forEach(function(oj){return a(X,oj)}),ot&&Ms(X,Te),Ae}function ft(X,G,te,de){if(typeof te=="object"&&te!==null&&te.type===P&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case N:e:{for(var Ae=te.key,Ie=G;Ie!==null;){if(Ie.key===Ae){if(Ae=te.type,Ae===P){if(Ie.tag===7){u(X,Ie.sibling),G=x(Ie,te.props.children),G.return=X,X=G;break e}}else if(Ie.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===K&&yw(Ae)===Ie.type){u(X,Ie.sibling),G=x(Ie,te.props),G.ref=Fl(X,Ie,te),G.return=X,X=G;break e}u(X,Ie);break}else a(X,Ie);Ie=Ie.sibling}te.type===P?(G=Ws(te.props.children,X.mode,de,te.key),G.return=X,X=G):(de=Nd(te.type,te.key,te.props,null,X.mode,de),de.ref=Fl(X,G,te),de.return=X,X=de)}return T(X);case _:e:{for(Ie=te.key;G!==null;){if(G.key===Ie)if(G.tag===4&&G.stateNode.containerInfo===te.containerInfo&&G.stateNode.implementation===te.implementation){u(X,G.sibling),G=x(G,te.children||[]),G.return=X,X=G;break e}else{u(X,G);break}else a(X,G);G=G.sibling}G=s0(te,X.mode,de),G.return=X,X=G}return T(X);case K:return Ie=te._init,ft(X,G,Ie(te._payload),de)}if(ye(te))return Ce(X,G,te,de);if(Z(te))return ke(X,G,te,de);sd(X,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,G!==null&&G.tag===6?(u(X,G.sibling),G=x(G,te),G.return=X,X=G):(u(X,G),G=o0(te,X.mode,de),G.return=X,X=G),T(X)):u(X,G)}return ft}var Vi=vw(!0),ww=vw(!1),id=Uo(null),ad=null,Qi=null,pp=null;function mp(){pp=Qi=ad=null}function gp(s){var a=id.current;et(id),s._currentValue=a}function yp(s,a,u){for(;s!==null;){var y=s.alternate;if((s.childLanes&a)!==a?(s.childLanes|=a,y!==null&&(y.childLanes|=a)):y!==null&&(y.childLanes&a)!==a&&(y.childLanes|=a),s===u)break;s=s.return}}function Gi(s,a){ad=s,pp=Qi=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&a)!==0&&(wn=!0),s.firstContext=null)}function Yn(s){var a=s._currentValue;if(pp!==s)if(s={context:s,memoizedValue:a,next:null},Qi===null){if(ad===null)throw Error(n(308));Qi=s,ad.dependencies={lanes:0,firstContext:s}}else Qi=Qi.next=s;return a}var Os=null;function vp(s){Os===null?Os=[s]:Os.push(s)}function bw(s,a,u,y){var x=a.interleaved;return x===null?(u.next=u,vp(a)):(u.next=x.next,x.next=u),a.interleaved=u,no(s,y)}function no(s,a){s.lanes|=a;var u=s.alternate;for(u!==null&&(u.lanes|=a),u=s,s=s.return;s!==null;)s.childLanes|=a,u=s.alternate,u!==null&&(u.childLanes|=a),u=s,s=s.return;return u.tag===3?u.stateNode:null}var Wo=!1;function wp(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xw(s,a){s=s.updateQueue,a.updateQueue===s&&(a.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function ro(s,a){return{eventTime:s,lane:a,tag:0,payload:null,callback:null,next:null}}function qo(s,a,u){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(qe&2)!==0){var x=y.pending;return x===null?a.next=a:(a.next=x.next,x.next=a),y.pending=a,no(s,u)}return x=y.interleaved,x===null?(a.next=a,vp(y)):(a.next=x.next,x.next=a),y.interleaved=a,no(s,u)}function ld(s,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194240)!==0)){var y=a.lanes;y&=s.pendingLanes,u|=y,a.lanes=u,_h(s,u)}}function Cw(s,a){var u=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,u===y)){var x=null,k=null;if(u=u.firstBaseUpdate,u!==null){do{var T={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};k===null?x=k=T:k=k.next=T,u=u.next}while(u!==null);k===null?x=k=a:k=k.next=a}else x=k=a;u={baseState:y.baseState,firstBaseUpdate:x,lastBaseUpdate:k,shared:y.shared,effects:y.effects},s.updateQueue=u;return}s=u.lastBaseUpdate,s===null?u.firstBaseUpdate=a:s.next=a,u.lastBaseUpdate=a}function cd(s,a,u,y){var x=s.updateQueue;Wo=!1;var k=x.firstBaseUpdate,T=x.lastBaseUpdate,D=x.shared.pending;if(D!==null){x.shared.pending=null;var q=D,ne=q.next;q.next=null,T===null?k=ne:T.next=ne,T=q;var le=s.alternate;le!==null&&(le=le.updateQueue,D=le.lastBaseUpdate,D!==T&&(D===null?le.firstBaseUpdate=ne:D.next=ne,le.lastBaseUpdate=q))}if(k!==null){var ce=x.baseState;T=0,le=ne=q=null,D=k;do{var ae=D.lane,me=D.eventTime;if((y&ae)===ae){le!==null&&(le=le.next={eventTime:me,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Ce=s,ke=D;switch(ae=a,me=u,ke.tag){case 1:if(Ce=ke.payload,typeof Ce=="function"){ce=Ce.call(me,ce,ae);break e}ce=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=ke.payload,ae=typeof Ce=="function"?Ce.call(me,ce,ae):Ce,ae==null)break e;ce=Y({},ce,ae);break e;case 2:Wo=!0}}D.callback!==null&&D.lane!==0&&(s.flags|=64,ae=x.effects,ae===null?x.effects=[D]:ae.push(D))}else me={eventTime:me,lane:ae,tag:D.tag,payload:D.payload,callback:D.callback,next:null},le===null?(ne=le=me,q=ce):le=le.next=me,T|=ae;if(D=D.next,D===null){if(D=x.shared.pending,D===null)break;ae=D,D=ae.next,ae.next=null,x.lastBaseUpdate=ae,x.shared.pending=null}}while(!0);if(le===null&&(q=ce),x.baseState=q,x.firstBaseUpdate=ne,x.lastBaseUpdate=le,a=x.shared.interleaved,a!==null){x=a;do T|=x.lane,x=x.next;while(x!==a)}else k===null&&(x.shared.lanes=0);Ds|=T,s.lanes=T,s.memoizedState=ce}}function kw(s,a,u){if(s=a.effects,a.effects=null,s!==null)for(a=0;a<s.length;a++){var y=s[a],x=y.callback;if(x!==null){if(y.callback=null,y=u,typeof x!="function")throw Error(n(191,x));x.call(y)}}}var Ll={},Tr=Uo(Ll),Dl=Uo(Ll),Ul=Uo(Ll);function Fs(s){if(s===Ll)throw Error(n(174));return s}function bp(s,a){switch(Ze(Ul,a),Ze(Dl,s),Ze(Tr,Ll),s=a.nodeType,s){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:Bi(null,"");break;default:s=s===8?a.parentNode:a,a=s.namespaceURI||null,s=s.tagName,a=Bi(a,s)}et(Tr),Ze(Tr,a)}function Ki(){et(Tr),et(Dl),et(Ul)}function Ew(s){Fs(Ul.current);var a=Fs(Tr.current),u=Bi(a,s.type);a!==u&&(Ze(Dl,s),Ze(Tr,u))}function xp(s){Dl.current===s&&(et(Tr),et(Dl))}var st=Uo(0);function ud(s){for(var a=s;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Cp=[];function kp(){for(var s=0;s<Cp.length;s++)Cp[s]._workInProgressVersionPrimary=null;Cp.length=0}var dd=j.ReactCurrentDispatcher,Ep=j.ReactCurrentBatchConfig,Ls=0,it=null,Ct=null,Nt=null,fd=!1,$l=!1,zl=0,SS=0;function Vt(){throw Error(n(321))}function Ap(s,a){if(a===null)return!1;for(var u=0;u<a.length&&u<s.length;u++)if(!pr(s[u],a[u]))return!1;return!0}function Sp(s,a,u,y,x,k){if(Ls=k,it=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,dd.current=s===null||s.memoizedState===null?PS:BS,s=u(y,x),$l){k=0;do{if($l=!1,zl=0,25<=k)throw Error(n(301));k+=1,Nt=Ct=null,a.updateQueue=null,dd.current=TS,s=u(y,x)}while($l)}if(dd.current=md,a=Ct!==null&&Ct.next!==null,Ls=0,Nt=Ct=it=null,fd=!1,a)throw Error(n(300));return s}function jp(){var s=zl!==0;return zl=0,s}function _r(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?it.memoizedState=Nt=s:Nt=Nt.next=s,Nt}function Jn(){if(Ct===null){var s=it.alternate;s=s!==null?s.memoizedState:null}else s=Ct.next;var a=Nt===null?it.memoizedState:Nt.next;if(a!==null)Nt=a,Ct=s;else{if(s===null)throw Error(n(310));Ct=s,s={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Nt===null?it.memoizedState=Nt=s:Nt=Nt.next=s}return Nt}function Wl(s,a){return typeof a=="function"?a(s):a}function Ip(s){var a=Jn(),u=a.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=s;var y=Ct,x=y.baseQueue,k=u.pending;if(k!==null){if(x!==null){var T=x.next;x.next=k.next,k.next=T}y.baseQueue=x=k,u.pending=null}if(x!==null){k=x.next,y=y.baseState;var D=T=null,q=null,ne=k;do{var le=ne.lane;if((Ls&le)===le)q!==null&&(q=q.next={lane:0,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),y=ne.hasEagerState?ne.eagerState:s(y,ne.action);else{var ce={lane:le,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null};q===null?(D=q=ce,T=y):q=q.next=ce,it.lanes|=le,Ds|=le}ne=ne.next}while(ne!==null&&ne!==k);q===null?T=y:q.next=D,pr(y,a.memoizedState)||(wn=!0),a.memoizedState=y,a.baseState=T,a.baseQueue=q,u.lastRenderedState=y}if(s=u.interleaved,s!==null){x=s;do k=x.lane,it.lanes|=k,Ds|=k,x=x.next;while(x!==s)}else x===null&&(u.lanes=0);return[a.memoizedState,u.dispatch]}function Np(s){var a=Jn(),u=a.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=s;var y=u.dispatch,x=u.pending,k=a.memoizedState;if(x!==null){u.pending=null;var T=x=x.next;do k=s(k,T.action),T=T.next;while(T!==x);pr(k,a.memoizedState)||(wn=!0),a.memoizedState=k,a.baseQueue===null&&(a.baseState=k),u.lastRenderedState=k}return[k,y]}function Aw(){}function Sw(s,a){var u=it,y=Jn(),x=a(),k=!pr(y.memoizedState,x);if(k&&(y.memoizedState=x,wn=!0),y=y.queue,Pp(Nw.bind(null,u,y,s),[s]),y.getSnapshot!==a||k||Nt!==null&&Nt.memoizedState.tag&1){if(u.flags|=2048,ql(9,Iw.bind(null,u,y,x,a),void 0,null),Pt===null)throw Error(n(349));(Ls&30)!==0||jw(u,a,x)}return x}function jw(s,a,u){s.flags|=16384,s={getSnapshot:a,value:u},a=it.updateQueue,a===null?(a={lastEffect:null,stores:null},it.updateQueue=a,a.stores=[s]):(u=a.stores,u===null?a.stores=[s]:u.push(s))}function Iw(s,a,u,y){a.value=u,a.getSnapshot=y,Pw(a)&&Bw(s)}function Nw(s,a,u){return u(function(){Pw(a)&&Bw(s)})}function Pw(s){var a=s.getSnapshot;s=s.value;try{var u=a();return!pr(s,u)}catch{return!0}}function Bw(s){var a=no(s,1);a!==null&&wr(a,s,1,-1)}function Tw(s){var a=_r();return typeof s=="function"&&(s=s()),a.memoizedState=a.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wl,lastRenderedState:s},a.queue=s,s=s.dispatch=NS.bind(null,it,s),[a.memoizedState,s]}function ql(s,a,u,y){return s={tag:s,create:a,destroy:u,deps:y,next:null},a=it.updateQueue,a===null?(a={lastEffect:null,stores:null},it.updateQueue=a,a.lastEffect=s.next=s):(u=a.lastEffect,u===null?a.lastEffect=s.next=s:(y=u.next,u.next=s,s.next=y,a.lastEffect=s)),s}function _w(){return Jn().memoizedState}function hd(s,a,u,y){var x=_r();it.flags|=s,x.memoizedState=ql(1|a,u,void 0,y===void 0?null:y)}function pd(s,a,u,y){var x=Jn();y=y===void 0?null:y;var k=void 0;if(Ct!==null){var T=Ct.memoizedState;if(k=T.destroy,y!==null&&Ap(y,T.deps)){x.memoizedState=ql(a,u,k,y);return}}it.flags|=s,x.memoizedState=ql(1|a,u,k,y)}function Rw(s,a){return hd(8390656,8,s,a)}function Pp(s,a){return pd(2048,8,s,a)}function Mw(s,a){return pd(4,2,s,a)}function Ow(s,a){return pd(4,4,s,a)}function Fw(s,a){if(typeof a=="function")return s=s(),a(s),function(){a(null)};if(a!=null)return s=s(),a.current=s,function(){a.current=null}}function Lw(s,a,u){return u=u!=null?u.concat([s]):null,pd(4,4,Fw.bind(null,a,s),u)}function Bp(){}function Dw(s,a){var u=Jn();a=a===void 0?null:a;var y=u.memoizedState;return y!==null&&a!==null&&Ap(a,y[1])?y[0]:(u.memoizedState=[s,a],s)}function Uw(s,a){var u=Jn();a=a===void 0?null:a;var y=u.memoizedState;return y!==null&&a!==null&&Ap(a,y[1])?y[0]:(s=s(),u.memoizedState=[s,a],s)}function $w(s,a,u){return(Ls&21)===0?(s.baseState&&(s.baseState=!1,wn=!0),s.memoizedState=u):(pr(u,a)||(u=yv(),it.lanes|=u,Ds|=u,s.baseState=!0),a)}function jS(s,a){var u=Ke;Ke=u!==0&&4>u?u:4,s(!0);var y=Ep.transition;Ep.transition={};try{s(!1),a()}finally{Ke=u,Ep.transition=y}}function zw(){return Jn().memoizedState}function IS(s,a,u){var y=Go(s);if(u={lane:y,action:u,hasEagerState:!1,eagerState:null,next:null},Ww(s))qw(a,u);else if(u=bw(s,a,u,y),u!==null){var x=an();wr(u,s,y,x),Hw(u,a,y)}}function NS(s,a,u){var y=Go(s),x={lane:y,action:u,hasEagerState:!1,eagerState:null,next:null};if(Ww(s))qw(a,x);else{var k=s.alternate;if(s.lanes===0&&(k===null||k.lanes===0)&&(k=a.lastRenderedReducer,k!==null))try{var T=a.lastRenderedState,D=k(T,u);if(x.hasEagerState=!0,x.eagerState=D,pr(D,T)){var q=a.interleaved;q===null?(x.next=x,vp(a)):(x.next=q.next,q.next=x),a.interleaved=x;return}}catch{}finally{}u=bw(s,a,x,y),u!==null&&(x=an(),wr(u,s,y,x),Hw(u,a,y))}}function Ww(s){var a=s.alternate;return s===it||a!==null&&a===it}function qw(s,a){$l=fd=!0;var u=s.pending;u===null?a.next=a:(a.next=u.next,u.next=a),s.pending=a}function Hw(s,a,u){if((u&4194240)!==0){var y=a.lanes;y&=s.pendingLanes,u|=y,a.lanes=u,_h(s,u)}}var md={readContext:Yn,useCallback:Vt,useContext:Vt,useEffect:Vt,useImperativeHandle:Vt,useInsertionEffect:Vt,useLayoutEffect:Vt,useMemo:Vt,useReducer:Vt,useRef:Vt,useState:Vt,useDebugValue:Vt,useDeferredValue:Vt,useTransition:Vt,useMutableSource:Vt,useSyncExternalStore:Vt,useId:Vt,unstable_isNewReconciler:!1},PS={readContext:Yn,useCallback:function(s,a){return _r().memoizedState=[s,a===void 0?null:a],s},useContext:Yn,useEffect:Rw,useImperativeHandle:function(s,a,u){return u=u!=null?u.concat([s]):null,hd(4194308,4,Fw.bind(null,a,s),u)},useLayoutEffect:function(s,a){return hd(4194308,4,s,a)},useInsertionEffect:function(s,a){return hd(4,2,s,a)},useMemo:function(s,a){var u=_r();return a=a===void 0?null:a,s=s(),u.memoizedState=[s,a],s},useReducer:function(s,a,u){var y=_r();return a=u!==void 0?u(a):a,y.memoizedState=y.baseState=a,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:a},y.queue=s,s=s.dispatch=IS.bind(null,it,s),[y.memoizedState,s]},useRef:function(s){var a=_r();return s={current:s},a.memoizedState=s},useState:Tw,useDebugValue:Bp,useDeferredValue:function(s){return _r().memoizedState=s},useTransition:function(){var s=Tw(!1),a=s[0];return s=jS.bind(null,s[1]),_r().memoizedState=s,[a,s]},useMutableSource:function(){},useSyncExternalStore:function(s,a,u){var y=it,x=_r();if(ot){if(u===void 0)throw Error(n(407));u=u()}else{if(u=a(),Pt===null)throw Error(n(349));(Ls&30)!==0||jw(y,a,u)}x.memoizedState=u;var k={value:u,getSnapshot:a};return x.queue=k,Rw(Nw.bind(null,y,k,s),[s]),y.flags|=2048,ql(9,Iw.bind(null,y,k,u,a),void 0,null),u},useId:function(){var s=_r(),a=Pt.identifierPrefix;if(ot){var u=to,y=eo;u=(y&~(1<<32-hr(y)-1)).toString(32)+u,a=":"+a+"R"+u,u=zl++,0<u&&(a+="H"+u.toString(32)),a+=":"}else u=SS++,a=":"+a+"r"+u.toString(32)+":";return s.memoizedState=a},unstable_isNewReconciler:!1},BS={readContext:Yn,useCallback:Dw,useContext:Yn,useEffect:Pp,useImperativeHandle:Lw,useInsertionEffect:Mw,useLayoutEffect:Ow,useMemo:Uw,useReducer:Ip,useRef:_w,useState:function(){return Ip(Wl)},useDebugValue:Bp,useDeferredValue:function(s){var a=Jn();return $w(a,Ct.memoizedState,s)},useTransition:function(){var s=Ip(Wl)[0],a=Jn().memoizedState;return[s,a]},useMutableSource:Aw,useSyncExternalStore:Sw,useId:zw,unstable_isNewReconciler:!1},TS={readContext:Yn,useCallback:Dw,useContext:Yn,useEffect:Pp,useImperativeHandle:Lw,useInsertionEffect:Mw,useLayoutEffect:Ow,useMemo:Uw,useReducer:Np,useRef:_w,useState:function(){return Np(Wl)},useDebugValue:Bp,useDeferredValue:function(s){var a=Jn();return Ct===null?a.memoizedState=s:$w(a,Ct.memoizedState,s)},useTransition:function(){var s=Np(Wl)[0],a=Jn().memoizedState;return[s,a]},useMutableSource:Aw,useSyncExternalStore:Sw,useId:zw,unstable_isNewReconciler:!1};function gr(s,a){if(s&&s.defaultProps){a=Y({},a),s=s.defaultProps;for(var u in s)a[u]===void 0&&(a[u]=s[u]);return a}return a}function Tp(s,a,u,y){a=s.memoizedState,u=u(y,a),u=u==null?a:Y({},a,u),s.memoizedState=u,s.lanes===0&&(s.updateQueue.baseState=u)}var gd={isMounted:function(s){return(s=s._reactInternals)?Bs(s)===s:!1},enqueueSetState:function(s,a,u){s=s._reactInternals;var y=an(),x=Go(s),k=ro(y,x);k.payload=a,u!=null&&(k.callback=u),a=qo(s,k,x),a!==null&&(wr(a,s,x,y),ld(a,s,x))},enqueueReplaceState:function(s,a,u){s=s._reactInternals;var y=an(),x=Go(s),k=ro(y,x);k.tag=1,k.payload=a,u!=null&&(k.callback=u),a=qo(s,k,x),a!==null&&(wr(a,s,x,y),ld(a,s,x))},enqueueForceUpdate:function(s,a){s=s._reactInternals;var u=an(),y=Go(s),x=ro(u,y);x.tag=2,a!=null&&(x.callback=a),a=qo(s,x,y),a!==null&&(wr(a,s,y,u),ld(a,s,y))}};function Vw(s,a,u,y,x,k,T){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,k,T):a.prototype&&a.prototype.isPureReactComponent?!Pl(u,y)||!Pl(x,k):!0}function Qw(s,a,u){var y=!1,x=$o,k=a.contextType;return typeof k=="object"&&k!==null?k=Yn(k):(x=vn(a)?_s:Ht.current,y=a.contextTypes,k=(y=y!=null)?zi(s,x):$o),a=new a(u,k),s.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=gd,s.stateNode=a,a._reactInternals=s,y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=x,s.__reactInternalMemoizedMaskedChildContext=k),a}function Gw(s,a,u,y){s=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,y),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,y),a.state!==s&&gd.enqueueReplaceState(a,a.state,null)}function _p(s,a,u,y){var x=s.stateNode;x.props=u,x.state=s.memoizedState,x.refs={},wp(s);var k=a.contextType;typeof k=="object"&&k!==null?x.context=Yn(k):(k=vn(a)?_s:Ht.current,x.context=zi(s,k)),x.state=s.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(Tp(s,a,k,u),x.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(a=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),a!==x.state&&gd.enqueueReplaceState(x,x.state,null),cd(s,u,x,y),x.state=s.memoizedState),typeof x.componentDidMount=="function"&&(s.flags|=4194308)}function Yi(s,a){try{var u="",y=a;do u+=ie(y),y=y.return;while(y);var x=u}catch(k){x=`
40
+ Error generating stack: `+k.message+`
41
+ `+k.stack}return{value:s,source:a,stack:x,digest:null}}function Rp(s,a,u){return{value:s,source:null,stack:u??null,digest:a??null}}function Mp(s,a){try{console.error(a.value)}catch(u){setTimeout(function(){throw u})}}var _S=typeof WeakMap=="function"?WeakMap:Map;function Kw(s,a,u){u=ro(-1,u),u.tag=3,u.payload={element:null};var y=a.value;return u.callback=function(){kd||(kd=!0,Yp=y),Mp(s,a)},u}function Yw(s,a,u){u=ro(-1,u),u.tag=3;var y=s.type.getDerivedStateFromError;if(typeof y=="function"){var x=a.value;u.payload=function(){return y(x)},u.callback=function(){Mp(s,a)}}var k=s.stateNode;return k!==null&&typeof k.componentDidCatch=="function"&&(u.callback=function(){Mp(s,a),typeof y!="function"&&(Vo===null?Vo=new Set([this]):Vo.add(this));var T=a.stack;this.componentDidCatch(a.value,{componentStack:T!==null?T:""})}),u}function Jw(s,a,u){var y=s.pingCache;if(y===null){y=s.pingCache=new _S;var x=new Set;y.set(a,x)}else x=y.get(a),x===void 0&&(x=new Set,y.set(a,x));x.has(u)||(x.add(u),s=QS.bind(null,s,a,u),a.then(s,s))}function Zw(s){do{var a;if((a=s.tag===13)&&(a=s.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return s;s=s.return}while(s!==null);return null}function Xw(s,a,u,y,x){return(s.mode&1)===0?(s===a?s.flags|=65536:(s.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(a=ro(-1,1),a.tag=2,qo(u,a,1))),u.lanes|=1),s):(s.flags|=65536,s.lanes=x,s)}var RS=j.ReactCurrentOwner,wn=!1;function sn(s,a,u,y){a.child=s===null?ww(a,null,u,y):Vi(a,s.child,u,y)}function eb(s,a,u,y,x){u=u.render;var k=a.ref;return Gi(a,x),y=Sp(s,a,u,y,k,x),u=jp(),s!==null&&!wn?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~x,oo(s,a,x)):(ot&&u&&cp(a),a.flags|=1,sn(s,a,y,x),a.child)}function tb(s,a,u,y,x){if(s===null){var k=u.type;return typeof k=="function"&&!r0(k)&&k.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(a.tag=15,a.type=k,nb(s,a,k,y,x)):(s=Nd(u.type,null,y,a,a.mode,x),s.ref=a.ref,s.return=a,a.child=s)}if(k=s.child,(s.lanes&x)===0){var T=k.memoizedProps;if(u=u.compare,u=u!==null?u:Pl,u(T,y)&&s.ref===a.ref)return oo(s,a,x)}return a.flags|=1,s=Yo(k,y),s.ref=a.ref,s.return=a,a.child=s}function nb(s,a,u,y,x){if(s!==null){var k=s.memoizedProps;if(Pl(k,y)&&s.ref===a.ref)if(wn=!1,a.pendingProps=y=k,(s.lanes&x)!==0)(s.flags&131072)!==0&&(wn=!0);else return a.lanes=s.lanes,oo(s,a,x)}return Op(s,a,u,y,x)}function rb(s,a,u){var y=a.pendingProps,x=y.children,k=s!==null?s.memoizedState:null;if(y.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ze(Zi,Dn),Dn|=u;else{if((u&1073741824)===0)return s=k!==null?k.baseLanes|u:u,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:s,cachePool:null,transitions:null},a.updateQueue=null,Ze(Zi,Dn),Dn|=s,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=k!==null?k.baseLanes:u,Ze(Zi,Dn),Dn|=y}else k!==null?(y=k.baseLanes|u,a.memoizedState=null):y=u,Ze(Zi,Dn),Dn|=y;return sn(s,a,x,u),a.child}function ob(s,a){var u=a.ref;(s===null&&u!==null||s!==null&&s.ref!==u)&&(a.flags|=512,a.flags|=2097152)}function Op(s,a,u,y,x){var k=vn(u)?_s:Ht.current;return k=zi(a,k),Gi(a,x),u=Sp(s,a,u,y,k,x),y=jp(),s!==null&&!wn?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~x,oo(s,a,x)):(ot&&y&&cp(a),a.flags|=1,sn(s,a,u,x),a.child)}function sb(s,a,u,y,x){if(vn(u)){var k=!0;ed(a)}else k=!1;if(Gi(a,x),a.stateNode===null)vd(s,a),Qw(a,u,y),_p(a,u,y,x),y=!0;else if(s===null){var T=a.stateNode,D=a.memoizedProps;T.props=D;var q=T.context,ne=u.contextType;typeof ne=="object"&&ne!==null?ne=Yn(ne):(ne=vn(u)?_s:Ht.current,ne=zi(a,ne));var le=u.getDerivedStateFromProps,ce=typeof le=="function"||typeof T.getSnapshotBeforeUpdate=="function";ce||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(D!==y||q!==ne)&&Gw(a,T,y,ne),Wo=!1;var ae=a.memoizedState;T.state=ae,cd(a,y,T,x),q=a.memoizedState,D!==y||ae!==q||yn.current||Wo?(typeof le=="function"&&(Tp(a,u,le,y),q=a.memoizedState),(D=Wo||Vw(a,u,D,y,ae,q,ne))?(ce||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(a.flags|=4194308)):(typeof T.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=y,a.memoizedState=q),T.props=y,T.state=q,T.context=ne,y=D):(typeof T.componentDidMount=="function"&&(a.flags|=4194308),y=!1)}else{T=a.stateNode,xw(s,a),D=a.memoizedProps,ne=a.type===a.elementType?D:gr(a.type,D),T.props=ne,ce=a.pendingProps,ae=T.context,q=u.contextType,typeof q=="object"&&q!==null?q=Yn(q):(q=vn(u)?_s:Ht.current,q=zi(a,q));var me=u.getDerivedStateFromProps;(le=typeof me=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(D!==ce||ae!==q)&&Gw(a,T,y,q),Wo=!1,ae=a.memoizedState,T.state=ae,cd(a,y,T,x);var Ce=a.memoizedState;D!==ce||ae!==Ce||yn.current||Wo?(typeof me=="function"&&(Tp(a,u,me,y),Ce=a.memoizedState),(ne=Wo||Vw(a,u,ne,y,ae,Ce,q)||!1)?(le||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(y,Ce,q),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(y,Ce,q)),typeof T.componentDidUpdate=="function"&&(a.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof T.componentDidUpdate!="function"||D===s.memoizedProps&&ae===s.memoizedState||(a.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||D===s.memoizedProps&&ae===s.memoizedState||(a.flags|=1024),a.memoizedProps=y,a.memoizedState=Ce),T.props=y,T.state=Ce,T.context=q,y=ne):(typeof T.componentDidUpdate!="function"||D===s.memoizedProps&&ae===s.memoizedState||(a.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||D===s.memoizedProps&&ae===s.memoizedState||(a.flags|=1024),y=!1)}return Fp(s,a,u,y,k,x)}function Fp(s,a,u,y,x,k){ob(s,a);var T=(a.flags&128)!==0;if(!y&&!T)return x&&uw(a,u,!1),oo(s,a,k);y=a.stateNode,RS.current=a;var D=T&&typeof u.getDerivedStateFromError!="function"?null:y.render();return a.flags|=1,s!==null&&T?(a.child=Vi(a,s.child,null,k),a.child=Vi(a,null,D,k)):sn(s,a,D,k),a.memoizedState=y.state,x&&uw(a,u,!0),a.child}function ib(s){var a=s.stateNode;a.pendingContext?lw(s,a.pendingContext,a.pendingContext!==a.context):a.context&&lw(s,a.context,!1),bp(s,a.containerInfo)}function ab(s,a,u,y,x){return Hi(),hp(x),a.flags|=256,sn(s,a,u,y),a.child}var Lp={dehydrated:null,treeContext:null,retryLane:0};function Dp(s){return{baseLanes:s,cachePool:null,transitions:null}}function lb(s,a,u){var y=a.pendingProps,x=st.current,k=!1,T=(a.flags&128)!==0,D;if((D=T)||(D=s!==null&&s.memoizedState===null?!1:(x&2)!==0),D?(k=!0,a.flags&=-129):(s===null||s.memoizedState!==null)&&(x|=1),Ze(st,x&1),s===null)return fp(a),s=a.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((a.mode&1)===0?a.lanes=1:s.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(T=y.children,s=y.fallback,k?(y=a.mode,k=a.child,T={mode:"hidden",children:T},(y&1)===0&&k!==null?(k.childLanes=0,k.pendingProps=T):k=Pd(T,y,0,null),s=Ws(s,y,u,null),k.return=a,s.return=a,k.sibling=s,a.child=k,a.child.memoizedState=Dp(u),a.memoizedState=Lp,s):Up(a,T));if(x=s.memoizedState,x!==null&&(D=x.dehydrated,D!==null))return MS(s,a,T,y,D,x,u);if(k){k=y.fallback,T=a.mode,x=s.child,D=x.sibling;var q={mode:"hidden",children:y.children};return(T&1)===0&&a.child!==x?(y=a.child,y.childLanes=0,y.pendingProps=q,a.deletions=null):(y=Yo(x,q),y.subtreeFlags=x.subtreeFlags&14680064),D!==null?k=Yo(D,k):(k=Ws(k,T,u,null),k.flags|=2),k.return=a,y.return=a,y.sibling=k,a.child=y,y=k,k=a.child,T=s.child.memoizedState,T=T===null?Dp(u):{baseLanes:T.baseLanes|u,cachePool:null,transitions:T.transitions},k.memoizedState=T,k.childLanes=s.childLanes&~u,a.memoizedState=Lp,y}return k=s.child,s=k.sibling,y=Yo(k,{mode:"visible",children:y.children}),(a.mode&1)===0&&(y.lanes=u),y.return=a,y.sibling=null,s!==null&&(u=a.deletions,u===null?(a.deletions=[s],a.flags|=16):u.push(s)),a.child=y,a.memoizedState=null,y}function Up(s,a){return a=Pd({mode:"visible",children:a},s.mode,0,null),a.return=s,s.child=a}function yd(s,a,u,y){return y!==null&&hp(y),Vi(a,s.child,null,u),s=Up(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function MS(s,a,u,y,x,k,T){if(u)return a.flags&256?(a.flags&=-257,y=Rp(Error(n(422))),yd(s,a,T,y)):a.memoizedState!==null?(a.child=s.child,a.flags|=128,null):(k=y.fallback,x=a.mode,y=Pd({mode:"visible",children:y.children},x,0,null),k=Ws(k,x,T,null),k.flags|=2,y.return=a,k.return=a,y.sibling=k,a.child=y,(a.mode&1)!==0&&Vi(a,s.child,null,T),a.child.memoizedState=Dp(T),a.memoizedState=Lp,k);if((a.mode&1)===0)return yd(s,a,T,null);if(x.data==="$!"){if(y=x.nextSibling&&x.nextSibling.dataset,y)var D=y.dgst;return y=D,k=Error(n(419)),y=Rp(k,y,void 0),yd(s,a,T,y)}if(D=(T&s.childLanes)!==0,wn||D){if(y=Pt,y!==null){switch(T&-T){case 4:x=2;break;case 16:x=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(y.suspendedLanes|T))!==0?0:x,x!==0&&x!==k.retryLane&&(k.retryLane=x,no(s,x),wr(y,s,x,-1))}return n0(),y=Rp(Error(n(421))),yd(s,a,T,y)}return x.data==="$?"?(a.flags|=128,a.child=s.child,a=GS.bind(null,s),x._reactRetry=a,null):(s=k.treeContext,Ln=Do(x.nextSibling),Fn=a,ot=!0,mr=null,s!==null&&(Gn[Kn++]=eo,Gn[Kn++]=to,Gn[Kn++]=Rs,eo=s.id,to=s.overflow,Rs=a),a=Up(a,y.children),a.flags|=4096,a)}function cb(s,a,u){s.lanes|=a;var y=s.alternate;y!==null&&(y.lanes|=a),yp(s.return,a,u)}function $p(s,a,u,y,x){var k=s.memoizedState;k===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:y,tail:u,tailMode:x}:(k.isBackwards=a,k.rendering=null,k.renderingStartTime=0,k.last=y,k.tail=u,k.tailMode=x)}function ub(s,a,u){var y=a.pendingProps,x=y.revealOrder,k=y.tail;if(sn(s,a,y.children,u),y=st.current,(y&2)!==0)y=y&1|2,a.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&cb(s,u,a);else if(s.tag===19)cb(s,u,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}y&=1}if(Ze(st,y),(a.mode&1)===0)a.memoizedState=null;else switch(x){case"forwards":for(u=a.child,x=null;u!==null;)s=u.alternate,s!==null&&ud(s)===null&&(x=u),u=u.sibling;u=x,u===null?(x=a.child,a.child=null):(x=u.sibling,u.sibling=null),$p(a,!1,x,u,k);break;case"backwards":for(u=null,x=a.child,a.child=null;x!==null;){if(s=x.alternate,s!==null&&ud(s)===null){a.child=x;break}s=x.sibling,x.sibling=u,u=x,x=s}$p(a,!0,u,null,k);break;case"together":$p(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function vd(s,a){(a.mode&1)===0&&s!==null&&(s.alternate=null,a.alternate=null,a.flags|=2)}function oo(s,a,u){if(s!==null&&(a.dependencies=s.dependencies),Ds|=a.lanes,(u&a.childLanes)===0)return null;if(s!==null&&a.child!==s.child)throw Error(n(153));if(a.child!==null){for(s=a.child,u=Yo(s,s.pendingProps),a.child=u,u.return=a;s.sibling!==null;)s=s.sibling,u=u.sibling=Yo(s,s.pendingProps),u.return=a;u.sibling=null}return a.child}function OS(s,a,u){switch(a.tag){case 3:ib(a),Hi();break;case 5:Ew(a);break;case 1:vn(a.type)&&ed(a);break;case 4:bp(a,a.stateNode.containerInfo);break;case 10:var y=a.type._context,x=a.memoizedProps.value;Ze(id,y._currentValue),y._currentValue=x;break;case 13:if(y=a.memoizedState,y!==null)return y.dehydrated!==null?(Ze(st,st.current&1),a.flags|=128,null):(u&a.child.childLanes)!==0?lb(s,a,u):(Ze(st,st.current&1),s=oo(s,a,u),s!==null?s.sibling:null);Ze(st,st.current&1);break;case 19:if(y=(u&a.childLanes)!==0,(s.flags&128)!==0){if(y)return ub(s,a,u);a.flags|=128}if(x=a.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),Ze(st,st.current),y)break;return null;case 22:case 23:return a.lanes=0,rb(s,a,u)}return oo(s,a,u)}var db,zp,fb,hb;db=function(s,a){for(var u=a.child;u!==null;){if(u.tag===5||u.tag===6)s.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},zp=function(){},fb=function(s,a,u,y){var x=s.memoizedProps;if(x!==y){s=a.stateNode,Fs(Tr.current);var k=null;switch(u){case"input":x=Wt(s,x),y=Wt(s,y),k=[];break;case"select":x=Y({},x,{value:void 0}),y=Y({},y,{value:void 0}),k=[];break;case"textarea":x=Ir(s,x),y=Ir(s,y),k=[];break;default:typeof x.onClick!="function"&&typeof y.onClick=="function"&&(s.onclick=Ju)}mn(u,y);var T;u=null;for(ne in x)if(!y.hasOwnProperty(ne)&&x.hasOwnProperty(ne)&&x[ne]!=null)if(ne==="style"){var D=x[ne];for(T in D)D.hasOwnProperty(T)&&(u||(u={}),u[T]="")}else ne!=="dangerouslySetInnerHTML"&&ne!=="children"&&ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&ne!=="autoFocus"&&(o.hasOwnProperty(ne)?k||(k=[]):(k=k||[]).push(ne,null));for(ne in y){var q=y[ne];if(D=x!=null?x[ne]:void 0,y.hasOwnProperty(ne)&&q!==D&&(q!=null||D!=null))if(ne==="style")if(D){for(T in D)!D.hasOwnProperty(T)||q&&q.hasOwnProperty(T)||(u||(u={}),u[T]="");for(T in q)q.hasOwnProperty(T)&&D[T]!==q[T]&&(u||(u={}),u[T]=q[T])}else u||(k||(k=[]),k.push(ne,u)),u=q;else ne==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,D=D?D.__html:void 0,q!=null&&D!==q&&(k=k||[]).push(ne,q)):ne==="children"?typeof q!="string"&&typeof q!="number"||(k=k||[]).push(ne,""+q):ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&(o.hasOwnProperty(ne)?(q!=null&&ne==="onScroll"&&Xe("scroll",s),k||D===q||(k=[])):(k=k||[]).push(ne,q))}u&&(k=k||[]).push("style",u);var ne=k;(a.updateQueue=ne)&&(a.flags|=4)}},hb=function(s,a,u,y){u!==y&&(a.flags|=4)};function Hl(s,a){if(!ot)switch(s.tailMode){case"hidden":a=s.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?s.tail=null:u.sibling=null;break;case"collapsed":u=s.tail;for(var y=null;u!==null;)u.alternate!==null&&(y=u),u=u.sibling;y===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function Qt(s){var a=s.alternate!==null&&s.alternate.child===s.child,u=0,y=0;if(a)for(var x=s.child;x!==null;)u|=x.lanes|x.childLanes,y|=x.subtreeFlags&14680064,y|=x.flags&14680064,x.return=s,x=x.sibling;else for(x=s.child;x!==null;)u|=x.lanes|x.childLanes,y|=x.subtreeFlags,y|=x.flags,x.return=s,x=x.sibling;return s.subtreeFlags|=y,s.childLanes=u,a}function FS(s,a,u){var y=a.pendingProps;switch(up(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(a),null;case 1:return vn(a.type)&&Xu(),Qt(a),null;case 3:return y=a.stateNode,Ki(),et(yn),et(Ht),kp(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(s===null||s.child===null)&&(od(a)?a.flags|=4:s===null||s.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,mr!==null&&(Xp(mr),mr=null))),zp(s,a),Qt(a),null;case 5:xp(a);var x=Fs(Ul.current);if(u=a.type,s!==null&&a.stateNode!=null)fb(s,a,u,y,x),s.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!y){if(a.stateNode===null)throw Error(n(166));return Qt(a),null}if(s=Fs(Tr.current),od(a)){y=a.stateNode,u=a.type;var k=a.memoizedProps;switch(y[Br]=a,y[Ml]=k,s=(a.mode&1)!==0,u){case"dialog":Xe("cancel",y),Xe("close",y);break;case"iframe":case"object":case"embed":Xe("load",y);break;case"video":case"audio":for(x=0;x<Tl.length;x++)Xe(Tl[x],y);break;case"source":Xe("error",y);break;case"img":case"image":case"link":Xe("error",y),Xe("load",y);break;case"details":Xe("toggle",y);break;case"input":rn(y,k),Xe("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!k.multiple},Xe("invalid",y);break;case"textarea":Bo(y,k),Xe("invalid",y)}mn(u,k),x=null;for(var T in k)if(k.hasOwnProperty(T)){var D=k[T];T==="children"?typeof D=="string"?y.textContent!==D&&(k.suppressHydrationWarning!==!0&&Yu(y.textContent,D,s),x=["children",D]):typeof D=="number"&&y.textContent!==""+D&&(k.suppressHydrationWarning!==!0&&Yu(y.textContent,D,s),x=["children",""+D]):o.hasOwnProperty(T)&&D!=null&&T==="onScroll"&&Xe("scroll",y)}switch(u){case"input":pt(y),Mt(y,k,!0);break;case"textarea":pt(y),Nu(y);break;case"select":case"option":break;default:typeof k.onClick=="function"&&(y.onclick=Ju)}y=x,a.updateQueue=y,y!==null&&(a.flags|=4)}else{T=x.nodeType===9?x:x.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=pl(u)),s==="http://www.w3.org/1999/xhtml"?u==="script"?(s=T.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof y.is=="string"?s=T.createElement(u,{is:y.is}):(s=T.createElement(u),u==="select"&&(T=s,y.multiple?T.multiple=!0:y.size&&(T.size=y.size))):s=T.createElementNS(s,u),s[Br]=a,s[Ml]=y,db(s,a,!1,!1),a.stateNode=s;e:{switch(T=ze(u,y),u){case"dialog":Xe("cancel",s),Xe("close",s),x=y;break;case"iframe":case"object":case"embed":Xe("load",s),x=y;break;case"video":case"audio":for(x=0;x<Tl.length;x++)Xe(Tl[x],s);x=y;break;case"source":Xe("error",s),x=y;break;case"img":case"image":case"link":Xe("error",s),Xe("load",s),x=y;break;case"details":Xe("toggle",s),x=y;break;case"input":rn(s,y),x=Wt(s,y),Xe("invalid",s);break;case"option":x=y;break;case"select":s._wrapperState={wasMultiple:!!y.multiple},x=Y({},y,{value:void 0}),Xe("invalid",s);break;case"textarea":Bo(s,y),x=Ir(s,y),Xe("invalid",s);break;default:x=y}mn(u,x),D=x;for(k in D)if(D.hasOwnProperty(k)){var q=D[k];k==="style"?Ge(s,q):k==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,q!=null&&Yr(s,q)):k==="children"?typeof q=="string"?(u!=="textarea"||q!=="")&&Nr(s,q):typeof q=="number"&&Nr(s,""+q):k!=="suppressContentEditableWarning"&&k!=="suppressHydrationWarning"&&k!=="autoFocus"&&(o.hasOwnProperty(k)?q!=null&&k==="onScroll"&&Xe("scroll",s):q!=null&&A(s,k,q,T))}switch(u){case"input":pt(s),Mt(s,y,!1);break;case"textarea":pt(s),Nu(s);break;case"option":y.value!=null&&s.setAttribute("value",""+Se(y.value));break;case"select":s.multiple=!!y.multiple,k=y.value,k!=null?Je(s,!!y.multiple,k,!1):y.defaultValue!=null&&Je(s,!!y.multiple,y.defaultValue,!0);break;default:typeof x.onClick=="function"&&(s.onclick=Ju)}switch(u){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}}y&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return Qt(a),null;case 6:if(s&&a.stateNode!=null)hb(s,a,s.memoizedProps,y);else{if(typeof y!="string"&&a.stateNode===null)throw Error(n(166));if(u=Fs(Ul.current),Fs(Tr.current),od(a)){if(y=a.stateNode,u=a.memoizedProps,y[Br]=a,(k=y.nodeValue!==u)&&(s=Fn,s!==null))switch(s.tag){case 3:Yu(y.nodeValue,u,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Yu(y.nodeValue,u,(s.mode&1)!==0)}k&&(a.flags|=4)}else y=(u.nodeType===9?u:u.ownerDocument).createTextNode(y),y[Br]=a,a.stateNode=y}return Qt(a),null;case 13:if(et(st),y=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(ot&&Ln!==null&&(a.mode&1)!==0&&(a.flags&128)===0)gw(),Hi(),a.flags|=98560,k=!1;else if(k=od(a),y!==null&&y.dehydrated!==null){if(s===null){if(!k)throw Error(n(318));if(k=a.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(n(317));k[Br]=a}else Hi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Qt(a),k=!1}else mr!==null&&(Xp(mr),mr=null),k=!0;if(!k)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=u,a):(y=y!==null,y!==(s!==null&&s.memoizedState!==null)&&y&&(a.child.flags|=8192,(a.mode&1)!==0&&(s===null||(st.current&1)!==0?kt===0&&(kt=3):n0())),a.updateQueue!==null&&(a.flags|=4),Qt(a),null);case 4:return Ki(),zp(s,a),s===null&&_l(a.stateNode.containerInfo),Qt(a),null;case 10:return gp(a.type._context),Qt(a),null;case 17:return vn(a.type)&&Xu(),Qt(a),null;case 19:if(et(st),k=a.memoizedState,k===null)return Qt(a),null;if(y=(a.flags&128)!==0,T=k.rendering,T===null)if(y)Hl(k,!1);else{if(kt!==0||s!==null&&(s.flags&128)!==0)for(s=a.child;s!==null;){if(T=ud(s),T!==null){for(a.flags|=128,Hl(k,!1),y=T.updateQueue,y!==null&&(a.updateQueue=y,a.flags|=4),a.subtreeFlags=0,y=u,u=a.child;u!==null;)k=u,s=y,k.flags&=14680066,T=k.alternate,T===null?(k.childLanes=0,k.lanes=s,k.child=null,k.subtreeFlags=0,k.memoizedProps=null,k.memoizedState=null,k.updateQueue=null,k.dependencies=null,k.stateNode=null):(k.childLanes=T.childLanes,k.lanes=T.lanes,k.child=T.child,k.subtreeFlags=0,k.deletions=null,k.memoizedProps=T.memoizedProps,k.memoizedState=T.memoizedState,k.updateQueue=T.updateQueue,k.type=T.type,s=T.dependencies,k.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),u=u.sibling;return Ze(st,st.current&1|2),a.child}s=s.sibling}k.tail!==null&&dt()>Xi&&(a.flags|=128,y=!0,Hl(k,!1),a.lanes=4194304)}else{if(!y)if(s=ud(T),s!==null){if(a.flags|=128,y=!0,u=s.updateQueue,u!==null&&(a.updateQueue=u,a.flags|=4),Hl(k,!0),k.tail===null&&k.tailMode==="hidden"&&!T.alternate&&!ot)return Qt(a),null}else 2*dt()-k.renderingStartTime>Xi&&u!==1073741824&&(a.flags|=128,y=!0,Hl(k,!1),a.lanes=4194304);k.isBackwards?(T.sibling=a.child,a.child=T):(u=k.last,u!==null?u.sibling=T:a.child=T,k.last=T)}return k.tail!==null?(a=k.tail,k.rendering=a,k.tail=a.sibling,k.renderingStartTime=dt(),a.sibling=null,u=st.current,Ze(st,y?u&1|2:u&1),a):(Qt(a),null);case 22:case 23:return t0(),y=a.memoizedState!==null,s!==null&&s.memoizedState!==null!==y&&(a.flags|=8192),y&&(a.mode&1)!==0?(Dn&1073741824)!==0&&(Qt(a),a.subtreeFlags&6&&(a.flags|=8192)):Qt(a),null;case 24:return null;case 25:return null}throw Error(n(156,a.tag))}function LS(s,a){switch(up(a),a.tag){case 1:return vn(a.type)&&Xu(),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return Ki(),et(yn),et(Ht),kp(),s=a.flags,(s&65536)!==0&&(s&128)===0?(a.flags=s&-65537|128,a):null;case 5:return xp(a),null;case 13:if(et(st),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(n(340));Hi()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return et(st),null;case 4:return Ki(),null;case 10:return gp(a.type._context),null;case 22:case 23:return t0(),null;case 24:return null;default:return null}}var wd=!1,Gt=!1,DS=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ji(s,a){var u=s.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(y){lt(s,a,y)}else u.current=null}function Wp(s,a,u){try{u()}catch(y){lt(s,a,y)}}var pb=!1;function US(s,a){if(tp=Du,s=Vv(),Qh(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{u=(u=s.ownerDocument)&&u.defaultView||window;var y=u.getSelection&&u.getSelection();if(y&&y.rangeCount!==0){u=y.anchorNode;var x=y.anchorOffset,k=y.focusNode;y=y.focusOffset;try{u.nodeType,k.nodeType}catch{u=null;break e}var T=0,D=-1,q=-1,ne=0,le=0,ce=s,ae=null;t:for(;;){for(var me;ce!==u||x!==0&&ce.nodeType!==3||(D=T+x),ce!==k||y!==0&&ce.nodeType!==3||(q=T+y),ce.nodeType===3&&(T+=ce.nodeValue.length),(me=ce.firstChild)!==null;)ae=ce,ce=me;for(;;){if(ce===s)break t;if(ae===u&&++ne===x&&(D=T),ae===k&&++le===y&&(q=T),(me=ce.nextSibling)!==null)break;ce=ae,ae=ce.parentNode}ce=me}u=D===-1||q===-1?null:{start:D,end:q}}else u=null}u=u||{start:0,end:0}}else u=null;for(np={focusedElem:s,selectionRange:u},Du=!1,xe=a;xe!==null;)if(a=xe,s=a.child,(a.subtreeFlags&1028)!==0&&s!==null)s.return=a,xe=s;else for(;xe!==null;){a=xe;try{var Ce=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Ce!==null){var ke=Ce.memoizedProps,ft=Ce.memoizedState,X=a.stateNode,G=X.getSnapshotBeforeUpdate(a.elementType===a.type?ke:gr(a.type,ke),ft);X.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var te=a.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(de){lt(a,a.return,de)}if(s=a.sibling,s!==null){s.return=a.return,xe=s;break}xe=a.return}return Ce=pb,pb=!1,Ce}function Vl(s,a,u){var y=a.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var x=y=y.next;do{if((x.tag&s)===s){var k=x.destroy;x.destroy=void 0,k!==void 0&&Wp(a,u,k)}x=x.next}while(x!==y)}}function bd(s,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var u=a=a.next;do{if((u.tag&s)===s){var y=u.create;u.destroy=y()}u=u.next}while(u!==a)}}function qp(s){var a=s.ref;if(a!==null){var u=s.stateNode;switch(s.tag){case 5:s=u;break;default:s=u}typeof a=="function"?a(s):a.current=s}}function mb(s){var a=s.alternate;a!==null&&(s.alternate=null,mb(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&(delete a[Br],delete a[Ml],delete a[ip],delete a[CS],delete a[kS])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function gb(s){return s.tag===5||s.tag===3||s.tag===4}function yb(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||gb(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Hp(s,a,u){var y=s.tag;if(y===5||y===6)s=s.stateNode,a?u.nodeType===8?u.parentNode.insertBefore(s,a):u.insertBefore(s,a):(u.nodeType===8?(a=u.parentNode,a.insertBefore(s,u)):(a=u,a.appendChild(s)),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Ju));else if(y!==4&&(s=s.child,s!==null))for(Hp(s,a,u),s=s.sibling;s!==null;)Hp(s,a,u),s=s.sibling}function Vp(s,a,u){var y=s.tag;if(y===5||y===6)s=s.stateNode,a?u.insertBefore(s,a):u.appendChild(s);else if(y!==4&&(s=s.child,s!==null))for(Vp(s,a,u),s=s.sibling;s!==null;)Vp(s,a,u),s=s.sibling}var Ft=null,yr=!1;function Ho(s,a,u){for(u=u.child;u!==null;)vb(s,a,u),u=u.sibling}function vb(s,a,u){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(_u,u)}catch{}switch(u.tag){case 5:Gt||Ji(u,a);case 6:var y=Ft,x=yr;Ft=null,Ho(s,a,u),Ft=y,yr=x,Ft!==null&&(yr?(s=Ft,u=u.stateNode,s.nodeType===8?s.parentNode.removeChild(u):s.removeChild(u)):Ft.removeChild(u.stateNode));break;case 18:Ft!==null&&(yr?(s=Ft,u=u.stateNode,s.nodeType===8?sp(s.parentNode,u):s.nodeType===1&&sp(s,u),El(s)):sp(Ft,u.stateNode));break;case 4:y=Ft,x=yr,Ft=u.stateNode.containerInfo,yr=!0,Ho(s,a,u),Ft=y,yr=x;break;case 0:case 11:case 14:case 15:if(!Gt&&(y=u.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){x=y=y.next;do{var k=x,T=k.destroy;k=k.tag,T!==void 0&&((k&2)!==0||(k&4)!==0)&&Wp(u,a,T),x=x.next}while(x!==y)}Ho(s,a,u);break;case 1:if(!Gt&&(Ji(u,a),y=u.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=u.memoizedProps,y.state=u.memoizedState,y.componentWillUnmount()}catch(D){lt(u,a,D)}Ho(s,a,u);break;case 21:Ho(s,a,u);break;case 22:u.mode&1?(Gt=(y=Gt)||u.memoizedState!==null,Ho(s,a,u),Gt=y):Ho(s,a,u);break;default:Ho(s,a,u)}}function wb(s){var a=s.updateQueue;if(a!==null){s.updateQueue=null;var u=s.stateNode;u===null&&(u=s.stateNode=new DS),a.forEach(function(y){var x=KS.bind(null,s,y);u.has(y)||(u.add(y),y.then(x,x))})}}function vr(s,a){var u=a.deletions;if(u!==null)for(var y=0;y<u.length;y++){var x=u[y];try{var k=s,T=a,D=T;e:for(;D!==null;){switch(D.tag){case 5:Ft=D.stateNode,yr=!1;break e;case 3:Ft=D.stateNode.containerInfo,yr=!0;break e;case 4:Ft=D.stateNode.containerInfo,yr=!0;break e}D=D.return}if(Ft===null)throw Error(n(160));vb(k,T,x),Ft=null,yr=!1;var q=x.alternate;q!==null&&(q.return=null),x.return=null}catch(ne){lt(x,a,ne)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)bb(a,s),a=a.sibling}function bb(s,a){var u=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(vr(a,s),Rr(s),y&4){try{Vl(3,s,s.return),bd(3,s)}catch(ke){lt(s,s.return,ke)}try{Vl(5,s,s.return)}catch(ke){lt(s,s.return,ke)}}break;case 1:vr(a,s),Rr(s),y&512&&u!==null&&Ji(u,u.return);break;case 5:if(vr(a,s),Rr(s),y&512&&u!==null&&Ji(u,u.return),s.flags&32){var x=s.stateNode;try{Nr(x,"")}catch(ke){lt(s,s.return,ke)}}if(y&4&&(x=s.stateNode,x!=null)){var k=s.memoizedProps,T=u!==null?u.memoizedProps:k,D=s.type,q=s.updateQueue;if(s.updateQueue=null,q!==null)try{D==="input"&&k.type==="radio"&&k.name!=null&&rt(x,k),ze(D,T);var ne=ze(D,k);for(T=0;T<q.length;T+=2){var le=q[T],ce=q[T+1];le==="style"?Ge(x,ce):le==="dangerouslySetInnerHTML"?Yr(x,ce):le==="children"?Nr(x,ce):A(x,le,ce,ne)}switch(D){case"input":on(x,k);break;case"textarea":To(x,k);break;case"select":var ae=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!k.multiple;var me=k.value;me!=null?Je(x,!!k.multiple,me,!1):ae!==!!k.multiple&&(k.defaultValue!=null?Je(x,!!k.multiple,k.defaultValue,!0):Je(x,!!k.multiple,k.multiple?[]:"",!1))}x[Ml]=k}catch(ke){lt(s,s.return,ke)}}break;case 6:if(vr(a,s),Rr(s),y&4){if(s.stateNode===null)throw Error(n(162));x=s.stateNode,k=s.memoizedProps;try{x.nodeValue=k}catch(ke){lt(s,s.return,ke)}}break;case 3:if(vr(a,s),Rr(s),y&4&&u!==null&&u.memoizedState.isDehydrated)try{El(a.containerInfo)}catch(ke){lt(s,s.return,ke)}break;case 4:vr(a,s),Rr(s);break;case 13:vr(a,s),Rr(s),x=s.child,x.flags&8192&&(k=x.memoizedState!==null,x.stateNode.isHidden=k,!k||x.alternate!==null&&x.alternate.memoizedState!==null||(Kp=dt())),y&4&&wb(s);break;case 22:if(le=u!==null&&u.memoizedState!==null,s.mode&1?(Gt=(ne=Gt)||le,vr(a,s),Gt=ne):vr(a,s),Rr(s),y&8192){if(ne=s.memoizedState!==null,(s.stateNode.isHidden=ne)&&!le&&(s.mode&1)!==0)for(xe=s,le=s.child;le!==null;){for(ce=xe=le;xe!==null;){switch(ae=xe,me=ae.child,ae.tag){case 0:case 11:case 14:case 15:Vl(4,ae,ae.return);break;case 1:Ji(ae,ae.return);var Ce=ae.stateNode;if(typeof Ce.componentWillUnmount=="function"){y=ae,u=ae.return;try{a=y,Ce.props=a.memoizedProps,Ce.state=a.memoizedState,Ce.componentWillUnmount()}catch(ke){lt(y,u,ke)}}break;case 5:Ji(ae,ae.return);break;case 22:if(ae.memoizedState!==null){kb(ce);continue}}me!==null?(me.return=ae,xe=me):kb(ce)}le=le.sibling}e:for(le=null,ce=s;;){if(ce.tag===5){if(le===null){le=ce;try{x=ce.stateNode,ne?(k=x.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none"):(D=ce.stateNode,q=ce.memoizedProps.style,T=q!=null&&q.hasOwnProperty("display")?q.display:null,D.style.display=_e("display",T))}catch(ke){lt(s,s.return,ke)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=ne?"":ce.memoizedProps}catch(ke){lt(s,s.return,ke)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===s)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===s)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===s)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:vr(a,s),Rr(s),y&4&&wb(s);break;case 21:break;default:vr(a,s),Rr(s)}}function Rr(s){var a=s.flags;if(a&2){try{e:{for(var u=s.return;u!==null;){if(gb(u)){var y=u;break e}u=u.return}throw Error(n(160))}switch(y.tag){case 5:var x=y.stateNode;y.flags&32&&(Nr(x,""),y.flags&=-33);var k=yb(s);Vp(s,k,x);break;case 3:case 4:var T=y.stateNode.containerInfo,D=yb(s);Hp(s,D,T);break;default:throw Error(n(161))}}catch(q){lt(s,s.return,q)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function $S(s,a,u){xe=s,xb(s)}function xb(s,a,u){for(var y=(s.mode&1)!==0;xe!==null;){var x=xe,k=x.child;if(x.tag===22&&y){var T=x.memoizedState!==null||wd;if(!T){var D=x.alternate,q=D!==null&&D.memoizedState!==null||Gt;D=wd;var ne=Gt;if(wd=T,(Gt=q)&&!ne)for(xe=x;xe!==null;)T=xe,q=T.child,T.tag===22&&T.memoizedState!==null?Eb(x):q!==null?(q.return=T,xe=q):Eb(x);for(;k!==null;)xe=k,xb(k),k=k.sibling;xe=x,wd=D,Gt=ne}Cb(s)}else(x.subtreeFlags&8772)!==0&&k!==null?(k.return=x,xe=k):Cb(s)}}function Cb(s){for(;xe!==null;){var a=xe;if((a.flags&8772)!==0){var u=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:Gt||bd(5,a);break;case 1:var y=a.stateNode;if(a.flags&4&&!Gt)if(u===null)y.componentDidMount();else{var x=a.elementType===a.type?u.memoizedProps:gr(a.type,u.memoizedProps);y.componentDidUpdate(x,u.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var k=a.updateQueue;k!==null&&kw(a,k,y);break;case 3:var T=a.updateQueue;if(T!==null){if(u=null,a.child!==null)switch(a.child.tag){case 5:u=a.child.stateNode;break;case 1:u=a.child.stateNode}kw(a,T,u)}break;case 5:var D=a.stateNode;if(u===null&&a.flags&4){u=D;var q=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":q.autoFocus&&u.focus();break;case"img":q.src&&(u.src=q.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var ne=a.alternate;if(ne!==null){var le=ne.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&El(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Gt||a.flags&512&&qp(a)}catch(ae){lt(a,a.return,ae)}}if(a===s){xe=null;break}if(u=a.sibling,u!==null){u.return=a.return,xe=u;break}xe=a.return}}function kb(s){for(;xe!==null;){var a=xe;if(a===s){xe=null;break}var u=a.sibling;if(u!==null){u.return=a.return,xe=u;break}xe=a.return}}function Eb(s){for(;xe!==null;){var a=xe;try{switch(a.tag){case 0:case 11:case 15:var u=a.return;try{bd(4,a)}catch(q){lt(a,u,q)}break;case 1:var y=a.stateNode;if(typeof y.componentDidMount=="function"){var x=a.return;try{y.componentDidMount()}catch(q){lt(a,x,q)}}var k=a.return;try{qp(a)}catch(q){lt(a,k,q)}break;case 5:var T=a.return;try{qp(a)}catch(q){lt(a,T,q)}}}catch(q){lt(a,a.return,q)}if(a===s){xe=null;break}var D=a.sibling;if(D!==null){D.return=a.return,xe=D;break}xe=a.return}}var zS=Math.ceil,xd=j.ReactCurrentDispatcher,Qp=j.ReactCurrentOwner,Zn=j.ReactCurrentBatchConfig,qe=0,Pt=null,gt=null,Lt=0,Dn=0,Zi=Uo(0),kt=0,Ql=null,Ds=0,Cd=0,Gp=0,Gl=null,bn=null,Kp=0,Xi=1/0,so=null,kd=!1,Yp=null,Vo=null,Ed=!1,Qo=null,Ad=0,Kl=0,Jp=null,Sd=-1,jd=0;function an(){return(qe&6)!==0?dt():Sd!==-1?Sd:Sd=dt()}function Go(s){return(s.mode&1)===0?1:(qe&2)!==0&&Lt!==0?Lt&-Lt:AS.transition!==null?(jd===0&&(jd=yv()),jd):(s=Ke,s!==0||(s=window.event,s=s===void 0?16:Sv(s.type)),s)}function wr(s,a,u,y){if(50<Kl)throw Kl=0,Jp=null,Error(n(185));wl(s,u,y),((qe&2)===0||s!==Pt)&&(s===Pt&&((qe&2)===0&&(Cd|=u),kt===4&&Ko(s,Lt)),xn(s,y),u===1&&qe===0&&(a.mode&1)===0&&(Xi=dt()+500,td&&zo()))}function xn(s,a){var u=s.callbackNode;AA(s,a);var y=Ou(s,s===Pt?Lt:0);if(y===0)u!==null&&pv(u),s.callbackNode=null,s.callbackPriority=0;else if(a=y&-y,s.callbackPriority!==a){if(u!=null&&pv(u),a===1)s.tag===0?ES(Sb.bind(null,s)):dw(Sb.bind(null,s)),bS(function(){(qe&6)===0&&zo()}),u=null;else{switch(vv(y)){case 1:u=Ph;break;case 4:u=mv;break;case 16:u=Tu;break;case 536870912:u=gv;break;default:u=Tu}u=Rb(u,Ab.bind(null,s))}s.callbackPriority=a,s.callbackNode=u}}function Ab(s,a){if(Sd=-1,jd=0,(qe&6)!==0)throw Error(n(327));var u=s.callbackNode;if(ea()&&s.callbackNode!==u)return null;var y=Ou(s,s===Pt?Lt:0);if(y===0)return null;if((y&30)!==0||(y&s.expiredLanes)!==0||a)a=Id(s,y);else{a=y;var x=qe;qe|=2;var k=Ib();(Pt!==s||Lt!==a)&&(so=null,Xi=dt()+500,$s(s,a));do try{HS();break}catch(D){jb(s,D)}while(!0);mp(),xd.current=k,qe=x,gt!==null?a=0:(Pt=null,Lt=0,a=kt)}if(a!==0){if(a===2&&(x=Bh(s),x!==0&&(y=x,a=Zp(s,x))),a===1)throw u=Ql,$s(s,0),Ko(s,y),xn(s,dt()),u;if(a===6)Ko(s,y);else{if(x=s.current.alternate,(y&30)===0&&!WS(x)&&(a=Id(s,y),a===2&&(k=Bh(s),k!==0&&(y=k,a=Zp(s,k))),a===1))throw u=Ql,$s(s,0),Ko(s,y),xn(s,dt()),u;switch(s.finishedWork=x,s.finishedLanes=y,a){case 0:case 1:throw Error(n(345));case 2:zs(s,bn,so);break;case 3:if(Ko(s,y),(y&130023424)===y&&(a=Kp+500-dt(),10<a)){if(Ou(s,0)!==0)break;if(x=s.suspendedLanes,(x&y)!==y){an(),s.pingedLanes|=s.suspendedLanes&x;break}s.timeoutHandle=op(zs.bind(null,s,bn,so),a);break}zs(s,bn,so);break;case 4:if(Ko(s,y),(y&4194240)===y)break;for(a=s.eventTimes,x=-1;0<y;){var T=31-hr(y);k=1<<T,T=a[T],T>x&&(x=T),y&=~k}if(y=x,y=dt()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*zS(y/1960))-y,10<y){s.timeoutHandle=op(zs.bind(null,s,bn,so),y);break}zs(s,bn,so);break;case 5:zs(s,bn,so);break;default:throw Error(n(329))}}}return xn(s,dt()),s.callbackNode===u?Ab.bind(null,s):null}function Zp(s,a){var u=Gl;return s.current.memoizedState.isDehydrated&&($s(s,a).flags|=256),s=Id(s,a),s!==2&&(a=bn,bn=u,a!==null&&Xp(a)),s}function Xp(s){bn===null?bn=s:bn.push.apply(bn,s)}function WS(s){for(var a=s;;){if(a.flags&16384){var u=a.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var y=0;y<u.length;y++){var x=u[y],k=x.getSnapshot;x=x.value;try{if(!pr(k(),x))return!1}catch{return!1}}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ko(s,a){for(a&=~Gp,a&=~Cd,s.suspendedLanes|=a,s.pingedLanes&=~a,s=s.expirationTimes;0<a;){var u=31-hr(a),y=1<<u;s[u]=-1,a&=~y}}function Sb(s){if((qe&6)!==0)throw Error(n(327));ea();var a=Ou(s,0);if((a&1)===0)return xn(s,dt()),null;var u=Id(s,a);if(s.tag!==0&&u===2){var y=Bh(s);y!==0&&(a=y,u=Zp(s,y))}if(u===1)throw u=Ql,$s(s,0),Ko(s,a),xn(s,dt()),u;if(u===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=a,zs(s,bn,so),xn(s,dt()),null}function e0(s,a){var u=qe;qe|=1;try{return s(a)}finally{qe=u,qe===0&&(Xi=dt()+500,td&&zo())}}function Us(s){Qo!==null&&Qo.tag===0&&(qe&6)===0&&ea();var a=qe;qe|=1;var u=Zn.transition,y=Ke;try{if(Zn.transition=null,Ke=1,s)return s()}finally{Ke=y,Zn.transition=u,qe=a,(qe&6)===0&&zo()}}function t0(){Dn=Zi.current,et(Zi)}function $s(s,a){s.finishedWork=null,s.finishedLanes=0;var u=s.timeoutHandle;if(u!==-1&&(s.timeoutHandle=-1,wS(u)),gt!==null)for(u=gt.return;u!==null;){var y=u;switch(up(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&Xu();break;case 3:Ki(),et(yn),et(Ht),kp();break;case 5:xp(y);break;case 4:Ki();break;case 13:et(st);break;case 19:et(st);break;case 10:gp(y.type._context);break;case 22:case 23:t0()}u=u.return}if(Pt=s,gt=s=Yo(s.current,null),Lt=Dn=a,kt=0,Ql=null,Gp=Cd=Ds=0,bn=Gl=null,Os!==null){for(a=0;a<Os.length;a++)if(u=Os[a],y=u.interleaved,y!==null){u.interleaved=null;var x=y.next,k=u.pending;if(k!==null){var T=k.next;k.next=x,y.next=T}u.pending=y}Os=null}return s}function jb(s,a){do{var u=gt;try{if(mp(),dd.current=md,fd){for(var y=it.memoizedState;y!==null;){var x=y.queue;x!==null&&(x.pending=null),y=y.next}fd=!1}if(Ls=0,Nt=Ct=it=null,$l=!1,zl=0,Qp.current=null,u===null||u.return===null){kt=1,Ql=a,gt=null;break}e:{var k=s,T=u.return,D=u,q=a;if(a=Lt,D.flags|=32768,q!==null&&typeof q=="object"&&typeof q.then=="function"){var ne=q,le=D,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var me=Zw(T);if(me!==null){me.flags&=-257,Xw(me,T,D,k,a),me.mode&1&&Jw(k,ne,a),a=me,q=ne;var Ce=a.updateQueue;if(Ce===null){var ke=new Set;ke.add(q),a.updateQueue=ke}else Ce.add(q);break e}else{if((a&1)===0){Jw(k,ne,a),n0();break e}q=Error(n(426))}}else if(ot&&D.mode&1){var ft=Zw(T);if(ft!==null){(ft.flags&65536)===0&&(ft.flags|=256),Xw(ft,T,D,k,a),hp(Yi(q,D));break e}}k=q=Yi(q,D),kt!==4&&(kt=2),Gl===null?Gl=[k]:Gl.push(k),k=T;do{switch(k.tag){case 3:k.flags|=65536,a&=-a,k.lanes|=a;var X=Kw(k,q,a);Cw(k,X);break e;case 1:D=q;var G=k.type,te=k.stateNode;if((k.flags&128)===0&&(typeof G.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Vo===null||!Vo.has(te)))){k.flags|=65536,a&=-a,k.lanes|=a;var de=Yw(k,D,a);Cw(k,de);break e}}k=k.return}while(k!==null)}Pb(u)}catch(Ae){a=Ae,gt===u&&u!==null&&(gt=u=u.return);continue}break}while(!0)}function Ib(){var s=xd.current;return xd.current=md,s===null?md:s}function n0(){(kt===0||kt===3||kt===2)&&(kt=4),Pt===null||(Ds&268435455)===0&&(Cd&268435455)===0||Ko(Pt,Lt)}function Id(s,a){var u=qe;qe|=2;var y=Ib();(Pt!==s||Lt!==a)&&(so=null,$s(s,a));do try{qS();break}catch(x){jb(s,x)}while(!0);if(mp(),qe=u,xd.current=y,gt!==null)throw Error(n(261));return Pt=null,Lt=0,kt}function qS(){for(;gt!==null;)Nb(gt)}function HS(){for(;gt!==null&&!gA();)Nb(gt)}function Nb(s){var a=_b(s.alternate,s,Dn);s.memoizedProps=s.pendingProps,a===null?Pb(s):gt=a,Qp.current=null}function Pb(s){var a=s;do{var u=a.alternate;if(s=a.return,(a.flags&32768)===0){if(u=FS(u,a,Dn),u!==null){gt=u;return}}else{if(u=LS(u,a),u!==null){u.flags&=32767,gt=u;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{kt=6,gt=null;return}}if(a=a.sibling,a!==null){gt=a;return}gt=a=s}while(a!==null);kt===0&&(kt=5)}function zs(s,a,u){var y=Ke,x=Zn.transition;try{Zn.transition=null,Ke=1,VS(s,a,u,y)}finally{Zn.transition=x,Ke=y}return null}function VS(s,a,u,y){do ea();while(Qo!==null);if((qe&6)!==0)throw Error(n(327));u=s.finishedWork;var x=s.finishedLanes;if(u===null)return null;if(s.finishedWork=null,s.finishedLanes=0,u===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var k=u.lanes|u.childLanes;if(SA(s,k),s===Pt&&(gt=Pt=null,Lt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Ed||(Ed=!0,Rb(Tu,function(){return ea(),null})),k=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||k){k=Zn.transition,Zn.transition=null;var T=Ke;Ke=1;var D=qe;qe|=4,Qp.current=null,US(s,u),bb(u,s),fS(np),Du=!!tp,np=tp=null,s.current=u,$S(u),yA(),qe=D,Ke=T,Zn.transition=k}else s.current=u;if(Ed&&(Ed=!1,Qo=s,Ad=x),k=s.pendingLanes,k===0&&(Vo=null),bA(u.stateNode),xn(s,dt()),a!==null)for(y=s.onRecoverableError,u=0;u<a.length;u++)x=a[u],y(x.value,{componentStack:x.stack,digest:x.digest});if(kd)throw kd=!1,s=Yp,Yp=null,s;return(Ad&1)!==0&&s.tag!==0&&ea(),k=s.pendingLanes,(k&1)!==0?s===Jp?Kl++:(Kl=0,Jp=s):Kl=0,zo(),null}function ea(){if(Qo!==null){var s=vv(Ad),a=Zn.transition,u=Ke;try{if(Zn.transition=null,Ke=16>s?16:s,Qo===null)var y=!1;else{if(s=Qo,Qo=null,Ad=0,(qe&6)!==0)throw Error(n(331));var x=qe;for(qe|=4,xe=s.current;xe!==null;){var k=xe,T=k.child;if((xe.flags&16)!==0){var D=k.deletions;if(D!==null){for(var q=0;q<D.length;q++){var ne=D[q];for(xe=ne;xe!==null;){var le=xe;switch(le.tag){case 0:case 11:case 15:Vl(8,le,k)}var ce=le.child;if(ce!==null)ce.return=le,xe=ce;else for(;xe!==null;){le=xe;var ae=le.sibling,me=le.return;if(mb(le),le===ne){xe=null;break}if(ae!==null){ae.return=me,xe=ae;break}xe=me}}}var Ce=k.alternate;if(Ce!==null){var ke=Ce.child;if(ke!==null){Ce.child=null;do{var ft=ke.sibling;ke.sibling=null,ke=ft}while(ke!==null)}}xe=k}}if((k.subtreeFlags&2064)!==0&&T!==null)T.return=k,xe=T;else e:for(;xe!==null;){if(k=xe,(k.flags&2048)!==0)switch(k.tag){case 0:case 11:case 15:Vl(9,k,k.return)}var X=k.sibling;if(X!==null){X.return=k.return,xe=X;break e}xe=k.return}}var G=s.current;for(xe=G;xe!==null;){T=xe;var te=T.child;if((T.subtreeFlags&2064)!==0&&te!==null)te.return=T,xe=te;else e:for(T=G;xe!==null;){if(D=xe,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:bd(9,D)}}catch(Ae){lt(D,D.return,Ae)}if(D===T){xe=null;break e}var de=D.sibling;if(de!==null){de.return=D.return,xe=de;break e}xe=D.return}}if(qe=x,zo(),Pr&&typeof Pr.onPostCommitFiberRoot=="function")try{Pr.onPostCommitFiberRoot(_u,s)}catch{}y=!0}return y}finally{Ke=u,Zn.transition=a}}return!1}function Bb(s,a,u){a=Yi(u,a),a=Kw(s,a,1),s=qo(s,a,1),a=an(),s!==null&&(wl(s,1,a),xn(s,a))}function lt(s,a,u){if(s.tag===3)Bb(s,s,u);else for(;a!==null;){if(a.tag===3){Bb(a,s,u);break}else if(a.tag===1){var y=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Vo===null||!Vo.has(y))){s=Yi(u,s),s=Yw(a,s,1),a=qo(a,s,1),s=an(),a!==null&&(wl(a,1,s),xn(a,s));break}}a=a.return}}function QS(s,a,u){var y=s.pingCache;y!==null&&y.delete(a),a=an(),s.pingedLanes|=s.suspendedLanes&u,Pt===s&&(Lt&u)===u&&(kt===4||kt===3&&(Lt&130023424)===Lt&&500>dt()-Kp?$s(s,0):Gp|=u),xn(s,a)}function Tb(s,a){a===0&&((s.mode&1)===0?a=1:(a=Mu,Mu<<=1,(Mu&130023424)===0&&(Mu=4194304)));var u=an();s=no(s,a),s!==null&&(wl(s,a,u),xn(s,u))}function GS(s){var a=s.memoizedState,u=0;a!==null&&(u=a.retryLane),Tb(s,u)}function KS(s,a){var u=0;switch(s.tag){case 13:var y=s.stateNode,x=s.memoizedState;x!==null&&(u=x.retryLane);break;case 19:y=s.stateNode;break;default:throw Error(n(314))}y!==null&&y.delete(a),Tb(s,u)}var _b;_b=function(s,a,u){if(s!==null)if(s.memoizedProps!==a.pendingProps||yn.current)wn=!0;else{if((s.lanes&u)===0&&(a.flags&128)===0)return wn=!1,OS(s,a,u);wn=(s.flags&131072)!==0}else wn=!1,ot&&(a.flags&1048576)!==0&&fw(a,rd,a.index);switch(a.lanes=0,a.tag){case 2:var y=a.type;vd(s,a),s=a.pendingProps;var x=zi(a,Ht.current);Gi(a,u),x=Sp(null,a,y,s,x,u);var k=jp();return a.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,vn(y)?(k=!0,ed(a)):k=!1,a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,wp(a),x.updater=gd,a.stateNode=x,x._reactInternals=a,_p(a,y,s,u),a=Fp(null,a,y,!0,k,u)):(a.tag=0,ot&&k&&cp(a),sn(null,a,x,u),a=a.child),a;case 16:y=a.elementType;e:{switch(vd(s,a),s=a.pendingProps,x=y._init,y=x(y._payload),a.type=y,x=a.tag=JS(y),s=gr(y,s),x){case 0:a=Op(null,a,y,s,u);break e;case 1:a=sb(null,a,y,s,u);break e;case 11:a=eb(null,a,y,s,u);break e;case 14:a=tb(null,a,y,gr(y.type,s),u);break e}throw Error(n(306,y,""))}return a;case 0:return y=a.type,x=a.pendingProps,x=a.elementType===y?x:gr(y,x),Op(s,a,y,x,u);case 1:return y=a.type,x=a.pendingProps,x=a.elementType===y?x:gr(y,x),sb(s,a,y,x,u);case 3:e:{if(ib(a),s===null)throw Error(n(387));y=a.pendingProps,k=a.memoizedState,x=k.element,xw(s,a),cd(a,y,null,u);var T=a.memoizedState;if(y=T.element,k.isDehydrated)if(k={element:y,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},a.updateQueue.baseState=k,a.memoizedState=k,a.flags&256){x=Yi(Error(n(423)),a),a=ab(s,a,y,u,x);break e}else if(y!==x){x=Yi(Error(n(424)),a),a=ab(s,a,y,u,x);break e}else for(Ln=Do(a.stateNode.containerInfo.firstChild),Fn=a,ot=!0,mr=null,u=ww(a,null,y,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Hi(),y===x){a=oo(s,a,u);break e}sn(s,a,y,u)}a=a.child}return a;case 5:return Ew(a),s===null&&fp(a),y=a.type,x=a.pendingProps,k=s!==null?s.memoizedProps:null,T=x.children,rp(y,x)?T=null:k!==null&&rp(y,k)&&(a.flags|=32),ob(s,a),sn(s,a,T,u),a.child;case 6:return s===null&&fp(a),null;case 13:return lb(s,a,u);case 4:return bp(a,a.stateNode.containerInfo),y=a.pendingProps,s===null?a.child=Vi(a,null,y,u):sn(s,a,y,u),a.child;case 11:return y=a.type,x=a.pendingProps,x=a.elementType===y?x:gr(y,x),eb(s,a,y,x,u);case 7:return sn(s,a,a.pendingProps,u),a.child;case 8:return sn(s,a,a.pendingProps.children,u),a.child;case 12:return sn(s,a,a.pendingProps.children,u),a.child;case 10:e:{if(y=a.type._context,x=a.pendingProps,k=a.memoizedProps,T=x.value,Ze(id,y._currentValue),y._currentValue=T,k!==null)if(pr(k.value,T)){if(k.children===x.children&&!yn.current){a=oo(s,a,u);break e}}else for(k=a.child,k!==null&&(k.return=a);k!==null;){var D=k.dependencies;if(D!==null){T=k.child;for(var q=D.firstContext;q!==null;){if(q.context===y){if(k.tag===1){q=ro(-1,u&-u),q.tag=2;var ne=k.updateQueue;if(ne!==null){ne=ne.shared;var le=ne.pending;le===null?q.next=q:(q.next=le.next,le.next=q),ne.pending=q}}k.lanes|=u,q=k.alternate,q!==null&&(q.lanes|=u),yp(k.return,u,a),D.lanes|=u;break}q=q.next}}else if(k.tag===10)T=k.type===a.type?null:k.child;else if(k.tag===18){if(T=k.return,T===null)throw Error(n(341));T.lanes|=u,D=T.alternate,D!==null&&(D.lanes|=u),yp(T,u,a),T=k.sibling}else T=k.child;if(T!==null)T.return=k;else for(T=k;T!==null;){if(T===a){T=null;break}if(k=T.sibling,k!==null){k.return=T.return,T=k;break}T=T.return}k=T}sn(s,a,x.children,u),a=a.child}return a;case 9:return x=a.type,y=a.pendingProps.children,Gi(a,u),x=Yn(x),y=y(x),a.flags|=1,sn(s,a,y,u),a.child;case 14:return y=a.type,x=gr(y,a.pendingProps),x=gr(y.type,x),tb(s,a,y,x,u);case 15:return nb(s,a,a.type,a.pendingProps,u);case 17:return y=a.type,x=a.pendingProps,x=a.elementType===y?x:gr(y,x),vd(s,a),a.tag=1,vn(y)?(s=!0,ed(a)):s=!1,Gi(a,u),Qw(a,y,x),_p(a,y,x,u),Fp(null,a,y,!0,s,u);case 19:return ub(s,a,u);case 22:return rb(s,a,u)}throw Error(n(156,a.tag))};function Rb(s,a){return hv(s,a)}function YS(s,a,u,y){this.tag=s,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(s,a,u,y){return new YS(s,a,u,y)}function r0(s){return s=s.prototype,!(!s||!s.isReactComponent)}function JS(s){if(typeof s=="function")return r0(s)?1:0;if(s!=null){if(s=s.$$typeof,s===H)return 11;if(s===O)return 14}return 2}function Yo(s,a){var u=s.alternate;return u===null?(u=Xn(s.tag,a,s.key,s.mode),u.elementType=s.elementType,u.type=s.type,u.stateNode=s.stateNode,u.alternate=s,s.alternate=u):(u.pendingProps=a,u.type=s.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=s.flags&14680064,u.childLanes=s.childLanes,u.lanes=s.lanes,u.child=s.child,u.memoizedProps=s.memoizedProps,u.memoizedState=s.memoizedState,u.updateQueue=s.updateQueue,a=s.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=s.sibling,u.index=s.index,u.ref=s.ref,u}function Nd(s,a,u,y,x,k){var T=2;if(y=s,typeof s=="function")r0(s)&&(T=1);else if(typeof s=="string")T=5;else e:switch(s){case P:return Ws(u.children,x,k,a);case R:T=8,x|=8;break;case M:return s=Xn(12,u,a,x|2),s.elementType=M,s.lanes=k,s;case L:return s=Xn(13,u,a,x),s.elementType=L,s.lanes=k,s;case z:return s=Xn(19,u,a,x),s.elementType=z,s.lanes=k,s;case J:return Pd(u,x,k,a);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Q:T=10;break e;case V:T=9;break e;case H:T=11;break e;case O:T=14;break e;case K:T=16,y=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return a=Xn(T,u,a,x),a.elementType=s,a.type=y,a.lanes=k,a}function Ws(s,a,u,y){return s=Xn(7,s,y,a),s.lanes=u,s}function Pd(s,a,u,y){return s=Xn(22,s,y,a),s.elementType=J,s.lanes=u,s.stateNode={isHidden:!1},s}function o0(s,a,u){return s=Xn(6,s,null,a),s.lanes=u,s}function s0(s,a,u){return a=Xn(4,s.children!==null?s.children:[],s.key,a),a.lanes=u,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}function ZS(s,a,u,y,x){this.tag=a,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Th(0),this.expirationTimes=Th(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Th(0),this.identifierPrefix=y,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function i0(s,a,u,y,x,k,T,D,q){return s=new ZS(s,a,u,D,q),a===1?(a=1,k===!0&&(a|=8)):a=0,k=Xn(3,null,null,a),s.current=k,k.stateNode=s,k.memoizedState={element:y,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},wp(k),s}function XS(s,a,u){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_,key:y==null?null:""+y,children:s,containerInfo:a,implementation:u}}function Mb(s){if(!s)return $o;s=s._reactInternals;e:{if(Bs(s)!==s||s.tag!==1)throw Error(n(170));var a=s;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(vn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(n(171))}if(s.tag===1){var u=s.type;if(vn(u))return cw(s,u,a)}return a}function Ob(s,a,u,y,x,k,T,D,q){return s=i0(u,y,!0,s,x,k,T,D,q),s.context=Mb(null),u=s.current,y=an(),x=Go(u),k=ro(y,x),k.callback=a??null,qo(u,k,x),s.current.lanes=x,wl(s,x,y),xn(s,y),s}function Bd(s,a,u,y){var x=a.current,k=an(),T=Go(x);return u=Mb(u),a.context===null?a.context=u:a.pendingContext=u,a=ro(k,T),a.payload={element:s},y=y===void 0?null:y,y!==null&&(a.callback=y),s=qo(x,a,T),s!==null&&(wr(s,x,T,k),ld(s,x,T)),T}function Td(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Fb(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var u=s.retryLane;s.retryLane=u!==0&&u<a?u:a}}function a0(s,a){Fb(s,a),(s=s.alternate)&&Fb(s,a)}function ej(){return null}var Lb=typeof reportError=="function"?reportError:function(s){console.error(s)};function l0(s){this._internalRoot=s}_d.prototype.render=l0.prototype.render=function(s){var a=this._internalRoot;if(a===null)throw Error(n(409));Bd(s,a,null,null)},_d.prototype.unmount=l0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var a=s.containerInfo;Us(function(){Bd(null,s,null,null)}),a[Zr]=null}};function _d(s){this._internalRoot=s}_d.prototype.unstable_scheduleHydration=function(s){if(s){var a=xv();s={blockedOn:null,target:s,priority:a};for(var u=0;u<Oo.length&&a!==0&&a<Oo[u].priority;u++);Oo.splice(u,0,s),u===0&&Ev(s)}};function c0(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Rd(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Db(){}function tj(s,a,u,y,x){if(x){if(typeof y=="function"){var k=y;y=function(){var ne=Td(T);k.call(ne)}}var T=Ob(a,y,s,0,null,!1,!1,"",Db);return s._reactRootContainer=T,s[Zr]=T.current,_l(s.nodeType===8?s.parentNode:s),Us(),T}for(;x=s.lastChild;)s.removeChild(x);if(typeof y=="function"){var D=y;y=function(){var ne=Td(q);D.call(ne)}}var q=i0(s,0,!1,null,null,!1,!1,"",Db);return s._reactRootContainer=q,s[Zr]=q.current,_l(s.nodeType===8?s.parentNode:s),Us(function(){Bd(a,q,u,y)}),q}function Md(s,a,u,y,x){var k=u._reactRootContainer;if(k){var T=k;if(typeof x=="function"){var D=x;x=function(){var q=Td(T);D.call(q)}}Bd(a,T,s,x)}else T=tj(u,a,s,x,y);return Td(T)}wv=function(s){switch(s.tag){case 3:var a=s.stateNode;if(a.current.memoizedState.isDehydrated){var u=vl(a.pendingLanes);u!==0&&(_h(a,u|1),xn(a,dt()),(qe&6)===0&&(Xi=dt()+500,zo()))}break;case 13:Us(function(){var y=no(s,1);if(y!==null){var x=an();wr(y,s,1,x)}}),a0(s,1)}},Rh=function(s){if(s.tag===13){var a=no(s,134217728);if(a!==null){var u=an();wr(a,s,134217728,u)}a0(s,134217728)}},bv=function(s){if(s.tag===13){var a=Go(s),u=no(s,a);if(u!==null){var y=an();wr(u,s,a,y)}a0(s,a)}},xv=function(){return Ke},Cv=function(s,a){var u=Ke;try{return Ke=s,a()}finally{Ke=u}},Ps=function(s,a,u){switch(a){case"input":if(on(s,u),a=u.name,u.type==="radio"&&a!=null){for(u=s;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<u.length;a++){var y=u[a];if(y!==s&&y.form===s.form){var x=Zu(y);if(!x)throw Error(n(90));It(y),on(y,x)}}}break;case"textarea":To(s,u);break;case"select":a=u.value,a!=null&&Je(s,!!u.multiple,a,!1)}},iv=e0,av=Us;var nj={usingClientEntryPoint:!1,Events:[Ol,Ui,Zu,ov,sv,e0]},Yl={findFiberByHostInstance:Ts,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rj={bundleType:Yl.bundleType,version:Yl.version,rendererPackageName:Yl.rendererPackageName,rendererConfig:Yl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=dv(s),s===null?null:s.stateNode},findFiberByHostInstance:Yl.findFiberByHostInstance||ej,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Od=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Od.isDisabled&&Od.supportsFiber)try{_u=Od.inject(rj),Pr=Od}catch{}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nj,Cn.createPortal=function(s,a){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c0(a))throw Error(n(200));return XS(s,a,null,u)},Cn.createRoot=function(s,a){if(!c0(s))throw Error(n(299));var u=!1,y="",x=Lb;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=i0(s,1,!1,null,null,u,!1,y,x),s[Zr]=a.current,_l(s.nodeType===8?s.parentNode:s),new l0(a)},Cn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=dv(a),s=s===null?null:s.stateNode,s},Cn.flushSync=function(s){return Us(s)},Cn.hydrate=function(s,a,u){if(!Rd(a))throw Error(n(200));return Md(null,s,a,!0,u)},Cn.hydrateRoot=function(s,a,u){if(!c0(s))throw Error(n(405));var y=u!=null&&u.hydratedSources||null,x=!1,k="",T=Lb;if(u!=null&&(u.unstable_strictMode===!0&&(x=!0),u.identifierPrefix!==void 0&&(k=u.identifierPrefix),u.onRecoverableError!==void 0&&(T=u.onRecoverableError)),a=Ob(a,null,s,1,u??null,x,!1,k,T),s[Zr]=a.current,_l(s),y)for(s=0;s<y.length;s++)u=y[s],x=u._getVersion,x=x(u._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[u,x]:a.mutableSourceEagerHydrationData.push(u,x);return new _d(a)},Cn.render=function(s,a,u){if(!Rd(a))throw Error(n(200));return Md(null,s,a,!1,u)},Cn.unmountComponentAtNode=function(s){if(!Rd(s))throw Error(n(40));return s._reactRootContainer?(Us(function(){Md(null,null,s,!1,function(){s._reactRootContainer=null,s[Zr]=null})}),!0):!1},Cn.unstable_batchedUpdates=e0,Cn.unstable_renderSubtreeIntoContainer=function(s,a,u,y){if(!Rd(u))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return Md(s,a,u,!1,y)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var Gb;function n5(){if(Gb)return h0.exports;Gb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),h0.exports=fj(),h0.exports}var Kb;function hj(){if(Kb)return Ld;Kb=1;var e=n5();return Ld.createRoot=e.createRoot,Ld.hydrateRoot=e.hydrateRoot,Ld}var pj=hj();const r5="ants.dashboard.token";class hs extends Error{constructor(n,r){super(n);er(this,"status");this.name="ApiError",this.status=r}}function mj(){const e=/(?:^#|[#&?])token=([A-Za-z0-9_-]+)/.exec(window.location.hash),t=e==null?void 0:e[1];if(!t)return;try{window.sessionStorage.setItem(r5,t)}catch{}const n=new URLSearchParams(window.location.hash.slice(1)).get("page");window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}#/${n==="rewards"?"rewards":"stake"}`)}function o5(){try{return window.sessionStorage.getItem(r5)}catch{return null}}const Sm=new Set;function gj(e){return Sm.add(e),()=>{Sm.delete(e)}}async function Ks(e,t){const n={Authorization:`Bearer ${o5()??""}`};let r;(t==null?void 0:t.body)!==void 0&&(n["Content-Type"]="application/json",r=JSON.stringify(t.body));let o;try{o=await fetch(e,{method:(t==null?void 0:t.method)??"GET",headers:n,body:r})}catch(l){throw new hs(`Network error: ${l instanceof Error?l.message:String(l)}`,0)}if(o.status===401){for(const l of Sm)l();throw new hs("Unauthorized",401)}let i=null;try{i=await o.json()}catch{i=null}if(!i||typeof i!="object")throw new hs(`HTTP ${o.status}`,o.status);if(!i.ok)throw new hs(i.error||`HTTP ${o.status}`,o.status);return i.data}function Kt(e){return Ks(e)}function Yb(e,t){return Ks(e,{method:"POST",body:t})}const Ye={config:()=>Kt("/api/config"),overview:()=>Kt("/api/overview"),positions:()=>Kt("/api/positions"),rewards:()=>Kt("/api/rewards"),pools:()=>Kt("/api/pools"),sellerModels:async e=>{try{const t=await Kt(`/api/sellers/${encodeURIComponent(e)}/models`);if(!t||!("period"in t)||!("totals"in t))throw new hs("The running dashboard server still uses sampled model data. Restart the updated desktop or dashboard process to load last-epoch totals.",502);return t}catch(t){throw t instanceof hs&&t.status===404?new hs("The running dashboard server does not have the model-data endpoint (HTTP 404). Restart the updated desktop or dashboard process, then reopen staking.",404):t}},pool:e=>Kt(`/api/pools/${e}`),usage:e=>Kt(`/api/usage?epochs=${e}`),emissions:()=>Kt("/api/emissions"),network:()=>Kt("/api/network"),networkLegacy:()=>Kt("/api/network/legacy"),verification:e=>Kt(`/api/verification${e?`?seller=${encodeURIComponent(e)}`:""}`),proofStatus:e=>Kt(`/api/verification/proofs/${encodeURIComponent(e)}`),seller:()=>Kt("/api/seller"),jobs:()=>Kt("/api/jobs"),job:e=>Kt(`/api/jobs/${encodeURIComponent(e)}`),withdrawPreview:e=>Yb("/api/positions/withdraw/preview",{positionIds:e}),startJob:(e,t)=>Yb(e,t)},Ua=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],jm=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],s5=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],i5=[...s5,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],yj=[...s5,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],Jb=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],Zb=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],a5=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],Xb=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function Er(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Bj(e.type);return`${e.name}(${Lf(e.inputs,{includeName:t})})`}function Lf(e,{includeName:t=!1}={}){return e?e.map(n=>vj(n,{includeName:t})).join(t?", ":","):""}function vj(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Lf(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function qr(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function at(e){return qr(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const l5="2.47.12";let Zl={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${l5}`},oe=class Im extends Error{constructor(t,n={}){var c;const r=(()=>{var d;return n.cause instanceof Im?n.cause.details:(d=n.cause)!=null&&d.message?n.cause.message:n.details})(),o=n.cause instanceof Im&&n.cause.docsPath||n.docsPath,i=(c=Zl.getDocsUrl)==null?void 0:c.call(Zl,{...n,docsPath:o}),l=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...r?[`Details: ${r}`]:[],...Zl.version?[`Version: ${Zl.version}`]:[]].join(`
42
+ `);super(l,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=l5}walk(t){return c5(this,t)}};function c5(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?c5(e.cause,t):t?null:e}class wj extends oe{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
43
+ `),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class e6 extends oe{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
44
+ `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class u5 extends oe{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
45
+ `),{metaMessages:[`Params: (${Lf(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class cu extends oe{constructor({cause:t}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:t})}}class bj extends oe{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
46
+ `),{name:"AbiEncodingArrayLengthMismatchError"})}}class xj extends oe{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${at(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class Cj extends oe{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
47
+ `),{name:"AbiEncodingLengthMismatchError"})}}class kj extends oe{constructor(t,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
48
+ `),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class t6 extends oe{constructor(t,{docsPath:n}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
49
+ `),{docsPath:n,name:"AbiErrorNotFoundError"})}}class d5 extends oe{constructor(t,{docsPath:n,cause:r}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
50
+ `),{docsPath:n,name:"AbiErrorSignatureNotFoundError",cause:r}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class Ej extends oe{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class Aj extends oe{constructor(t,{docsPath:n}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
51
+ `),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class n6 extends oe{constructor(t,{docsPath:n}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
52
+ `),{docsPath:n,name:"AbiEventNotFoundError"})}}class $a extends oe{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
53
+ `),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class f5 extends oe{constructor(t,{docsPath:n}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
54
+ `),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class Sj extends oe{constructor(t,{docsPath:n}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
55
+ `),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class jj extends oe{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Er(t.abiItem)}\`, and`,`\`${n.type}\` in \`${Er(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let Ij=class extends oe{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}};class pf extends oe{constructor({abiItem:t,data:n,params:r,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join(`
56
+ `),{metaMessages:[`Params: (${Lf(r,{includeName:!0})})`,`Data: ${n} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=n,this.params=r,this.size=o}}class ry extends oe{constructor({abiItem:t,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${Er(t,{includeName:!0})}".`].join(`
57
+ `),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class Nj extends oe{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
58
+ `),{docsPath:n,name:"InvalidAbiEncodingType"})}}class Pj extends oe{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
59
+ `),{docsPath:n,name:"InvalidAbiDecodingType"})}}let h5=class extends oe{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
60
+ `),{name:"InvalidArrayError"})}};class Bj extends oe{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
61
+ `),{name:"InvalidDefinitionTypeError"})}}class fW extends oe{constructor(t){super(`Type "${t}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}let vs=class extends oe{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},p5=class extends oe{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},m5=class extends oe{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class r6 extends oe{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function el(e,{dir:t,size:n=32}={}){return typeof e=="string"?ms(e,{dir:t,size:n}):Tj(e,{dir:t,size:n})}function ms(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new m5({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function Tj(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new m5({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const i=t==="right";r[i?o:n-o-1]=e[i?o:e.length-o-1]}return r}let oy=class extends oe{constructor({max:t,min:n,signed:r,size:o,value:i}){super(`Number "${i}" is not in safe ${o?`${o*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}},_j=class extends oe{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class Rj extends oe{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let Mj=class extends oe{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function $r(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&n[t==="left"?o:n.length-o-1].toString()==="0";o++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function ur(e,{size:t}){if(at(e)>t)throw new Mj({givenSize:at(e),maxSize:t})}function Hn(e,t={}){const{signed:n}=t;t.size&&ur(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,i=(1n<<BigInt(o)*8n-1n)-1n;return r<=i?r:r-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function Oj(e,t={}){let n=e;if(t.size&&(ur(n,{size:t.size}),n=$r(n)),$r(n)==="0x00")return!1;if($r(n)==="0x01")return!0;throw new Rj(n)}function lr(e,t={}){const n=Hn(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new oy({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}function Fj(e,t={}){let n=Ar(e);return t.size&&(ur(n,{size:t.size}),n=$r(n,{dir:"right"})),new TextDecoder().decode(n)}const Lj=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ao(e,t={}){return typeof e=="number"||typeof e=="bigint"?ge(e,t):typeof e=="string"?za(e,t):typeof e=="boolean"?g5(e,t):St(e,t)}function g5(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ur(n,{size:t.size}),el(n,{size:t.size})):n}function St(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=Lj[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(ur(r,{size:t.size}),el(r,{dir:"right",size:t.size})):r}function ge(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const l=typeof i=="bigint"&&n?-i-1n:0;if(i&&o>i||o<l){const d=typeof e=="bigint"?"n":"";throw new oy({max:i?`${i}${d}`:void 0,min:`${l}${d}`,signed:n,size:r,value:`${e}${d}`})}const c=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?el(c,{size:r}):c}const Dj=new TextEncoder;function za(e,t={}){const n=Dj.encode(e);return St(n,t)}const Uj=new TextEncoder;function tl(e,t={}){return typeof e=="number"||typeof e=="bigint"?zj(e,t):typeof e=="boolean"?$j(e,t):qr(e)?Ar(e,t):ui(e,t)}function $j(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(ur(n,{size:t.size}),el(n,{size:t.size})):n}const io={zero:48,nine:57,A:65,F:70,a:97,f:102};function o6(e){if(e>=io.zero&&e<=io.nine)return e-io.zero;if(e>=io.A&&e<=io.F)return e-(io.A-10);if(e>=io.a&&e<=io.f)return e-(io.a-10)}function Ar(e,t={}){let n=e;t.size&&(ur(n,{size:t.size}),n=el(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,i=new Uint8Array(o);for(let l=0,c=0;l<o;l++){const d=o6(r.charCodeAt(c++)),f=o6(r.charCodeAt(c++));if(d===void 0||f===void 0)throw new oe(`Invalid byte sequence ("${r[c-2]}${r[c-1]}" in "${r}").`);i[l]=d*16+f}return i}function zj(e,t){const n=ge(e,t);return Ar(n)}function ui(e,t={}){const n=Uj.encode(e);return typeof t.size=="number"?(ur(n,{size:t.size}),el(n,{dir:"right",size:t.size})):n}const Dd=BigInt(2**32-1),s6=BigInt(32);function Wj(e,t=!1){return t?{h:Number(e&Dd),l:Number(e>>s6&Dd)}:{h:Number(e>>s6&Dd)|0,l:Number(e&Dd)|0}}function y5(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let i=0;i<n;i++){const{h:l,l:c}=Wj(e[i],t);[r[i],o[i]]=[l,c]}return[r,o]}const i6=(e,t,n)=>e>>>n,a6=(e,t,n)=>e<<32-n|t>>>n,ta=(e,t,n)=>e>>>n|t<<32-n,na=(e,t,n)=>e<<32-n|t>>>n,Ud=(e,t,n)=>e<<64-n|t>>>n-32,$d=(e,t,n)=>e>>>n-32|t<<64-n,qj=(e,t,n)=>e<<n|t>>>32-n,Hj=(e,t,n)=>t<<n|e>>>32-n,Vj=(e,t,n)=>t<<n-32|e>>>64-n,Qj=(e,t,n)=>e<<n-32|t>>>64-n;function ao(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const Gj=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Kj=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Yj=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Jj=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,Zj=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),Xj=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,ra=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function e4(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function yc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ws(e,...t){if(!e4(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function t4(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");yc(e.outputLen),yc(e.blockLen)}function Wa(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function v5(e,t){ws(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function n4(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function bs(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function g0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Mr(e,t){return e<<32-t|e>>>t}const r4=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function o4(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function s4(e){for(let t=0;t<e.length;t++)e[t]=o4(e[t]);return e}const l6=r4?e=>e:s4,w5=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",i4=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function wW(e){if(ws(e),w5)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=i4[e[n]];return t}const lo={_0:48,_9:57,A:65,F:70,a:97,f:102};function c6(e){if(e>=lo._0&&e<=lo._9)return e-lo._0;if(e>=lo.A&&e<=lo.F)return e-(lo.A-10);if(e>=lo.a&&e<=lo.f)return e-(lo.a-10)}function bW(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(w5)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){const l=c6(e.charCodeAt(i)),c=c6(e.charCodeAt(i+1));if(l===void 0||c===void 0){const d=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+d+'" at index '+i)}r[o]=l*16+c}return r}function a4(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Df(e){return typeof e=="string"&&(e=a4(e)),ws(e),e}function l4(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];ws(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const i=e[r];n.set(i,o),o+=i.length}return n}class sy{}function Uf(e){const t=r=>e().update(Df(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function c4(e=32){if(ra&&typeof ra.getRandomValues=="function")return ra.getRandomValues(new Uint8Array(e));if(ra&&typeof ra.randomBytes=="function")return Uint8Array.from(ra.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const u4=BigInt(0),Xl=BigInt(1),d4=BigInt(2),f4=BigInt(7),h4=BigInt(256),p4=BigInt(113),b5=[],x5=[],C5=[];for(let e=0,t=Xl,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],b5.push(2*(5*r+n)),x5.push((e+1)*(e+2)/2%64);let o=u4;for(let i=0;i<7;i++)t=(t<<Xl^(t>>f4)*p4)%h4,t&d4&&(o^=Xl<<(Xl<<BigInt(i))-Xl);C5.push(o)}const k5=y5(C5,!0),m4=k5[0],g4=k5[1],u6=(e,t,n)=>n>32?Vj(e,t,n):qj(e,t,n),d6=(e,t,n)=>n>32?Qj(e,t,n):Hj(e,t,n);function y4(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let l=0;l<10;l++)n[l]=e[l]^e[l+10]^e[l+20]^e[l+30]^e[l+40];for(let l=0;l<10;l+=2){const c=(l+8)%10,d=(l+2)%10,f=n[d],p=n[d+1],m=u6(f,p,1)^n[c],g=d6(f,p,1)^n[c+1];for(let v=0;v<50;v+=10)e[l+v]^=m,e[l+v+1]^=g}let o=e[2],i=e[3];for(let l=0;l<24;l++){const c=x5[l],d=u6(o,i,c),f=d6(o,i,c),p=b5[l];o=e[p],i=e[p+1],e[p]=d,e[p+1]=f}for(let l=0;l<50;l+=10){for(let c=0;c<10;c++)n[c]=e[l+c];for(let c=0;c<10;c++)e[l+c]^=~n[(c+2)%10]&n[(c+4)%10]}e[0]^=m4[r],e[1]^=g4[r]}bs(n)}class iy extends sy{constructor(t,n,r,o=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=i,yc(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=n4(this.state)}clone(){return this._cloneInto()}keccak(){l6(this.state32),y4(this.state32,this.rounds),l6(this.state32),this.posOut=0,this.pos=0}update(t){Wa(this),t=Df(t),ws(t);const{blockLen:n,state:r}=this,o=t.length;for(let i=0;i<o;){const l=Math.min(n-this.pos,o-i);for(let c=0;c<l;c++)r[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,(n&128)!==0&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Wa(this,!1),ws(t),this.finish();const n=this.state,{blockLen:r}=this;for(let o=0,i=t.length;o<i;){this.posOut>=r&&this.keccak();const l=Math.min(r-this.posOut,i-o);t.set(n.subarray(this.posOut,this.posOut+l),o),this.posOut+=l,o+=l}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return yc(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(v5(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,bs(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:o,rounds:i,enableXOF:l}=this;return t||(t=new iy(n,r,o,l,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=o,t.enableXOF=l,t.destroyed=this.destroyed,t}}const v4=(e,t,n)=>Uf(()=>new iy(t,e,n)),E5=v4(1,136,256/8);function Ut(e,t){const n=t||"hex",r=E5(qr(e,{strict:!1})?tl(e):e);return n==="bytes"?r:Ao(r)}let nl=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,n)),n}set(t,n){if(super.has(t)&&super.delete(t),super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=super.keys().next().value;r!==void 0&&super.delete(r)}return this}};const w4=/^0x[a-fA-F0-9]{40}$/,y0=new nl(8192);function Vn(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(y0.has(r))return y0.get(r);const o=w4.test(e)?e.toLowerCase()===e?!0:n?uu(e)===e:!0:!1;return y0.set(r,o),o}const v0=new nl(8192);function uu(e,t){if(v0.has(`${e}.${t}`))return v0.get(`${e}.${t}`);const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=Ut(ui(n),"bytes"),o=(t?n.substring(`${t}0x`.length):n).split("");for(let l=0;l<40;l+=2)r[l>>1]>>4>=8&&o[l]&&(o[l]=o[l].toUpperCase()),(r[l>>1]&15)>=8&&o[l+1]&&(o[l+1]=o[l+1].toUpperCase());const i=`0x${o.join("")}`;return v0.set(`${e}.${t}`,i),i}function yt(e,t){if(!Vn(e,{strict:!1}))throw new vs({address:e});return uu(e,t)}let f6=class extends oe{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},A5=class extends oe{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},b4=class extends oe{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const x4={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new b4({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new A5({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new f6({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new f6({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function ay(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(x4);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function mi(e,t,n,{strict:r}={}){return qr(e,{strict:!1})?Nm(e,t,n,{strict:r}):I5(e,t,n,{strict:r})}function S5(e,t){if(typeof t=="number"&&t>0&&t>at(e)-1)throw new p5({offset:t,position:"start",size:at(e)})}function j5(e,t,n){if(typeof t=="number"&&typeof n=="number"&&at(e)!==n-t)throw new p5({offset:n,position:"end",size:at(e)})}function I5(e,t,n,{strict:r}={}){S5(e,t);const o=e.slice(t,n);return r&&j5(o,t,n),o}function Nm(e,t,n,{strict:r}={}){S5(e,t);const o=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&j5(o,t,n),o}function C4(e,t={}){typeof t.size<"u"&&ur(e,{size:t.size});const n=St(e,t);return Hn(n,t)}function k4(e,t={}){let n=e;if(typeof t.size<"u"&&(ur(n,{size:t.size}),n=$r(n)),n.length>1||n[0]>1)throw new _j(n);return!!n[0]}function xo(e,t={}){typeof t.size<"u"&&ur(e,{size:t.size});const n=St(e,t);return lr(n,t)}function E4(e,t={}){let n=e;return typeof t.size<"u"&&(ur(n,{size:t.size}),n=$r(n,{dir:"right"})),new TextDecoder().decode(n)}function nn(e){return typeof e[0]=="string"?rl(e):A4(e)}function A4(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function rl(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}const AW=/^(.*)\[([0-9]*)\]$/,S4=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,N5=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function ji(e,t){if(e.length!==t.length)throw new Cj({expectedLength:e.length,givenLength:t.length});const n=j4({params:e,values:t}),r=cy(n);return r.length===0?"0x":r}function j4({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(ly({param:e[r],value:t[r]}));return n}function ly({param:e,value:t}){const n=uy(e.type);if(n){const[r,o]=n;return N4(t,{length:r,param:{...e,type:o}})}if(e.type==="tuple")return R4(t,{param:e});if(e.type==="address")return I4(t);if(e.type==="bool")return B4(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,o="256"]=N5.exec(e.type)??[];return T4(t,{signed:r,size:Number(o)})}if(e.type.startsWith("bytes"))return P4(t,{param:e});if(e.type==="string")return _4(t);throw new Nj(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function cy(e){let t=0;for(let i=0;i<e.length;i++){const{dynamic:l,encoded:c}=e[i];l?t+=32:t+=at(c)}const n=[],r=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:l,encoded:c}=e[i];l?(n.push(ge(t+o,{size:32})),r.push(c),o+=at(c)):n.push(c)}return nn([...n,...r])}function I4(e){if(!Vn(e))throw new vs({address:e});return{dynamic:!1,encoded:ms(e.toLowerCase())}}function N4(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new h5(e);if(!r&&e.length!==t)throw new bj({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let o=!1;const i=[];for(let l=0;l<e.length;l++){const c=ly({param:n,value:e[l]});c.dynamic&&(o=!0),i.push(c)}if(r||o){const l=cy(i);if(r){const c=ge(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?nn([c,l]):c}}if(o)return{dynamic:!0,encoded:l}}return{dynamic:!1,encoded:nn(i.map(({encoded:l})=>l))}}function P4(e,{param:t}){const[,n]=t.type.split("bytes"),r=at(e);if(!n){let o=e;return r%32!==0&&(o=ms(o,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:nn([ms(ge(r,{size:32})),o])}}if(r!==Number.parseInt(n,10))throw new xj({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:ms(e,{dir:"right"})}}function B4(e){if(typeof e!="boolean")throw new oe(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:ms(g5(e))}}function T4(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new oy({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:ge(e,{size:32,signed:t})}}function _4(e){const t=za(e),n=Math.ceil(at(t)/32),r=[];for(let o=0;o<n;o++)r.push(ms(mi(t,o*32,(o+1)*32),{dir:"right"}));return{dynamic:!0,encoded:nn([ms(ge(at(t),{size:32})),...r])}}function R4(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const i=t.components[o],l=Array.isArray(e)?o:i.name,c=ly({param:i,value:e[l]});r.push(c),c.dynamic&&(n=!0)}return{dynamic:n,encoded:n?cy(r):nn(r.map(({encoded:o})=>o))}}function uy(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function du(e,t){const n=typeof t=="string"?Ar(t):t,r=ay(n);if(at(n)===0&&e.length>0)throw new cu;if(at(t)&&at(t)<32)throw new u5({data:typeof t=="string"?t:St(t),params:e,size:at(t)});let o=0;const i=[];for(let l=0;l<e.length;++l){const c=e[l];r.setPosition(o);const[d,f]=wa(r,c,{staticPosition:0});o+=f,i.push(d)}return i}function wa(e,t,{staticPosition:n}){const r=uy(t.type);if(r){const[o,i]=r;return O4(e,{...t,type:i},{length:o,staticPosition:n})}if(t.type==="tuple")return U4(e,t,{staticPosition:n});if(t.type==="address")return M4(e);if(t.type==="bool")return F4(e);if(t.type.startsWith("bytes"))return L4(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return D4(e,t);if(t.type==="string")return $4(e,{staticPosition:n});throw new Pj(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const h6=32,Pm=32;function M4(e){const t=e.readBytes(32);return[uu(St(I5(t,-20))),32]}function O4(e,t,{length:n,staticPosition:r}){if(!n){const l=xo(e.readBytes(Pm)),c=r+l,d=c+h6;e.setPosition(c);const f=xo(e.readBytes(h6)),p=vc(t);let m=0;const g=[];for(let v=0;v<f;++v){e.setPosition(d+(p?v*32:m));const[w,b]=wa(e,t,{staticPosition:d});m+=b,g.push(w)}return e.setPosition(r+32),[g,32]}if(vc(t)){const l=xo(e.readBytes(Pm)),c=r+l,d=[];for(let f=0;f<n;++f){e.setPosition(c+f*32);const[p]=wa(e,t,{staticPosition:c});d.push(p)}return e.setPosition(r+32),[d,32]}let o=0;const i=[];for(let l=0;l<n;++l){const[c,d]=wa(e,t,{staticPosition:r+o});o+=d,i.push(c)}return[i,o]}function F4(e){return[k4(e.readBytes(32),{size:32}),32]}function L4(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const l=xo(e.readBytes(32));e.setPosition(n+l);const c=xo(e.readBytes(32));if(c===0)return e.setPosition(n+32),["0x",32];const d=e.readBytes(c);return e.setPosition(n+32),[St(d),32]}return[St(e.readBytes(Number.parseInt(o,10),32)),32]}function D4(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?C4(o,{signed:n}):xo(o,{signed:n}),32]}function U4(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:l})=>!l),o=r?[]:{};let i=0;if(vc(t)){const l=xo(e.readBytes(Pm)),c=n+l;for(let d=0;d<t.components.length;++d){const f=t.components[d];e.setPosition(c+i);const[p,m]=wa(e,f,{staticPosition:c});i+=m,o[r?d:f==null?void 0:f.name]=p}return e.setPosition(n+32),[o,32]}for(let l=0;l<t.components.length;++l){const c=t.components[l],[d,f]=wa(e,c,{staticPosition:n});o[r?l:c==null?void 0:c.name]=d,i+=f}return[o,i]}function $4(e,{staticPosition:t}){const n=xo(e.readBytes(32)),r=t+n;e.setPosition(r);const o=xo(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const i=e.readBytes(o,32),l=E4($r(i));return e.setPosition(t+32),[l,32]}function vc(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(vc);const n=uy(e.type);return!!(n&&vc({...e,type:n[1]}))}const z4=e=>Ut(tl(e));function W4(e){return z4(e)}const q4="1.2.3";let Tn=class Bm extends Error{constructor(t,n={}){var l;const r=n.cause instanceof Bm?n.cause.details:(l=n.cause)!=null&&l.message?n.cause.message:n.details,o=n.cause instanceof Bm&&n.cause.docsPath||n.docsPath,i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${q4}`].join(`
62
+ `);super(i),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}};function Io(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const P5=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,B5=/^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)?$/,T5=/^\(.+?\).*?$/,p6=/^tuple(?<array>(\[(\d*)\])*)$/;function Tm(e){let t=e.type;if(p6.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let o=0;o<n;o++){const i=e.components[o];t+=Tm(i),o<n-1&&(t+=", ")}const r=Io(p6,e.type);return t+=`)${(r==null?void 0:r.array)||""}`,Tm({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function ha(e){let t="";const n=e.length;for(let r=0;r<n;r++){const o=e[r];t+=Tm(o),r!==n-1&&(t+=", ")}return t}function mf(e){var t;return e.type==="function"?`function ${e.name}(${ha(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${ha(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${ha(e.inputs)})`:e.type==="error"?`error ${e.name}(${ha(e.inputs)})`:e.type==="constructor"?`constructor(${ha(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const _5=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function H4(e){return _5.test(e)}function V4(e){return Io(_5,e)}const R5=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Q4(e){return R5.test(e)}function G4(e){return Io(R5,e)}const M5=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function K4(e){return M5.test(e)}function Y4(e){return Io(M5,e)}const O5=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function $f(e){return O5.test(e)}function J4(e){return Io(O5,e)}const F5=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function Z4(e){return F5.test(e)}function X4(e){return Io(F5,e)}const L5=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function e7(e){return L5.test(e)}function t7(e){return Io(L5,e)}const n7=/^receive\(\) external payable$/;function r7(e){return n7.test(e)}const m6=new Set(["memory","indexed","storage","calldata"]),o7=new Set(["indexed"]),_m=new Set(["calldata","memory","storage"]);class s7 extends Tn{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class i7 extends Tn{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class a7 extends Tn{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class l7 extends Tn{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class c7 extends Tn{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class u7 extends Tn{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class d7 extends Tn{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class f7 extends Tn{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class h7 extends Tn{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class ol extends Tn{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class p7 extends Tn{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class m7 extends Tn{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class g7 extends Tn{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class y7 extends Tn{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function v7(e,t,n){let r="";if(n)for(const o of Object.entries(n)){if(!o)continue;let i="";for(const l of o[1])i+=`[${l.type}${l.name?`:${l.name}`:""}]`;r+=`(${o[0]}{${i}})`}return t?`${t}:${e}${r}`:`${e}${r}`}const w0=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Rm(e,t={}){if(K4(e))return w7(e,t);if(Q4(e))return b7(e,t);if(H4(e))return x7(e,t);if(Z4(e))return C7(e,t);if(e7(e))return k7(e);if(r7(e))return{type:"receive",stateMutability:"payable"};throw new p7({signature:e})}function w7(e,t={}){const n=Y4(e);if(!n)throw new ol({signature:e,type:"function"});const r=zn(n.parameters),o=[],i=r.length;for(let c=0;c<i;c++)o.push(So(r[c],{modifiers:_m,structs:t,type:"function"}));const l=[];if(n.returns){const c=zn(n.returns),d=c.length;for(let f=0;f<d;f++)l.push(So(c[f],{modifiers:_m,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:o,outputs:l}}function b7(e,t={}){const n=G4(e);if(!n)throw new ol({signature:e,type:"event"});const r=zn(n.parameters),o=[],i=r.length;for(let l=0;l<i;l++)o.push(So(r[l],{modifiers:o7,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:o}}function x7(e,t={}){const n=V4(e);if(!n)throw new ol({signature:e,type:"error"});const r=zn(n.parameters),o=[],i=r.length;for(let l=0;l<i;l++)o.push(So(r[l],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:o}}function C7(e,t={}){const n=X4(e);if(!n)throw new ol({signature:e,type:"constructor"});const r=zn(n.parameters),o=[],i=r.length;for(let l=0;l<i;l++)o.push(So(r[l],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:o}}function k7(e){const t=t7(e);if(!t)throw new ol({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const E7=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,A7=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,S7=/^u?int$/;function So(e,t){var m,g;const n=v7(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(w0.has(n))return w0.get(n);const r=T5.test(e),o=Io(r?A7:E7,e);if(!o)throw new c7({param:e});if(o.name&&I7(o.name))throw new u7({param:e,name:o.name});const i=o.name?{name:o.name}:{},l=o.modifier==="indexed"?{indexed:!0}:{},c=(t==null?void 0:t.structs)??{};let d,f={};if(r){d="tuple";const v=zn(o.type),w=[],b=v.length;for(let C=0;C<b;C++)w.push(So(v[C],{structs:c}));f={components:w}}else if(o.type in c)d="tuple",f={components:c[o.type]};else if(S7.test(o.type))d=`${o.type}256`;else if(o.type==="address payable")d="address";else if(d=o.type,(t==null?void 0:t.type)!=="struct"&&!D5(d))throw new a7({type:d});if(o.modifier){if(!((g=(m=t==null?void 0:t.modifiers)==null?void 0:m.has)!=null&&g.call(m,o.modifier)))throw new d7({param:e,type:t==null?void 0:t.type,modifier:o.modifier});if(_m.has(o.modifier)&&!N7(d,!!o.array))throw new f7({param:e,type:t==null?void 0:t.type,modifier:o.modifier})}const p={type:`${d}${o.array??""}`,...i,...l,...f};return w0.set(n,p),p}function zn(e,t=[],n="",r=0){const o=e.trim().length;for(let i=0;i<o;i++){const l=e[i],c=e.slice(i+1);switch(l){case",":return r===0?zn(c,[...t,n.trim()]):zn(c,t,`${n}${l}`,r);case"(":return zn(c,t,`${n}${l}`,r+1);case")":return zn(c,t,`${n}${l}`,r-1);default:return zn(c,t,`${n}${l}`,r)}}if(n==="")return t;if(r!==0)throw new y7({current:n,depth:r});return t.push(n.trim()),t}function D5(e){return e==="address"||e==="bool"||e==="function"||e==="string"||P5.test(e)||B5.test(e)}const j7=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function I7(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||P5.test(e)||B5.test(e)||j7.test(e)}function N7(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function dy(e){const t={},n=e.length;for(let l=0;l<n;l++){const c=e[l];if(!$f(c))continue;const d=J4(c);if(!d)throw new ol({signature:c,type:"struct"});const f=d.properties.split(";"),p=[],m=f.length;for(let g=0;g<m;g++){const w=f[g].trim();if(!w)continue;const b=So(w,{type:"struct"});p.push(b)}if(!p.length)throw new m7({signature:c});t[d.name]=p}const r={},o=Object.entries(t),i=o.length;for(let l=0;l<i;l++){const[c,d]=o[l];r[c]=U5(d,t)}return r}const P7=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function U5(e=[],t={},n=new Set){const r=[],o=e.length;for(let i=0;i<o;i++){const l=e[i];if(T5.test(l.type))r.push(l);else{const d=Io(P7,l.type);if(!(d!=null&&d.type))throw new h7({abiParameter:l});const{array:f,type:p}=d;if(p in t){if(n.has(p))throw new g7({type:p});r.push({...l,type:`tuple${f??""}`,components:U5(t[p],t,new Set([...n,p]))})}else if(D5(p))r.push(l);else throw new i7({type:p})}}return r}function $5(e){const t=dy(e),n=[],r=e.length;for(let o=0;o<r;o++){const i=e[o];$f(i)||n.push(Rm(i,t))}return n}function g6(e){let t;if(typeof e=="string")t=Rm(e);else{const n=dy(e),r=e.length;for(let o=0;o<r;o++){const i=e[o];if(!$f(i)){t=Rm(i,n);break}}}if(!t)throw new s7({signature:e});return t}function y6(e){const t=[];if(typeof e=="string"){const n=zn(e),r=n.length;for(let o=0;o<r;o++)t.push(So(n[o],{modifiers:m6}))}else{const n=dy(e),r=e.length;for(let o=0;o<r;o++){const i=e[o];if($f(i))continue;const l=zn(i),c=l.length;for(let d=0;d<c;d++)t.push(So(l[d],{modifiers:m6,structs:n}))}}if(t.length===0)throw new l7({params:e});return t}function B7(e){let t=!0,n="",r=0,o="",i=!1;for(let l=0;l<e.length;l++){const c=e[l];if(["(",")",","].includes(c)&&(t=!0),c==="("&&r++,c===")"&&r--,!!t){if(r===0){if(c===" "&&["event","function",""].includes(o))o="";else if(o+=c,c===")"){i=!0;break}continue}if(c===" "){e[l-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=c,n+=c}}if(!i)throw new oe("Unable to normalize signature.");return o}const T7=e=>{const t=typeof e=="string"?e:mf(e);return B7(t)};function z5(e){return W4(T7(e))}const zf=z5,fu=e=>mi(z5(e),0,4);function Ii(e){const{abi:t,args:n=[],name:r}=e,o=qr(r,{strict:!1}),i=t.filter(c=>o?c.type==="function"?fu(c)===r:c.type==="event"?zf(c)===r:!1:"name"in c&&c.name===r);if(i.length===0)return;if(i.length===1)return i[0];let l;for(const c of i){if(!("inputs"in c))continue;if(!n||n.length===0){if(!c.inputs||c.inputs.length===0)return c;continue}if(!c.inputs||c.inputs.length===0||c.inputs.length!==n.length)continue;if(n.every((f,p)=>{const m="inputs"in c&&c.inputs[p];return m?Mm(f,m):!1})){if(l&&"inputs"in l&&l.inputs){const f=W5(c.inputs,l.inputs,n);if(f)throw new jj({abiItem:c,type:f[0]},{abiItem:l,type:f[1]})}l=c}}return l||i[0]}function Mm(e,t){const n=typeof e,r=t.type;switch(r){case"address":return Vn(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,i)=>n==="object"&&Mm(Object.values(e)[i],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>Mm(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function W5(e,t,n){for(const r in e){const o=e[r],i=t[r];if(o.type==="tuple"&&i.type==="tuple"&&"components"in o&&"components"in i)return W5(o.components,i.components,n[r]);const l=[o.type,i.type];if(l.includes("address")&&l.includes("bytes20")?!0:l.includes("address")&&l.includes("string")?Vn(n[r],{strict:!1}):l.includes("address")&&l.includes("bytes")?Vn(n[r],{strict:!1}):!1)return l}}const b0="/docs/contract/decodeFunctionResult";function Es(e){const{abi:t,args:n,functionName:r,data:o}=e;let i=t[0];if(r){const c=Ii({abi:t,args:n,name:r});if(!c)throw new $a(r,{docsPath:b0});i=c}if(i.type!=="function")throw new $a(void 0,{docsPath:b0});if(!i.outputs)throw new f5(i.name,{docsPath:b0});const l=du(i.outputs,o);if(l&&l.length>1)return l;if(l&&l.length===1)return l[0]}const v6="/docs/contract/encodeFunctionData";function _7(e){const{abi:t,args:n,functionName:r}=e;let o=t[0];if(r){const i=Ii({abi:t,args:n,name:r});if(!i)throw new $a(r,{docsPath:v6});o=i}if(o.type!=="function")throw new $a(void 0,{docsPath:v6});return{abi:[o],functionName:fu(Er(o))}}function _n(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var c;return e.abi.length===1&&((c=e.functionName)!=null&&c.startsWith("0x"))?e:_7(e)})(),o=n[0],i=r,l="inputs"in o&&o.inputs?ji(o.inputs,t??[]):void 0;return rl([i,l??"0x"])}class Om extends oe{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class R7 extends oe{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class M7 extends oe{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
63
+ `),{name:"ChainNotFoundError"})}}class q5 extends oe{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class SW extends oe{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}function sl({blockNumber:e,chain:t,contract:n}){var o;const r=(o=t==null?void 0:t.contracts)==null?void 0:o[n];if(!r)throw new Om({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new Om({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function nt(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const O7={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},H5={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},F7={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function L7(e){const{abi:t,data:n,cause:r}=e,o=mi(n,0,4);if(o==="0x")throw new cu({cause:r});const l=[...t||[],H5,F7].find(c=>c.type==="error"&&o===fu(Er(c)));if(!l)throw new d5(o,{docsPath:"/docs/contract/decodeErrorResult",cause:r});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?du(l.inputs,mi(n,4)):void 0,errorName:l.name}}const At=(e,t,n)=>JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString():o,n);function V5({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((o,i)=>`${r&&o.name?`${o.name}: `:""}${typeof t[i]=="object"?At(t[i]):t[i]}`).join(", ")})`}const D7={gwei:9,wei:18},U7={ether:-9,wei:9},$7={ether:-18,gwei:-9};function Wf(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,i]=[n.slice(0,n.length-t),n.slice(n.length-t)];return i=i.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${i?`.${i}`:""}`}function fy(e,t="wei"){return Wf(e,D7[t])}function Pn(e,t="wei"){return Wf(e,U7[t])}class z7 extends oe{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class W7 extends oe{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function w6(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r}
64
+ `,"")}function q7(e){return e.reduce((t,{address:n,...r})=>{let o=`${t} ${n}:
65
+ `;return r.nonce&&(o+=` nonce: ${r.nonce}
66
+ `),r.balance&&(o+=` balance: ${r.balance}
67
+ `),r.code&&(o+=` code: ${r.code}
68
+ `),r.state&&(o+=` state:
69
+ `,o+=w6(r.state)),r.stateDiff&&(o+=` stateDiff:
70
+ `,o+=w6(r.stateDiff)),o},` State Override:
71
+ `).slice(0,-1)}function hu(e){const t=Object.entries(e).map(([r,o])=>o===void 0||o===!1?null:[r,o]).filter(Boolean),n=t.reduce((r,[o])=>Math.max(r,o.length),0);return t.map(([r,o])=>` ${`${r}:`.padEnd(n+1)} ${o}`).join(`
72
+ `)}class jW extends oe{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class H7 extends oe{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",hu(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class IW extends oe{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class V7 extends oe{constructor(t,{account:n,docsPath:r,chain:o,data:i,gas:l,gasPrice:c,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:p,to:m,value:g}){var w;const v=hu({chain:o&&`${o==null?void 0:o.name} (id: ${o==null?void 0:o.id})`,from:n==null?void 0:n.address,to:m,value:typeof g<"u"&&`${fy(g)} ${((w=o==null?void 0:o.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:i,gas:l,gasPrice:typeof c<"u"&&`${Pn(c)} gwei`,maxFeePerGas:typeof d<"u"&&`${Pn(d)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${Pn(f)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",v].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Q5 extends oe{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:o,index:i}){let l="Transaction";r&&i!==void 0&&(l=`Transaction at block time "${r}" at index "${i}"`),t&&i!==void 0&&(l=`Transaction at block hash "${t}" at index "${i}"`),n&&i!==void 0&&(l=`Transaction at block number "${n}" at index "${i}"`),o&&(l=`Transaction with hash "${o}"`),super(`${l} could not be found.`,{name:"TransactionNotFoundError"})}}class G5 extends oe{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class K5 extends oe{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class Q7 extends oe{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const G7=e=>e,hy=e=>e;class Y5 extends oe{constructor(t,{account:n,docsPath:r,chain:o,data:i,gas:l,gasPrice:c,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:p,to:m,value:g,stateOverride:v}){var C;const w=n?nt(n):void 0;let b=hu({from:w==null?void 0:w.address,to:m,value:typeof g<"u"&&`${fy(g)} ${((C=o==null?void 0:o.nativeCurrency)==null?void 0:C.symbol)||"ETH"}`,data:i,gas:l,gasPrice:typeof c<"u"&&`${Pn(c)} gwei`,maxFeePerGas:typeof d<"u"&&`${Pn(d)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${Pn(f)} gwei`,nonce:p});v&&(b+=`
73
+ ${q7(v)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",b].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class py extends oe{constructor(t,{abi:n,args:r,contractAddress:o,docsPath:i,functionName:l,sender:c}){const d=Ii({abi:n,args:r,name:l}),f=d?V5({abiItem:d,args:r,includeFunctionName:!1,includeName:!1}):void 0,p=d?Er(d,{includeName:!0}):void 0,m=hu({address:o&&G7(o),function:p,args:f&&f!=="()"&&`${[...Array((l==null?void 0:l.length)??0).keys()].map(()=>" ").join("")}${f}`,sender:c});super(t.shortMessage||`An unknown error occurred while executing the contract function "${l}".`,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],m&&"Contract Call:",m].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=o,this.functionName=l,this.sender=c}}class Fm extends oe{constructor({abi:t,data:n,functionName:r,message:o,cause:i}){let l,c,d,f;if(n&&n!=="0x")try{c=L7({abi:t,data:n,cause:i});const{abiItem:m,errorName:g,args:v}=c;if(g==="Error")f=v[0];else if(g==="Panic"){const[w]=v;f=O7[w]}else{const w=m?Er(m,{includeName:!0}):void 0,b=m&&v?V5({abiItem:m,args:v,includeFunctionName:!1,includeName:!1}):void 0;d=[w?`Error: ${w}`:"",b&&b!=="()"?` ${[...Array((g==null?void 0:g.length)??0).keys()].map(()=>" ").join("")}${b}`:""]}}catch(m){l=m}else o&&(f=o);let p;l instanceof d5&&(p=l.signature,d=[`Unable to decode signature "${p}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${p}.`]),super(f&&f!=="execution reverted"||p?[`The contract function "${r}" reverted with the following ${p?"signature":"reason"}:`,f||p].join(`
74
+ `):`The contract function "${r}" reverted.`,{cause:l??i,metaMessages:d,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=c,this.raw=n,this.reason=f,this.signature=p}}class K7 extends oe{constructor({functionName:t,cause:n}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:n})}}class Y7 extends oe{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class qf extends oe{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}function my(e){var n,r,o,i,l,c;if(!(e instanceof oe))return!1;const t=e.walk(d=>d instanceof Fm);return t instanceof Fm?((n=t.data)==null?void 0:n.errorName)==="HttpError"||((r=t.data)==null?void 0:r.errorName)==="ResolverError"||((o=t.data)==null?void 0:o.errorName)==="ResolverNotContract"||((i=t.data)==null?void 0:i.errorName)==="ResolverNotFound"||((l=t.data)==null?void 0:l.errorName)==="ReverseAddressMismatch"||((c=t.data)==null?void 0:c.errorName)==="UnsupportedResolverProfile":!1}function J7(e){const{abi:t,data:n}=e,r=mi(n,0,4),o=t.find(i=>i.type==="function"&&r===fu(Er(i)));if(!o)throw new Sj(r,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?du(o.inputs,mi(n,4)):void 0}}const x0="/docs/contract/encodeErrorResult";function b6(e){const{abi:t,errorName:n,args:r}=e;let o=t[0];if(n){const d=Ii({abi:t,args:r,name:n});if(!d)throw new t6(n,{docsPath:x0});o=d}if(o.type!=="error")throw new t6(void 0,{docsPath:x0});const i=Er(o),l=fu(i);let c="0x";if(r&&r.length>0){if(!o.inputs)throw new kj(o.name,{docsPath:x0});c=ji(o.inputs,r)}return rl([l,c])}const C0="/docs/contract/encodeFunctionResult";function Z7(e){const{abi:t,functionName:n,result:r}=e;let o=t[0];if(n){const l=Ii({abi:t,name:n});if(!l)throw new $a(n,{docsPath:C0});o=l}if(o.type!=="function")throw new $a(void 0,{docsPath:C0});if(!o.outputs)throw new f5(o.name,{docsPath:C0});const i=(()=>{if(o.outputs.length===0)return[];if(o.outputs.length===1)return[r];if(Array.isArray(r))return r;throw new h5(r)})();return ji(o.outputs,i)}const Hf="x-batch-gateway:true";async function X7(e){const{data:t,ccipRequest:n}=e,{args:[r]}=J7({abi:jm,data:t}),o=[],i=[];return await Promise.all(r.map(async(l,c)=>{try{i[c]=l.urls.includes(Hf)?await X7({data:l.data,ccipRequest:n}):await n(l),o[c]=!1}catch(d){o[c]=!0,i[c]=eI(d)}})),Z7({abi:jm,functionName:"query",result:[o,i]})}function eI(e){return e.name==="HttpRequestError"&&e.status?b6({abi:jm,errorName:"HttpError",args:[e.status,e.shortMessage]}):b6({abi:[H5],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function J5(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return qr(t)?t:null}function Lm(e){let t=new Uint8Array(32).fill(0);if(!e)return St(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const o=J5(n[r]),i=o?tl(o):Ut(ui(n[r]),"bytes");t=Ut(nn([t,i]),"bytes")}return St(t)}function tI(e){return`[${e.slice(2)}]`}function nI(e){const t=new Uint8Array(32).fill(0);return e?J5(e)||Ut(ui(e)):St(t)}function gy(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(ui(t).byteLength+2);let r=0;const o=t.split(".");for(let i=0;i<o.length;i++){let l=ui(o[i]);l.byteLength>255&&(l=ui(tI(nI(o[i])))),n[r]=l.length,n.set(l,r+1),r+=l.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}function ve(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const o=e[n];return typeof o=="function"?o:i=>t(e,i)}class dc extends oe{constructor({body:t,cause:n,details:r,headers:o,status:i,url:l}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${hy(l)}`,t&&`Request body: ${At(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=o,this.status=i,this.url=l}}class yy extends oe{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${hy(r)}`,`Request body: ${At(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data,this.url=r}}class x6 extends oe{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${hy(n)}`,`Request body: ${At(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=n}}const rI=-1;class Rn extends oe{constructor(t,{code:n,docsPath:r,metaMessages:o,name:i,shortMessage:l}){super(l,{cause:t,docsPath:r,metaMessages:o||(t==null?void 0:t.metaMessages),name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i||t.name,this.code=t instanceof yy?t.code:n??rI}}class Mn extends Rn{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class wc extends Rn{constructor(t){super(t,{code:wc.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(wc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class bc extends Rn{constructor(t){super(t,{code:bc.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(bc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class xc extends Rn{constructor(t,{method:n}={}){super(t,{code:xc.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(xc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Cc extends Rn{constructor(t){super(t,{code:Cc.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
75
+ `)})}}Object.defineProperty(Cc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class gi extends Rn{constructor(t){super(t,{code:gi.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(gi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class xs extends Rn{constructor(t){super(t,{code:xs.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
76
+ `)})}}Object.defineProperty(xs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class kc extends Rn{constructor(t){super(t,{code:kc.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(kc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class zr extends Rn{constructor(t){super(t,{code:zr.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(zr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Ec extends Rn{constructor(t){super(t,{code:Ec.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Ec,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Ys extends Rn{constructor(t,{method:n}={}){super(t,{code:Ys.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(Ys,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class qa extends Rn{constructor(t){super(t,{code:qa.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(qa,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Ac extends Rn{constructor(t){super(t,{code:Ac.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Ac,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Ve extends Mn{constructor(t){super(t,{code:Ve.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Ve,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Sc extends Mn{constructor(t){super(t,{code:Sc.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Sc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class jc extends Mn{constructor(t,{method:n}={}){super(t,{code:jc.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(jc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Ic extends Mn{constructor(t){super(t,{code:Ic.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Ic,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Nc extends Mn{constructor(t){super(t,{code:Nc.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Nc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class qn extends Mn{constructor(t){super(t,{code:qn.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(qn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Ha extends Mn{constructor(t){super(t,{code:Ha.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(Ha,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class Pc extends Mn{constructor(t){super(t,{code:Pc.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(Pc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class Bc extends Mn{constructor(t){super(t,{code:Bc.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(Bc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class Tc extends Mn{constructor(t){super(t,{code:Tc.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(Tc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class _c extends Mn{constructor(t){super(t,{code:_c.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(_c,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Rc extends Mn{constructor(t){super(t,{code:Rc.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Rc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Va extends Mn{constructor(t){super(t,{code:Va.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Va,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class Mc extends Mn{constructor(t){super(t,{code:Mc.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(Mc,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class oI extends Rn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const sI=3;function yi(e,{abi:t,address:n,args:r,docsPath:o,functionName:i,sender:l}){const c=e instanceof qf?e:e instanceof oe?e.walk(w=>"data"in w)||e.walk():{},{code:d,data:f,details:p,message:m,shortMessage:g}=c,v=e instanceof cu?new K7({functionName:i,cause:e}):[sI,gi.code].includes(d)&&(f||p||m||g)||d===xs.code&&p==="execution reverted"&&f?new Fm({abi:t,data:typeof f=="object"?f.data:f,functionName:i,message:c instanceof yy?p:g??m,cause:e}):e;return new py(v,{abi:t,args:r,contractAddress:n,docsPath:o,functionName:i,sender:l})}const iI="modulepreload",aI=function(e){return"/"+e},C6={},fe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));o=l(n.map(f=>{if(f=aI(f),f in C6)return;C6[f]=!0;const p=f.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${m}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":iI,p||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),p)return new Promise((v,w)=>{g.addEventListener("load",v),g.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function i(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&i(c.reason);return t().catch(i)})};/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const vy=BigInt(0),Dm=BigInt(1);function pu(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function wy(e){if(!pu(e))throw new Error("Uint8Array expected")}function Oc(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function zd(e){const t=e.toString(16);return t.length&1?"0"+t:t}function Z5(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?vy:BigInt("0x"+e)}const X5=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",lI=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Fc(e){if(wy(e),X5)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=lI[e[n]];return t}const co={_0:48,_9:57,A:65,F:70,a:97,f:102};function k6(e){if(e>=co._0&&e<=co._9)return e-co._0;if(e>=co.A&&e<=co.F)return e-(co.A-10);if(e>=co.a&&e<=co.f)return e-(co.a-10)}function gf(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(X5)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){const l=k6(e.charCodeAt(i)),c=k6(e.charCodeAt(i+1));if(l===void 0||c===void 0){const d=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+d+'" at index '+i)}r[o]=l*16+c}return r}function di(e){return Z5(Fc(e))}function e3(e){return wy(e),Z5(Fc(Uint8Array.from(e).reverse()))}function mu(e,t){return gf(e.toString(16).padStart(t*2,"0"))}function t3(e,t){return mu(e,t).reverse()}function nr(e,t,n){let r;if(typeof t=="string")try{r=gf(t)}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(pu(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}function yf(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];wy(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const i=e[r];n.set(i,o),o+=i.length}return n}const k0=e=>typeof e=="bigint"&&vy<=e;function by(e,t,n){return k0(e)&&k0(t)&&k0(n)&&t<=e&&e<n}function ba(e,t,n,r){if(!by(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function cI(e){let t;for(t=0;e>vy;e>>=Dm,t+=1);return t}const Vf=e=>(Dm<<BigInt(e))-Dm,E0=e=>new Uint8Array(e),E6=e=>Uint8Array.from(e);function uI(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=E0(e),o=E0(e),i=0;const l=()=>{r.fill(1),o.fill(0),i=0},c=(...m)=>n(o,r,...m),d=(m=E0(0))=>{o=c(E6([0]),m),r=c(),m.length!==0&&(o=c(E6([1]),m),r=c())},f=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let m=0;const g=[];for(;m<t;){r=c();const v=r.slice();g.push(v),m+=r.length}return yf(...g)};return(m,g)=>{l(),d(m);let v;for(;!(v=g(f()));)d();return l(),v}}const dI={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||pu(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Qf(e,t,n={}){const r=(o,i,l)=>{const c=dI[i];if(typeof c!="function")throw new Error("invalid validator function");const d=e[o];if(!(l&&d===void 0)&&!c(d,e))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+d)};for(const[o,i]of Object.entries(t))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return e}function A6(e){const t=new WeakMap;return(n,...r)=>{const o=t.get(n);if(o!==void 0)return o;const i=e(n,...r);return t.set(n,i),i}}const fI="0.1.1";function hI(){return fI}let De=class fo extends Error{static setStaticOptions(t){fo.prototype.docsOrigin=t.docsOrigin,fo.prototype.showVersion=t.showVersion,fo.prototype.version=t.version}constructor(t,n={}){const r=(()=>{var p;if(n.cause instanceof fo){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(p=n.cause)!=null&&p.message?n.cause.message:n.details})(),o=n.cause instanceof fo&&n.cause.docsPath||n.docsPath,i=n.docsOrigin??fo.prototype.docsOrigin,l=`${i}${o??""}`,c=!!(n.version??fo.prototype.showVersion),d=n.version??fo.prototype.version,f=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||o||c?["",r?`Details: ${r}`:void 0,o?`See: ${l}`:void 0,c?`Version: ${d}`:void 0]:[]].filter(p=>typeof p=="string").join(`
77
+ `);super(f,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=n.cause,this.details=r,this.docs=l,this.docsOrigin=i,this.docsPath=o,this.shortMessage=t,this.showVersion=c,this.version=d}walk(t){return n3(this,t)}};Object.defineProperty(De,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${hI()}`}});De.setStaticOptions(De.defaultStaticOptions);function n3(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?n3(e.cause,t):t?null:e}function gu(e,t){if(ma(e)>t)throw new PI({givenSize:ma(e),maxSize:t})}const uo={zero:48,nine:57,A:65,F:70,a:97,f:102};function S6(e){if(e>=uo.zero&&e<=uo.nine)return e-uo.zero;if(e>=uo.A&&e<=uo.F)return e-(uo.A-10);if(e>=uo.a&&e<=uo.f)return e-(uo.a-10)}function pI(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new BI({size:e.length,targetSize:r,type:"Bytes"});const o=new Uint8Array(r);for(let i=0;i<r;i++){const l=n==="right";o[l?i:r-i-1]=e[l?i:e.length-i-1]}return o}function r3(e,t={}){const{dir:n="left"}=t;let r=e,o=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)o++;return r=n==="left"?r.slice(o):r.slice(0,r.length-o),r}function Gf(e,t){if(Qn(e)>t)throw new FI({givenSize:Qn(e),maxSize:t})}function mI(e,t){if(typeof t=="number"&&t>0&&t>Qn(e)-1)throw new f3({offset:t,position:"start",size:Qn(e)})}function gI(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Qn(e)!==n-t)throw new f3({offset:n,position:"end",size:Qn(e)})}function o3(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const o=e.replace("0x","");if(o.length>r*2)throw new LI({size:Math.ceil(o.length/2),targetSize:r,type:"Hex"});return`0x${o[n==="right"?"padEnd":"padStart"](r*2,"0")}`}const yI="#__bigint";function s3(e,t,n){return JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString()+yI:o,n)}const vI=new TextDecoder,wI=new TextEncoder;function bI(e){return e instanceof Uint8Array?e:typeof e=="string"?i3(e):xI(e)}function xI(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function i3(e,t={}){const{size:n}=t;let r=e;n&&(Gf(e,n),r=wi(e,n));let o=r.slice(2);o.length%2&&(o=`0${o}`);const i=o.length/2,l=new Uint8Array(i);for(let c=0,d=0;c<i;c++){const f=S6(o.charCodeAt(d++)),p=S6(o.charCodeAt(d++));if(f===void 0||p===void 0)throw new De(`Invalid byte sequence ("${o[d-2]}${o[d-1]}" in "${o}").`);l[c]=f<<4|p}return l}function CI(e,t={}){const{size:n}=t,r=wI.encode(e);return typeof n=="number"?(gu(r,n),kI(r,n)):r}function kI(e,t){return pI(e,{dir:"right",size:t})}function ma(e){return e.length}function EI(e,t,n,r={}){const{strict:o}=r;return e.slice(t,n)}function AI(e,t={}){const{size:n}=t;typeof n<"u"&&gu(e,n);const r=jr(e,t);return c3(r,t)}function SI(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(gu(r,n),r=a3(r)),r.length>1||r[0]>1)throw new NI(r);return!!r[0]}function Co(e,t={}){const{size:n}=t;typeof n<"u"&&gu(e,n);const r=jr(e,t);return u3(r,t)}function jI(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(gu(r,n),r=II(r)),vI.decode(r)}function a3(e){return r3(e,{dir:"left"})}function II(e){return r3(e,{dir:"right"})}class NI extends De{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}let PI=class extends De{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},BI=class extends De{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const TI=new TextEncoder,_I=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function RI(e,t={}){const{strict:n=!1}=t;if(!e)throw new j6(e);if(typeof e!="string")throw new j6(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new I6(e);if(!e.startsWith("0x"))throw new I6(e)}function Sr(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function MI(e){return e instanceof Uint8Array?jr(e):Array.isArray(e)?jr(new Uint8Array(e)):e}function l3(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Gf(n,t.size),vi(n,t.size)):n}function jr(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=_I[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(Gf(r,t.size),wi(r,t.size)):r}function fn(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const l=typeof i=="bigint"&&n?-i-1n:0;if(i&&o>i||o<l){const f=typeof e=="bigint"?"n":"";throw new d3({max:i?`${i}${f}`:void 0,min:`${l}${f}`,signed:n,size:r,value:`${e}${f}`})}const d=`0x${(n&&o<0?BigInt.asUintN(r*8,BigInt(o)):o).toString(16)}`;return r?vi(d,r):d}function xy(e,t={}){return jr(TI.encode(e),t)}function vi(e,t){return o3(e,{dir:"left",size:t})}function wi(e,t){return o3(e,{dir:"right",size:t})}function Wr(e,t,n,r={}){const{strict:o}=r;mI(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&gI(i,t,n),i}function Qn(e){return Math.ceil((e.length-2)/2)}function c3(e,t={}){const{signed:n}=t;t.size&&Gf(e,t.size);const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,i=(1n<<BigInt(o)*8n)-1n,l=i>>1n;return r<=l?r:r-i-1n}function u3(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:c3(e,t))}function OI(e,t={}){const{strict:n=!1}=t;try{return RI(e,{strict:n}),!0}catch{return!1}}class d3 extends De{constructor({max:t,min:n,signed:r,size:o,value:i}){super(`Number \`${i}\` is not in safe${o?` ${o*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class j6 extends De{constructor(t){super(`Value \`${typeof t=="object"?s3(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class I6 extends De{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class FI extends De{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class f3 extends De{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class LI extends De{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function DI(e){return{address:e.address,amount:fn(e.amount),index:fn(e.index),validatorIndex:fn(e.validatorIndex)}}function h3(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:fn(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:fn(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:fn(e.gasLimit)},...typeof e.number=="bigint"&&{number:fn(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:fn(e.prevRandao)},...typeof e.time=="bigint"&&{time:fn(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(DI)}}}const UI="0x82ad56cb",p3="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",$I="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",zI="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Cy="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",A0="/docs/contract/encodeDeployData";function Kf(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const o=t.find(l=>"type"in l&&l.type==="constructor");if(!o)throw new wj({docsPath:A0});if(!("inputs"in o))throw new e6({docsPath:A0});if(!o.inputs||o.inputs.length===0)throw new e6({docsPath:A0});const i=ji(o.inputs,n);return rl([r,i])}class ga extends oe{constructor({cause:t,message:n}={}){var o;const r=(o=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:o.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(ga,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(ga,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class vf extends oe{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Pn(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(vf,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class Um extends oe{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Pn(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Um,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class $m extends oe{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty($m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class zm extends oe{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
78
+ `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(zm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Wm extends oe{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(Wm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class qm extends oe{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
79
+ `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(qm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Hm extends oe{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(Hm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Vm extends oe{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Vm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Qm extends oe{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Qm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class wf extends oe{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Pn(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Pn(r)} gwei`:""}).`].join(`
80
+ `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(wf,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class yu extends oe{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function Yf(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof oe?e.walk(o=>(o==null?void 0:o.code)===ga.code):e;return r instanceof oe?new ga({cause:e,message:r.details}):ga.nodeMessage.test(n)?new ga({cause:e,message:e.details}):vf.nodeMessage.test(n)?new vf({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Um.nodeMessage.test(n)?new Um({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):$m.nodeMessage.test(n)?new $m({cause:e,nonce:t==null?void 0:t.nonce}):zm.nodeMessage.test(n)?new zm({cause:e,nonce:t==null?void 0:t.nonce}):Wm.nodeMessage.test(n)?new Wm({cause:e,nonce:t==null?void 0:t.nonce}):qm.nodeMessage.test(n)?new qm({cause:e}):Hm.nodeMessage.test(n)?new Hm({cause:e,gas:t==null?void 0:t.gas}):Vm.nodeMessage.test(n)?new Vm({cause:e,gas:t==null?void 0:t.gas}):Qm.nodeMessage.test(n)?new Qm({cause:e}):wf.nodeMessage.test(n)?new wf({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new yu({cause:e})}function m3(e,{docsPath:t,...n}){const r=(()=>{const o=Yf(e,n);return o instanceof yu?e:o})();return new Y5(r,{docsPath:t,...n})}function il(e,{format:t}){if(!t)return{};const n={};function r(i){const l=Object.keys(i);for(const c of l)c in e&&(n[c]=e[c]),i[c]&&typeof i[c]=="object"&&!Array.isArray(i[c])&&r(i[c])}const o=t(e||{});return r(o),n}function ky(e,t){return({exclude:n,format:r})=>({exclude:n,format:(o,i)=>{const l=t(o,i);if(n)for(const c of n)delete l[c];return{...l,...r(o,i)}},type:e})}const WI={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function As(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=qI(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>St(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=ge(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=ge(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=ge(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=ge(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=ge(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=ge(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=WI[e.type]),typeof e.value<"u"&&(n.value=ge(e.value)),n}function qI(e){return e.map(t=>({address:t.address,r:t.r?ge(BigInt(t.r)):t.r,s:t.s?ge(BigInt(t.s)):t.s,chainId:ge(t.chainId),nonce:ge(t.nonce),...typeof t.yParity<"u"?{yParity:ge(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:ge(t.v)}:{}}))}function Ey(){let e=()=>{},t=()=>{};return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}const S0=new Map;function g3({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){const i=async()=>{const p=d();l();const m=p.map(({args:g})=>g);m.length!==0&&e(m).then(g=>{o&&Array.isArray(g)&&g.sort(o);for(let v=0;v<p.length;v++){const{resolve:w}=p[v];w==null||w([g[v],g])}}).catch(g=>{for(let v=0;v<p.length;v++){const{reject:w}=p[v];w==null||w(g)}})},l=()=>S0.delete(t),c=()=>d().map(({args:p})=>p),d=()=>S0.get(t)||[],f=p=>S0.set(t,[...d(),p]);return{flush:l,async schedule(p){const{promise:m,resolve:g,reject:v}=Ey();return(n==null?void 0:n([...c(),p]))&&i(),d().length>0?(f({args:p,resolve:g,reject:v}),m):(f({args:p,resolve:g,reject:v}),setTimeout(i,r),m)}}}function N6(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new r6({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new r6({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function HI(e){const{balance:t,nonce:n,state:r,stateDiff:o,code:i}=e,l={};if(i!==void 0&&(l.code=i),t!==void 0&&(l.balance=ge(t)),n!==void 0&&(l.nonce=ge(n)),r!==void 0&&(l.state=N6(r)),o!==void 0){if(l.state)throw new W7;l.stateDiff=N6(o)}return l}function Ay(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!Vn(n,{strict:!1}))throw new vs({address:n});if(t[n])throw new z7({address:n});t[n]=HI(r)}return t}const VI=2n**256n-1n;function No(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:o}=e,i=t?nt(t):void 0;if(i&&!Vn(i.address))throw new vs({address:i.address});if(o&&!Vn(o))throw new vs({address:o});if(n&&n>VI)throw new vf({maxFeePerGas:n});if(r&&n&&r>n)throw new wf({maxFeePerGas:n,maxPriorityFeePerGas:r})}async function vu(e,t){var L,z,O,K;const{account:n=e.account,authorizationList:r,batch:o=!!((L=e.batch)!=null&&L.multicall),blockNumber:i,blockTag:l=e.experimental_blockTag??"latest",accessList:c,blobs:d,blockOverrides:f,code:p,data:m,factory:g,factoryData:v,gas:w,gasPrice:b,maxFeePerBlobGas:C,maxFeePerGas:S,maxPriorityFeePerGas:I,nonce:A,to:j,value:N,stateOverride:_,...P}=t,R=n?nt(n):void 0;if(p&&(g||v))throw new oe("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(p&&j)throw new oe("Cannot provide both `code` & `to` as parameters.");const M=p&&m,Q=g&&v&&j&&m,V=M||Q,H=M?y3({code:p,data:m}):Q?KI({data:m,factory:g,factoryData:v,to:j}):m;try{No(t);const F=(typeof i=="bigint"?ge(i):void 0)||l,Z=f?h3(f):void 0,Y=Ay(_),U=(K=(O=(z=e.chain)==null?void 0:z.formatters)==null?void 0:O.transactionRequest)==null?void 0:K.format,he=(U||As)({...il(P,{format:U}),accessList:c,account:R,authorizationList:r,blobs:d,data:H,gas:w,gasPrice:b,maxFeePerBlobGas:C,maxFeePerGas:S,maxPriorityFeePerGas:I,nonce:A,to:V?void 0:j,value:N},"call");if(o&&QI({request:he})&&!Y&&!Z)try{return await GI(e,{...he,blockNumber:i,blockTag:l})}catch(re){if(!(re instanceof q5)&&!(re instanceof Om))throw re}const se=(()=>{const re=[he,F];return Y&&Z?[...re,Y,Z]:Y?[...re,Y]:Z?[...re,{},Z]:re})(),ie=await e.request({method:"eth_call",params:se});return ie==="0x"?{data:void 0}:{data:ie}}catch(J){const F=YI(J),{offchainLookup:Z,offchainLookupSignature:Y}=await fe(async()=>{const{offchainLookup:U,offchainLookupSignature:ee}=await import("./ccip-C_ifxkiT.js");return{offchainLookup:U,offchainLookupSignature:ee}},[]);if(e.ccipRead!==!1&&(F==null?void 0:F.slice(0,10))===Y&&j)return{data:await Z(e,{data:F,to:j})};throw V&&(F==null?void 0:F.slice(0,10))==="0x101bb98d"?new Y7({factory:g}):m3(J,{...t,account:R,chain:e.chain})}}function QI({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(UI)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function GI(e,t){var b;const{batchSize:n=1024,deployless:r=!1,wait:o=0}=typeof((b=e.batch)==null?void 0:b.multicall)=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:l=e.experimental_blockTag??"latest",data:c,to:d}=t,f=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return sl({blockNumber:i,chain:e.chain,contract:"multicall3"});throw new q5})(),m=(typeof i=="bigint"?ge(i):void 0)||l,{schedule:g}=g3({id:`${e.uid}.${m}`,wait:o,shouldSplitBatch(C){return C.reduce((I,{data:A})=>I+(A.length-2),0)>n*2},fn:async C=>{const S=C.map(j=>({allowFailure:!0,callData:j.data,target:j.to})),I=_n({abi:Ua,args:[S],functionName:"aggregate3"}),A=await e.request({method:"eth_call",params:[{...f===null?{data:y3({code:Cy,data:I})}:{to:f,data:I}},m]});return Es({abi:Ua,args:[S],functionName:"aggregate3",data:A||"0x"})}}),[{returnData:v,success:w}]=await g({data:c,to:d});if(!w)throw new qf({data:v});return v==="0x"?{data:void 0}:{data:v}}function y3(e){const{code:t,data:n}=e;return Kf({abi:$5(["constructor(bytes, bytes)"]),bytecode:p3,args:[t,n]})}function KI(e){const{data:t,factory:n,factoryData:r,to:o}=e;return Kf({abi:$5(["constructor(address, bytes, address, bytes)"]),bytecode:$I,args:[o,t,n,r]})}function YI(e){var n;if(!(e instanceof oe))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function cr(e,t){const{abi:n,address:r,args:o,functionName:i,...l}=t,c=_n({abi:n,args:o,functionName:i});try{const{data:d}=await ve(e,vu,"call")({...l,data:c,to:r});return Es({abi:n,args:o,functionName:i,data:d||"0x"})}catch(d){throw yi(d,{abi:n,address:r,args:o,docsPath:"/docs/contract/readContract",functionName:i})}}async function JI(e,t){const{blockNumber:n,blockTag:r,coinType:o,name:i,gatewayUrls:l,strict:c}=t,{chain:d}=e,f=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!d)throw new Error("client chain not configured. universalResolverAddress is required.");return sl({blockNumber:n,chain:d,contract:"ensUniversalResolver"})})(),p=d==null?void 0:d.ensTlds;if(p&&!p.some(g=>i.endsWith(g)))return null;const m=o!=null?[Lm(i),BigInt(o)]:[Lm(i)];try{const g=_n({abi:Zb,functionName:"addr",args:m}),v={address:f,abi:i5,functionName:"resolveWithGateways",args:[Ao(gy(i)),g,l??[Hf]],blockNumber:n,blockTag:r},b=await ve(e,cr,"readContract")(v);if(b[0]==="0x")return null;const C=Es({abi:Zb,args:m,functionName:"addr",data:b[0]});return C==="0x"||$r(C)==="0x00"?null:C}catch(g){if(c)throw g;if(my(g))return null;throw g}}class ZI extends oe{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class ec extends oe{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class Sy extends oe{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class XI extends oe{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const e9=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,t9=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,n9=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,r9=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function o9(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function P6(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function v3({uri:e,gatewayUrls:t}){const n=n9.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=P6(t==null?void 0:t.ipfs,"https://ipfs.io"),o=P6(t==null?void 0:t.arweave,"https://arweave.net"),i=e.match(e9),{protocol:l,subpath:c,target:d,subtarget:f=""}=(i==null?void 0:i.groups)||{},p=l==="ipns:/"||c==="ipns/",m=l==="ipfs:/"||c==="ipfs/"||t9.test(e);if(e.startsWith("http")&&!p&&!m){let v=e;return t!=null&&t.arweave&&(v=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:v,isOnChain:!1,isEncoded:!1}}if((p||m)&&d)return{uri:`${r}/${p?"ipns":"ipfs"}/${d}${f}`,isOnChain:!1,isEncoded:!1};if(l==="ar:/"&&d)return{uri:`${o}/${d}${f||""}`,isOnChain:!1,isEncoded:!1};let g=e.replace(r9,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return{uri:g,isOnChain:!0,isEncoded:!1};throw new Sy({uri:e})}function w3(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new ZI({data:e});return e.image||e.image_url||e.image_data}async function s9({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then(o=>o.json());return await jy({gatewayUrls:e,uri:w3(n)})}catch{throw new Sy({uri:t})}}async function jy({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=v3({uri:t,gatewayUrls:e});if(r||await o9(n))return n;throw new Sy({uri:t})}function i9(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,o]=t.split("/"),[i,l]=n.split(":"),[c,d]=r.split(":");if(!i||i.toLowerCase()!=="eip155")throw new ec({reason:"Only EIP-155 supported"});if(!l)throw new ec({reason:"Chain ID not found"});if(!d)throw new ec({reason:"Contract address not found"});if(!o)throw new ec({reason:"Token ID not found"});if(!c)throw new ec({reason:"ERC namespace not found"});return{chainID:Number.parseInt(l,10),namespace:c.toLowerCase(),contractAddress:d,tokenID:o}}async function a9(e,{nft:t}){if(t.namespace==="erc721")return cr(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return cr(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new XI({namespace:t.namespace})}async function l9(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?c9(e,{gatewayUrls:t,record:n}):jy({uri:n,gatewayUrls:t})}async function c9(e,{gatewayUrls:t,record:n}){const r=i9(n),o=await a9(e,{nft:r}),{uri:i,isOnChain:l,isEncoded:c}=v3({uri:o,gatewayUrls:t});if(l&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const f=c?atob(i.replace("data:application/json;base64,","")):i,p=JSON.parse(f);return jy({uri:w3(p),gatewayUrls:t})}let d=r.tokenID;return r.namespace==="erc1155"&&(d=d.replace("0x","").padStart(64,"0")),s9({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,d)})}async function b3(e,t){const{blockNumber:n,blockTag:r,key:o,name:i,gatewayUrls:l,strict:c}=t,{chain:d}=e,f=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!d)throw new Error("client chain not configured. universalResolverAddress is required.");return sl({blockNumber:n,chain:d,contract:"ensUniversalResolver"})})(),p=d==null?void 0:d.ensTlds;if(p&&!p.some(m=>i.endsWith(m)))return null;try{const m={address:f,abi:i5,args:[Ao(gy(i)),_n({abi:Jb,functionName:"text",args:[Lm(i),o]}),l??[Hf]],functionName:"resolveWithGateways",blockNumber:n,blockTag:r},v=await ve(e,cr,"readContract")(m);if(v[0]==="0x")return null;const w=Es({abi:Jb,functionName:"text",data:v[0]});return w===""?null:w}catch(m){if(c)throw m;if(my(m))return null;throw m}}async function x3(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:o,gatewayUrls:i,strict:l,universalResolverAddress:c}){const d=await ve(e,b3,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:o,universalResolverAddress:c,gatewayUrls:i,strict:l});if(!d)return null;try{return await l9(e,{record:d,gatewayUrls:r})}catch{return null}}async function C3(e,t){const{address:n,blockNumber:r,blockTag:o,coinType:i=60n,gatewayUrls:l,strict:c}=t,{chain:d}=e,f=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!d)throw new Error("client chain not configured. universalResolverAddress is required.");return sl({blockNumber:r,chain:d,contract:"ensUniversalResolver"})})();try{const p={address:f,abi:yj,args:[n,i,l??[Hf]],functionName:"reverseWithGateways",blockNumber:r,blockTag:o},m=ve(e,cr,"readContract"),[g]=await m(p);return g||null}catch(p){if(c)throw p;if(my(p))return null;throw p}}async function u9(e,t){const{blockNumber:n,blockTag:r,name:o}=t,{chain:i}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!i)throw new Error("client chain not configured. universalResolverAddress is required.");return sl({blockNumber:n,chain:i,contract:"ensUniversalResolver"})})(),c=i==null?void 0:i.ensTlds;if(c&&!c.some(f=>o.endsWith(f)))throw new Error(`${o} is not a valid ENS TLD (${c==null?void 0:c.join(", ")}) for chain "${i.name}" (id: ${i.id}).`);const[d]=await ve(e,cr,"readContract")({address:l,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Ao(gy(o))],blockNumber:n,blockTag:r});return d}async function k3(e,t){var C,S,I;const{account:n=e.account,blockNumber:r,blockTag:o="latest",blobs:i,data:l,gas:c,gasPrice:d,maxFeePerBlobGas:f,maxFeePerGas:p,maxPriorityFeePerGas:m,to:g,value:v,...w}=t,b=n?nt(n):void 0;try{No(t);const j=(typeof r=="bigint"?ge(r):void 0)||o,N=(I=(S=(C=e.chain)==null?void 0:C.formatters)==null?void 0:S.transactionRequest)==null?void 0:I.format,P=(N||As)({...il(w,{format:N}),account:b,blobs:i,data:l,gas:c,gasPrice:d,maxFeePerBlobGas:f,maxFeePerGas:p,maxPriorityFeePerGas:m,to:g,value:v},"createAccessList"),R=await e.request({method:"eth_createAccessList",params:[P,j]});return{accessList:R.accessList,gasUsed:BigInt(R.gasUsed)}}catch(A){throw m3(A,{...t,account:b,chain:e.chain})}}function Jf(e,{method:t}){var r,o;const n={};return e.transport.type==="fallback"&&((o=(r=e.transport).onResponse)==null||o.call(r,({method:i,response:l,status:c,transport:d})=>{c==="success"&&t===i&&(n[l]=d.request)})),(i=>n[i]||e.request)}async function d9(e){const t=Jf(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}class f9 extends oe{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const B6="/docs/contract/encodeEventTopics";function wu(e){var d;const{abi:t,eventName:n,args:r}=e;let o=t[0];if(n){const f=Ii({abi:t,name:n});if(!f)throw new n6(n,{docsPath:B6});o=f}if(o.type!=="event")throw new n6(void 0,{docsPath:B6});const i=Er(o),l=zf(i);let c=[];if(r&&"inputs"in o){const f=(d=o.inputs)==null?void 0:d.filter(m=>"indexed"in m&&m.indexed),p=Array.isArray(r)?r:Object.values(r).length>0?(f==null?void 0:f.map(m=>r[m.name]))??[]:[];p.length>0&&(c=(f==null?void 0:f.map((m,g)=>Array.isArray(p[g])?p[g].map((v,w)=>T6({param:m,value:p[g][w]})):typeof p[g]<"u"&&p[g]!==null?T6({param:m,value:p[g]}):null))??[])}return[l,...c]}function T6({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Ut(tl(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new f9(e.type);return ji([e],[t])}async function E3(e,t){const{address:n,abi:r,args:o,eventName:i,fromBlock:l,strict:c,toBlock:d}=t,f=Jf(e,{method:"eth_newFilter"}),p=i?wu({abi:r,args:o,eventName:i}):void 0,m=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof l=="bigint"?ge(l):l,toBlock:typeof d=="bigint"?ge(d):d,topics:p}]});return{abi:r,args:o,eventName:i,id:m,request:f(m),strict:!!c,type:"event"}}async function A3(e,{address:t,args:n,event:r,events:o,fromBlock:i,strict:l,toBlock:c}={}){const d=o??(r?[r]:void 0),f=Jf(e,{method:"eth_newFilter"});let p=[];d&&(p=[d.flatMap(v=>wu({abi:[v],eventName:v.name,args:n}))],r&&(p=p[0]));const m=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof i=="bigint"?ge(i):i,toBlock:typeof c=="bigint"?ge(c):c,...p.length?{topics:p}:{}}]});return{abi:d,args:n,eventName:r?r.name:void 0,fromBlock:i,id:m,request:f(m),strict:!!l,toBlock:c,type:"event"}}async function S3(e){const t=Jf(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}function h9(e){const t=Ut(`0x${e.substring(4)}`).substring(26);return uu(`0x${t}`)}async function p9({hash:e,signature:t}){const n=qr(e)?e:Ao(e),{secp256k1:r}=await fe(async()=>{const{secp256k1:l}=await Promise.resolve().then(()=>EP);return{secp256k1:l}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:f,s:p,v:m,yParity:g}=t,v=Number(g??m),w=_6(v);return new r.Signature(Hn(f),Hn(p)).addRecoveryBit(w)}const l=qr(t)?t:Ao(t);if(at(l)!==65)throw new Error("invalid signature length");const c=lr(`0x${l.slice(130)}`),d=_6(c);return r.Signature.fromCompact(l.substring(2,130)).addRecoveryBit(d)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function _6(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Gm({hash:e,signature:t}){return h9(await p9({hash:e,signature:t}))}function m9(e,t="hex"){const n=j3(e),r=ay(new Uint8Array(n.length));return n.encode(r),t==="hex"?St(r.bytes):r.bytes}function j3(e){return Array.isArray(e)?g9(e.map(t=>j3(t))):y9(e)}function g9(e){const t=e.reduce((o,i)=>o+i.length,0),n=I3(t);return{length:t<=55?1+t:1+n+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+n),n===1?o.pushUint8(t):n===2?o.pushUint16(t):n===3?o.pushUint24(t):o.pushUint32(t));for(const{encode:i}of e)i(o)}}}function y9(e){const t=typeof e=="string"?Ar(e):e,n=I3(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(o){t.length===1&&t[0]<128?o.pushBytes(t):t.length<=55?(o.pushByte(128+t.length),o.pushBytes(t)):(o.pushByte(183+n),n===1?o.pushUint8(t.length):n===2?o.pushUint16(t.length):n===3?o.pushUint24(t.length):o.pushUint32(t.length),o.pushBytes(t))}}}function I3(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new oe("Length is too large.")}function v9(e){const{chainId:t,nonce:n,to:r}=e,o=e.contractAddress??e.address,i=Ut(rl(["0x05",m9([t?ge(t):"0x",o,n?ge(n):"0x"])]));return r==="bytes"?Ar(i):i}async function Zf(e){const{authorization:t,signature:n}=e;return Gm({hash:v9(t),signature:n??t})}class w9 extends oe{constructor(t,{account:n,docsPath:r,chain:o,data:i,gas:l,gasPrice:c,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:p,to:m,value:g}){var w;const v=hu({from:n==null?void 0:n.address,to:m,value:typeof g<"u"&&`${fy(g)} ${((w=o==null?void 0:o.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:i,gas:l,gasPrice:typeof c<"u"&&`${Pn(c)} gwei`,maxFeePerGas:typeof d<"u"&&`${Pn(d)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${Pn(f)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",v].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function b9(e,{docsPath:t,...n}){const r=(()=>{const o=Yf(e,n);return o instanceof yu?e:o})();return new w9(r,{docsPath:t,...n})}class N3 extends oe{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Iy extends oe{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class x9 extends oe{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Pn(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class P3 extends oe{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const B3={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Xf(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?lr(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?lr(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?B3[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=C9(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const BW=ky("transaction",Xf);function C9(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Ny(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:Xf(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const TW=ky("block",Ny);async function Cr(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:o}={}){var f,p,m;const i=o??!1,l=n!==void 0?ge(n):void 0;let c=null;if(t?c=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:!0}):c=await e.request({method:"eth_getBlockByNumber",params:[l||r,i]},{dedupe:!!l}),!c)throw new P3({blockHash:t,blockNumber:n});return(((m=(p=(f=e.chain)==null?void 0:f.formatters)==null?void 0:p.block)==null?void 0:m.format)||Ny)(c,"getBlock")}async function Py(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function k9(e,t){return T3(e,t)}async function T3(e,t){var i,l;const{block:n,chain:r=e.chain,request:o}=t||{};try{const c=((i=r==null?void 0:r.fees)==null?void 0:i.maxPriorityFeePerGas)??((l=r==null?void 0:r.fees)==null?void 0:l.defaultPriorityFee);if(typeof c=="function"){const f=n||await ve(e,Cr,"getBlock")({}),p=await c({block:f,client:e,request:o});if(p===null)throw new Error;return p}if(typeof c<"u")return c;const d=await e.request({method:"eth_maxPriorityFeePerGas"});return Hn(d)}catch{const[c,d]=await Promise.all([n?Promise.resolve(n):ve(e,Cr,"getBlock")({}),ve(e,Py,"getGasPrice")({})]);if(typeof c.baseFeePerGas!="bigint")throw new Iy;const f=d-c.baseFeePerGas;return f<0n?0n:f}}async function E9(e,t){return Km(e,t)}async function Km(e,t){var g,v;const{block:n,chain:r=e.chain,request:o,type:i="eip1559"}=t||{},l=await(async()=>{var w,b;return typeof((w=r==null?void 0:r.fees)==null?void 0:w.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:o}):((b=r==null?void 0:r.fees)==null?void 0:b.baseFeeMultiplier)??1.2})();if(l<1)throw new N3;const d=10**(((g=l.toString().split(".")[1])==null?void 0:g.length)??0),f=w=>w*BigInt(Math.ceil(l*d))/BigInt(d),p=n||await ve(e,Cr,"getBlock")({});if(typeof((v=r==null?void 0:r.fees)==null?void 0:v.estimateFeesPerGas)=="function"){const w=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:f,request:o,type:i});if(w!==null)return w}if(i==="eip1559"){if(typeof p.baseFeePerGas!="bigint")throw new Iy;const w=typeof(o==null?void 0:o.maxPriorityFeePerGas)=="bigint"?o.maxPriorityFeePerGas:await T3(e,{block:p,chain:r,request:o}),b=f(p.baseFeePerGas);return{maxFeePerGas:(o==null?void 0:o.maxFeePerGas)??b+w,maxPriorityFeePerGas:w}}return{gasPrice:(o==null?void 0:o.gasPrice)??f(await ve(e,Py,"getGasPrice")({}))}}async function By(e,{address:t,blockTag:n="latest",blockNumber:r}){const o=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?ge(r):n]},{dedupe:!!r});return lr(o)}function _3(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>Ar(i)):e.blobs,o=[];for(const i of r)o.push(Uint8Array.from(t.blobToKzgCommitment(i)));return n==="bytes"?o:o.map(i=>St(i))}function R3(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(l=>Ar(l)):e.blobs,o=typeof e.commitments[0]=="string"?e.commitments.map(l=>Ar(l)):e.commitments,i=[];for(let l=0;l<r.length;l++){const c=r[l],d=o[l];i.push(Uint8Array.from(t.computeBlobKzgProof(c,d)))}return n==="bytes"?i:i.map(l=>St(l))}function A9(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),l=Number(n>>o&i),c=Number(n&i),d=r?4:0,f=r?0:4;e.setUint32(t+d,l,r),e.setUint32(t+f,c,r)}function S9(e,t,n){return e&t^~e&n}function j9(e,t,n){return e&t^e&n^t&n}class M3 extends sy{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=g0(this.buffer)}update(t){Wa(this),t=Df(t),ws(t);const{view:n,buffer:r,blockLen:o}=this,i=t.length;for(let l=0;l<i;){const c=Math.min(o-this.pos,i-l);if(c===o){const d=g0(t);for(;o<=i-l;l+=o)this.process(d,l);continue}r.set(t.subarray(l,l+c),this.pos),this.pos+=c,l+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Wa(this),v5(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:i}=this;let{pos:l}=this;n[l++]=128,bs(this.buffer.subarray(l)),this.padOffset>o-l&&(this.process(r,0),l=0);for(let m=l;m<o;m++)n[m]=0;A9(r,o-8,BigInt(this.length*8),i),this.process(r,0);const c=g0(t),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const f=d/4,p=this.get();if(f>p.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<f;m++)c.setUint32(4*m,p[m],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:i,destroyed:l,pos:c}=this;return t.destroyed=l,t.finished=i,t.length=o,t.pos=c,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Zo=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Yt=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Jt=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),I9=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Xo=new Uint32Array(64);class N9 extends M3{constructor(t=32){super(64,t,8,!1),this.A=Zo[0]|0,this.B=Zo[1]|0,this.C=Zo[2]|0,this.D=Zo[3]|0,this.E=Zo[4]|0,this.F=Zo[5]|0,this.G=Zo[6]|0,this.H=Zo[7]|0}get(){const{A:t,B:n,C:r,D:o,E:i,F:l,G:c,H:d}=this;return[t,n,r,o,i,l,c,d]}set(t,n,r,o,i,l,c,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=l|0,this.G=c|0,this.H=d|0}process(t,n){for(let m=0;m<16;m++,n+=4)Xo[m]=t.getUint32(n,!1);for(let m=16;m<64;m++){const g=Xo[m-15],v=Xo[m-2],w=Mr(g,7)^Mr(g,18)^g>>>3,b=Mr(v,17)^Mr(v,19)^v>>>10;Xo[m]=b+Xo[m-7]+w+Xo[m-16]|0}let{A:r,B:o,C:i,D:l,E:c,F:d,G:f,H:p}=this;for(let m=0;m<64;m++){const g=Mr(c,6)^Mr(c,11)^Mr(c,25),v=p+g+S9(c,d,f)+I9[m]+Xo[m]|0,b=(Mr(r,2)^Mr(r,13)^Mr(r,22))+j9(r,o,i)|0;p=f,f=d,d=c,c=l+v|0,l=i,i=o,o=r,r=v+b|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,l=l+this.D|0,c=c+this.E|0,d=d+this.F|0,f=f+this.G|0,p=p+this.H|0,this.set(r,o,i,l,c,d,f,p)}roundClean(){bs(Xo)}destroy(){this.set(0,0,0,0,0,0,0,0),bs(this.buffer)}}const O3=y5(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),P9=O3[0],B9=O3[1],es=new Uint32Array(80),ts=new Uint32Array(80);class F3 extends M3{constructor(t=64){super(128,t,16,!1),this.Ah=Jt[0]|0,this.Al=Jt[1]|0,this.Bh=Jt[2]|0,this.Bl=Jt[3]|0,this.Ch=Jt[4]|0,this.Cl=Jt[5]|0,this.Dh=Jt[6]|0,this.Dl=Jt[7]|0,this.Eh=Jt[8]|0,this.El=Jt[9]|0,this.Fh=Jt[10]|0,this.Fl=Jt[11]|0,this.Gh=Jt[12]|0,this.Gl=Jt[13]|0,this.Hh=Jt[14]|0,this.Hl=Jt[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:o,Ch:i,Cl:l,Dh:c,Dl:d,Eh:f,El:p,Fh:m,Fl:g,Gh:v,Gl:w,Hh:b,Hl:C}=this;return[t,n,r,o,i,l,c,d,f,p,m,g,v,w,b,C]}set(t,n,r,o,i,l,c,d,f,p,m,g,v,w,b,C){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=o|0,this.Ch=i|0,this.Cl=l|0,this.Dh=c|0,this.Dl=d|0,this.Eh=f|0,this.El=p|0,this.Fh=m|0,this.Fl=g|0,this.Gh=v|0,this.Gl=w|0,this.Hh=b|0,this.Hl=C|0}process(t,n){for(let A=0;A<16;A++,n+=4)es[A]=t.getUint32(n),ts[A]=t.getUint32(n+=4);for(let A=16;A<80;A++){const j=es[A-15]|0,N=ts[A-15]|0,_=ta(j,N,1)^ta(j,N,8)^i6(j,N,7),P=na(j,N,1)^na(j,N,8)^a6(j,N,7),R=es[A-2]|0,M=ts[A-2]|0,Q=ta(R,M,19)^Ud(R,M,61)^i6(R,M,6),V=na(R,M,19)^$d(R,M,61)^a6(R,M,6),H=Yj(P,V,ts[A-7],ts[A-16]),L=Jj(H,_,Q,es[A-7],es[A-16]);es[A]=L|0,ts[A]=H|0}let{Ah:r,Al:o,Bh:i,Bl:l,Ch:c,Cl:d,Dh:f,Dl:p,Eh:m,El:g,Fh:v,Fl:w,Gh:b,Gl:C,Hh:S,Hl:I}=this;for(let A=0;A<80;A++){const j=ta(m,g,14)^ta(m,g,18)^Ud(m,g,41),N=na(m,g,14)^na(m,g,18)^$d(m,g,41),_=m&v^~m&b,P=g&w^~g&C,R=Zj(I,N,P,B9[A],ts[A]),M=Xj(R,S,j,_,P9[A],es[A]),Q=R|0,V=ta(r,o,28)^Ud(r,o,34)^Ud(r,o,39),H=na(r,o,28)^$d(r,o,34)^$d(r,o,39),L=r&i^r&c^i&c,z=o&l^o&d^l&d;S=b|0,I=C|0,b=v|0,C=w|0,v=m|0,w=g|0,{h:m,l:g}=ao(f|0,p|0,M|0,Q|0),f=c|0,p=d|0,c=i|0,d=l|0,i=r|0,l=o|0;const O=Gj(Q,H,z);r=Kj(O,M,V,L),o=O|0}({h:r,l:o}=ao(this.Ah|0,this.Al|0,r|0,o|0)),{h:i,l}=ao(this.Bh|0,this.Bl|0,i|0,l|0),{h:c,l:d}=ao(this.Ch|0,this.Cl|0,c|0,d|0),{h:f,l:p}=ao(this.Dh|0,this.Dl|0,f|0,p|0),{h:m,l:g}=ao(this.Eh|0,this.El|0,m|0,g|0),{h:v,l:w}=ao(this.Fh|0,this.Fl|0,v|0,w|0),{h:b,l:C}=ao(this.Gh|0,this.Gl|0,b|0,C|0),{h:S,l:I}=ao(this.Hh|0,this.Hl|0,S|0,I|0),this.set(r,o,i,l,c,d,f,p,m,g,v,w,b,C,S,I)}roundClean(){bs(es,ts)}destroy(){bs(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class T9 extends F3{constructor(){super(48),this.Ah=Yt[0]|0,this.Al=Yt[1]|0,this.Bh=Yt[2]|0,this.Bl=Yt[3]|0,this.Ch=Yt[4]|0,this.Cl=Yt[5]|0,this.Dh=Yt[6]|0,this.Dl=Yt[7]|0,this.Eh=Yt[8]|0,this.El=Yt[9]|0,this.Fh=Yt[10]|0,this.Fl=Yt[11]|0,this.Gh=Yt[12]|0,this.Gl=Yt[13]|0,this.Hh=Yt[14]|0,this.Hl=Yt[15]|0}}const L3=Uf(()=>new N9),_W=Uf(()=>new F3),RW=Uf(()=>new T9),_9=L3;function R9(e,t){return _9(qr(e,{strict:!1})?tl(e):e)}function M9(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),o=R9(t);return o.set([n],0),r==="bytes"?o:St(o)}function O9(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),o=[];for(const i of t)o.push(M9({commitment:i,to:r,version:n}));return o}const R6=6,D3=32,Ty=4096,U3=D3*Ty,M6=U3*R6-1-1*Ty*R6,F9=1;class L9 extends oe{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class D9 extends oe{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class MW extends oe{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class OW extends oe{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${F9}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function U9(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Ar(e.data):e.data,r=at(n);if(!r)throw new D9;if(r>M6)throw new L9({maxSize:M6,size:r});const o=[];let i=!0,l=0;for(;i;){const c=ay(new Uint8Array(U3));let d=0;for(;d<Ty;){const f=n.slice(l,l+(D3-1));if(c.pushByte(0),c.pushBytes(f),f.length<31){c.pushByte(128),i=!1;break}d++,l+=31}o.push(c)}return t==="bytes"?o.map(c=>c.bytes):o.map(c=>St(c.bytes))}function $9(e){const{data:t,kzg:n,to:r}=e,o=e.blobs??U9({data:t,to:r}),i=e.commitments??_3({blobs:o,kzg:n,to:r}),l=e.proofs??R3({blobs:o,commitments:i,kzg:n,to:r}),c=[];for(let d=0;d<o.length;d++)c.push({blob:o[d],commitment:i[d],proof:l[d]});return c}function z9(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new H7({transaction:e})}function eh(e,{docsPath:t,...n}){const r=(()=>{const o=Yf(e,n);return o instanceof yu?e:o})();return new V7(r,{docsPath:t,...n})}async function Ss(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return lr(t)}async function _y(e,t){var R,M,Q,V,H;const{account:n=e.account,accessList:r,authorizationList:o,chain:i=e.chain,blobVersionedHashes:l,blobs:c,data:d,gas:f,gasPrice:p,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:w,nonceManager:b,to:C,type:S,value:I,...A}=t,j=await(async()=>{if(!n||!b||typeof w<"u")return w;const L=nt(n),z=i?i.id:await ve(e,Ss,"getChainId")({});return await b.consume({address:L.address,chainId:z,client:e})})();No(t);const N=(M=(R=i==null?void 0:i.formatters)==null?void 0:R.transactionRequest)==null?void 0:M.format,P=(N||As)({...il(A,{format:N}),account:n?nt(n):void 0,accessList:r,authorizationList:o,blobs:c,blobVersionedHashes:l,data:d,gas:f,gasPrice:p,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:j,to:C,type:S,value:I},"fillTransaction");try{const L=await e.request({method:"eth_fillTransaction",params:[P]}),O=(((V=(Q=i==null?void 0:i.formatters)==null?void 0:Q.transaction)==null?void 0:V.format)||Xf)(L.tx);delete O.blockHash,delete O.blockNumber,delete O.r,delete O.s,delete O.transactionIndex,delete O.v,delete O.yParity,O.data=O.input,O.gas&&(O.gas=t.gas??O.gas),O.gasPrice&&(O.gasPrice=t.gasPrice??O.gasPrice),O.maxFeePerBlobGas&&(O.maxFeePerBlobGas=t.maxFeePerBlobGas??O.maxFeePerBlobGas),O.maxFeePerGas&&(O.maxFeePerGas=t.maxFeePerGas??O.maxFeePerGas),O.maxPriorityFeePerGas&&(O.maxPriorityFeePerGas=t.maxPriorityFeePerGas??O.maxPriorityFeePerGas),O.nonce&&(O.nonce=t.nonce??O.nonce);const K=await(async()=>{var Y,U;if(typeof((Y=i==null?void 0:i.fees)==null?void 0:Y.baseFeeMultiplier)=="function"){const ee=await ve(e,Cr,"getBlock")({});return i.fees.baseFeeMultiplier({block:ee,client:e,request:t})}return((U=i==null?void 0:i.fees)==null?void 0:U.baseFeeMultiplier)??1.2})();if(K<1)throw new N3;const F=10**(((H=K.toString().split(".")[1])==null?void 0:H.length)??0),Z=Y=>Y*BigInt(Math.ceil(K*F))/BigInt(F);return O.maxFeePerGas&&!t.maxFeePerGas&&(O.maxFeePerGas=Z(O.maxFeePerGas)),O.gasPrice&&!t.gasPrice&&(O.gasPrice=Z(O.gasPrice)),{raw:L.raw,transaction:{from:P.from,...O}}}catch(L){throw eh(L,{...t,chain:e.chain})}}const Ry=["blobVersionedHashes","chainId","fees","gas","nonce","type"],O6=new Map,j0=new nl(128);async function bu(e,t){var j,N,_;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=Ry);const{account:r,chain:o=e.chain,nonceManager:i,parameters:l}=n,c=(()=>{if(typeof(o==null?void 0:o.prepareTransactionRequest)=="function")return{fn:o.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(o==null?void 0:o.prepareTransactionRequest))return{fn:o.prepareTransactionRequest[0],runAt:o.prepareTransactionRequest[1].runAt}})();let d;async function f(){return d||(typeof n.chainId<"u"?n.chainId:o?o.id:(d=await ve(e,Ss,"getChainId")({}),d))}const p=r&&nt(r);let m=n.nonce;if(l.includes("nonce")&&typeof m>"u"&&p&&i){const P=await f();m=await i.consume({address:p.address,chainId:P,client:e})}c!=null&&c.fn&&((j=c.runAt)!=null&&j.includes("beforeFillTransaction"))&&(n=await c.fn({...n,chain:o},{phase:"beforeFillTransaction"}),m??(m=n.nonce));const v=((l.includes("blobVersionedHashes")||l.includes("sidecars"))&&n.kzg&&n.blobs||j0.get(e.uid)===!1||!["fees","gas"].some(R=>l.includes(R))?!1:!!(l.includes("chainId")&&typeof n.chainId!="number"||l.includes("nonce")&&typeof m!="number"||l.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||l.includes("gas")&&typeof n.gas!="bigint"))?await ve(e,_y,"fillTransaction")({...n,nonce:m}).then(P=>{const{chainId:R,from:M,gas:Q,gasPrice:V,nonce:H,maxFeePerBlobGas:L,maxFeePerGas:z,maxPriorityFeePerGas:O,type:K,...J}=P.transaction;return j0.set(e.uid,!0),{...n,...M?{from:M}:{},...K&&!n.type?{type:K}:{},...typeof R<"u"?{chainId:R}:{},...typeof Q<"u"?{gas:Q}:{},...typeof V<"u"?{gasPrice:V}:{},...typeof H<"u"?{nonce:H}:{},...typeof L<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerBlobGas:L}:{},...typeof z<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerGas:z}:{},...typeof O<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxPriorityFeePerGas:O}:{},..."nonceKey"in J&&typeof J.nonceKey<"u"?{nonceKey:J.nonceKey}:{},..."keyAuthorization"in J&&typeof J.keyAuthorization<"u"&&J.keyAuthorization!==null&&!("keyAuthorization"in n)?{keyAuthorization:J.keyAuthorization}:{},..."feePayerSignature"in J&&typeof J.feePayerSignature<"u"&&J.feePayerSignature!==null?{feePayerSignature:J.feePayerSignature}:{}}}).catch(P=>{var V,H;const R=P;if(R.name!=="TransactionExecutionError")return n;if((V=R.walk)==null?void 0:V.call(R,L=>L.name==="ExecutionRevertedError"))throw P;return((H=R.walk)==null?void 0:H.call(R,L=>{var O;const z=L;return z.name==="MethodNotFoundRpcError"||z.name==="MethodNotSupportedRpcError"||((O=z.message)==null?void 0:O.includes("eth_fillTransaction is not available"))}))&&j0.set(e.uid,!1),n}):n;m??(m=v.nonce),n={...v,...p?{from:p==null?void 0:p.address}:{},...m?{nonce:m}:{}};const{blobs:w,gas:b,kzg:C,type:S}=n;c!=null&&c.fn&&((N=c.runAt)!=null&&N.includes("beforeFillParameters"))&&(n=await c.fn({...n,chain:o},{phase:"beforeFillParameters"}));let I;async function A(){return I||(I=await ve(e,Cr,"getBlock")({blockTag:"latest"}),I)}if(l.includes("nonce")&&typeof m>"u"&&p&&!i&&(n.nonce=await ve(e,By,"getTransactionCount")({address:p.address,blockTag:"pending"})),(l.includes("blobVersionedHashes")||l.includes("sidecars"))&&w&&C){const P=_3({blobs:w,kzg:C});if(l.includes("blobVersionedHashes")){const R=O9({commitments:P,to:"hex"});n.blobVersionedHashes=R}if(l.includes("sidecars")){const R=R3({blobs:w,commitments:P,kzg:C}),M=$9({blobs:w,commitments:P,proofs:R,to:"hex"});n.sidecars=M}}if(l.includes("chainId")&&(n.chainId=await f()),(l.includes("fees")||l.includes("type"))&&typeof S>"u")try{n.type=z9(n)}catch{let P=O6.get(e.uid);if(typeof P>"u"){const R=await A();P=typeof(R==null?void 0:R.baseFeePerGas)=="bigint",O6.set(e.uid,P)}n.type=P?"eip1559":"legacy"}if(l.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const P=await A(),{maxFeePerGas:R,maxPriorityFeePerGas:M}=await Km(e,{block:P,chain:o,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<M)throw new x9({maxPriorityFeePerGas:M});n.maxPriorityFeePerGas=M,n.maxFeePerGas=R}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new Iy;if(typeof n.gasPrice>"u"){const P=await A(),{gasPrice:R}=await Km(e,{block:P,chain:o,request:n,type:"legacy"});n.gasPrice=R}}return l.includes("gas")&&typeof b>"u"&&(n.gas=await ve(e,My,"estimateGas")({...n,account:p,prepare:(p==null?void 0:p.type)==="local"?[]:["blobVersionedHashes"]})),c!=null&&c.fn&&((_=c.runAt)!=null&&_.includes("afterFillParameters"))&&(n=await c.fn({...n,chain:o},{phase:"afterFillParameters"})),No(n),delete n.parameters,n}async function My(e,t){var l,c,d;const{account:n=e.account,prepare:r=!0}=t,o=n?nt(n):void 0,i=(()=>{if(Array.isArray(r))return r;if((o==null?void 0:o.type)!=="local")return["blobVersionedHashes"]})();try{const f=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Zf({authorization:t.authorizationList[0]}).catch(()=>{throw new oe("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:p,authorizationList:m,blobs:g,blobVersionedHashes:v,blockNumber:w,blockTag:b,data:C,gas:S,gasPrice:I,maxFeePerBlobGas:A,maxFeePerGas:j,maxPriorityFeePerGas:N,nonce:_,value:P,stateOverride:R,...M}=r?await bu(e,{...t,parameters:i,to:f}):t;if(S&&t.gas!==S)return S;const V=(typeof w=="bigint"?ge(w):void 0)||b,H=Ay(R);No(t);const L=(d=(c=(l=e.chain)==null?void 0:l.formatters)==null?void 0:c.transactionRequest)==null?void 0:d.format,O=(L||As)({...il(M,{format:L}),account:o,accessList:p,authorizationList:m,blobs:g,blobVersionedHashes:v,data:C,gasPrice:I,maxFeePerBlobGas:A,maxFeePerGas:j,maxPriorityFeePerGas:N,nonce:_,to:f,value:P},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:H?[O,V??e.experimental_blockTag??"latest",H]:V?[O,V]:[O]}))}catch(f){throw b9(f,{...t,account:o,chain:e.chain})}}async function W9(e,t){var f;const{abi:n,address:r,args:o,functionName:i,dataSuffix:l=typeof e.dataSuffix=="string"?e.dataSuffix:(f=e.dataSuffix)==null?void 0:f.value,...c}=t,d=_n({abi:n,args:o,functionName:i});try{return await ve(e,My,"estimateGas")({data:`${d}${l?l.replace("0x",""):""}`,to:r,...c})}catch(p){const m=c.account?nt(c.account):void 0;throw yi(p,{abi:n,address:r,args:o,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:m==null?void 0:m.address})}}async function $3(e,{address:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest"}){var l,c,d;if((l=e.batch)!=null&&l.multicall&&((d=(c=e.chain)==null?void 0:c.contracts)!=null&&d.multicall3)){const f=e.chain.contracts.multicall3.address,p=_n({abi:Ua,functionName:"getEthBalance",args:[t]}),{data:m}=await ve(e,vu,"call")({to:f,data:p,blockNumber:n,blockTag:r});return Es({abi:Ua,functionName:"getEthBalance",args:[t],data:m||"0x"})}const o=typeof n=="bigint"?ge(n):void 0,i=await e.request({method:"eth_getBalance",params:[t,o||r]});return BigInt(i)}async function q9(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}const H9=new Map,V9=new Map;function Q9(e){const t=(o,i)=>({clear:()=>i.delete(o),get:()=>i.get(o),set:l=>i.set(o,l)}),n=t(e,H9),r=t(e,V9);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function G9(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=Q9(t),o=r.response.get();if(o&&n>0&&Date.now()-o.created.getTime()<n)return o.data;let i=r.promise.get();i||(i=e(),r.promise.set(i));try{const l=await i;return r.response.set({created:new Date,data:l}),l}finally{r.promise.clear()}}const K9=e=>`blockNumber.${e}`;async function xu(e,{cacheTime:t=e.cacheTime}={}){const n=await G9(()=>e.request({method:"eth_blockNumber"}),{cacheKey:K9(e.uid),cacheTime:t});return BigInt(n)}async function Y9(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const o=n!==void 0?ge(n):void 0;let i;return t?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||r]},{dedupe:!!o}),lr(i)}async function bf(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=n!==void 0?ge(n):void 0,i=await e.request({method:"eth_getCode",params:[t,o||r]},{dedupe:!!o});if(i!=="0x")return i}function Qa(e,t){if(!Vn(e,{strict:!1}))throw new vs({address:e});if(!Vn(t,{strict:!1}))throw new vs({address:t});return e.toLowerCase()===t.toLowerCase()}function Hr(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const F6="/docs/contract/decodeEventLog";function xf(e){const{abi:t,data:n,strict:r,topics:o}=e,i=r??!0,[l,...c]=o;if(!l)throw new Ej({docsPath:F6});const d=t.find(S=>S.type==="event"&&l===zf(Er(S)));if(!(d&&"name"in d)||d.type!=="event")throw new Aj(l,{docsPath:F6});const{name:f,inputs:p}=d,m=p==null?void 0:p.some(S=>!("name"in S&&S.name)),g=m?[]:{},v=p.map((S,I)=>[S,I]).filter(([S])=>"indexed"in S&&S.indexed),w=[];for(let S=0;S<v.length;S++){const[I,A]=v[S],j=c[S];if(!j){if(i)throw new ry({abiItem:d,param:I});w.push([I,A]);continue}g[m?A:I.name||A]=J9({param:I,value:j})}const b=p.filter(S=>!("indexed"in S&&S.indexed)),C=i?b:[...w.map(([S])=>S),...b];if(C.length>0){if(n&&n!=="0x")try{const S=du(C,n);if(S){let I=0;if(!i)for(const[A,j]of w)g[m?j:A.name||j]=S[I++];if(m)for(let A=0;A<p.length;A++)g[A]===void 0&&I<S.length&&(g[A]=S[I++]);else for(let A=0;A<b.length;A++)g[b[A].name]=S[I++]}}catch(S){if(i)throw S instanceof u5||S instanceof A5?new pf({abiItem:d,data:n,params:C,size:at(n)}):S}else if(i)throw new pf({abiItem:d,data:"0x",params:C,size:0})}return{eventName:f,args:Object.values(g).length>0?g:void 0}}function J9({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(du([e],t)||[])[0]}function Oy(e){const{abi:t,args:n,logs:r,strict:o=!0}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),l=t.filter(c=>c.type==="event").map(c=>({abi:c,selector:zf(c)}));return r.map(c=>{var g;const d=typeof c.blockNumber=="string"?Hr(c):c,f=l.filter(v=>d.topics[0]===v.selector);if(f.length===0)return null;let p,m;for(const v of f)try{p=xf({...d,abi:[v.abi],strict:!0}),m=v;break}catch{}if(!p&&!o){m=f[0];try{p=xf({data:d.data,topics:d.topics,abi:[m.abi],strict:!1})}catch{const v=(g=m.abi.inputs)==null?void 0:g.some(w=>!("name"in w&&w.name));return{...d,args:v?[]:{},eventName:m.abi.name}}}return!p||!m||i&&!i.includes(p.eventName)||!Z9({args:p.args,inputs:m.abi.inputs,matchArgs:n})?null:{...p,...d}}).filter(Boolean)}function Z9(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function o(i,l,c){try{return i.type==="address"?Qa(l,c):i.type==="string"||i.type==="bytes"?Ut(tl(l))===c:l===c}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((i,l)=>{if(i==null)return!0;const c=n[l];return c?(Array.isArray(i)?i:[i]).some(f=>o(c,f,t[l])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([i,l])=>{if(l==null)return!0;const c=n.find(f=>f.name===i);return c?(Array.isArray(l)?l:[l]).some(f=>o(c,f,t[i])):!1}):!1}async function Fy(e,{address:t,blockHash:n,fromBlock:r,toBlock:o,event:i,events:l,args:c,strict:d}={}){const f=d??!1,p=l??(i?[i]:void 0);let m=[];p&&(m=[p.flatMap(b=>wu({abi:[b],eventName:b.name,args:l?void 0:c}))],i&&(m=m[0]));let g;n?g=await e.request({method:"eth_getLogs",params:[{address:t,topics:m,blockHash:n}]}):g=await e.request({method:"eth_getLogs",params:[{address:t,topics:m,fromBlock:typeof r=="bigint"?ge(r):r,toBlock:typeof o=="bigint"?ge(o):o}]});const v=g.map(w=>Hr(w));return p?Oy({abi:p,args:c,logs:v,strict:f}):v}async function z3(e,t){const{abi:n,address:r,args:o,blockHash:i,eventName:l,fromBlock:c,toBlock:d,strict:f}=t,p=l?Ii({abi:n,name:l}):void 0,m=p?void 0:n.filter(g=>g.type==="event");return ve(e,Fy,"getLogs")({address:r,args:o,blockHash:i,event:p,events:m,fromBlock:c,toBlock:d,strict:f})}async function X9(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=await bf(e,{address:t,...n!==void 0?{blockNumber:n}:{blockTag:r}});if(o&&at(o)===23&&o.startsWith("0xef0100"))return yt(mi(o,3,23))}class eN extends oe{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function tN(e,t){const{address:n,factory:r,factoryData:o}=t;try{const[i,l,c,d,f,p,m]=await ve(e,cr,"readContract")({abi:nN,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:l,version:c,chainId:Number(d),verifyingContract:f,salt:p},extensions:m,fields:i}}catch(i){const l=i;throw l.name==="ContractFunctionExecutionError"&&l.cause.name==="ContractFunctionZeroDataError"?new eN({address:n}):l}}const nN=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function rN(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function oN(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:o}){const i=typeof n=="bigint"?ge(n):void 0,l=await e.request({method:"eth_feeHistory",params:[ge(t),i||r,o]},{dedupe:!!i});return rN(l)}async function th(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const o=r.map(i=>Hr(i));return!("abi"in t)||!t.abi?o:Oy({abi:t.abi,logs:o,strict:n})}async function sN(e,{filter:t}){const n=t.strict??!1,o=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(i=>Hr(i));return t.abi?Oy({abi:t.abi,logs:o,strict:n}):o}async function iN({address:e,authorization:t,signature:n}){return Qa(yt(e),await Zf({authorization:t,signature:n}))}const Wd=new nl(8192);function aN(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(Wd.get(n))return Wd.get(n);const r=e().finally(()=>Wd.delete(n));return Wd.set(n,r),r}async function Ym(e){return new Promise(t=>setTimeout(t,e))}function bi(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((o,i)=>{const l=async({count:c=0}={})=>{const d=async({error:f})=>{const p=typeof t=="function"?t({count:c,error:f}):t;p&&await Ym(p),l({count:c+1})};try{const f=await e();o(f)}catch(f){if(c<n&&await r({count:c,error:f}))return d({error:f});i(f)}};l()})}function lN(e,t={}){return async(n,r={})=>{var m;const{dedupe:o=!1,methods:i,retryDelay:l=150,retryCount:c=3,uid:d}={...t,...r},{method:f}=n;if((m=i==null?void 0:i.exclude)!=null&&m.includes(f))throw new Ys(new Error("method not supported"),{method:f});if(i!=null&&i.include&&!i.include.includes(f))throw new Ys(new Error("method not supported"),{method:f});const p=o?za(`${d}.${At(n)}`):void 0;return aN(()=>bi(async()=>{try{return await e(n)}catch(g){const v=g;switch(v.code){case wc.code:throw new wc(v);case bc.code:throw new bc(v);case xc.code:throw new xc(v,{method:n.method});case Cc.code:throw new Cc(v);case gi.code:throw new gi(v);case xs.code:throw new xs(v);case kc.code:throw new kc(v);case zr.code:throw new zr(v);case Ec.code:throw new Ec(v);case Ys.code:throw new Ys(v,{method:n.method});case qa.code:throw new qa(v);case Ac.code:throw new Ac(v);case Ve.code:throw new Ve(v);case Sc.code:throw new Sc(v);case jc.code:throw new jc(v);case Ic.code:throw new Ic(v);case Nc.code:throw new Nc(v);case qn.code:throw new qn(v);case Ha.code:throw new Ha(v);case Pc.code:throw new Pc(v);case Bc.code:throw new Bc(v);case Tc.code:throw new Tc(v);case _c.code:throw new _c(v);case Rc.code:throw new Rc(v);case Va.code:throw new Va(v);case 5e3:throw new Ve(v);case Mc.code:throw new Mc(v);default:throw g instanceof oe?g:new oI(v)}}},{delay:({count:g,error:v})=>{var w;if(v&&v instanceof dc){const b=(w=v==null?void 0:v.headers)==null?void 0:w.get("Retry-After");if(b!=null&&b.match(/\d/))return Number.parseInt(b,10)*1e3}return~~(1<<g)*l},retryCount:c,shouldRetry:({error:g})=>cN(g)}),{enabled:o,id:p})}}function cN(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===qa.code||e.code===gi.code||e.code===429:e instanceof dc&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function Ly({chain:e,currentChainId:t}){if(!e)throw new M7;if(t!==e.id)throw new R7({chain:e,currentChainId:t})}function W3(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(r){return o=>{const i=typeof o=="function"?o(r):o,l={...r,...i};return Object.assign(l,{extend:n(l)})}}return Object.assign(t,{extend:n(t)})}const q3={"0x0":"reverted","0x1":"success"};function Dy(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>Hr(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?lr(e.transactionIndex):null,status:e.status?q3[e.status]:null,type:e.type?B3[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const FW=ky("transactionReceipt",Dy);function nh(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((o,i)=>{(async()=>{let l;try{const c=new AbortController;n>0&&(l=setTimeout(()=>{r?c.abort():i(t)},n)),o(await e({signal:(c==null?void 0:c.signal)||null}))}catch(c){(c==null?void 0:c.name)==="AbortError"&&i(t),i(c)}finally{clearTimeout(l)}})()})}function uN(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const L6=uN();function dN(e,t={}){const{url:n,headers:r}=fN(e);return{async request(o){var w,b,C;const{body:i,fetchFn:l=t.fetchFn??fetch,onRequest:c=t.onRequest,onResponse:d=t.onResponse,timeout:f=t.timeout??1e4}=o,p={...t.fetchOptions??{},...o.fetchOptions??{}},{headers:m,method:g,signal:v}=p;try{const S=await nh(async({signal:A})=>{const j={...p,body:Array.isArray(i)?At(i.map(R=>({jsonrpc:"2.0",id:R.id??L6.take(),...R}))):At({jsonrpc:"2.0",id:i.id??L6.take(),...i}),headers:{...r,"Content-Type":"application/json",...m},method:g||"POST",signal:v||(f>0?A:null)},N=new Request(n,j),_=await(c==null?void 0:c(N,j))??{...j,url:n};return await l(_.url??n,_)},{errorInstance:new x6({body:i,url:n}),timeout:f,signal:!0});d&&await d(S);let I;if((w=S.headers.get("Content-Type"))!=null&&w.startsWith("application/json"))I=await S.json();else{I=await S.text();try{I=JSON.parse(I||"{}")}catch(A){if(S.ok)throw A;I={error:I}}}if(!S.ok){if(typeof((b=I.error)==null?void 0:b.code)=="number"&&typeof((C=I.error)==null?void 0:C.message)=="string")return I;throw new dc({body:i,details:At(I.error)||S.statusText,headers:S.headers,status:S.status,url:n})}return I}catch(S){throw S instanceof dc||S instanceof x6?S:new dc({body:i,cause:S,url:n})}}}}function fN(e){try{const t=new URL(e),n=(()=>{if(t.username){const r=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(r)}`}}}})();return{url:t.toString(),...n}}catch{return{url:e}}}const hN=`Ethereum Signed Message:
81
+ `;function pN(e){const t=typeof e=="string"?za(e):typeof e.raw=="string"?e.raw:St(e.raw),n=za(`${hN}${at(t)}`);return nn([n,t])}function H3(e,t){return Ut(pN(e),t)}class mN extends oe{constructor({domain:t}){super(`Invalid domain "${At(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class gN extends oe{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class yN extends oe{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function vN(e){const{domain:t,message:n,primaryType:r,types:o}=e,i=(d,f)=>{const p={...f};for(const m of d){const{name:g,type:v}=m;v==="address"&&(p[g]=p[g].toLowerCase())}return p},l=o.EIP712Domain?t?i(o.EIP712Domain,t):{}:{},c=(()=>{if(r!=="EIP712Domain")return i(o[r],n)})();return At({domain:l,message:c,primaryType:r,types:o})}function V3(e){const{domain:t,message:n,primaryType:r,types:o}=e,i=(l,c)=>{for(const d of l){const{name:f,type:p}=d,m=c[f],g=p.match(N5);if(g&&(typeof m=="number"||typeof m=="bigint")){const[b,C,S]=g;ge(m,{signed:C==="int",size:Number.parseInt(S,10)/8})}if(p==="address"&&typeof m=="string"&&!Vn(m))throw new vs({address:m});const v=p.match(S4);if(v){const[b,C]=v;if(C&&at(m)!==Number.parseInt(C,10))throw new Ij({expectedSize:Number.parseInt(C,10),givenSize:at(m)})}const w=o[p];w&&(wN(p),i(w,m))}};if(o.EIP712Domain&&t){if(typeof t!="object")throw new mN({domain:t});i(o.EIP712Domain,t)}if(r!=="EIP712Domain")if(o[r])i(o[r],n);else throw new gN({primaryType:r,types:o})}function Q3({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function wN(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new yN({type:e})}function bN(e){const{domain:t={},message:n,primaryType:r}=e,o={EIP712Domain:Q3({domain:t}),...e.types};V3({domain:t,message:n,primaryType:r,types:o});const i=["0x1901"];return t&&i.push(xN({domain:t,types:o})),r!=="EIP712Domain"&&i.push(G3({data:n,primaryType:r,types:o})),Ut(nn(i))}function xN({domain:e,types:t}){return G3({data:e,primaryType:"EIP712Domain",types:t})}function G3({data:e,primaryType:t,types:n}){const r=K3({data:e,primaryType:t,types:n});return Ut(r)}function K3({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],o=[CN({primaryType:t,types:n})];for(const i of n[t]){const[l,c]=J3({types:n,name:i.name,type:i.type,value:e[i.name]});r.push(l),o.push(c)}return ji(r,o)}function CN({primaryType:e,types:t}){const n=Ao(kN({primaryType:e,types:t}));return Ut(n)}function kN({primaryType:e,types:t}){let n="";const r=Y3({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const i of o)n+=`${i}(${t[i].map(({name:l,type:c})=>`${c} ${l}`).join(",")})`;return n}function Y3({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),o=r==null?void 0:r[0];if(n.has(o)||t[o]===void 0)return n;n.add(o);for(const i of t[o])Y3({primaryType:i.type,types:t},n);return n}function J3({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},Ut(K3({data:r,primaryType:n,types:e}))];if(n==="bytes")return[{type:"bytes32"},Ut(r)];if(n==="string")return[{type:"bytes32"},Ut(Ao(r))];if(n.lastIndexOf("]")===n.length-1){const o=n.slice(0,n.lastIndexOf("[")),i=r.map(l=>J3({name:t,type:o,types:e,value:l}));return[{type:"bytes32"},Ut(ji(i.map(([l])=>l),i.map(([,l])=>l)))]}return[{type:n},r]}class EN extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const AN={checksum:new EN(8192)},I0=AN.checksum;class Z3 extends sy{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,t4(t);const r=Df(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,i=new Uint8Array(o);i.set(r.length>o?t.create().update(r).digest():r);for(let l=0;l<i.length;l++)i[l]^=54;this.iHash.update(i),this.oHash=t.create();for(let l=0;l<i.length;l++)i[l]^=106;this.oHash.update(i),bs(i)}update(t){return Wa(this),this.iHash.update(t),this}digestInto(t){Wa(this),ws(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:i,blockLen:l,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=i,t.blockLen=l,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const X3=(e,t,n)=>new Z3(e,t).update(n).digest();X3.create=(e,t)=>new Z3(e,t);function eC(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=E5(bI(e));return n==="Bytes"?r:jr(r)}const SN=/^0x[a-fA-F0-9]{40}$/;function rh(e,t={}){const{strict:n=!0}=t;if(!SN.test(e))throw new D6({address:e,cause:new jN});if(n){if(e.toLowerCase()===e)return;if(tC(e)!==e)throw new D6({address:e,cause:new IN})}}function tC(e){if(I0.has(e))return I0.get(e);rh(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=eC(CI(t),{as:"Bytes"}),r=t.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const o=`0x${r.join("")}`;return I0.set(e,o),o}function Jm(e,t={}){const{strict:n=!0}=t??{};try{return rh(e,{strict:n}),!0}catch{return!1}}class D6 extends De{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class jN extends De{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class IN extends De{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const NN=/^(.*)\[([0-9]*)\]$/,PN=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,nC=/^(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)?$/,U6=2n**256n-1n;function xa(e,t,n){const{checksumAddress:r,staticPosition:o}=n,i=zy(t.type);if(i){const[l,c]=i;return TN(e,{...t,type:c},{checksumAddress:r,length:l,staticPosition:o})}if(t.type==="tuple")return ON(e,t,{checksumAddress:r,staticPosition:o});if(t.type==="address")return BN(e,{checksum:r});if(t.type==="bool")return _N(e);if(t.type.startsWith("bytes"))return RN(e,t,{staticPosition:o});if(t.type.startsWith("uint")||t.type.startsWith("int"))return MN(e,t);if(t.type==="string")return FN(e,{staticPosition:o});throw new qy(t.type)}const $6=32,Zm=32;function BN(e,t={}){const{checksum:n=!1}=t,r=e.readBytes(32);return[(i=>n?tC(i):i)(jr(EI(r,-20))),32]}function TN(e,t,n){const{checksumAddress:r,length:o,staticPosition:i}=n;if(!o){const d=Co(e.readBytes(Zm)),f=i+d,p=f+$6;e.setPosition(f);const m=Co(e.readBytes($6)),g=Lc(t);let v=0;const w=[];for(let b=0;b<m;++b){e.setPosition(p+(g?b*32:v));const[C,S]=xa(e,t,{checksumAddress:r,staticPosition:p});v+=S,w.push(C)}return e.setPosition(i+32),[w,32]}if(Lc(t)){const d=Co(e.readBytes(Zm)),f=i+d,p=[];for(let m=0;m<o;++m){e.setPosition(f+m*32);const[g]=xa(e,t,{checksumAddress:r,staticPosition:f});p.push(g)}return e.setPosition(i+32),[p,32]}let l=0;const c=[];for(let d=0;d<o;++d){const[f,p]=xa(e,t,{checksumAddress:r,staticPosition:i+l});l+=p,c.push(f)}return[c,l]}function _N(e){return[SI(e.readBytes(32),{size:32}),32]}function RN(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const l=Co(e.readBytes(32));e.setPosition(n+l);const c=Co(e.readBytes(32));if(c===0)return e.setPosition(n+32),["0x",32];const d=e.readBytes(c);return e.setPosition(n+32),[jr(d),32]}return[jr(e.readBytes(Number.parseInt(o,10),32)),32]}function MN(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?AI(o,{signed:n}):Co(o,{signed:n}),32]}function ON(e,t,n){const{checksumAddress:r,staticPosition:o}=n,i=t.components.length===0||t.components.some(({name:d})=>!d),l=i?[]:{};let c=0;if(Lc(t)){const d=Co(e.readBytes(Zm)),f=o+d;for(let p=0;p<t.components.length;++p){const m=t.components[p];e.setPosition(f+c);const[g,v]=xa(e,m,{checksumAddress:r,staticPosition:f});c+=v,l[i?p:m==null?void 0:m.name]=g}return e.setPosition(o+32),[l,32]}for(let d=0;d<t.components.length;++d){const f=t.components[d],[p,m]=xa(e,f,{checksumAddress:r,staticPosition:o});l[i?d:f==null?void 0:f.name]=p,c+=m}return[l,c]}function FN(e,{staticPosition:t}){const n=Co(e.readBytes(32)),r=t+n;e.setPosition(r);const o=Co(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const i=e.readBytes(o,32),l=jI(a3(i));return e.setPosition(t+32),[l,32]}function LN({checksumAddress:e,parameters:t,values:n}){const r=[];for(let o=0;o<t.length;o++)r.push(Uy({checksumAddress:e,parameter:t[o],value:n[o]}));return r}function Uy({checksumAddress:e=!1,parameter:t,value:n}){const r=t,o=zy(r.type);if(o){const[i,l]=o;return UN(n,{checksumAddress:e,length:i,parameter:{...r,type:l}})}if(r.type==="tuple")return HN(n,{checksumAddress:e,parameter:r});if(r.type==="address")return DN(n,{checksum:e});if(r.type==="bool")return zN(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const i=r.type.startsWith("int"),[,,l="256"]=nC.exec(r.type)??[];return WN(n,{signed:i,size:Number(l)})}if(r.type.startsWith("bytes"))return $N(n,{type:r.type});if(r.type==="string")return qN(n);throw new qy(r.type)}function $y(e){let t=0;for(let i=0;i<e.length;i++){const{dynamic:l,encoded:c}=e[i];l?t+=32:t+=Qn(c)}const n=[],r=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:l,encoded:c}=e[i];l?(n.push(fn(t+o,{size:32})),r.push(c),o+=Qn(c)):n.push(c)}return Sr(...n,...r)}function DN(e,t){const{checksum:n=!1}=t;return rh(e,{strict:n}),{dynamic:!1,encoded:vi(e.toLowerCase())}}function UN(e,t){const{checksumAddress:n,length:r,parameter:o}=t,i=r===null;if(!Array.isArray(e))throw new eP(e);if(!i&&e.length!==r)throw new XN({expectedLength:r,givenLength:e.length,type:`${o.type}[${r}]`});let l=!1;const c=[];for(let d=0;d<e.length;d++){const f=Uy({checksumAddress:n,parameter:o,value:e[d]});f.dynamic&&(l=!0),c.push(f)}if(i||l){const d=$y(c);if(i){const f=fn(c.length,{size:32});return{dynamic:!0,encoded:c.length>0?Sr(f,d):f}}if(l)return{dynamic:!0,encoded:d}}return{dynamic:!1,encoded:Sr(...c.map(({encoded:d})=>d))}}function $N(e,{type:t}){const[,n]=t.split("bytes"),r=Qn(e);if(!n){let o=e;return r%32!==0&&(o=wi(o,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:Sr(vi(fn(r,{size:32})),o)}}if(r!==Number.parseInt(n,10))throw new oC({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:wi(e)}}function zN(e){if(typeof e!="boolean")throw new De(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:vi(l3(e))}}function WN(e,{signed:t,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new d3({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:fn(e,{size:32,signed:t})}}function qN(e){const t=xy(e),n=Math.ceil(Qn(t)/32),r=[];for(let o=0;o<n;o++)r.push(wi(Wr(t,o*32,(o+1)*32)));return{dynamic:!0,encoded:Sr(wi(fn(Qn(t),{size:32})),...r)}}function HN(e,t){const{checksumAddress:n,parameter:r}=t;let o=!1;const i=[];for(let l=0;l<r.components.length;l++){const c=r.components[l],d=Array.isArray(e)?l:c.name,f=Uy({checksumAddress:n,parameter:c,value:e[d]});i.push(f),f.dynamic&&(o=!0)}return{dynamic:o,encoded:o?$y(i):Sr(...i.map(({encoded:l})=>l))}}function zy(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Lc(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(Lc);const n=zy(e.type);return!!(n&&Lc({...e,type:n[1]}))}const VN={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new KN({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new GN({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new z6({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new z6({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function QN(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(VN);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}class z6 extends De{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class GN extends De{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class KN extends De{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function YN(e,t,n={}){const{as:r="Array",checksumAddress:o=!1}=n,i=typeof t=="string"?i3(t):t,l=QN(i);if(ma(i)===0&&e.length>0)throw new ZN;if(ma(i)&&ma(i)<32)throw new JN({data:typeof t=="string"?t:jr(t),parameters:e,size:ma(i)});let c=0;const d=r==="Array"?[]:{};for(let f=0;f<e.length;++f){const p=e[f];l.setPosition(c);const[m,g]=xa(l,p,{checksumAddress:o,staticPosition:0});c+=g,r==="Array"?d.push(m):d[p.name??f]=m}return d}function Wy(e,t,n){const{checksumAddress:r=!1}={};if(e.length!==t.length)throw new sC({expectedLength:e.length,givenLength:t.length});const o=LN({checksumAddress:r,parameters:e,values:t}),i=$y(o);return i.length===0?"0x":i}function Xm(e,t){if(e.length!==t.length)throw new sC({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r];n.push(Xm.encode(o,i))}return Sr(...n)}(function(e){function t(n,r,o=!1){if(n==="address"){const d=r;return rh(d),vi(d.toLowerCase(),o?32:0)}if(n==="string")return xy(r);if(n==="bytes")return r;if(n==="bool")return vi(l3(r),o?32:1);const i=n.match(nC);if(i){const[d,f,p="256"]=i,m=Number.parseInt(p,10)/8;return fn(r,{size:o?32:m,signed:f==="int"})}const l=n.match(PN);if(l){const[d,f]=l;if(Number.parseInt(f,10)!==(r.length-2)/2)throw new oC({expectedSize:Number.parseInt(f,10),value:r});return wi(r,o?32:0)}const c=n.match(NN);if(c&&Array.isArray(r)){const[d,f]=c,p=[];for(let m=0;m<r.length;m++)p.push(t(f,r[m],!0));return p.length===0?"0x":Sr(...p)}throw new qy(n)}e.encode=t})(Xm||(Xm={}));function rC(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?y6(e):e}class JN extends De{constructor({data:t,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ha(n)})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class ZN extends De{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class XN extends De{constructor({expectedLength:t,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class oC extends De{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Qn(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class sC extends De{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
82
+ `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class eP extends De{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class qy extends De{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const In=BigInt(0),hn=BigInt(1),Js=BigInt(2),tP=BigInt(3),iC=BigInt(4),aC=BigInt(5),lC=BigInt(8);function jn(e,t){const n=e%t;return n>=In?n:t+n}function tr(e,t,n){let r=e;for(;t-- >In;)r*=r,r%=n;return r}function eg(e,t){if(e===In)throw new Error("invert: expected non-zero number");if(t<=In)throw new Error("invert: expected positive modulus, got "+t);let n=jn(e,t),r=t,o=In,i=hn;for(;n!==In;){const c=r/n,d=r%n,f=o-i*c;r=n,n=d,o=i,i=f}if(r!==hn)throw new Error("invert: does not exist");return jn(o,t)}function cC(e,t){const n=(e.ORDER+hn)/iC,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function nP(e,t){const n=(e.ORDER-aC)/lC,r=e.mul(t,Js),o=e.pow(r,n),i=e.mul(t,o),l=e.mul(e.mul(i,Js),o),c=e.mul(i,e.sub(l,e.ONE));if(!e.eql(e.sqr(c),t))throw new Error("Cannot find square root");return c}function rP(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-hn,n=0;for(;t%Js===In;)t/=Js,n++;let r=Js;const o=Hy(e);for(;W6(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return cC;let i=o.pow(r,t);const l=(t+hn)/Js;return function(d,f){if(d.is0(f))return f;if(W6(d,f)!==1)throw new Error("Cannot find square root");let p=n,m=d.mul(d.ONE,i),g=d.pow(f,t),v=d.pow(f,l);for(;!d.eql(g,d.ONE);){if(d.is0(g))return d.ZERO;let w=1,b=d.sqr(g);for(;!d.eql(b,d.ONE);)if(w++,b=d.sqr(b),w===p)throw new Error("Cannot find square root");const C=hn<<BigInt(p-w-1),S=d.pow(m,C);p=w,m=d.sqr(S),g=d.mul(g,m),v=d.mul(v,S)}return v}}function oP(e){return e%iC===tP?cC:e%lC===aC?nP:rP(e)}const sP=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function iP(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=sP.reduce((r,o)=>(r[o]="function",r),t);return Qf(e,n)}function aP(e,t,n){if(n<In)throw new Error("invalid exponent, negatives unsupported");if(n===In)return e.ONE;if(n===hn)return t;let r=e.ONE,o=t;for(;n>In;)n&hn&&(r=e.mul(r,o)),o=e.sqr(o),n>>=hn;return r}function uC(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((l,c,d)=>e.is0(c)?l:(r[d]=l,e.mul(l,c)),e.ONE),i=e.inv(o);return t.reduceRight((l,c,d)=>e.is0(c)?l:(r[d]=e.mul(l,r[d]),e.mul(l,c)),i),r}function W6(e,t){const n=(e.ORDER-hn)/Js,r=e.pow(t,n),o=e.eql(r,e.ONE),i=e.eql(r,e.ZERO),l=e.eql(r,e.neg(e.ONE));if(!o&&!i&&!l)throw new Error("invalid Legendre symbol result");return o?1:i?0:-1}function dC(e,t){t!==void 0&&yc(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Hy(e,t,n=!1,r={}){if(e<=In)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:o,nByteLength:i}=dC(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const c=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:i,MASK:Vf(o),ZERO:In,ONE:hn,create:d=>jn(d,e),isValid:d=>{if(typeof d!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof d);return In<=d&&d<e},is0:d=>d===In,isOdd:d=>(d&hn)===hn,neg:d=>jn(-d,e),eql:(d,f)=>d===f,sqr:d=>jn(d*d,e),add:(d,f)=>jn(d+f,e),sub:(d,f)=>jn(d-f,e),mul:(d,f)=>jn(d*f,e),pow:(d,f)=>aP(c,d,f),div:(d,f)=>jn(d*eg(f,e),e),sqrN:d=>d*d,addN:(d,f)=>d+f,subN:(d,f)=>d-f,mulN:(d,f)=>d*f,inv:d=>eg(d,e),sqrt:r.sqrt||(d=>(l||(l=oP(e)),l(c,d))),toBytes:d=>n?t3(d,i):mu(d,i),fromBytes:d=>{if(d.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+d.length);return n?e3(d):di(d)},invertBatch:d=>uC(c,d),cmov:(d,f,p)=>p?f:d});return Object.freeze(c)}function fC(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function hC(e){const t=fC(e);return t+Math.ceil(t/2)}function lP(e,t,n=!1){const r=e.length,o=fC(t),i=hC(t);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const l=n?e3(e):di(e),c=jn(l,t-hn)+hn;return n?t3(c,o):mu(c,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const q6=BigInt(0),tg=BigInt(1);function N0(e,t){const n=t.negate();return e?n:t}function pC(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function P0(e,t){pC(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),o=2**e,i=Vf(e),l=BigInt(e);return{windows:n,windowSize:r,mask:i,maxNumber:o,shiftBy:l}}function H6(e,t,n){const{windowSize:r,mask:o,maxNumber:i,shiftBy:l}=n;let c=Number(e&o),d=e>>l;c>r&&(c-=i,d+=tg);const f=t*r,p=f+Math.abs(c)-1,m=c===0,g=c<0,v=t%2!==0;return{nextN:d,offset:p,isZero:m,isNeg:g,isNegF:v,offsetF:f}}function cP(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function uP(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const B0=new WeakMap,mC=new WeakMap;function T0(e){return mC.get(e)||1}function dP(e,t){return{constTimeNegate:N0,hasPrecomputes(n){return T0(n)!==1},unsafeLadder(n,r,o=e.ZERO){let i=n;for(;r>q6;)r&tg&&(o=o.add(i)),i=i.double(),r>>=tg;return o},precomputeWindow(n,r){const{windows:o,windowSize:i}=P0(r,t),l=[];let c=n,d=c;for(let f=0;f<o;f++){d=c,l.push(d);for(let p=1;p<i;p++)d=d.add(c),l.push(d);c=d.double()}return l},wNAF(n,r,o){let i=e.ZERO,l=e.BASE;const c=P0(n,t);for(let d=0;d<c.windows;d++){const{nextN:f,offset:p,isZero:m,isNeg:g,isNegF:v,offsetF:w}=H6(o,d,c);o=f,m?l=l.add(N0(v,r[w])):i=i.add(N0(g,r[p]))}return{p:i,f:l}},wNAFUnsafe(n,r,o,i=e.ZERO){const l=P0(n,t);for(let c=0;c<l.windows&&o!==q6;c++){const{nextN:d,offset:f,isZero:p,isNeg:m}=H6(o,c,l);if(o=d,!p){const g=r[f];i=i.add(m?g.negate():g)}}return i},getPrecomputes(n,r,o){let i=B0.get(r);return i||(i=this.precomputeWindow(r,n),n!==1&&B0.set(r,o(i))),i},wNAFCached(n,r,o){const i=T0(n);return this.wNAF(i,this.getPrecomputes(i,n,o),r)},wNAFCachedUnsafe(n,r,o,i){const l=T0(n);return l===1?this.unsafeLadder(n,r,i):this.wNAFUnsafe(l,this.getPrecomputes(l,n,o),r,i)},setWindowSize(n,r){pC(r,t),mC.set(n,r),B0.delete(n)}}}function fP(e,t,n,r){cP(n,e),uP(r,t);const o=n.length,i=r.length;if(o!==i)throw new Error("arrays of points and scalars must have equal length");const l=e.ZERO,c=cI(BigInt(o));let d=1;c>12?d=c-3:c>4?d=c-2:c>0&&(d=2);const f=Vf(d),p=new Array(Number(f)+1).fill(l),m=Math.floor((t.BITS-1)/d)*d;let g=l;for(let v=m;v>=0;v-=d){p.fill(l);for(let b=0;b<i;b++){const C=r[b],S=Number(C>>BigInt(v)&f);p[S]=p[S].add(n[b])}let w=l;for(let b=p.length-1,C=l;b>0;b--)C=C.add(p[b]),w=w.add(C);if(g=g.add(w),v!==0)for(let b=0;b<d;b++)g=g.double()}return g}function gC(e){return iP(e.Fp),Qf(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...dC(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function V6(e){e.lowS!==void 0&&Oc("lowS",e.lowS),e.prehash!==void 0&&Oc("prehash",e.prehash)}function hP(e){const t=gC(e);Qf(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class pP extends Error{constructor(t=""){super(t)}}const po={Err:pP,_tlv:{encode:(e,t)=>{const{Err:n}=po;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=zd(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?zd(o.length/2|128):"";return zd(e)+i+o+t},decode(e,t){const{Err:n}=po;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++],i=!!(o&128);let l=0;if(!i)l=o;else{const d=o&127;if(!d)throw new n("tlv.decode(long): indefinite length not supported");if(d>4)throw new n("tlv.decode(long): byte length is too big");const f=t.subarray(r,r+d);if(f.length!==d)throw new n("tlv.decode: length bytes not complete");if(f[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const p of f)l=l<<8|p;if(r+=d,l<128)throw new n("tlv.decode(long): not minimal encoding")}const c=t.subarray(r,r+l);if(c.length!==l)throw new n("tlv.decode: wrong value length");return{v:c,l:t.subarray(r+l)}}},_int:{encode(e){const{Err:t}=po;if(e<wo)throw new t("integer: negative integers are not allowed");let n=zd(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=po;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return di(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=po,o=nr("signature",e),{v:i,l}=r.decode(48,o);if(l.length)throw new t("invalid signature: left bytes after parsing");const{v:c,l:d}=r.decode(2,i),{v:f,l:p}=r.decode(2,d);if(p.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(c),s:n.decode(f)}},hexFromSig(e){const{_tlv:t,_int:n}=po,r=t.encode(2,n.encode(e.r)),o=t.encode(2,n.encode(e.s)),i=r+o;return t.encode(48,i)}};function _0(e,t){return Fc(mu(e,t))}const wo=BigInt(0),_t=BigInt(1);BigInt(2);const R0=BigInt(3),mP=BigInt(4);function gP(e){const t=hP(e),{Fp:n}=t,r=Hy(t.n,t.nBitLength),o=t.toBytes||((A,j,N)=>{const _=j.toAffine();return yf(Uint8Array.from([4]),n.toBytes(_.x),n.toBytes(_.y))}),i=t.fromBytes||(A=>{const j=A.subarray(1),N=n.fromBytes(j.subarray(0,n.BYTES)),_=n.fromBytes(j.subarray(n.BYTES,2*n.BYTES));return{x:N,y:_}});function l(A){const{a:j,b:N}=t,_=n.sqr(A),P=n.mul(_,A);return n.add(n.add(P,n.mul(A,j)),N)}function c(A,j){const N=n.sqr(j),_=l(A);return n.eql(N,_)}if(!c(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const d=n.mul(n.pow(t.a,R0),mP),f=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(d,f)))throw new Error("bad curve params: a or b");function p(A){return by(A,_t,t.n)}function m(A){const{allowedPrivateKeyLengths:j,nByteLength:N,wrapPrivateKey:_,n:P}=t;if(j&&typeof A!="bigint"){if(pu(A)&&(A=Fc(A)),typeof A!="string"||!j.includes(A.length))throw new Error("invalid private key");A=A.padStart(N*2,"0")}let R;try{R=typeof A=="bigint"?A:di(nr("private key",A,N))}catch{throw new Error("invalid private key, expected hex or "+N+" bytes, got "+typeof A)}return _&&(R=jn(R,P)),ba("private key",R,_t,P),R}function g(A){if(!(A instanceof b))throw new Error("ProjectivePoint expected")}const v=A6((A,j)=>{const{px:N,py:_,pz:P}=A;if(n.eql(P,n.ONE))return{x:N,y:_};const R=A.is0();j==null&&(j=R?n.ONE:n.inv(P));const M=n.mul(N,j),Q=n.mul(_,j),V=n.mul(P,j);if(R)return{x:n.ZERO,y:n.ZERO};if(!n.eql(V,n.ONE))throw new Error("invZ was invalid");return{x:M,y:Q}}),w=A6(A=>{if(A.is0()){if(t.allowInfinityPoint&&!n.is0(A.py))return;throw new Error("bad point: ZERO")}const{x:j,y:N}=A.toAffine();if(!n.isValid(j)||!n.isValid(N))throw new Error("bad point: x or y not FE");if(!c(j,N))throw new Error("bad point: equation left != right");if(!A.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class b{constructor(j,N,_){if(j==null||!n.isValid(j))throw new Error("x required");if(N==null||!n.isValid(N)||n.is0(N))throw new Error("y required");if(_==null||!n.isValid(_))throw new Error("z required");this.px=j,this.py=N,this.pz=_,Object.freeze(this)}static fromAffine(j){const{x:N,y:_}=j||{};if(!j||!n.isValid(N)||!n.isValid(_))throw new Error("invalid affine point");if(j instanceof b)throw new Error("projective point not allowed");const P=R=>n.eql(R,n.ZERO);return P(N)&&P(_)?b.ZERO:new b(N,_,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(j){const N=uC(n,j.map(_=>_.pz));return j.map((_,P)=>_.toAffine(N[P])).map(b.fromAffine)}static fromHex(j){const N=b.fromAffine(i(nr("pointHex",j)));return N.assertValidity(),N}static fromPrivateKey(j){return b.BASE.multiply(m(j))}static msm(j,N){return fP(b,r,j,N)}_setWindowSize(j){I.setWindowSize(this,j)}assertValidity(){w(this)}hasEvenY(){const{y:j}=this.toAffine();if(n.isOdd)return!n.isOdd(j);throw new Error("Field doesn't support isOdd")}equals(j){g(j);const{px:N,py:_,pz:P}=this,{px:R,py:M,pz:Q}=j,V=n.eql(n.mul(N,Q),n.mul(R,P)),H=n.eql(n.mul(_,Q),n.mul(M,P));return V&&H}negate(){return new b(this.px,n.neg(this.py),this.pz)}double(){const{a:j,b:N}=t,_=n.mul(N,R0),{px:P,py:R,pz:M}=this;let Q=n.ZERO,V=n.ZERO,H=n.ZERO,L=n.mul(P,P),z=n.mul(R,R),O=n.mul(M,M),K=n.mul(P,R);return K=n.add(K,K),H=n.mul(P,M),H=n.add(H,H),Q=n.mul(j,H),V=n.mul(_,O),V=n.add(Q,V),Q=n.sub(z,V),V=n.add(z,V),V=n.mul(Q,V),Q=n.mul(K,Q),H=n.mul(_,H),O=n.mul(j,O),K=n.sub(L,O),K=n.mul(j,K),K=n.add(K,H),H=n.add(L,L),L=n.add(H,L),L=n.add(L,O),L=n.mul(L,K),V=n.add(V,L),O=n.mul(R,M),O=n.add(O,O),L=n.mul(O,K),Q=n.sub(Q,L),H=n.mul(O,z),H=n.add(H,H),H=n.add(H,H),new b(Q,V,H)}add(j){g(j);const{px:N,py:_,pz:P}=this,{px:R,py:M,pz:Q}=j;let V=n.ZERO,H=n.ZERO,L=n.ZERO;const z=t.a,O=n.mul(t.b,R0);let K=n.mul(N,R),J=n.mul(_,M),F=n.mul(P,Q),Z=n.add(N,_),Y=n.add(R,M);Z=n.mul(Z,Y),Y=n.add(K,J),Z=n.sub(Z,Y),Y=n.add(N,P);let U=n.add(R,Q);return Y=n.mul(Y,U),U=n.add(K,F),Y=n.sub(Y,U),U=n.add(_,P),V=n.add(M,Q),U=n.mul(U,V),V=n.add(J,F),U=n.sub(U,V),L=n.mul(z,Y),V=n.mul(O,F),L=n.add(V,L),V=n.sub(J,L),L=n.add(J,L),H=n.mul(V,L),J=n.add(K,K),J=n.add(J,K),F=n.mul(z,F),Y=n.mul(O,Y),J=n.add(J,F),F=n.sub(K,F),F=n.mul(z,F),Y=n.add(Y,F),K=n.mul(J,Y),H=n.add(H,K),K=n.mul(U,Y),V=n.mul(Z,V),V=n.sub(V,K),K=n.mul(Z,J),L=n.mul(U,L),L=n.add(L,K),new b(V,H,L)}subtract(j){return this.add(j.negate())}is0(){return this.equals(b.ZERO)}wNAF(j){return I.wNAFCached(this,j,b.normalizeZ)}multiplyUnsafe(j){const{endo:N,n:_}=t;ba("scalar",j,wo,_);const P=b.ZERO;if(j===wo)return P;if(this.is0()||j===_t)return this;if(!N||I.hasPrecomputes(this))return I.wNAFCachedUnsafe(this,j,b.normalizeZ);let{k1neg:R,k1:M,k2neg:Q,k2:V}=N.splitScalar(j),H=P,L=P,z=this;for(;M>wo||V>wo;)M&_t&&(H=H.add(z)),V&_t&&(L=L.add(z)),z=z.double(),M>>=_t,V>>=_t;return R&&(H=H.negate()),Q&&(L=L.negate()),L=new b(n.mul(L.px,N.beta),L.py,L.pz),H.add(L)}multiply(j){const{endo:N,n:_}=t;ba("scalar",j,_t,_);let P,R;if(N){const{k1neg:M,k1:Q,k2neg:V,k2:H}=N.splitScalar(j);let{p:L,f:z}=this.wNAF(Q),{p:O,f:K}=this.wNAF(H);L=I.constTimeNegate(M,L),O=I.constTimeNegate(V,O),O=new b(n.mul(O.px,N.beta),O.py,O.pz),P=L.add(O),R=z.add(K)}else{const{p:M,f:Q}=this.wNAF(j);P=M,R=Q}return b.normalizeZ([P,R])[0]}multiplyAndAddUnsafe(j,N,_){const P=b.BASE,R=(Q,V)=>V===wo||V===_t||!Q.equals(P)?Q.multiplyUnsafe(V):Q.multiply(V),M=R(this,N).add(R(j,_));return M.is0()?void 0:M}toAffine(j){return v(this,j)}isTorsionFree(){const{h:j,isTorsionFree:N}=t;if(j===_t)return!0;if(N)return N(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:j,clearCofactor:N}=t;return j===_t?this:N?N(b,this):this.multiplyUnsafe(t.h)}toRawBytes(j=!0){return Oc("isCompressed",j),this.assertValidity(),o(b,this,j)}toHex(j=!0){return Oc("isCompressed",j),Fc(this.toRawBytes(j))}}b.BASE=new b(t.Gx,t.Gy,n.ONE),b.ZERO=new b(n.ZERO,n.ONE,n.ZERO);const{endo:C,nBitLength:S}=t,I=dP(b,C?Math.ceil(S/2):S);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:m,weierstrassEquation:l,isWithinCurveOrder:p}}function yP(e){const t=gC(e);return Qf(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function vP(e){const t=yP(e),{Fp:n,n:r,nByteLength:o,nBitLength:i}=t,l=n.BYTES+1,c=2*n.BYTES+1;function d(O){return jn(O,r)}function f(O){return eg(O,r)}const{ProjectivePoint:p,normPrivateKeyToScalar:m,weierstrassEquation:g,isWithinCurveOrder:v}=gP({...t,toBytes(O,K,J){const F=K.toAffine(),Z=n.toBytes(F.x),Y=yf;return Oc("isCompressed",J),J?Y(Uint8Array.from([K.hasEvenY()?2:3]),Z):Y(Uint8Array.from([4]),Z,n.toBytes(F.y))},fromBytes(O){const K=O.length,J=O[0],F=O.subarray(1);if(K===l&&(J===2||J===3)){const Z=di(F);if(!by(Z,_t,n.ORDER))throw new Error("Point is not on curve");const Y=g(Z);let U;try{U=n.sqrt(Y)}catch(se){const ie=se instanceof Error?": "+se.message:"";throw new Error("Point is not on curve"+ie)}const ee=(U&_t)===_t;return(J&1)===1!==ee&&(U=n.neg(U)),{x:Z,y:U}}else if(K===c&&J===4){const Z=n.fromBytes(F.subarray(0,n.BYTES)),Y=n.fromBytes(F.subarray(n.BYTES,2*n.BYTES));return{x:Z,y:Y}}else{const Z=l,Y=c;throw new Error("invalid Point, expected length of "+Z+", or uncompressed "+Y+", got "+K)}}});function w(O){const K=r>>_t;return O>K}function b(O){return w(O)?d(-O):O}const C=(O,K,J)=>di(O.slice(K,J));class S{constructor(K,J,F){ba("r",K,_t,r),ba("s",J,_t,r),this.r=K,this.s=J,F!=null&&(this.recovery=F),Object.freeze(this)}static fromCompact(K){const J=o;return K=nr("compactSignature",K,J*2),new S(C(K,0,J),C(K,J,2*J))}static fromDER(K){const{r:J,s:F}=po.toSig(nr("DER",K));return new S(J,F)}assertValidity(){}addRecoveryBit(K){return new S(this.r,this.s,K)}recoverPublicKey(K){const{r:J,s:F,recovery:Z}=this,Y=P(nr("msgHash",K));if(Z==null||![0,1,2,3].includes(Z))throw new Error("recovery id invalid");const U=Z===2||Z===3?J+t.n:J;if(U>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const ee=(Z&1)===0?"02":"03",he=p.fromHex(ee+_0(U,n.BYTES)),se=f(U),ie=d(-Y*se),re=d(F*se),ue=p.BASE.multiplyAndAddUnsafe(he,ie,re);if(!ue)throw new Error("point at infinify");return ue.assertValidity(),ue}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return gf(this.toDERHex())}toDERHex(){return po.hexFromSig(this)}toCompactRawBytes(){return gf(this.toCompactHex())}toCompactHex(){const K=o;return _0(this.r,K)+_0(this.s,K)}}const I={isValidPrivateKey(O){try{return m(O),!0}catch{return!1}},normPrivateKeyToScalar:m,randomPrivateKey:()=>{const O=hC(t.n);return lP(t.randomBytes(O),t.n)},precompute(O=8,K=p.BASE){return K._setWindowSize(O),K.multiply(BigInt(3)),K}};function A(O,K=!0){return p.fromPrivateKey(O).toRawBytes(K)}function j(O){if(typeof O=="bigint")return!1;if(O instanceof p)return!0;const J=nr("key",O).length,F=n.BYTES,Z=F+1,Y=2*F+1;if(!(t.allowedPrivateKeyLengths||o===Z))return J===Z||J===Y}function N(O,K,J=!0){if(j(O)===!0)throw new Error("first arg must be private key");if(j(K)===!1)throw new Error("second arg must be public key");return p.fromHex(K).multiply(m(O)).toRawBytes(J)}const _=t.bits2int||function(O){if(O.length>8192)throw new Error("input is too large");const K=di(O),J=O.length*8-i;return J>0?K>>BigInt(J):K},P=t.bits2int_modN||function(O){return d(_(O))},R=Vf(i);function M(O){return ba("num < 2^"+i,O,wo,R),mu(O,o)}function Q(O,K,J=V){if(["recovered","canonical"].some(Pe=>Pe in J))throw new Error("sign() legacy options not supported");const{hash:F,randomBytes:Z}=t;let{lowS:Y,prehash:U,extraEntropy:ee}=J;Y==null&&(Y=!0),O=nr("msgHash",O),V6(J),U&&(O=nr("prehashed msgHash",F(O)));const he=P(O),se=m(K),ie=[M(se),M(he)];if(ee!=null&&ee!==!1){const Pe=ee===!0?Z(n.BYTES):ee;ie.push(nr("extraEntropy",Pe))}const re=yf(...ie),ue=he;function Se(Pe){const Oe=_(Pe);if(!v(Oe))return;const pt=f(Oe),It=p.BASE.multiply(Oe).toAffine(),mt=d(It.x);if(mt===wo)return;const Wt=d(pt*d(ue+mt*se));if(Wt===wo)return;let rn=(It.x===mt?0:2)|Number(It.y&_t),rt=Wt;return Y&&w(Wt)&&(rt=b(Wt),rn^=1),new S(mt,rt,rn)}return{seed:re,k2sig:Se}}const V={lowS:t.lowS,prehash:!1},H={lowS:t.lowS,prehash:!1};function L(O,K,J=V){const{seed:F,k2sig:Z}=Q(O,K,J),Y=t;return uI(Y.hash.outputLen,Y.nByteLength,Y.hmac)(F,Z)}p.BASE._setWindowSize(8);function z(O,K,J,F=H){var rn;const Z=O;K=nr("msgHash",K),J=nr("publicKey",J);const{lowS:Y,prehash:U,format:ee}=F;if(V6(F),"strict"in F)throw new Error("options.strict was renamed to lowS");if(ee!==void 0&&ee!=="compact"&&ee!=="der")throw new Error("format must be compact or der");const he=typeof Z=="string"||pu(Z),se=!he&&!ee&&typeof Z=="object"&&Z!==null&&typeof Z.r=="bigint"&&typeof Z.s=="bigint";if(!he&&!se)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let ie,re;try{if(se&&(ie=new S(Z.r,Z.s)),he){try{ee!=="compact"&&(ie=S.fromDER(Z))}catch(rt){if(!(rt instanceof po.Err))throw rt}!ie&&ee!=="der"&&(ie=S.fromCompact(Z))}re=p.fromHex(J)}catch{return!1}if(!ie||Y&&ie.hasHighS())return!1;U&&(K=t.hash(K));const{r:ue,s:Se}=ie,Pe=P(K),Oe=f(Se),pt=d(Pe*Oe),It=d(ue*Oe),mt=(rn=p.BASE.multiplyAndAddUnsafe(re,pt,It))==null?void 0:rn.toAffine();return mt?d(mt.x)===ue:!1}return{CURVE:t,getPublicKey:A,getSharedSecret:N,sign:L,verify:z,ProjectivePoint:p,Signature:S,utils:I}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function wP(e){return{hash:e,hmac:(t,...n)=>X3(e,t,l4(...n)),randomBytes:c4}}function bP(e,t){const n=r=>vP({...e,...wP(r)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const yC=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Q6=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),xP=BigInt(0),CP=BigInt(1),ng=BigInt(2),G6=(e,t)=>(e+t/ng)/t;function kP(e){const t=yC,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),l=BigInt(23),c=BigInt(44),d=BigInt(88),f=e*e*e%t,p=f*f*e%t,m=tr(p,n,t)*p%t,g=tr(m,n,t)*p%t,v=tr(g,ng,t)*f%t,w=tr(v,o,t)*v%t,b=tr(w,i,t)*w%t,C=tr(b,c,t)*b%t,S=tr(C,d,t)*C%t,I=tr(S,c,t)*b%t,A=tr(I,n,t)*p%t,j=tr(A,l,t)*w%t,N=tr(j,r,t)*f%t,_=tr(N,ng,t);if(!rg.eql(rg.sqr(_),e))throw new Error("Cannot find square root");return _}const rg=Hy(yC,void 0,void 0,{sqrt:kP}),vC=bP({a:xP,b:BigInt(7),Fp:rg,n:Q6,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Q6,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-CP*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,l=BigInt("0x100000000000000000000000000000000"),c=G6(i*e,t),d=G6(-r*e,t);let f=jn(e-c*n-d*o,t),p=jn(-c*r-d*i,t);const m=f>l,g=p>l;if(m&&(f=t-f),g&&(p=t-p),f>l||p>l)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:m,k1:f,k2neg:g,k2:p}}}},L3),EP=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:vC},Symbol.toStringTag,{value:"Module"}));function wC(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new M0({signature:e});if(typeof e.s>"u")throw new M0({signature:e});if(n&&typeof e.yParity>"u")throw new M0({signature:e});if(e.r<0n||e.r>U6)throw new BP({value:e.r});if(e.s<0n||e.s>U6)throw new TP({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Qy({value:e.yParity})}function AP(e){return bC(jr(e))}function bC(e){if(e.length!==130&&e.length!==132)throw new PP({signature:e});const t=BigInt(Wr(e,0,32)),n=BigInt(Wr(e,32,64)),r=(()=>{const o=+`0x${e.slice(130)}`;if(!Number.isNaN(o))try{return Vy(o)}catch{throw new Qy({value:o})}})();return typeof r>"u"?{r:t,s:n}:{r:t,s:n,yParity:r}}function SP(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return jP(e)}function jP(e){const t=typeof e=="string"?bC(e):e instanceof Uint8Array?AP(e):typeof e.r=="string"?NP(e):e.v?IP(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return wC(t),t}function IP(e){return{r:e.r,s:e.s,yParity:Vy(e.v)}}function NP(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=Vy(n)),typeof r!="number")throw new Qy({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function Vy(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new _P({value:e})}class PP extends De{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${Qn(MI(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class M0 extends De{constructor({signature:t}){super(`Signature \`${s3(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class BP extends De{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class TP extends De{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class Qy extends De{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class _P extends De{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function RP(e,t={}){return typeof e.chainId=="string"?MP(e):{...e,...t.signature}}function MP(e){const{address:t,chainId:n,nonce:r}=e,o=SP(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...o}}const OP="0x8010801080108010801080108010801080108010801080108010801080108010",FP=rC("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function xC(e){if(typeof e=="string"){if(Wr(e,-32)!==OP)throw new UP(e)}else wC(e.authorization)}function LP(e){xC(e);const t=u3(Wr(e,-64,-32)),n=Wr(e,-t-64,-64),r=Wr(e,0,-t-64),[o,i,l]=YN(FP,n);return{authorization:RP({address:o.delegation,chainId:Number(o.chainId),nonce:o.nonce,yParity:o.yParity,r:o.r,s:o.s}),signature:r,...l&&l!=="0x"?{data:l,to:i}:{}}}function DP(e){try{return xC(e),!0}catch{return!1}}let UP=class extends De{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};function $P(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function zP(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?lr(e.nonce):void 0,storageProof:e.storageProof?$P(e.storageProof):void 0}}async function WP(e,{address:t,blockNumber:n,blockTag:r,storageKeys:o}){const i=r??"latest",l=n!==void 0?ge(n):void 0,c=await e.request({method:"eth_getProof",params:[t,o,l||i]});return zP(c)}async function qP(e,{address:t,blockNumber:n,blockTag:r="latest",slot:o}){const i=n!==void 0?ge(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,i||r]})}async function Gy(e,{blockHash:t,blockNumber:n,blockTag:r,hash:o,index:i,sender:l,nonce:c}){var g,v,w;const d=r||"latest",f=n!==void 0?ge(n):void 0;let p=null;if(o?p=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?p=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,ge(i)]},{dedupe:!0}):typeof i=="number"?p=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[f||d,ge(i)]},{dedupe:!!f}):l&&typeof c=="number"&&(p=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[l,ge(c)]},{dedupe:!0})),!p)throw new Q5({blockHash:t,blockNumber:n,blockTag:d,hash:o,index:i});return(((w=(v=(g=e.chain)==null?void 0:g.formatters)==null?void 0:v.transaction)==null?void 0:w.format)||Xf)(p,"getTransaction")}async function HP(e,{hash:t,transactionReceipt:n}){const[r,o]=await Promise.all([ve(e,xu,"getBlockNumber")({}),t?ve(e,Gy,"getTransaction")({hash:t}):void 0]),i=(n==null?void 0:n.blockNumber)||(o==null?void 0:o.blockNumber);return i?r-i+1n:0n}async function af(e,{hash:t}){var o,i,l;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new G5({hash:t});return(((l=(i=(o=e.chain)==null?void 0:o.formatters)==null?void 0:i.transactionReceipt)==null?void 0:l.format)||Dy)(n,"getTransactionReceipt")}async function CC(e,t){var I;const{account:n,authorizationList:r,allowFailure:o=!0,blockNumber:i,blockOverrides:l,blockTag:c,stateOverride:d}=t,f=t.contracts,{batchSize:p=t.batchSize??1024,deployless:m=t.deployless??!1}=typeof((I=e.batch)==null?void 0:I.multicall)=="object"?e.batch.multicall:{},g=(()=>{if(t.multicallAddress)return t.multicallAddress;if(m)return null;if(e.chain)return sl({blockNumber:i,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),v=[[]];let w=0,b=0;for(let A=0;A<f.length;A++){const{abi:j,address:N,args:_,functionName:P}=f[A];try{const R=_n({abi:j,args:_,functionName:P});b+=(R.length-2)/2,p>0&&b>p&&v[w].length>0&&(w++,b=(R.length-2)/2,v[w]=[]),v[w]=[...v[w],{allowFailure:!0,callData:R,target:N}]}catch(R){const M=yi(R,{abi:j,address:N,args:_,docsPath:"/docs/contract/multicall",functionName:P,sender:n});if(!o)throw M;v[w]=[...v[w],{allowFailure:!0,callData:"0x",target:N}]}}const C=await Promise.allSettled(v.map(A=>ve(e,cr,"readContract")({...g===null?{code:Cy}:{address:g},abi:Ua,account:n,args:[A],authorizationList:r,blockNumber:i,blockOverrides:l,blockTag:c,functionName:"aggregate3",stateOverride:d}))),S=[];for(let A=0;A<C.length;A++){const j=C[A];if(j.status==="rejected"){if(!o)throw j.reason;for(let _=0;_<v[A].length;_++)S.push({status:"failure",error:j.reason,result:void 0});continue}const N=j.value;for(let _=0;_<N.length;_++){const{returnData:P,success:R}=N[_],{callData:M}=v[A][_],{abi:Q,address:V,functionName:H,args:L}=f[S.length];try{if(M==="0x")throw new cu;if(!R)throw new qf({data:P});const z=Es({abi:Q,args:L,data:P,functionName:H});S.push(o?{result:z,status:"success"}:z)}catch(z){const O=yi(z,{abi:Q,address:V,args:L,docsPath:"/docs/contract/multicall",functionName:H});if(!o)throw O;S.push({error:O,result:void 0,status:"failure"})}}}if(S.length!==f.length)throw new oe("multicall results mismatch");return S}async function og(e,t){const{blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",blocks:o,returnFullTransactions:i,traceTransfers:l,validation:c}=t;try{const d=[];for(const g of o){const v=g.blockOverrides?h3(g.blockOverrides):void 0,w=g.calls.map(C=>{const S=C,I=S.account?nt(S.account):void 0,A=S.abi?_n(S):S.data,j={...S,account:I,data:S.dataSuffix?nn([A||"0x",S.dataSuffix]):A,from:S.from??(I==null?void 0:I.address)};return No(j),As(j)}),b=g.stateOverrides?Ay(g.stateOverrides):void 0;d.push({blockOverrides:v,calls:w,stateOverrides:b})}const p=(typeof n=="bigint"?ge(n):void 0)||r;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:d,returnFullTransactions:i,traceTransfers:l,validation:c},p]})).map((g,v)=>({...Ny(g),calls:g.calls.map((w,b)=>{var Q,V;const{abi:C,args:S,functionName:I,to:A}=o[v].calls[b],j=((Q=w.error)==null?void 0:Q.data)??w.returnData,N=BigInt(w.gasUsed),_=(V=w.logs)==null?void 0:V.map(H=>Hr(H)),P=w.status==="0x1"?"success":"failure",R=C&&P==="success"&&j!=="0x"?Es({abi:C,data:j,functionName:I}):null,M=(()=>{if(P==="success")return;let H;if(j==="0x"?H=new cu:j&&(H=new qf({data:j})),!!H)return yi(H,{abi:C??[],address:A??"0x",args:S,functionName:I??"<unknown>"})})();return{data:j,gasUsed:N,logs:_,status:P,...P==="success"?{result:R}:{error:M}}})}))}catch(d){const f=d,p=Yf(f,{});throw p instanceof yu?f:p}}function sg(e){let t=!0,n="",r=0,o="",i=!1;for(let l=0;l<e.length;l++){const c=e[l];if(["(",")",","].includes(c)&&(t=!0),c==="("&&r++,c===")"&&r--,!!t){if(r===0){if(c===" "&&["event","function","error",""].includes(o))o="";else if(o+=c,c===")"){i=!0;break}continue}if(c===" "){e[l-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=c,n+=c}}if(!i)throw new De("Unable to normalize signature.");return o}function ig(e,t){const n=typeof e,r=t.type;switch(r){case"address":return Jm(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,i)=>ig(Object.values(e)[i],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>ig(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function kC(e,t,n){for(const r in e){const o=e[r],i=t[r];if(o.type==="tuple"&&i.type==="tuple"&&"components"in o&&"components"in i)return kC(o.components,i.components,n[r]);const l=[o.type,i.type];if(l.includes("address")&&l.includes("bytes20")?!0:l.includes("address")&&l.includes("string")?Jm(n[r],{strict:!1}):l.includes("address")&&l.includes("bytes")?Jm(n[r],{strict:!1}):!1)return l}}function EC(e,t={}){const{prepare:n=!0}=t,r=Array.isArray(e)||typeof e=="string"?g6(e):e;return{...r,...n?{hash:ya(r)}:{}}}function oh(e,t,n){const{args:r=[],prepare:o=!0}=n??{},i=OI(t,{strict:!1}),l=e.filter(f=>i?f.type==="function"||f.type==="error"?AC(f)===Wr(t,0,4):f.type==="event"?ya(f)===t:!1:"name"in f&&f.name===t);if(l.length===0)throw new Cf({name:t});if(l.length===1)return{...l[0],...o?{hash:ya(l[0])}:{}};let c;for(const f of l){if(!("inputs"in f))continue;if(!r||r.length===0){if(!f.inputs||f.inputs.length===0)return{...f,...o?{hash:ya(f)}:{}};continue}if(!f.inputs||f.inputs.length===0||f.inputs.length!==r.length)continue;if(r.every((m,g)=>{const v="inputs"in f&&f.inputs[g];return v?ig(m,v):!1})){if(c&&"inputs"in c&&c.inputs){const m=kC(f.inputs,c.inputs,r);if(m)throw new QP({abiItem:f,type:m[0]},{abiItem:c,type:m[1]})}c=f}}const d=(()=>{if(c)return c;const[f,...p]=l;return{...f,overloads:p}})();if(!d)throw new Cf({name:t});return{...d,...o?{hash:ya(d)}:{}}}function AC(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return oh(n,r)}return e[0]})();return Wr(ya(t),0,4)}function VP(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,o]=e;return oh(r,o)}return e[0]})(),n=typeof t=="string"?t:mf(t);return sg(n)}function ya(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return oh(n,r)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:eC(xy(VP(t)))}class QP extends De{constructor(t,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${sg(mf(t.abiItem))}\`, and`,`\`${n.type}\` in \`${sg(mf(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 Cf extends De{constructor({name:t,data:n,type:r="item"}){const o=t?` with name "${t}"`:n?` with data "${n}"`:"";super(`ABI ${r}${o} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function GP(...e){var i;const[t,n]=(()=>{if(Array.isArray(e[0])){const[l,c]=e;return[YP(l),c]}return e})(),{bytecode:r,args:o}=n;return Sr(r,(i=t.inputs)!=null&&i.length&&(o!=null&&o.length)?Wy(t.inputs,o):"0x")}function KP(e){return EC(e)}function YP(e){const t=e.find(n=>n.type==="constructor");if(!t)throw new Cf({name:"constructor"});return t}function JP(...e){const[t,n=[]]=(()=>{if(Array.isArray(e[0])){const[f,p,m]=e;return[K6(f,p,{args:m}),m]}const[c,d]=e;return[c,d]})(),{overloads:r}=t,o=r?K6([t,...r],t.name,{args:n}):t,i=ZP(o),l=n.length>0?Wy(o.inputs,n):void 0;return l?Sr(i,l):i}function oa(e,t={}){return EC(e,t)}function K6(e,t,n){const r=oh(e,t,n);if(r.type!=="function")throw new Cf({name:t,type:"function"});return r}function ZP(e){return AC(e)}const XP="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",br="0x0000000000000000000000000000000000000000",eB="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function tB(e,t){const{blockNumber:n,blockTag:r,calls:o,stateOverrides:i,traceAssetChanges:l,traceTransfers:c,validation:d}=t,f=t.account?nt(t.account):void 0;if(l&&!f)throw new oe("`account` is required when `traceAssetChanges` is true");const p=f?GP(KP("constructor(bytes, bytes)"),{bytecode:p3,args:[eB,JP(oa("function getBalance(address)"),[f.address])]}):void 0,m=l?await Promise.all(t.calls.map(async F=>{if(!F.data&&!F.abi)return;const{accessList:Z}=await k3(e,{account:f.address,...F,data:F.abi?_n(F):F.data});return Z.map(({address:Y,storageKeys:U})=>U.length>0?Y:null)})).then(F=>F.flat().filter(Boolean)):[],g=await og(e,{blockNumber:n,blockTag:r,blocks:[...l?[{calls:[{data:p}],stateOverrides:i},{calls:m.map((F,Z)=>({abi:[oa("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[f.address],to:F,from:br,nonce:Z})),stateOverrides:[{address:br,nonce:0}]}]:[],{calls:[...o,{to:br}].map(F=>({...F,from:f==null?void 0:f.address})),stateOverrides:i},...l?[{calls:[{data:p}]},{calls:m.map((F,Z)=>({abi:[oa("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[f.address],to:F,from:br,nonce:Z})),stateOverrides:[{address:br,nonce:0}]},{calls:m.map((F,Z)=>({to:F,abi:[oa("function decimals() returns (uint256)")],functionName:"decimals",from:br,nonce:Z})),stateOverrides:[{address:br,nonce:0}]},{calls:m.map((F,Z)=>({to:F,abi:[oa("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:br,nonce:Z})),stateOverrides:[{address:br,nonce:0}]},{calls:m.map((F,Z)=>({to:F,abi:[oa("function symbol() returns (string)")],functionName:"symbol",from:br,nonce:Z})),stateOverrides:[{address:br,nonce:0}]}]:[]],traceTransfers:c,validation:d}),v=l?g[2]:g[0],[w,b,,C,S,I,A,j]=l?g:[],{calls:N,..._}=v,P=N.slice(0,-1)??[],R=(w==null?void 0:w.calls)??[],M=(b==null?void 0:b.calls)??[],Q=[...R,...M].map(F=>F.status==="success"?Hn(F.data):null),V=(C==null?void 0:C.calls)??[],H=(S==null?void 0:S.calls)??[],L=[...V,...H].map(F=>F.status==="success"?Hn(F.data):null),z=((I==null?void 0:I.calls)??[]).map(F=>F.status==="success"?F.result:null),O=((j==null?void 0:j.calls)??[]).map(F=>F.status==="success"?F.result:null),K=((A==null?void 0:A.calls)??[]).map(F=>F.status==="success"?F.result:null),J=[];for(const[F,Z]of L.entries()){const Y=Q[F];if(typeof Z!="bigint"||typeof Y!="bigint")continue;const U=z[F-1],ee=O[F-1],he=K[F-1],se=F===0?{address:XP,decimals:18,symbol:"ETH"}:{address:m[F-1],decimals:he||U?Number(U??1):void 0,symbol:ee??void 0};J.some(ie=>ie.token.address===se.address)||J.push({token:se,value:{pre:Y,post:Z,diff:Z-Y}})}return{assetChanges:J,block:_,results:P}}async function nB(e,t){var p;const{abi:n,address:r,args:o,functionName:i,dataSuffix:l=typeof e.dataSuffix=="string"?e.dataSuffix:(p=e.dataSuffix)==null?void 0:p.value,...c}=t,d=c.account?nt(c.account):e.account,f=_n({abi:n,args:o,functionName:i});try{const{data:m}=await ve(e,vu,"call")({batch:!1,data:`${f}${l?l.replace("0x",""):""}`,to:r,...c,account:d}),g=Es({abi:n,args:o,functionName:i,data:m||"0x"}),v=n.filter(w=>"name"in w&&w.name===t.functionName);return{result:g,request:{abi:v,address:r,args:o,dataSuffix:l,functionName:i,...c,account:d}}}catch(m){throw yi(m,{abi:n,address:r,args:o,docsPath:"/docs/contract/simulateContract",functionName:i,sender:d==null?void 0:d.address})}}async function sh(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}const SC="0x6492649264926492649264926492649264926492649264926492649264926492";function rB(e){if(Wr(e,-32)!==SC)throw new iB(e)}function oB(e){const{data:t,signature:n,to:r}=e;return Sr(Wy(rC("address, bytes, bytes"),[r,t,n]),SC)}function sB(e){try{return rB(e),!0}catch{return!1}}class iB extends De{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function aB({r:e,s:t,to:n="hex",v:r,yParity:o}){const i=(()=>{if(o===0||o===1)return o;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),l=`0x${new vC.Signature(Hn(e),Hn(t)).toCompactHex()}${i===0?"1b":"1c"}`;return n==="hex"?l:Ar(l)}async function ih(e,t){var f,p,m,g;const{address:n,chain:r=e.chain,hash:o,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??((p=(f=r==null?void 0:r.contracts)==null?void 0:f.erc6492Verifier)==null?void 0:p.address),multicallAddress:l=t.multicallAddress??((g=(m=r==null?void 0:r.contracts)==null?void 0:m.multicall3)==null?void 0:g.address),mode:c="auto"}=t;if(r!=null&&r.verifyHash)return await r.verifyHash(e,t);const d=(()=>{const v=t.signature;return qr(v)?v:typeof v=="object"&&"r"in v&&"s"in v?aB(v):St(v)})();try{if(c==="eoa")try{if(Qa(yt(n),await Gm({hash:o,signature:d})))return!0}catch{}return DP(d)?await lB(e,{...t,multicallAddress:l,signature:d}):await cB(e,{...t,verifierAddress:i,signature:d})}catch(v){if(c!=="eoa")try{if(Qa(yt(n),await Gm({hash:o,signature:d})))return!0}catch{}if(v instanceof xi)return!1;throw v}}async function lB(e,t){var C;const{address:n,blockNumber:r,blockTag:o,hash:i,multicallAddress:l}=t,{authorization:c,data:d,signature:f,to:p}=LP(t.signature);if(await bf(e,{address:n,blockNumber:r,blockTag:o})===rl(["0xef0100",c.address]))return await uB(e,{address:n,blockNumber:r,blockTag:o,hash:i,signature:f});const g={address:c.address,chainId:Number(c.chainId),nonce:Number(c.nonce),r:ge(c.r,{size:32}),s:ge(c.s,{size:32}),yParity:c.yParity};if(!await iN({address:n,authorization:g}))throw new xi;const w=await ve(e,cr,"readContract")({...l?{address:l}:{code:Cy},authorizationList:[g],abi:Ua,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...d?[{allowFailure:!0,target:p??n,callData:d}]:[],{allowFailure:!0,target:n,callData:_n({abi:a5,functionName:"isValidSignature",args:[i,f]})}]]}),b=(C=w[w.length-1])==null?void 0:C.returnData;if(b!=null&&b.startsWith("0x1626ba7e"))return!0;throw new xi}async function cB(e,t){const{address:n,factory:r,factoryData:o,hash:i,signature:l,verifierAddress:c,...d}=t,f=await(async()=>!r&&!o||sB(l)?l:oB({data:o,signature:l,to:r}))(),p=c?{to:c,data:_n({abi:Xb,functionName:"isValidSig",args:[n,i,f]}),...d}:{data:Kf({abi:Xb,args:[n,i,f],bytecode:zI}),...d},{data:m}=await ve(e,vu,"call")(p).catch(g=>{throw g instanceof Y5?new xi:g});if(Oj(m??"0x0"))return!0;throw new xi}async function uB(e,t){const{address:n,blockNumber:r,blockTag:o,hash:i,signature:l}=t;if((await ve(e,cr,"readContract")({address:n,abi:a5,args:[i,l],blockNumber:r,blockTag:o,functionName:"isValidSignature"}).catch(d=>{throw d instanceof py?new xi:d})).startsWith("0x1626ba7e"))return!0;throw new xi}class xi extends Error{}async function dB(e,{address:t,message:n,factory:r,factoryData:o,signature:i,...l}){const c=H3(n);return ve(e,ih,"verifyHash")({address:t,factory:r,factoryData:o,hash:c,signature:i,...l})}async function fB(e,t){const{address:n,factory:r,factoryData:o,signature:i,message:l,primaryType:c,types:d,domain:f,...p}=t,m=bN({message:l,primaryType:c,types:d,domain:f});return ve(e,ih,"verifyHash")({address:n,factory:r,factoryData:o,hash:m,signature:i,...p})}const O0=new Map,Y6=new Map;let hB=0;function jo(e,t,n){const r=++hB,o=()=>O0.get(e)||[],i=()=>{const p=o();O0.set(e,p.filter(m=>m.id!==r))},l=()=>{const p=o();if(!p.some(g=>g.id===r))return;const m=Y6.get(e);if(p.length===1&&m){const g=m();g instanceof Promise&&g.catch(()=>{})}i()},c=o();if(O0.set(e,[...c,{id:r,fns:t}]),c&&c.length>0)return l;const d={};for(const p in t)d[p]=((...m)=>{var v,w;const g=o();if(g.length!==0)for(const b of g)(w=(v=b.fns)[p])==null||w.call(v,...m)});const f=n(d);return typeof f=="function"&&Y6.set(e,f),l}function al(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let o=!0;const i=()=>o=!1;return(async()=>{let c;t&&(c=await e({unpoll:i}));const d=await(n==null?void 0:n(c))??r;await Ym(d);const f=async()=>{o&&(await e({unpoll:i}),await Ym(r),f())};f()})(),i}function jC(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:o,poll:i,pollingInterval:l=e.pollingInterval}){const c=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let d;return c?(()=>{const m=At(["watchBlockNumber",e.uid,t,n,l]);return jo(m,{onBlockNumber:r,onError:o},g=>al(async()=>{var v;try{const w=await ve(e,xu,"getBlockNumber")({cacheTime:0});if(d!==void 0){if(w===d)return;if(w-d>1&&n)for(let b=d+1n;b<w;b++)g.onBlockNumber(b,d),d=b}(d===void 0||w>d)&&(g.onBlockNumber(w,d),d=w)}catch(w){(v=g.onError)==null||v.call(g,w)}},{emitOnBegin:t,interval:l}))})():(()=>{const m=At(["watchBlockNumber",e.uid,t,n]);return jo(m,{onBlockNumber:r,onError:o},g=>{let v=!0,w=()=>v=!1;return(async()=>{try{const b=(()=>{if(e.transport.type==="fallback"){const S=e.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return S?S.value:e.transport}return e.transport})(),{unsubscribe:C}=await b.subscribe({params:["newHeads"],onData(S){var A;if(!v)return;const I=Hn((A=S.result)==null?void 0:A.number);g.onBlockNumber(I,d),d=I},onError(S){var I;(I=g.onError)==null||I.call(g,S)}});w=C,v||w()}catch(b){o==null||o(b)}})(),()=>w()})})()}async function IC(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:o,onReplaced:i,retryCount:l=6,retryDelay:c=({count:N})=>~~(1<<N)*200,timeout:d=18e4}=t,f=At(["waitForTransactionReceipt",e.uid,o]),p=(()=>{var N;return t.pollingInterval?t.pollingInterval:(N=e.chain)!=null&&N.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let m,g,v,w=!1,b,C;const{promise:S,resolve:I,reject:A}=Ey(),j=d?setTimeout(()=>{C==null||C(),b==null||b(),A(new Q7({hash:o}))},d):void 0;return b=jo(f,{onReplaced:i,resolve:I,reject:A},async N=>{if(v=await ve(e,af,"getTransactionReceipt")({hash:o}).catch(()=>{}),v&&r<=1){clearTimeout(j),N.resolve(v),b==null||b();return}C=ve(e,jC,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber(_){const P=M=>{clearTimeout(j),C==null||C(),M(),b==null||b()};let R=_;if(!w)try{if(v){if(r>1&&(!v.blockNumber||R-v.blockNumber+1n<r))return;P(()=>N.resolve(v));return}if(n&&!m&&(w=!0,await bi(async()=>{m=await ve(e,Gy,"getTransaction")({hash:o}),m.blockNumber&&(R=m.blockNumber)},{delay:c,retryCount:l}),w=!1),v=await ve(e,af,"getTransactionReceipt")({hash:o}),r>1&&(!v.blockNumber||R-v.blockNumber+1n<r))return;P(()=>N.resolve(v))}catch(M){if(M instanceof Q5||M instanceof G5){if(!m){w=!1;return}try{g=m,w=!0;const Q=await bi(()=>ve(e,Cr,"getBlock")({blockNumber:R,includeTransactions:!0}),{delay:c,retryCount:l,shouldRetry:({error:L})=>L instanceof P3});w=!1;const V=Q.transactions.find(({from:L,nonce:z})=>L===g.from&&z===g.nonce);if(!V||(v=await ve(e,af,"getTransactionReceipt")({hash:V.hash}),r>1&&(!v.blockNumber||R-v.blockNumber+1n<r)))return;let H="replaced";V.to===g.to&&V.value===g.value&&V.input===g.input?H="repriced":V.from===V.to&&V.value===0n&&(H="cancelled"),P(()=>{var L;(L=N.onReplaced)==null||L.call(N,{reason:H,replacedTransaction:g,transaction:V,transactionReceipt:v}),N.resolve(v)})}catch(Q){P(()=>N.reject(Q))}}else P(()=>N.reject(M))}}})}),S}function pB(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:o,onError:i,includeTransactions:l,poll:c,pollingInterval:d=e.pollingInterval}){const f=typeof c<"u"?c:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),p=l??!1;let m;return f?(()=>{const w=At(["watchBlocks",e.uid,t,n,r,p,d]);return jo(w,{onBlock:o,onError:i},b=>al(async()=>{var C;try{const S=await ve(e,Cr,"getBlock")({blockTag:t,includeTransactions:p});if(S.number!==null&&(m==null?void 0:m.number)!=null){if(S.number===m.number)return;if(S.number-m.number>1&&n)for(let I=(m==null?void 0:m.number)+1n;I<S.number;I++){const A=await ve(e,Cr,"getBlock")({blockNumber:I,includeTransactions:p});b.onBlock(A,m),m=A}}((m==null?void 0:m.number)==null||t==="pending"&&(S==null?void 0:S.number)==null||S.number!==null&&S.number>m.number)&&(b.onBlock(S,m),m=S)}catch(S){(C=b.onError)==null||C.call(b,S)}},{emitOnBegin:r,interval:d}))})():(()=>{let w=!0,b=!0,C=()=>w=!1;return(async()=>{try{r&&ve(e,Cr,"getBlock")({blockTag:t,includeTransactions:p}).then(A=>{w&&b&&(o(A,void 0),b=!1)}).catch(i);const S=(()=>{if(e.transport.type==="fallback"){const A=e.transport.transports.find(j=>j.config.type==="webSocket"||j.config.type==="ipc");return A?A.value:e.transport}return e.transport})(),{unsubscribe:I}=await S.subscribe({params:["newHeads"],async onData(A){var N;if(!w)return;const j=await ve(e,Cr,"getBlock")({blockNumber:(N=A.result)==null?void 0:N.number,includeTransactions:p}).catch(()=>{});w&&(o(j,m),b=!1,m=j)},onError(A){i==null||i(A)}});C=I,w||C()}catch(S){i==null||i(S)}})(),()=>C()})()}function mB(e,t){const{abi:n,address:r,args:o,batch:i=!0,eventName:l,fromBlock:c,onError:d,onLogs:f,poll:p,pollingInterval:m=e.pollingInterval,strict:g}=t;return(typeof p<"u"?p:typeof c=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const C=g??!1,S=At(["watchContractEvent",r,o,i,e.uid,l,m,C,c]);return jo(S,{onLogs:f,onError:d},I=>{let A;c!==void 0&&(A=c-1n);let j,N=!1;const _=al(async()=>{var P;if(!N){try{j=await ve(e,E3,"createContractEventFilter")({abi:n,address:r,args:o,eventName:l,strict:C,fromBlock:c})}catch{}N=!0;return}try{let R;if(j)R=await ve(e,th,"getFilterChanges")({filter:j});else{const M=await ve(e,xu,"getBlockNumber")({});A&&A<M?R=await ve(e,z3,"getContractEvents")({abi:n,address:r,args:o,eventName:l,fromBlock:A+1n,toBlock:M,strict:C}):R=[],A=M}if(R.length===0)return;if(i)I.onLogs(R);else for(const M of R)I.onLogs([M])}catch(R){j&&R instanceof xs&&(N=!1),(P=I.onError)==null||P.call(I,R)}},{emitOnBegin:!0,interval:m});return async()=>{j&&await ve(e,sh,"uninstallFilter")({filter:j}),_()}})})():(()=>{const C=g??!1,S=At(["watchContractEvent",r,o,i,e.uid,l,m,C]);let I=!0,A=()=>I=!1;return jo(S,{onLogs:f,onError:d},j=>((async()=>{try{const N=(()=>{if(e.transport.type==="fallback"){const R=e.transport.transports.find(M=>M.config.type==="webSocket"||M.config.type==="ipc");return R?R.value:e.transport}return e.transport})(),_=l?wu({abi:n,eventName:l,args:o}):[],{unsubscribe:P}=await N.subscribe({params:["logs",{address:r,topics:_}],onData(R){var Q;if(!I)return;const M=R.result;try{const{eventName:V,args:H}=xf({abi:n,data:M.data,topics:M.topics,strict:g}),L=Hr(M,{args:H,eventName:V});j.onLogs([L])}catch(V){let H,L;if(V instanceof pf||V instanceof ry){if(g)return;H=V.abiItem.name,L=(Q=V.abiItem.inputs)==null?void 0:Q.some(O=>!("name"in O&&O.name))}const z=Hr(M,{args:L?[]:{},eventName:H});j.onLogs([z])}},onError(R){var M;(M=j.onError)==null||M.call(j,R)}});A=P,I||A()}catch(N){d==null||d(N)}})(),()=>A()))})()}function gB(e,{address:t,args:n,batch:r=!0,event:o,events:i,fromBlock:l,onError:c,onLogs:d,poll:f,pollingInterval:p=e.pollingInterval,strict:m}){const g=typeof f<"u"?f:typeof l=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),v=m??!1;return g?(()=>{const C=At(["watchEvent",t,n,r,e.uid,o,p,l]);return jo(C,{onLogs:d,onError:c},S=>{let I;l!==void 0&&(I=l-1n);let A,j=!1;const N=al(async()=>{var _;if(!j){try{A=await ve(e,A3,"createEventFilter")({address:t,args:n,event:o,events:i,strict:v,fromBlock:l})}catch{}j=!0;return}try{let P;if(A)P=await ve(e,th,"getFilterChanges")({filter:A});else{const R=await ve(e,xu,"getBlockNumber")({});I&&I!==R?P=await ve(e,Fy,"getLogs")({address:t,args:n,event:o,events:i,fromBlock:I+1n,toBlock:R}):P=[],I=R}if(P.length===0)return;if(r)S.onLogs(P);else for(const R of P)S.onLogs([R])}catch(P){A&&P instanceof xs&&(j=!1),(_=S.onError)==null||_.call(S,P)}},{emitOnBegin:!0,interval:p});return async()=>{A&&await ve(e,sh,"uninstallFilter")({filter:A}),N()}})})():(()=>{let C=!0,S=()=>C=!1;return(async()=>{try{const I=(()=>{if(e.transport.type==="fallback"){const _=e.transport.transports.find(P=>P.config.type==="webSocket"||P.config.type==="ipc");return _?_.value:e.transport}return e.transport})(),A=i??(o?[o]:void 0);let j=[];A&&(j=[A.flatMap(P=>wu({abi:[P],eventName:P.name,args:n}))],o&&(j=j[0]));const{unsubscribe:N}=await I.subscribe({params:["logs",{address:t,topics:j}],onData(_){var R;if(!C)return;const P=_.result;try{const{eventName:M,args:Q}=xf({abi:A??[],data:P.data,topics:P.topics,strict:v}),V=Hr(P,{args:Q,eventName:M});d([V])}catch(M){let Q,V;if(M instanceof pf||M instanceof ry){if(m)return;Q=M.abiItem.name,V=(R=M.abiItem.inputs)==null?void 0:R.some(L=>!("name"in L&&L.name))}const H=Hr(P,{args:V?[]:{},eventName:Q});d([H])}},onError(_){c==null||c(_)}});S=N,C||S()}catch(I){c==null||c(I)}})(),()=>S()})()}function yB(e,{batch:t=!0,onError:n,onTransactions:r,poll:o,pollingInterval:i=e.pollingInterval}){return(typeof o<"u"?o:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const f=At(["watchPendingTransactions",e.uid,t,i]);return jo(f,{onTransactions:r,onError:n},p=>{let m;const g=al(async()=>{var v;try{if(!m)try{m=await ve(e,S3,"createPendingTransactionFilter")({});return}catch(b){throw g(),b}const w=await ve(e,th,"getFilterChanges")({filter:m});if(w.length===0)return;if(t)p.onTransactions(w);else for(const b of w)p.onTransactions([b])}catch(w){(v=p.onError)==null||v.call(p,w)}},{emitOnBegin:!0,interval:i});return async()=>{m&&await ve(e,sh,"uninstallFilter")({filter:m}),g()}})})():(()=>{let f=!0,p=()=>f=!1;return(async()=>{try{const{unsubscribe:m}=await e.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!f)return;const v=g.result;r([v])},onError(g){n==null||n(g)}});p=m,f||p()}catch(m){n==null||n(m)}})(),()=>p()})()}async function vB(e,{chain:t}){const{id:n,name:r,nativeCurrency:o,rpcUrls:i,blockExplorers:l}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:ge(n),chainName:r,nativeCurrency:o,rpcUrls:i.default.http,blockExplorerUrls:l?Object.values(l).map(({url:c})=>c):void 0}]},{dedupe:!0,retryCount:0})}class js extends oe{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
83
+ `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class fi extends oe{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}async function Ky(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const F0=new nl(128);async function ah(e,t){var j,N,_,P,R;const{account:n=e.account,assertChainId:r=!0,chain:o=e.chain,accessList:i,authorizationList:l,blobs:c,data:d,dataSuffix:f=typeof e.dataSuffix=="string"?e.dataSuffix:(j=e.dataSuffix)==null?void 0:j.value,gas:p,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,type:C,value:S,...I}=t;if(typeof n>"u")throw new js({docsPath:"/docs/actions/wallet/sendTransaction"});const A=n?nt(n):null;try{No(t);const M=await(async()=>{if(t.to)return t.to;if(t.to!==null&&l&&l.length>0)return await Zf({authorization:l[0]}).catch(()=>{throw new oe("`to` is required. Could not infer from `authorizationList`.")})})();if((A==null?void 0:A.type)==="json-rpc"||A===null){let Q;o!==null&&(Q=await ve(e,Ss,"getChainId")({}),r&&Ly({currentChainId:Q,chain:o}));const V=(P=(_=(N=e.chain)==null?void 0:N.formatters)==null?void 0:_.transactionRequest)==null?void 0:P.format,L=(V||As)({...il(I,{format:V}),accessList:i,account:A,authorizationList:l,blobs:c,chainId:Q,data:f?nn([d??"0x",f]):d,gas:p,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,to:M,type:C,value:S},"sendTransaction"),z=F0.get(e.uid),O=z?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:O,params:[L]},{retryCount:0})}catch(K){if(z===!1)throw K;const J=K;if(J.name==="InvalidInputRpcError"||J.name==="InvalidParamsRpcError"||J.name==="MethodNotFoundRpcError"||J.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[L]},{retryCount:0}).then(F=>(F0.set(e.uid,!0),F)).catch(F=>{const Z=F;throw Z.name==="MethodNotFoundRpcError"||Z.name==="MethodNotSupportedRpcError"?(F0.set(e.uid,!1),J):Z});throw J}}if((A==null?void 0:A.type)==="local"){const Q=await ve(e,bu,"prepareTransactionRequest")({account:A,accessList:i,authorizationList:l,blobs:c,chain:o,data:f?nn([d??"0x",f]):d,gas:p,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,nonceManager:A.nonceManager,parameters:[...Ry,"sidecars"],type:C,value:S,...I,to:M}),V=(R=o==null?void 0:o.serializers)==null?void 0:R.transaction,H=await A.signTransaction(Q,{serializer:V});return await ve(e,Ky,"sendRawTransaction")({serializedTransaction:H})}throw(A==null?void 0:A.type)==="smart"?new fi({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new fi({docsPath:"/docs/actions/wallet/sendTransaction",type:A==null?void 0:A.type})}catch(M){throw M instanceof fi?M:eh(M,{...t,account:A,chain:t.chain||void 0})}}function wB(e,t){const{abi:n,args:r,bytecode:o,...i}=t,l=Kf({abi:n,args:r,bytecode:o});return ah(e,{...i,...i.authorizationList?{to:null}:{},data:l})}async function bB(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>uu(r))}const NC="0x5792579257925792579257925792579257925792579257925792579257925792",PC=ge(0,{size:32});async function BC(e,t){var g;const{account:n=e.account,chain:r=e.chain,experimental_fallback:o,experimental_fallbackDelay:i=32,forceAtomic:l=!1,id:c,version:d="2.0.0"}=t,f=n?nt(n):null;let p=t.capabilities;e.dataSuffix&&!((g=t.capabilities)!=null&&g.dataSuffix)&&(typeof e.dataSuffix=="string"?p={...t.capabilities,dataSuffix:{value:e.dataSuffix,optional:!0}}:p={...t.capabilities,dataSuffix:{value:e.dataSuffix.value,...e.dataSuffix.required?{}:{optional:!0}}});const m=t.calls.map(v=>{const w=v,b=w.abi?_n({abi:w.abi,functionName:w.functionName,args:w.args}):w.data;return{data:w.dataSuffix&&b?nn([b,w.dataSuffix]):b,to:w.to,value:w.value?ge(w.value):void 0}});try{const v=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:l,calls:m,capabilities:p,chainId:ge(r.id),from:f==null?void 0:f.address,id:c,version:d}]},{retryCount:0});return typeof v=="string"?{id:v}:v}catch(v){const w=v;if(o&&(w.name==="MethodNotFoundRpcError"||w.name==="MethodNotSupportedRpcError"||w.name==="UnknownRpcError"||w.details.toLowerCase().includes("does not exist / is not available")||w.details.toLowerCase().includes("missing or invalid. request()")||w.details.toLowerCase().includes("did not match any variant of untagged enum")||w.details.toLowerCase().includes("account upgraded to unsupported contract")||w.details.toLowerCase().includes("eip-7702 not supported")||w.details.toLowerCase().includes("unsupported wc_ method")||w.details.toLowerCase().includes("feature toggled misconfigured")||w.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(p&&Object.values(p).some(A=>!A.optional)){const A="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new Ha(new oe(A,{details:A}))}if(l&&m.length>1){const I="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Va(new oe(I,{details:I}))}const b=[];for(const I of m){const A=ah(e,{account:f,chain:r,data:I.data,to:I.to,value:I.value?Hn(I.value):void 0});b.push(A),i>0&&await new Promise(j=>setTimeout(j,i))}const C=await Promise.allSettled(b);if(C.every(I=>I.status==="rejected"))throw C[0].reason;const S=C.map(I=>I.status==="fulfilled"?I.value:PC);return{id:nn([...S,ge(r.id,{size:32}),NC])}}throw eh(v,{...t,account:f,chain:t.chain})}}async function TC(e,t){async function n(p){if(p.endsWith(NC.slice(2))){const g=$r(Nm(p,-64,-32)),v=Nm(p,0,-64).slice(2).match(/.{1,64}/g),w=await Promise.all(v.map(C=>PC.slice(2)!==C?e.request({method:"eth_getTransactionReceipt",params:[`0x${C}`]},{dedupe:!0}):void 0)),b=w.some(C=>C===null)?100:w.every(C=>(C==null?void 0:C.status)==="0x1")?200:w.every(C=>(C==null?void 0:C.status)==="0x0")?500:600;return{atomic:!1,chainId:lr(g),receipts:w.filter(Boolean),status:b,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[p]})}const{atomic:r=!1,chainId:o,receipts:i,version:l="2.0.0",...c}=await n(t.id),[d,f]=(()=>{const p=c.status;return p>=100&&p<200?["pending",p]:p>=200&&p<300?["success",p]:p>=300&&p<700?["failure",p]:p==="CONFIRMED"?["success",200]:p==="PENDING"?["pending",100]:[void 0,p]})();return{...c,atomic:r,chainId:o?lr(o):void 0,receipts:(i==null?void 0:i.map(p=>({...p,blockNumber:Hn(p.blockNumber),gasUsed:Hn(p.gasUsed),status:q3[p.status]})))??[],statusCode:f,status:d,version:l}}async function xB(e,t={}){const{account:n=e.account,chainId:r}=t,o=n?nt(n):void 0,i=r?[o==null?void 0:o.address,[ge(r)]]:[o==null?void 0:o.address],l=await e.request({method:"wallet_getCapabilities",params:i}),c={};for(const[d,f]of Object.entries(l)){c[Number(d)]={};for(let[p,m]of Object.entries(f))p==="addSubAccount"&&(p="unstable_addSubAccount"),c[Number(d)][p]=m}return typeof r=="number"?c[r]:c}async function CB(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function _C(e,t){var d;const{account:n=e.account,chainId:r,nonce:o}=t;if(!n)throw new js({docsPath:"/docs/eip7702/prepareAuthorization"});const i=nt(n),l=(()=>{if(t.executor)return t.executor==="self"?t.executor:nt(t.executor)})(),c={address:t.contractAddress??t.address,chainId:r,nonce:o};return typeof c.chainId>"u"&&(c.chainId=((d=e.chain)==null?void 0:d.id)??await ve(e,Ss,"getChainId")({})),typeof c.nonce>"u"&&(c.nonce=await ve(e,By,"getTransactionCount")({address:i.address,blockTag:"pending"}),(l==="self"||l!=null&&l.address&&Qa(l.address,i.address))&&(c.nonce+=1)),c}async function kB(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>yt(n))}async function EB(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}class AB extends oe{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}async function RC(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:o=({statusCode:b})=>b===200||b>=300,retryCount:i=4,retryDelay:l=({count:b})=>~~(1<<b)*200,timeout:c=6e4,throwOnFailure:d=!1}=t,f=At(["waitForCallsStatus",e.uid,n]),{promise:p,resolve:m,reject:g}=Ey();let v;const w=jo(f,{resolve:m,reject:g},b=>{const C=al(async()=>{const S=I=>{clearTimeout(v),C(),I(),w()};try{const I=await bi(async()=>{const A=await ve(e,TC,"getCallsStatus")({id:n});if(d&&A.status==="failure")throw new AB(A);return A},{retryCount:i,delay:l});if(!o(I))return;S(()=>b.resolve(I))}catch(I){S(()=>b.reject(I))}},{interval:r,emitOnBegin:!0});return C});return v=c?setTimeout(()=>{w(),clearTimeout(v),g(new SB({id:n}))},c):void 0,await p}class SB extends oe{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}async function jB(e,t){const{chain:n=e.chain}=t,r=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),o=await ve(e,BC,"sendCalls")(t);return await ve(e,RC,"waitForCallsStatus")({...t,id:o.id,timeout:r})}async function Yy(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:r}){var c,d,f;const o=await e.request({method:"eth_sendRawTransactionSync",params:r?[t,r]:[t]},{retryCount:0}),l=(((f=(d=(c=e.chain)==null?void 0:c.formatters)==null?void 0:d.transactionReceipt)==null?void 0:f.format)||Dy)(o);if(l.status==="reverted"&&n)throw new K5({receipt:l});return l}const L0=new nl(128);async function MC(e,t){var P,R,M,Q,V;const{account:n=e.account,assertChainId:r=!0,chain:o=e.chain,accessList:i,authorizationList:l,blobs:c,data:d,dataSuffix:f=typeof e.dataSuffix=="string"?e.dataSuffix:(P=e.dataSuffix)==null?void 0:P.value,gas:p,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,pollingInterval:C,throwOnReceiptRevert:S,type:I,value:A,...j}=t,N=t.timeout??Math.max(((o==null?void 0:o.blockTime)??0)*3,5e3);if(typeof n>"u")throw new js({docsPath:"/docs/actions/wallet/sendTransactionSync"});const _=n?nt(n):null;try{No(t);const H=await(async()=>{if(t.to)return t.to;if(t.to!==null&&l&&l.length>0)return await Zf({authorization:l[0]}).catch(()=>{throw new oe("`to` is required. Could not infer from `authorizationList`.")})})();if((_==null?void 0:_.type)==="json-rpc"||_===null){let L;o!==null&&(L=await ve(e,Ss,"getChainId")({}),r&&Ly({currentChainId:L,chain:o}));const z=(Q=(M=(R=e.chain)==null?void 0:R.formatters)==null?void 0:M.transactionRequest)==null?void 0:Q.format,K=(z||As)({...il(j,{format:z}),accessList:i,account:_,authorizationList:l,blobs:c,chainId:L,data:d&&nn([d,f??"0x"]),gas:p,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,to:H,type:I,value:A},"sendTransaction"),J=L0.get(e.uid),F=J?"wallet_sendTransaction":"eth_sendTransaction",Z=await(async()=>{try{return await e.request({method:F,params:[K]},{retryCount:0})}catch(U){if(J===!1)throw U;const ee=U;if(ee.name==="InvalidInputRpcError"||ee.name==="InvalidParamsRpcError"||ee.name==="MethodNotFoundRpcError"||ee.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[K]},{retryCount:0}).then(he=>(L0.set(e.uid,!0),he)).catch(he=>{const se=he;throw se.name==="MethodNotFoundRpcError"||se.name==="MethodNotSupportedRpcError"?(L0.set(e.uid,!1),ee):se});throw ee}})(),Y=await ve(e,IC,"waitForTransactionReceipt")({checkReplacement:!1,hash:Z,pollingInterval:C,timeout:N});if(S&&Y.status==="reverted")throw new K5({receipt:Y});return Y}if((_==null?void 0:_.type)==="local"){const L=await ve(e,bu,"prepareTransactionRequest")({account:_,accessList:i,authorizationList:l,blobs:c,chain:o,data:d&&nn([d,f??"0x"]),gas:p,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,nonceManager:_.nonceManager,parameters:[...Ry,"sidecars"],type:I,value:A,...j,to:H}),z=(V=o==null?void 0:o.serializers)==null?void 0:V.transaction,O=await _.signTransaction(L,{serializer:z});return await ve(e,Yy,"sendRawTransactionSync")({serializedTransaction:O,throwOnReceiptRevert:S,timeout:t.timeout})}throw(_==null?void 0:_.type)==="smart"?new fi({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new fi({docsPath:"/docs/actions/wallet/sendTransactionSync",type:_==null?void 0:_.type})}catch(H){throw H instanceof fi?H:eh(H,{...t,account:_,chain:t.chain||void 0})}}async function IB(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function NB(e,t){const{account:n=e.account}=t;if(!n)throw new js({docsPath:"/docs/eip7702/signAuthorization"});const r=nt(n);if(!r.signAuthorization)throw new fi({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:r.type});const o=await _C(e,t);return r.signAuthorization(o)}async function OC(e,{account:t=e.account,message:n}){if(!t)throw new js({docsPath:"/docs/actions/wallet/signMessage"});const r=nt(t);if(r.signMessage)return r.signMessage({message:n});const o=typeof n=="string"?za(n):n.raw instanceof Uint8Array?Ao(n.raw):n.raw;return e.request({method:"personal_sign",params:[o,r.address]},{retryCount:0})}async function PB(e,t){var f,p,m,g;const{account:n=e.account,chain:r=e.chain,...o}=t;if(!n)throw new js({docsPath:"/docs/actions/wallet/signTransaction"});const i=nt(n);No({account:i,...t});const l=await ve(e,Ss,"getChainId")({});r!==null&&Ly({currentChainId:l,chain:r});const c=(r==null?void 0:r.formatters)||((f=e.chain)==null?void 0:f.formatters),d=((p=c==null?void 0:c.transactionRequest)==null?void 0:p.format)||As;return i.signTransaction?i.signTransaction({...o,chainId:l},{serializer:(g=(m=e.chain)==null?void 0:m.serializers)==null?void 0:g.transaction}):await e.request({method:"eth_signTransaction",params:[{...d({...o,account:i},"signTransaction"),chainId:ge(l),from:i.address}]},{retryCount:0})}async function BB(e,t){const{account:n=e.account,domain:r,message:o,primaryType:i}=t;if(!n)throw new js({docsPath:"/docs/actions/wallet/signTypedData"});const l=nt(n),c={EIP712Domain:Q3({domain:r}),...t.types};if(V3({domain:r,message:o,primaryType:i,types:c}),l.signTypedData)return l.signTypedData({domain:r,message:o,primaryType:i,types:c});const d=vN({domain:r,message:o,primaryType:i,types:c});return e.request({method:"eth_signTypedData_v4",params:[l.address,d]},{retryCount:0})}async function TB(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(t)}]},{retryCount:0})}async function _B(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function Dc(e,t){return Dc.internal(e,ah,"sendTransaction",t)}(function(e){async function t(n,r,o,i){const{abi:l,account:c=n.account,address:d,args:f,functionName:p,...m}=i;if(typeof c>"u")throw new js({docsPath:"/docs/contract/writeContract"});const g=c?nt(c):null,v=_n({abi:l,args:f,functionName:p});try{return await ve(n,r,o)({data:v,to:d,account:g,...m})}catch(w){throw yi(w,{abi:l,address:d,args:f,docsPath:"/docs/contract/writeContract",functionName:p,sender:g==null?void 0:g.address})}}e.internal=t})(Dc||(Dc={}));async function RB(e,t){return Dc.internal(e,MC,"sendTransactionSync",t)}function ll(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const o=e[n];return typeof o=="function"?o:i=>t(e,i)}const lf="2.22.1",MB=()=>`@wagmi/core@${lf}`;var FC=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},kf,LC;let Po=class ag extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return MB()}constructor(t,n={}){var i;super(),kf.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const r=n.cause instanceof ag?n.cause.details:(i=n.cause)!=null&&i.message?n.cause.message:n.details,o=n.cause instanceof ag&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: ${this.docsBaseUrl}${o}.html${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(`
84
+ `),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return FC(this,kf,"m",LC).call(this,this,t)}};kf=new WeakSet,LC=function e(t,n){return n!=null&&n(t)?t:t.cause?FC(this,kf,"m",e).call(this,t.cause,n):t};class Cs extends Po{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class OB extends Po{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class FB extends Po{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class LB extends Po{constructor({address:t,connector:n}){super(`Account "${t}" not found for connector "${n.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class DB extends Po{constructor({connectionChainId:t,connectorChainId:n}){super(`The current chain of the connector (id: ${n}) does not match the connection's chain (id: ${t}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class UB extends Po{constructor({connector:t}){super(`Connector "${t.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function $B(e,t){var r;let n;if(typeof t.connector=="function"?n=e._internal.connectors.setup(t.connector):n=t.connector,n.uid===e.state.current)throw new OB;try{e.setState(c=>({...c,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const{connector:o,...i}=t,l=await n.connect(i);return n.emitter.off("connect",e._internal.events.connect),n.emitter.on("change",e._internal.events.change),n.emitter.on("disconnect",e._internal.events.disconnect),await((r=e.storage)==null?void 0:r.setItem("recentConnectorId",n.id)),e.setState(c=>({...c,connections:new Map(c.connections).set(n.uid,{accounts:i.withCapabilities?l.accounts.map(d=>typeof d=="object"?d.address:d):l.accounts,chainId:l.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:i.withCapabilities?l.accounts.map(c=>typeof c=="object"?c:{address:c,capabilities:{}}):l.accounts,chainId:l.chainId}}catch(o){throw e.setState(i=>({...i,status:i.current?"connected":"disconnected"})),o}}const lg=256;let qd=lg,Hd;function DC(e=11){if(!Hd||qd+e>lg*2){Hd="",qd=0;for(let t=0;t<lg;t++)Hd+=(256+Math.random()*256|0).toString(16).substring(1)}return Hd.substring(qd,qd+++e)}function UC(e){const{batch:t,chain:n,ccipRead:r,dataSuffix:o,key:i="base",name:l="Base Client",type:c="base"}=e,d=e.experimental_blockTag??(typeof(n==null?void 0:n.experimental_preconfirmationTime)=="number"?"pending":void 0),f=(n==null?void 0:n.blockTime)??12e3,p=Math.min(Math.max(Math.floor(f/2),500),4e3),m=e.pollingInterval??p,g=e.cacheTime??m,v=e.account?nt(e.account):void 0,{config:w,request:b,value:C}=e.transport({account:v,chain:n,pollingInterval:m}),S={...w,...C},I={account:v,batch:t,cacheTime:g,ccipRead:r,chain:n,dataSuffix:o,key:i,name:l,pollingInterval:m,request:b,transport:S,type:c,uid:DC(),...d?{experimental_blockTag:d}:{}};function A(j){return N=>{const _=N(j);for(const R in I)delete _[R];const P={...j,..._};return Object.assign(P,{extend:A(P)})}}return Object.assign(I,{extend:A(I)})}function zB(e){var m,g,v;const{scheme:t,statement:n,...r}=((m=e.match(WB))==null?void 0:m.groups)??{},{chainId:o,expirationTime:i,issuedAt:l,notBefore:c,requestId:d,...f}=((g=e.match(qB))==null?void 0:g.groups)??{},p=(v=e.split("Resources:")[1])==null?void 0:v.split(`
85
+ - `).slice(1);return{...r,...f,...o?{chainId:Number(o)}:{},...i?{expirationTime:new Date(i)}:{},...l?{issuedAt:new Date(l)}:{},...c?{notBefore:new Date(c)}:{},...d?{requestId:d}:{},...p?{resources:p}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const WB=/^(?:(?<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)?/,qB=/(?: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 HB(e){const{address:t,domain:n,message:r,nonce:o,scheme:i,time:l=new Date}=e;if(n&&r.domain!==n||o&&r.nonce!==o||i&&r.scheme!==i||r.expirationTime&&l>=r.expirationTime||r.notBefore&&l<r.notBefore)return!1;try{if(!r.address||!Vn(r.address,{strict:!1})||t&&!Qa(r.address,t))return!1}catch{return!1}return!0}async function VB(e,t){const{address:n,domain:r,message:o,nonce:i,scheme:l,signature:c,time:d=new Date,...f}=t,p=zB(o);if(!p.address||!HB({address:n,domain:r,message:p,nonce:i,scheme:l,time:d}))return!1;const g=H3(o);return ih(e,{address:p.address,hash:g,signature:c,...f})}function QB(e){return{call:t=>vu(e,t),createAccessList:t=>k3(e,t),createBlockFilter:()=>d9(e),createContractEventFilter:t=>E3(e,t),createEventFilter:t=>A3(e,t),createPendingTransactionFilter:()=>S3(e),estimateContractGas:t=>W9(e,t),estimateGas:t=>My(e,t),getBalance:t=>$3(e,t),getBlobBaseFee:()=>q9(e),getBlock:t=>Cr(e,t),getBlockNumber:t=>xu(e,t),getBlockTransactionCount:t=>Y9(e,t),getBytecode:t=>bf(e,t),getChainId:()=>Ss(e),getCode:t=>bf(e,t),getContractEvents:t=>z3(e,t),getDelegation:t=>X9(e,t),getEip712Domain:t=>tN(e,t),getEnsAddress:t=>JI(e,t),getEnsAvatar:t=>x3(e,t),getEnsName:t=>C3(e,t),getEnsResolver:t=>u9(e,t),getEnsText:t=>b3(e,t),getFeeHistory:t=>oN(e,t),estimateFeesPerGas:t=>E9(e,t),getFilterChanges:t=>th(e,t),getFilterLogs:t=>sN(e,t),getGasPrice:()=>Py(e),getLogs:t=>Fy(e,t),getProof:t=>WP(e,t),estimateMaxPriorityFeePerGas:t=>k9(e,t),fillTransaction:t=>_y(e,t),getStorageAt:t=>qP(e,t),getTransaction:t=>Gy(e,t),getTransactionConfirmations:t=>HP(e,t),getTransactionCount:t=>By(e,t),getTransactionReceipt:t=>af(e,t),multicall:t=>CC(e,t),prepareTransactionRequest:t=>bu(e,t),readContract:t=>cr(e,t),sendRawTransaction:t=>Ky(e,t),sendRawTransactionSync:t=>Yy(e,t),simulate:t=>og(e,t),simulateBlocks:t=>og(e,t),simulateCalls:t=>tB(e,t),simulateContract:t=>nB(e,t),verifyHash:t=>ih(e,t),verifyMessage:t=>dB(e,t),verifySiweMessage:t=>VB(e,t),verifyTypedData:t=>fB(e,t),uninstallFilter:t=>sh(e,t),waitForTransactionReceipt:t=>IC(e,t),watchBlocks:t=>pB(e,t),watchBlockNumber:t=>jC(e,t),watchContractEvent:t=>mB(e,t),watchEvent:t=>gB(e,t),watchPendingTransactions:t=>yB(e,t)}}function GB(e){return{addChain:t=>vB(e,t),deployContract:t=>wB(e,t),fillTransaction:t=>_y(e,t),getAddresses:()=>bB(e),getCallsStatus:t=>TC(e,t),getCapabilities:t=>xB(e,t),getChainId:()=>Ss(e),getPermissions:()=>CB(e),prepareAuthorization:t=>_C(e,t),prepareTransactionRequest:t=>bu(e,t),requestAddresses:()=>kB(e),requestPermissions:t=>EB(e,t),sendCalls:t=>BC(e,t),sendCallsSync:t=>jB(e,t),sendRawTransaction:t=>Ky(e,t),sendRawTransactionSync:t=>Yy(e,t),sendTransaction:t=>ah(e,t),sendTransactionSync:t=>MC(e,t),showCallsStatus:t=>IB(e,t),signAuthorization:t=>NB(e,t),signMessage:t=>OC(e,t),signTransaction:t=>PB(e,t),signTypedData:t=>BB(e,t),switchChain:t=>TB(e,t),waitForCallsStatus:t=>RC(e,t),watchAsset:t=>_B(e,t),writeContract:t=>Dc(e,t),writeContractSync:t=>RB(e,t)}}function $C({key:e,methods:t,name:n,request:r,retryCount:o=3,retryDelay:i=150,timeout:l,type:c},d){const f=DC();return{config:{key:e,methods:t,name:n,request:r,retryCount:o,retryDelay:i,timeout:l,type:c},request:lN(r,{methods:t,retryCount:o,retryDelay:i,uid:f}),value:d}}function KB(e,t={}){const{key:n="custom",methods:r,name:o="Custom Provider",retryDelay:i}=t;return({retryCount:l})=>$C({key:n,methods:r,name:o,request:e.request.bind(e),retryCount:t.retryCount??l,retryDelay:i,type:"custom"})}class YB extends oe{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function zC(e,t={}){const{batch:n,fetchFn:r,fetchOptions:o,key:i="http",methods:l,name:c="HTTP JSON-RPC",onFetchRequest:d,onFetchResponse:f,retryDelay:p,raw:m}=t;return({chain:g,retryCount:v,timeout:w})=>{const{batchSize:b=1e3,wait:C=0}=typeof n=="object"?n:{},S=t.retryCount??v,I=w??t.timeout??1e4,A=e||(g==null?void 0:g.rpcUrls.default.http[0]);if(!A)throw new YB;const j=dN(A,{fetchFn:r,fetchOptions:o,onRequest:d,onResponse:f,timeout:I});return $C({key:i,methods:l,name:c,async request({method:N,params:_}){const P={method:N,params:_},{schedule:R}=g3({id:A,wait:C,shouldSplitBatch(H){return H.length>b},fn:H=>j.request({body:H}),sort:(H,L)=>H.id-L.id}),M=async H=>n?R(H):[await j.request({body:H})],[{error:Q,result:V}]=await M(P);if(m)return{error:Q,result:V};if(Q)throw new yy({body:P,error:Q,url:A});return V},retryCount:S,retryDelay:p,timeout:I,type:"http"},{fetchOptions:o,url:A})}}async function WC(e,t={}){const{assertChainId:n=!0}=t;let r;if(t.connector){const{connector:p}=t;if(e.state.status==="reconnecting"&&!p.getAccounts&&!p.getChainId)throw new UB({connector:p});const[m,g]=await Promise.all([p.getAccounts().catch(v=>{if(t.account===null)return[];throw v}),p.getChainId()]);r={accounts:m,chainId:g,connector:p}}else r=e.state.connections.get(e.state.current);if(!r)throw new FB;const o=t.chainId??r.chainId,i=await r.connector.getChainId();if(n&&i!==o)throw new DB({connectionChainId:o,connectorChainId:i});const l=r.connector;if(l.getClient)return l.getClient({chainId:o});const c=nt(t.account??r.accounts[0]);if(c&&(c.address=yt(c.address)),t.account&&!r.accounts.some(p=>p.toLowerCase()===c.address.toLowerCase()))throw new LB({address:c.address,connector:l});const d=e.chains.find(p=>p.id===o),f=await r.connector.getProvider({chainId:o});return UC({account:c,chain:d,name:"Connector Client",transport:p=>KB(f)({...p,retryCount:0})})}async function JB(e,t={}){var o,i;let n;if(t.connector)n=t.connector;else{const{connections:l,current:c}=e.state,d=l.get(c);n=d==null?void 0:d.connector}const r=e.state.connections;n&&(await n.disconnect(),n.emitter.off("change",e._internal.events.change),n.emitter.off("disconnect",e._internal.events.disconnect),n.emitter.on("connect",e._internal.events.connect),r.delete(n.uid)),e.setState(l=>{if(r.size===0)return{...l,connections:new Map,current:null,status:"disconnected"};const c=r.values().next().value;return{...l,connections:new Map(r),current:c.connector.uid}});{const l=e.state.current;if(!l)return;const c=(o=e.state.connections.get(l))==null?void 0:o.connector;if(!c)return;await((i=e.storage)==null?void 0:i.setItem("recentConnectorId",c.id))}}function qC(e){return typeof e=="number"?e:e==="wei"?0:Math.abs($7[e])}function HC(e){const t=e.state.current,n=e.state.connections.get(t),r=n==null?void 0:n.accounts,o=r==null?void 0:r[0],i=e.chains.find(c=>c.id===(n==null?void 0:n.chainId)),l=e.state.status;switch(l){case"connected":return{address:o,addresses:r,chain:i,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:l};case"reconnecting":return{address:o,addresses:r,chain:i,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!!o,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:l};case"connecting":return{address:o,addresses:r,chain:i,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:l};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:l}}}async function ZB(e,t){const{allowFailure:n=!0,chainId:r,contracts:o,...i}=t,l=e.getClient({chainId:r});return ll(l,CC,"multicall")({allowFailure:n,contracts:o,...i})}function XB(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return ll(o,cr,"readContract")(r)}async function eT(e,t){var c;const{allowFailure:n=!0,blockNumber:r,blockTag:o,...i}=t,l=t.contracts;try{const d={};for(const[g,v]of l.entries()){const w=v.chainId??e.state.chainId;d[w]||(d[w]=[]),(c=d[w])==null||c.push({contract:v,index:g})}const f=()=>Object.entries(d).map(([g,v])=>ZB(e,{...i,allowFailure:n,blockNumber:r,blockTag:o,chainId:Number.parseInt(g,10),contracts:v.map(({contract:w})=>w)})),p=(await Promise.all(f())).flat(),m=Object.values(d).flatMap(g=>g.map(({index:v})=>v));return p.reduce((g,v,w)=>(g&&(g[m[w]]=v),g),[])}catch(d){if(d instanceof py)throw d;const f=()=>l.map(p=>XB(e,{...p,blockNumber:r,blockTag:o}));return n?(await Promise.allSettled(f())).map(p=>p.status==="fulfilled"?{result:p.value,status:"success"}:{error:p.reason,result:void 0,status:"failure"}):await Promise.all(f())}}async function tT(e,t){const{address:n,blockNumber:r,blockTag:o,chainId:i,token:l,unit:c="ether"}=t;if(l)try{return await J6(e,{balanceAddress:n,chainId:i,symbolType:"string",tokenAddress:l})}catch(g){if(g.name==="ContractFunctionExecutionError"){const v=await J6(e,{balanceAddress:n,chainId:i,symbolType:"bytes32",tokenAddress:l}),w=Fj($r(v.symbol,{dir:"right"}));return{...v,symbol:w}}throw g}const d=e.getClient({chainId:i}),p=await ll(d,$3,"getBalance")(r?{address:n,blockNumber:r}:{address:n,blockTag:o}),m=e.chains.find(g=>g.id===i)??d.chain;return{decimals:m.nativeCurrency.decimals,formatted:Wf(p,qC(c)),symbol:m.nativeCurrency.symbol,value:p}}async function J6(e,t){const{balanceAddress:n,chainId:r,symbolType:o,tokenAddress:i,unit:l}=t,c={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:o}]}],address:i},[d,f,p]=await eT(e,{allowFailure:!1,contracts:[{...c,functionName:"balanceOf",args:[n],chainId:r},{...c,functionName:"decimals",chainId:r},{...c,functionName:"symbol",chainId:r}]}),m=Wf(d??"0",qC(l??f));return{decimals:f,formatted:m,symbol:p,value:d}}function Z6(e){return e.state.chainId}function Ci(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ci(e[r],t[r]))return!1;return!0}if(typeof e.valueOf=="function"&&e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(typeof e.toString=="function"&&e.toString!==Object.prototype.toString)return e.toString()===t.toString();const o=Object.keys(e);if(n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.hasOwn(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(i&&!Ci(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}let D0=[];function X6(e){const t=e.chains;return Ci(D0,t)?D0:(D0=t,t)}function nT(e,t={}){try{return e.getClient(t)}catch{return}}let Vd=[];function cg(e){const t=[...e.state.connections.values()];return e.state.status==="reconnecting"||Ci(Vd,t)?Vd:(Vd=t,t)}let Qd=[];function ex(e){const t=e.connectors;return Qd.length===t.length&&Qd.every((n,r)=>n===t[r])?Qd:(Qd=t,t)}function rT(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return ll(o,x3,"getEnsAvatar")(r)}function oT(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return ll(o,C3,"getEnsName")(r)}function ug(e,t={}){const n=nT(e,t);return n==null?void 0:n.extend(QB)}async function sT(e,t={}){return(await WC(e,t)).extend(GB)}let U0=!1;async function iT(e,t={}){var f,p;if(U0)return[];U0=!0,e.setState(m=>({...m,status:m.current?"reconnecting":"connecting"}));const n=[];if((f=t.connectors)!=null&&f.length)for(const m of t.connectors){let g;typeof m=="function"?g=e._internal.connectors.setup(m):g=m,n.push(g)}else n.push(...e.connectors);let r;try{r=await((p=e.storage)==null?void 0:p.getItem("recentConnectorId"))}catch{}const o={};for(const[,m]of e.state.connections)o[m.connector.id]=1;r&&(o[r]=0);const i=Object.keys(o).length>0?[...n].sort((m,g)=>(o[m.id]??10)-(o[g.id]??10)):n;let l=!1;const c=[],d=[];for(const m of i){const g=await m.getProvider().catch(()=>{});if(!g||d.some(b=>b===g)||!await m.isAuthorized())continue;const w=await m.connect({isReconnecting:!0}).catch(()=>null);w&&(m.emitter.off("connect",e._internal.events.connect),m.emitter.on("change",e._internal.events.change),m.emitter.on("disconnect",e._internal.events.disconnect),e.setState(b=>{const C=new Map(l?b.connections:new Map).set(m.uid,{accounts:w.accounts,chainId:w.chainId,connector:m});return{...b,current:l?b.current:m.uid,connections:C}}),c.push({accounts:w.accounts,chainId:w.chainId,connector:m}),d.push(g),l=!0)}return(e.state.status==="reconnecting"||e.state.status==="connecting")&&(l?e.setState(m=>({...m,status:"connected"})):e.setState(m=>({...m,connections:new Map,current:null,status:"disconnected"}))),U0=!1,c}async function aT(e,t){const{account:n,connector:r,...o}=t;let i;return typeof n=="object"&&n.type==="local"?i=e.getClient():i=await WC(e,{account:n,connector:r}),ll(i,OC,"signMessage")({...o,...n?{account:n}:{}})}class $n extends Po{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class lT extends Po{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function cT(e,t){var l;const{addEthereumChainParameter:n,chainId:r}=t,o=e.state.connections.get(((l=t.connector)==null?void 0:l.uid)??e.state.current);if(o){const c=o.connector;if(!c.switchChain)throw new lT({connector:c});return await c.switchChain({addEthereumChainParameter:n,chainId:r})}const i=e.chains.find(c=>c.id===r);if(!i)throw new Cs;return e.setState(c=>({...c,chainId:r})),i}function VC(e,t){const{onChange:n}=t;return e.subscribe(()=>HC(e),n,{equalityFn(r,o){const{connector:i,...l}=r,{connector:c,...d}=o;return Ci(l,d)&&(i==null?void 0:i.id)===(c==null?void 0:c.id)&&(i==null?void 0:i.uid)===(c==null?void 0:c.uid)}})}function uT(e,t){const{onChange:n}=t;return e.subscribe(r=>r.chainId,n)}function dT(e,t){const{onChange:n}=t;return e.subscribe(()=>cg(e),n,{equalityFn:Ci})}function fT(e,t){const{onChange:n}=t;return e._internal.connectors.subscribe((r,o)=>{n(Object.values(r),o)})}function hT(e,t){const{onChange:n}=t;return e.subscribe(()=>ug(e),n,{equalityFn(r,o){return(r==null?void 0:r.uid)===(o==null?void 0:o.uid)}})}lh.type="injected";function lh(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:n}=e;function r(){const d=e.target;if(typeof d=="function"){const f=d();if(f)return f}return typeof d=="object"?d:typeof d=="string"?{...pT[d]??{id:d,name:`${d[0].toUpperCase()}${d.slice(1)}`,provider:`is${d[0].toUpperCase()}${d.slice(1)}`}}:{id:"injected",name:"Injected",provider(f){return f==null?void 0:f.ethereum}}}let o,i,l,c;return d=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},get supportsSimulation(){return!0},type:lh.type,async setup(){const f=await this.getProvider();f!=null&&f.on&&e.target&&(l||(l=this.onConnect.bind(this),f.on("connect",l)),o||(o=this.onAccountsChanged.bind(this),f.on("accountsChanged",o)))},async connect({chainId:f,isReconnecting:p,withCapabilities:m}={}){var w,b,C,S,I,A;const g=await this.getProvider();if(!g)throw new $n;let v=[];if(p)v=await this.getAccounts().catch(()=>[]);else if(t)try{v=(S=(C=(b=(w=(await g.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:w.caveats)==null?void 0:b[0])==null?void 0:C.value)==null?void 0:S.map(N=>yt(N)),v.length>0&&(v=await this.getAccounts())}catch(j){const N=j;if(N.code===Ve.code)throw new Ve(N);if(N.code===zr.code)throw N}try{!(v!=null&&v.length)&&!p&&(v=(await g.request({method:"eth_requestAccounts"})).map(_=>yt(_))),l&&(g.removeListener("connect",l),l=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),i||(i=this.onChainChanged.bind(this),g.on("chainChanged",i)),c||(c=this.onDisconnect.bind(this),g.on("disconnect",c));let j=await this.getChainId();if(f&&j!==f){const N=await this.switchChain({chainId:f}).catch(_=>{if(_.code===Ve.code)throw _;return{id:j}});j=(N==null?void 0:N.id)??j}return t&&await((I=d.storage)==null?void 0:I.removeItem(`${this.id}.disconnected`)),e.target||await((A=d.storage)==null?void 0:A.setItem("injected.connected",!0)),{accounts:m?v.map(N=>({address:N,capabilities:{}})):v,chainId:j}}catch(j){const N=j;throw N.code===Ve.code?new Ve(N):N.code===zr.code?new zr(N):N}},async disconnect(){var p,m;const f=await this.getProvider();if(!f)throw new $n;i&&(f.removeListener("chainChanged",i),i=void 0),c&&(f.removeListener("disconnect",c),c=void 0),l||(l=this.onConnect.bind(this),f.on("connect",l));try{await nh(()=>f.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await((p=d.storage)==null?void 0:p.setItem(`${this.id}.disconnected`,!0)),e.target||await((m=d.storage)==null?void 0:m.removeItem("injected.connected"))},async getAccounts(){const f=await this.getProvider();if(!f)throw new $n;return(await f.request({method:"eth_accounts"})).map(m=>yt(m))},async getChainId(){const f=await this.getProvider();if(!f)throw new $n;const p=await f.request({method:"eth_chainId"});return Number(p)},async getProvider(){if(typeof window>"u")return;let f;const p=r();return typeof p.provider=="function"?f=p.provider(window):typeof p.provider=="string"?f=cf(window,p.provider):f=p.provider,f&&!f.removeListener&&("off"in f&&typeof f.off=="function"?f.removeListener=f.off:f.removeListener=()=>{}),f},async isAuthorized(){var f,p;try{if(t&&await((f=d.storage)==null?void 0:f.getItem(`${this.id}.disconnected`))||!e.target&&!await((p=d.storage)==null?void 0:p.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const w=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",w),!!await this.getProvider()),b=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(S=>window.addEventListener("ethereum#initialized",()=>S(w()),{once:!0}))]:[],new Promise(S=>setTimeout(()=>S(w()),b))]))return!0}throw new $n}return!!(await bi(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:f,chainId:p}){var w,b,C,S;const m=await this.getProvider();if(!m)throw new $n;const g=d.chains.find(I=>I.id===p);if(!g)throw new qn(new Cs);const v=new Promise(I=>{const A=(j=>{"chainId"in j&&j.chainId===p&&(d.emitter.off("change",A),I())});d.emitter.on("change",A)});try{return await Promise.all([m.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(p)}]}).then(async()=>{await this.getChainId()===p&&d.emitter.emit("change",{chainId:p})}),v]),g}catch(I){const A=I;if(A.code===4902||((b=(w=A==null?void 0:A.data)==null?void 0:w.originalError)==null?void 0:b.code)===4902)try{const{default:j,...N}=g.blockExplorers??{};let _;f!=null&&f.blockExplorerUrls?_=f.blockExplorerUrls:j&&(_=[j.url,...Object.values(N).map(M=>M.url)]);let P;(C=f==null?void 0:f.rpcUrls)!=null&&C.length?P=f.rpcUrls:P=[((S=g.rpcUrls.default)==null?void 0:S.http[0])??""];const R={blockExplorerUrls:_,chainId:ge(p),chainName:(f==null?void 0:f.chainName)??g.name,iconUrls:f==null?void 0:f.iconUrls,nativeCurrency:(f==null?void 0:f.nativeCurrency)??g.nativeCurrency,rpcUrls:P};return await Promise.all([m.request({method:"wallet_addEthereumChain",params:[R]}).then(async()=>{if(await this.getChainId()===p)d.emitter.emit("change",{chainId:p});else throw new Ve(new Error("User rejected switch after adding network."))}),v]),g}catch(j){throw new Ve(j)}throw A.code===Ve.code?new Ve(A):new qn(A)}},async onAccountsChanged(f){var p;if(f.length===0)this.onDisconnect();else if(d.emitter.listenerCount("connect")){const m=(await this.getChainId()).toString();this.onConnect({chainId:m}),t&&await((p=d.storage)==null?void 0:p.removeItem(`${this.id}.disconnected`))}else d.emitter.emit("change",{accounts:f.map(m=>yt(m))})},onChainChanged(f){const p=Number(f);d.emitter.emit("change",{chainId:p})},async onConnect(f){const p=await this.getAccounts();if(p.length===0)return;const m=Number(f.chainId);d.emitter.emit("connect",{accounts:p,chainId:m});const g=await this.getProvider();g&&(l&&(g.removeListener("connect",l),l=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),i||(i=this.onChainChanged.bind(this),g.on("chainChanged",i)),c||(c=this.onDisconnect.bind(this),g.on("disconnect",c)))},async onDisconnect(f){const p=await this.getProvider();f&&f.code===1013&&p&&(await this.getAccounts()).length||(d.emitter.emit("disconnect"),p&&(i&&(p.removeListener("chainChanged",i),i=void 0),c&&(p.removeListener("disconnect",c),c=void 0),l||(l=this.onConnect.bind(this),p.on("connect",l))))}})}const pT={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e!=null&&e.coinbaseWalletExtension?e.coinbaseWalletExtension:cf(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return cf(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const r of n)if(t[r])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){var t,n;return(t=e==null?void 0:e.phantom)!=null&&t.ethereum?(n=e.phantom)==null?void 0:n.ethereum:cf(e,"isPhantom")}}};function cf(e,t){function n(o){return typeof t=="function"?t(o):typeof t=="string"?o[t]:!0}const r=e.ethereum;if(r!=null&&r.providers)return r.providers.find(o=>n(o));if(r&&n(r))return r}function mT(e){if(typeof window>"u")return;const t=n=>e(n.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}function gT(){const e=new Set;let t=[];const n=()=>mT(o=>{t.some(({info:i})=>i.uuid===o.info.uuid)||(t=[...t,o],e.forEach(i=>i(t,{added:[o]})))});let r=n();return{_listeners(){return e},clear(){e.forEach(o=>o([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r==null||r()},findProvider({rdns:o}){return t.find(i=>i.info.rdns===o)},getProviders(){return t},reset(){this.clear(),r==null||r(),r=n()},subscribe(o,{emitImmediately:i}={}){return e.add(o),i&&o(t,{added:t}),()=>e.delete(o)}}}const yT=e=>(t,n,r)=>{const o=r.subscribe;return r.subscribe=(l,c,d)=>{let f=l;if(c){const p=(d==null?void 0:d.equalityFn)||Object.is;let m=l(r.getState());f=g=>{const v=l(g);if(!p(m,v)){const w=m;c(m=v,w)}},d!=null&&d.fireImmediately&&c(m,m)}return o(f)},e(t,n,r)},vT=yT;function wT(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const l=d=>d===null?null:JSON.parse(d,void 0),c=(i=n.getItem(o))!=null?i:null;return c instanceof Promise?c.then(l):l(c)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,void 0)),removeItem:o=>n.removeItem(o)}}const dg=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return dg(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return dg(r)(n)}}}},bT=(e,t)=>(n,r,o)=>{let i={storage:wT(()=>localStorage),partialize:b=>b,version:0,merge:(b,C)=>({...C,...b}),...t},l=!1;const c=new Set,d=new Set;let f=i.storage;if(!f)return e((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...b)},r,o);const p=()=>{const b=i.partialize({...r()});return f.setItem(i.name,{state:b,version:i.version})},m=o.setState;o.setState=(b,C)=>{m(b,C),p()};const g=e((...b)=>{n(...b),p()},r,o);o.getInitialState=()=>g;let v;const w=()=>{var b,C;if(!f)return;l=!1,c.forEach(I=>{var A;return I((A=r())!=null?A:g)});const S=((C=i.onRehydrateStorage)==null?void 0:C.call(i,(b=r())!=null?b:g))||void 0;return dg(f.getItem.bind(f))(i.name).then(I=>{if(I)if(typeof I.version=="number"&&I.version!==i.version){if(i.migrate)return[!0,i.migrate(I.state,I.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,I.state];return[!1,void 0]}).then(I=>{var A;const[j,N]=I;if(v=i.merge(N,(A=r())!=null?A:g),n(v,!0),j)return p()}).then(()=>{S==null||S(v,void 0),v=r(),l=!0,d.forEach(I=>I(v))}).catch(I=>{S==null||S(void 0,I)})};return o.persist={setOptions:b=>{i={...i,...b},b.storage&&(f=b.storage)},clearStorage:()=>{f==null||f.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>w(),hasHydrated:()=>l,onHydrate:b=>(c.add(b),()=>{c.delete(b)}),onFinishHydration:b=>(d.add(b),()=>{d.delete(b)})},i.skipHydration||w(),v||g},xT=bT,tx=e=>{let t;const n=new Set,r=(f,p)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const g=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,g))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,o,c);return c},$0=e=>e?tx(e):tx;var z0={exports:{}},nx;function CT(){return nx||(nx=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(d,f,p){this.fn=d,this.context=f,this.once=p||!1}function i(d,f,p,m,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new o(p,m||d,g),w=n?n+f:f;return d._events[w]?d._events[w].fn?d._events[w]=[d._events[w],v]:d._events[w].push(v):(d._events[w]=v,d._eventsCount++),d}function l(d,f){--d._eventsCount===0?d._events=new r:delete d._events[f]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var f=[],p,m;if(this._eventsCount===0)return f;for(m in p=this._events)t.call(p,m)&&f.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},c.prototype.listeners=function(f){var p=n?n+f:f,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,v=m.length,w=new Array(v);g<v;g++)w[g]=m[g].fn;return w},c.prototype.listenerCount=function(f){var p=n?n+f:f,m=this._events[p];return m?m.fn?1:m.length:0},c.prototype.emit=function(f,p,m,g,v,w){var b=n?n+f:f;if(!this._events[b])return!1;var C=this._events[b],S=arguments.length,I,A;if(C.fn){switch(C.once&&this.removeListener(f,C.fn,void 0,!0),S){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,p),!0;case 3:return C.fn.call(C.context,p,m),!0;case 4:return C.fn.call(C.context,p,m,g),!0;case 5:return C.fn.call(C.context,p,m,g,v),!0;case 6:return C.fn.call(C.context,p,m,g,v,w),!0}for(A=1,I=new Array(S-1);A<S;A++)I[A-1]=arguments[A];C.fn.apply(C.context,I)}else{var j=C.length,N;for(A=0;A<j;A++)switch(C[A].once&&this.removeListener(f,C[A].fn,void 0,!0),S){case 1:C[A].fn.call(C[A].context);break;case 2:C[A].fn.call(C[A].context,p);break;case 3:C[A].fn.call(C[A].context,p,m);break;case 4:C[A].fn.call(C[A].context,p,m,g);break;default:if(!I)for(N=1,I=new Array(S-1);N<S;N++)I[N-1]=arguments[N];C[A].fn.apply(C[A].context,I)}}return!0},c.prototype.on=function(f,p,m){return i(this,f,p,m,!1)},c.prototype.once=function(f,p,m){return i(this,f,p,m,!0)},c.prototype.removeListener=function(f,p,m,g){var v=n?n+f:f;if(!this._events[v])return this;if(!p)return l(this,v),this;var w=this._events[v];if(w.fn)w.fn===p&&(!g||w.once)&&(!m||w.context===m)&&l(this,v);else{for(var b=0,C=[],S=w.length;b<S;b++)(w[b].fn!==p||g&&!w[b].once||m&&w[b].context!==m)&&C.push(w[b]);C.length?this._events[v]=C.length===1?C[0]:C:l(this,v)}return this},c.prototype.removeAllListeners=function(f){var p;return f?(p=n?n+f:f,this._events[p]&&l(this,p)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(z0)),z0.exports}var kT=CT();const ET=t5(kT);class AT{constructor(t){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new ET})}on(t,n){this._emitter.on(t,n)}once(t,n){this._emitter.once(t,n)}off(t,n){this._emitter.off(t,n)}emit(t,...n){const r=n[0];this._emitter.emit(t,{uid:this.uid,...r})}listenerCount(t){return this._emitter.listenerCount(t)}}function ST(e){return new AT(e)}function jT(e,t){return JSON.parse(e,(n,r)=>{let o=r;return(o==null?void 0:o.__type)==="bigint"&&(o=BigInt(o.value)),(o==null?void 0:o.__type)==="Map"&&(o=new Map(o.value)),(t==null?void 0:t(n,o))??o})}function rx(e,t){return e.slice(0,t).join(".")||"."}function ox(e,t){const{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function IT(e,t){const n=typeof e=="function",r=typeof t=="function",o=[],i=[];return function(c,d){if(typeof d=="object")if(o.length){const f=ox(o,this);f===0?o[o.length]=this:(o.splice(f),i.splice(f)),i[i.length]=c;const p=ox(o,d);if(p!==0)return r?t.call(this,c,d,rx(i,p)):`[ref=${rx(i,p)}]`}else o[0]=d,i[0]=c;return n?e.call(this,c,d):d}}function NT(e,t,n,r){return JSON.stringify(e,IT((o,i)=>{let l=i;return typeof l=="bigint"&&(l={__type:"bigint",value:i.toString()}),l instanceof Map&&(l={__type:"Map",value:Array.from(i.entries())}),(t==null?void 0:t(o,l))??l},r),n??void 0)}function PT(e){const{deserialize:t=jT,key:n="wagmi",serialize:r=NT,storage:o=QC}=e;function i(l){return l instanceof Promise?l.then(c=>c).catch(()=>null):l}return{...o,key:n,async getItem(l,c){const d=o.getItem(`${n}.${l}`),f=await i(d);return f?t(f)??null:c??null},async setItem(l,c){const d=`${n}.${l}`;c===null?await i(o.removeItem(d)):await i(o.setItem(d,r(c)))},async removeItem(l){await i(o.removeItem(`${n}.${l}`))}}}const QC={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function BT(){const e=typeof window<"u"&&window.localStorage?window.localStorage:QC;return{getItem(t){return e.getItem(t)},removeItem(t){e.removeItem(t)},setItem(t,n){try{e.setItem(t,n)}catch{}}}}const fg=256;let Gd=fg,Kd;function TT(e=11){if(!Kd||Gd+e>fg*2){Kd="",Gd=0;for(let t=0;t<fg;t++)Kd+=(256+Math.random()*256|0).toString(16).substring(1)}return Kd.substring(Gd,Gd+++e)}function _T(e){const{multiInjectedProviderDiscovery:t=!0,storage:n=PT({storage:BT()}),syncConnectedChain:r=!0,ssr:o=!1,...i}=e,l=typeof window<"u"&&t?gT():void 0,c=$0(()=>i.chains),d=$0(()=>{const N=[],_=new Set;for(const P of i.connectors??[]){const R=f(P);if(N.push(R),!o&&R.rdns){const M=typeof R.rdns=="string"?[R.rdns]:R.rdns;for(const Q of M)_.add(Q)}}if(!o&&l){const P=l.getProviders();for(const R of P)_.has(R.info.rdns)||N.push(f(p(R)))}return N});function f(N){var R;const _=ST(TT()),P={...N({emitter:_,chains:c.getState(),storage:n,transports:i.transports}),emitter:_,uid:_.uid};return _.on("connect",A),(R=P.setup)==null||R.call(P),P}function p(N){const{info:_}=N,P=N.provider;return lh({target:{..._,id:_.rdns,provider:P}})}const m=new Map;function g(N={}){const _=N.chainId??C.getState().chainId,P=c.getState().find(M=>M.id===_);if(N.chainId&&!P)throw new Cs;{const M=m.get(C.getState().chainId);if(M&&!P)return M;if(!P)throw new Cs}{const M=m.get(_);if(M)return M}let R;if(i.client)R=i.client({chain:P});else{const M=P.id,Q=c.getState().map(L=>L.id),V={},H=Object.entries(i);for(const[L,z]of H)if(!(L==="chains"||L==="client"||L==="connectors"||L==="transports"))if(typeof z=="object")if(M in z)V[L]=z[M];else{if(Q.some(K=>K in z))continue;V[L]=z}else V[L]=z;R=UC({...V,chain:P,batch:V.batch??{multicall:!0},transport:L=>i.transports[M]({...L,connectors:d})})}return m.set(_,R),R}function v(){return{chainId:c.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let w;const b="0.0.0-canary-";lf.startsWith(b)?w=Number.parseInt(lf.replace(b,""),10):w=Number.parseInt(lf.split(".")[0]??"0",10);const C=$0(vT(n?xT(v,{migrate(N,_){if(_===w)return N;const P=v(),R=S(N,P.chainId);return{...P,chainId:R}},name:"store",partialize(N){return{connections:{__type:"Map",value:Array.from(N.connections.entries()).map(([_,P])=>{const{id:R,name:M,type:Q,uid:V}=P.connector;return[_,{...P,connector:{id:R,name:M,type:Q,uid:V}}]})},chainId:N.chainId,current:N.current}},merge(N,_){typeof N=="object"&&N&&"status"in N&&delete N.status;const P=S(N,_.chainId);return{..._,...N,chainId:P}},skipHydration:o,storage:n,version:w}):v));C.setState(v());function S(N,_){return N&&typeof N=="object"&&"chainId"in N&&typeof N.chainId=="number"&&c.getState().some(P=>P.id===N.chainId)?N.chainId:_}r&&C.subscribe(({connections:N,current:_})=>{var P;return _?(P=N.get(_))==null?void 0:P.chainId:void 0},N=>{if(c.getState().some(P=>P.id===N))return C.setState(P=>({...P,chainId:N??P.chainId}))}),l==null||l.subscribe(N=>{const _=new Set,P=new Set;for(const M of d.getState())if(_.add(M.id),M.rdns){const Q=typeof M.rdns=="string"?[M.rdns]:M.rdns;for(const V of Q)P.add(V)}const R=[];for(const M of N){if(P.has(M.info.rdns))continue;const Q=f(p(M));_.has(Q.id)||R.push(Q)}n&&!C.persist.hasHydrated()||d.setState(M=>[...M,...R],!0)});function I(N){C.setState(_=>{const P=_.connections.get(N.uid);return P?{..._,connections:new Map(_.connections).set(N.uid,{accounts:N.accounts??P.accounts,chainId:N.chainId??P.chainId,connector:P.connector})}:_})}function A(N){C.getState().status==="connecting"||C.getState().status==="reconnecting"||C.setState(_=>{const P=d.getState().find(R=>R.uid===N.uid);return P?(P.emitter.listenerCount("connect")&&P.emitter.off("connect",I),P.emitter.listenerCount("change")||P.emitter.on("change",I),P.emitter.listenerCount("disconnect")||P.emitter.on("disconnect",j),{..._,connections:new Map(_.connections).set(N.uid,{accounts:N.accounts,chainId:N.chainId,connector:P}),current:N.uid,status:"connected"}):_})}function j(N){C.setState(_=>{const P=_.connections.get(N.uid);if(P){const M=P.connector;M.emitter.listenerCount("change")&&P.connector.emitter.off("change",I),M.emitter.listenerCount("disconnect")&&P.connector.emitter.off("disconnect",j),M.emitter.listenerCount("connect")||P.connector.emitter.on("connect",A)}if(_.connections.delete(N.uid),_.connections.size===0)return{..._,connections:new Map,current:null,status:"disconnected"};const R=_.connections.values().next().value;return{..._,connections:new Map(_.connections),current:R.connector.uid}})}return{get chains(){return c.getState()},get connectors(){return d.getState()},storage:n,getClient:g,get state(){return C.getState()},setState(N){let _;typeof N=="function"?_=N(C.getState()):_=N;const P=v();typeof _!="object"&&(_=P),Object.keys(P).some(M=>!(M in _))&&(_=P),C.setState(_,!0)},subscribe(N,_,P){return C.subscribe(N,_,P?{...P,fireImmediately:P.emitImmediately}:void 0)},_internal:{mipd:l,async revalidate(){const N=C.getState(),_=N.connections;let P=N.current;for(const[,R]of _){const M=R.connector;M.isAuthorized&&await M.isAuthorized()||(_.delete(M.uid),P===M.uid&&(P=null))}C.setState(R=>({...R,connections:_,current:P}))},store:C,ssr:!!o,syncConnectedChain:r,transports:i.transports,chains:{setState(N){const _=typeof N=="function"?N(c.getState()):N;if(_.length!==0)return c.setState(_,!0)},subscribe(N){return c.subscribe(N)}},connectors:{providerDetailToConnector:p,setup:f,setState(N){return d.setState(typeof N=="function"?N(d.getState()):N,!0)},subscribe(N){return d.subscribe(N)}},events:{change:I,connect:A,disconnect:j}}}}function RT(e,t){const{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(o=>o.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(o=>{var d;const i=new Set;for(const f of o??[])if(f.rdns){const p=Array.isArray(f.rdns)?f.rdns:[f.rdns];for(const m of p)i.add(m)}const l=[],c=((d=e._internal.mipd)==null?void 0:d.getProviders())??[];for(const f of c){if(i.has(f.info.rdns))continue;const p=e._internal.connectors.providerDetailToConnector(f),m=e._internal.connectors.setup(p);l.push(m)}return[...o,...l]})),r?iT(e):e.storage&&e.setState(o=>({...o,connections:new Map}))}}}function GC(e){var i,l,c;const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const r=(l=(i=e.transports)==null?void 0:i[t.id])==null?void 0:l.call(i,{chain:t});return(((c=r==null?void 0:r.value)==null?void 0:c.transports)||[r]).map(({value:d})=>(d==null?void 0:d.url)||n)}function MT(e){const{children:t,config:n,initialState:r,reconnectOnMount:o=!0}=e,{onMount:i}=RT(n,{initialState:r,reconnectOnMount:o});n._internal.ssr||i();const l=B.useRef(!0);return B.useEffect(()=>{if(l.current&&n._internal.ssr)return i(),()=>{l.current=!1}},[]),t}const KC=B.createContext(void 0);function OT(e){const{children:t,config:n}=e,r={value:n};return B.createElement(MT,e,B.createElement(KC.Provider,r,t))}const FT="2.19.5",LT=()=>`wagmi@${FT}`;class DT extends Po{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 LT()}}class UT extends DT{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function jt(e={}){const t=e.config??B.useContext(KC);if(!t)throw new UT;return t}function $T(e,t){const{onChange:n}=t;return e._internal.chains.subscribe((r,o)=>{n(r,o)})}var W0={exports:{}},q0={},H0={exports:{}},V0={};/**
86
+ * @license React
87
+ * use-sync-external-store-shim.production.js
88
+ *
89
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
90
+ *
91
+ * This source code is licensed under the MIT license found in the
92
+ * LICENSE file in the root directory of this source tree.
93
+ */var sx;function zT(){if(sx)return V0;sx=1;var e=lu();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function c(m,g){var v=g(),w=r({inst:{value:v,getSnapshot:g}}),b=w[0].inst,C=w[1];return i(function(){b.value=v,b.getSnapshot=g,d(b)&&C({inst:b})},[m,v,g]),o(function(){return d(b)&&C({inst:b}),m(function(){d(b)&&C({inst:b})})},[m]),l(v),v}function d(m){var g=m.getSnapshot;m=m.value;try{var v=g();return!n(m,v)}catch{return!0}}function f(m,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return V0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,V0}var ix;function WT(){return ix||(ix=1,H0.exports=zT()),H0.exports}/**
94
+ * @license React
95
+ * use-sync-external-store-shim/with-selector.production.js
96
+ *
97
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
98
+ *
99
+ * This source code is licensed under the MIT license found in the
100
+ * LICENSE file in the root directory of this source tree.
101
+ */var ax;function qT(){if(ax)return q0;ax=1;var e=lu(),t=WT();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return q0.useSyncExternalStoreWithSelector=function(f,p,m,g,v){var w=i(null);if(w.current===null){var b={hasValue:!1,value:null};w.current=b}else b=w.current;w=c(function(){function S(_){if(!I){if(I=!0,A=_,_=g(_),v!==void 0&&b.hasValue){var P=b.value;if(v(P,_))return j=P}return j=_}if(P=j,r(A,_))return P;var R=g(_);return v!==void 0&&v(P,R)?(A=_,P):(A=_,j=R)}var I=!1,A,j,N=m===void 0?null:m;return[function(){return S(p())},N===null?void 0:function(){return S(N())}]},[p,m,g,v]);var C=o(f,w[0],w[1]);return l(function(){b.hasValue=!0,b.value=C},[C]),d(C),C},q0}var lx;function HT(){return lx||(lx=1,W0.exports=qT()),W0.exports}var YC=HT();const Q0=e=>typeof e=="object"&&!Array.isArray(e);function VT(e,t,n=t,r=Ci){const o=B.useRef([]),i=YC.useSyncExternalStoreWithSelector(e,t,n,l=>l,(l,c)=>{if(Q0(l)&&Q0(c)&&o.current.length){for(const d of o.current)if(!r(l[d],c[d]))return!1;return!0}return r(l,c)});return B.useMemo(()=>{if(Q0(i)){const l={...i};let c={};for(const[d,f]of Object.entries(l))c={...c,[d]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(d)||o.current.push(d),f)}};return Object.defineProperties(l,c),l}return i},[i])}function zt(e={}){const t=jt(e);return VT(n=>VC(t,{onChange:n}),()=>HC(t))}function JC(e={}){const{onConnect:t,onDisconnect:n}=e,r=jt(e);B.useEffect(()=>VC(r,{onChange(o,i){if((i.status==="reconnecting"||i.status==="connecting"&&i.address===void 0)&&o.status==="connected"){const{address:l,addresses:c,chain:d,chainId:f,connector:p}=o,m=i.status==="reconnecting"||i.status===void 0;t==null||t({address:l,addresses:c,chain:d,chainId:f,connector:p,isReconnected:m})}else i.status==="connected"&&o.status==="disconnected"&&(n==null||n())}}),[r,t,n])}var cl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ti,os,Ia,q2,QT=(q2=class extends cl{constructor(){super();je(this,ti);je(this,os);je(this,Ia);pe(this,Ia,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){W(this,os)||this.setEventListener(W(this,Ia))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,os))==null||t.call(this),pe(this,os,void 0))}setEventListener(t){var n;pe(this,Ia,t),(n=W(this,os))==null||n.call(this),pe(this,os,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){W(this,ti)!==t&&(pe(this,ti,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof W(this,ti)=="boolean"?W(this,ti):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ti=new WeakMap,os=new WeakMap,Ia=new WeakMap,q2),Jy=new QT,GT={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ss,ny,H2,KT=(H2=class{constructor(){je(this,ss,GT);je(this,ny,!1)}setTimeoutProvider(e){pe(this,ss,e)}setTimeout(e,t){return W(this,ss).setTimeout(e,t)}clearTimeout(e){W(this,ss).clearTimeout(e)}setInterval(e,t){return W(this,ss).setInterval(e,t)}clearInterval(e){W(this,ss).clearInterval(e)}},ss=new WeakMap,ny=new WeakMap,H2),Zs=new KT;function YT(e){setTimeout(e,0)}var JT=typeof window>"u"||"Deno"in globalThis;function un(){}function ZT(e,t){return typeof e=="function"?e(t):e}function hg(e){return typeof e=="number"&&e>=0&&e!==1/0}function ZC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gs(e,t){return typeof e=="function"?e(t):e}function or(e,t){return typeof e=="function"?e(t):e}function cx(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Zy(l,t.options))return!1}else if(!Uc(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||i&&!i(t))}function ux(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ki(t.options.mutationKey)!==ki(i))return!1}else if(!Uc(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Zy(e,t){return((t==null?void 0:t.queryKeyHashFn)||ki)(e)}function ki(e){return JSON.stringify(e,(t,n)=>pg(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Uc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Uc(e[n],t[n])):!1}var XT=Object.prototype.hasOwnProperty;function XC(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=dx(e)&&dx(t);if(!r&&!(pg(e)&&pg(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let f=0;for(let p=0;p<c;p++){const m=r?p:l[p],g=e[m],v=t[m];if(g===v){d[m]=g,(r?p<i:XT.call(e,m))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){d[m]=v;continue}const w=XC(g,v,n+1);d[m]=w,w===g&&f++}return i===c&&f===i?e:d}function Ef(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function dx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pg(e){if(!fx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!fx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function fx(e){return Object.prototype.toString.call(e)==="[object Object]"}function e_(e){return new Promise(t=>{Zs.setTimeout(t,e)})}function mg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?XC(e,t):t}function t_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function n_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Xy=Symbol();function ek(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Xy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function e1(e,t){return typeof e=="function"?e(...t):!!e}function r_(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var $c=(()=>{let e=()=>JT;return{isServer(){return e()},setIsServer(t){e=t}}})();function gg(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var o_=YT;function s_(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=o_;const i=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{i(()=>{c(...d)})},schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Et=s_(),Na,is,Pa,V2,i_=(V2=class extends cl{constructor(){super();je(this,Na,!0);je(this,is);je(this,Pa);pe(this,Pa,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){W(this,is)||this.setEventListener(W(this,Pa))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,is))==null||t.call(this),pe(this,is,void 0))}setEventListener(t){var n;pe(this,Pa,t),(n=W(this,is))==null||n.call(this),pe(this,is,t(this.setOnline.bind(this)))}setOnline(t){W(this,Na)!==t&&(pe(this,Na,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return W(this,Na)}},Na=new WeakMap,is=new WeakMap,Pa=new WeakMap,V2),Af=new i_;function a_(e){return Math.min(1e3*2**e,3e4)}function tk(e){return(e??"online")==="online"?Af.isOnline():!0}var yg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function nk(e){let t=!1,n=0,r;const o=gg(),i=()=>o.status!=="pending",l=b=>{var C;if(!i()){const S=new yg(b);g(S),(C=e.onCancel)==null||C.call(e,S)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>Jy.isFocused()&&(e.networkMode==="always"||Af.isOnline())&&e.canRun(),p=()=>tk(e.networkMode)&&e.canRun(),m=b=>{i()||(r==null||r(),o.resolve(b))},g=b=>{i()||(r==null||r(),o.reject(b))},v=()=>new Promise(b=>{var C;r=S=>{(i()||f())&&b(S)},(C=e.onPause)==null||C.call(e)}).then(()=>{var b;r=void 0,i()||(b=e.onContinue)==null||b.call(e)}),w=()=>{if(i())return;let b;const C=n===0?e.initialPromise:void 0;try{b=C??e.fn()}catch(S){b=Promise.reject(S)}Promise.resolve(b).then(m).catch(S=>{var _;if(i())return;const I=e.retry??($c.isServer()?0:3),A=e.retryDelay??a_,j=typeof A=="function"?A(n,S):A,N=I===!0||typeof I=="number"&&n<I||typeof I=="function"&&I(n,S);if(t||!N){g(S);return}n++,(_=e.onFail)==null||_.call(e,n,S),e_(j).then(()=>f()?void 0:v()).then(()=>{t?g(S):w()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r==null||r(),o),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?w():v().then(w),o)}}var ni,Q2,rk=(Q2=class{constructor(){je(this,ni)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hg(this.gcTime)&&pe(this,ni,Zs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($c.isServer()?1/0:300*1e3))}clearGcTimeout(){W(this,ni)!==void 0&&(Zs.clearTimeout(W(this,ni)),pe(this,ni,void 0))}},ni=new WeakMap,Q2),ri,Ba,rr,oi,Tt,ru,si,Un,ok,ho,G2,l_=(G2=class extends rk{constructor(t){super();je(this,Un);je(this,ri);je(this,Ba);je(this,rr);je(this,oi);je(this,Tt);je(this,ru);je(this,si);pe(this,si,!1),pe(this,ru,t.defaultOptions),this.setOptions(t.options),this.observers=[],pe(this,oi,t.client),pe(this,rr,W(this,oi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pe(this,ri,px(this.options)),this.state=t.state??W(this,ri),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=W(this,Tt))==null?void 0:t.promise}setOptions(t){if(this.options={...W(this,ru),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=px(this.options);n.data!==void 0&&(this.setState(hx(n.data,n.dataUpdatedAt)),pe(this,ri,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&W(this,rr).remove(this)}setData(t,n){const r=mg(this.state.data,t,this.options);return Me(this,Un,ho).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Me(this,Un,ho).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=W(this,Tt))==null?void 0:r.promise;return(o=W(this,Tt))==null||o.cancel(t),n?n.then(un).catch(un):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return W(this,ri)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>or(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Xy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>gs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ZC(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,Tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,Tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),W(this,rr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(W(this,Tt)&&(W(this,si)||Me(this,Un,ok).call(this)?W(this,Tt).cancel({revert:!0}):W(this,Tt).cancelRetry()),this.scheduleGc()),W(this,rr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,Un,ho).call(this,{type:"invalidate"})}async fetch(t,n){var d,f,p,m,g,v,w,b,C,S,I,A;if(this.state.fetchStatus!=="idle"&&((d=W(this,Tt))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(W(this,Tt))return W(this,Tt).continueRetry(),W(this,Tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(N=>N.options.queryFn);j&&this.setOptions(j.options)}const r=new AbortController,o=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(pe(this,si,!0),r.signal)})},i=()=>{const j=ek(this.options,n),_=(()=>{const P={client:W(this,oi),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return pe(this,si,!1),this.options.persister?this.options.persister(j,_,this):j(_)},c=(()=>{const j={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:W(this,oi),state:this.state,fetchFn:i};return o(j),j})();(f=this.options.behavior)==null||f.onFetch(c,this),pe(this,Ba,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&Me(this,Un,ho).call(this,{type:"fetch",meta:(m=c.fetchOptions)==null?void 0:m.meta}),pe(this,Tt,nk({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:j=>{j instanceof yg&&j.revert&&this.setState({...W(this,Ba),fetchStatus:"idle"}),r.abort()},onFail:(j,N)=>{Me(this,Un,ho).call(this,{type:"failed",failureCount:j,error:N})},onPause:()=>{Me(this,Un,ho).call(this,{type:"pause"})},onContinue:()=>{Me(this,Un,ho).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const j=await W(this,Tt).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(v=(g=W(this,rr).config).onSuccess)==null||v.call(g,j,this),(b=(w=W(this,rr).config).onSettled)==null||b.call(w,j,this.state.error,this),j}catch(j){if(j instanceof yg){if(j.silent)return W(this,Tt).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw Me(this,Un,ho).call(this,{type:"error",error:j}),(S=(C=W(this,rr).config).onError)==null||S.call(C,j,this),(A=(I=W(this,rr).config).onSettled)==null||A.call(I,this.state.data,j,this),j}finally{this.scheduleGc()}}},ri=new WeakMap,Ba=new WeakMap,rr=new WeakMap,oi=new WeakMap,Tt=new WeakMap,ru=new WeakMap,si=new WeakMap,Un=new WeakSet,ok=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ho=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...sk(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...hx(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return pe(this,Ba,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Et.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),W(this,rr).notify({query:this,type:"updated",action:t})})},G2);function sk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tk(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function px(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var En,$e,ou,ln,ii,Ta,mo,as,su,_a,Ra,ai,li,ls,Ma,Qe,sc,vg,wg,bg,xg,Cg,kg,Eg,ik,K2,c_=(K2=class extends cl{constructor(t,n){super();je(this,Qe);je(this,En);je(this,$e);je(this,ou);je(this,ln);je(this,ii);je(this,Ta);je(this,mo);je(this,as);je(this,su);je(this,_a);je(this,Ra);je(this,ai);je(this,li);je(this,ls);je(this,Ma,new Set);this.options=n,pe(this,En,t),pe(this,as,null),pe(this,mo,gg()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(W(this,$e).addObserver(this),mx(W(this,$e),this.options)?Me(this,Qe,sc).call(this):this.updateResult(),Me(this,Qe,xg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ag(W(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ag(W(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,Qe,Cg).call(this),Me(this,Qe,kg).call(this),W(this,$e).removeObserver(this)}setOptions(t){const n=this.options,r=W(this,$e);if(this.options=W(this,En).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof or(this.options.enabled,W(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,Qe,Eg).call(this),W(this,$e).setOptions(this.options),n._defaulted&&!Ef(this.options,n)&&W(this,En).getQueryCache().notify({type:"observerOptionsUpdated",query:W(this,$e),observer:this});const o=this.hasListeners();o&&gx(W(this,$e),r,this.options,n)&&Me(this,Qe,sc).call(this),this.updateResult(),o&&(W(this,$e)!==r||or(this.options.enabled,W(this,$e))!==or(n.enabled,W(this,$e))||gs(this.options.staleTime,W(this,$e))!==gs(n.staleTime,W(this,$e)))&&Me(this,Qe,vg).call(this);const i=Me(this,Qe,wg).call(this);o&&(W(this,$e)!==r||or(this.options.enabled,W(this,$e))!==or(n.enabled,W(this,$e))||i!==W(this,ls))&&Me(this,Qe,bg).call(this,i)}getOptimisticResult(t){const n=W(this,En).getQueryCache().build(W(this,En),t),r=this.createResult(n,t);return d_(this,r)&&(pe(this,ln,r),pe(this,Ta,this.options),pe(this,ii,W(this,$e).state)),r}getCurrentResult(){return W(this,ln)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&W(this,mo).status==="pending"&&W(this,mo).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){W(this,Ma).add(t)}getCurrentQuery(){return W(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=W(this,En).defaultQueryOptions(t),r=W(this,En).getQueryCache().build(W(this,En),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Me(this,Qe,sc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),W(this,ln)))}createResult(t,n){var M;const r=W(this,$e),o=this.options,i=W(this,ln),l=W(this,ii),c=W(this,Ta),f=t!==r?t.state:W(this,ou),{state:p}=t;let m={...p},g=!1,v;if(n._optimisticResults){const Q=this.hasListeners(),V=!Q&&mx(t,n),H=Q&&gx(t,r,n,o);(V||H)&&(m={...m,...sk(p.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:w,errorUpdatedAt:b,status:C}=m;v=m.data;let S=!1;if(n.placeholderData!==void 0&&v===void 0&&C==="pending"){let Q;i!=null&&i.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(Q=i.data,S=!0):Q=typeof n.placeholderData=="function"?n.placeholderData((M=W(this,Ra))==null?void 0:M.state.data,W(this,Ra)):n.placeholderData,Q!==void 0&&(C="success",v=mg(i==null?void 0:i.data,Q,n),g=!0)}if(n.select&&v!==void 0&&!S)if(i&&v===(l==null?void 0:l.data)&&n.select===W(this,su))v=W(this,_a);else try{pe(this,su,n.select),v=n.select(v),v=mg(i==null?void 0:i.data,v,n),pe(this,_a,v),pe(this,as,null)}catch(Q){pe(this,as,Q)}W(this,as)&&(w=W(this,as),v=W(this,_a),b=Date.now(),C="error");const I=m.fetchStatus==="fetching",A=C==="pending",j=C==="error",N=A&&I,_=v!==void 0,R={status:C,fetchStatus:m.fetchStatus,isPending:A,isSuccess:C==="success",isError:j,isInitialLoading:N,isLoading:N,data:v,dataUpdatedAt:m.dataUpdatedAt,error:w,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:I,isRefetching:I&&!A,isLoadingError:j&&!_,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:j&&_,isStale:t1(t,n),refetch:this.refetch,promise:W(this,mo),isEnabled:or(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const Q=R.data!==void 0,V=R.status==="error"&&!Q,H=O=>{V?O.reject(R.error):Q&&O.resolve(R.data)},L=()=>{const O=pe(this,mo,R.promise=gg());H(O)},z=W(this,mo);switch(z.status){case"pending":t.queryHash===r.queryHash&&H(z);break;case"fulfilled":(V||R.data!==z.value)&&L();break;case"rejected":(!V||R.error!==z.reason)&&L();break}}return R}updateResult(){const t=W(this,ln),n=this.createResult(W(this,$e),this.options);if(pe(this,ii,W(this,$e).state),pe(this,Ta,this.options),W(this,ii).data!==void 0&&pe(this,Ra,W(this,$e)),Ef(n,t))return;pe(this,ln,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!W(this,Ma).size)return!0;const l=new Set(i??W(this,Ma));return this.options.throwOnError&&l.add("error"),Object.keys(W(this,ln)).some(c=>{const d=c;return W(this,ln)[d]!==t[d]&&l.has(d)})};Me(this,Qe,ik).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,Qe,xg).call(this)}},En=new WeakMap,$e=new WeakMap,ou=new WeakMap,ln=new WeakMap,ii=new WeakMap,Ta=new WeakMap,mo=new WeakMap,as=new WeakMap,su=new WeakMap,_a=new WeakMap,Ra=new WeakMap,ai=new WeakMap,li=new WeakMap,ls=new WeakMap,Ma=new WeakMap,Qe=new WeakSet,sc=function(t){Me(this,Qe,Eg).call(this);let n=W(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(un)),n},vg=function(){Me(this,Qe,Cg).call(this);const t=gs(this.options.staleTime,W(this,$e));if($c.isServer()||W(this,ln).isStale||!hg(t))return;const r=ZC(W(this,ln).dataUpdatedAt,t)+1;pe(this,ai,Zs.setTimeout(()=>{W(this,ln).isStale||this.updateResult()},r))},wg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(W(this,$e)):this.options.refetchInterval)??!1},bg=function(t){Me(this,Qe,kg).call(this),pe(this,ls,t),!($c.isServer()||or(this.options.enabled,W(this,$e))===!1||!hg(W(this,ls))||W(this,ls)===0)&&pe(this,li,Zs.setInterval(()=>{(this.options.refetchIntervalInBackground||Jy.isFocused())&&Me(this,Qe,sc).call(this)},W(this,ls)))},xg=function(){Me(this,Qe,vg).call(this),Me(this,Qe,bg).call(this,Me(this,Qe,wg).call(this))},Cg=function(){W(this,ai)!==void 0&&(Zs.clearTimeout(W(this,ai)),pe(this,ai,void 0))},kg=function(){W(this,li)!==void 0&&(Zs.clearInterval(W(this,li)),pe(this,li,void 0))},Eg=function(){const t=W(this,En).getQueryCache().build(W(this,En),this.options);if(t===W(this,$e))return;const n=W(this,$e);pe(this,$e,t),pe(this,ou,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ik=function(t){Et.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(W(this,ln))}),W(this,En).getQueryCache().notify({query:W(this,$e),type:"observerResultsUpdated"})})},K2);function u_(e,t){return or(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mx(e,t){return u_(e,t)||e.state.data!==void 0&&Ag(e,t,t.refetchOnMount)}function Ag(e,t,n){if(or(t.enabled,e)!==!1&&gs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&t1(e,t)}return!1}function gx(e,t,n,r){return(e!==t||or(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&t1(e,n)}function t1(e,t){return or(t.enabled,e)!==!1&&e.isStaleByTime(gs(t.staleTime,e))}function d_(e,t){return!Ef(e.getCurrentResult(),t)}function yx(e){return{onFetch:(t,n)=>{var p,m,g,v,w;const r=t.options,o=(g=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:g.direction,i=((v=t.state.data)==null?void 0:v.pages)||[],l=((w=t.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let b=!1;const C=A=>{r_(A,()=>t.signal,()=>b=!0)},S=ek(t.options,t.fetchOptions),I=async(A,j,N)=>{if(b)return Promise.reject();if(j==null&&A.pages.length)return Promise.resolve(A);const P=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:j,direction:N?"backward":"forward",meta:t.options.meta};return C(V),V})(),R=await S(P),{maxPages:M}=t.options,Q=N?n_:t_;return{pages:Q(A.pages,R,M),pageParams:Q(A.pageParams,j,M)}};if(o&&i.length){const A=o==="backward",j=A?f_:vx,N={pages:i,pageParams:l},_=j(r,N);c=await I(N,_,A)}else{const A=e??i.length;do{const j=d===0?l[0]??r.initialPageParam:vx(r,c);if(d>0&&j==null)break;c=await I(c,j),d++}while(d<A)}return c};t.options.persister?t.fetchFn=()=>{var b,C;return(C=(b=t.options).persister)==null?void 0:C.call(b,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function vx(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function f_(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var iu,Fr,Zt,ci,Lr,rs,Y2,h_=(Y2=class extends rk{constructor(t){super();je(this,Lr);je(this,iu);je(this,Fr);je(this,Zt);je(this,ci);pe(this,iu,t.client),this.mutationId=t.mutationId,pe(this,Zt,t.mutationCache),pe(this,Fr,[]),this.state=t.state||ak(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){W(this,Fr).includes(t)||(W(this,Fr).push(t),this.clearGcTimeout(),W(this,Zt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pe(this,Fr,W(this,Fr).filter(n=>n!==t)),this.scheduleGc(),W(this,Zt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){W(this,Fr).length||(this.state.status==="pending"?this.scheduleGc():W(this,Zt).remove(this))}continue(){var t;return((t=W(this,ci))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,d,f,p,m,g,v,w,b,C,S,I,A,j,N,_,P;const n=()=>{Me(this,Lr,rs).call(this,{type:"continue"})},r={client:W(this,iu),meta:this.options.meta,mutationKey:this.options.mutationKey};pe(this,ci,nk({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{Me(this,Lr,rs).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{Me(this,Lr,rs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>W(this,Zt).canRun(this)}));const o=this.state.status==="pending",i=!W(this,ci).canStart();try{if(o)n();else{Me(this,Lr,rs).call(this,{type:"pending",variables:t,isPaused:i}),W(this,Zt).config.onMutate&&await W(this,Zt).config.onMutate(t,this,r);const M=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));M!==this.state.context&&Me(this,Lr,rs).call(this,{type:"pending",context:M,variables:t,isPaused:i})}const R=await W(this,ci).start();return await((f=(d=W(this,Zt).config).onSuccess)==null?void 0:f.call(d,R,t,this.state.context,this,r)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,R,t,this.state.context,r)),await((v=(g=W(this,Zt).config).onSettled)==null?void 0:v.call(g,R,null,this.state.variables,this.state.context,this,r)),await((b=(w=this.options).onSettled)==null?void 0:b.call(w,R,null,t,this.state.context,r)),Me(this,Lr,rs).call(this,{type:"success",data:R}),R}catch(R){try{await((S=(C=W(this,Zt).config).onError)==null?void 0:S.call(C,R,t,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((A=(I=this.options).onError)==null?void 0:A.call(I,R,t,this.state.context,r))}catch(M){Promise.reject(M)}try{await((N=(j=W(this,Zt).config).onSettled)==null?void 0:N.call(j,void 0,R,this.state.variables,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((P=(_=this.options).onSettled)==null?void 0:P.call(_,void 0,R,t,this.state.context,r))}catch(M){Promise.reject(M)}throw Me(this,Lr,rs).call(this,{type:"error",error:R}),R}finally{W(this,Zt).runNext(this)}}},iu=new WeakMap,Fr=new WeakMap,Zt=new WeakMap,ci=new WeakMap,Lr=new WeakSet,rs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Et.batch(()=>{W(this,Fr).forEach(r=>{r.onMutationUpdate(t)}),W(this,Zt).notify({mutation:this,type:"updated",action:t})})},Y2);function ak(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var go,xr,au,J2,p_=(J2=class extends cl{constructor(t={}){super();je(this,go);je(this,xr);je(this,au);this.config=t,pe(this,go,new Set),pe(this,xr,new Map),pe(this,au,0)}build(t,n,r){const o=new h_({client:t,mutationCache:this,mutationId:++Fd(this,au)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){W(this,go).add(t);const n=Yd(t);if(typeof n=="string"){const r=W(this,xr).get(n);r?r.push(t):W(this,xr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(W(this,go).delete(t)){const n=Yd(t);if(typeof n=="string"){const r=W(this,xr).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&W(this,xr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Yd(t);if(typeof n=="string"){const r=W(this,xr).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Yd(t);if(typeof n=="string"){const o=(r=W(this,xr).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Et.batch(()=>{W(this,go).forEach(t=>{this.notify({type:"removed",mutation:t})}),W(this,go).clear(),W(this,xr).clear()})}getAll(){return Array.from(W(this,go))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ux(n,r))}findAll(t={}){return this.getAll().filter(n=>ux(t,n))}notify(t){Et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Et.batch(()=>Promise.all(t.map(n=>n.continue().catch(un))))}},go=new WeakMap,xr=new WeakMap,au=new WeakMap,J2);function Yd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var yo,cs,An,vo,Eo,uf,Sg,Z2,m_=(Z2=class extends cl{constructor(n,r){super();je(this,Eo);je(this,yo);je(this,cs);je(this,An);je(this,vo);pe(this,yo,n),this.setOptions(r),this.bindMethods(),Me(this,Eo,uf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=W(this,yo).defaultMutationOptions(n),Ef(this.options,r)||W(this,yo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:W(this,An),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ki(r.mutationKey)!==ki(this.options.mutationKey)?this.reset():((o=W(this,An))==null?void 0:o.state.status)==="pending"&&W(this,An).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=W(this,An))==null||n.removeObserver(this)}onMutationUpdate(n){Me(this,Eo,uf).call(this),Me(this,Eo,Sg).call(this,n)}getCurrentResult(){return W(this,cs)}reset(){var n;(n=W(this,An))==null||n.removeObserver(this),pe(this,An,void 0),Me(this,Eo,uf).call(this),Me(this,Eo,Sg).call(this)}mutate(n,r){var o;return pe(this,vo,r),(o=W(this,An))==null||o.removeObserver(this),pe(this,An,W(this,yo).getMutationCache().build(W(this,yo),this.options)),W(this,An).addObserver(this),W(this,An).execute(n)}},yo=new WeakMap,cs=new WeakMap,An=new WeakMap,vo=new WeakMap,Eo=new WeakSet,uf=function(){var r;const n=((r=W(this,An))==null?void 0:r.state)??ak();pe(this,cs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Sg=function(n){Et.batch(()=>{var r,o,i,l,c,d,f,p;if(W(this,vo)&&this.hasListeners()){const m=W(this,cs).variables,g=W(this,cs).context,v={client:W(this,yo),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=W(this,vo)).onSuccess)==null||o.call(r,n.data,m,g,v)}catch(w){Promise.reject(w)}try{(l=(i=W(this,vo)).onSettled)==null||l.call(i,n.data,null,m,g,v)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(d=(c=W(this,vo)).onError)==null||d.call(c,n.error,m,g,v)}catch(w){Promise.reject(w)}try{(p=(f=W(this,vo)).onSettled)==null||p.call(f,void 0,n.error,m,g,v)}catch(w){Promise.reject(w)}}}this.listeners.forEach(m=>{m(W(this,cs))})})},Z2),Dr,X2,g_=(X2=class extends cl{constructor(t={}){super();je(this,Dr);this.config=t,pe(this,Dr,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Zy(o,n);let l=this.get(i);return l||(l=new l_({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){W(this,Dr).has(t.queryHash)||(W(this,Dr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=W(this,Dr).get(t.queryHash);n&&(t.destroy(),n===t&&W(this,Dr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return W(this,Dr).get(t)}getAll(){return[...W(this,Dr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>cx(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>cx(t,r)):n}notify(t){Et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Dr=new WeakMap,X2),ct,us,ds,Oa,Fa,fs,La,Da,e5,y_=(e5=class{constructor(e={}){je(this,ct);je(this,us);je(this,ds);je(this,Oa);je(this,Fa);je(this,fs);je(this,La);je(this,Da);pe(this,ct,e.queryCache||new g_),pe(this,us,e.mutationCache||new p_),pe(this,ds,e.defaultOptions||{}),pe(this,Oa,new Map),pe(this,Fa,new Map),pe(this,fs,0)}mount(){Fd(this,fs)._++,W(this,fs)===1&&(pe(this,La,Jy.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,ct).onFocus())})),pe(this,Da,Af.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,ct).onOnline())})))}unmount(){var e,t;Fd(this,fs)._--,W(this,fs)===0&&((e=W(this,La))==null||e.call(this),pe(this,La,void 0),(t=W(this,Da))==null||t.call(this),pe(this,Da,void 0))}isFetching(e){return W(this,ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return W(this,us).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,ct).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=W(this,ct).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(gs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return W(this,ct).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=W(this,ct).get(r.queryHash),i=o==null?void 0:o.state.data,l=ZT(t,i);if(l!==void 0)return W(this,ct).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Et.batch(()=>W(this,ct).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,ct).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=W(this,ct);Et.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=W(this,ct);return Et.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Et.batch(()=>W(this,ct).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(un).catch(un)}invalidateQueries(e,t={}){return Et.batch(()=>(W(this,ct).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Et.batch(()=>W(this,ct).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(un)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(un)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=W(this,ct).build(this,t);return n.isStaleByTime(gs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(un).catch(un)}fetchInfiniteQuery(e){return e.behavior=yx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(un).catch(un)}ensureInfiniteQueryData(e){return e.behavior=yx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Af.isOnline()?W(this,us).resumePausedMutations():Promise.resolve()}getQueryCache(){return W(this,ct)}getMutationCache(){return W(this,us)}getDefaultOptions(){return W(this,ds)}setDefaultOptions(e){pe(this,ds,e)}setQueryDefaults(e,t){W(this,Oa).set(ki(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...W(this,Oa).values()],n={};return t.forEach(r=>{Uc(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){W(this,Fa).set(ki(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...W(this,Fa).values()],n={};return t.forEach(r=>{Uc(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...W(this,ds).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Zy(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Xy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...W(this,ds).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){W(this,ct).clear(),W(this,us).clear()}},ct=new WeakMap,us=new WeakMap,ds=new WeakMap,Oa=new WeakMap,Fa=new WeakMap,fs=new WeakMap,La=new WeakMap,Da=new WeakMap,e5);function v_(e){return JSON.stringify(e,(t,n)=>w_(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):typeof n=="bigint"?n.toString():n)}function w_(e){if(!wx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!wx(n)||!n.hasOwnProperty("isPrototypeOf"))}function wx(e){return Object.prototype.toString.call(e)==="[object Object]"}function ch(e){const{_defaulted:t,behavior:n,gcTime:r,initialData:o,initialDataUpdatedAt:i,maxPages:l,meta:c,networkMode:d,queryFn:f,queryHash:p,queryKey:m,queryKeyHashFn:g,retry:v,retryDelay:w,structuralSharing:b,getPreviousPageParam:C,getNextPageParam:S,initialPageParam:I,_optimisticResults:A,enabled:j,notifyOnChangeProps:N,placeholderData:_,refetchInterval:P,refetchIntervalInBackground:R,refetchOnMount:M,refetchOnReconnect:Q,refetchOnWindowFocus:V,retryOnMount:H,select:L,staleTime:z,suspense:O,throwOnError:K,config:J,connector:F,query:Z,...Y}=e;return Y}function b_(e){return{mutationFn(t){return $B(e,t)},mutationKey:["connect"]}}function x_(e){return{mutationFn(t){return JB(e,t)},mutationKey:["disconnect"]}}function C_(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...i}=n[1];if(!r)throw new Error("address is required");return await tT(e,{...i,address:r})??null},queryKey:k_(t)}}function k_(e={}){return["balance",ch(e)]}function E_(e,t={}){return{async queryFn({queryKey:n}){const{name:r,scopeKey:o,...i}=n[1];if(!r)throw new Error("name is required");return rT(e,{...i,name:r})},queryKey:A_(t)}}function A_(e={}){return["ensAvatar",ch(e)]}function S_(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...i}=n[1];if(!r)throw new Error("address is required");return oT(e,{...i,address:r})},queryKey:j_(t)}}function j_(e={}){return["ensName",ch(e)]}function I_(e,t={}){return{gcTime:0,async queryFn({queryKey:n}){const{connector:r}=t,{connectorUid:o,scopeKey:i,...l}=n[1];return sT(e,{...l,connector:r})},queryKey:N_(t)}}function N_(e={}){const{connector:t,...n}=e;return["walletClient",{...ch(n),connectorUid:t==null?void 0:t.uid}]}function P_(e){return{mutationFn(t){return aT(e,t)},mutationKey:["signMessage"]}}function B_(e){return{mutationFn(t){return cT(e,t)},mutationKey:["switchChain"]}}var lk=B.createContext(void 0),n1=e=>{const t=B.useContext(lk);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},T_=({client:e,children:t})=>(B.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(lk.Provider,{value:e,children:t})),ck=B.createContext(!1),__=()=>B.useContext(ck);ck.Provider;function R_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var M_=B.createContext(R_()),O_=()=>B.useContext(M_),F_=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?e1(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},L_=e=>{B.useEffect(()=>{e.clearReset()},[e])},D_=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||e1(n,[e.error,r])),U_=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$_=(e,t)=>e.isLoading&&e.isFetching&&!t,z_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,bx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function W_(e,t,n){var g,v,w,b;const r=__(),o=O_(),i=n1(),l=i.defaultQueryOptions(e);(v=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||v.call(g,l);const c=i.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",U_(l),F_(l,o,c),L_(o);const d=!i.getQueryCache().get(l.queryHash),[f]=B.useState(()=>new t(i,l)),p=f.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(B.useSyncExternalStore(B.useCallback(C=>{const S=m?f.subscribe(Et.batchCalls(C)):un;return f.updateResult(),S},[f,m]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),B.useEffect(()=>{f.setOptions(l)},[l,f]),z_(l,p))throw bx(l,f,o);if(D_({result:p,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;if((b=(w=i.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||b.call(w,l,p),l.experimental_prefetchInRender&&!$c.isServer()&&$_(p,r)){const C=d?bx(l,f,o):c==null?void 0:c.promise;C==null||C.catch(un).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?p:f.trackResult(p)}function uk(e,t){return W_(e,c_)}function uh(e,t){const n=n1(),[r]=B.useState(()=>new m_(n,e));B.useEffect(()=>{r.setOptions(e)},[r,e]);const o=B.useSyncExternalStore(B.useCallback(l=>r.subscribe(Et.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=B.useCallback((l,c)=>{r.mutate(l,c).catch(un)},[r]);if(o.error&&e1(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function dh(e){const t=uk({...e,queryKeyHashFn:v_});return t.queryKey=e.queryKey,t}function fh(e={}){const t=jt(e);return B.useSyncExternalStore(n=>uT(t,{onChange:n}),()=>Z6(t),()=>Z6(t))}function dk(e={}){const{address:t,query:n={}}=e,r=jt(e),o=fh({config:r}),i=C_(r,{...e,chainId:e.chainId??o}),l=!!(t&&(n.enabled??!0));return dh({...n,...i,enabled:l})}function q_(e={}){const t=jt(e);return B.useSyncExternalStore(n=>$T(t,{onChange:n}),()=>X6(t),()=>X6(t))}function H_(e={}){const t=jt(e);return B.useSyncExternalStore(n=>fT(t,{onChange:n}),()=>ex(t),()=>ex(t))}function V_(e={}){const{mutation:t}=e,n=jt(e),r=b_(n),{mutate:o,mutateAsync:i,...l}=uh({...t,...r});return B.useEffect(()=>n.subscribe(({status:c})=>c,(c,d)=>{d==="connected"&&c==="disconnected"&&l.reset()}),[n,l.reset]),{...l,connect:o,connectAsync:i,connectors:H_({config:n})}}function Q_(e={}){const t=jt(e);return B.useSyncExternalStore(n=>dT(t,{onChange:n}),()=>cg(t),()=>cg(t))}function r1(e={}){const{mutation:t}=e,n=jt(e),r=x_(n),{mutate:o,mutateAsync:i,...l}=uh({...t,...r});return{...l,connectors:Q_({config:n}).map(c=>c.connector),disconnect:o,disconnectAsync:i}}function G_(e={}){const{name:t,query:n={}}=e,r=jt(e),o=fh({config:r}),i=E_(r,{...e,chainId:e.chainId??o}),l=!!(t&&(n.enabled??!0));return dh({...n,...i,enabled:l})}function K_(e={}){const{address:t,query:n={}}=e,r=jt(e),o=fh({config:r}),i=S_(r,{...e,chainId:e.chainId??o}),l=!!(t&&(n.enabled??!0));return dh({...n,...i,enabled:l})}function Y_(e={}){const t=jt(e);return YC.useSyncExternalStoreWithSelector(n=>hT(t,{onChange:n}),()=>ug(t,e),()=>ug(t,e),n=>n,(n,r)=>(n==null?void 0:n.uid)===(r==null?void 0:r.uid))}function J_(e={}){const{mutation:t}=e,n=jt(e),r=P_(n),{mutate:o,mutateAsync:i,...l}=uh({...t,...r});return{...l,signMessage:o,signMessageAsync:i}}function Z_(e={}){const{mutation:t}=e,n=jt(e),r=B_(n),{mutate:o,mutateAsync:i,...l}=uh({...t,...r});return{...l,chains:q_({config:n}),switchChain:o,switchChainAsync:i}}function fk(e={}){const{query:t={},...n}=e,r=jt(n),o=n1(),{address:i,connector:l,status:c}=zt({config:r}),d=fh({config:r}),f=e.connector??l,{queryKey:p,...m}=I_(r,{...e,chainId:e.chainId??d,connector:e.connector??l}),g=!!((c==="connected"||c==="reconnecting"&&(f!=null&&f.getProvider))&&(t.enabled??!0)),v=B.useRef(i);return B.useEffect(()=>{const w=v.current;!i&&w?(o.removeQueries({queryKey:p}),v.current=void 0):i!==w&&(o.invalidateQueries({queryKey:p}),v.current=i)},[i,o]),dh({...t,...m,queryKey:p,enabled:g,staleTime:Number.POSITIVE_INFINITY})}var xx='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',X_={rounded:`SFRounded, ui-rounded, "SF Pro Rounded", ${xx}`,system:xx},tc={large:{actionButton:"9999px",connectButton:"12px",modal:"24px",modalMobile:"28px"},medium:{actionButton:"10px",connectButton:"8px",modal:"16px",modalMobile:"18px"},none:{actionButton:"0px",connectButton:"0px",modal:"0px",modalMobile:"0px"},small:{actionButton:"4px",connectButton:"4px",modal:"8px",modalMobile:"8px"}},eR={large:{modalOverlay:"blur(20px)"},none:{modalOverlay:"blur(0px)"},small:{modalOverlay:"blur(4px)"}},hk=({borderRadius:e="large",fontStack:t="rounded",overlayBlur:n="none"})=>({blurs:{modalOverlay:eR[n].modalOverlay},fonts:{body:X_[t]},radii:{actionButton:tc[e].actionButton,connectButton:tc[e].connectButton,menuButton:tc[e].connectButton,modal:tc[e].modal,modalMobile:tc[e].modalMobile}}),df="#1A1B1F",pk={blue:{accentColor:"#3898FF",accentColorForeground:"#FFF"},green:{accentColor:"#4BD166",accentColorForeground:df},orange:{accentColor:"#FF983D",accentColorForeground:df},pink:{accentColor:"#FF7AB8",accentColorForeground:df},purple:{accentColor:"#7A70FF",accentColorForeground:"#FFF"},red:{accentColor:"#FF6257",accentColorForeground:"#FFF"}},Cx=pk.blue,mk=({accentColor:e=Cx.accentColor,accentColorForeground:t=Cx.accentColorForeground,...n}={})=>({...hk(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(255, 255, 255, 0.04)",actionButtonBorderMobile:"rgba(255, 255, 255, 0.08)",actionButtonSecondaryBackground:"rgba(255, 255, 255, 0.08)",closeButton:"rgba(224, 232, 255, 0.6)",closeButtonBackground:"rgba(255, 255, 255, 0.08)",connectButtonBackground:df,connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.15))",connectButtonText:"#FFF",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(0, 0, 0, 0) 9.49%, rgba(120, 120, 120, 0.2) 71.04%), #1A1B1F",downloadTopCardBackground:"linear-gradient(126deg, rgba(120, 120, 120, 0.2) 9.49%, rgba(0, 0, 0, 0) 71.04%), #1A1B1F",error:"#FF494A",generalBorder:"rgba(255, 255, 255, 0.08)",generalBorderDim:"rgba(255, 255, 255, 0.04)",menuItemBackground:"rgba(224, 232, 255, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.5)",modalBackground:"#1A1B1F",modalBorder:"rgba(255, 255, 255, 0.08)",modalText:"#FFF",modalTextDim:"rgba(224, 232, 255, 0.3)",modalTextSecondary:"rgba(255, 255, 255, 0.6)",profileAction:"rgba(224, 232, 255, 0.1)",profileActionHover:"rgba(224, 232, 255, 0.2)",profileForeground:"rgba(224, 232, 255, 0.05)",selectedOptionBorder:"rgba(224, 232, 255, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.24)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});mk.accentColors=pk;var gk={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},kx=gk.blue,yk=({accentColor:e=kx.accentColor,accentColorForeground:t=kx.accentColorForeground,...n}={})=>({...hk(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackground:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});yk.accentColors=gk;var jg=`{
102
+ "connect_wallet": {
103
+ "label": "Connect Wallet",
104
+ "wrong_network": {
105
+ "label": "Wrong network"
106
+ }
107
+ },
108
+
109
+ "intro": {
110
+ "title": "What is a Wallet?",
111
+ "description": "A wallet is used to send, receive, store, and display digital assets. It's also a new way to log in, without needing to create new accounts and passwords on every website.",
112
+ "digital_asset": {
113
+ "title": "A Home for your Digital Assets",
114
+ "description": "Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs."
115
+ },
116
+ "login": {
117
+ "title": "A New Way to Log In",
118
+ "description": "Instead of creating new accounts and passwords on every website, just connect your wallet."
119
+ },
120
+ "get": {
121
+ "label": "Get a Wallet"
122
+ },
123
+ "learn_more": {
124
+ "label": "Learn More"
125
+ }
126
+ },
127
+
128
+ "sign_in": {
129
+ "label": "Verify your account",
130
+ "description": "To finish connecting, you must sign a message in your wallet to verify that you are the owner of this account.",
131
+ "message": {
132
+ "send": "Sign message",
133
+ "preparing": "Preparing message...",
134
+ "cancel": "Cancel",
135
+ "preparing_error": "Error preparing message, please retry!"
136
+ },
137
+ "signature": {
138
+ "waiting": "Waiting for signature...",
139
+ "verifying": "Verifying signature...",
140
+ "signing_error": "Error signing message, please retry!",
141
+ "verifying_error": "Error verifying signature, please retry!",
142
+ "oops_error": "Oops, something went wrong!"
143
+ }
144
+ },
145
+
146
+ "connect": {
147
+ "label": "Connect",
148
+ "title": "Connect a Wallet",
149
+ "new_to_ethereum": {
150
+ "description": "New to Ethereum wallets?",
151
+ "learn_more": {
152
+ "label": "Learn More"
153
+ }
154
+ },
155
+ "learn_more": {
156
+ "label": "Learn more"
157
+ },
158
+ "recent": "Recent",
159
+ "status": {
160
+ "opening": "Opening %{wallet}...",
161
+ "connecting": "Connecting",
162
+ "connect_mobile": "Continue in %{wallet}",
163
+ "not_installed": "%{wallet} is not installed",
164
+ "not_available": "%{wallet} is not available",
165
+ "confirm": "Confirm connection in the extension",
166
+ "confirm_mobile": "Accept connection request in the wallet"
167
+ },
168
+ "secondary_action": {
169
+ "get": {
170
+ "description": "Don't have %{wallet}?",
171
+ "label": "GET"
172
+ },
173
+ "install": {
174
+ "label": "INSTALL"
175
+ },
176
+ "retry": {
177
+ "label": "RETRY"
178
+ }
179
+ },
180
+ "walletconnect": {
181
+ "description": {
182
+ "full": "Need the official WalletConnect modal?",
183
+ "compact": "Need the WalletConnect modal?"
184
+ },
185
+ "open": {
186
+ "label": "OPEN"
187
+ }
188
+ }
189
+ },
190
+
191
+ "connect_scan": {
192
+ "title": "Scan with %{wallet}",
193
+ "fallback_title": "Scan with your phone"
194
+ },
195
+
196
+ "connector_group": {
197
+ "installed": "Installed",
198
+ "recommended": "Recommended",
199
+ "other": "Other",
200
+ "popular": "Popular",
201
+ "more": "More",
202
+ "others": "Others"
203
+ },
204
+
205
+ "get": {
206
+ "title": "Get a Wallet",
207
+ "action": {
208
+ "label": "GET"
209
+ },
210
+ "mobile": {
211
+ "description": "Mobile Wallet"
212
+ },
213
+ "extension": {
214
+ "description": "Browser Extension"
215
+ },
216
+ "mobile_and_extension": {
217
+ "description": "Mobile Wallet and Extension"
218
+ },
219
+ "mobile_and_desktop": {
220
+ "description": "Mobile and Desktop Wallet"
221
+ },
222
+ "looking_for": {
223
+ "title": "Not what you're looking for?",
224
+ "mobile": {
225
+ "description": "Select a wallet on the main screen to get started with a different wallet provider."
226
+ },
227
+ "desktop": {
228
+ "compact_description": "Select a wallet on the main screen to get started with a different wallet provider.",
229
+ "wide_description": "Select a wallet on the left to get started with a different wallet provider."
230
+ }
231
+ }
232
+ },
233
+
234
+ "get_options": {
235
+ "title": "Get started with %{wallet}",
236
+ "short_title": "Get %{wallet}",
237
+ "mobile": {
238
+ "title": "%{wallet} for Mobile",
239
+ "description": "Use the mobile wallet to explore the world of Ethereum.",
240
+ "download": {
241
+ "label": "Get the app"
242
+ }
243
+ },
244
+ "extension": {
245
+ "title": "%{wallet} for %{browser}",
246
+ "description": "Access your wallet right from your favorite web browser.",
247
+ "download": {
248
+ "label": "Add to %{browser}"
249
+ }
250
+ },
251
+ "desktop": {
252
+ "title": "%{wallet} for %{platform}",
253
+ "description": "Access your wallet natively from your powerful desktop.",
254
+ "download": {
255
+ "label": "Add to %{platform}"
256
+ }
257
+ }
258
+ },
259
+
260
+ "get_mobile": {
261
+ "title": "Install %{wallet}",
262
+ "description": "Scan with your phone to download on iOS or Android",
263
+ "continue": {
264
+ "label": "Continue"
265
+ }
266
+ },
267
+
268
+ "get_instructions": {
269
+ "mobile": {
270
+ "connect": {
271
+ "label": "Connect"
272
+ },
273
+ "learn_more": {
274
+ "label": "Learn More"
275
+ }
276
+ },
277
+ "extension": {
278
+ "refresh": {
279
+ "label": "Refresh"
280
+ },
281
+ "learn_more": {
282
+ "label": "Learn More"
283
+ }
284
+ },
285
+ "desktop": {
286
+ "connect": {
287
+ "label": "Connect"
288
+ },
289
+ "learn_more": {
290
+ "label": "Learn More"
291
+ }
292
+ }
293
+ },
294
+
295
+ "chains": {
296
+ "title": "Switch Networks",
297
+ "wrong_network": "Wrong network detected, switch or disconnect to continue.",
298
+ "confirm": "Confirm in Wallet",
299
+ "switching_not_supported": "Your wallet does not support switching networks from %{appName}. Try switching networks from within your wallet instead.",
300
+ "switching_not_supported_fallback": "Your wallet does not support switching networks from this app. Try switching networks from within your wallet instead.",
301
+ "disconnect": "Disconnect",
302
+ "connected": "Connected"
303
+ },
304
+
305
+ "profile": {
306
+ "disconnect": {
307
+ "label": "Disconnect"
308
+ },
309
+ "copy_address": {
310
+ "label": "Copy Address",
311
+ "copied": "Copied!"
312
+ },
313
+ "explorer": {
314
+ "label": "View more on explorer"
315
+ },
316
+ "transactions": {
317
+ "description": "%{appName} transactions will appear here...",
318
+ "description_fallback": "Your transactions will appear here...",
319
+ "recent": {
320
+ "title": "Recent Transactions"
321
+ },
322
+ "clear": {
323
+ "label": "Clear All"
324
+ }
325
+ }
326
+ },
327
+
328
+ "wallet_connectors": {
329
+ "ready": {
330
+ "qr_code": {
331
+ "step1": {
332
+ "description": "Add Ready to your home screen for faster access to your wallet.",
333
+ "title": "Open the Ready app"
334
+ },
335
+ "step2": {
336
+ "description": "Create a wallet and username, or import an existing wallet.",
337
+ "title": "Create or Import a Wallet"
338
+ },
339
+ "step3": {
340
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
341
+ "title": "Tap the Scan QR button"
342
+ }
343
+ }
344
+ },
345
+
346
+ "berasig": {
347
+ "extension": {
348
+ "step1": {
349
+ "title": "Install the BeraSig extension",
350
+ "description": "We recommend pinning BeraSig to your taskbar for easier access to your wallet."
351
+ },
352
+ "step2": {
353
+ "title": "Create a Wallet",
354
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
355
+ },
356
+ "step3": {
357
+ "title": "Refresh your browser",
358
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
359
+ }
360
+ }
361
+ },
362
+
363
+ "best": {
364
+ "qr_code": {
365
+ "step1": {
366
+ "title": "Open the Best Wallet app",
367
+ "description": "Add Best Wallet to your home screen for faster access to your wallet."
368
+ },
369
+ "step2": {
370
+ "title": "Create or Import a Wallet",
371
+ "description": "Create a new wallet or import an existing one."
372
+ },
373
+ "step3": {
374
+ "title": "Tap the QR icon and scan",
375
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
376
+ }
377
+ }
378
+ },
379
+
380
+ "bifrost": {
381
+ "qr_code": {
382
+ "step1": {
383
+ "description": "We recommend putting Bifrost Wallet on your home screen for quicker access.",
384
+ "title": "Open the Bifrost Wallet app"
385
+ },
386
+ "step2": {
387
+ "description": "Create or import a wallet using your recovery phrase.",
388
+ "title": "Create or Import a Wallet"
389
+ },
390
+ "step3": {
391
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
392
+ "title": "Tap the scan button"
393
+ }
394
+ }
395
+ },
396
+
397
+ "bitget": {
398
+ "qr_code": {
399
+ "step1": {
400
+ "description": "We recommend putting Bitget Wallet on your home screen for quicker access.",
401
+ "title": "Open the Bitget Wallet app"
402
+ },
403
+ "step2": {
404
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
405
+ "title": "Create or Import a Wallet"
406
+ },
407
+ "step3": {
408
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
409
+ "title": "Tap the scan button"
410
+ }
411
+ },
412
+
413
+ "extension": {
414
+ "step1": {
415
+ "description": "We recommend pinning Bitget Wallet to your taskbar for quicker access to your wallet.",
416
+ "title": "Install the Bitget Wallet extension"
417
+ },
418
+ "step2": {
419
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
420
+ "title": "Create or Import a Wallet"
421
+ },
422
+ "step3": {
423
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
424
+ "title": "Refresh your browser"
425
+ }
426
+ }
427
+ },
428
+
429
+ "bitski": {
430
+ "extension": {
431
+ "step1": {
432
+ "description": "We recommend pinning Bitski to your taskbar for quicker access to your wallet.",
433
+ "title": "Install the Bitski extension"
434
+ },
435
+ "step2": {
436
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
437
+ "title": "Create or Import a Wallet"
438
+ },
439
+ "step3": {
440
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
441
+ "title": "Refresh your browser"
442
+ }
443
+ }
444
+ },
445
+
446
+ "bitverse": {
447
+ "qr_code": {
448
+ "step1": {
449
+ "title": "Open the Bitverse Wallet app",
450
+ "description": "Add Bitverse Wallet to your home screen for faster access to your wallet."
451
+ },
452
+ "step2": {
453
+ "title": "Create or Import a Wallet",
454
+ "description": "Create a new wallet or import an existing one."
455
+ },
456
+ "step3": {
457
+ "title": "Tap the QR icon and scan",
458
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
459
+ }
460
+ }
461
+ },
462
+
463
+ "bloom": {
464
+ "desktop": {
465
+ "step1": {
466
+ "title": "Open the Bloom Wallet app",
467
+ "description": "We recommend putting Bloom Wallet on your home screen for quicker access."
468
+ },
469
+ "step2": {
470
+ "description": "Create or import a wallet using your recovery phrase.",
471
+ "title": "Create or Import a Wallet"
472
+ },
473
+ "step3": {
474
+ "description": "After you have a wallet, click on Connect to connect via Bloom. A connection prompt in the app will appear for you to confirm the connection.",
475
+ "title": "Click on Connect"
476
+ }
477
+ }
478
+ },
479
+
480
+ "bybit": {
481
+ "qr_code": {
482
+ "step1": {
483
+ "description": "We recommend putting Bybit on your home screen for faster access to your wallet.",
484
+ "title": "Open the Bybit app"
485
+ },
486
+ "step2": {
487
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
488
+ "title": "Create or Import a Wallet"
489
+ },
490
+ "step3": {
491
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
492
+ "title": "Tap the scan button"
493
+ }
494
+ },
495
+
496
+ "extension": {
497
+ "step1": {
498
+ "description": "Click at the top right of your browser and pin Bybit Wallet for easy access.",
499
+ "title": "Install the Bybit Wallet extension"
500
+ },
501
+ "step2": {
502
+ "description": "Create a new wallet or import an existing one.",
503
+ "title": "Create or Import a wallet"
504
+ },
505
+ "step3": {
506
+ "description": "Once you set up Bybit Wallet, click below to refresh the browser and load up the extension.",
507
+ "title": "Refresh your browser"
508
+ }
509
+ }
510
+ },
511
+
512
+ "binance": {
513
+ "qr_code": {
514
+ "step1": {
515
+ "description": "We recommend putting Binance on your home screen for faster access to your wallet.",
516
+ "title": "Open the Binance app"
517
+ },
518
+ "step2": {
519
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
520
+ "title": "Create or Import a Wallet"
521
+ },
522
+ "step3": {
523
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
524
+ "title": "Tap the WalletConnect button"
525
+ }
526
+ },
527
+ "extension": {
528
+ "step1": {
529
+ "title": "Install the Binance Wallet extension",
530
+ "description": "We recommend pinning Binance Wallet to your taskbar for quicker access to your wallet."
531
+ },
532
+ "step2": {
533
+ "title": "Create or Import a Wallet",
534
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
535
+ },
536
+ "step3": {
537
+ "title": "Refresh your browser",
538
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
539
+ }
540
+ }
541
+ },
542
+
543
+ "coin98": {
544
+ "qr_code": {
545
+ "step1": {
546
+ "description": "We recommend putting Coin98 Wallet on your home screen for faster access to your wallet.",
547
+ "title": "Open the Coin98 Wallet app"
548
+ },
549
+ "step2": {
550
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
551
+ "title": "Create or Import a Wallet"
552
+ },
553
+ "step3": {
554
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
555
+ "title": "Tap the WalletConnect button"
556
+ }
557
+ },
558
+
559
+ "extension": {
560
+ "step1": {
561
+ "description": "Click at the top right of your browser and pin Coin98 Wallet for easy access.",
562
+ "title": "Install the Coin98 Wallet extension"
563
+ },
564
+ "step2": {
565
+ "description": "Create a new wallet or import an existing one.",
566
+ "title": "Create or Import a wallet"
567
+ },
568
+ "step3": {
569
+ "description": "Once you set up Coin98 Wallet, click below to refresh the browser and load up the extension.",
570
+ "title": "Refresh your browser"
571
+ }
572
+ }
573
+ },
574
+
575
+ "coinbase": {
576
+ "qr_code": {
577
+ "step1": {
578
+ "description": "We recommend putting Coinbase Wallet on your home screen for quicker access.",
579
+ "title": "Open the Coinbase Wallet app"
580
+ },
581
+ "step2": {
582
+ "description": "You can easily backup your wallet using the cloud backup feature.",
583
+ "title": "Create or Import a Wallet"
584
+ },
585
+ "step3": {
586
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
587
+ "title": "Tap the scan button"
588
+ }
589
+ },
590
+
591
+ "extension": {
592
+ "step1": {
593
+ "description": "We recommend pinning Coinbase Wallet to your taskbar for quicker access to your wallet.",
594
+ "title": "Install the Coinbase Wallet extension"
595
+ },
596
+ "step2": {
597
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
598
+ "title": "Create or Import a Wallet"
599
+ },
600
+ "step3": {
601
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
602
+ "title": "Refresh your browser"
603
+ }
604
+ }
605
+ },
606
+
607
+ "compass": {
608
+ "extension": {
609
+ "step1": {
610
+ "description": "We recommend pinning Compass Wallet to your taskbar for quicker access to your wallet.",
611
+ "title": "Install the Compass Wallet extension"
612
+ },
613
+ "step2": {
614
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
615
+ "title": "Create or Import a Wallet"
616
+ },
617
+ "step3": {
618
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
619
+ "title": "Refresh your browser"
620
+ }
621
+ }
622
+ },
623
+
624
+ "core": {
625
+ "qr_code": {
626
+ "step1": {
627
+ "description": "We recommend putting Core on your home screen for faster access to your wallet.",
628
+ "title": "Open the Core app"
629
+ },
630
+ "step2": {
631
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
632
+ "title": "Create or Import a Wallet"
633
+ },
634
+ "step3": {
635
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
636
+ "title": "Tap the WalletConnect button"
637
+ }
638
+ },
639
+
640
+ "extension": {
641
+ "step1": {
642
+ "description": "We recommend pinning Core to your taskbar for quicker access to your wallet.",
643
+ "title": "Install the Core extension"
644
+ },
645
+ "step2": {
646
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
647
+ "title": "Create or Import a Wallet"
648
+ },
649
+ "step3": {
650
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
651
+ "title": "Refresh your browser"
652
+ }
653
+ }
654
+ },
655
+
656
+ "fox": {
657
+ "qr_code": {
658
+ "step1": {
659
+ "description": "We recommend putting FoxWallet on your home screen for quicker access.",
660
+ "title": "Open the FoxWallet app"
661
+ },
662
+ "step2": {
663
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
664
+ "title": "Create or Import a Wallet"
665
+ },
666
+ "step3": {
667
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
668
+ "title": "Tap the scan button"
669
+ }
670
+ }
671
+ },
672
+
673
+ "frontier": {
674
+ "qr_code": {
675
+ "step1": {
676
+ "description": "We recommend putting Frontier Wallet on your home screen for quicker access.",
677
+ "title": "Open the Frontier Wallet app"
678
+ },
679
+ "step2": {
680
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
681
+ "title": "Create or Import a Wallet"
682
+ },
683
+ "step3": {
684
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
685
+ "title": "Tap the scan button"
686
+ }
687
+ },
688
+
689
+ "extension": {
690
+ "step1": {
691
+ "description": "We recommend pinning Frontier Wallet to your taskbar for quicker access to your wallet.",
692
+ "title": "Install the Frontier Wallet extension"
693
+ },
694
+ "step2": {
695
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
696
+ "title": "Create or Import a Wallet"
697
+ },
698
+ "step3": {
699
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
700
+ "title": "Refresh your browser"
701
+ }
702
+ }
703
+ },
704
+
705
+ "im_token": {
706
+ "qr_code": {
707
+ "step1": {
708
+ "title": "Open the imToken app",
709
+ "description": "Put imToken app on your home screen for faster access to your wallet."
710
+ },
711
+ "step2": {
712
+ "title": "Create or Import a Wallet",
713
+ "description": "Create a new wallet or import an existing one."
714
+ },
715
+ "step3": {
716
+ "title": "Tap Scanner Icon in top right corner",
717
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
718
+ }
719
+ }
720
+ },
721
+
722
+ "iopay": {
723
+ "qr_code": {
724
+ "step1": {
725
+ "description": "We recommend putting ioPay on your home screen for faster access to your wallet.",
726
+ "title": "Open the ioPay app"
727
+ },
728
+ "step2": {
729
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
730
+ "title": "Create or Import a Wallet"
731
+ },
732
+ "step3": {
733
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
734
+ "title": "Tap the WalletConnect button"
735
+ }
736
+ }
737
+ },
738
+
739
+ "kaikas": {
740
+ "extension": {
741
+ "step1": {
742
+ "description": "We recommend pinning Kaikas to your taskbar for quicker access to your wallet.",
743
+ "title": "Install the Kaikas extension"
744
+ },
745
+ "step2": {
746
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
747
+ "title": "Create or Import a Wallet"
748
+ },
749
+ "step3": {
750
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
751
+ "title": "Refresh your browser"
752
+ }
753
+ },
754
+ "qr_code": {
755
+ "step1": {
756
+ "title": "Open the Kaikas app",
757
+ "description": "Put Kaikas app on your home screen for faster access to your wallet."
758
+ },
759
+ "step2": {
760
+ "title": "Create or Import a Wallet",
761
+ "description": "Create a new wallet or import an existing one."
762
+ },
763
+ "step3": {
764
+ "title": "Tap Scanner Icon in top right corner",
765
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
766
+ }
767
+ }
768
+ },
769
+
770
+ "kaia": {
771
+ "extension": {
772
+ "step1": {
773
+ "description": "We recommend pinning Kaia to your taskbar for quicker access to your wallet.",
774
+ "title": "Install the Kaia extension"
775
+ },
776
+ "step2": {
777
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
778
+ "title": "Create or Import a Wallet"
779
+ },
780
+ "step3": {
781
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
782
+ "title": "Refresh your browser"
783
+ }
784
+ },
785
+ "qr_code": {
786
+ "step1": {
787
+ "title": "Open the Kaia app",
788
+ "description": "Put Kaia app on your home screen for faster access to your wallet."
789
+ },
790
+ "step2": {
791
+ "title": "Create or Import a Wallet",
792
+ "description": "Create a new wallet or import an existing one."
793
+ },
794
+ "step3": {
795
+ "title": "Tap Scanner Icon in top right corner",
796
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
797
+ }
798
+ }
799
+ },
800
+
801
+ "kraken": {
802
+ "qr_code": {
803
+ "step1": {
804
+ "title": "Open the Kraken Wallet app",
805
+ "description": "Add Kraken Wallet to your home screen for faster access to your wallet."
806
+ },
807
+ "step2": {
808
+ "title": "Create or Import a Wallet",
809
+ "description": "Create a new wallet or import an existing one."
810
+ },
811
+ "step3": {
812
+ "title": "Tap the QR icon and scan",
813
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
814
+ }
815
+ }
816
+ },
817
+
818
+ "kresus": {
819
+ "qr_code": {
820
+ "step1": {
821
+ "title": "Open the Kresus Wallet app",
822
+ "description": "Add Kresus Wallet to your home screen for faster access to your wallet."
823
+ },
824
+ "step2": {
825
+ "title": "Create or Import a Wallet",
826
+ "description": "Create a new wallet or import an existing one."
827
+ },
828
+ "step3": {
829
+ "title": "Tap the QR icon and scan",
830
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
831
+ }
832
+ }
833
+ },
834
+
835
+ "magicEden": {
836
+ "extension": {
837
+ "step1": {
838
+ "title": "Install the Magic Eden extension",
839
+ "description": "We recommend pinning Magic Eden to your taskbar for easier access to your wallet."
840
+ },
841
+ "step2": {
842
+ "title": "Create or Import a Wallet",
843
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
844
+ },
845
+ "step3": {
846
+ "title": "Refresh your browser",
847
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
848
+ }
849
+ }
850
+ },
851
+
852
+ "metamask": {
853
+ "qr_code": {
854
+ "step1": {
855
+ "title": "Open the MetaMask app",
856
+ "description": "We recommend putting MetaMask on your home screen for quicker access."
857
+ },
858
+ "step2": {
859
+ "title": "Create or Import a Wallet",
860
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
861
+ },
862
+ "step3": {
863
+ "title": "Tap the scan button",
864
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
865
+ }
866
+ },
867
+
868
+ "extension": {
869
+ "step1": {
870
+ "title": "Install the MetaMask extension",
871
+ "description": "We recommend pinning MetaMask to your taskbar for quicker access to your wallet."
872
+ },
873
+ "step2": {
874
+ "title": "Create or Import a Wallet",
875
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
876
+ },
877
+ "step3": {
878
+ "title": "Refresh your browser",
879
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
880
+ }
881
+ }
882
+ },
883
+
884
+ "nestwallet": {
885
+ "extension": {
886
+ "step1": {
887
+ "title": "Install the NestWallet extension",
888
+ "description": "We recommend pinning NestWallet to your taskbar for quicker access to your wallet."
889
+ },
890
+ "step2": {
891
+ "title": "Create or Import a Wallet",
892
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
893
+ },
894
+ "step3": {
895
+ "title": "Refresh your browser",
896
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
897
+ }
898
+ }
899
+ },
900
+
901
+ "okx": {
902
+ "qr_code": {
903
+ "step1": {
904
+ "title": "Open the OKX Wallet app",
905
+ "description": "We recommend putting OKX Wallet on your home screen for quicker access."
906
+ },
907
+ "step2": {
908
+ "title": "Create or Import a Wallet",
909
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
910
+ },
911
+ "step3": {
912
+ "title": "Tap the scan button",
913
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
914
+ }
915
+ },
916
+
917
+ "extension": {
918
+ "step1": {
919
+ "title": "Install the OKX Wallet extension",
920
+ "description": "We recommend pinning OKX Wallet to your taskbar for quicker access to your wallet."
921
+ },
922
+ "step2": {
923
+ "title": "Create or Import a Wallet",
924
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
925
+ },
926
+ "step3": {
927
+ "title": "Refresh your browser",
928
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
929
+ }
930
+ }
931
+ },
932
+
933
+ "omni": {
934
+ "qr_code": {
935
+ "step1": {
936
+ "title": "Open the Omni app",
937
+ "description": "Add Omni to your home screen for faster access to your wallet."
938
+ },
939
+ "step2": {
940
+ "title": "Create or Import a Wallet",
941
+ "description": "Create a new wallet or import an existing one."
942
+ },
943
+ "step3": {
944
+ "title": "Tap the QR icon and scan",
945
+ "description": "Tap the QR icon on your home screen, scan the code and confirm the prompt to connect."
946
+ }
947
+ }
948
+ },
949
+
950
+ "1inch": {
951
+ "qr_code": {
952
+ "step1": {
953
+ "description": "Put 1inch Wallet on your home screen for faster access to your wallet.",
954
+ "title": "Open the 1inch Wallet app"
955
+ },
956
+ "step2": {
957
+ "description": "Create a wallet and username, or import an existing wallet.",
958
+ "title": "Create or Import a Wallet"
959
+ },
960
+ "step3": {
961
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
962
+ "title": "Tap the Scan QR button"
963
+ }
964
+ }
965
+ },
966
+
967
+ "token_pocket": {
968
+ "qr_code": {
969
+ "step1": {
970
+ "title": "Open the TokenPocket app",
971
+ "description": "We recommend putting TokenPocket on your home screen for quicker access."
972
+ },
973
+ "step2": {
974
+ "title": "Create or Import a Wallet",
975
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
976
+ },
977
+ "step3": {
978
+ "title": "Tap the scan button",
979
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
980
+ }
981
+ },
982
+
983
+ "extension": {
984
+ "step1": {
985
+ "title": "Install the TokenPocket extension",
986
+ "description": "We recommend pinning TokenPocket to your taskbar for quicker access to your wallet."
987
+ },
988
+ "step2": {
989
+ "title": "Create or Import a Wallet",
990
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
991
+ },
992
+ "step3": {
993
+ "title": "Refresh your browser",
994
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
995
+ }
996
+ }
997
+ },
998
+
999
+ "trust": {
1000
+ "qr_code": {
1001
+ "step1": {
1002
+ "title": "Open the Trust Wallet app",
1003
+ "description": "Put Trust Wallet on your home screen for faster access to your wallet."
1004
+ },
1005
+ "step2": {
1006
+ "title": "Create or Import a Wallet",
1007
+ "description": "Create a new wallet or import an existing one."
1008
+ },
1009
+ "step3": {
1010
+ "title": "Tap WalletConnect in Settings",
1011
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
1012
+ }
1013
+ },
1014
+
1015
+ "extension": {
1016
+ "step1": {
1017
+ "title": "Install the Trust Wallet extension",
1018
+ "description": "Click at the top right of your browser and pin Trust Wallet for easy access."
1019
+ },
1020
+ "step2": {
1021
+ "title": "Create or Import a wallet",
1022
+ "description": "Create a new wallet or import an existing one."
1023
+ },
1024
+ "step3": {
1025
+ "title": "Refresh your browser",
1026
+ "description": "Once you set up Trust Wallet, click below to refresh the browser and load up the extension."
1027
+ }
1028
+ }
1029
+ },
1030
+
1031
+ "uniswap": {
1032
+ "qr_code": {
1033
+ "step1": {
1034
+ "title": "Open the Uniswap app",
1035
+ "description": "Add Uniswap Wallet to your home screen for faster access to your wallet."
1036
+ },
1037
+ "step2": {
1038
+ "title": "Create or Import a Wallet",
1039
+ "description": "Create a new wallet or import an existing one."
1040
+ },
1041
+ "step3": {
1042
+ "title": "Tap the QR icon and scan",
1043
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
1044
+ }
1045
+ }
1046
+ },
1047
+
1048
+ "zerion": {
1049
+ "qr_code": {
1050
+ "step1": {
1051
+ "title": "Open the Zerion app",
1052
+ "description": "We recommend putting Zerion on your home screen for quicker access."
1053
+ },
1054
+ "step2": {
1055
+ "title": "Create or Import a Wallet",
1056
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1057
+ },
1058
+ "step3": {
1059
+ "title": "Tap the scan button",
1060
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1061
+ }
1062
+ },
1063
+
1064
+ "extension": {
1065
+ "step1": {
1066
+ "title": "Install the Zerion extension",
1067
+ "description": "We recommend pinning Zerion to your taskbar for quicker access to your wallet."
1068
+ },
1069
+ "step2": {
1070
+ "title": "Create or Import a Wallet",
1071
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1072
+ },
1073
+ "step3": {
1074
+ "title": "Refresh your browser",
1075
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1076
+ }
1077
+ }
1078
+ },
1079
+
1080
+ "rainbow": {
1081
+ "qr_code": {
1082
+ "step1": {
1083
+ "title": "Open the Rainbow app",
1084
+ "description": "We recommend putting Rainbow on your home screen for faster access to your wallet."
1085
+ },
1086
+ "step2": {
1087
+ "title": "Create or Import a Wallet",
1088
+ "description": "You can easily backup your wallet using our backup feature on your phone."
1089
+ },
1090
+ "step3": {
1091
+ "title": "Tap the scan button",
1092
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1093
+ }
1094
+ }
1095
+ },
1096
+
1097
+ "enkrypt": {
1098
+ "extension": {
1099
+ "step1": {
1100
+ "description": "We recommend pinning Enkrypt Wallet to your taskbar for quicker access to your wallet.",
1101
+ "title": "Install the Enkrypt Wallet extension"
1102
+ },
1103
+ "step2": {
1104
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
1105
+ "title": "Create or Import a Wallet"
1106
+ },
1107
+ "step3": {
1108
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
1109
+ "title": "Refresh your browser"
1110
+ }
1111
+ }
1112
+ },
1113
+
1114
+ "frame": {
1115
+ "extension": {
1116
+ "step1": {
1117
+ "description": "We recommend pinning Frame to your taskbar for quicker access to your wallet.",
1118
+ "title": "Install Frame & the companion extension"
1119
+ },
1120
+ "step2": {
1121
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
1122
+ "title": "Create or Import a Wallet"
1123
+ },
1124
+ "step3": {
1125
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
1126
+ "title": "Refresh your browser"
1127
+ }
1128
+ }
1129
+ },
1130
+
1131
+ "one_key": {
1132
+ "extension": {
1133
+ "step1": {
1134
+ "title": "Install the OneKey Wallet extension",
1135
+ "description": "We recommend pinning OneKey Wallet to your taskbar for quicker access to your wallet."
1136
+ },
1137
+ "step2": {
1138
+ "title": "Create or Import a Wallet",
1139
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1140
+ },
1141
+ "step3": {
1142
+ "title": "Refresh your browser",
1143
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1144
+ }
1145
+ }
1146
+ },
1147
+
1148
+ "paraswap": {
1149
+ "qr_code": {
1150
+ "step1": {
1151
+ "title": "Open the ParaSwap app",
1152
+ "description": "Add ParaSwap Wallet to your home screen for faster access to your wallet."
1153
+ },
1154
+ "step2": {
1155
+ "title": "Create or Import a Wallet",
1156
+ "description": "Create a new wallet or import an existing one."
1157
+ },
1158
+ "step3": {
1159
+ "title": "Tap the QR icon and scan",
1160
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
1161
+ }
1162
+ }
1163
+ },
1164
+
1165
+ "phantom": {
1166
+ "extension": {
1167
+ "step1": {
1168
+ "title": "Install the Phantom extension",
1169
+ "description": "We recommend pinning Phantom to your taskbar for easier access to your wallet."
1170
+ },
1171
+ "step2": {
1172
+ "title": "Create or Import a Wallet",
1173
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
1174
+ },
1175
+ "step3": {
1176
+ "title": "Refresh your browser",
1177
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1178
+ }
1179
+ }
1180
+ },
1181
+
1182
+ "rabby": {
1183
+ "extension": {
1184
+ "step1": {
1185
+ "title": "Install the Rabby extension",
1186
+ "description": "We recommend pinning Rabby to your taskbar for quicker access to your wallet."
1187
+ },
1188
+ "step2": {
1189
+ "title": "Create or Import a Wallet",
1190
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1191
+ },
1192
+ "step3": {
1193
+ "title": "Refresh your browser",
1194
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1195
+ }
1196
+ }
1197
+ },
1198
+
1199
+ "ronin": {
1200
+ "qr_code": {
1201
+ "step1": {
1202
+ "description": "We recommend putting Ronin Wallet on your home screen for quicker access.",
1203
+ "title": "Open the Ronin Wallet app"
1204
+ },
1205
+ "step2": {
1206
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
1207
+ "title": "Create or Import a Wallet"
1208
+ },
1209
+ "step3": {
1210
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
1211
+ "title": "Tap the scan button"
1212
+ }
1213
+ },
1214
+
1215
+ "extension": {
1216
+ "step1": {
1217
+ "description": "We recommend pinning Ronin Wallet to your taskbar for quicker access to your wallet.",
1218
+ "title": "Install the Ronin Wallet extension"
1219
+ },
1220
+ "step2": {
1221
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
1222
+ "title": "Create or Import a Wallet"
1223
+ },
1224
+ "step3": {
1225
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
1226
+ "title": "Refresh your browser"
1227
+ }
1228
+ }
1229
+ },
1230
+
1231
+ "ramper": {
1232
+ "extension": {
1233
+ "step1": {
1234
+ "title": "Install the Ramper extension",
1235
+ "description": "We recommend pinning Ramper to your taskbar for easier access to your wallet."
1236
+ },
1237
+ "step2": {
1238
+ "title": "Create a Wallet",
1239
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1240
+ },
1241
+ "step3": {
1242
+ "title": "Refresh your browser",
1243
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1244
+ }
1245
+ }
1246
+ },
1247
+
1248
+ "safeheron": {
1249
+ "extension": {
1250
+ "step1": {
1251
+ "title": "Install the Core extension",
1252
+ "description": "We recommend pinning Safeheron to your taskbar for quicker access to your wallet."
1253
+ },
1254
+ "step2": {
1255
+ "title": "Create or Import a Wallet",
1256
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1257
+ },
1258
+ "step3": {
1259
+ "title": "Refresh your browser",
1260
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1261
+ }
1262
+ }
1263
+ },
1264
+
1265
+ "taho": {
1266
+ "extension": {
1267
+ "step1": {
1268
+ "title": "Install the Taho extension",
1269
+ "description": "We recommend pinning Taho to your taskbar for quicker access to your wallet."
1270
+ },
1271
+ "step2": {
1272
+ "title": "Create or Import a Wallet",
1273
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1274
+ },
1275
+ "step3": {
1276
+ "title": "Refresh your browser",
1277
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1278
+ }
1279
+ }
1280
+ },
1281
+
1282
+ "wigwam": {
1283
+ "extension": {
1284
+ "step1": {
1285
+ "title": "Install the Wigwam extension",
1286
+ "description": "We recommend pinning Wigwam to your taskbar for quicker access to your wallet."
1287
+ },
1288
+ "step2": {
1289
+ "title": "Create or Import a Wallet",
1290
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1291
+ },
1292
+ "step3": {
1293
+ "title": "Refresh your browser",
1294
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1295
+ }
1296
+ }
1297
+ },
1298
+
1299
+ "talisman": {
1300
+ "extension": {
1301
+ "step1": {
1302
+ "title": "Install the Talisman extension",
1303
+ "description": "We recommend pinning Talisman to your taskbar for quicker access to your wallet."
1304
+ },
1305
+ "step2": {
1306
+ "title": "Create or Import an Ethereum Wallet",
1307
+ "description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."
1308
+ },
1309
+ "step3": {
1310
+ "title": "Refresh your browser",
1311
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1312
+ }
1313
+ }
1314
+ },
1315
+
1316
+ "ctrl": {
1317
+ "extension": {
1318
+ "step1": {
1319
+ "title": "Install the CTRL Wallet extension",
1320
+ "description": "We recommend pinning CTRL Wallet to your taskbar for quicker access to your wallet."
1321
+ },
1322
+ "step2": {
1323
+ "title": "Create or Import a Wallet",
1324
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1325
+ },
1326
+ "step3": {
1327
+ "title": "Refresh your browser",
1328
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1329
+ }
1330
+ }
1331
+ },
1332
+
1333
+ "zeal": {
1334
+ "qr_code": {
1335
+ "step1": {
1336
+ "title": "Open the Zeal app",
1337
+ "description": "Add Zeal Wallet to your home screen for faster access to your wallet."
1338
+ },
1339
+ "step2": {
1340
+ "title": "Create or Import a Wallet",
1341
+ "description": "Create a new wallet or import an existing one."
1342
+ },
1343
+ "step3": {
1344
+ "title": "Tap the QR icon and scan",
1345
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
1346
+ }
1347
+ },
1348
+ "extension": {
1349
+ "step1": {
1350
+ "title": "Install the Zeal extension",
1351
+ "description": "We recommend pinning Zeal to your taskbar for quicker access to your wallet."
1352
+ },
1353
+ "step2": {
1354
+ "title": "Create or Import a Wallet",
1355
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1356
+ },
1357
+ "step3": {
1358
+ "title": "Refresh your browser",
1359
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1360
+ }
1361
+ }
1362
+ },
1363
+
1364
+ "safepal": {
1365
+ "extension": {
1366
+ "step1": {
1367
+ "title": "Install the SafePal Wallet extension",
1368
+ "description": "Click at the top right of your browser and pin SafePal Wallet for easy access."
1369
+ },
1370
+ "step2": {
1371
+ "title": "Create or Import a wallet",
1372
+ "description": "Create a new wallet or import an existing one."
1373
+ },
1374
+ "step3": {
1375
+ "title": "Refresh your browser",
1376
+ "description": "Once you set up SafePal Wallet, click below to refresh the browser and load up the extension."
1377
+ }
1378
+ },
1379
+ "qr_code": {
1380
+ "step1": {
1381
+ "title": "Open the SafePal Wallet app",
1382
+ "description": "Put SafePal Wallet on your home screen for faster access to your wallet."
1383
+ },
1384
+ "step2": {
1385
+ "title": "Create or Import a Wallet",
1386
+ "description": "Create a new wallet or import an existing one."
1387
+ },
1388
+ "step3": {
1389
+ "title": "Tap WalletConnect in Settings",
1390
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
1391
+ }
1392
+ }
1393
+ },
1394
+
1395
+ "desig": {
1396
+ "extension": {
1397
+ "step1": {
1398
+ "title": "Install the Desig extension",
1399
+ "description": "We recommend pinning Desig to your taskbar for easier access to your wallet."
1400
+ },
1401
+ "step2": {
1402
+ "title": "Create a Wallet",
1403
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1404
+ },
1405
+ "step3": {
1406
+ "title": "Refresh your browser",
1407
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1408
+ }
1409
+ }
1410
+ },
1411
+
1412
+ "subwallet": {
1413
+ "extension": {
1414
+ "step1": {
1415
+ "title": "Install the SubWallet extension",
1416
+ "description": "We recommend pinning SubWallet to your taskbar for quicker access to your wallet."
1417
+ },
1418
+ "step2": {
1419
+ "title": "Create or Import a Wallet",
1420
+ "description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."
1421
+ },
1422
+ "step3": {
1423
+ "title": "Refresh your browser",
1424
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1425
+ }
1426
+ },
1427
+ "qr_code": {
1428
+ "step1": {
1429
+ "title": "Open the SubWallet app",
1430
+ "description": "We recommend putting SubWallet on your home screen for quicker access."
1431
+ },
1432
+ "step2": {
1433
+ "title": "Create or Import a Wallet",
1434
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1435
+ },
1436
+ "step3": {
1437
+ "title": "Tap the scan button",
1438
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1439
+ }
1440
+ }
1441
+ },
1442
+
1443
+ "clv": {
1444
+ "extension": {
1445
+ "step1": {
1446
+ "title": "Install the CLV Wallet extension",
1447
+ "description": "We recommend pinning CLV Wallet to your taskbar for quicker access to your wallet."
1448
+ },
1449
+ "step2": {
1450
+ "title": "Create or Import a Wallet",
1451
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1452
+ },
1453
+ "step3": {
1454
+ "title": "Refresh your browser",
1455
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1456
+ }
1457
+ },
1458
+ "qr_code": {
1459
+ "step1": {
1460
+ "title": "Open the CLV Wallet app",
1461
+ "description": "We recommend putting CLV Wallet on your home screen for quicker access."
1462
+ },
1463
+ "step2": {
1464
+ "title": "Create or Import a Wallet",
1465
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1466
+ },
1467
+ "step3": {
1468
+ "title": "Tap the scan button",
1469
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1470
+ }
1471
+ }
1472
+ },
1473
+
1474
+ "okto": {
1475
+ "qr_code": {
1476
+ "step1": {
1477
+ "title": "Open the Okto app",
1478
+ "description": "Add Okto to your home screen for quick access"
1479
+ },
1480
+ "step2": {
1481
+ "title": "Create an MPC Wallet",
1482
+ "description": "Create an account and generate a wallet"
1483
+ },
1484
+ "step3": {
1485
+ "title": "Tap WalletConnect in Settings",
1486
+ "description": "Tap the Scan QR icon at the top right and confirm the prompt to connect."
1487
+ }
1488
+ }
1489
+ },
1490
+
1491
+ "ledger": {
1492
+ "desktop": {
1493
+ "step1": {
1494
+ "title": "Open the Ledger Live app",
1495
+ "description": "We recommend putting Ledger Live on your home screen for quicker access."
1496
+ },
1497
+ "step2": {
1498
+ "title": "Set up your Ledger",
1499
+ "description": "Set up a new Ledger or connect to an existing one."
1500
+ },
1501
+ "step3": {
1502
+ "title": "Connect",
1503
+ "description": "A connection prompt will appear for you to connect your wallet."
1504
+ }
1505
+ },
1506
+ "qr_code": {
1507
+ "step1": {
1508
+ "title": "Open the Ledger Live app",
1509
+ "description": "We recommend putting Ledger Live on your home screen for quicker access."
1510
+ },
1511
+ "step2": {
1512
+ "title": "Set up your Ledger",
1513
+ "description": "You can either sync with the desktop app or connect your Ledger."
1514
+ },
1515
+ "step3": {
1516
+ "title": "Scan the code",
1517
+ "description": "Tap WalletConnect then Switch to Scanner. After you scan, a connection prompt will appear for you to connect your wallet."
1518
+ }
1519
+ }
1520
+ },
1521
+
1522
+ "valora": {
1523
+ "qr_code": {
1524
+ "step1": {
1525
+ "title": "Open the Valora app",
1526
+ "description": "We recommend putting Valora on your home screen for quicker access."
1527
+ },
1528
+ "step2": {
1529
+ "title": "Create or import a wallet",
1530
+ "description": "Create a new wallet or import an existing one."
1531
+ },
1532
+ "step3": {
1533
+ "title": "Tap the scan button",
1534
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1535
+ }
1536
+ }
1537
+ },
1538
+
1539
+ "gate": {
1540
+ "qr_code": {
1541
+ "step1": {
1542
+ "title": "Open the Gate app",
1543
+ "description": "We recommend putting Gate on your home screen for quicker access."
1544
+ },
1545
+ "step2": {
1546
+ "title": "Create or Import a Wallet",
1547
+ "description": "Create a new wallet or import an existing one."
1548
+ },
1549
+ "step3": {
1550
+ "title": "Tap the scan button",
1551
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1552
+ }
1553
+ },
1554
+ "extension": {
1555
+ "step1": {
1556
+ "title": "Install the Gate extension",
1557
+ "description": "We recommend pinning Gate to your taskbar for easier access to your wallet."
1558
+ },
1559
+ "step2": {
1560
+ "title": "Create or Import a Wallet",
1561
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
1562
+ },
1563
+ "step3": {
1564
+ "title": "Refresh your browser",
1565
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1566
+ }
1567
+ }
1568
+ },
1569
+
1570
+ "gemini": {
1571
+ "qr_code": {
1572
+ "step1": {
1573
+ "title": "Open keys.gemini.com",
1574
+ "description": "Visit keys.gemini.com on your mobile browser - no app download required."
1575
+ },
1576
+ "step2": {
1577
+ "title": "Create Your Wallet Instantly",
1578
+ "description": "Set up your smart wallet in seconds using your device's built-in authentication."
1579
+ },
1580
+ "step3": {
1581
+ "title": "Scan to Connect",
1582
+ "description": "Scan the QR code to instantly connect your wallet - it just works."
1583
+ }
1584
+ },
1585
+ "extension": {
1586
+ "step1": {
1587
+ "title": "Go to keys.gemini.com",
1588
+ "description": "No extensions or downloads needed - your wallet lives securely in the browser."
1589
+ },
1590
+ "step2": {
1591
+ "title": "One-Click Setup",
1592
+ "description": "Create your smart wallet instantly with passkey authentication - easier than any wallet out there."
1593
+ },
1594
+ "step3": {
1595
+ "title": "Connect and Go",
1596
+ "description": "Approve the connection and you're ready - the unopinionated wallet that just works."
1597
+ }
1598
+ }
1599
+ },
1600
+
1601
+ "xportal": {
1602
+ "qr_code": {
1603
+ "step1": {
1604
+ "description": "Put xPortal on your home screen for faster access to your wallet.",
1605
+ "title": "Open the xPortal app"
1606
+ },
1607
+ "step2": {
1608
+ "description": "Create a wallet or import an existing one.",
1609
+ "title": "Create or Import a Wallet"
1610
+ },
1611
+ "step3": {
1612
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
1613
+ "title": "Tap the Scan QR button"
1614
+ }
1615
+ }
1616
+ },
1617
+
1618
+ "mew": {
1619
+ "qr_code": {
1620
+ "step1": {
1621
+ "description": "We recommend putting MEW Wallet on your home screen for quicker access.",
1622
+ "title": "Open the MEW Wallet app"
1623
+ },
1624
+ "step2": {
1625
+ "description": "You can easily backup your wallet using the cloud backup feature.",
1626
+ "title": "Create or Import a Wallet"
1627
+ },
1628
+ "step3": {
1629
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
1630
+ "title": "Tap the scan button"
1631
+ }
1632
+ }
1633
+ },
1634
+
1635
+ "zilpay": {
1636
+ "qr_code": {
1637
+ "step1": {
1638
+ "title": "Open the ZilPay app",
1639
+ "description": "Add ZilPay to your home screen for faster access to your wallet."
1640
+ },
1641
+ "step2": {
1642
+ "title": "Create or Import a Wallet",
1643
+ "description": "Create a new wallet or import an existing one."
1644
+ },
1645
+ "step3": {
1646
+ "title": "Tap the scan button",
1647
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1648
+ }
1649
+ }
1650
+ },
1651
+
1652
+ "nova": {
1653
+ "qr_code": {
1654
+ "step1": {
1655
+ "title": "Open the Nova Wallet app",
1656
+ "description": "Add Nova Wallet to your home screen for faster access to your wallet."
1657
+ },
1658
+ "step2": {
1659
+ "title": "Create or Import a Wallet",
1660
+ "description": "Create a new wallet or import an existing one."
1661
+ },
1662
+ "step3": {
1663
+ "title": "Tap the scan button",
1664
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1665
+ }
1666
+ }
1667
+ }
1668
+ }
1669
+ }
1670
+ `;function tR(e,t){return Object.defineProperty(e,"__recipe__",{value:t,writable:!1}),e}var vk=tR;function wk(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");function n(r){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return{[t.defaultCondition]:r}}if(Array.isArray(r)){if(!("responsiveArray"in t))throw new Error("Responsive arrays are not supported");var o={};for(var i in t.responsiveArray)r[i]!=null&&(o[t.responsiveArray[i]]=r[i]);return o}return r}return vk(n,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:e.conditions}]})}function nR(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");var n=wk(e);function r(o,i){if(typeof o=="string"||typeof o=="number"||typeof o=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return i(o,t.defaultCondition)}var l=Array.isArray(o)?n(o):o,c={};for(var d in l)l[d]!=null&&(c[d]=i(l[d],d));return c}return vk(r,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:e.conditions}]})}function rR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oR(e){var t=rR(e,"string");return typeof t=="symbol"?t:String(t)}function sR(e,t,n){return t=oR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ex(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function G0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(n),!0).forEach(function(r){sR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ex(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var iR=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map(d=>d.styles)),i=Object.keys(o),l=i.filter(d=>"mappings"in o[d]),c=d=>{var f=[],p={},m=G0({},d),g=!1;for(var v of l){var w=d[v];if(w!=null){var b=o[v];g=!0;for(var C of b.mappings)p[C]=w,m[C]==null&&delete m[C]}}var S=g?G0(G0({},p),m):d,I=function(){var N=S[A],_=o[A];try{if(_.mappings)return 1;if(typeof N=="string"||typeof N=="number")f.push(_.values[N].defaultClass);else if(Array.isArray(N))for(var P=0;P<N.length;P++){var R=N[P];if(R!=null){var M=_.responsiveArray[P];f.push(_.values[R].conditions[M])}}else for(var Q in N){var V=N[Q];V!=null&&f.push(_.values[V].conditions[Q])}}catch(H){throw H}};for(var A in S)I();return e(f.join(" "))};return Object.assign(c,{properties:new Set(i)})},aR=e=>e,lR=function(){return iR(aR)(...arguments)};function bk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=bk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xk(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bk(e))&&(r&&(r+=" "),r+=t);return r}var cR="AEkVMQnvDV0B0wKWAQYBQgDpATQAoQDcAIUApwBsAOMAcACTAEUAigBRAHkAPgA/ACwANwAoAGIAHgAvACsAJQAXAC8AHAAhACIALwAVACsAEQAiAAsAGwARABgAFwA7ACoAKwAsADQAFgAtABIAHAAhAA4AHQAdABUAFgAZAA0ADgAXABAAGQAUABIEtAYQASIUOjfDBdMAsQCuPwFnAKUBA10jAK5/Ly8vLwE/pwUJ6/0HPwbkMQVXBVgAPSs5APa2EQbIwQuUCkEDyJ4zAsUKLwKOoQKG2D+Ob4kCxcsCg/IBH98JAPKtAUECLY0KP48A4wDiChUAF9S5yAwLPZ0EG3cA/QI5GL0P6wkGKekFBIFnDRsHLQCrAGmR76WcfwBbBpMjBukAGwA7DJMAWxVbqft7uycM2yDPCLspA7EUOwD3LWujAKF9GAAXBCXXFgEdALkZzQT6CSBMNwmXCYgeG1ZZTOODQgATAAwAFQAOa1QAIQAOAEfuFdg98zlYypXmLgoQHV9NWD3sABMADAAVAA5rIFxAlwDD6wAbADkMxQAbFVup+3EB224cHQVbBeIC0J8CxLAKTBykZRRzGm1M9QC7DWcC4QALLTSJF8mRAoF7ARMbAL0NZwLhAAstAUhQJZFMCgMt+wUyCddpF60B10MASSsSdwIxFiEC6ye5N2sAOeEB9SUAxw7LtQEbY4EAsQUABQCK00kFG8MfBxcAqCfRAaErLQObAGcBChk+7Td0BBgXAKoBxwIhANMrEnM681CwBZA6dyc1SAX6JwVZBVivuAVpO11CEjpYQZd7k2ZfofgLEwPFByXxdyMEo0sCU1MCdRurJwGPo6U1WwNFFwSDYQkA0QarPy8jBykCOV0AawFhH3EAgx0ZAJUBSbcAJ2kXAa/FAzctIUNTAW9ZBmUCZQDxSRcDKQEFAElBAKsAXQBzACu1Bgfz7xmNfwAJIQApALMbRwHRAdsHCzGXeIHoAAoAEQA0AD0AODN3edPAEF8QXAFNCUxsOhULAqwPpgvlERUM0SrL09gANKkH6wNTB+sDUwNTB+sH6wNTB+sDUwNTA1MDUxwK8BrTwBBfD0gEbQWOBYsE1giDJkkRgQcoCNJUDXQeHEcDRQD8IyVJHDuTMwslQkwMTQMH/DZCbKd9OANHMatU9ZCiA8syTzlsAR5xEqAAKg9zHDW1Tn56R3GgCktPrrV/SWJOZwK+Oqg/+AohCZNvu3dOBj0QFyehEPMMLwGxATcN6UvUBO0GNwTFH3kZFQ/JlZgIoS3ZDOkm3y6dgFYj8Sp/BelL8DzZC0lRZA9VC2EJ3zpfgUoDHQEJIocK2Q01CGkQ7wrFZw3hEUEHNQPRSZYAoQb9Cw0dMRWxJgxiqAsFOXMG9xryC4smqxMlevgFzxodBkkBJRr7AMsu44WsWi1cGE9bBf8LISPDFKRQHA0hQLN4RBoXBxElpQKNQ2xKg1EyHo8h8jw5DWIuD1F4B/E8ARlLC308mkanRQoRzj6JPUQiRUwoBDF7LCsnhwnLD4EMtXxuAVUJHQmtDG0TLRETN8EINQcVKZcgJxEIHUaRYJYE85sD7xPNAwcFOwk9Bw8DsRwpEyoVJQUJgSDTAu820S6vAotWfAETBccPIR/bEExH3A7lCJcCYQN/JecAKRUdABMilwg/XwBbj9RTAS7HCMNqaCNwA2MU410RbweNDlMHoxwvFbsc3XDEXgeGBCifqwlXAXEJlQFbBN8IBTVXjJwgPWdPi1QYlyBdQTtd+AItDGEVm0S5h3QChw9nEhcBMQFvBzUM/QJzEekRZxCRCOeGADWxM/Q6IQRLIX8gDQojA0tsygsjJvUM9GUBnxJeAwg0OXfqZ6dgsiAX+QcVMsFBXCHtC45PyQyYGr0YPlQqGeAHuwPvGu8n5kFTBfsDnw86STPqBLkLZQiHCTsARQ6fEwfTGGYKbYzMAS2HAbOVA1ONfwJriwYzBwcAYweDBXXhABkCowifAAEAywNTADUCqQeZABUAgT0BOQMjKwEd4QKLA48ILccBkSsB7yUEF78MEQDzM25GAsOtAoBmZp4F2VQCigJFMQFJIQQBSkNNA6tt3QDXAEcGD9tDARGnRscW3z8B22snAMMA9wABMQcBPQHJAe9pALMBWwstCZ6vsQFJ5SUAfwARZwHTAoUA2QAxAHvtAU8ASQVV9QXPAktFAQ0tFCdTXQG3AxsBLwEJAHUGx4mhxQMbBGkHzwIQFxXdAu8qB7EDItsTyULBAr3aUQAyEgo0CrUKtB9f81wvAi1uPUwACh+kPsM/SgVNO087VDtPO1Q7TztUO087VDtPO1QDk7veu94KaF9BYecMog3QRMQ6RRPXYE1gLhPELbMUvRXKJVIZORq4JwEl4FUFDwAtz2YsCCg0cRe4ADspZIM9Y4IeLApHHONTjVT0LRcArUueM6sNqBsRRDwFQ3XpYiYWCgoeAmR9AmI+V0mrVzccAqHzAmiUAmYFAp+AOBcHAmY3AmYiBGoEewN/DwN+jjkCOXMTOX46Hx8CbBkCMjI4BgJtwwJtquuGL2NBJwFjANoA3QBGAQeUDIkA+ge+AAmxAncrAnaeOwJ5Rz8CeLYZWNdFqkbTAnw7AnrEAn0FAnzsBVUFHEf8SHlfIAAnEUlUSlcRE0rIAtD9AtDISyMDiEsDh+JEwZEuAvKdXP8DA6pLykwpIctNSE2rAos7AorUvRcDGT9jAbMCjjMCjlg8k30CjtUCjlh0UbBTMQZS0FSBApP3ApMIAOUAGFUaVatVzAIsFymRgjLdeGJFNzUCl5sC765YHaQAVSEClosClniYAKVZqFoFfUkANwKWsQKWSlxAXM0CmccCmWBcxl0DFQKclzm+OpkCnBICn5cCnrSGABkLLSYLAp3tAp6OALE5YTBh6wKezwKgagGlAp6bGwKeSqFjxGQjIScCJ6sCJnoCoPcCoEgCotkCocACpisCpcoCp/sAeQKn7mh4aK3/RWoYas0CrN8CrKoCrWMCrP4CVxkCVdgCsd3TAx9KbJMCsrkJArLkE2zcbV9tRFsDJckCtlg3O26MAylBArhaArlDEQK5JnNwMnDdAr0VArvWcJIDMg0CvoRx/gMzbQK+FnMec0sCw8cCwwBzfnRHMUF03AM8owM8lgM9uwLFeALGQwLGDIUCyGVNAshAAslLAskqAmSZAt3OeHVdeKp5IUvMAxifZv4CYfAZ75Ugewdejl63DQLPZwLPaCtHT87vD5sAwqkCz28BJeYDTg5+RwEC3CMC24YC0ksDUlgDU1sA/QNViICFO8cS6VxBghiCz4LKg4kC2sMC2dqEDIRFpzgDhqEAKwNkCoZtVfUAUQLfYQLetG9zAuIr7RAB8ywjAfSXAfLOgwLr7wLpbHUC6vUC6uAA9UMBtQLuhQLrmJamlv8C7jsDhdyYdXDccZ0C8v8AZQOOEpmPAvcPA5FqA5KDAveUAvnVAvhimhiap7czmxoDnX8C/vYBFwA1nxifrwMFiQOmZgOm1QDNwQMGZqGEogEFAwxFAQsBGwdpBl21YwEAtwRnuw2HHq8JABNxNQAfAy8SSQOFewFfIx0AjOsAHQDmnwObjQizBhufwQCnBRG76R09PhZ4BWg3PkArQiFCtF9xEV+8AJbFBTIAkEwZm7k7JmAyEbrPDi8YxhiJyfYFVwVYBVcFWAVjBVgFVwVYBVcFWAVXBVgFVwVYRhUI14VnAgICCmRe6SsEyQOxBi+7uwC7BKe7AOdAKRayBUY+aT5wQj9Ctl91N1/oAFgRM6sAjP7Ma8v8pudGej0mIwQrFic2NX5t32rB8RnCLGkBa9duMBcFXwVqycHJuAjPSVsAAAAKfF59i74AMz+BAAMW0QblrSMFAIzDCwMBDQDlZR09JB9KQrFCvEE4I18nYDYnOCMJwT0KRD9DPng+gT5wPnECiUK8SUI7X8tOT2pNCixrVC9qC24fX+AzOhsJZ5sKYiMrPB0mQqtCvCvMAcv8X8kOHy4JCAkifp3fajotShfJq8msCWXBy8wKYEFfD+UQoxEAk40dRUIlG6ltOc44CjM/Qz5wQj8cBwodTEdsWywtWuG8Egp97R0rQj8cXQhKCQ4zVENCNwQ7Q5wsCoEbLUI/G/UIUyIjGDAxAAWPYfBeCnFkyWALYC0jbkNgGTkCGx5gswYCaxBlTmBNEQFk52AVYJVgfWCzYEtgkWgWFwa1DtxVqbxaC0MWqwG7K83BAh8VABwDHgF5AmwvMJVSgAGKCrhHGgDkI3SOCsoNpk3qAZsCh5xPBUBfAPf3BwA0FlcMC6UMJB+6r0eAgQw0ABUTnyuCCHoC0gtLZREbANhOBnUECh5aADEAtritAJQnCxZvqyQ4nxkBWwGGCfwD2e0PBqoGSga5AB3LValaCbthE4kLLT8OuwG7ASICR1ooKCggHh8hLBImBiEMjQBUAm5XkEmVAW4fD3FHAdN1D85RIBmpsE3qBxEFTF8A9/cHAHoGJGwKKwulODAtx69WDQsAX7wLAGNAlQh6AOpN7yIbvwAxALa4rQCUJy07Ds4CkBh7ULtYyHRyjsOlmw/ZFUkb7AEpEFwSBh/lAccJOhCTBQ8rDDYLABEAs+AiAQIApADhAJiCCrJrOS8AFABbG8YubHYqDcEQAjskHNPhHB4LG30CewTBCqrxbAAnLQ6mLs6hHAe7CQAQOg+7GkcczaF3HgE9Kl8cLs4RGQB9q9ocAuugCAHCAULz5B9lAb4Jtwz6CDwKPgAFwAs9AksNuwi8DTwKvAk8DrsFmAEbawouzqEqD4sa4QHDAREWOwCgCzsLuxC7BBiqe9wAO2sMPAACpgm8BRvQ9QUBvgH6bsoGewG7D00RErwBAQDqAQAAdBVbBhbLFPxvF7sYOxjbL7ZtvgNIqLsAB7sALrsC6w5WAAq7BAAeuwJVICp/FTwVuwG+J+QAsloBvSjgo7vIAAFbAAG7AAJbAALjAAg7AA67AgAbu6VbDr/EAPQAaPuoOwMBu5UnSwDn3Rm7CBp7CKEFCv9wAN+7p7sau6OLeXIG+6mbgwASuwYbCwG8AACGAG27BgALu6c7ARo7ugihnMoBuwvtB8CpOwDhewG/AADlABW7AAb7AAm7AGmLABq7GLuOaRX7AA5rAC5LHgAGuwAXuwghAA1KAcIAt68mAcAAALQADpsAHBsBv/7hCqEABcYLFRXbAAebAEK7AQIAabsAC3sAHbsACLsJoQAFygBunxnVAJEIIQAFygABOwAH2wAdmwghAAaaAAl7ABsrAG0bAOa7gAAIWwAUuwkhAAbKAOOLAAk7C6EOxPtfAAc7AG6cQEgARwADOwAJrQM3AAcbABl7Abv/Aab7AAobAAo7AAn7p+sGuwAJGwADCwAQOwAIPAAUOwARawAPiwAN6wANuwAZCwYWGwAVOwBumxm7ALobLgATOwMAaSsKAOFLAAI7AARSABd7BRsABtAAGLsAC/sAX7sAa/sA5IsBuwAXdgG8AAFyC6EABUoAbXYAB/sA5XsAHGseAXsoUgA5RQD+Bw0McgAoKnABpAUIXgG8XiMMCQdvS2xfKokfPBRiLTYDoQq0AdgAFgLRA24BdnJHUhQhA08CFT4BLAYDc0a8e1J6QAApADEB+wBTCtsAe5AsASsAduUNETJGAUoAVwUAAVABB4rMAHg7BCClAFoA1hUAlWg3H4sAzWuxAM/UFgjCdXMbGFYdCdEBiJCrIlNTTUgSPMKJ+QB/HDdAKSvgEZdPAHIBKSwwKUIZDwMwVQT3xe4AS2XcAGoCcQI/EXo6x3guNdUGBQAQGx0KCAwqBB8dKU5TTgi5ugAKEs0AJgABGgCGAIkAjjUA7gC0AOAAnTwAuwCrAKYAoQDyAJ8A0wCcAOsBDAEHAMAAeQBaAMsAzQEHANcA6wCIAKIBNQDjANgA1QMBByoz1NTU1LbA3M3QzkMyFwFNAVcvRwFVAWQBYwFWAUdLQ0VoDQFOFQcIAzI2DAcAIg0kJiksODo6PT09Pj8OQB5RUVFRU1NSUylUVVdWVhxdYWFgYmEjZmhwb3JycnJycnR0dHR0dHR0dHR0dnZ3dnVbAEDsAEUAlgB0AC4AYvIAigBTAFMAMwJz6QCH//LyAGAAj+wAmwBLAF4AYPn5qgCBAIEAZQBSAK0AHgCyAH8CPAI/APgA4wD6APoA5AD7AOUA5QDkAOIAKQJ3AU0BPAE6AVABOgE6AToBNQE0ATQBNAEYAVQPACsIAABNFwoWAxUWDgCKAJIAogBLAGQYAi0AcABpAJEDEgMkKgMeQT5HKQCLAksAwwJTAqAAugKSApICkgKSApICkgKHApICkgKSApICkgKSApECkQKUApwCkwKSApICkAKQApACkAKOApECcQHQApMCmwKSApICkRZ5CwD6BQOnAl0CNhcBUBA1At4RCisTAUo3E02RAXekPAFlWQD/Az1HAQAAkykeGI9qAClgAGkALgCJA5TMi/CuhFoFuisOwhEBndV0KgsEIzFsATNabAGyAN5+gH9+gH6BgoJ+g4aEfoWIhoCHgoiCiX6Kfot+jIqNfo5+j4KQfpF+kn6TfpSDlYiWgpd+2gLabOEC2GwAgmwkbKAAg2xsBEkERgRIBEsESQRPBEwERwRNBE8ETgRKBEwETwCWZmwAowOIbAC0ZgEFbADJUWxsAM9sAgxsAPZabAD2ARkA9gD0APQA9QD0A31ebNSEI2XAAPYA9AD0APUA9BxsbACJWmwA9gCJARkA9gCJAL4A6AAIAPYAiQN9XmzUhCNlwBxsAPdabAEZAPYA9gD0APQA9QD0APcA9AD0APUA9AN9XmzUhCNlwBxsbACJWmwBGQD2AIkA9gCJAu0A9gCJAL4CNwD3AIkDfV5s1IQjZcAcbAJDATZsAkoBOWwCS8FsbAJXbGwDnwLtA58DnwOgA6ADoAOg1IQjZcAGA31ebBxsbACJWmwBGQOfAIkDnwCJAu0DnwCJAL4CNwOfAInUhCNlwAYDfV5sHGwEPmwAiQQ/AIkGjTFtIDFs1m4DKGwDrAJsbABVWv4VMgJsbACJAmwAVAEAul5sAmxebGwAiV5sAmxebD3YAEls1gJsbEbCxxP/x5BApA0KYFA89AsjTx97EHmJQPyocItC2JnNFRCEnFU6SFTDoI0PxeRNRoNRWkpzVnWW8pTagkNmgf+jGupqZ3eu50LAFnc+OzfJwdub1AdpOy76VnijWNR/CMEevikQkFyQuLuPajxWi9chqOoMJ7qpCN4sx3LJG4Myu8kD68wC6+iAwt+pU1JEeY13rpCVkXSZfinVKn4xZpxsI3Lp8bJLrJ9ujkrIalMRBAcv/GSKEtowzcEn5XmJw2BagB8V2UWJoJHZ14SXhM7p0XeGFOuw6mlvyq99WYp5XxrO6ru9nn4RHcOkJ7hx5UqWtman7yVMLzYXQefQRUdIY70RYQE8+aAzCNSGQkXiHfnHYRMi+xczKDdZLk3AV1gzxkkSHLjBwuq8shIJ+/RAbqjqQbugFhe0rqklu432EERkM5k9y1DXzds46oLqKAx6OhPT2WiqEfhaITn7OF9Y694AmKmUvbpWp0xJqDaf3jeNJXnK6NpnGcFOmbclbARC+5+5U52ufw5b0Hh+2LrrNimvZe4eYmApRsZnJE310SqB+1xB6rSJfnV1f2D0awB18Oc0sXAFqIlgHgWiaZGdvP5CJUSsCTCQUC335+iSkwPlLJJ5lwjTSn9Lw22NbK1Tu8w+bUpHtDRDPho7Gun8aw2Jzu9i+N0Ot/kPMbLAb/rUQ82kfpk85qLDkfxLl39QPDngo72GYh/Xigbpcm1pA23D2ywt3D8GgMOao040wDqkHxOEx0OhC+ZmHiIdjK7yRbfJD2ouZbAedhD3p7s8WDmCJfNforgDYPGAXSI08fTjPZ5B37lc5VXGzc1vJmibDwBNVzXuaUzg7N5H4BxqjhJ+kz9HLUJys7bpBDYAPvbut13AwJCWd059tS8YTYgC8HwrkewBfa1LSSpmMr9uR2EekTiAMH+Mx4AGzgbquccwBDlLmRhgXL/YiLPCEb6d2k5qJ6o800qddABkpqt7NG+sc2uvHZwZs57W1AHTFM1KkMShasADAh2FvzbzJOzVDMS3ZlT2BSFKdnkZFB6JyqJbhm6XANis9TrtzJdlPVp+rl8v3nIke6Jou7m2TKu53Vounupgkz2LzrQPhhatLIG7rfF/gUKWp15X3LKt+ZvuCDSqPUigF9yJntimC1HJR7Yj/dUrLAXWrT+1tnwPJJLGKAlQ5VeNDWRKCTt2vz3rJuo4+gIt75/Mkfl/gSZblZ9r/SEeeosZXneli/xNh1WVCvkRt2RnyyjtMkMqhzXh1PVOCbILqv0r7rGYm0CHIyKdhHL90cl9E1I6eEtQTCt6RXj8M0HHrHCHLVRpNM6WIbT5BCMGVnL0o5895qSRbCJz+5I8PGMhAN/Xrj4BgIdlKqlHtBHqTJwmK169toZ2IWxNzrAbIG7zh85Q/LG2A4yBcaBel52zdunokB0lv3A7kXnTI7M6ZnfZ7nwuj5lkGhqSpW+w5CI/FmRlplBEbnZy1ZxS3DL8rf1YWhO5XivWZBSRh1gFsjjyj3qRG1cm/6ors7WsEif6WRxns1MKDZa6KrbfMQ/swIb+2nb0tqxHeii6FcgVeAjE/Xwac1owx04dJKG8R5YQgHNnEfHf0qb8WOnU0eQSjazq+IK7cSuCqYzPEUB/x+QgGZqM3dBoYvNvZVOHDkbgdilWdagqO5bkybXfLpyMPuGq8mvAAEZGbR6RwXGlW9ErOWTfnjfx6dXFJqBj0OBSGFz4lWQasNOmVJeN4SFWSLfOGB/7ehV5YuoNNROHZEG9ElVuMnqbDMMuDleOt/cN/gsWxGw128mwU8/HxkOKqdTZnI7dHka67WCTf/FmBrxpNCaKJ1GxBTCSS7MNfhNj8S4Gtotg6Z3AM9cAeVROnppUMaiV5jjudLnNqoVrKO1/FijLlAc74kxydxKX1RQuMqHR63eecYr5o6MJ+B78VsLlCrpelWh6GOrCOBIoQmIcdpJL1pwE2zzZqBkecGTdK8KMOB6r1eNRURyrz6M899TZaoS/vNOxHf+5gORU+OyYIcIW6diP25GHF6u8TNjuL/GJzCnLLXd01KrsjRa51v4+O/VIAWXESJxfxWjv628J+cWUQpoD+Yytzs3jSMRJ23/XT+vUdtUMLDQq1vnIoeg/GjWh88MT6k9dRqDaQ+vodilFgvjuNw5pJpId9mfwyYeLCGb3BmHXdfQfhfPRQaupe/f8TG4Bk3eDKlYBaEK3kZYNN2Sdxz47m/vYBxvIOKtnqplB1pebzuXmAr/MuzQCknKe653dzaWQQ7MUhWYWvzIZwLe1v0rXxImLaz+AkAu+sYikhouNF3EW6w4crZ6MuUiDbIAx8XhAfegcvW6x9BPb3/sCxGWu9YyatqExB+TSm69qIkI9IwhjrcnzME+jWBx4mNQm5WwLzUjSyY4FZ0aMF5YFlXUD4hL4XfOeYv5rDe2s2D/Cn+28fZ9UCnOQvXFMnQqfc0G+ZqOWWD9l/liqUPaNQzZjxCHpUAD8Rcc90MniQ02ugHWsUupFUvhC9usY7zNPt5F2jO7qgzhafsQSd50jgLrC6Qx6bpHbXR3WNAu1BzGmwbz+ebGmwTjdy006Y6zipP7n/OJlvSmbq+SY+nefAVKK6EBMPbce5n3IdRI8+vbxCpN53rw3TvgNds1SuMiuLGxt89L71mxPDeanGhyHvOjmO56tnVpoHalQnL6TqNuqKsHjHCIKB4pCgj4WyYPvRvYvqi5EMr7lN3MotPR/KH7JUD1lZbU0QzfbrEBJnuQiVAyAC9vwXWp2TRU1/0aapyAH2cbglEHVAdl+1rb1u147uV0td1eNoQZsqHrIMIYVPXtLk2TIU3cJE08PjoYNDpfF/IcJnYQHl6nsplczX3Rgah4NbJJHl//5scUufqsSd//kbIS406ZWoMP//+jhGUswX/5nVNz/jAj9KmXPtAmMiK+khhbn1w/mELzZMT/WxcW//y/jsHaOM/61oAW/CjYhJtY622/TtMYuP7bilBvbiT3vB9n8IcFPnwM78H0KfhYDRdY5PhWJ4jWRQzB+HT5NVZV56LG82hcQms+jOTT/c9Y9sx5rPi1/wB7f/+c5UfUCKk3iwwCuywUc2MGnAwsXf1E5hoI55x1Q/Qby+sWH8NRjavZ8VaDsdi1NUVhH86BJHX1yaFt1w1OYeL5LVmdN+5Q+KuTvXEPDzUCg6xp0HhsUhTWSe7MZMM/6rsTUb0/nbUE3YQlGGt48kT1/6cnf6yHnvHtQx9EosOXN077yyEq/jE3YTiG/5SEJmXFeocJJ1EAd6vKeK6VEdJLOZ1km/EwOnZWCQpzCLKPHxrfh4yJhGq//2dos2E/3+MOcdW5EsgIdmTQUQetzRy5fQHhDBl37XbWzsqO/cASEDjyst1/8NEROqVAxWnddQV+umJ8IrKVgKvGaTc0GsQ4s8h0Osql5QKwlddPDjJhKInyWqYUKmmlIts+FIcXZ6yM6cljbsjUG2ksSOkuIw4sYHffRNgBOLApvD6XrR6Rt0rV2Uf8IpnIUVnb9Twt91QjAaD/dStSWDxg7aYY+VXIgnuowYdOkjywa2hlgrnI6PjaU3e3UjQ5Yk5mdIJGyHnv3/P+1EkMav1yFyF+FeJE/RXnWBw+Nh0aOo6TGlKX7d+dkP9+brvr79SdtXJtcD/aXBGiMNfG6/NQniQHYQlK78FEHDqOh+bDI0o+2Ub0h53EL/vlzjrBczVEZz2bOtvIL+DIzDkk9nCWt7tlqsq3l9JMtJk3r5HG2iJ9b/X11TG6wwMAjHLQ2oasaMEsydh88QPvI+hmqIHhvalpKoKOueJR0eZ9J8G2alNOIOy98jwvbc87Ewk9d+5G/tUijTmlbjFlDKXV05HalKxaRTrucc73On7yzAPS6f2v4ogiaWyWeV73dv/MsQT5HjRrsYV9dLAcI3T+zC2qEVINyNpEhoKV+xVSuWtT4AhBfpnZ7unIM+HX3msI0HiI+P+z2PFgkjGi5PqEbG/wNIWeRUjPtDEgbbubN+I4JaDLrW9borRBDob7ZFx+JdKeFVUKVeWqb/c88Ol7DhM0suLtuEd8tkDSMTD3DFx8UphPINHMHi51hAPttXL4Ektt/lKEUG/R4qZKohHjVpAcPIMiHyWr6xR8/EWnNJvBFET76yCdk5er7ADB/1bgoImhpSiZ/omZjPKPCEeZsOwvPmXL+1vlJNeGO3TzySmGA1X6e58gLrazDM71jywM1XL8zKHN6G3kB31Y8vLtP982N975SZXk2JwDvmv7AY/aDsFFk1v+nE7/hbvuOWhBH4kuemeYozPk2K22Vx/YGiDTLU7YilpOt29u3RZMBh4UJjlTP5ItxTzWv6ebL9b+GSU1Vsm2S8LMfVfJczaBSqE8J1A4YUjpsALL7++bwCPXFhaufdpDFtBlHb9makeYbqdg9ltvK/HwF/rNE6KrtWUkEcxmTB7Iyu5TiVaIgW/YxzQhpArliIMkOoK5L7ShVtF+DYqV01mk7fwop04hQRwg4KFmr5z9nYf05VVqkSe7gfnx5bxxlQ0qEV0jiwzf064qG11iEqjHcUgDWWsDs/LEGlzX31T5KVL+7D4EoKim7HBagiqRo5JI3WfDBgpKIruWz9j/J6Hp5Q/EJbMWB8NeSMuFarNw3AEYPBJtYQO/4oD/ZgPTSQ06di0EeumX5EbrdThO+fvYEVSxLtZ3AJkee0Xn0sDwNtiiZhJjJRDuG1YRKB1vOulfd9JjHeyu+UHTmrtra/pm+8Rixh4WKiLaLOCxIbZNoWRZSyyUGLPjAaAo+SQBpfO2uruWrzFxLlpvrXJNMCWtlJDKGAnlWK5xpU2tcxXbeD+sbdfwYXt/qTwDk6UqXR/aUt099DhSNl4Nk8mXwpw+b0nvjKOG6Mg1PRXjrMUMANvNgEArv8nMJs3vj1aHi8MHz/UfJWWzkcrSpZTNBhduXlGR7i+ip/THDp5R9KRNcDKECgtwgXg4EFN5HHfikP/XvsoCkHTg+NbsD8Gl6eknk4Arwn/BWGJ0hgW0/gUKrzuGZhub7igRP3abetpIm+24xEOlWl3YKpm2qTBFvX8ddDRvm1LcwnCJuEfZx12qPY9TrntMIQsv316zvpyWnyStX8VU4j6tQk+CWlLBUCJR6MdH9Cp7g2qdn2WM9qFbREmejH09dlWEPm8hPF0L7RxwRRdiCs0DP8ewk6ApoELkKU9hckSdbnXm8UHJmaNXjxv/q0fTTpu8rnl9lN0vQCpDRbCtcz12rGRFEA7Cfg7FhZn5QFkNmv1ZURKEsiZce1nS9K7HrwpC7yJV4Xt3eAVbLJfoXHrtwG60Z8gwaSnmxoL3s2ZlRqggZN/MHo1oUS4L+GwObFI596Ld4Mvi8l+cQmF1gJpkpnDio7TuO35npaMHiWzFqPSX3qNgkIPGuX0qGYnPIVsM901Yu8oZnOZOY1TbtIdFUNKNq2dP8SJ4F/VCEzIjF0/Rh+7UrZj80tC6rognVH3mqa8eCs/lcQU1Pjj98kBmAKDbZUTwosv02UunRR3n0X6c+f73mtwB7/WbQ16gO431EtwZbNG1SM4TZPBnsQSESlsfG2JLQXx5xWf4bmQ/xcVCPISAX5897JxHKLD/Xkgu57+ABR2+MMtEbX64+MNlBHpKC7sjlWVEShf5qA+dGc59LFVlZrX/Enq9z/v+wnZ1HErmxmjJjxOA+hAjVUWgtq6ygAi/8ewJDjUMFw3zhQFtbyTLDPFd21Ji5S5QPZo9nMSxdg1+DGFSN0wlWt7XeYPbHqLfliV0J1kOhQNp0VbUPy0MS2Ms66OxtSWvaULaWHnfAA+sieVVgtjDwN3nKonWapkSKRN8BKKJQpCfqo8RQI5udhfu5s5+7vwsppmAJDgz2GNA7d43VdbV2l/SrvEu4RYslmNJmfSOVbssxAhSYy6WxpIQdDB0FVBpZ6IM8yr81QN+XLZ3n/wed/R+s6LslkxKbzzst/GkRbe6rFmtvJCwr1T44ETM+IMgOnjUO0eG6a1n2w7lwM1oFBvzMUWRkNFOvKcx3oSb5XdenZ5dXsute6nkRypBiSdAtA2fxAd8UdLOZW/MB7fZoEuFheQXijdaF8kuaRZoSeWdKOkKsGYEGaXfaDKTu0WMTcLniQs7KRCz9iK3SP+Y2xIjkfVGqFLSQ6vh+A1u6FdfwXsv1VPMfi2cxmdM+/xTgMXEyo2ZGcQ2YmPsghnYdv2+z48JpGZA4tUK1p1q2VdVxyfypXEXcrxKKtmt8UdW7sHWmKMqDuBBM3J/JUQx8eUYN4pJ5oRqvdiPHU1o/WPjiKvnlCqOdyxlxF54L9PrtLD1NejZ9aZDivVr6ZfMFK1/psVygoPIAnphcJWWb9+5IKMKmgRQULsTPZi6Bw4wP32zVEoKcHpP73CkFAqS98nSaGoWDjDJiaACJn4p5o1jq9R4Q4VcibhXF//LHP0bdf63kRVZdRbbhGe7sDQcyWS5tpkfeYHnff25WK+4FpzLlAcbaKmHdIBqOw3fImx1uqQIADH0TyHzFlqTG6nMoY81svP0T6BIyELMS8tMe+E1p6TFP6sVpZa6VNaTumufD5aj9goRa9SAmdJT4HhI2r0egj8UrgFb8L59wGLnYlzkLAiUd3m/WWIIEU61kPoEjd3gIVy/fiBcgqQqHnoXpL0SqLGdGGgn7DQeVMSYWHfjno1FngIKP9cjYaTlcRP6bZunjHP13/lbVm4awti894pTf/ZNNqr4OR+tDVie/m+rC8QpVnRbsCMPukOH87B2jM4AG6pHuXl1x9SiKdhYJVOhfo/+SCaGjUW2CoogL1FFhFGN9o+acoVLl0SXs/3vrSccmZeAF3NewFuOg/P12QYKQF+SH+KYcNnsAhIAELPBUgre/KRUJEA+KPD0MHRjv+3J/j2Z23MuJmkfy7leWcMsti8wXLSHgXFJTaksx1Woi6oljwxFVIJG12SBSZLNJDbXMYPekmiXT4FclKI35BFgqnYpKfcsr+f8HUXQoHJ9UYZ4J5YMiHHyAxg6eidhodgqJ2Htf/xYEx+G0zXchuzlt8hcAl+AT8NCQ4orFc4DerabF1enA7NTLnvtZh3FUwqIOvY7Q4DYmoDHwXTSw5UNNh6r7j0B/ezMYJMDcw4+6gCTZX4YQ+7Xs8de72vsR3cmfpxIX64/6KR1p3VX4F6vfHEzxzarh8aDH4G1DFoBBM6npXFpK+Rh+WrcFclAeAxi0PoaR9CpOxxGLSdvxKVSw8oOOanG/soKImRopN38AdcUhhM2GT/PgQeSQrG12njuJJD5Z7vWfAZmFybYLdSA91kB4aoBhoj1Z//KNIVVujqaLLRwCkbyn4vh0739C9V9iSjybeOIeSOvNs7LW1a7EUtNoKAnOGML4U8KBXpfrw73WjAszJG4Qscq+Xr3kZWR4Omm0xT6qE9y6FNSpstV4onMZSqCEJ+3VX9qjvdx5QVrM0WXxmPZxejdfnihcFAjzv5PjlTl6ickDbHe6+Lch52pjOPqk+m3RZ+bh2JSMGtFBuODbMchrpRVlt16NTQ05Ps0IDtWlUmWfP2vX8M4YDynIuOZ4Ck91+591B98Gw9fw+yQogTR8CSg0zaJu+rlBo/mr3A+1NziF+kdubz+whc857AZt6DwIBIF5+5yiaaf3ByQp1Fm3sOkZDAzwsYSQTM/Kv6idkugF63FDobDdUY3huruU+sCaBuRR+HmOowvmZoBjZHNh77SXFtmY/oOUE7ifN7nBHAo83S/xvcS6H4Ci2u/9Id62Wv6Ui+zMNLAzhfkTkVcW2BwrnYvpur0ZDlzs+ZLsmGTWvd1892t78gx1YjEJusGcxphjLkV0UfAKlekfSBVWHE2ahk4AbbRmHyL7GYdtKfdlINwrcdJuf3Cee1nfUojDQn/YmItESOFhtLzrkEv4k2XpMU9oaJQ3VUC+1INh6BE68pkHameGJm4Gvdb24Q0fXWxd9Tp3A9mzFSe4qXDGGDIV4AAGV1jIDfveknH1TwWpUT6HiQxKP3AAHJNkJeRlj/mXBmS4S1j8FK6YmpK7jyyAiRbsMCCLoJcx01fvgpMvKQRxu9IOwymconQjD56g7ksOrcOeoTbius4JnGesAS1DtgdaophYsw1wGIsMS3P7K6doE3K5czznqPQLSRRF/Ylzb5NtSKsL33SgskFNCF4khn5LWaDxI23ZRi2hzqN8uW8UzZEBYy68+VtGLSymQrXGUlr2nO2BbBIT5Vh1RmGAyDXaW0FPrpx3wv2UYdFk9tSl+906bMxCuXQaKDQP/U19UEcVGK4gmksL8lAorxQSAOwpeYX9xrZsh6yoGaL/X5O3tgQC8OM+/GvxnW9XvAtu/JxAigydfSmZfqZfg1XOcHNOpLlN8j64OZ36l5qawDBJ62YaTvxeNmm5gowCdBosgcpHOgNgwA+sknN8XmsR2IYChcafl9bGNMZ/nB5guWuvEziv6QI2bP2DtyKWG/qUjZMaxy+wASkkVGtuwGtywkTYG6MYrZBo18vYcww48G/+f+eITA/qMwbLlJC0S3+/ai2pPvkOhRRVmGTuSupaxhIk0xoXLtixCxSAn4Z3OnUS3wBqVscLI4P3GP7i/6gxYsswsVmkvDXFLhO/OKcur8flegCSKiqmVpIRvCzgbjEA0mXPn+RExXY/2OE1f/BYuWpRQY8gCDpMOYBx9Gn4tL3hihSIR1ixh2PIIT7cr2gUJbfs76EKYG52Jk0UZF/PQkBxGuFCEWXnG6ue/hTIqjTRq1sotVrKrwIGHDrITyuanUzbIYdgdEeV88K1VD82TYB2B61Ft+tB1KqHPmT9+hWoaV+iF3SuvtJqvnoLaA8wxrD56AUMULEgzO9SvBcBAfqz/dzMYzwMt/YLszDbmGe1bcHHfFMcvGql9bf/tp+Hrj4q18aNnftGjmXTfws39emn7/5IBxog9MrmftAA5Oq4awenm8HimWO72dwVlHcHmutVMdrMHw+p2vzpzT+B0iIZ+IEpplwWhClcXlxhxAsF3CHRnnaUEqq3ByQ+cqhe5SvR4SFxh/LZoQwtj8QZQGT1BzY2EMpYnUcZWQEPlwFZw+7UryK9qV8KgruYsvyMoK16KI2sN4SOblrVwhyiL8+IBZ8cpUhsJQSU7TFHAi+L2F0sn0y+FtDODlnuif2Mba8QddPZYYxjTsIgkMe3M6+7kXxUfZvbCUlyq71J1eNczGk6Vqw6rSx2K3vM+DjLxDRGzWepTO2qTT/W8S7u0QXcyFUahcB4vq8xCYTpy8iswtnyz7Kx6lgTEQJ9RqkgEIN6DOUqB0uRdeYuDa7AP7Zy9z+ZlTsmVR5vtV71m3dmdtNeWghbr5PnPJtjXAzcvZjxyV96VEx/B1TA0IEQSI50ywGuIbmAYdQg/l/rxhQLX+6uOLyFsaUt6mtjpAJkLfehnB6MlOHnNOrWLvCBqVBS07jcM+4RzLEed3f3/0Xwp92U+nataNHyEgnnuYR6PXEjRLETz0xrt3UglfK7Bn4aNlXG7cZco4lMziLv5+Mh2JCww3mz69Z9ZMRR/xv5EKJ38IFxKd9dw5CgPIXja/gzAshMbF14/qBIgNkdUQeP8YE7SrICGtiTnAKTyA9cXa3OauDHxZOdTP7yuYBzD1UcHstIO16FxF1bRUAlSkszI83YufTchU8OPnnozDl9bS0y6CnnjGwgj9M61cXcZsljjhLeT/Vq+30ScN2PcT/dOoxUDqDS38+OpCCzLDdnwHQc3ECQVIkaxmdPaZTSdfp2jjGzSdNLM5yPQsgJDl+ZnhclDQi8ltUnkqWJ323IvTZPN8rn0+EshL1cx9PiaLTzUsryn9Zp2Nt/detUAh4N/2I3dlMQqjHFxSihv0uykzflq5clMy2ZBaxoEb0/QMp03IQQus3vnZd/NOmSsmgqXqKFP3ozyDgY7RQS+npabe/hNG+5sa5FtvL8v0uYuag2NewYkcol3TOTadpuncCnDgOGpmLnTQ1PEPUN2cNsrW8LYfIv+hzfb7vod+ipXHzmbgj5Fzc6RcT/5PD7VQ8nTJBNj1urkVUx9uJvTWmqY08OC80rGDLaWXv243VB16gjt4Xtwp5H2UDR0LiKW24Ed/sOO8jl1yEU/XAb3h7ScKnCFy/V3sICrkY1D0K9fSokHIL0s5/7DLShLAPXRbV7fbv4qj6OwHC9d5PlEOX3LRpQ3P7hcSAKlIKPDM83ypz56U5+rJeo0cyUtC7wltL8wqEiNSgZsDWzACc7RFoZqhlD0+sihIBQlkQTXmvUyIOZhkQX2zqME5VRC7ms1sa3CY+odMn3mMBiTvCMKnnCxg5ZPLq4GUDB4jF8Br2K4x4sxfWjGXQatJ25I1JyrIv2Z4bP1jKw5C+B2/s0v4dGUOsaS6IPIQV3ETQ+F2fSl2BPBXHzyYN8VmwWIrKeMX9pyGWuAOVXwkxJsRBaBVzLhZDP8ONGncknL5DpTxHN32GgFWMwsc0GmL0oRDmRT8u2lvjAKUIi0MmXhIHSlFeh3Qh5pP6ap4YUd6b569ZIaHgya2AyD12cPxY0In/PBjzDctTaKJCU+xc6m9RkNLDEE8guvxtJP8sl8N9bLqw0F/qejaBlcHYqw31zYpsutQp07hsP1vhGdl4hJ1wA7OCsAHnKj9879uSHILEmuZ6vI1lT4tvnWCVKZhhYrWHW9oPKPKpbOC6FTjf/OtUvwmiXr2ykvyLzHGQeyS7BenZpL3N/CaF5T7Gkml7JXN5cj0PKaDpZVImD61FuMgFHPqSHvt4Ej4KBdAfdcoO3AjQPLwwtKsgGM+ty4lNZMBEItJSRLunG5ckrM/BeoXWoPZVvEoIzLgFQYPupMwZCXis4W2SCJ2zsefZqCj+aTfSq1FYdUj2UeJALvVTf7vuuikOE1Hit3UIAGUi/sqgMum9vw218y1FlY/9XnOji9nqhGAcMYICc7BiqLZj5N+cKEuSAuiyWbMg81ZD1lHovy/we2eaCcCv4MzEW3O0mVA/t2xdA0cxTVbXmFhn+tARDpvDz5ftLr15OAAmvo2QiAky+feVO4bGibv2nlBmBzqx0lEDfEm4UnEs11pbnwZlJ/0Y73/wBPYfTNZiJKR73TzdCW1BffiJq9bLjQmaKnU0+gN8sfe25IKSUCooQwxePDrFn3a/zUgWxvPoTYVXfobY/GV2qqTkeVDV9D8657fhY0/wiaJ5NfLxhXbE/naxs34N0hd6vxNfdm1TCnozm/NKSCThchoYgMF7Z2tzXFovRfsNVkf86JjrM60r7UIuV3bsmfrMOqzjXjN6HPBG25zCJ3QLueySbj9oFvX/HxWBqh31PBPxduCVAxMqC9HK+YL3oBZqBruoh6LKvdMqoz0PYXUBrwbiioyE8Tj5ImjJmiOOWLbAZvIZ/l9rIPljx3T5glJ2ewlfuIT5GlodQsAf/IEtmYkML5SRQGxxwW+rlZkD8belJNu09Itwx9xDULTnemVDeojdbgcd2gKGM9aO00Jivtbs7ZyOSE8IPh98GfvatD8Ud5uHcZfAfMiPSlIxd4UqeSDzuNfbKDuFepkyC/s3j9fawmhY1b9NqDi0ZS5eP35l7rL2eK5QlWLlyCmxx8AFaFiTuD2pMUxZV5mBSJuJduOaq2ZrWpu28DE8jl/hisBz7bGWH6qLF0ayWNq1Sejtcs8KQrQqJk5P9QHDYHOIolgNsMDmEaWcTelghbfFCDqWrq6YLwDWy+m68ec5nShgq2fduUBpQUuKKKgnttaUX9PRfMmxqJyU7e0RLr1bev+ge1KK0bZyhHKKDE8gQX9Vf7rNHWOxBtZcxwwGusyMpH77qWZxXsQmbgIGhtiO+gSSRCyu/ek+OFsz1HMiQH0IHV7PjJi3dszYfFp8ue9h4+AfKte4MTiehPvxNcm/T1t9vsFZx8rHN5ie77r2jzZOq/Em4Q+H9sNcZakf9HnzCc1fJixppxP8FQABmVnqa6GbJhwaka7WH7Wdoz1WxOjSNV8N9sgW5S3Ppgkut+TTCkjA+AodUOk1KIR+8G8S3WrSZG4nyqfJ6FEjXl6a/LEoRMHZUqfPRWvwqrtXYy9IUsmUGzkqi76ib4NANCe5DnyOxnFRZ9d8FdBVBjra3iNuZhJuWW5Omi/hBigqDsg0mu2AhfJDXdwyMIJ33HHHPfS2JtjegRejX11m41TbNL+Qp7mR0g9CPKTj9PIjuSycGN/YPozXI4zarXuAeLv5CHKtKcJKRbd6R2oLNiEt0T8+QIVJH7zt9ncKMgd49vV2P1AyScZ9Qzbu3m3LBnuu6dw7aE0b6r4kzVkI/GUS88mA53L/rLtntkFlZXGtIoqNP2mD3eVv08AVVPT3wJn81zpbJV9SuqZ6Pd1ge0Zz2RFHeCdV5CLPftH9V5o9+VzFu4R0QeumqDwUhXn3IyYotdJnxr1l3BqWnQVAeDBEOtPyJQx1q5+mODiClXtYeBLTWtsJ42AMBcf/IFIhpfhYO08hsg0Ik+DpQFNOKReK3o3cudkxWX0soPtI5eSFOA6yNylS+IQjrQtYQ/5s4UcixJfokumBUjpH9ofSjUTwPCapGFndfqqG5IHeMMvfg+88SXm7bNyjk6pGKzL+WxDAdqKtQ72WWVbOk3I+ueGuammmB2pvFZvqIcU/lvW3n9+r2lycnQLE4OX9R1jIgW4cDjJ3v8dAa66mVcfC7ptCr5io6mCaA9qI9T9FFWqo1ZAaMxgxAu8aXqmaOYryMND2sTUfoHvxcYK7hEiJhCLYFDx3PBhE97c2a0ub1/ePJcyJOqr7UaTAPTJ+xvZtjb/40sloY1ltRnTkWILmIP2b7S3AdXCR+YiArMUHwdncpjpyDGfzqGOUoAuaamWzAMacQtb34/M32FEgR5lUEf8fRzFrZUhzQj0fR7/6gdzdnVVvcSneLmtqJ930VCCDORY8CVdQWdo/S3PNkX3pQsPVKWIYGAMrFZoq8bQ/OJBDSXP7KSBdL3QN0Zqd393p6VFc7DnlnFiN00SY5Nux7yadeIM0Upl2rVsu8/VAI";const Ax=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),Sx=4;function uR(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),o=1,i=[0,1];for(let N=1;N<r;N++)i.push(o+=n());let l=n(),c=t;t+=l;let d=0,f=0;function p(){return d==0&&(f=f<<8|e[t++],d=8),f>>--d&1}const m=31,g=2**m,v=g>>>1,w=v>>1,b=g-1;let C=0;for(let N=0;N<m;N++)C=C<<1|p();let S=[],I=0,A=g;for(;;){let N=Math.floor(((C-I+1)*o-1)/A),_=0,P=r;for(;P-_>1;){let Q=_+P>>>1;N<i[Q]?P=Q:_=Q}if(_==0)break;S.push(_);let R=I+Math.floor(A*i[_]/o),M=I+Math.floor(A*i[_+1]/o)-1;for(;((R^M)&v)==0;)C=C<<1&b|p(),R=R<<1&b,M=M<<1&b|1;for(;R&~M&w;)C=C&v|C<<1&b>>>1|p(),R=R<<1^v,M=(M^v)<<1|v|1;I=R,A=1+M-R}let j=r-4;return S.map(N=>{switch(N-j){case 3:return j+65792+(e[c++]<<16|e[c++]<<8|e[c++]);case 2:return j+256+(e[c++]<<8|e[c++]);case 1:return j+e[c++];default:return N-1}})}function dR(e){let t=0;return()=>e[t++]}function Ck(e){return dR(uR(fR(e)))}function fR(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((o,i)=>t[o.charCodeAt(0)]=i);let n=e.length,r=new Uint8Array(6*n>>3);for(let o=0,i=0,l=0,c=0;o<n;o++)c=c<<6|t[e.charCodeAt(o)],l+=6,l>=8&&(r[i++]=c>>(l-=8));return r}function hR(e){return e&1?~e>>1:e>>1}function pR(e,t){let n=Array(e);for(let r=0,o=0;r<e;r++)n[r]=o+=hR(t());return n}function zc(e,t=0){let n=[];for(;;){let r=e(),o=e();if(!o)break;t+=r;for(let i=0;i<o;i++)n.push(t+i);t+=o+1}return n}function kk(e){return Wc(()=>{let t=zc(e);if(t.length)return t})}function Ek(e){let t=[];for(;;){let n=e();if(n==0)break;t.push(mR(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(gR(n,e))}return t.flat()}function Wc(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function Ak(e,t,n){let r=Array(e).fill().map(()=>[]);for(let o=0;o<t;o++)pR(e,n).forEach((i,l)=>r[l].push(i));return r}function mR(e,t){let n=1+t(),r=t(),o=Wc(t);return Ak(o.length,1+e,t).flatMap((l,c)=>{let[d,...f]=l;return Array(o[c]).fill().map((p,m)=>{let g=m*r;return[d+m*n,f.map(v=>v+g)]})})}function gR(e,t){let n=1+t();return Ak(n,1+e,t).map(o=>[o[0],o.slice(1)])}function yR(e){let t=[],n=zc(e);return o(r([]),[]),t;function r(i){let l=e(),c=Wc(()=>{let d=zc(e).map(f=>n[f]);if(d.length)return r(d)});return{S:l,B:c,Q:i}}function o({S:i,B:l},c,d){if(!(i&4&&d===c[c.length-1])){i&2&&(d=c[c.length-1]),i&1&&t.push(c);for(let f of l)for(let p of f.Q)o(f,[...c,p],d)}}}function vR(e){return e.toString(16).toUpperCase().padStart(2,"0")}function Sk(e){return`{${vR(e)}}`}function wR(e){let t=[];for(let n=0,r=e.length;n<r;){let o=e.codePointAt(n);n+=o<65536?1:2,t.push(o)}return t}function Ga(e){let n=e.length;if(n<4096)return String.fromCodePoint(...e);let r=[];for(let o=0;o<n;)r.push(String.fromCodePoint(...e.slice(o,o+=4096)));return r.join("")}function bR(e,t){let n=e.length,r=n-t.length;for(let o=0;r==0&&o<n;o++)r=e[o]-t[o];return r}var xR="AEUDWAHSCGYATwDVADIAdgAiADQAFAAtABQAIQAPACcADQASAAsAGQAJABIACQARAAUACwAFAAwABQAQAAMABwAEAAoABQAJAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACwANAA0AAwAKAAkABAAdAAYAZwDTAecDNACxCmIB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgPi89uj00MsvBXxEPAGPCDwBnQKoEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJEMAJpIBpob5AERSMAKNoAXqaQLRBMCzEiC+AZ4EWRJJFbEu7QDQLARtEbgECxDwAb/RyAk1AV4nD2cEQQKTAzsAGpobPgAahAGPCrysdy0OAKwAfFIcBAQFUmoA/PtZADkBIadVj2UMUgx5Il4ANQC9vLIBDAHUGVsQ8wCzfQIbGVcCHBZHAZ8CBAgXOhG7AqMZ4M7+1M0UAPDNAWsC+mcJDe8AAQA99zkEXLICyQozAo6lAobcP5JvjQLFzwKD9gU/OD8FEQCtEQL6bW+nAKUEvzjDHsuRyUvOFHcacUz5AqIFRSE2kzsBEQCuaQL5DQTlcgO6twSpTiUgCwIFCAUXBHQEqQV6swAVxUlmTmsCwjqsP/wKJQmXb793UgZBEBsnpRD3DDMBtQE7De1L2ATxBjsEyR99GRkPzZWcCKUt3QztJuMuoYBaI/UqgwXtS/Q83QtNUWgPWQtlCeM6Y4FOAyEBDSKLCt0NOQhtEPMKyWsN5RFFBzkD1UmaAKUHAQsRHTUVtSYQYqwLCTl3Bvsa9guPJq8TKXr8BdMaIQZNASka/wDPLueFsFoxXBxPXwYDCyUjxxSoUCANJUC3eEgaGwcVJakCkUNwSodRNh6TIfY8PQ1mLhNRfAf1PAUZTwuBPJ5Gq0UOEdI+jT1IIklMLAQ1fywvJ4sJzw+FDLl8cgFZCSEJsQxxEzERFzfFCDkHGS2XJCcVCCFGlWCaBPefA/MT0QMLBT8JQQcTA7UcLRMuFSkFDYEk1wLzNtUuswKPVoABFwXLDyUf3xBQR+AO6QibAmUDgyXrAC0VIQAXIpsIQ2MAX4/YUwUuywjHamwjdANnFOdhEXMHkQ5XB6ccMxW/HOFwyF4Lhggoo68JWwF1CZkBXwTjCAk1W4ygIEFnU4tYGJsgYUE/XfwCMQxlFZ9EvYd4AosPaxIbATUBcwc5DQECdxHtEWsQlQjrhgQ1tTP4OiUETyGDIBEKJwNPbM4LJyb5DPhpAaMSYgMMND137merYLYkF/0HGTLFQWAh8QuST80MnBrBGEJULhnkB78D8xrzJ+pBVwX/A6MDEzpNM+4EvQtpCIsJPwBJDqMXB9cYagpxjNABMYsBt5kDV5GDAm+PBjcHCwBnC4cFeeUAHQKnCKMABQDPA1cAOQKtB50AGQCFQQE9AycvASHlAo8DkwgxywGVLwHzKQQbwwwVAPc3bkoCw7ECgGpmogXdWAKOAkk1AU0lBAVOR1EDr3HhANsASwYT30cBFatKyxrjQwHfbysAxwD7AAU1BwVBAc0B820AtwFfCzEJorO1AU3pKQCDABVrAdcCiQDdADUAf/EBUwBNBVn5BdMCT0kBETEYK1dhAbsDHwEzAQ0AeQbLjaXJBx8EbQfTAhAbFeEC7y4HtQEDIt8TzULFAr3eVaFgAmSBAmJCW02vWzcgAqH3AmiYAmYJAp+EOBsLAmY7AmYmBG4EfwN/EwN+kjkGOXcXOYI6IyMCbB0CMjY4CgJtxwJtru+KM2dFKwFnAN4A4QBKBQeYDI0A/gvCAA21AncvAnaiPwJ5S0MCeLodXNtFrkbXAnw/AnrIAn0JAnzwBVkFIEgASH1jJAKBbQKAAAKABQJ/rklYSlsVF0rMAtEBAtDMSycDiE8Dh+ZExZEyAvKhXQMDA65LzkwtJQPPTUxNrwKLPwKK2MEbBx1DZwW3Ao43Ao5cQJeBAo7ZAo5ceFG0UzUKUtRUhQKT+wKTDADpABxVHlWvVdAGLBsplYYy4XhmRTs5ApefAu+yWCGoAFklApaPApZ8nACpWaxaCYFNADsClrUClk5cRFzRApnLAplkXMpdBxkCnJs5wjqdApwWAp+bAp64igAdDzEqDwKd8QKekgC1PWE0Ye8CntMCoG4BqQKenx8Cnk6lY8hkJyUrAievAiZ+AqD7AqBMAqLdAqHEAqYvAqXOAqf/AH0Cp/JofGixAANJahxq0QKs4wKsrgKtZwKtAgJXHQJV3AKx4dcDH05slwKyvQ0CsugXbOBtY21IXwMlzQK2XDs/bpADKUUCuF4CuUcVArkqd3A2cOECvRkCu9pwlgMyEQK+iHICAzNxAr4acyJzTwLDywLDBHOCdEs1RXTgAzynAzyaAz2/AsV8AsZHAsYQiQLIaVECyEQCyU8CyS4CZJ0C3dJ4eWF4rnklS9ADGKNnAgJh9BnzlSR7C16SXrsRAs9rAs9sL0tT0vMTnwDGrQLPcwEp6gNOEn5LBQLcJwLbigLSTwNSXANTXwEBA1WMgIk/AMsW7WBFghyC04LOg40C2scC2d6EEIRJpzwDhqUALwNkDoZxWfkAVQLfZQLeuHN3AuIv7RQB8zAnAfSbAfLShwLr8wLpcHkC6vkC6uQA+UcBuQLuiQLrnJaqlwMC7j8DheCYeXDgcaEC8wMAaQOOFpmTAvcTA5FuA5KHAveYAvnZAvhmmhyaq7s3mx4DnYMC/voBGwA5nxyfswMFjQOmagOm2QDRxQMGaqGIogUJAwxJAtQAPwMA4UEXUwER8wNrB5dnBQCTLSu3r73bAYmZFH8RBDkB+ykFIQ6dCZ8Akv0TtRQrxQL3LScApQC3BbmOkRc/xqdtQS4UJo0uAUMBgPwBtSYAdQMOBG0ALAIWDKEAAAoCPQJqA90DfgSRASBFBSF8CgAFAEQAEwA2EgJ3AQAF1QNr7wrFAgD3Cp8nv7G35QGRIUFCAekUfxE0wIkABAAbAFoCRQKEiwAGOlM6lI1tALg6jzrQAI04wTrcAKUA6ADLATqBOjs5/Dn5O3aJOls7nok6bzkYAVYBMwFsBS81XTWeNa01ZjV1NbY1xTWCNZE10jXhNZ41rTXuNf01sjXBNgI2ETXGNdU2FjYnNd417TYuNj02LjUtITY6Nj02PDbJNwgEkDxXNjg23TcgNw82yiA3iTcwCgSwPGc2JDcZN2w6jTchQtRDB0LgQwscDw8JmyhtKFFVBgDpfwDpsAD+mxQ91wLpNSMArQC9BbeOkRdLxptzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgELgEaJZkC7aMAoQCjBcGOmxdNxrsBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUHqSvAj5Gqwr7YrMUACT9AN3rpF27H7fsd/twPt4l+UW1yQYKBt2Cgy7qJpGiLcdE2P1cQSImUbqJ6ICH27H4knQMIRMrFkHu3sx6tC35Y+eLIh4e4CMKJ4DfyV+8mfta499RCAJ0xfeZR8PsoYOApva9pjGn4PhvyZS7/h5JLuhaucfjuU+Z584wwqNO4hWYmaBCcjgQPale1bjoHzMUbut/zTgxHxBnAyrdKpF4IRMASLBtD/jviyLeCgj8twWjAd3HchN/uqaeRYeHJgl7JEY9/cTrvtfybx/r3Y/NtxJ9dp+MTVmiS9bwBH73s8Di56/Ma+mTPMHq4T1yEG1fWcqr0u+hrGnJEvU1JJAm/maQSrKrazIyvSkDFkj8UUlfBq8baniTGPng6YZRL661rDNw4w/1g2figG0IhXnL7wosd/sVNo5dYSmMBTP5c7rYLjRdCwg8quwljOMPf63D8ICAL0r71XRiyFHdgwHbwfgnPOf4Lzjf2v+j+IiDHG2isp5yUnzSDyDRb4i/Vs0qHSHq8PiEQ/JnBP7PxnjN0j6gT4AVAeRx/1o9VnEUlUwvFrzJqHk9jxAw4sYxCnrxaeBdCFFKbnE7z+x54F5W7ZZsU6kx8Qocul6FoAHHy01FGL/nne61mn4+uYXfQ1Uccn+HMLKE+cZzT8BB1E3FRskOgJrRsq25rauLm8+uamXpkS/bTy6y1wDbCrW4eD532kTWrtNUmVVZOIn/C+/JR9KVR5iG9TY8iaT67ubm/whL1xbKZoqtY+a6fNxMJrg211bGYJDUkYMNWA0BMB++9zOm6Eik4roqs9CCEFW0lyAK0PbvlzvoxrZuY/OEhNW/l/63U15Od/RSvmDvXpGLiVmeGi5PDSH2bYz5o2g6wFDQ2FbZgYgTF8rPlvA1ifjZD3NLtFdXdpSIJvgKR7GpjJWG7GZGawPomIH8B5tUmtHH9LpM+/KQKunEPa1GiQkCXv4Cnm9DLORo2joicHdPDZ64obQrPZ5bgqckkj0G6/NEiPYBY4bCkL7W8G5YzsUb6GakFjykSPkT7JGeLeB6uJOGMm+x7N381BCDfbJFx0dtLgV9Q477BfL1fvitX5anV/oYfxeYl+eF5x5bB8+Ep/L2nsmd56aKF4aAD4GbJWsdKyBW22xEmAD3XdbtsMyAFoR5mOla0gEd9U/YVB7zvHGpHbQonay9Sv0bQ8iZ8piaXVrKc5AG1AmqqgaEvzHSP2Wux7aZTWh6quVDVU01JtMIVRdCFwlSbbqqhoFlyzsotQzRexFvZ/MqUSFu3OhRIuNBbufvBpdVgb8XdGJ48/lJPCZ7dsOujTTbKPSEvGXkOnG2Xdi8/nM3EMRqITd5QeU7iOjKqC7URJY6TnLsHij22xAHKnVRD5MDtBYnoGFqZGMDmXCW6Oj+BAWw14hESY/xLF6bLku06AHkiXTHPCFZ0f9YSqqo27eAhhS67OrA2Het4M9JM3jm/yRX6bYxnfmzYl5qQdHxN08FsNuWDrWd4vMUY2QD3hr8vS73SCTkFoXZR3xNzOQt8d/6HfjBmXqvrE6EGkLzK6YK2U2/ksU/iUH+LvVIsJI+ri2AL/klo+ShdDyfs5A83i2prkMs51IKR7ZcqjZJi5X3+bd8GlyWvtddxKEoEqSgEO7A8jIgf2nH0h8FjM7oB6yte3X5mpL0i/E4Rx0CotKnILJj/vJqo4VkPQ93jRtRVfaitQPqldl5xRYPq8387Z0DcnZvOeION0Ht1+P27kFLGQIcLBX4FG3sffccNHh5cPfzp9INoRtqVtdViJfg8RjnXiIz/MNqEN6zvzX3hMzyWC7oSoXIT14ubc0abPX8Rp9GVa5NI/8iv+6ela1oTncbdimRKnrbRffDR/X4nH+bgqAuHWl7hOaeXPWVzIeRl7ga+JzD4Sx3mlj/q6Ra/E2HhDf21eEzTLNGfCZsY+/yxZzQzIAuijG65ii4O/waAJCrEJaWd/DRAKMQ5678Dw5AT7RCKzdadIwd8LsD+DgPBASmWsUlf8R0k1w/2k4lO2Wpb4zMI6EJVJs0xk/wn8/fRUPqrDKhbjHR41SqgFMx5RGMPuduFwlu5lK89tW11sTqiX/5EfGs5nO+y9FKvgXKPOEmgE05EKNL6Sjb3xS40H3BVPhm0ESOZgAjZoymc8be0inDVo4JdJVf+NKd3tN/CaB7GShhH27qf95NoFZVX/6ZkR2lX+CgWrQ2INgkh+bbMz68+uJ3Clsh8HSMPEQtAt+BBE6fXDab7KIlsKxU1lIXW/KWVstpdPanJ0pdXpQinDyUQjtY7ZVcfiecRxRDMAUhHFU2cEaciQ+htiPMPx1kdvtWG9T44w3r037ljHBFJdYR0r55qvMRixtAEFJAqA4T1ES87FAx7UozXasytg8MftZYt0rjYgLe6EJ5aWvy2qscBSBQ7yehoJIA3wIIZ9ukfkyBb6qnue5ko8W50rpV4kXqWjI5nbGRXrNW0tBZHXlY48nSgcUXBHWT4GcgLZJoLlKJnV96kCYpq9eWHh7xJzkCAyrQuQ5AJ0qq/uZ3toJglNterev+Qm0KXxPg/+YbFRJdfhbp1wOnVOEYdVHTya6CtO0afhEaBhx3oHwCb5Kq6RwHDzFMl2vfjL8GwzcCoTj7wZe+UFnYDV2yKpPU9dba29gYBdNqJg/KXozO+CJTlKmlKhnqTf5doeS35DZFV+cYJQVjd+oVY/Gtc/6XPzUxb1gMqf6cEjNNoRC8AObrp+fx0cVtGu4ffC2TgXRC8zPl8moUHCB5HZ25d87mlsiiK0aNwBtcEQjRNBT/QrXbw/8aVXdKMHn9EqYEKEyxSGTpYQOaes1G1Qq8pDgqkZtlO2HRyCXpmeM7TSrRPkAh004BfisVpF6zP44n2Jvxz/gOVocNCyy9V6lkod28QM4pbaMvVJigD/w3BrsjSJrXlqc4ulBYOCceiBN4b/gHajYyupbhEt63a619Ay4wsL6a6w6B+A7TnoyE7BliWHJfzVxxIKM/W3M/J8Bx99Op863Q8eNuIMGRx++VbYfjm+VGYBA3Ap/KEu/wxBNBpJJncwHPG45V8Gh98ZIrGCc20MwijGowZbcS7d1nEgcOW5cddZpHL2XPAIRbColiheZzXTvBxZOY3iMSDSKDrICyJ/iQs1vdplVdH/JrLJsQ2jtTnfCrITIghq3KFX3qAgLWAIp8IffNSdTYptnbGfc8s+qcr3zyzyHp1aJg+jxTF4kD1ry5Wauv5V3xnOGwTFecNzXSLHBW20/pCQjk4uorD0plIhMSTc79+/r4RKPClRYTBYex1Ob5crtfvRQBBv6re/6FhtCqtduag67glqRA77/3ulblh9YRtMdDxkCyJDeNnAuCLPQFmdRRWJtH20Z8DstfJf+5oj5SSB64d0iF5/Ya4KfTWxfivj9Ap2/zbYaTo/1gO3tM6RYsCZharMBFr7Fm61mLSrQnEI4OF1gbVS4k/JE9UotOrnLJZuswoWodCSV8zbybkJSVIP7n8UaE9xCR39rJZmf27HOAPVOGc9pdkQUcRrI0qyVF9Z3j1RHDbxIfwbWzmPVjwIdPJvtmBYwEQIUsIW1S939hcVikK00ozPRI02cqhzVUNzpOxVdrwRPvlh1aIOf0xFEqD3YkGnCnFah/cFN3J2gB7N+bZSGawwkKFu1tpQMrp1W+27YNkyT0TpcFpTqgOqqLabrgcCUPxh97mREOGy4xItzQ9xSl6rq+8BZsHcrQFReS+QeMxJ3P6CnL9EP/eOLDjumLhvrcQrpPiknsofbzBv9gTP0lU+TIVwE6E7CcKfT36q+ZiEOHJ9ayf0dyUJLezAb2M8aNHwd0+OJmsVgTzRWA";const qc=44032,Sf=4352,jf=4449,If=4519,jk=19,Ik=21,Ka=28,Nf=Ik*Ka,CR=jk*Nf,kR=qc+CR,ER=Sf+jk,AR=jf+Ik,SR=If+Ka;function ic(e){return e>>24&255}function Nk(e){return e&16777215}let Ig,jx,Ng,ff;function jR(){let e=Ck(xR);Ig=new Map(kk(e).flatMap((t,n)=>t.map(r=>[r,n+1<<24]))),jx=new Set(zc(e)),Ng=new Map,ff=new Map;for(let[t,n]of Ek(e)){if(!jx.has(t)&&n.length==2){let[r,o]=n,i=ff.get(r);i||(i=new Map,ff.set(r,i)),i.set(o,t)}Ng.set(t,n.reverse())}}function Pk(e){return e>=qc&&e<kR}function IR(e,t){if(e>=Sf&&e<ER&&t>=jf&&t<AR)return qc+(e-Sf)*Nf+(t-jf)*Ka;if(Pk(e)&&t>If&&t<SR&&(e-qc)%Ka==0)return e+(t-If);{let n=ff.get(e);return n&&(n=n.get(t),n)?n:-1}}function Bk(e){Ig||jR();let t=[],n=[],r=!1;function o(i){let l=Ig.get(i);l&&(r=!0,i|=l),t.push(i)}for(let i of e)for(;;){if(i<128)t.push(i);else if(Pk(i)){let l=i-qc,c=l/Nf|0,d=l%Nf/Ka|0,f=l%Ka;o(Sf+c),o(jf+d),f>0&&o(If+f)}else{let l=Ng.get(i);l?n.push(...l):o(i)}if(!n.length)break;i=n.pop()}if(r&&t.length>1){let i=ic(t[0]);for(let l=1;l<t.length;l++){let c=ic(t[l]);if(c==0||i<=c){i=c;continue}let d=l-1;for(;;){let f=t[d+1];if(t[d+1]=t[d],t[d]=f,!d||(i=ic(t[--d]),i<=c))break}i=ic(t[l])}}return t}function NR(e){let t=[],n=[],r=-1,o=0;for(let i of e){let l=ic(i),c=Nk(i);if(r==-1)l==0?r=c:t.push(c);else if(o>0&&o>=l)l==0?(t.push(r,...n),n.length=0,r=c):n.push(c),o=l;else{let d=IR(r,c);d>=0?r=d:o==0&&l==0?(t.push(r),r=c):(n.push(c),o=l)}}return r>=0&&t.push(r,...n),t}function Tk(e){return Bk(e).map(Nk)}function PR(e){return NR(Bk(e))}const Ix=45,_k=".",Rk=65039,Mk=1,Pf=e=>Array.from(e);function Hc(e,t){return e.P.has(t)||e.Q.has(t)}class BR extends Array{get is_emoji(){return!0}}let Pg,Ok,Xs,Bg,Fk,Ca,K0,pa,Gs,Nx,Tg;function o1(){if(Pg)return;let e=Ck(cR);const t=()=>zc(e),n=()=>new Set(t()),r=(p,m)=>m.forEach(g=>p.add(g));Pg=new Map(Ek(e)),Ok=n(),Xs=t(),Bg=new Set(t().map(p=>Xs[p])),Xs=new Set(Xs),Fk=n(),n();let o=kk(e),i=e();const l=()=>{let p=new Set;return t().forEach(m=>r(p,o[m])),r(p,t()),p};Ca=Wc(p=>{let m=Wc(e).map(g=>g+96);if(m.length){let g=p>=i;m[0]-=32,m=Ga(m),g&&(m=`Restricted[${m}]`);let v=l(),w=l(),b=!e();return{N:m,P:v,Q:w,M:b,R:g}}}),K0=n(),pa=new Map;let c=t().concat(Pf(K0)).sort((p,m)=>p-m);c.forEach((p,m)=>{let g=e(),v=c[m]=g?c[m-g]:{V:[],M:new Map};v.V.push(p),K0.has(p)||pa.set(p,v)});for(let{V:p,M:m}of new Set(pa.values())){let g=[];for(let w of p){let b=Ca.filter(S=>Hc(S,w)),C=g.find(({G:S})=>b.some(I=>S.has(I)));C||(C={G:new Set,V:[]},g.push(C)),C.V.push(w),r(C.G,b)}let v=g.flatMap(w=>Pf(w.G));for(let{G:w,V:b}of g){let C=new Set(v.filter(S=>!w.has(S)));for(let S of b)m.set(S,C)}}Gs=new Set;let d=new Set;const f=p=>Gs.has(p)?d.add(p):Gs.add(p);for(let p of Ca){for(let m of p.P)f(m);for(let m of p.Q)f(m)}for(let p of Gs)!pa.has(p)&&!d.has(p)&&pa.set(p,Mk);r(Gs,Tk(Gs)),Nx=yR(e).map(p=>BR.from(p)).sort(bR),Tg=new Map;for(let p of Nx){let m=[Tg];for(let g of p){let v=m.map(w=>{let b=w.get(g);return b||(b=new Map,w.set(g,b)),b});g===Rk?m.push(...v):m=v}for(let g of m)g.V=p}}function s1(e){return(Lk(e)?"":`${i1(hh([e]))} `)+Sk(e)}function i1(e){return`"${e}"‎`}function TR(e){if(e.length>=4&&e[2]==Ix&&e[3]==Ix)throw new Error(`invalid label extension: "${Ga(e.slice(0,4))}"`)}function _R(e){for(let n=e.lastIndexOf(95);n>0;)if(e[--n]!==95)throw new Error("underscore allowed only at start")}function RR(e){let t=e[0],n=Ax.get(t);if(n)throw fc(`leading ${n}`);let r=e.length,o=-1;for(let i=1;i<r;i++){t=e[i];let l=Ax.get(t);if(l){if(o==i)throw fc(`${n} + ${l}`);o=i+1,n=l}}if(o==r)throw fc(`trailing ${n}`)}function hh(e,t=1/0,n=Sk){let r=[];MR(e[0])&&r.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let o=0,i=e.length;for(let l=0;l<i;l++){let c=e[l];Lk(c)&&(r.push(Ga(e.slice(o,l))),r.push(n(c)),o=l+1)}return r.push(Ga(e.slice(o,i))),r.join("")}function MR(e,t){return o1(),Xs.has(e)}function Lk(e){return o1(),Fk.has(e)}function OR(e){return UR(FR(e,PR,WR))}function FR(e,t,n){if(!e)return[];o1();let r=0;return e.split(_k).map(o=>{let i=wR(o),l={input:i,offset:r};r+=i.length+1;try{let c=l.tokens=zR(i,t,n),d=c.length,f;if(!d)throw new Error("empty label");let p=l.output=c.flat();if(_R(p),!(l.emoji=d>1||c[0].is_emoji)&&p.every(g=>g<128))TR(p),f="ASCII";else{let g=c.flatMap(v=>v.is_emoji?[]:v);if(!g.length)f="Emoji";else{if(Xs.has(p[0]))throw fc("leading combining mark");for(let b=1;b<d;b++){let C=c[b];if(!C.is_emoji&&Xs.has(C[0]))throw fc(`emoji + combining mark: "${Ga(c[b-1])} + ${hh([C[0]])}"`)}RR(p);let v=Pf(new Set(g)),[w]=DR(v);$R(w,g),LR(w,v),f=w.N}}l.type=f}catch(c){l.error=c}return l})}function LR(e,t){let n,r=[];for(let o of t){let i=pa.get(o);if(i===Mk)return;if(i){let l=i.M.get(o);if(n=n?n.filter(c=>l.has(c)):Pf(l),!n.length)return}else r.push(o)}if(n){for(let o of n)if(r.every(i=>Hc(o,i)))throw new Error(`whole-script confusable: ${e.N}/${o.N}`)}}function DR(e){let t=Ca;for(let n of e){let r=t.filter(o=>Hc(o,n));if(!r.length)throw Ca.some(o=>Hc(o,n))?Uk(t[0],n):Dk(n);if(t=r,r.length==1)break}return t}function UR(e){return e.map(({input:t,error:n,output:r})=>{if(n){let o=n.message;throw new Error(e.length==1?o:`Invalid label ${i1(hh(t,63))}: ${o}`)}return Ga(r)}).join(_k)}function Dk(e){return new Error(`disallowed character: ${s1(e)}`)}function Uk(e,t){let n=s1(t),r=Ca.find(o=>o.P.has(t));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function fc(e){return new Error(`illegal placement: ${e}`)}function $R(e,t){for(let n of t)if(!Hc(e,n))throw Uk(e,n);if(e.M){let n=Tk(t);for(let r=1,o=n.length;r<o;r++)if(Bg.has(n[r])){let i=r+1;for(let l;i<o&&Bg.has(l=n[i]);i++)for(let c=r;c<i;c++)if(n[c]==l)throw new Error(`duplicate non-spacing marks: ${s1(l)}`);if(i-r>Sx)throw new Error(`excessive non-spacing marks: ${i1(hh(n.slice(r-1,i)))} (${i-r}/${Sx})`);r=i}}}function zR(e,t,n){let r=[],o=[];for(e=e.slice().reverse();e.length;){let i=qR(e);if(i)o.length&&(r.push(t(o)),o=[]),r.push(n(i));else{let l=e.pop();if(Gs.has(l))o.push(l);else{let c=Pg.get(l);if(c)o.push(...c);else if(!Ok.has(l))throw Dk(l)}}}return o.length&&r.push(t(o)),r}function WR(e){return e.filter(t=>t!=Rk)}function qR(e,t){let n=Tg,r,o=e.length;for(;o&&(n=n.get(e[--o]),!!n);){let{V:i}=n;i&&(r=i,e.length=o)}return r}function HR(e){return OR(e)}function VR(e){return HR(e)}const a1=W3({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});var l1=n5(),Xt=function(){return Xt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Xt.apply(this,arguments)};function c1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function $k(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var hc="right-scroll-bar-position",pc="width-before-scroll-bar",QR="with-scroll-bars-hidden",GR="--removed-body-scroll-bar-size";function Y0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function KR(e,t){var n=B.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var YR=typeof window<"u"?B.useLayoutEffect:B.useEffect,Px=new WeakMap;function u1(e,t){var n=KR(null,function(r){return e.forEach(function(o){return Y0(o,r)})});return YR(function(){var r=Px.get(n);if(r){var o=new Set(r),i=new Set(e),l=n.current;o.forEach(function(c){i.has(c)||Y0(c,null)}),i.forEach(function(c){o.has(c)||Y0(c,l)})}Px.set(n,e)},[e]),n}function zk(e){return e}function Wk(e,t){t===void 0&&(t=zk);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(i),l=n}var d=function(){var p=l;l=[],p.forEach(i)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){l.push(p),f()},filter:function(p){return l=l.filter(p),n}}}};return o}function d1(e,t){return t===void 0&&(t=zk),Wk(e,t)}function f1(e){e===void 0&&(e={});var t=Wk(null);return t.options=Xt({async:!0,ssr:!1},e),t}var qk=function(e){var t=e.sideCar,n=c1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return B.createElement(r,Xt({},n))};qk.isSideCarExport=!0;function Hk(e,t){return e.useMedium(t),qk}var Vk=f1(),J0=function(){},ph=B.forwardRef(function(e,t){var n=B.useRef(null),r=B.useState({onScrollCapture:J0,onWheelCapture:J0,onTouchMoveCapture:J0}),o=r[0],i=r[1],l=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,m=e.shards,g=e.sideCar,v=e.noIsolation,w=e.inert,b=e.allowPinchZoom,C=e.as,S=C===void 0?"div":C,I=e.gapMode,A=c1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=g,N=u1([n,t]),_=Xt(Xt({},A),o);return B.createElement(B.Fragment,null,p&&B.createElement(j,{sideCar:Vk,removeScrollBar:f,shards:m,noIsolation:v,inert:w,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:I}),l?B.cloneElement(B.Children.only(c),Xt(Xt({},_),{ref:N})):B.createElement(S,Xt({},_,{className:d,ref:N}),c))});ph.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ph.classNames={fullWidth:pc,zeroRight:hc};var JR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=JR();return t&&e.setAttribute("nonce",t),e}function XR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var tM=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ZR())&&(XR(t,n),eM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nM=function(){var e=tM();return function(t,n){B.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},h1=function(){var e=nM(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},rM={left:0,top:0,right:0,gap:0},Z0=function(e){return parseInt(e||"",10)||0},oM=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Z0(n),Z0(r),Z0(o)]},sM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rM;var t=oM(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iM=h1(),ka="data-scroll-locked",aM=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
1671
+ .`.concat(QR,` {
1672
+ overflow: hidden `).concat(r,`;
1673
+ padding-right: `).concat(c,"px ").concat(r,`;
1674
+ }
1675
+ body[`).concat(ka,`] {
1676
+ overflow: hidden `).concat(r,`;
1677
+ overscroll-behavior: contain;
1678
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
1679
+ padding-left: `.concat(o,`px;
1680
+ padding-top: `).concat(i,`px;
1681
+ padding-right: `).concat(l,`px;
1682
+ margin-left:0;
1683
+ margin-top:0;
1684
+ margin-right: `).concat(c,"px ").concat(r,`;
1685
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
1686
+ }
1687
+
1688
+ .`).concat(hc,` {
1689
+ right: `).concat(c,"px ").concat(r,`;
1690
+ }
1691
+
1692
+ .`).concat(pc,` {
1693
+ margin-right: `).concat(c,"px ").concat(r,`;
1694
+ }
1695
+
1696
+ .`).concat(hc," .").concat(hc,` {
1697
+ right: 0 `).concat(r,`;
1698
+ }
1699
+
1700
+ .`).concat(pc," .").concat(pc,` {
1701
+ margin-right: 0 `).concat(r,`;
1702
+ }
1703
+
1704
+ body[`).concat(ka,`] {
1705
+ `).concat(GR,": ").concat(c,`px;
1706
+ }
1707
+ `)},Bx=function(){var e=parseInt(document.body.getAttribute(ka)||"0",10);return isFinite(e)?e:0},lM=function(){B.useEffect(function(){return document.body.setAttribute(ka,(Bx()+1).toString()),function(){var e=Bx()-1;e<=0?document.body.removeAttribute(ka):document.body.setAttribute(ka,e.toString())}},[])},Qk=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;lM();var i=B.useMemo(function(){return sM(o)},[o]);return B.createElement(iM,{styles:aM(i,!t,o,n?"":"!important")})},_g=!1;if(typeof window<"u")try{var Jd=Object.defineProperty({},"passive",{get:function(){return _g=!0,!0}});window.addEventListener("test",Jd,Jd),window.removeEventListener("test",Jd,Jd)}catch{_g=!1}var sa=_g?{passive:!1}:!1,cM=function(e){return e.tagName==="TEXTAREA"},Gk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cM(e)&&n[t]==="visible")},uM=function(e){return Gk(e,"overflowY")},dM=function(e){return Gk(e,"overflowX")},Tx=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Kk(e,r);if(o){var i=Yk(e,r),l=i[1],c=i[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fM=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hM=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Kk=function(e,t){return e==="v"?uM(t):dM(t)},Yk=function(e,t){return e==="v"?fM(t):hM(t)},pM=function(e,t){return e==="h"&&t==="rtl"?-1:1},mM=function(e,t,n,r,o){var i=pM(e,window.getComputedStyle(t).direction),l=i*r,c=n.target,d=t.contains(c),f=!1,p=l>0,m=0,g=0;do{var v=Yk(e,c),w=v[0],b=v[1],C=v[2],S=b-C-i*w;(w||S)&&Kk(e,c)&&(m+=S,g+=w),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(p&&Math.abs(m)<1||!p&&Math.abs(g)<1)&&(f=!0),f},Zd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_x=function(e){return[e.deltaX,e.deltaY]},Rx=function(e){return e&&"current"in e?e.current:e},gM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yM=function(e){return`
1708
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
1709
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
1710
+ `)},vM=0,ia=[];function wM(e){var t=B.useRef([]),n=B.useRef([0,0]),r=B.useRef(),o=B.useState(vM++)[0],i=B.useState(h1)[0],l=B.useRef(e);B.useEffect(function(){l.current=e},[e]),B.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=$k([e.lockRef.current],(e.shards||[]).map(Rx),!0).filter(Boolean);return b.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=B.useCallback(function(b,C){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!l.current.allowPinchZoom;var S=Zd(b),I=n.current,A="deltaX"in b?b.deltaX:I[0]-S[0],j="deltaY"in b?b.deltaY:I[1]-S[1],N,_=b.target,P=Math.abs(A)>Math.abs(j)?"h":"v";if("touches"in b&&P==="h"&&_.type==="range")return!1;var R=Tx(P,_);if(!R)return!0;if(R?N=P:(N=P==="v"?"h":"v",R=Tx(P,_)),!R)return!1;if(!r.current&&"changedTouches"in b&&(A||j)&&(r.current=N),!N)return!0;var M=r.current||N;return mM(M,C,b,M==="h"?A:j)},[]),d=B.useCallback(function(b){var C=b;if(!(!ia.length||ia[ia.length-1]!==i)){var S="deltaY"in C?_x(C):Zd(C),I=t.current.filter(function(N){return N.name===C.type&&(N.target===C.target||C.target===N.shadowParent)&&gM(N.delta,S)})[0];if(I&&I.should){C.cancelable&&C.preventDefault();return}if(!I){var A=(l.current.shards||[]).map(Rx).filter(Boolean).filter(function(N){return N.contains(C.target)}),j=A.length>0?c(C,A[0]):!l.current.noIsolation;j&&C.cancelable&&C.preventDefault()}}},[]),f=B.useCallback(function(b,C,S,I){var A={name:b,delta:C,target:S,should:I,shadowParent:bM(S)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(j){return j!==A})},1)},[]),p=B.useCallback(function(b){n.current=Zd(b),r.current=void 0},[]),m=B.useCallback(function(b){f(b.type,_x(b),b.target,c(b,e.lockRef.current))},[]),g=B.useCallback(function(b){f(b.type,Zd(b),b.target,c(b,e.lockRef.current))},[]);B.useEffect(function(){return ia.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",d,sa),document.addEventListener("touchmove",d,sa),document.addEventListener("touchstart",p,sa),function(){ia=ia.filter(function(b){return b!==i}),document.removeEventListener("wheel",d,sa),document.removeEventListener("touchmove",d,sa),document.removeEventListener("touchstart",p,sa)}},[]);var v=e.removeScrollBar,w=e.inert;return B.createElement(B.Fragment,null,w?B.createElement(i,{styles:yM(o)}):null,v?B.createElement(Qk,{gapMode:e.gapMode}):null)}function bM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xM=Hk(Vk,wM);var Jk=B.forwardRef(function(e,t){return B.createElement(ph,Xt({},e,{ref:t,sideCar:xM}))});Jk.classNames=ph.classNames;function Mx(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function CM(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function Zk(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r={};for(var o in e){var i=e[o],l=[...n,o];typeof i=="string"||typeof i=="number"||i==null?r[o]=t(i,l):typeof i=="object"&&!Array.isArray(i)?r[o]=Zk(i,t,l):console.warn('Skipping invalid key "'.concat(l.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return r}function Ox(e,t){var n={};if(typeof t=="object"){var r=e;Zk(t,(c,d)=>{if(c!=null){var f=CM(r,d);n[Mx(f)]=String(c)}})}else{var o=e;for(var i in o){var l=o[i];l!=null&&(n[Mx(i)]=l)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(d=>"".concat(d,":").concat(this[d])).join(";")},writable:!1}),n}var ac={exports:{}},kM=ac.exports,Fx;function EM(){return Fx||(Fx=1,(function(e,t){(function(n,r){var o="1.0.41",i="",l="?",c="function",d="undefined",f="object",p="string",m="major",g="model",v="name",w="type",b="vendor",C="version",S="architecture",I="console",A="mobile",j="tablet",N="smarttv",_="wearable",P="embedded",R=500,M="Amazon",Q="Apple",V="ASUS",H="BlackBerry",L="Browser",z="Chrome",O="Edge",K="Firefox",J="Google",F="Honor",Z="Huawei",Y="Lenovo",U="LG",ee="Microsoft",he="Motorola",se="Nvidia",ie="OnePlus",re="Opera",ue="OPPO",Se="Samsung",Pe="Sharp",Oe="Sony",pt="Xiaomi",It="Zebra",mt="Facebook",Wt="Chromium OS",rn="Mac OS",rt=" Browser",on=function(Re,We){var _e={};for(var Ge in Re)We[Ge]&&We[Ge].length%2===0?_e[Ge]=We[Ge].concat(Re[Ge]):_e[Ge]=Re[Ge];return _e},Mt=function(Re){for(var We={},_e=0;_e<Re.length;_e++)We[Re[_e].toUpperCase()]=Re[_e];return We},Ot=function(Re,We){return typeof Re===p?ye(We).indexOf(ye(Re))!==-1:!1},ye=function(Re){return Re.toLowerCase()},Je=function(Re){return typeof Re===p?Re.replace(/[^\d\.]/g,i).split(".")[0]:r},Ir=function(Re,We){if(typeof Re===p)return Re=Re.replace(/^\s\s*/,i),typeof We===d?Re:Re.substring(0,R)},Bo=function(Re,We){for(var _e=0,Ge,fr,mn,ze,Be,gn;_e<We.length&&!Be;){var Ps=We[_e],Jr=We[_e+1];for(Ge=fr=0;Ge<Ps.length&&!Be&&Ps[Ge];)if(Be=Ps[Ge++].exec(Re),Be)for(mn=0;mn<Jr.length;mn++)gn=Be[++fr],ze=Jr[mn],typeof ze===f&&ze.length>0?ze.length===2?typeof ze[1]==c?this[ze[0]]=ze[1].call(this,gn):this[ze[0]]=ze[1]:ze.length===3?typeof ze[1]===c&&!(ze[1].exec&&ze[1].test)?this[ze[0]]=gn?ze[1].call(this,gn,ze[2]):r:this[ze[0]]=gn?gn.replace(ze[1],ze[2]):r:ze.length===4&&(this[ze[0]]=gn?ze[3].call(this,gn.replace(ze[1],ze[2])):r):this[ze]=gn||r;_e+=2}},To=function(Re,We){for(var _e in We)if(typeof We[_e]===f&&We[_e].length>0){for(var Ge=0;Ge<We[_e].length;Ge++)if(Ot(We[_e][Ge],Re))return _e===l?r:_e}else if(Ot(We[_e],Re))return _e===l?r:_e;return We.hasOwnProperty("*")?We["*"]:Re},Nu={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},pl={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Bi={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[C,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[C,[v,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[v,C],[/opios[\/ ]+([\w\.]+)/i],[C,[v,re+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[C,[v,re+" GX"]],[/\bopr\/([\w\.]+)/i],[C,[v,re]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[C,[v,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[C,[v,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[v,C],[/quark(?:pc)?\/([-\w\.]+)/i],[C,[v,"Quark"]],[/\bddg\/([\w\.]+)/i],[C,[v,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[C,[v,"UC"+L]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[C,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[C,[v,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[C,[v,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[C,[v,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[C,[v,"Smart Lenovo "+L]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure "+L],C],[/\bfocus\/([\w\.]+)/i],[C,[v,K+" Focus"]],[/\bopt\/([\w\.]+)/i],[C,[v,re+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[C,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[C,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[C,[v,re+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[C,[v,"MIUI"+rt]],[/fxios\/([\w\.-]+)/i],[C,[v,K]],[/\bqihoobrowser\/?([\w\.]*)/i],[C,[v,"360"]],[/\b(qq)\/([\w\.]+)/i],[[v,/(.+)/,"$1Browser"],C],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1"+rt],C],[/samsungbrowser\/([\w\.]+)/i],[C,[v,Se+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[C,[v,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[v,"Sogou Mobile"],C],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[v,C],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[v],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[C,v],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[v,mt],C],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[v,C],[/\bgsa\/([\w\.]+) .*safari\//i],[C,[v,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[C,[v,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[C,[v,z+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[v,z+" WebView"],C],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[C,[v,"Android "+L]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[v,C],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[C,[v,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[C,v],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[v,[C,To,Nu]],[/(webkit|khtml)\/([\w\.]+)/i],[v,C],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[v,"Netscape"],C],[/(wolvic|librewolf)\/([\w\.]+)/i],[v,C],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[C,[v,K+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[v,[C,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[v,[C,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[S,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[S,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[S,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[S,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[S,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[S,/ower/,i,ye]],[/ sun4\w[;\)]/i],[[S,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[S,ye]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[b,Se],[w,j]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[g,[b,Se],[w,A]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[b,Q],[w,A]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[b,Q],[w,j]],[/(macintosh);/i],[g,[b,Q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[b,Pe],[w,A]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[g,[b,F],[w,j]],[/honor([-\w ]+)[;\)]/i],[g,[b,F],[w,A]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[g,[b,Z],[w,j]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[b,Z],[w,A]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[g,/_/g," "],[b,pt],[w,j]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[g,/_/g," "],[b,pt],[w,A]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[b,ue],[w,A]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[g,[b,To,{OnePlus:["304","403","203"],"*":ue}],[w,j]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[b,"Vivo"],[w,A]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[b,"Realme"],[w,A]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[b,he],[w,A]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[b,he],[w,j]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[b,U],[w,j]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[b,U],[w,A]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[g,[b,Y],[w,j]],[/(nokia) (t[12][01])/i],[b,g,[w,j]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[g,/_/g," "],[w,A],[b,"Nokia"]],[/(pixel (c|tablet))\b/i],[g,[b,J],[w,j]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[b,J],[w,A]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[b,Oe],[w,A]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[b,Oe],[w,j]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[b,ie],[w,A]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[b,M],[w,j]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[b,M],[w,A]],[/(playbook);[-\w\),; ]+(rim)/i],[g,b,[w,j]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[b,H],[w,A]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[b,V],[w,j]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[b,V],[w,A]],[/(nexus 9)/i],[g,[b,"HTC"],[w,j]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[g,/_/g," "],[w,A]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[g,[b,"TCL"],[w,j]],[/(itel) ((\w+))/i],[[b,ye],g,[w,To,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[b,"Acer"],[w,j]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[b,"Meizu"],[w,A]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[b,"Ulefone"],[w,A]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[b,"Energizer"],[w,A]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[b,"Cat"],[w,A]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[b,"Smartfren"],[w,A]],[/droid.+; (a(?:015|06[35]|142p?))/i],[g,[b,"Nothing"],[w,A]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[g,[b,"Archos"],[w,j]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[g,[b,"Archos"],[w,A]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[b,g,[w,j]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[b,g,[w,A]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[b,g,[w,j]],[/(surface duo)/i],[g,[b,ee],[w,j]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[b,"Fairphone"],[w,A]],[/(u304aa)/i],[g,[b,"AT&T"],[w,A]],[/\bsie-(\w*)/i],[g,[b,"Siemens"],[w,A]],[/\b(rct\w+) b/i],[g,[b,"RCA"],[w,j]],[/\b(venue[\d ]{2,7}) b/i],[g,[b,"Dell"],[w,j]],[/\b(q(?:mv|ta)\w+) b/i],[g,[b,"Verizon"],[w,j]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[b,"Barnes & Noble"],[w,j]],[/\b(tm\d{3}\w+) b/i],[g,[b,"NuVision"],[w,j]],[/\b(k88) b/i],[g,[b,"ZTE"],[w,j]],[/\b(nx\d{3}j) b/i],[g,[b,"ZTE"],[w,A]],[/\b(gen\d{3}) b.+49h/i],[g,[b,"Swiss"],[w,A]],[/\b(zur\d{3}) b/i],[g,[b,"Swiss"],[w,j]],[/\b((zeki)?tb.*\b) b/i],[g,[b,"Zeki"],[w,j]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],g,[w,j]],[/\b(ns-?\w{0,9}) b/i],[g,[b,"Insignia"],[w,j]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[b,"NextBook"],[w,j]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[b,"Voice"],g,[w,A]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],g,[w,A]],[/\b(ph-1) /i],[g,[b,"Essential"],[w,A]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[g,[b,"Envizen"],[w,j]],[/\b(trio[-\w\. ]+) b/i],[g,[b,"MachSpeed"],[w,j]],[/\btu_(1491) b/i],[g,[b,"Rotor"],[w,j]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[g,[b,se],[w,j]],[/(sprint) (\w+)/i],[b,g,[w,A]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[b,ee],[w,A]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[b,It],[w,j]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[b,It],[w,A]],[/smart-tv.+(samsung)/i],[b,[w,N]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[b,Se],[w,N]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,U],[w,N]],[/(apple) ?tv/i],[b,[g,Q+" TV"],[w,N]],[/crkey/i],[[g,z+"cast"],[b,J],[w,N]],[/droid.+aft(\w+)( bui|\))/i],[g,[b,M],[w,N]],[/(shield \w+ tv)/i],[g,[b,se],[w,N]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[b,Pe],[w,N]],[/(bravia[\w ]+)( bui|\))/i],[g,[b,Oe],[w,N]],[/(mi(tv|box)-?\w+) bui/i],[g,[b,pt],[w,N]],[/Hbbtv.*(technisat) (.*);/i],[b,g,[w,N]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,Ir],[g,Ir],[w,N]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[g,[w,N]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[w,N]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,g,[w,I]],[/droid.+; (shield)( bui|\))/i],[g,[b,se],[w,I]],[/(playstation \w+)/i],[g,[b,Oe],[w,I]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[b,ee],[w,I]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[g,[b,Se],[w,_]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[b,g,[w,_]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[g,[b,ue],[w,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[b,Q],[w,_]],[/(opwwe\d{3})/i],[g,[b,ie],[w,_]],[/(moto 360)/i],[g,[b,he],[w,_]],[/(smartwatch 3)/i],[g,[b,Oe],[w,_]],[/(g watch r)/i],[g,[b,U],[w,_]],[/droid.+; (wt63?0{2,3})\)/i],[g,[b,It],[w,_]],[/droid.+; (glass) \d/i],[g,[b,J],[w,_]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,g,[w,_]],[/; (quest( \d| pro)?)/i],[g,[b,mt],[w,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[w,P]],[/(aeobc)\b/i],[g,[b,M],[w,P]],[/(homepod).+mac os/i],[g,[b,Q],[w,P]],[/windows iot/i],[[w,P]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[g,[w,A]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[w,j]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[w,j]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[w,A]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[g,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[C,[v,O+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[v,C],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[v,C],[/ladybird\//i],[[v,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[C,v]],os:[[/microsoft (windows) (vista|xp)/i],[v,C],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[v,[C,To,pl]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[C,To,pl],[v,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[C,/_/g,"."],[v,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[v,rn],[C,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[C,v],[/(ubuntu) ([\w\.]+) like android/i],[[v,/(.+)/,"$1 Touch"],C],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[v,C],[/\(bb(10);/i],[C,[v,H]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[C,[v,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[C,[v,K+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[C,[v,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[C,[v,"watchOS"]],[/crkey\/([\d\.]+)/i],[C,[v,z+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[v,Wt],C],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[v,C],[/(sunos) ?([\w\.\d]*)/i],[[v,"Solaris"],C],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[v,C]]},qt=function(Re,We){if(typeof Re===f&&(We=Re,Re=r),!(this instanceof qt))return new qt(Re,We).getResult();var _e=typeof n!==d&&n.navigator?n.navigator:r,Ge=Re||(_e&&_e.userAgent?_e.userAgent:i),fr=_e&&_e.userAgentData?_e.userAgentData:r,mn=We?on(Bi,We):Bi,ze=_e&&_e.userAgent==Ge;return this.getBrowser=function(){var Be={};return Be[v]=r,Be[C]=r,Bo.call(Be,Ge,mn.browser),Be[m]=Je(Be[C]),ze&&_e&&_e.brave&&typeof _e.brave.isBrave==c&&(Be[v]="Brave"),Be},this.getCPU=function(){var Be={};return Be[S]=r,Bo.call(Be,Ge,mn.cpu),Be},this.getDevice=function(){var Be={};return Be[b]=r,Be[g]=r,Be[w]=r,Bo.call(Be,Ge,mn.device),ze&&!Be[w]&&fr&&fr.mobile&&(Be[w]=A),ze&&Be[g]=="Macintosh"&&_e&&typeof _e.standalone!==d&&_e.maxTouchPoints&&_e.maxTouchPoints>2&&(Be[g]="iPad",Be[w]=j),Be},this.getEngine=function(){var Be={};return Be[v]=r,Be[C]=r,Bo.call(Be,Ge,mn.engine),Be},this.getOS=function(){var Be={};return Be[v]=r,Be[C]=r,Bo.call(Be,Ge,mn.os),ze&&!Be[v]&&fr&&fr.platform&&fr.platform!="Unknown"&&(Be[v]=fr.platform.replace(/chrome os/i,Wt).replace(/macos/i,rn)),Be},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ge},this.setUA=function(Be){return Ge=typeof Be===p&&Be.length>R?Ir(Be,R):Be,this},this.setUA(Ge),this};qt.VERSION=o,qt.BROWSER=Mt([v,C,m]),qt.CPU=Mt([S]),qt.DEVICE=Mt([g,b,w,I,A,N,j,_,P]),qt.ENGINE=qt.OS=Mt([v,C]),e.exports&&(t=e.exports=qt),t.UAParser=qt;var Yr=typeof n!==d&&(n.jQuery||n.Zepto);if(Yr&&!Yr.ua){var Nr=new qt;Yr.ua=Nr.getResult(),Yr.ua.get=function(){return Nr.getUA()},Yr.ua.set=function(Re){Nr.setUA(Re);var We=Nr.getResult();for(var _e in We)Yr.ua[_e]=We[_e]}}})(typeof window=="object"?window:kM)})(ac,ac.exports)),ac.exports}var AM=EM();/*!
1711
+ Copyright (c) 2023 Paul Miller (paulmillr.com)
1712
+ The library paulmillr-qr is dual-licensed under the Apache 2.0 OR MIT license.
1713
+ You can select a license of your choice.
1714
+ Licensed under the Apache License, Version 2.0 (the "License");
1715
+ you may not use this file except in compliance with the License.
1716
+ You may obtain a copy of the License at
1717
+
1718
+ http://www.apache.org/licenses/LICENSE-2.0
1719
+
1720
+ Unless required by applicable law or agreed to in writing, software
1721
+ distributed under the License is distributed on an "AS IS" BASIS,
1722
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1723
+ See the License for the specific language governing permissions and
1724
+ limitations under the License.
1725
+ */const nc={newline:10,reset:27};function SM(e){if(!Number.isSafeInteger(e))throw new Error(`integer expected: ${e}`)}function jM(e){if(!Number.isSafeInteger(e)||e<1||e>40)throw new Error(`Invalid version=${e}. Expected number [1..40]`)}function qs(e,t){return e.toString(2).padStart(t,"0")}function Lx(e,t){const n=e%t;return n>=0?n:t+n}function Or(e,t){return new Array(e).fill(t)}function X0(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}function Dx(e){let t=0,n=0;for(const i of e)t=Math.max(t,i.length),n+=i.length;const r=new Uint8Array(n);let o=0;for(let i=0;i<t;i++)for(const l of e)i<l.length&&(r[o++]=l[i]);return r}function IM(){let e,t=1/0;return{add(n,r){n>=t||(e=r,t=n)},get:()=>e,score:()=>t}}function Ux(e){return{has:t=>e.includes(t),decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})},encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(SM(n),n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})}}}function $x(e){if(e.length!==32)throw new Error("expects 32 element matrix");const t=[1431655765,858993459,252645135,16711935,65535];for(let n=0;n<5;n++){const r=t[n]>>>0,o=1<<n,i=o<<1;for(let l=0;l<32;l+=i)for(let c=0;c<o;c++){const d=l+c,f=d+o,p=e[d]>>>0,m=e[f]>>>0,g=(p>>>o^m)&r;e[d]=(p^g<<o)>>>0,e[f]=(m^g)>>>0}}}const rc=e=>1<<(e&31)>>>0,Hs=(e,t)=>t===0?0:t===32?4294967295:(1<<t)-1<<e>>>0;class cn{constructor(t,n){er(this,"defined");er(this,"value");er(this,"tailMask");er(this,"words");er(this,"fullWords");er(this,"height");er(this,"width");const{height:r,width:o}=cn.size(t);if(this.height=r,this.width=o,this.tailMask=Hs(0,o&31||32),this.words=Math.ceil(o/32)|0,this.fullWords=Math.floor(o/32)|0,this.value=new Uint32Array(this.words*r),this.defined=new Uint32Array(this.value.length),n){if(n.length!==r)throw new Error(`Bitmap: data height mismatch: exp=${r} got=${n.length}`);for(let i=0;i<r;i++){const l=n[i];if(!l||l.length!==o)throw new Error(`Bitmap: data width mismatch at y=${i}: exp=${o} got=${l==null?void 0:l.length}`);for(let c=0;c<o;c++)this.set(c,i,l[c])}}}static size(t,n){if(typeof t=="number"&&(t={height:t,width:t}),!Number.isSafeInteger(t.height)&&t.height!==1/0)throw new Error(`Bitmap: invalid height=${t.height} (${typeof t.height})`);if(!Number.isSafeInteger(t.width)&&t.width!==1/0)throw new Error(`Bitmap: invalid width=${t.width} (${typeof t.width})`);return n!==void 0&&(t={width:Math.min(t.width,n.width),height:Math.min(t.height,n.height)}),t}static fromString(t){t=t.replace(/^\n+/g,"").replace(/\n+$/g,"");const n=t.split(String.fromCharCode(nc.newline)),r=n.length;let o;const i=[];for(const l of n){const c=l.split("").map(d=>{if(d==="X")return!0;if(d===" ")return!1;if(d!=="?")throw new Error(`Bitmap.fromString: unknown symbol=${d}`)});if(o!==void 0&&c.length!==o)throw new Error(`Bitmap.fromString different row sizes: width=${o} cur=${c.length}`);o=c.length,i.push(c)}return o===void 0&&(o=0),new cn({height:r,width:o},i)}point(t){return this.get(t.x,t.y)}isInside(t){return 0<=t.x&&t.x<this.width&&0<=t.y&&t.y<this.height}size(t){if(!t)return{height:this.height,width:this.width};const{x:n,y:r}=this.xy(t);return{height:this.height-r,width:this.width-n}}xy(t){if(typeof t=="number"&&(t={x:t,y:t}),!Number.isSafeInteger(t.x))throw new Error(`Bitmap: invalid x=${t.x}`);if(!Number.isSafeInteger(t.y))throw new Error(`Bitmap: invalid y=${t.y}`);return t.x=Lx(t.x,this.width),t.y=Lx(t.y,this.height),t}wordIndex(t,n){return n*this.words+(t>>>5)}bitIndex(t,n){return{word:this.wordIndex(t,n),bit:t&31}}isDefined(t,n){const r=this.wordIndex(t,n),o=rc(t);return(this.defined[r]&o)!==0}get(t,n){const r=this.wordIndex(t,n),o=rc(t);return(this.value[r]&o)!==0}maskWord(t,n,r){const{defined:o,value:i}=this;o[t]|=n,i[t]=i[t]&~n|-r&n}set(t,n,r){r!==void 0&&this.maskWord(this.wordIndex(t,n),rc(t),r)}fillRectConst(t,n,r,o,i){if(r<=0||o<=0||i===void 0)return;const{value:l,defined:c,words:d}=this,f=t>>>5,p=t+r-1>>>5,m=t&31,g=t+r-1&31;for(let v=0;v<o;v++){const w=(n+v)*d;if(f===p){const b=Hs(m,g-m+1);this.maskWord(w+f,b,i);continue}this.maskWord(w+f,Hs(m,32-m),i);for(let b=f+1;b<p;b++)c[w+b]=4294967295,l[w+b]=i?4294967295:0;this.maskWord(w+p,Hs(0,g+1),i)}}rectWords(t,n,r,o,i){for(let l=0;l<o;l++){const c=n+l;for(let d=0;d<r;){const f=t+d,{bit:p,word:m}=this.bitIndex(f,c),g=Math.min(32-p,r-d);i(m,f,d,l,g),d+=g}}}rect(t,n,r){const{x:o,y:i}=this.xy(t),{height:l,width:c}=cn.size(n,this.size({x:o,y:i}));if(typeof r!="function")return this.fillRectConst(o,i,c,l,r),this;const{defined:d,value:f}=this;return this.rectWords(o,i,c,l,(p,m,g,v,w)=>{let b=0,C=f[p];for(let S=0;S<w;S++){const I=rc(m+S),A=r({x:g+S,y:v},(C&I)!==0);A!==void 0&&(b|=I,C=C&~I|-A&I)}d[p]|=b,f[p]=C}),this}rectRead(t,n,r){const{x:o,y:i}=this.xy(t),{height:l,width:c}=cn.size(n,this.size({x:o,y:i})),{value:d}=this;return this.rectWords(o,i,c,l,(f,p,m,g,v)=>{const w=d[f];for(let b=0;b<v;b++){const C=rc(p+b);r({x:m+b,y:g},(w&C)!==0)}}),this}hLine(t,n,r){return this.rect(t,{width:n,height:1},r)}vLine(t,n,r){return this.rect(t,{width:1,height:n},r)}border(t=2,n){const r=this.height+2*t,o=this.width+2*t,i=new cn({height:r,width:o});return i.rect(0,1/0,n),i.embed({x:t,y:t},this),i}embed(t,n){const{x:r,y:o}=this.xy(t),{height:i,width:l}=cn.size(n.size(),this.size({x:r,y:o}));if(l<=0||i<=0)return this;const{value:c,defined:d}=this,{words:f,value:p}=n;for(let m=0;m<i;m++){const g=m*f;for(let v=0;v<l;){const w=r+v,{word:b,bit:C}=this.bitIndex(w,o+m),{word:S,bit:I}=n.bitIndex(v,m),A=Math.min(32-C,l-v),j=p[S],N=I&&S+1<g+f?p[S+1]:0,_=I?(j>>>I|N<<32-I)>>>0:j,P=Hs(C,A),R=(_&Hs(0,A))<<C>>>0;d[b]|=P,c[b]=c[b]&~P|R,v+=A}}return this}rectSlice(t,n=this.size()){const{x:r,y:o}=this.xy(t),{height:i,width:l}=cn.size(n,this.size({x:r,y:o})),c=new cn({height:i,width:l});return this.rectRead({x:r,y:o},{height:i,width:l},(d,f)=>{this.isDefined(r+d.x,o+d.y)&&c.set(d.x,d.y,f)}),c}transpose(){const{height:t,width:n,value:r,defined:o,words:i}=this,l=new cn({height:n,width:t}),{words:c,value:d,defined:f,tailMask:p}=l,m=new Uint32Array(32),g=new Uint32Array(32);for(let v=0;v<t;v+=32)for(let w=0;w<i;w++){const b=Math.min(32,t-v);for(let C=0;C<b;C++){const S=this.wordIndex(32*w,v+C);m[C]=r[S],g[C]=o[S]}m.fill(0,b),g.fill(0,b),$x(m),$x(g);for(let C=0;C<32;C++){const S=w*32+C;if(S>=n)break;const I=l.wordIndex(v,S),A=v>>>5===c-1?p:4294967295;d[I]=m[C]&A,f[I]=g[C]&A}}return l}negate(){const t=this.defined.length;for(let n=0;n<t;n++)this.value[n]=~this.value[n],this.defined[n]=4294967295;return this}scale(t){if(!Number.isSafeInteger(t)||t>1024)throw new Error(`invalid scale factor: ${t}`);const{height:n,width:r}=this;return new cn({height:t*n,width:t*r}).rect({x:0,y:0},1/0,({x:i,y:l})=>this.get(i/t|0,l/t|0))}clone(){const t=new cn(this.size());return t.defined.set(this.defined),t.value.set(this.value),t}assertDrawn(){const{height:t,width:n,defined:r,tailMask:o,fullWords:i,words:l}=this;if(!(!t||!n))for(let c=0;c<t;c++){const d=c*l;for(let f=0;f<i;f++)if(r[d+f]!==4294967295)throw new Error("Invalid color type=undefined");if(l!==i&&(r[d+i]&o)!==o)throw new Error("Invalid color type=undefined")}}countPatternInRow(t,n,...r){if(n<=0||n>=32)throw new Error("wrong patternLen");const o=(1<<n)-1,{width:i,value:l,words:c}=this;let d=0;const f=this.wordIndex(0,t);for(let p=0,m=0;p<c;p++){const g=l[f+p],v=p===c-1&&i&31||32;for(let w=0;w<v;w++)if(m=(m<<1|g>>>w&1)&o,!(p*32+w+1<n)){for(const b of r)if(m===b){d++;break}}}return d}getRuns(t,n){const{width:r,value:o,words:i}=this;if(r===0)return;let l=0,c;const d=this.wordIndex(0,t);for(let f=0;f<i;f++){const p=o[d+f],m=f===i-1&&r&31||32;for(let g=0;g<m;g++){const v=(p&1<<g)!==0;if(v===c){l++;continue}c!==void 0&&n(l,c),c=v,l=1}}c!==void 0&&n(l,c)}popcnt(){const{height:t,width:n,words:r,fullWords:o,tailMask:i}=this;if(!t||!n)return 0;let l=0;for(let c=0;c<t;c++){const d=c*r;for(let f=0;f<o;f++)l+=X0(this.value[d+f]);r!==o&&(l+=X0(this.value[d+o]&i))}return l}countBoxes2x2(t){const{width:n,words:r}=this;if(n<2||(t|0)<0||t+1>=this.height)return 0;const o=this.wordIndex(0,t)|0,i=this.wordIndex(0,t+1)|0,c=(n&31)===0?2147483647:Hs(0,n-1&31);let d=0;for(let f=0;f<r;f++){const p=this.value[o+f],m=this.value[i+f],g=~(p^m)>>>0,v=f+1<r?this.value[o+f+1]>>>0:0,w=~(p^(p>>>1|(v&1)<<31)>>>0)>>>0,b=f+1<r?this.value[i+f+1]>>>0:0,C=~(m^(m>>>1|(b&1)<<31)>>>0)>>>0;let S=(g&w&C)>>>0;f===r-1&&(S&=c),d+=X0(S)}return d}toString(){const t=String.fromCharCode(nc.newline);let n="";for(let r=0;r<this.height;r++){let o="";for(let i=0;i<this.width;i++){const l=this.get(i,r);o+=this.isDefined(i,r)?l?"X":" ":"?"}n+=o+(r+1===this.height?"":t)}return n}toRaw(){const t=Array.from({length:this.height},()=>new Array(this.width));for(let n=0;n<this.height;n++){const r=t[n];for(let o=0;o<this.width;o++)r[o]=this.get(o,n)}return t}toASCII(){const{height:t,width:n}=this;let r="";for(let o=0;o<t;o+=2){for(let i=0;i<n;i++){const l=this.get(i,o),c=o+1>=t?!0:this.get(i,o+1);!l&&!c?r+="█":!l&&c?r+="▀":l&&!c?r+="▄":l&&c&&(r+=" ")}r+=String.fromCharCode(nc.newline)}return r}toTerm(){const t=String.fromCharCode(nc.reset),n=t+"[0m",r=t+"[1;47m "+n,o=t+"[40m "+n,i=String.fromCharCode(nc.newline);let l="";for(let c=0;c<this.height;c++){for(let d=0;d<this.width;d++){const f=this.get(d,c);l+=f?o:r}l+=i}return l}toSVG(t=!0){let n=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,r="",o;return this.rectRead(0,1/0,(i,l)=>{if(!l)return;const{x:c,y:d}=i;if(!t){n+=`<rect x="${c}" y="${d}" width="1" height="1" />`;return}let f=`M${c} ${d}`;if(o){const m=`m${c-o.x} ${d-o.y}`;m.length<=f.length&&(f=m)}const p=c<10?`H${c}`:"h-1";r+=`${f}h1v1${p}Z`,o=i}),t&&(n+=`<path d="${r}"/>`),n+="</svg>",n}toGIF(){const t=c=>[c&255,c>>>8&255],n=[...t(this.width),...t(this.height)],r=[];this.rectRead(0,1/0,(c,d)=>r.push(+(d===!0)));const o=126,i=[71,73,70,56,55,97,...n,246,0,0,255,255,255,...Or(381,0),44,0,0,0,0,...n,0,7],l=Math.floor(r.length/o);for(let c=0;c<l;c++)i.push(o+1,128,...r.slice(o*c,o*(c+1)).map(d=>+d));return i.push(r.length%o+1,128,...r.slice(l*o).map(c=>+c)),i.push(1,129,0,59),new Uint8Array(i)}toImage(t=!1){const{height:n,width:r}=this.size(),o=new Uint8Array(n*r*(t?3:4));let i=0;for(let l=0;l<n;l++)for(let c=0;c<r;c++){const d=this.get(c,l)?0:255;o[i++]=d,o[i++]=d,o[i++]=d,t||(o[i++]=255)}return{height:n,width:r,data:o}}}const zx=["low","medium","quartile","high"],Wx=["numeric","alphanumeric","byte","kanji","eci"],NM=[26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],PM={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},BM={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},en={size:{encode:e=>21+4*(e-1),decode:e=>(e-17)/4},sizeType:e=>Math.floor((e+7)/17),alignmentPatterns(e){if(e===1)return[];const t=6,n=en.size.encode(e)-t-1,r=n-t,o=Math.ceil(r/28);let i=Math.floor(r/o);i%2?i+=1:r%o*2>=o&&(i+=2);const l=[t];for(let c=1;c<o;c++)l.push(n-(o-c)*i);return l.push(n),l},ECCode:{low:1,medium:0,quartile:3,high:2},formatMask:21522,formatBits(e,t){const n=en.ECCode[e]<<3|t;let r=n;for(let o=0;o<10;o++)r=r<<1^(r>>9)*1335;return(n<<10|r)^en.formatMask},versionBits(e){let t=e;for(let n=0;n<12;n++)t=t<<1^(t>>11)*7973;return e<<12|t},alphabet:{numeric:Ux("0123456789"),alphanumerc:Ux("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")},lengthBits(e,t){return{numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]}[t][en.sizeType(e)]},modeBits:{numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"},capacity(e,t){const n=NM[e-1],r=PM[t][e-1],o=BM[t][e-1],i=Math.floor(n/o)-r,l=o-n%o;return{words:r,numBlocks:o,shortBlocks:l,blockLen:i,capacity:(n-r*o)*8,total:(r+i)*o+o-l}}},p1=[(e,t)=>(e+t)%2==0,(e,t)=>t%2==0,(e,t)=>e%3==0,(e,t)=>(e+t)%3==0,(e,t)=>(Math.floor(t/2)+Math.floor(e/3))%2==0,(e,t)=>e*t%2+e*t%3==0,(e,t)=>(e*t%2+e*t%3)%2==0,(e,t)=>((e+t)%2+e*t%3)%2==0],we={tables:(e=>{const t=Or(256,0),n=Or(256,0);for(let r=0,o=1;r<256;r++)t[r]=o,n[o]=r,o<<=1,o&256&&(o^=e);return{exp:t,log:n}})(285),exp:e=>we.tables.exp[e],log(e){if(e===0)throw new Error(`GF.log: invalid arg=${e}`);return we.tables.log[e]%255},mul(e,t){return e===0||t===0?0:we.tables.exp[(we.tables.log[e]+we.tables.log[t])%255]},add:(e,t)=>e^t,pow:(e,t)=>we.tables.exp[we.tables.log[e]*t%255],inv(e){if(e===0)throw new Error(`GF.inverse: invalid arg=${e}`);return we.tables.exp[255-we.tables.log[e]]},polynomial(e){if(e.length==0)throw new Error("GF.polymomial: invalid length");if(e[0]!==0)return e;let t=0;for(;t<e.length-1&&e[t]==0;t++);return e.slice(t)},monomial(e,t){if(e<0)throw new Error(`GF.monomial: invalid degree=${e}`);if(t==0)return[0];let n=Or(e+1,0);return n[0]=t,we.polynomial(n)},degree:e=>e.length-1,coefficient:(e,t)=>e[we.degree(e)-t],mulPoly(e,t){if(e[0]===0||t[0]===0)return[0];const n=Or(e.length+t.length-1,0);for(let r=0;r<e.length;r++)for(let o=0;o<t.length;o++)n[r+o]=we.add(n[r+o],we.mul(e[r],t[o]));return we.polynomial(n)},mulPolyScalar(e,t){if(t==0)return[0];if(t==1)return e;const n=Or(e.length,0);for(let r=0;r<e.length;r++)n[r]=we.mul(e[r],t);return we.polynomial(n)},mulPolyMonomial(e,t,n){if(t<0)throw new Error("GF.mulPolyMonomial: invalid degree");if(n==0)return[0];const r=Or(e.length+t,0);for(let o=0;o<e.length;o++)r[o]=we.mul(e[o],n);return we.polynomial(r)},addPoly(e,t){if(e[0]===0)return t;if(t[0]===0)return e;let n=e,r=t;n.length>r.length&&([n,r]=[r,n]);let o=Or(r.length,0),i=r.length-n.length,l=r.slice(0,i);for(let c=0;c<l.length;c++)o[c]=l[c];for(let c=i;c<r.length;c++)o[c]=we.add(n[c-i],r[c]);return we.polynomial(o)},remainderPoly(e,t){const n=Array.from(e);for(let r=0;r<e.length-t.length+1;r++){const o=n[r];if(o!==0)for(let i=1;i<t.length;i++)t[i]!==0&&(n[r+i]=we.add(n[r+i],we.mul(t[i],o)))}return n.slice(e.length-t.length+1,n.length)},divisorPoly(e){let t=[1];for(let n=0;n<e;n++)t=we.mulPoly(t,[1,we.pow(2,n)]);return t},evalPoly(e,t){if(t==0)return we.coefficient(e,0);let n=e[0];for(let r=1;r<e.length;r++)n=we.add(we.mul(t,n),e[r]);return n},euclidian(e,t,n){we.degree(e)<we.degree(t)&&([e,t]=[t,e]);let r=e,o=t,i=[0],l=[1];for(;2*we.degree(o)>=n;){let f=r,p=i;if(r=o,i=l,r[0]===0)throw new Error("rLast[0] === 0");o=f;let m=[0];const g=we.inv(r[0]);for(;we.degree(o)>=we.degree(r)&&o[0]!==0;){const v=we.degree(o)-we.degree(r),w=we.mul(o[0],g);m=we.addPoly(m,we.monomial(v,w)),o=we.addPoly(o,we.mulPolyMonomial(r,v,w))}if(m=we.mulPoly(m,i),l=we.addPoly(m,p),we.degree(o)>=we.degree(r))throw new Error(`Division failed r: ${o}, rLast: ${r}`)}const c=we.coefficient(l,0);if(c==0)throw new Error("sigmaTilde(0) was zero");const d=we.inv(c);return[we.mulPolyScalar(l,d),we.mulPolyScalar(o,d)]}};function TM(e){return{encode(t){const n=we.divisorPoly(e),r=Array.from(t);return r.push(...n.slice(0,-1).fill(0)),Uint8Array.from(we.remainderPoly(r,n))},decode(t){const n=t.slice(),r=we.polynomial(Array.from(t));let o=Or(e,0),i=!1;for(let m=0;m<e;m++){const g=we.evalPoly(r,we.exp(m));o[o.length-1-m]=g,g!==0&&(i=!0)}if(!i)return n;o=we.polynomial(o);const l=we.monomial(e,1),[c,d]=we.euclidian(l,o,e),f=Or(we.degree(c),0);let p=0;for(let m=1;m<256&&p<f.length;m++)we.evalPoly(c,m)===0&&(f[p++]=we.inv(m));if(p!==f.length)throw new Error("RS.decode: invalid errors number");for(let m=0;m<f.length;m++){const g=n.length-1-we.log(f[m]);if(g<0)throw new Error("RS.decode: invalid error location");const v=we.inv(f[m]);let w=1;for(let b=0;b<f.length;b++)m!==b&&(w=we.mul(w,we.add(1,we.mul(f[b],v))));n[g]=we.add(n[g],we.mul(we.evalPoly(d,v),we.inv(w)))}return n}}}function _M(e,t){const{words:n,shortBlocks:r,numBlocks:o,blockLen:i,total:l}=en.capacity(e,t),c=TM(n);return{encode(d){const f=[],p=[];for(let w=0;w<o;w++){const b=w<r,C=i+(b?0:1);f.push(d.subarray(0,C)),p.push(c.encode(d.subarray(0,C))),d=d.subarray(C)}const m=Dx(f),g=Dx(p),v=new Uint8Array(m.length+g.length);return v.set(m),v.set(g,m.length),v},decode(d){if(d.length!==l)throw new Error(`interleave.decode: len(data)=${d.length}, total=${l}`);const f=[];for(let g=0;g<o;g++){const v=g<r;f.push(new Uint8Array(n+i+(v?0:1)))}let p=0;for(let g=0;g<i;g++)for(let v=0;v<o;v++)f[v][g]=d[p++];for(let g=r;g<o;g++)f[g][i]=d[p++];for(let g=i;g<i+n;g++)for(let v=0;v<o;v++){const w=v<r;f[v][g+(w?0:1)]=d[p++]}const m=[];for(const g of f)m.push(...Array.from(c.decode(g)).slice(0,-n));return Uint8Array.from(m)}}}function RM(e,t,n,r=!1){const o=en.size.encode(e);let i=new cn(o+2);const l=new cn(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);i=i.embed(0,l).embed({x:-l.width,y:0},l).embed({x:0,y:-l.height},l),i=i.rectSlice(1,o);const c=new cn(1).rect(0,1,!0).border(1,!1).border(1,!0),d=en.alignmentPatterns(e);for(const f of d)for(const p of d)i.isDefined(p,f)||i.embed({x:p-2,y:f-2},c);i=i.hLine({x:0,y:6},1/0,({x:f})=>i.isDefined(f,6)?void 0:f%2==0).vLine({x:6,y:0},1/0,({y:f})=>i.isDefined(6,f)?void 0:f%2==0);{const f=en.formatBits(t,n),p=m=>!r&&(f>>m&1)==1;for(let m=0;m<6;m++)i.set(8,m,p(m));for(let m=6;m<8;m++)i.set(8,m+1,p(m));for(let m=8;m<15;m++)i.set(8,o-15+m,p(m));for(let m=0;m<8;m++)i.set(o-m-1,8,p(m));for(let m=8;m<9;m++)i.set(15-m-1+1,8,p(m));for(let m=9;m<15;m++)i.set(15-m-1,8,p(m));i.set(8,o-8,!r)}if(e>=7){const f=en.versionBits(e);for(let p=0;p<18;p+=1){const m=!r&&(f>>p&1)==1,g=Math.floor(p/3),v=p%3+o-8-3;i.set(v,g,m),i.set(g,v,m)}}return i}function MM(e,t,n){const r=e.height,o=p1[t];let i=-1,l=r-1;for(let c=r-1;c>0;c-=2){for(c==6&&(c=5);;l+=i){for(let d=0;d<2;d+=1){const f=c-d;e.isDefined(f,l)||n(f,l,o(f,l))}if(l+i<0||l+i>=r)break}i=-i}}function OM(e){let t="numeric";for(let n of e)if(!en.alphabet.numeric.has(n)&&(t="alphanumeric",!en.alphabet.alphanumerc.has(n)))return"byte";return t}function FM(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function qx(e,t,n,r,o=FM){let i="",l=n.length;if(r==="numeric"){const g=en.alphabet.numeric.decode(n.split("")),v=g.length;for(let w=0;w<v-2;w+=3)i+=qs(g[w]*100+g[w+1]*10+g[w+2],10);v%3===1?i+=qs(g[v-1],4):v%3===2&&(i+=qs(g[v-2]*10+g[v-1],7))}else if(r==="alphanumeric"){const g=en.alphabet.alphanumerc.decode(n.split("")),v=g.length;for(let w=0;w<v-1;w+=2)i+=qs(g[w]*45+g[w+1],11);v%2==1&&(i+=qs(g[v-1],6))}else if(r==="byte"){const g=o(n);l=g.length,i=Array.from(g).map(v=>qs(v,8)).join("")}else throw new Error("encode: unsupported type");const{capacity:c}=en.capacity(e,t),d=qs(l,en.lengthBits(e,r));let f=en.modeBits[r]+d+i;if(f.length>c)throw new Error("Capacity overflow");f+="0".repeat(Math.min(4,Math.max(0,c-f.length))),f.length%8&&(f+="0".repeat(8-f.length%8));const p="1110110000010001";for(let g=0;f.length!==c;g++)f+=p[g%p.length];const m=Uint8Array.from(f.match(/(.{8})/g).map(g=>+`0b${g}`));return _M(e,t).encode(m)}function Hx(e,t,n,r,o=!1){const i=RM(e,t,r,o);let l=0;const c=8*n.length;if(MM(i,r,(d,f,p)=>{let m=!1;l<c&&(m=(n[l>>>3]>>(7-l&7)&1)!==0,l++),i.set(d,f,m!==p)}),l!==c)throw new Error("QR: bytes left after draw");return i}const Xk=e=>{const t=e.map(n=>n?"1":"0").join("");return{len:t.length,n:+`0b${t}`}},eE=[!0,!1,!0,!0,!0,!1,!0],tE=[!1,!1,!1,!1],Xd=Xk([...eE,...tE]),Vx=Xk([...tE,...eE]);function LM(e){const{width:t,height:n}=e,r=e.transpose();let o=0;for(let p=0;p<n;p++)e.getRuns(p,m=>{m>=5&&(o+=3+(m-5))});for(let p=0;p<t;p++)r.getRuns(p,m=>{m>=5&&(o+=3+(m-5))});let i=0;for(let p=0;p<n-1;p++)i+=3*e.countBoxes2x2(p);let l=0;for(let p=0;p<n;p++)l+=40*e.countPatternInRow(p,Xd.len,Xd.n,Vx.n);for(let p=0;p<t;p++)l+=40*r.countPatternInRow(p,Xd.len,Xd.n,Vx.n);let c=0;c=e.popcnt();const d=c/(n*t)*100,f=10*Math.floor(Math.abs(d-50)/5);return o+i+l+f}function DM(e,t,n,r){if(r===void 0){const o=IM();for(let i=0;i<p1.length;i++)o.add(LM(Hx(e,t,n,i,!0)),i);r=o.get()}if(r===void 0)throw new Error("Cannot find mask");return Hx(e,t,n,r)}function UM(e){if(!zx.includes(e))throw new Error(`Invalid error correction mode=${e}. Expected: ${zx}`)}function $M(e){if(!Wx.includes(e))throw new Error(`Encoding: invalid mode=${e}. Expected: ${Wx}`);if(e==="kanji"||e==="eci")throw new Error(`Encoding: ${e} is not supported (yet?).`)}function zM(e){if(![0,1,2,3,4,5,6,7].includes(e)||!p1[e])throw new Error(`Invalid mask=${e}. Expected number [0..7]`)}function WM(e,t="raw",n={}){const r=n.ecc!==void 0?n.ecc:"medium";UM(r);const o=n.encoding!==void 0?n.encoding:OM(e);$M(o),n.mask!==void 0&&zM(n.mask);let i=n.version,l,c=new Error("Unknown error");if(i!==void 0)jM(i),l=qx(i,r,e,o,n.textEncoder);else for(let p=1;p<=40;p++)try{l=qx(p,r,e,o,n.textEncoder),i=p;break}catch(m){c=m}if(!i||!l)throw c;let d=DM(i,r,l,n.mask);d.assertDrawn();const f=n.border===void 0?2:n.border;if(!Number.isSafeInteger(f))throw new Error(`invalid border type=${typeof f}`);if(d=d.border(f,!1),n.scale!==void 0&&(d=d.scale(n.scale)),t==="raw")return d.toRaw();if(t==="ascii")return d.toASCII();if(t==="svg")return d.toSVG(n.optimize);if(t==="gif")return d.toGIF();if(t==="term")return d.toTerm();throw new Error(`Unknown output: ${t}`)}function qM(e,t={}){const{errorCorrection:n,version:r}=t,o=WM(e,"raw",{border:0,ecc:n,scale:1,version:r});return{edgeLength:o.length,finderLength:7,grid:o,value:e}}function Ur(e){const{arena:t,...n}=e;return h.jsxs(Ur.Root,{...n,children:[h.jsx(Ur.Finder,{}),h.jsx(Ur.Cells,{}),t&&h.jsx(Ur.Arena,{children:typeof t=="string"?h.jsx("img",{alt:"Arena",src:t,style:{borderRadius:1,height:"100%",objectFit:"cover",width:"100%"}}):t})]})}(function(e){e.Context=B.createContext(null);function t(i){const{children:l,size:c="100%",value:d,version:f,errorCorrection:p,...m}=i,g=B.useMemo(()=>(B.Children.map(l,A=>!B.isValidElement(A)||typeof A.type=="string"?null:"displayName"in A.type&&A.type.displayName==="Arena"?!0:null)??[]).some(Boolean),[l]),v=B.useMemo(()=>{let A=p;return g&&p==="low"&&(A="medium"),qM(d,{errorCorrection:A,version:f})},[d,g,p,f]),w=1,b=v.edgeLength*w,C=v.finderLength*w/2,S=g?Math.floor(b/4):0,I=B.useMemo(()=>({arenaSize:S,cellSize:w,edgeSize:b,qrcode:v,finderSize:C}),[S,b,v,C]);return h.jsx(e.Context.Provider,{value:I,children:h.jsxs("svg",{...m,width:c,height:c,viewBox:`0 0 ${b} ${b}`,xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("title",{children:"QR Code"}),l]})})}e.Root=t,(function(i){i.displayName="Root"})(t=e.Root||(e.Root={}));function n(i){const{className:l,fill:c,innerClassName:d,radius:f=.25}=i,{cellSize:p,edgeSize:m,finderSize:g}=B.useContext(e.Context);function v({position:w}){let b=g-(g-p)-p/2;w==="top-right"&&(b=m-g-(g-p)-p/2);let C=g-(g-p)-p/2;w==="bottom-left"&&(C=m-g-(g-p)-p/2);let S=g-p*1.5;w==="top-right"&&(S=m-g-p*1.5);let I=g-p*1.5;return w==="bottom-left"&&(I=m-g-p*1.5),h.jsxs(h.Fragment,{children:[h.jsx("rect",{className:l,stroke:c??"currentColor",fill:"transparent",x:b,y:C,width:p+(g-p)*2,height:p+(g-p)*2,rx:2*f*(g-p),ry:2*f*(g-p),strokeWidth:p}),h.jsx("rect",{className:d,fill:c??"currentColor",x:S,y:I,width:p*3,height:p*3,rx:2*f*p,ry:2*f*p})]})}return h.jsxs(h.Fragment,{children:[h.jsx(v,{position:"top-left"}),h.jsx(v,{position:"top-right"}),h.jsx(v,{position:"bottom-left"})]})}e.Finder=n,(function(i){i.displayName="Finder"})(n=e.Finder||(e.Finder={}));function r(i){const{className:l,fill:c="currentColor",inset:d=!0,radius:f=1}=i,{arenaSize:p,cellSize:m,qrcode:g}=B.useContext(e.Context),{edgeLength:v,finderLength:w}=g,b=B.useMemo(()=>{let C="";for(let S=0;S<g.grid.length;S++){const I=g.grid[S];if(I)for(let A=0;A<I.length;A++){if(!I[A])continue;const N=v/2-p/2,_=N+p;if(S>=N&&S<=_&&A>=N&&A<=_)continue;const P=S<w&&A<w,R=S<w&&A>=v-w,M=S>=v-w&&A<w;if(P||R||M)continue;const Q=d?m*.1:0,V=(m-Q*2)/2,H=A*m+m/2,L=S*m+m/2,z=H-V,O=H+V,K=L-V,J=L+V,F=f*V;C+=[`M ${z+F},${K}`,`L ${O-F},${K}`,`A ${F},${F} 0 0,1 ${O},${K+F}`,`L ${O},${J-F}`,`A ${F},${F} 0 0,1 ${O-F},${J}`,`L ${z+F},${J}`,`A ${F},${F} 0 0,1 ${z},${J-F}`,`L ${z},${K+F}`,`A ${F},${F} 0 0,1 ${z+F},${K}`,"z"].join(" ")}}return C},[p,m,v,w,g.grid,d,f]);return h.jsx("path",{className:l,d:b,fill:c})}e.Cells=r,(function(i){i.displayName="Cells"})(r=e.Cells||(e.Cells={}));function o(i){const{children:l}=i,{arenaSize:c,cellSize:d,edgeSize:f}=B.useContext(e.Context),p=Math.ceil(f/2-c/2),m=c+c%2,g=d/2;return h.jsx("foreignObject",{x:p,y:p,width:m,height:m,children:h.jsx("div",{style:{alignItems:"center",display:"flex",fontSize:1,justifyContent:"center",height:"100%",overflow:"hidden",width:"100%",padding:g,boxSizing:"border-box"},children:l})})}e.Arena=o,(function(i){i.displayName="Arena"})(o=e.Arena||(e.Arena={}))})(Ur||(Ur={}));function HM(e={}){let t,n,r,o;return i=>({id:"baseAccount",name:"Base Account",rdns:"app.base.account",type:"baseAccount",async connect({chainId:l,withCapabilities:c,...d}={}){var f;try{const p=await this.getProvider(),m=l??((f=i.chains[0])==null?void 0:f.id);if(!m)throw new Cs;const g=await p.request({method:"wallet_connect",params:[{capabilities:"capabilities"in d&&d.capabilities?d.capabilities:{},chainIds:[ge(m),...i.chains.filter(b=>b.id!==m).map(b=>ge(b.id))]}]}),v=g.accounts.map(b=>({address:yt(b.address),capabilities:b.capabilities??{}}));let w=Number(g.chainIds[0]);if(n||(n=this.onAccountsChanged.bind(this),p.on("accountsChanged",n)),r||(r=this.onChainChanged.bind(this),p.on("chainChanged",r)),o||(o=this.onDisconnect.bind(this),p.on("disconnect",o)),l&&w!==l){const b=await this.switchChain({chainId:l}).catch(C=>{if(C.code===Ve.code)throw C;return{id:w}});w=(b==null?void 0:b.id)??w}return{accounts:c?v:v.map(b=>b.address),chainId:w}}catch(p){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(p.message)?new Ve(p):p}},async disconnect(){const l=await this.getProvider();n&&(l.removeListener("accountsChanged",n),n=void 0),r&&(l.removeListener("chainChanged",r),r=void 0),o&&(l.removeListener("disconnect",o),o=void 0),l.disconnect()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(c=>yt(c))},async getChainId(){const c=await(await this.getProvider()).request({method:"eth_chainId"});return Number(c)},async getProvider(){if(!t){const l=(()=>{var f;return typeof e.preference=="string"?{options:e.preference}:{...e.preference,options:((f=e.preference)==null?void 0:f.options)??"all"}})(),{createBaseAccountSDK:c}=await fe(async()=>{const{createBaseAccountSDK:f}=await import("./index-C-I4ROfT.js");return{createBaseAccountSDK:f}},[]);t=c({...e,appChainIds:i.chains.map(f=>f.id),preference:l}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:l,chainId:c}){var p,m,g,v;const d=i.chains.find(w=>w.id===c);if(!d)throw new qn(new Cs);const f=await this.getProvider();try{return await f.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(d.id)}]}),d}catch(w){if(w.code===4902)try{let b;l!=null&&l.blockExplorerUrls?b=l.blockExplorerUrls:b=(p=d.blockExplorers)!=null&&p.default.url?[(m=d.blockExplorers)==null?void 0:m.default.url]:[];let C;(g=l==null?void 0:l.rpcUrls)!=null&&g.length?C=l.rpcUrls:C=[((v=d.rpcUrls.default)==null?void 0:v.http[0])??""];const S={blockExplorerUrls:b,chainId:ge(c),chainName:(l==null?void 0:l.chainName)??d.name,iconUrls:l==null?void 0:l.iconUrls,nativeCurrency:(l==null?void 0:l.nativeCurrency)??d.nativeCurrency,rpcUrls:C};return await f.request({method:"wallet_addEthereumChain",params:[S]}),d}catch(b){throw new Ve(b)}throw new qn(w)}},onAccountsChanged(l){l.length===0?this.onDisconnect():i.emitter.emit("change",{accounts:l.map(c=>yt(c))})},onChainChanged(l){const c=Number(l);i.emitter.emit("change",{chainId:c})},async onDisconnect(l){i.emitter.emit("disconnect");const c=await this.getProvider();n&&(c.removeListener("accountsChanged",n),n=void 0),r&&(c.removeListener("chainChanged",r),r=void 0),o&&(c.removeListener("disconnect",o),o=void 0)}})}m1.type="metaMask";function m1(e={}){let t,n,r,o,i,l,c,d;return f=>({id:"metaMaskSDK",name:"MetaMask",rdns:["io.metamask","io.metamask.mobile"],type:m1.type,async setup(){const p=await this.getProvider();p!=null&&p.on&&(l||(l=this.onConnect.bind(this),p.on("connect",l)),o||(o=this.onAccountsChanged.bind(this),p.on("accountsChanged",o)))},async connect({chainId:p,isReconnecting:m,withCapabilities:g}={}){const v=await this.getProvider();c||(c=this.onDisplayUri,v.on("display_uri",c));let w=[];m&&(w=await this.getAccounts().catch(()=>[]));try{let b,C;w!=null&&w.length||(e.connectAndSign||e.connectWith?(e.connectAndSign?b=await t.connectAndSign({msg:e.connectAndSign}):e.connectWith&&(C=await t.connectWith({method:e.connectWith.method,params:e.connectWith.params})),w=await this.getAccounts()):w=(await t.connect()).map(A=>yt(A)));let S=await this.getChainId();if(p&&S!==p){const I=await this.switchChain({chainId:p}).catch(A=>{if(A.code===Ve.code)throw A;return{id:S}});S=(I==null?void 0:I.id)??S}return c&&(v.removeListener("display_uri",c),c=void 0),b?v.emit("connectAndSign",{accounts:w,chainId:S,signResponse:b}):C&&v.emit("connectWith",{accounts:w,chainId:S,connectWithResponse:C}),l&&(v.removeListener("connect",l),l=void 0),o||(o=this.onAccountsChanged.bind(this),v.on("accountsChanged",o)),i||(i=this.onChainChanged.bind(this),v.on("chainChanged",i)),d||(d=this.onDisconnect.bind(this),v.on("disconnect",d)),{accounts:g?w.map(I=>({address:I,capabilities:{}})):w,chainId:S}}catch(b){const C=b;throw C.code===Ve.code?new Ve(C):C.code===zr.code?new zr(C):C}},async disconnect(){const p=await this.getProvider();i&&(p.removeListener("chainChanged",i),i=void 0),d&&(p.removeListener("disconnect",d),d=void 0),l||(l=this.onConnect.bind(this),p.on("connect",l)),await t.terminate()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(g=>yt(g))},async getChainId(){const p=await this.getProvider(),m=p.getChainId()||await(p==null?void 0:p.request({method:"eth_chainId"}));return Number(m)},async getProvider(){async function p(){var b,C,S,I,A;const m=await(async()=>{const{default:j}=await fe(async()=>{const{default:N}=await import("./metamask-sdk-QG4PtQco.js");return{default:N}},[]);return typeof j!="function"&&typeof j.default=="function"?j.default:j})(),g={};for(const j of f.chains)g[ge(j.id)]=(b=GC({chain:j,transports:f.transports}))==null?void 0:b[0];t=new m({_source:"wagmi",forceDeleteProvider:!1,forceInjectProvider:!1,injectProvider:!1,...e,readonlyRPCMap:g,dappMetadata:{...e.dappMetadata,name:(C=e.dappMetadata)!=null&&C.name?(S=e.dappMetadata)==null?void 0:S.name:"wagmi",url:(I=e.dappMetadata)!=null&&I.url?(A=e.dappMetadata)==null?void 0:A.url:typeof window<"u"?window.location.origin:"https://wagmi.sh"},useDeeplink:e.useDeeplink??!0});const v=await t.init(),w=v!=null&&v.activeProvider?v.activeProvider:t.getProvider();if(!w)throw new $n;return w}return n||(r||(r=p()),n=await r),n},async isAuthorized(){try{return!!(await bi(()=>nh(()=>this.getAccounts(),{timeout:200}),{delay:201,retryCount:3})).length}catch{return!1}},async switchChain({addEthereumChainParameter:p,chainId:m}){var C,S;const g=await this.getProvider(),v=f.chains.find(I=>I.id===m);if(!v)throw new qn(new Cs);try{return await g.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(m)}]}),await w(),await b(m),v}catch(I){const A=I;if(A.code===Ve.code)throw new Ve(A);if(A.code===4902||((S=(C=A==null?void 0:A.data)==null?void 0:C.originalError)==null?void 0:S.code)===4902)try{return await g.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(()=>{const{default:j,...N}=v.blockExplorers??{};if(p!=null&&p.blockExplorerUrls)return p.blockExplorerUrls;if(j)return[j.url,...Object.values(N).map(_=>_.url)]})(),chainId:ge(m),chainName:(p==null?void 0:p.chainName)??v.name,iconUrls:p==null?void 0:p.iconUrls,nativeCurrency:(p==null?void 0:p.nativeCurrency)??v.nativeCurrency,rpcUrls:(()=>{var j,N;return(j=p==null?void 0:p.rpcUrls)!=null&&j.length?p.rpcUrls:[((N=v.rpcUrls.default)==null?void 0:N.http[0])??""]})()}]}),await w(),await b(m),v}catch(j){const N=j;throw N.code===Ve.code?new Ve(N):new qn(N)}throw new qn(A)}async function w(){await bi(async()=>{const I=lr(await g.request({method:"eth_chainId"}));if(I!==m)throw new Error("User rejected switch after adding network.");return I},{delay:50,retryCount:20})}async function b(I){await new Promise(A=>{const j=(N=>{"chainId"in N&&N.chainId===I&&(f.emitter.off("change",j),A())});f.emitter.on("change",j),f.emitter.emit("change",{chainId:I})})}},async onAccountsChanged(p){if(p.length===0)if(t.isExtensionActive())this.onDisconnect();else return;else if(f.emitter.listenerCount("connect")){const m=(await this.getChainId()).toString();this.onConnect({chainId:m})}else f.emitter.emit("change",{accounts:p.map(m=>yt(m))})},onChainChanged(p){const m=Number(p);f.emitter.emit("change",{chainId:m})},async onConnect(p){const m=await this.getAccounts();if(m.length===0)return;const g=Number(p.chainId);f.emitter.emit("connect",{accounts:m,chainId:g});const v=await this.getProvider();l&&(v.removeListener("connect",l),l=void 0),o||(o=this.onAccountsChanged.bind(this),v.on("accountsChanged",o)),i||(i=this.onChainChanged.bind(this),v.on("chainChanged",i)),d||(d=this.onDisconnect.bind(this),v.on("disconnect",d))},async onDisconnect(p){const m=await this.getProvider();p&&p.code===1013&&m&&(await this.getAccounts()).length||(f.emitter.emit("disconnect"),i&&(m.removeListener("chainChanged",i),i=void 0),d&&(m.removeListener("disconnect",d),d=void 0),l||(l=this.onConnect.bind(this),m.on("connect",l)))},onDisplayUri(p){f.emitter.emit("message",{type:"display_uri",data:p})}})}g1.type="safe";function g1(e={}){const{shimDisconnect:t=!1}=e;let n,r;return o=>({id:"safe",name:"Safe",type:g1.type,async connect({withCapabilities:i}={}){var f;const l=await this.getProvider();if(!l)throw new $n;const c=await this.getAccounts(),d=await this.getChainId();return r||(r=this.onDisconnect.bind(this),l.on("disconnect",r)),t&&await((f=o.storage)==null?void 0:f.removeItem("safe.disconnected")),{accounts:i?c.map(p=>({address:p,capabilities:{}})):c,chainId:d}},async disconnect(){var l;const i=await this.getProvider();if(!i)throw new $n;r&&(i.removeListener("disconnect",r),r=void 0),t&&await((l=o.storage)==null?void 0:l.setItem("safe.disconnected",!0))},async getAccounts(){const i=await this.getProvider();if(!i)throw new $n;return(await i.request({method:"eth_accounts"})).map(yt)},async getProvider(){if(typeof window<"u"&&(window==null?void 0:window.parent)!==window){if(!n){const{default:l}=await fe(async()=>{const{default:p}=await import("./index-B7p3jPAJ.js");return{default:p}},__vite__mapDeps([0,1])),c=new l(e),d=await nh(()=>c.safe.getInfo(),{timeout:e.unstable_getInfoTimeout??10});if(!d)throw new Error("Could not load Safe information");const f=await(async()=>{const p=await fe(()=>import("./index-Chq8yV_g.js").then(m=>m.i),__vite__mapDeps([2,1,3]));return typeof p.SafeAppProvider!="function"&&typeof p.default.SafeAppProvider=="function"?p.default.SafeAppProvider:p.SafeAppProvider})();n=new f(d,c)}return n}},async getChainId(){const i=await this.getProvider();if(!i)throw new $n;return Number(i.chainId)},async isAuthorized(){var i;try{return t&&await((i=o.storage)==null?void 0:i.getItem("safe.disconnected"))?!1:!!(await this.getAccounts()).length}catch{return!1}},onAccountsChanged(){},onChainChanged(){},onDisconnect(){o.emitter.emit("disconnect")}})}y1.type="walletConnect";function y1(e){const t=e.isNewChainsStale??!0;let n,r;const o="eip155";let i,l,c,d,f,p;return m=>({id:"walletConnect",name:"WalletConnect",type:y1.type,async setup(){const g=await this.getProvider().catch(()=>null);g&&(c||(c=this.onConnect.bind(this),g.on("connect",c)),f||(f=this.onSessionDelete.bind(this),g.on("session_delete",f)))},async connect({chainId:g,withCapabilities:v,...w}={}){var b,C;try{const S=await this.getProvider();if(!S)throw new $n;d||(d=this.onDisplayUri,S.on("display_uri",d));let I=g;if(!I){const _=await((b=m.storage)==null?void 0:b.getItem("state"))??{};m.chains.some(R=>R.id===_.chainId)?I=_.chainId:I=(C=m.chains[0])==null?void 0:C.id}if(!I)throw new Error("No chains found on connector.");const A=await this.isChainsStale();if(S.session&&A&&await S.disconnect(),!S.session||A){const _=m.chains.filter(P=>P.id!==I).map(P=>P.id);await S.connect({optionalChains:[I,..._],..."pairingTopic"in w?{pairingTopic:w.pairingTopic}:{}}),this.setRequestedChainsIds(m.chains.map(P=>P.id))}const j=(await S.enable()).map(_=>yt(_));let N=await this.getChainId();if(g&&N!==g){const _=await this.switchChain({chainId:g}).catch(P=>{var R;if(P.code===Ve.code&&((R=P.cause)==null?void 0:R.message)!=="Missing or invalid. request() method: wallet_addEthereumChain")throw P;return{id:N}});N=(_==null?void 0:_.id)??N}return d&&(S.removeListener("display_uri",d),d=void 0),c&&(S.removeListener("connect",c),c=void 0),i||(i=this.onAccountsChanged.bind(this),S.on("accountsChanged",i)),l||(l=this.onChainChanged.bind(this),S.on("chainChanged",l)),p||(p=this.onDisconnect.bind(this),S.on("disconnect",p)),f||(f=this.onSessionDelete.bind(this),S.on("session_delete",f)),{accounts:v?j.map(_=>({address:_,capabilities:{}})):j,chainId:N}}catch(S){throw/(user rejected|connection request reset)/i.test(S==null?void 0:S.message)?new Ve(S):S}},async disconnect(){const g=await this.getProvider();try{await(g==null?void 0:g.disconnect())}catch(v){if(!/No matching key/i.test(v.message))throw v}finally{l&&(g==null||g.removeListener("chainChanged",l),l=void 0),p&&(g==null||g.removeListener("disconnect",p),p=void 0),c||(c=this.onConnect.bind(this),g==null||g.on("connect",c)),i&&(g==null||g.removeListener("accountsChanged",i),i=void 0),f&&(g==null||g.removeListener("session_delete",f),f=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(v=>yt(v))},async getProvider({chainId:g}={}){var w;async function v(){const b=m.chains.map(S=>S.id);if(!b.length)return;const{EthereumProvider:C}=await fe(async()=>{const{EthereumProvider:S}=await import("./index.es-D1GdDJUC.js").then(I=>I.X);return{EthereumProvider:S}},__vite__mapDeps([4,3]));return await C.init({...e,disableProviderPing:!0,optionalChains:b,projectId:e.projectId,rpcMap:Object.fromEntries(m.chains.map(S=>{const[I]=GC({chain:S,transports:m.transports});return[S.id,I]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=v()),n=await r,n==null||n.events.setMaxListeners(Number.POSITIVE_INFINITY)),g&&await((w=this.switchChain)==null?void 0:w.call(this,{chainId:g})),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[g,v]=await Promise.all([this.getAccounts(),this.getProvider()]);return g.length?await this.isChainsStale()&&v.session?(await v.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:g,chainId:v}){var C,S,I;const w=await this.getProvider();if(!w)throw new $n;const b=m.chains.find(A=>A.id===v);if(!b)throw new qn(new Cs);try{await Promise.all([new Promise(j=>{const N=({chainId:_})=>{_===v&&(m.emitter.off("change",N),j())};m.emitter.on("change",N)}),w.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(v)}]})]);const A=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...A,v]),b}catch(A){const j=A;if(/(user rejected)/i.test(j.message))throw new Ve(j);try{let N;g!=null&&g.blockExplorerUrls?N=g.blockExplorerUrls:N=(C=b.blockExplorers)!=null&&C.default.url?[(S=b.blockExplorers)==null?void 0:S.default.url]:[];let _;(I=g==null?void 0:g.rpcUrls)!=null&&I.length?_=g.rpcUrls:_=[...b.rpcUrls.default.http];const P={blockExplorerUrls:N,chainId:ge(v),chainName:(g==null?void 0:g.chainName)??b.name,iconUrls:g==null?void 0:g.iconUrls,nativeCurrency:(g==null?void 0:g.nativeCurrency)??b.nativeCurrency,rpcUrls:_};await w.request({method:"wallet_addEthereumChain",params:[P]});const R=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...R,v]),b}catch(N){throw new Ve(N)}}},onAccountsChanged(g){g.length===0?this.onDisconnect():m.emitter.emit("change",{accounts:g.map(v=>yt(v))})},onChainChanged(g){const v=Number(g);m.emitter.emit("change",{chainId:v})},async onConnect(g){const v=Number(g.chainId),w=await this.getAccounts();m.emitter.emit("connect",{accounts:w,chainId:v})},async onDisconnect(g){this.setRequestedChainsIds([]),m.emitter.emit("disconnect");const v=await this.getProvider();i&&(v.removeListener("accountsChanged",i),i=void 0),l&&(v.removeListener("chainChanged",l),l=void 0),p&&(v.removeListener("disconnect",p),p=void 0),f&&(v.removeListener("session_delete",f),f=void 0),c||(c=this.onConnect.bind(this),v.on("connect",c))},onDisplayUri(g){m.emitter.emit("message",{type:"display_uri",data:g})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var v,w,b;return n?((b=(w=(v=n.session)==null?void 0:v.namespaces[o])==null?void 0:w.accounts)==null?void 0:b.map(C=>Number.parseInt(C.split(":")[1]||"",10)))??[]:[]},async getRequestedChainsIds(){var g;return await((g=m.storage)==null?void 0:g.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(!t)return!1;const g=m.chains.map(b=>b.id),v=this.getNamespaceChainsIds();if(v.length&&!v.some(b=>g.includes(b)))return!1;const w=await this.getRequestedChainsIds();return!g.every(b=>w.includes(b))},async setRequestedChainsIds(g){var v;await((v=m.storage)==null?void 0:v.setItem(this.requestedChainsStorageKey,g))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}var Bf={},VM=768,aa=nR({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),nE=wk({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),Rg=lR({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},accentColorForeground:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonBorder:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},actionButtonBorderMobile:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},closeButton:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},closeButtonBackground:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonBackgroundError:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonInnerBackground:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectButtonText:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},connectButtonTextError:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},connectionIndicator:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},downloadBottomCardBackground:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"},downloadTopCardBackground:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},error:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},generalBorder:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},generalBorderDim:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},menuItemBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBackdrop:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalBackground:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalBorder:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalText:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},modalTextDim:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},modalTextSecondary:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileAction:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},profileActionHover:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},profileForeground:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"},selectedOptionBorder:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},standby:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},accentColorForeground:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonBorder:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},actionButtonBorderMobile:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},closeButton:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},closeButtonBackground:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonBackgroundError:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonInnerBackground:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectButtonText:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},connectButtonTextError:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},connectionIndicator:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},downloadBottomCardBackground:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},downloadTopCardBackground:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},error:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},generalBorder:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},generalBorderDim:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"},menuItemBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBackdrop:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalBackground:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalBorder:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalText:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},modalTextDim:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},modalTextSecondary:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileAction:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},profileActionHover:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},profileForeground:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"},selectedOptionBorder:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},standby:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},dialog:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},profileDetailsAction:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},selectedOption:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"},selectedWallet:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},walletLogo:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"}}},color:{values:{accentColor:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},accentColorForeground:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonBorder:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},actionButtonBorderMobile:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},closeButton:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},closeButtonBackground:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonBackgroundError:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonInnerBackground:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectButtonText:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},connectButtonTextError:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},connectionIndicator:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},downloadBottomCardBackground:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},downloadTopCardBackground:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},error:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},generalBorder:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},generalBorderDim:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"},menuItemBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBackdrop:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalBackground:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalBorder:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalText:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},modalTextDim:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},modalTextSecondary:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileAction:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},profileActionHover:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},profileForeground:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"},selectedOptionBorder:{conditions:{base:"ju367vhc",hover:"ju367vhd",active:"ju367vhe"},defaultClass:"ju367vhc"},standby:{conditions:{base:"ju367vhf",hover:"ju367vhg",active:"ju367vhh"},defaultClass:"ju367vhf"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"},none:{defaultClass:"ju367vz"}}},pointerEvents:{values:{none:{defaultClass:"ju367v10"},all:{defaultClass:"ju367v11"}}},minHeight:{values:{8:{defaultClass:"ju367v12"},44:{defaultClass:"ju367v13"}}},flexDirection:{values:{row:{defaultClass:"ju367v14"},column:{defaultClass:"ju367v15"}}},fontFamily:{values:{body:{defaultClass:"ju367v16"}}},fontSize:{values:{12:{defaultClass:"ju367v17"},13:{defaultClass:"ju367v18"},14:{defaultClass:"ju367v19"},16:{defaultClass:"ju367v1a"},18:{defaultClass:"ju367v1b"},20:{defaultClass:"ju367v1c"},23:{defaultClass:"ju367v1d"}}},fontWeight:{values:{regular:{defaultClass:"ju367v1e"},medium:{defaultClass:"ju367v1f"},semibold:{defaultClass:"ju367v1g"},bold:{defaultClass:"ju367v1h"},heavy:{defaultClass:"ju367v1i"}}},gap:{values:{0:{defaultClass:"ju367v1j"},1:{defaultClass:"ju367v1k"},2:{defaultClass:"ju367v1l"},3:{defaultClass:"ju367v1m"},4:{defaultClass:"ju367v1n"},5:{defaultClass:"ju367v1o"},6:{defaultClass:"ju367v1p"},8:{defaultClass:"ju367v1q"},10:{defaultClass:"ju367v1r"},12:{defaultClass:"ju367v1s"},14:{defaultClass:"ju367v1t"},16:{defaultClass:"ju367v1u"},18:{defaultClass:"ju367v1v"},20:{defaultClass:"ju367v1w"},24:{defaultClass:"ju367v1x"},28:{defaultClass:"ju367v1y"},32:{defaultClass:"ju367v1z"},36:{defaultClass:"ju367v20"},44:{defaultClass:"ju367v21"},64:{defaultClass:"ju367v22"},"-1":{defaultClass:"ju367v23"}}},height:{values:{1:{defaultClass:"ju367v24"},2:{defaultClass:"ju367v25"},4:{defaultClass:"ju367v26"},8:{defaultClass:"ju367v27"},12:{defaultClass:"ju367v28"},20:{defaultClass:"ju367v29"},24:{defaultClass:"ju367v2a"},28:{defaultClass:"ju367v2b"},30:{defaultClass:"ju367v2c"},32:{defaultClass:"ju367v2d"},34:{defaultClass:"ju367v2e"},36:{defaultClass:"ju367v2f"},40:{defaultClass:"ju367v2g"},44:{defaultClass:"ju367v2h"},48:{defaultClass:"ju367v2i"},54:{defaultClass:"ju367v2j"},60:{defaultClass:"ju367v2k"},200:{defaultClass:"ju367v2l"},full:{defaultClass:"ju367v2m"},max:{defaultClass:"ju367v2n"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2o"},"flex-end":{defaultClass:"ju367v2p"},center:{defaultClass:"ju367v2q"},"space-between":{defaultClass:"ju367v2r"},"space-around":{defaultClass:"ju367v2s"}}},textAlign:{values:{left:{defaultClass:"ju367v2t"},center:{defaultClass:"ju367v2u"},inherit:{defaultClass:"ju367v2v"}}},marginBottom:{values:{0:{defaultClass:"ju367v2w"},1:{defaultClass:"ju367v2x"},2:{defaultClass:"ju367v2y"},3:{defaultClass:"ju367v2z"},4:{defaultClass:"ju367v30"},5:{defaultClass:"ju367v31"},6:{defaultClass:"ju367v32"},8:{defaultClass:"ju367v33"},10:{defaultClass:"ju367v34"},12:{defaultClass:"ju367v35"},14:{defaultClass:"ju367v36"},16:{defaultClass:"ju367v37"},18:{defaultClass:"ju367v38"},20:{defaultClass:"ju367v39"},24:{defaultClass:"ju367v3a"},28:{defaultClass:"ju367v3b"},32:{defaultClass:"ju367v3c"},36:{defaultClass:"ju367v3d"},44:{defaultClass:"ju367v3e"},64:{defaultClass:"ju367v3f"},"-1":{defaultClass:"ju367v3g"}}},marginLeft:{values:{0:{defaultClass:"ju367v3h"},1:{defaultClass:"ju367v3i"},2:{defaultClass:"ju367v3j"},3:{defaultClass:"ju367v3k"},4:{defaultClass:"ju367v3l"},5:{defaultClass:"ju367v3m"},6:{defaultClass:"ju367v3n"},8:{defaultClass:"ju367v3o"},10:{defaultClass:"ju367v3p"},12:{defaultClass:"ju367v3q"},14:{defaultClass:"ju367v3r"},16:{defaultClass:"ju367v3s"},18:{defaultClass:"ju367v3t"},20:{defaultClass:"ju367v3u"},24:{defaultClass:"ju367v3v"},28:{defaultClass:"ju367v3w"},32:{defaultClass:"ju367v3x"},36:{defaultClass:"ju367v3y"},44:{defaultClass:"ju367v3z"},64:{defaultClass:"ju367v40"},"-1":{defaultClass:"ju367v41"}}},marginRight:{values:{0:{defaultClass:"ju367v42"},1:{defaultClass:"ju367v43"},2:{defaultClass:"ju367v44"},3:{defaultClass:"ju367v45"},4:{defaultClass:"ju367v46"},5:{defaultClass:"ju367v47"},6:{defaultClass:"ju367v48"},8:{defaultClass:"ju367v49"},10:{defaultClass:"ju367v4a"},12:{defaultClass:"ju367v4b"},14:{defaultClass:"ju367v4c"},16:{defaultClass:"ju367v4d"},18:{defaultClass:"ju367v4e"},20:{defaultClass:"ju367v4f"},24:{defaultClass:"ju367v4g"},28:{defaultClass:"ju367v4h"},32:{defaultClass:"ju367v4i"},36:{defaultClass:"ju367v4j"},44:{defaultClass:"ju367v4k"},64:{defaultClass:"ju367v4l"},"-1":{defaultClass:"ju367v4m"}}},marginTop:{values:{0:{defaultClass:"ju367v4n"},1:{defaultClass:"ju367v4o"},2:{defaultClass:"ju367v4p"},3:{defaultClass:"ju367v4q"},4:{defaultClass:"ju367v4r"},5:{defaultClass:"ju367v4s"},6:{defaultClass:"ju367v4t"},8:{defaultClass:"ju367v4u"},10:{defaultClass:"ju367v4v"},12:{defaultClass:"ju367v4w"},14:{defaultClass:"ju367v4x"},16:{defaultClass:"ju367v4y"},18:{defaultClass:"ju367v4z"},20:{defaultClass:"ju367v50"},24:{defaultClass:"ju367v51"},28:{defaultClass:"ju367v52"},32:{defaultClass:"ju367v53"},36:{defaultClass:"ju367v54"},44:{defaultClass:"ju367v55"},64:{defaultClass:"ju367v56"},"-1":{defaultClass:"ju367v57"}}},maxWidth:{values:{1:{defaultClass:"ju367v58"},2:{defaultClass:"ju367v59"},4:{defaultClass:"ju367v5a"},8:{defaultClass:"ju367v5b"},12:{defaultClass:"ju367v5c"},20:{defaultClass:"ju367v5d"},24:{defaultClass:"ju367v5e"},28:{defaultClass:"ju367v5f"},30:{defaultClass:"ju367v5g"},32:{defaultClass:"ju367v5h"},34:{defaultClass:"ju367v5i"},36:{defaultClass:"ju367v5j"},40:{defaultClass:"ju367v5k"},44:{defaultClass:"ju367v5l"},48:{defaultClass:"ju367v5m"},54:{defaultClass:"ju367v5n"},60:{defaultClass:"ju367v5o"},200:{defaultClass:"ju367v5p"},full:{defaultClass:"ju367v5q"},max:{defaultClass:"ju367v5r"}}},minWidth:{values:{1:{defaultClass:"ju367v5s"},2:{defaultClass:"ju367v5t"},4:{defaultClass:"ju367v5u"},8:{defaultClass:"ju367v5v"},12:{defaultClass:"ju367v5w"},20:{defaultClass:"ju367v5x"},24:{defaultClass:"ju367v5y"},28:{defaultClass:"ju367v5z"},30:{defaultClass:"ju367v60"},32:{defaultClass:"ju367v61"},34:{defaultClass:"ju367v62"},36:{defaultClass:"ju367v63"},40:{defaultClass:"ju367v64"},44:{defaultClass:"ju367v65"},48:{defaultClass:"ju367v66"},54:{defaultClass:"ju367v67"},60:{defaultClass:"ju367v68"},200:{defaultClass:"ju367v69"},full:{defaultClass:"ju367v6a"},max:{defaultClass:"ju367v6b"}}},overflow:{values:{hidden:{defaultClass:"ju367v6c"}}},paddingBottom:{values:{0:{defaultClass:"ju367v6d"},1:{defaultClass:"ju367v6e"},2:{defaultClass:"ju367v6f"},3:{defaultClass:"ju367v6g"},4:{defaultClass:"ju367v6h"},5:{defaultClass:"ju367v6i"},6:{defaultClass:"ju367v6j"},8:{defaultClass:"ju367v6k"},10:{defaultClass:"ju367v6l"},12:{defaultClass:"ju367v6m"},14:{defaultClass:"ju367v6n"},16:{defaultClass:"ju367v6o"},18:{defaultClass:"ju367v6p"},20:{defaultClass:"ju367v6q"},24:{defaultClass:"ju367v6r"},28:{defaultClass:"ju367v6s"},32:{defaultClass:"ju367v6t"},36:{defaultClass:"ju367v6u"},44:{defaultClass:"ju367v6v"},64:{defaultClass:"ju367v6w"},"-1":{defaultClass:"ju367v6x"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6y"},1:{defaultClass:"ju367v6z"},2:{defaultClass:"ju367v70"},3:{defaultClass:"ju367v71"},4:{defaultClass:"ju367v72"},5:{defaultClass:"ju367v73"},6:{defaultClass:"ju367v74"},8:{defaultClass:"ju367v75"},10:{defaultClass:"ju367v76"},12:{defaultClass:"ju367v77"},14:{defaultClass:"ju367v78"},16:{defaultClass:"ju367v79"},18:{defaultClass:"ju367v7a"},20:{defaultClass:"ju367v7b"},24:{defaultClass:"ju367v7c"},28:{defaultClass:"ju367v7d"},32:{defaultClass:"ju367v7e"},36:{defaultClass:"ju367v7f"},44:{defaultClass:"ju367v7g"},64:{defaultClass:"ju367v7h"},"-1":{defaultClass:"ju367v7i"}}},paddingRight:{values:{0:{defaultClass:"ju367v7j"},1:{defaultClass:"ju367v7k"},2:{defaultClass:"ju367v7l"},3:{defaultClass:"ju367v7m"},4:{defaultClass:"ju367v7n"},5:{defaultClass:"ju367v7o"},6:{defaultClass:"ju367v7p"},8:{defaultClass:"ju367v7q"},10:{defaultClass:"ju367v7r"},12:{defaultClass:"ju367v7s"},14:{defaultClass:"ju367v7t"},16:{defaultClass:"ju367v7u"},18:{defaultClass:"ju367v7v"},20:{defaultClass:"ju367v7w"},24:{defaultClass:"ju367v7x"},28:{defaultClass:"ju367v7y"},32:{defaultClass:"ju367v7z"},36:{defaultClass:"ju367v80"},44:{defaultClass:"ju367v81"},64:{defaultClass:"ju367v82"},"-1":{defaultClass:"ju367v83"}}},paddingTop:{values:{0:{defaultClass:"ju367v84"},1:{defaultClass:"ju367v85"},2:{defaultClass:"ju367v86"},3:{defaultClass:"ju367v87"},4:{defaultClass:"ju367v88"},5:{defaultClass:"ju367v89"},6:{defaultClass:"ju367v8a"},8:{defaultClass:"ju367v8b"},10:{defaultClass:"ju367v8c"},12:{defaultClass:"ju367v8d"},14:{defaultClass:"ju367v8e"},16:{defaultClass:"ju367v8f"},18:{defaultClass:"ju367v8g"},20:{defaultClass:"ju367v8h"},24:{defaultClass:"ju367v8i"},28:{defaultClass:"ju367v8j"},32:{defaultClass:"ju367v8k"},36:{defaultClass:"ju367v8l"},44:{defaultClass:"ju367v8m"},64:{defaultClass:"ju367v8n"},"-1":{defaultClass:"ju367v8o"}}},position:{values:{absolute:{defaultClass:"ju367v8p"},fixed:{defaultClass:"ju367v8q"},relative:{defaultClass:"ju367v8r"}}},WebkitUserSelect:{values:{none:{defaultClass:"ju367v8s"}}},right:{values:{0:{defaultClass:"ju367v8t"}}},transition:{values:{default:{defaultClass:"ju367v8u"},transform:{defaultClass:"ju367v8v"}}},userSelect:{values:{none:{defaultClass:"ju367v8w"}}},width:{values:{1:{defaultClass:"ju367v8x"},2:{defaultClass:"ju367v8y"},4:{defaultClass:"ju367v8z"},8:{defaultClass:"ju367v90"},12:{defaultClass:"ju367v91"},20:{defaultClass:"ju367v92"},24:{defaultClass:"ju367v93"},28:{defaultClass:"ju367v94"},30:{defaultClass:"ju367v95"},32:{defaultClass:"ju367v96"},34:{defaultClass:"ju367v97"},36:{defaultClass:"ju367v98"},40:{defaultClass:"ju367v99"},44:{defaultClass:"ju367v9a"},48:{defaultClass:"ju367v9b"},54:{defaultClass:"ju367v9c"},60:{defaultClass:"ju367v9d"},200:{defaultClass:"ju367v9e"},full:{defaultClass:"ju367v9f"},max:{defaultClass:"ju367v9g"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9h"}}}}}),Qx={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackground:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},QM={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},GM="_12cbo8i3 ju367v8r",KM={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function vt({active:e,hover:t}){return[GM,t&&KM[t],QM[e]]}var rE=B.createContext(null);function YM(){const{adapter:e}=B.useContext(rE)??{};if(!e)throw new Error("No authentication adapter found");return e}function mh(){const e=B.useContext(rE);return(e==null?void 0:e.status)??null}function v1(){const e=mh(),{isConnected:t}=zt();return t?e&&(e==="loading"||e==="unauthenticated")?e:"connected":"disconnected"}function oE(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function JM(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function ZM(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function Cu(){return JM()||ZM()}function bt(){return oE()||Cu()}var XM="iekbcc0",eO={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},tO=({reset:e,...t})=>{if(!e)return Rg(t);const n=eO[e],r=Rg(t);return xk(XM,n,r)},$=E.forwardRef(({as:e="div",className:t,testId:n,...r},o)=>{const i={},l={};for(const d in r)Rg.properties.has(d)?i[d]=r[d]:l[d]=r[d];const c=tO({reset:typeof e=="string"?e:"div",...i});return E.createElement(e,{className:xk(c,t),...l,"data-testid":n?`rk-${n.replace(/^rk-/,"")}`:void 0,ref:o})});$.displayName="Box";var sE=new Map,em=new Map;async function iE(e){const t=em.get(e);if(t)return t;const n=async()=>e().then(async o=>(sE.set(e,o),o)),r=n().catch(o=>n().catch(i=>{em.delete(e)}));return em.set(e,r),r}async function Vr(...e){return await Promise.all(e.map(t=>typeof t=="function"?iE(t):t))}function nO(){const[,e]=B.useReducer(t=>t+1,0);return e}function gh(e){const t=typeof e=="function"?sE.get(e):void 0,n=nO();return B.useEffect(()=>{typeof e=="function"&&!t&&iE(e).then(n)},[e,t,n]),typeof e=="function"?t:e}function Rt({alt:e,background:t,borderColor:n,borderRadius:r,useAsImage:o,boxShadow:i,height:l,src:c,width:d,testId:f}){const p=Cu(),m=gh(c),g=m&&/^http/.test(m),[v,w]=B.useReducer(()=>!0,!1);return E.createElement($,{"aria-label":e,borderRadius:r,boxShadow:i,height:typeof l=="string"?l:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:t,height:typeof l=="number"?l:void 0,width:typeof d=="number"?d:void 0},width:typeof d=="string"?d:void 0,testId:f},E.createElement($,{...g?{"aria-hidden":!0,as:"img",onLoad:w,src:m}:{"aria-hidden":!0,as:"img",src:m},height:"full",position:"absolute",...p?{WebkitUserSelect:"none"}:{},style:{WebkitTouchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...!o&&g?{opacity:v?1:0}:{}},width:"full"}),n?E.createElement($,{...typeof n=="object"&&"custom"in n?{style:{borderColor:n.custom}}:{borderColor:n},borderRadius:r,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var rO="_1luule42",oO="_1luule43",sO=e=>B.useMemo(()=>`${e}_${Math.round(Math.random()*1e9)}`,[e]),Vc=({height:e=21,width:t=21})=>{const n=sO("spinner");return E.createElement("svg",{className:rO,fill:"none",height:e,viewBox:"0 0 21 21",width:t,xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Loading"),E.createElement("clipPath",{id:n},E.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),E.createElement("foreignObject",{clipPath:`url(#${n})`,height:"21",width:"21",x:"0",y:"0"},E.createElement("div",{className:oO})))},Ue=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],Gx=[{color:Ue[0],emoji:"🌶"},{color:Ue[1],emoji:"🤑"},{color:Ue[2],emoji:"🐙"},{color:Ue[3],emoji:"🫐"},{color:Ue[4],emoji:"🐳"},{color:Ue[0],emoji:"🤶"},{color:Ue[5],emoji:"🌲"},{color:Ue[6],emoji:"🌞"},{color:Ue[7],emoji:"🐒"},{color:Ue[8],emoji:"🐵"},{color:Ue[9],emoji:"🦊"},{color:Ue[10],emoji:"🐼"},{color:Ue[11],emoji:"🦄"},{color:Ue[12],emoji:"🐷"},{color:Ue[13],emoji:"🐧"},{color:Ue[8],emoji:"🦩"},{color:Ue[14],emoji:"👽"},{color:Ue[0],emoji:"🎈"},{color:Ue[8],emoji:"🍉"},{color:Ue[1],emoji:"🎉"},{color:Ue[15],emoji:"🐲"},{color:Ue[16],emoji:"🌎"},{color:Ue[17],emoji:"🍊"},{color:Ue[18],emoji:"🐭"},{color:Ue[19],emoji:"🍣"},{color:Ue[1],emoji:"🐥"},{color:Ue[20],emoji:"👾"},{color:Ue[15],emoji:"🥦"},{color:Ue[0],emoji:"👹"},{color:Ue[17],emoji:"🙀"},{color:Ue[4],emoji:"⛱"},{color:Ue[21],emoji:"⛵️"},{color:Ue[17],emoji:"🥳"},{color:Ue[8],emoji:"🤯"},{color:Ue[22],emoji:"🤠"}];function iO(e){let t=0;if(e.length===0)return t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t}function aO(e){const n=Math.abs(iO((typeof e=="string"?e:"").toLowerCase())%Gx.length);return Gx[n??0]}var lO=({address:e,ensImage:t,size:n})=>{const[r,o]=B.useState(!1);B.useEffect(()=>{if(t){const c=new Image;c.src=t,c.onload=()=>o(!0)}},[t]);const{color:i,emoji:l}=B.useMemo(()=>aO(e),[e]);return t?r?E.createElement($,{backgroundSize:"cover",borderRadius:"full",position:"absolute",style:{backgroundImage:`url(${t})`,backgroundPosition:"center",height:n,width:n}}):E.createElement($,{alignItems:"center",backgroundSize:"cover",borderRadius:"full",color:"modalText",display:"flex",justifyContent:"center",position:"absolute",style:{height:n,width:n}},E.createElement(Vc,null)):E.createElement($,{alignItems:"center",display:"flex",justifyContent:"center",overflow:"hidden",style:{...!t&&{backgroundColor:i},height:n,width:n}},l)},aE=lO,lE=B.createContext(aE);function cE({address:e,imageUrl:t,loading:n,size:r}){const o=B.useContext(lE);return E.createElement($,{"aria-hidden":!0,borderRadius:"full",overflow:"hidden",position:"relative",style:{height:`${r}px`,width:`${r}px`},userSelect:"none"},E.createElement($,{alignItems:"center",borderRadius:"full",display:"flex",justifyContent:"center",overflow:"hidden",position:"absolute",style:{fontSize:`${Math.round(r*.55)}px`,height:`${r}px`,transform:n?"scale(0.72)":void 0,transition:".25s ease",transitionDelay:n?void 0:".1s",width:`${r}px`,willChange:"transform"},userSelect:"none"},E.createElement(o,{address:e,ensImage:t,size:r})),n&&E.createElement($,{color:"accentColor",display:"flex",height:"full",position:"absolute",width:"full"},E.createElement(Vc,{height:"100%",width:"100%"})))}var Kx=()=>E.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Dropdown"),E.createElement("path",{d:"M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"})),Yx={defaultLocale:"en",locale:"en"},cO=class{constructor(e){this.listeners=new Set,this.defaultLocale=Yx.defaultLocale,this.enableFallback=!1,this.locale=Yx.locale,this.cachedLocales=[],this.translations={};for(const[t,n]of Object.entries(e))this.cachedLocales=[...this.cachedLocales,t],this.translations={...this.translations,...this.flattenTranslation(n,t)}}missingMessage(e){return`[missing: "${this.locale}.${e}" translation]`}flattenTranslation(e,t){const n={},r=(o,i)=>{for(const l of Object.keys(o)){const c=`${i}.${l}`,d=o[l];typeof d=="object"&&d!==null?r(d,c):n[c]=d}};return r(e,t),n}translateWithReplacements(e,t={}){let n=e;for(const r in t){const o=t[r];n=n.replace(`%{${r}}`,o)}return n}t(e,t,n){const r=`${this.locale}.${e}`,o=this.translations[r];if(!o){if(this.enableFallback){const i=`${this.defaultLocale}.${e}`,l=this.translations[i];if(l)return this.translateWithReplacements(l,t)}return n!=null&&n.rawKeyIfTranslationMissing?e:this.missingMessage(e)}return this.translateWithReplacements(o,t)}isLocaleCached(e){return this.cachedLocales.includes(e)}updateLocale(e){this.locale=e,this.notifyListeners()}setTranslations(e,t){this.isLocaleCached(e)||(this.cachedLocales=[...this.cachedLocales,e],this.translations={...this.translations,...this.flattenTranslation(t,e)}),this.locale=e,this.notifyListeners()}notifyListeners(){for(const e of this.listeners)e()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},sr=new cO({en:JSON.parse(jg),"en-US":JSON.parse(jg)});sr.defaultLocale="en-US";sr.locale="en-US";sr.enableFallback=!0;var uO=async e=>{switch(e){case"ar":case"ar-AR":return(await fe(async()=>{const{default:t}=await import("./ar_AR-44JUQ6EW-BMX-am0v.js");return{default:t}},[])).default;case"de":case"de-DE":return(await fe(async()=>{const{default:t}=await import("./de_DE-PYAO5YD6-BWlqPWgO.js");return{default:t}},[])).default;case"en":case"en-US":return(await fe(async()=>{const{default:t}=await Promise.resolve().then(()=>W2);return{default:t}},void 0)).default;case"es":case"es-419":return(await fe(async()=>{const{default:t}=await import("./es_419-HRGOJ6VT-D-qzxUM-.js");return{default:t}},[])).default;case"fr":case"fr-FR":return(await fe(async()=>{const{default:t}=await import("./fr_FR-IGGVC6RM-D8LpUM75.js");return{default:t}},[])).default;case"hi":case"hi-IN":return(await fe(async()=>{const{default:t}=await import("./hi_IN-XSKAA3MF-C3QUpWyP.js");return{default:t}},[])).default;case"id":case"id-ID":return(await fe(async()=>{const{default:t}=await import("./id_ID-KUOB4UAL-K9y-nRWm.js");return{default:t}},[])).default;case"ja":case"ja-JP":return(await fe(async()=>{const{default:t}=await import("./ja_JP-4WRQ63RX-Ct5pF4ug.js");return{default:t}},[])).default;case"ko":case"ko-KR":return(await fe(async()=>{const{default:t}=await import("./ko_KR-I2K7AIEP-B5gw8Mwb.js");return{default:t}},[])).default;case"ms":case"ms-MY":return(await fe(async()=>{const{default:t}=await import("./ms_MY-6VZW6Q3Z-BtFD07hR.js");return{default:t}},[])).default;case"pt":case"pt-BR":return(await fe(async()=>{const{default:t}=await import("./pt_BR-N3XOZ4SV-CvVpfsHb.js");return{default:t}},[])).default;case"ru":case"ru-RU":return(await fe(async()=>{const{default:t}=await import("./ru_RU-IITAPRET-DOj6Jzj7.js");return{default:t}},[])).default;case"th":case"th-TH":return(await fe(async()=>{const{default:t}=await import("./th_TH-3ZQCKCQE-BcHUN2Q4.js");return{default:t}},[])).default;case"tr":case"tr-TR":return(await fe(async()=>{const{default:t}=await import("./tr_TR-QUPUGMUF-CwpF6ZFn.js");return{default:t}},[])).default;case"ua":case"uk-UA":return(await fe(async()=>{const{default:t}=await import("./uk_UA-SSN6SV5E-IlYYyRC6.js");return{default:t}},[])).default;case"vi":case"vi-VN":return(await fe(async()=>{const{default:t}=await import("./vi_VN-7BUVRNYY-CZ9S75qZ.js");return{default:t}},[])).default;case"zh":case"zh-CN":case"zh-Hans":return(await fe(async()=>{const{default:t}=await import("./zh_CN-HJBN674C-Baf0GEeT.js");return{default:t}},[])).default;case"zh-HK":return(await fe(async()=>{const{default:t}=await import("./zh_HK-JW3WLRKE-VztJKXL5.js");return{default:t}},[])).default;case"zh-Hant":case"zh-TW":return(await fe(async()=>{const{default:t}=await import("./zh_TW-VNNRNXY7-aWfg7Qp4.js");return{default:t}},[])).default;default:return(await fe(async()=>{const{default:t}=await Promise.resolve().then(()=>W2);return{default:t}},void 0)).default}};async function Jx(e){if(sr.isLocaleCached(e)){sr.updateLocale(e);return}const n=await uO(e);sr.setTranslations(e,JSON.parse(n))}var dO=()=>{var e;if(typeof window<"u"&&typeof navigator<"u"){if((e=navigator.languages)!=null&&e.length)return navigator.languages[0];if(navigator.language)return navigator.language}},xt=B.createContext({i18n:sr}),fO=({children:e,locale:t})=>{const[n,r]=B.useState(0),o=B.useMemo(()=>dO(),[]);B.useEffect(()=>sr.onChange(()=>{r(c=>c+1)}),[]),B.useEffect(()=>{t&&t!==sr.locale?Jx(t):!t&&o&&o!==sr.locale&&Jx(o)},[t,o]);const i=B.useMemo(()=>({t:(c,d)=>sr.t(c,d),i18n:sr}),[n]);return E.createElement(xt.Provider,{value:i},e)};function uE(e){return e!=null}var Zx={iconBackground:"#7290CC",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./apechain-SX5YFU6N-q5qBv-mp.js");return{default:e}},[])).default},tm={iconBackground:"#96bedc",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./arbitrum-WURIBY6W-CqVkHBr5.js");return{default:e}},[])).default},Xx={iconBackground:"#e84141",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./avalanche-KOMJD3XY-Dsn_JPR4.js");return{default:e}},[])).default},nm={iconBackground:"#0052ff",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./base-OAXLRA4F-CoYTVIiL.js");return{default:e}},[])).default},rm={iconBackground:"#814625",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./berachain-NJECWIVC-DumxnFvf.js");return{default:e}},[])).default},e2={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./blast-V555OVXZ-BbhJh1tj.js");return{default:e}},[])).default},t2={iconBackground:"#ebac0e",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./bsc-N647EYR2-B2nLKXWV.js");return{default:e}},[])).default},n2={iconBackground:"#FCFF52",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./celo-GEP4TUHG-CenIBYLU.js");return{default:e}},[])).default},r2={iconBackground:"#002D74",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./cronos-HJPAQTAE-BEOvlOC4.js");return{default:e}},[])).default},hO={iconBackground:"#A36EFD",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./degen-FQQ4XGHB-CeHTs88l.js");return{default:e}},[])).default},ns={iconBackground:"#484c50",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./ethereum-RGGVA4PY-SWGOlkuk.js");return{default:e}},[])).default},o2={iconBackground:"transparent",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./flow-5FQJFCTK-CUie2reO.js");return{default:e}},[])).default},pO={iconBackground:"#04795c",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./gnosis-37ZC4RBL-B137OtHZ.js");return{default:e}},[])).default},s2={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./gravity-J5YQHTYH-Bj6B0uod.js");return{default:e}},[])).default},mO={iconBackground:"#f9f7ec",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./hardhat-TX56IT5N-CV1FY-wE.js");return{default:e}},[])).default},gO={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./hyperevm-VKPAA4SA-CHwraEsx.js");return{default:e}},[])).default},i2={iconBackground:"#7132F5",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./ink-FZMYZWHG-62p-5IK5.js");return{default:e}},[])).default},a2={iconBackground:"transparent",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./kaia-65D2U3PU-JmuLQ4gC.js");return{default:e}},[])).default},om={iconBackground:"#ffffff",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./linea-QRMVQ5DY-DuI3vv0d.js");return{default:e}},[])).default},sm={iconBackground:"#ffffff",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./manta-SI27YFEJ-CpVOKa06.js");return{default:e}},[])).default},l2={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./mantle-CKIUT334-DR2WgqzU.js");return{default:e}},[])).default},yO={iconBackground:"transparent",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./monad-4KWC6TSS-DVXSkpiz.js");return{default:e}},[])).default},ef={iconBackground:"#ff5a57",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./optimism-HAF2GUT7-ec6Nqxs9.js");return{default:e}},[])).default},im={iconBackground:"#9f71ec",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./polygon-WW6ZI7PM-DXlmm4L1.js");return{default:e}},[])).default},vO={iconBackground:"#1273EA",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./ronin-EMCPYXZT-N-QBHZdV.js");return{default:e}},[])).default},wO={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./sanko-RHQYXGM5-OX010CbN.js");return{default:e}},[])).default},bO={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./superposition-HG6MMR2Y-bRkgatRO.js");return{default:e}},[])).default},c2={iconBackground:"#FFEEDA",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./scroll-5OBGQVOV-DJFECiai.js");return{default:e}},[])).default},u2={iconBackground:"#F50DB4",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./unichain-C5BWO2ZY-BfguYsnu.js");return{default:e}},[])).default},d2={iconBackground:"#f9f7ec",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./xdc-KJ3TDBYO-DNV6zchh.js");return{default:e}},[])).default},f2={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./zetachain-TLDS5IPW-Udhyw16T.js");return{default:e}},[])).default},h2={iconBackground:"#f9f7ec",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./zksync-DH7HK5U4-Dt4usFw6.js");return{default:e}},[])).default},am={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./zora-FYL5H3IO-iB4wygST.js");return{default:e}},[])).default},xO={apechain:{chainId:33139,name:"ApeChain",...Zx},apechainCurtis:{chainId:33111,name:"ApeChain Curtis",...Zx},arbitrum:{chainId:42161,name:"Arbitrum",...tm},arbitrumGoerli:{chainId:421613,...tm},arbitrumSepolia:{chainId:421614,...tm},avalanche:{chainId:43114,...Xx},avalancheFuji:{chainId:43113,...Xx},base:{chainId:8453,name:"Base",...nm},baseGoerli:{chainId:84531,...nm},baseSepolia:{chainId:84532,...nm},berachain:{chainId:80094,name:"Berachain",...rm},berachainArtio:{chainId:80085,name:"Berachain Artio",...rm},berachainBArtio:{chainId:80084,name:"Berachain bArtio",...rm},blast:{chainId:81457,name:"Blast",...e2},blastSepolia:{chainId:168587773,...e2},bsc:{chainId:56,name:"BSC",...t2},bscTestnet:{chainId:97,...t2},celo:{chainId:42220,name:"Celo",...n2},celoAlfajores:{chainId:44787,name:"Celo Alfajores",...n2},cronos:{chainId:25,...r2},cronosTestnet:{chainId:338,...r2},degen:{chainId:666666666,name:"Degen",...hO},flow:{chainId:747,...o2},flowTestnet:{chainId:545,...o2},gnosis:{chainId:100,name:"Gnosis",...pO},goerli:{chainId:5,...ns},gravity:{chainId:1625,name:"Gravity",...s2},gravitySepolia:{chainId:13505,name:"Gravity Sepolia",...s2},hardhat:{chainId:31337,...mO},holesky:{chainId:17e3,...ns},hyperevm:{chainId:999,...gO},ink:{chainId:57073,...i2},inkSepolia:{chainId:763373,...i2},kaia:{chainId:8217,name:"Kaia",...a2},kairos:{chainId:1001,name:"Kairos",...a2},kovan:{chainId:42,...ns},linea:{chainId:59144,name:"Linea",...om},lineaGoerli:{chainId:59140,name:"Linea Goerli",...om},lineaSepolia:{chainId:59141,name:"Linea Sepolia",...om},localhost:{chainId:1337,...ns},mainnet:{chainId:1,name:"Ethereum",...ns},manta:{chainId:169,name:"Manta",...sm},mantaSepolia:{chainId:3441006,...sm},mantaTestnet:{chainId:3441005,...sm},mantle:{chainId:5e3,...l2},mantleTestnet:{chainId:5001,...l2},monadTestnet:{chainId:10143,name:"Monad Testnet",...yO},optimism:{chainId:10,name:"Optimism",...ef},optimismGoerli:{chainId:420,...ef},optimismKovan:{chainId:69,...ef},optimismSepolia:{chainId:11155420,...ef},polygon:{chainId:137,name:"Polygon",...im},polygonAmoy:{chainId:80002,...im},polygonMumbai:{chainId:80001,...im},rinkeby:{chainId:4,...ns},ronin:{chainId:2020,...vO},ropsten:{chainId:3,...ns},sanko:{chainId:1996,name:"Sanko",...wO},scroll:{chainId:534352,...c2},scrollSepolia:{chainId:534351,...c2},sepolia:{chainId:11155111,...ns},superposition:{chainId:55244,name:"Superposition",...bO},unichain:{chainId:130,...u2},unichainSepolia:{chainId:1301,...u2},xdc:{chainId:50,name:"XDC",...d2},xdcTestnet:{chainId:51,...d2},zetachain:{chainId:7e3,name:"ZetaChain",...f2},zetachainAthensTestnet:{chainId:7001,name:"Zeta Athens",...f2},zkSync:{chainId:324,name:"zkSync",...h2},zkSyncTestnet:{chainId:280,...h2},zora:{chainId:7777777,name:"Zora",...am},zoraSepolia:{chainId:999999999,...am},zoraTestnet:{chainId:999,...am}},CO=Object.fromEntries(Object.values(xO).filter(uE).map(({chainId:e,...t})=>[e,t])),kO=e=>e.map(t=>{const n=CO[t.id]??{};return{...t,name:n.name??t.name,iconUrl:t.iconUrl??n.iconUrl,iconBackground:t.iconBackground??n.iconBackground}}),w1=B.createContext({chains:[]});function EO({children:e,initialChain:t}){const{chains:n}=jt();return E.createElement(w1.Provider,{value:B.useMemo(()=>({chains:kO(n),initialChainId:typeof t=="number"?t:t==null?void 0:t.id}),[n,t])},e)}var Ni=()=>B.useContext(w1).chains,AO=()=>B.useContext(w1).initialChainId,SO=()=>{const e=Ni();return B.useMemo(()=>{const t={};for(const n of e)t[n.id]=n;return t},[e])},dE=B.createContext({showBalance:void 0,setShowBalance:()=>{}});function jO({children:e}){const[t,n]=B.useState();return E.createElement(dE.Provider,{value:{showBalance:t,setShowBalance:n}},e)}var fE=()=>B.useContext(dE);function IO(){const[e,t]=B.useState(!1);return B.useEffect(()=>(t(!0),()=>{t(!1)}),[]),B.useCallback(()=>e,[e])}function hE(){const e=Ni(),t=a1.id;return e.some(r=>r.id===t)}function NO(e){const t=hE(),n=o=>{try{return VR(o)}catch{}},{data:r}=G_({chainId:a1.id,name:e?n(e):void 0,query:{enabled:t}});return r}async function Vs(e,t){if(t={headers:{},method:"get",...t,timeout:t.timeout??1e4},!e)throw new Error("rainbowFetch: Missing url argument");const n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout),{body:o,params:i,headers:l,...c}=t,d=o&&typeof o=="object"?JSON.stringify(t.body):t.body,f=await fetch(`${e}${BO(i)}`,{...c,body:d,headers:{Accept:"application/json","Content-Type":"application/json",...l},signal:n.signal});clearTimeout(r);const p=await PO(f);if(f.ok){const{headers:v,status:w}=f;return{data:p,headers:v,status:w}}throw TO({requestBody:o,response:f,responseBody:typeof p=="string"?{error:p}:p})}function PO(e){const t=e.headers.get("Content-Type");return t!=null&&t.startsWith("application/json")?e.json():e.text()}function BO(e){return e&&Object.keys(e).length?`?${new URLSearchParams(e)}`:""}function TO({requestBody:e,response:t,responseBody:n}){const r=(n==null?void 0:n.error)||(t==null?void 0:t.statusText)||"There was an error with the request.",o=new Error(r);return o.response=t,o.responseBody=n,o.requestBody=e,o}var _O=class{constructor(e={}){const{baseUrl:t="",...n}=e;this.baseUrl=t,this.opts=n}get(e,t){return Vs(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"get"})}delete(e,t){return Vs(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"delete"})}head(e,t){return Vs(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"head"})}options(e,t){return Vs(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"options"})}post(e,t,n){return Vs(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"post"})}put(e,t,n){return Vs(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"put"})}patch(e,t,n){return Vs(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"patch"})}};function RO({baseUrl:e,headers:t,params:n,timeout:r}){return new _O({baseUrl:e,headers:t,params:n,timeout:r})}var MO=!!(typeof process<"u"&&typeof Bf<"u"&&Bf.RAINBOW_PROVIDER_API_KEY),OO=RO({baseUrl:"https://enhanced-provider.rainbow.me",headers:{"x-api-key":typeof process<"u"&&typeof Bf<"u"&&Bf.RAINBOW_PROVIDER_API_KEY||"LzbasoBiLqltex3VkcQ7LRmL4PtfiiZ1EMJrizrgfonWN6byJReu/l6yrUoo3zLW"}});function FO(e,t,n={}){return[e,t,n]}function hf(e){return`rk-ens-name-${e}`}function LO(e){try{const t=e?JSON.parse(e):null;return typeof t=="object"?t:null}catch{return null}}function DO(e,t){if(!Vn(e))return;const n=new Date,r=new Date(n.getTime()+180*6e4);localStorage.setItem(hf(e),JSON.stringify({ensName:t,expires:r.getTime()}))}function UO(e){const t=LO(localStorage.getItem(hf(e)));if(!t)return null;const{ensName:n,expires:r}=t;return typeof n!="string"||Number.isNaN(Number(r))||new Date().getTime()>Number(r)?(localStorage.removeItem(hf(e)),null):n}async function $O({address:e}){const t=UO(e);if(t)return t;const r=(await OO.get("/v1/resolve-ens",{params:{address:e}})).data.data;return r&&DO(e,r),r}function zO(e){const t=hE(),{data:n}=K_({chainId:a1.id,address:e,query:{enabled:t}}),{data:r}=uk({queryKey:FO("address",e),queryFn:()=>$O({address:e}),enabled:!t&&!!e&&MO,staleTime:10*(60*1e3),retry:1});return n||r}function pE({address:e,includeBalance:t}){const n=zO(e),r=NO(n),{data:o}=dk({address:t?e:void 0});return{ensName:n,ensAvatar:r,balance:o}}function b1(){const{chain:e}=zt();return(e==null?void 0:e.id)??null}var mE="rk-transactions";function WO(e){try{const t=e?JSON.parse(e):{};return typeof t=="object"?t:{}}catch{return{}}}function p2(){return WO(typeof localStorage<"u"?localStorage.getItem(mE):null)}var qO=/^0x([A-Fa-f0-9]{64})$/;function HO(e){const t=[];return qO.test(e.hash)||t.push("Invalid transaction hash"),typeof e.description!="string"&&t.push("Transaction must have a description"),typeof e.confirmations<"u"&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}function VO({provider:e}){let t=p2(),n=e;const r=new Set,o=new Set,i=new Map;function l(I){n=I}function c(I,A){var j;return((j=t[I])==null?void 0:j[A])??[]}function d(I,A,j){const N=HO(j);if(N.length>0)throw new Error(["Unable to add transaction",...N].join(`
1726
+ `));g(I,A,_=>[{...j,status:"pending"},..._.filter(({hash:P})=>P!==j.hash)])}function f(I,A){g(I,A,()=>[])}function p(I,A,j,N){g(I,A,_=>_.map(P=>P.hash===j?{...P,status:N}:P))}async function m(I,A){await Promise.all(c(I,A).filter(j=>j.status==="pending").map(async j=>{const{confirmations:N,hash:_}=j,P=i.get(_);if(P)return await P;const R=n.waitForTransactionReceipt({confirmations:N,hash:_,timeout:3e5}).then(({status:M})=>{i.delete(_),M!==void 0&&(p(I,A,_,M===0||M==="reverted"?"failed":"confirmed"),b(M))}).catch(()=>{p(I,A,_,"failed")});return i.set(_,R),await R}))}function g(I,A,j){t=p2(),t[I]=t[I]??{};let N=0;const _=10,P=j(t[I][A]??[]).filter(({status:R})=>R==="pending"?!0:N++<=_);t[I][A]=P.length>0?P:void 0,v(),w(),m(I,A)}function v(){localStorage.setItem(mE,JSON.stringify(t))}function w(){for(const I of r)I()}function b(I){for(const A of o)A(I)}function C(I){return r.add(I),()=>{r.delete(I)}}function S(I){return o.add(I),()=>{o.delete(I)}}return{addTransaction:d,clearTransactions:f,getTransactions:c,onTransactionStatus:S,onChange:C,setProvider:l,waitForPendingTransactions:m}}var m2,gE=E.createContext(null);function QO({children:e}){const t=Y_(),{address:n}=zt(),r=b1(),{refetch:o}=dk({address:n,query:{enabled:!1}}),[i]=E.useState(()=>m2??(m2=VO({provider:t}))),l=E.useCallback(c=>{c==="success"&&o()},[o]);return E.useEffect(()=>{i.setProvider(t)},[i,t]),E.useEffect(()=>{n&&r&&i.waitForPendingTransactions(n,r)},[i,n,r]),E.useEffect(()=>{if(i&&n&&r)return i.onTransactionStatus(l)},[i,n,r,l]),E.createElement(gE.Provider,{value:i},e)}function yE(){const e=E.useContext(gE);if(!e)throw new Error("Transaction hooks must be used within RainbowKitProvider");return e}function vE(){const e=yE(),{address:t}=zt(),n=b1(),[r,o]=B.useState(()=>e&&t&&n?e.getTransactions(t,n):[]);return B.useEffect(()=>{if(e&&t&&n)return o(e.getTransactions(t,n)),e.onChange(()=>{o(e.getTransactions(t,n))})},[e,t,n]),r}var g2=e=>typeof e=="function"?e():e;function GO(e,{extends:t}={}){const n={...Ox(Qx,g2(e))};if(!t)return n;const r=Ox(Qx,g2(t));return Object.fromEntries(Object.entries(n).filter(([i,l])=>l!==r[i]))}function y2(e,t={}){return Object.entries(GO(e,t)).map(([n,r])=>`${n}:${r.replace(/[:;{}</>]/g,"")};`).join("")}var wE={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},ku=B.createContext(wE),bE=B.createContext(!1);function KO(e,t){let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,e()},t)}}var xE=()=>{const[e,t]=B.useState({height:void 0,width:void 0});return B.useEffect(()=>{const n=KO(()=>{t({height:window.innerHeight,width:window.innerWidth})},500);return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),e},Eu=B.createContext({connector:null,setConnector:()=>{}});function YO({children:e}){const[t,n]=B.useState(null);return E.createElement(Eu.Provider,{value:B.useMemo(()=>({connector:t,setConnector:n}),[t])},e)}var Au={COMPACT:"compact",WIDE:"wide"},yh=B.createContext(Au.WIDE);function JO({children:e,modalSize:t}){const{width:n}=xE(),r=n&&n<VM,{connector:o}=B.useContext(Eu);return E.createElement(yh.Provider,{value:r||o?Au.COMPACT:t},e)}var x1=B.createContext(!1),ZO="rk-version";function XO({version:e}){localStorage.setItem(ZO,e)}function eF(){const e=B.useCallback(()=>{XO({version:"2.2.10"})},[]);B.useEffect(()=>{e()},[e])}function tF(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]=r)}return n}function C1(){return typeof navigator<"u"&&typeof navigator.userAgent<"u"&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function nF(){return typeof document<"u"&&getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")!==""}function k1(){var t,n;if(typeof navigator>"u")return"Browser";const e=(t=navigator.userAgent)==null?void 0:t.toLowerCase();return(n=navigator.brave)!=null&&n.isBrave?"Brave":(e==null?void 0:e.indexOf("edg/"))>-1?"Edge":(e==null?void 0:e.indexOf("op"))>-1?"Opera":nF()?"Arc":(e==null?void 0:e.indexOf("chrome"))>-1?"Chrome":(e==null?void 0:e.indexOf("firefox"))>-1?"Firefox":C1()?"Safari":"Browser"}var rF=AM.UAParser(),{os:E1}=rF;function oF(){return E1.name==="Windows"}function sF(){return E1.name==="Mac OS"}function iF(){return["Ubuntu","Mint","Fedora","Debian","Arch","Linux"].includes(E1.name)}function A1(){return oF()?"Windows":sF()?"macOS":iF()?"Linux":"Desktop"}var aF=e=>{var n,r,o,i,l,c,d,f,p,m,g;const t=k1();return{Arc:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.chrome,Brave:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.chrome,Chrome:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.chrome,Edge:((i=e==null?void 0:e.downloadUrls)==null?void 0:i.edge)||((l=e==null?void 0:e.downloadUrls)==null?void 0:l.chrome),Firefox:(c=e==null?void 0:e.downloadUrls)==null?void 0:c.firefox,Opera:((d=e==null?void 0:e.downloadUrls)==null?void 0:d.opera)||((f=e==null?void 0:e.downloadUrls)==null?void 0:f.chrome),Safari:(p=e==null?void 0:e.downloadUrls)==null?void 0:p.safari,Browser:(m=e==null?void 0:e.downloadUrls)==null?void 0:m.browserExtension}[t]??((g=e==null?void 0:e.downloadUrls)==null?void 0:g.browserExtension)},lF=e=>{var n,r,o;return(Cu()?(n=e==null?void 0:e.downloadUrls)==null?void 0:n.ios:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.android)??((o=e==null?void 0:e.downloadUrls)==null?void 0:o.mobile)},cF=e=>{var n,r,o,i,l;const t=A1();return{Windows:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.windows,macOS:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.macos,Linux:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.linux,Desktop:(i=e==null?void 0:e.downloadUrls)==null?void 0:i.desktop}[t]??((l=e==null?void 0:e.downloadUrls)==null?void 0:l.desktop)},CE=(e,t)=>e.some(n=>n.id===t),uF=e=>!!e.isRainbowKitConnector,v2=e=>{var t;return!!(!e.isRainbowKitConnector&&((t=e.icon)!=null&&t.replace(/\n/g,"").startsWith("data:image"))&&e.uid&&e.name)},dF=(e,t)=>e.id==="walletConnect"&&t?{...e,walletConnectModalConnector:t}:e,fF=({wallets:e,recentWallets:t})=>[...t,...e.filter(n=>!CE(t,n.id))],kE="rk-recent";function hF(e){try{const t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}}function EE(){return typeof localStorage<"u"?hF(localStorage.getItem(kE)):[]}function pF(e){return[...new Set(e)]}function mF(e){const t=pF([e,...EE()]);localStorage.setItem(kE,JSON.stringify(t))}function Qc(e=!1){var j,N,_;const t=Ni(),n=AO(),{connectAsync:r,connectors:o}=V_(),i=o,{setIsWalletConnectModalOpen:l}=KE(),c=i.map(P=>({...P,...P.rkDetails||{}}));async function d(P,R){var V,H;const M=await P.getChainId(),Q=await r({...R,chainId:(R==null?void 0:R.chainId)??n??((V=t.find(({id:L})=>L===M))==null?void 0:V.id)??((H=t[0])==null?void 0:H.id),connector:P});return Q&&mF(P.id),Q}async function f(P){try{l(!0),await d(P),l(!1)}catch(R){const M=R.name==="UserRejectedRequestError"||R.message==="Connection request reset. Please try again.";if(l(!1),!M)throw R}}const p=async(P,R)=>{const M=await P.getProvider();return P.id==="coinbase"?M.qrUrl:new Promise(Q=>M.once("display_uri",V=>{Q(R(V))}))},m=c.find(P=>P.id==="walletConnect"&&P.isWalletConnectModalConnector),g=c.filter(v2).map(P=>({...P,groupIndex:0})),v=c.filter(uF).filter(P=>!P.isWalletConnectModalConnector).filter(P=>e?!g.some(M=>M.id===P.rdns):!0).map(P=>dF(P,m)),w=[...g,...v],b=tF(w,P=>P.id),S=EE().map(P=>b[P]).filter(Boolean).slice(0,3),I=[],A=fF({wallets:w,recentWallets:S});for(const P of A){if(!P)continue;const R=v2(P),M=CE(S,P.id);if(R){I.push({...P,iconUrl:P.icon,ready:!0,connect:d.bind(null,P),groupName:"Installed",recent:M});continue}I.push({...P,ready:P.installed??!0,connect:d.bind(null,P),desktopDownloadUrl:cF(P),extensionDownloadUrl:aF(P),groupName:P.groupName,mobileDownloadUrl:lF(P),getQrCodeUri:(j=P.qrCode)!=null&&j.getUri?()=>p(P,P.qrCode.getUri):void 0,getDesktopUri:(N=P.desktop)!=null&&N.getUri?()=>p(P,P.desktop.getUri):void 0,getMobileUri:(_=P.mobile)!=null&&_.getUri?()=>{var Q;return p(P,(Q=P.mobile)==null?void 0:Q.getUri)}:void 0,recent:M,showWalletConnectModal:P.walletConnectModalConnector?()=>f(P.walletConnectModalConnector):void 0})}return I}var AE=async()=>(await fe(async()=>{const{default:e}=await import("./assets-Q6ZU7ZJ5-P8HioiAD.js");return{default:e}},[])).default,gF=()=>Vr(AE),yF=()=>E.createElement(Rt,{background:"#d0d5de",borderRadius:"10",height:"48",src:AE,width:"48"}),SE=async()=>(await fe(async()=>{const{default:e}=await import("./login-UP3DZBGS-Db_wM5oQ.js");return{default:e}},[])).default,vF=()=>Vr(SE),wF=()=>E.createElement(Rt,{background:"#d0d5de",borderRadius:"10",height:"48",src:SE,width:"48"}),Ee=E.forwardRef(({as:e="div",children:t,className:n,color:r,display:o,font:i="body",id:l,size:c="16",style:d,tabIndex:f,textAlign:p="inherit",weight:m="regular",testId:g},v)=>E.createElement($,{as:e,className:n,color:r,display:o,fontFamily:i,fontSize:c,fontWeight:m,id:l,ref:v,style:d,tabIndex:f,textAlign:p,testId:g},t));Ee.displayName="Text";var bF={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function pn({disabled:e=!1,href:t,label:n,onClick:r,rel:o="noreferrer noopener",size:i="medium",target:l="_blank",testId:c,type:d="primary"}){const f=d==="primary",p=i!=="large",m=bt(),g=e?"actionButtonSecondaryBackground":f?"accentColor":p?"actionButtonSecondaryBackground":null,{fontSize:v,height:w,paddingX:b,paddingY:C}=bF[i],S=!m||!p;return E.createElement($,{...t?e?{}:{as:"a",href:t,rel:o,target:l}:{as:"button",type:"button"},onClick:e?void 0:r,...S?{borderColor:m&&!p&&!f?"actionButtonBorderMobile":"actionButtonBorder",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!e&&vt({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:b,paddingY:C,style:{willChange:"transform"},testId:c,textAlign:"center",transition:"transform",...g?{background:g}:{},...w?{height:w}:{}},E.createElement(Ee,{color:e?"modalTextSecondary":f?"accentColorForeground":"accentColor",size:v,weight:"bold"},n))}var xF=()=>bt()?E.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Close"),E.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):E.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Close"),E.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),Ei=({"aria-label":e="Close",onClose:t})=>{const n=bt();return E.createElement($,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:vt({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},E.createElement(xF,null))},jE=async()=>(await fe(async()=>{const{default:e}=await import("./sign-A7IJEUT5-CGsRnPrd.js");return{default:e}},[])).default;function CF({onClose:e,onCloseModal:t}){const{i18n:n}=B.useContext(xt),[{status:r,...o},i]=E.useState({status:"idle"}),l=YM(),c=B.useCallback(async()=>{try{const w=await l.getNonce();i(b=>({...b,nonce:w}))}catch{i(w=>({...w,errorMessage:n.t("sign_in.message.preparing_error"),status:"idle"}))}},[l,n.t]),d=B.useRef(!1);E.useEffect(()=>{d.current||(d.current=!0,c())},[c]);const f=bt(),{address:p,chain:m}=zt(),{signMessageAsync:g}=J_(),v=async()=>{try{const w=m==null?void 0:m.id,{nonce:b}=o;if(!p||!w||!b)return;i(I=>({...I,errorMessage:void 0,status:"signing"}));const C=l.createMessage({address:p,chainId:w,nonce:b});let S;try{S=await g({message:C})}catch(I){return I instanceof Ve?i(A=>({...A,status:"idle"})):i(A=>({...A,errorMessage:n.t("sign_in.signature.signing_error"),status:"idle"}))}i(I=>({...I,status:"verifying"}));try{if(await l.verify({message:C,signature:S})){t();return}throw new Error}catch{return i(I=>({...I,errorMessage:n.t("sign_in.signature.verifying_error"),status:"idle"}))}}catch{i({errorMessage:n.t("sign_in.signature.oops_error"),status:"idle"})}};return E.createElement($,{position:"relative"},E.createElement($,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},E.createElement(Ei,{onClose:e})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:f?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:f?"60px":"36px"}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:f?"6":"4",style:{maxWidth:f?320:280}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:f?"32":"16"},E.createElement(Rt,{height:40,src:jE,width:40}),E.createElement(Ee,{color:"modalText",size:f?"20":"18",textAlign:"center",weight:"heavy"},n.t("sign_in.label"))),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:f?"16":"12"},E.createElement(Ee,{color:"modalTextSecondary",size:f?"16":"14",textAlign:"center"},n.t("sign_in.description")),r==="idle"&&o.errorMessage?E.createElement(Ee,{color:"error",size:f?"16":"14",textAlign:"center",weight:"bold"},o.errorMessage):null)),E.createElement($,{alignItems:f?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},E.createElement(pn,{disabled:!o.nonce||r==="signing"||r==="verifying",label:o.nonce?r==="signing"?n.t("sign_in.signature.waiting"):r==="verifying"?n.t("sign_in.signature.verifying"):n.t("sign_in.message.send"):n.t("sign_in.message.preparing"),onClick:v,size:f?"large":"medium",testId:"auth-message-button"}),f?E.createElement(pn,{label:"Cancel",onClick:e,size:"large",type:"secondary"}):E.createElement($,{as:"button",borderRadius:"full",className:vt({active:"shrink",hover:"grow"}),display:"block",onClick:e,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"closeButton",size:f?"16":"14",weight:"bold"},n.t("sign_in.message.cancel"))))))}function kF(){const e=Ni(),t=Qc(),n=mh()==="unauthenticated",r=B.useCallback(()=>{Vr(...t.map(o=>o.iconUrl),...e.map(o=>o.iconUrl).filter(uE)),bt()||(gF(),vF()),n&&Vr(jE)},[t,e,n]);B.useEffect(()=>{r()},[r])}var IE="WALLETCONNECT_DEEPLINK_CHOICE";function EF({mobileUri:e,name:t}){localStorage.setItem(IE,JSON.stringify({href:e.split("?")[0],name:t}))}function AF(){localStorage.removeItem(IE)}var NE=B.createContext(void 0),Mg="data-rk",PE=e=>({[Mg]:e||""}),SF=e=>{if(e&&!/^[a-zA-Z0-9_]+$/.test(e))throw new Error(`Invalid ID: ${e}`);return e?`[${Mg}="${e}"]`:`[${Mg}]`},jF=()=>{const e=B.useContext(NE);return PE(e)},IF=yk();function NF({appInfo:e,avatar:t,children:n,coolMode:r=!1,id:o,initialChain:i,locale:l,modalSize:c=Au.WIDE,showRecentTransactions:d=!1,theme:f=IF}){if(kF(),eF(),JC({onDisconnect:AF}),typeof f=="function")throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const p=SF(o),m={...wE,...e},g=t??aE;return E.createElement(EO,{initialChain:i},E.createElement(YO,null,E.createElement(fO,{locale:l},E.createElement(bE.Provider,{value:r},E.createElement(JO,{modalSize:c},E.createElement(x1.Provider,{value:d},E.createElement(QO,null,E.createElement(lE.Provider,{value:g},E.createElement(ku.Provider,{value:m},E.createElement(NE.Provider,{value:o},E.createElement(jO,null,E.createElement(WL,null,f?E.createElement("div",{...PE(o)},E.createElement("style",{dangerouslySetInnerHTML:{__html:[`${p}{${y2("lightMode"in f?f.lightMode:f)}}`,"darkMode"in f?`@media(prefers-color-scheme:dark){${p}{${y2(f.darkMode,{extends:f.lightMode})}}}`:null].join("")}}),n):n))))))))))))}var PF="_9pm4ki5 ju367va ju367v15 ju367v8r",BF="_9pm4ki3 ju367v9h ju367vb3 ju367va ju367v2q ju367v8q",w2=(e,t)=>{const n=e.querySelectorAll("button:not(:disabled), a[href]");n.length!==0&&n[t==="end"?n.length-1:0].focus()};function TF(e){const t=B.useRef(null);return B.useEffect(()=>{const n=document.activeElement;return()=>{var r;(r=n.focus)==null||r.call(n)}},[]),B.useEffect(()=>{if(t.current){const n=t.current.querySelector("[data-auto-focus]");n?n.focus():t.current.focus()}},[]),E.createElement(E.Fragment,null,E.createElement("div",{onFocus:B.useCallback(()=>t.current&&w2(t.current,"end"),[]),tabIndex:0}),E.createElement("div",{ref:t,style:{outline:"none"},tabIndex:-1,...e}),E.createElement("div",{onFocus:B.useCallback(()=>t.current&&w2(t.current,"start"),[]),tabIndex:0}))}var _F=e=>e.stopPropagation();function Tf({children:e,onClose:t,open:n,titleId:r}){B.useEffect(()=>{const f=p=>n&&p.key==="Escape"&&t();return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[n,t]);const[o,i]=B.useState(!0);B.useEffect(()=>{i(getComputedStyle(window.document.body).overflow!=="hidden")},[]);const l=B.useCallback(()=>t(),[t]),c=jF(),d=bt();return E.createElement(E.Fragment,null,n?l1.createPortal(E.createElement(Jk,{enabled:o},E.createElement($,{...c},E.createElement($,{...c,alignItems:d?"flex-end":"center","aria-labelledby":r,"aria-modal":!0,className:BF,onClick:l,position:"fixed",role:"dialog"},E.createElement(TF,{className:PF,onClick:_F,role:"document"},e)))),document.body):null)}var RF="_1ckjpok7",MF="_1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",OF="_1ckjpok4 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",FF="_1ckjpok6 ju367vq",LF="_1ckjpok3 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",DF="_1ckjpok2 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r";function _f({bottomSheetOnMobile:e=!1,children:t,marginTop:n,padding:r="16",paddingBottom:o,wide:i=!1}){const l=bt(),d=B.useContext(yh)===Au.COMPACT;return E.createElement($,{marginTop:n},E.createElement($,{className:[i?l?DF:d?OF:LF:MF,l?FF:null,l&&e?RF:null].join(" ")},E.createElement($,{padding:r,paddingBottom:o??r},t)))}var b2=["k","m","b","t"];function tf(e,t=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${t}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function BE(e){if(e<1)return tf(e,3);if(e<10**2)return tf(e,2);if(e<10**4)return new Intl.NumberFormat().format(Number.parseFloat(tf(e,1)));const t=10**1;let n=String(e);for(let r=b2.length-1;r>=0;r--){const o=10**((r+1)*3);if(o<=e){e=e*t/o/t,n=tf(e,1)+b2[r];break}}return n}function TE(e){return e.length<8?e:`${e.substring(0,4)}…${e.substring(e.length-4)}`}function _E(e){if(!e)return"";const t=e.split("."),n=t.pop();return t.join(".").length>24?`${t.join(".").substring(0,24)}...`:`${t.join(".")}.${n}`}var UF=()=>E.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Copied"),E.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),$F=()=>E.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Copy"),E.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),zF=()=>E.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Disconnect"),E.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));function WF(){const e=yE(),{address:t}=zt(),n=b1();return B.useCallback(()=>{if(!t||!n)throw new Error("No address or chain ID found");e.clearTransactions(t,n)},[e,t,n])}var RE=e=>{var t,n;return(n=(t=e==null?void 0:e.blockExplorers)==null?void 0:t.default)==null?void 0:n.url},ME=()=>E.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Link"),E.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),qF=()=>E.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Cancel"),E.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),HF=()=>E.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Success"),E.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"})),VF=e=>{switch(e){case"pending":return Vc;case"confirmed":return HF;case"failed":return qF;default:return Vc}};function QF({tx:e}){const t=bt(),n=VF(e.status),r=e.status==="failed"?"error":"accentColor",{chain:o}=zt(),i=e.status==="confirmed"?"Confirmed":e.status==="failed"?"Failed":"Pending",l=RE(o);return E.createElement(E.Fragment,null,E.createElement($,{...l?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:vt({active:"shrink"}),href:`${l}/tx/${e.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:t?"16":"14"},E.createElement($,{color:r},E.createElement(n,null)),E.createElement($,{display:"flex",flexDirection:"column",gap:t?"3":"1"},E.createElement($,null,E.createElement(Ee,{color:"modalText",font:"body",size:t?"16":"14",weight:"bold"},e==null?void 0:e.description)),E.createElement($,null,E.createElement(Ee,{color:e.status==="pending"?"modalTextSecondary":r,font:"body",size:"14",weight:t?"medium":"regular"},i)))),l&&E.createElement($,{alignItems:"center",color:"modalTextDim",display:"flex"},E.createElement(ME,null))))}var GF=3;function KF({address:e}){const t=vE(),n=WF(),{chain:r}=zt(),o=RE(r),i=t.slice(0,GF),l=i.length>0,c=bt(),{appName:d}=B.useContext(ku),{i18n:f}=B.useContext(xt);return E.createElement(E.Fragment,null,E.createElement($,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:c?"8":"18"},l&&E.createElement($,{paddingBottom:c?"4":"0",paddingTop:"8",paddingX:c?"12":"6"},E.createElement($,{display:"flex",justifyContent:"space-between"},E.createElement(Ee,{color:"modalTextSecondary",size:c?"16":"14",weight:"semibold"},f.t("profile.transactions.recent.title")),E.createElement($,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},E.createElement($,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:vt({active:"shrink"}),onClick:n,paddingX:c?"8":"12",paddingY:c?"4":"5",transition:"default",type:"button"},E.createElement(Ee,{color:"modalTextSecondary",size:c?"16":"14",weight:"semibold"},f.t("profile.transactions.clear.label")))))),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},l?i.map(p=>E.createElement(QF,{key:p.hash,tx:p})):E.createElement(E.Fragment,null,E.createElement($,{padding:c?"12":"8"},E.createElement(Ee,{color:"modalTextDim",size:c?"16":"14",weight:c?"medium":"bold"},d?f.t("profile.transactions.description",{appName:d}):f.t("profile.transactions.description_fallback"))),c&&E.createElement($,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),o&&E.createElement($,{paddingBottom:"18",paddingX:c?"8":"18"},E.createElement($,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:vt({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${o}/address/${e}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...c?{paddingLeft:"12"}:{}},E.createElement(Ee,{color:"modalText",font:"body",size:c?"16":"14",weight:c?"semibold":"bold"},f.t("profile.explorer.label")),E.createElement(ME,null))))}function x2({action:e,icon:t,label:n,testId:r,url:o}){const i=bt();return E.createElement($,{...o?{as:"a",href:o,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...i?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:vt({active:"shrinkSm",hover:i?void 0:"grow"}),display:"flex",onClick:e,padding:i?"6":"8",style:{willChange:"transform"},testId:r,transition:"default",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},E.createElement($,{color:"modalText",height:"max"},t),E.createElement($,null,E.createElement(Ee,{color:"modalText",size:i?"12":"13",weight:"semibold"},n))))}function YF({address:e,ensAvatar:t,ensName:n,balance:r,onClose:o,onDisconnect:i}){const l=B.useContext(x1),[c,d]=B.useState(!1),f=B.useCallback(()=>{e&&(navigator.clipboard.writeText(e),d(!0))},[e]);if(B.useEffect(()=>{if(c){const C=setTimeout(()=>{d(!1)},1500);return()=>clearTimeout(C)}},[c]),!e)return null;const p=n?_E(n):TE(e),m=r==null?void 0:r.formatted,g=m?BE(Number.parseFloat(m)):void 0,v="rk_profile_title",w=bt(),{i18n:b}=B.useContext(xt);return E.createElement(E.Fragment,null,E.createElement($,{display:"flex",flexDirection:"column"},E.createElement($,{background:"profileForeground",padding:"16"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:w?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},E.createElement($,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},E.createElement(Ei,{onClose:o}))," ",E.createElement($,{marginTop:w?"24":"0"},E.createElement(cE,{address:e,imageUrl:t,size:w?82:74})),E.createElement($,{display:"flex",flexDirection:"column",gap:w?"4":"0",textAlign:"center"},E.createElement($,{textAlign:"center"},E.createElement(Ee,{as:"h1",color:"modalText",id:v,size:w?"20":"18",weight:"heavy"},p)),!!r&&E.createElement($,{textAlign:"center"},E.createElement(Ee,{as:"h1",color:"modalTextSecondary",id:v,size:w?"16":"14",weight:"semibold"},g," ",r.symbol)))),E.createElement($,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},E.createElement(x2,{action:f,icon:c?E.createElement(UF,null):E.createElement($F,null),label:c?b.t("profile.copy_address.copied"):b.t("profile.copy_address.label")}),E.createElement(x2,{action:i,icon:E.createElement(zF,null),label:b.t("profile.disconnect.label"),testId:"disconnect-button"}))),l&&E.createElement(E.Fragment,null,E.createElement($,{background:"generalBorder",height:"1",marginTop:"-1"}),E.createElement($,null,E.createElement(KF,{address:e})))))}function JF({onClose:e,open:t}){const{address:n}=zt(),{balance:r,ensAvatar:o,ensName:i}=pE({address:n,includeBalance:t}),{disconnect:l}=r1();return n?E.createElement(E.Fragment,null,n&&E.createElement(Tf,{onClose:e,open:t,titleId:"rk_account_modal_title"},E.createElement(_f,{bottomSheetOnMobile:!0,padding:"0"},E.createElement(YF,{address:n,ensAvatar:o,ensName:i,balance:r,onClose:e,onDisconnect:l})))):null}var ZF=({size:e})=>E.createElement("svg",{fill:"none",height:e,viewBox:"0 0 28 28",width:e,xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Disconnect"),E.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),XF="v9horb0",S1=E.forwardRef(({children:e,currentlySelected:t=!1,onClick:n,testId:r,...o},i)=>{const l=bt();return E.createElement($,{as:"button",borderRadius:"menuButton",disabled:t,display:"flex",onClick:n,ref:i,testId:r,type:"button"},E.createElement($,{borderRadius:"menuButton",className:[l?XF:void 0,!t&&vt({active:"shrink"})],padding:l?"8":"6",transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...o},e))});S1.displayName="MenuButton";var eL=({chainId:e,currentChainId:t,switchChain:n,chainIconSize:r,isLoading:o,src:i,name:l,iconBackground:c,idx:d})=>{const f=bt(),{i18n:p}=B.useContext(xt),m=Ni(),g=t===e;return E.createElement(B.Fragment,null,E.createElement(S1,{currentlySelected:g,onClick:g?void 0:()=>n({chainId:e}),testId:`chain-option-${e}`},E.createElement($,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:r},i&&E.createElement($,{height:"full",marginRight:"8"},E.createElement(Rt,{alt:l,background:c,borderRadius:"full",height:r,src:i,width:r,testId:`chain-option-${e}-icon`})),E.createElement("div",null,l??l)),g&&E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},E.createElement(Ee,{color:"accentColorForeground",size:"14",weight:"medium"},p.t("chains.connected")),E.createElement($,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),o&&E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},E.createElement(Ee,{color:"modalText",size:"14",weight:"medium"},p.t("chains.confirm")),E.createElement($,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),f&&d<m.length-1&&E.createElement($,{background:"generalBorderDim",height:"1",marginX:"8"}))},tL=eL,nL="_18dqw9x0",rL="_18dqw9x1";function oL({onClose:e,open:t}){const{chainId:n}=zt(),{chains:r}=jt(),[o,i]=B.useState(null),{switchChain:l}=Z_({mutation:{onMutate:({chainId:w})=>{i(w)},onSuccess:()=>{o&&i(null)},onError:()=>{o&&i(null)},onSettled:()=>{e()}}}),{i18n:c}=B.useContext(xt),{disconnect:d}=r1(),f="rk_chain_modal_title",p=bt(),m=r.some(w=>w.id===n),g=p?"36":"28",v=Ni();return n?E.createElement(Tf,{onClose:e,open:t,titleId:f},E.createElement(_f,{bottomSheetOnMobile:!0,paddingBottom:"0"},E.createElement($,{display:"flex",flexDirection:"column",gap:"14"},E.createElement($,{display:"flex",flexDirection:"row",justifyContent:"space-between"},p&&E.createElement($,{width:"30"}),E.createElement($,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},E.createElement(Ee,{as:"h1",color:"modalText",id:f,size:p?"20":"18",weight:"heavy"},c.t("chains.title"))),E.createElement(Ei,{onClose:e})),!m&&E.createElement($,{marginX:"8",textAlign:p?"center":"left"},E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},c.t("chains.wrong_network"))),E.createElement($,{className:p?rL:nL,display:"flex",flexDirection:"column",gap:"4",padding:"2",paddingBottom:"16"},v.map(({iconBackground:w,iconUrl:b,id:C,name:S},I)=>E.createElement(tL,{key:C,chainId:C,currentChainId:n,switchChain:l,chainIconSize:g,isLoading:o===C,src:b,name:S,iconBackground:w,idx:I})),!m&&E.createElement(E.Fragment,null,E.createElement($,{background:"generalBorderDim",height:"1",marginX:"8"}),E.createElement(S1,{onClick:()=>d(),testId:"chain-option-disconnect"},E.createElement($,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:g},E.createElement($,{alignItems:"center",color:"error",height:g,justifyContent:"center",marginRight:"8"},E.createElement(ZF,{size:Number(g)})),E.createElement("div",null,c.t("chains.disconnect"))))))))))):null}function sL(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]||(n[o]=[]),n[o].push(r))}return n}var j1=({children:e,href:t})=>E.createElement($,{as:"a",color:"accentColor",href:t,rel:"noreferrer",target:"_blank"},e),I1=({children:e})=>E.createElement(Ee,{color:"modalTextSecondary",size:"12",weight:"medium"},e);function C2({compactModeEnabled:e=!1,getWallet:t}){const{disclaimer:n,learnMoreUrl:r}=B.useContext(ku),{i18n:o}=B.useContext(xt);return E.createElement(E.Fragment,null,E.createElement($,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},E.createElement($,{marginBottom:"10"},!e&&E.createElement(Ee,{color:"modalText",size:"18",weight:"heavy"},o.t("intro.title"))),E.createElement($,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},E.createElement($,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},E.createElement(yF,null)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},o.t("intro.digital_asset.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.digital_asset.description")))),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},E.createElement($,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},E.createElement(wF,null)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},o.t("intro.login.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.login.description"))))),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},E.createElement(pn,{label:o.t("intro.get.label"),onClick:t}),E.createElement($,{as:"a",className:vt({active:"shrink",hover:"grow"}),display:"block",href:r,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},o.t("intro.learn_more.label")))),n&&!e&&E.createElement($,{marginBottom:"8",marginTop:"12",textAlign:"center"},E.createElement(n,{Link:j1,Text:I1}))))}var OE=()=>E.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Back"),E.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),iL=()=>E.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Info"),E.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),aL=({"aria-label":e="Info",onClick:t})=>{const n=bt();return E.createElement($,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:vt({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},E.createElement(iL,null))},FE=e=>{const t=B.useRef(null),n=B.useContext(bE),r=gh(e);return B.useEffect(()=>{if(n&&t.current&&r)return cL(t.current,r)},[n,r]),t},lL=()=>{const e="_rk_coolMode",t=document.getElementById(e);if(t)return t;const n=document.createElement("div");return n.setAttribute("id",e),n.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(n),n},k2=0;function cL(e,t){k2++;const n=[15,20,25,35,45],r=35;let o=[],i=!1,l=0,c=0;const d=lL();function f(){const j=n[Math.floor(Math.random()*n.length)],N=Math.random()*10,_=Math.random()*25,P=Math.random()*360,R=Math.random()*35*(Math.random()<=.5?-1:1),M=c-j/2,Q=l-j/2,V=Math.random()<=.5?-1:1,H=document.createElement("div");H.innerHTML=`<img src="${t}" width="${j}" height="${j}" style="border-radius: 25%">`,H.setAttribute("style",["position:absolute","will-change:transform",`top:${M}px`,`left:${Q}px`,`transform:rotate(${P}deg)`].join(";")),d.appendChild(H),o.push({direction:V,element:H,left:Q,size:j,speedHorz:N,speedUp:_,spinSpeed:R,spinVal:P,top:M})}function p(){for(const j of o)j.left=j.left-j.speedHorz*j.direction,j.top=j.top-j.speedUp,j.speedUp=Math.min(j.size,j.speedUp-1),j.spinVal=j.spinVal+j.spinSpeed,j.top>=Math.max(window.innerHeight,document.body.clientHeight)+j.size&&(o=o.filter(N=>N!==j),j.element.remove()),j.element.setAttribute("style",["position:absolute","will-change:transform",`top:${j.top}px`,`left:${j.left}px`,`transform:rotate(${j.spinVal}deg)`].join(";"))}let m;function g(){i&&o.length<r&&f(),p(),m=requestAnimationFrame(g)}g();const v="ontouchstart"in window||navigator.msMaxTouchPoints,w=v?"touchstart":"mousedown",b=v?"touchend":"mouseup",C=v?"touchmove":"mousemove",S=j=>{var N,_;"touches"in j?(l=(N=j.touches)==null?void 0:N[0].clientX,c=(_=j.touches)==null?void 0:_[0].clientY):(l=j.clientX,c=j.clientY)},I=j=>{S(j),i=!0},A=()=>{i=!1};return e.addEventListener(C,S,{passive:!1}),e.addEventListener(w,I),e.addEventListener(b,A),e.addEventListener("mouseleave",A),()=>{e.removeEventListener(C,S),e.removeEventListener(w,I),e.removeEventListener(b,A),e.removeEventListener("mouseleave",A);const j=setInterval(()=>{m&&o.length===0&&(cancelAnimationFrame(m),clearInterval(j),--k2===0&&d.remove())},500)}}var uL="g5kl0l0",LE=({as:e="button",currentlySelected:t=!1,iconBackground:n,iconUrl:r,name:o,onClick:i,ready:l,recent:c,testId:d,isRainbowKitConnector:f,...p})=>{const m=FE(r),[g,v]=E.useState(!1),{i18n:w}=E.useContext(xt);return E.createElement($,{display:"flex",flexDirection:"column",onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),ref:m},E.createElement($,{as:e,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:t?void 0:[uL,vt({active:"shrink"})],disabled:t,onClick:i,padding:"5",style:{willChange:"transform"},testId:d,transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...p},E.createElement($,{color:t?"accentColorForeground":"modalText",disabled:!l,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},E.createElement(Rt,{background:n,...!g&&f?{borderColor:"actionButtonBorder"}:{},useAsImage:!f,borderRadius:"6",height:"28",src:r,width:"28"}),E.createElement($,null,E.createElement($,{style:{marginTop:c?-2:void 0},maxWidth:"200"},o),c&&E.createElement(Ee,{color:t?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"medium"},w.t("connect.recent")))))))};LE.displayName="ModalSelection";var dL="rk-latest-id";function fL(e){localStorage.setItem(dL,e)}var lm=(e,t=1)=>{let n=e.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=Number.parseInt(n.substring(0,2),16),o=Number.parseInt(n.substring(2,4),16),i=Number.parseInt(n.substring(4,6),16);return t>1&&t<=100&&(t=t/100),`rgba(${r},${o},${i},${t})`},hL=e=>e?[lm(e,.2),lm(e,.14),lm(e,.1)]:null,pL=e=>/^#([0-9a-f]{3}){1,2}$/i.test(e),DE=async()=>(await fe(async()=>{const{default:e}=await import("./connect-UA7M4XW6-IY3X6Bmr.js");return{default:e}},[])).default,mL=()=>Vr(DE),gL=()=>E.createElement(Rt,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:DE,width:"48"}),UE=async()=>(await fe(async()=>{const{default:e}=await import("./create-FASO7PVG-D_rvSpre.js");return{default:e}},[])).default,$E=()=>Vr(UE),yL=()=>E.createElement(Rt,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:UE,width:"48"}),zE=async()=>(await fe(async()=>{const{default:e}=await import("./refresh-S4T5V5GX-CwqIaaxK.js");return{default:e}},[])).default,vL=()=>Vr(zE),wL=()=>E.createElement(Rt,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:zE,width:"48"}),WE=async()=>(await fe(async()=>{const{default:e}=await import("./scan-4UYSQ56Q-CjMz6-XC.js");return{default:e}},[])).default,qE=()=>Vr(WE),bL=()=>E.createElement(Rt,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:WE,width:"48"}),xL="_1vwt0cg0",CL="_1vwt0cg2 ju367v7a ju367v7v",kL="_1vwt0cg3",EL="_1vwt0cg4";function HE({ecc:e="medium",logoBackground:t,logoSize:n=50,logoUrl:r,size:o=200,uri:i}){const c=o-Number.parseInt("20",10)*2,d=gh(r);return E.createElement($,{borderColor:"generalBorder",borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:xL,padding:"20",width:"max"},E.createElement($,{style:{height:c,userSelect:"none",width:c},userSelect:"none"},E.createElement(Ur.Root,{errorCorrection:e,size:c,value:i},E.createElement(Ur.Cells,{radius:1}),E.createElement(Ur.Finder,{radius:.25}),d&&E.createElement(Ur.Arena,null,E.createElement("img",{alt:"Wallet Logo",src:d,style:{objectFit:"cover",height:"88%",width:"88%",borderRadius:"22.5%",backgroundColor:t}})))))}var VE=async()=>{switch(k1()){case"Arc":return(await fe(async()=>{const{default:t}=await import("./Arc-VDBY7LNS-BChRXCXW.js");return{default:t}},[])).default;case"Brave":return(await fe(async()=>{const{default:t}=await import("./Brave-BRAKJXDS-mq-Xo37j.js");return{default:t}},[])).default;case"Chrome":return(await fe(async()=>{const{default:t}=await import("./Chrome-65Q5P54Y-DR9MQEVr.js");return{default:t}},[])).default;case"Edge":return(await fe(async()=>{const{default:t}=await import("./Edge-XSPUTORV-DEoZslQE.js");return{default:t}},[])).default;case"Firefox":return(await fe(async()=>{const{default:t}=await import("./Firefox-AAHGJQIP-Bp_Hm04m.js");return{default:t}},[])).default;case"Opera":return(await fe(async()=>{const{default:t}=await import("./Opera-KQZLSACL-Cwv5MDFy.js");return{default:t}},[])).default;case"Safari":return(await fe(async()=>{const{default:t}=await import("./Safari-ZPL37GXR-C4Ggg6rz.js");return{default:t}},[])).default;default:return(await fe(async()=>{const{default:t}=await import("./Browser-76IHF3Y2-BMhRaC5Z.js");return{default:t}},[])).default}},AL=()=>Vr(VE),QE=async()=>{switch(A1()){case"Windows":return(await fe(async()=>{const{default:t}=await import("./Windows-PPTHQER6-BlyV2p7Y.js");return{default:t}},[])).default;case"macOS":return(await fe(async()=>{const{default:t}=await import("./Macos-MW4AE7LN-Vvm8Drw3.js");return{default:t}},[])).default;case"Linux":return(await fe(async()=>{const{default:t}=await import("./Linux-OO4TNCLJ-B0aw93n9.js");return{default:t}},[])).default;default:return(await fe(async()=>{const{default:t}=await import("./Linux-OO4TNCLJ-B0aw93n9.js");return{default:t}},[])).default}},SL=()=>Vr(QE);function jL({getWalletDownload:e,compactModeEnabled:t}){const r=Qc().filter(i=>i.isRainbowKitConnector).splice(0,5),{i18n:o}=B.useContext(xt);return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},r==null?void 0:r.filter(i=>{var l;return i.extensionDownloadUrl||i.desktopDownloadUrl||i.qrCode&&((l=i.downloadUrls)==null?void 0:l.qrCode)}).map(i=>{const{downloadUrls:l,iconBackground:c,iconUrl:d,id:f,name:p,qrCode:m}=i,g=(l==null?void 0:l.qrCode)&&m,v=!!i.extensionDownloadUrl,w=(l==null?void 0:l.qrCode)&&v,b=(l==null?void 0:l.qrCode)&&!!i.desktopDownloadUrl;return E.createElement($,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:i.id,width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},E.createElement(Rt,{background:c,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:d,width:"48"}),E.createElement($,{display:"flex",flexDirection:"column",gap:"2"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},p),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},w?o.t("get.mobile_and_extension.description"):b?o.t("get.mobile_and_desktop.description"):g?o.t("get.mobile.description"):v?o.t("get.extension.description"):null))),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(pn,{label:o.t("get.action.label"),onClick:()=>e(f),type:"secondary"})))})),E.createElement($,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},o.t("get.looking_for.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},t?o.t("get.looking_for.desktop.compact_description"):o.t("get.looking_for.desktop.wide_description"))))}var cm="44";function IL({changeWalletStep:e,compactModeEnabled:t,connectionError:n,onClose:r,qrCodeUri:o,reconnect:i,wallet:l}){const{downloadUrls:c,iconBackground:d,iconUrl:f,name:p,qrCode:m,ready:g,showWalletConnectModal:v,getDesktopUri:w}=l,b=!!w,C=C1(),{i18n:S}=B.useContext(xt),I=!!l.extensionDownloadUrl,A=(c==null?void 0:c.qrCode)&&I,j=(c==null?void 0:c.qrCode)&&!!l.desktopDownloadUrl,N=m&&o,_=async()=>{const Q=await(w==null?void 0:w());window.open(Q,C?"_blank":"_self")},P=v?{description:t?S.t("connect.walletconnect.description.compact"):S.t("connect.walletconnect.description.full"),label:S.t("connect.walletconnect.open.label"),onClick:()=>{r(),v()}}:N?{description:S.t("connect.secondary_action.get.description",{wallet:p}),label:S.t("connect.secondary_action.get.label"),onClick:()=>e(A||j?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:R}=xE(),M=R&&R<768;return B.useEffect(()=>{AL(),SL()},[]),E.createElement($,{display:"flex",flexDirection:"column",height:"full",width:"full"},N?E.createElement($,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},E.createElement(HE,{logoBackground:d,logoSize:t?60:72,logoUrl:f,size:t?318:M?Math.max(280,Math.min(R-308,382)):382,uri:o})):E.createElement($,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},E.createElement($,{borderRadius:"10",height:cm,overflow:"hidden"},E.createElement(Rt,{useAsImage:!l.isRainbowKitConnector,height:cm,src:f,width:cm})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},E.createElement(Ee,{color:"modalText",size:"18",weight:"bold"},g?S.t("connect.status.opening",{wallet:p}):I?S.t("connect.status.not_installed",{wallet:p}):S.t("connect.status.not_available",{wallet:p})),!g&&I?E.createElement($,{paddingTop:"20"},E.createElement(pn,{href:l.extensionDownloadUrl,label:S.t("connect.secondary_action.install.label"),type:"secondary"})):null,g&&!N&&E.createElement(E.Fragment,null,E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},E.createElement(Ee,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"medium"},S.t("connect.status.confirm"))),E.createElement($,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},n?E.createElement(pn,{label:S.t("connect.secondary_action.retry.label"),onClick:async()=>{b&&_(),i(l)}}):E.createElement($,{color:"modalTextSecondary"},E.createElement(Vc,null))))))),E.createElement($,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},g&&P&&E.createElement(E.Fragment,null,E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},P.description),E.createElement(pn,{label:P.label,onClick:P.onClick,type:"secondary"}))))}var um=({actionLabel:e,description:t,iconAccent:n,iconBackground:r,iconUrl:o,isCompact:i,onAction:l,title:c,url:d,variant:f})=>{const p=f==="browser",m=!p&&n&&hL(n);return E.createElement($,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:i?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},E.createElement($,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),p&&E.createElement($,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},E.createElement($,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},E.createElement($,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},E.createElement(Rt,{borderRadius:"full",height:"200",src:o,width:"200"})),E.createElement($,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},E.createElement(Rt,{borderRadius:"full",height:"200",src:o,width:"200"})))),!p&&m&&E.createElement($,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},E.createElement($,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${m[0]} 0%, ${m[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),E.createElement($,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${m[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),E.createElement($,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},E.createElement($,null,E.createElement(Rt,{height:"60",src:o,width:"60",...r?{background:r,borderColor:"generalBorder",borderRadius:"10"}:null})),E.createElement($,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},c),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},t),E.createElement($,{marginTop:"14",width:"max"},E.createElement(pn,{href:d,label:e,onClick:l,size:"medium"})))))};function NL({changeWalletStep:e,wallet:t}){const n=k1(),r=A1(),i=B.useContext(yh)==="compact",{desktop:l,desktopDownloadUrl:c,extension:d,extensionDownloadUrl:f,mobileDownloadUrl:p}=t,{i18n:m}=B.useContext(xt);return B.useEffect(()=>{$E(),qE(),vL(),mL()},[]),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},f&&E.createElement(um,{actionLabel:m.t("get_options.extension.download.label",{browser:n}),description:m.t("get_options.extension.description"),iconUrl:VE,isCompact:i,onAction:()=>e(d!=null&&d.instructions?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:m.t("get_options.extension.title",{wallet:t.name,browser:n}),url:f,variant:"browser"}),c&&E.createElement(um,{actionLabel:m.t("get_options.desktop.download.label",{platform:r}),description:m.t("get_options.desktop.description"),iconUrl:QE,isCompact:i,onAction:()=>e(l!=null&&l.instructions?"INSTRUCTIONS_DESKTOP":"CONNECT"),title:m.t("get_options.desktop.title",{wallet:t.name,platform:r}),url:c,variant:"desktop"}),p&&E.createElement(um,{actionLabel:m.t("get_options.mobile.download.label",{wallet:t.name}),description:m.t("get_options.mobile.description"),iconAccent:t.iconAccent,iconBackground:t.iconBackground,iconUrl:t.iconUrl,isCompact:i,onAction:()=>{e("DOWNLOAD")},title:m.t("get_options.mobile.title",{wallet:t.name}),variant:"app"})))}function PL({changeWalletStep:e,wallet:t}){const{downloadUrls:n,qrCode:r}=t,{i18n:o}=B.useContext(xt);return B.useEffect(()=>{$E(),qE()},[]),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},E.createElement($,{style:{maxWidth:220,textAlign:"center"}},E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"semibold"},o.t("get_mobile.description"))),E.createElement($,{height:"full"},n!=null&&n.qrCode?E.createElement(HE,{logoSize:0,size:268,uri:n.qrCode}):null),E.createElement($,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},E.createElement(pn,{label:o.t("get_mobile.continue.label"),onClick:()=>e(r!=null&&r.instructions?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var ko={connect:()=>E.createElement(gL,null),create:()=>E.createElement(yL,null),install:e=>E.createElement(Rt,{background:e.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:e.iconUrl,width:"48"}),refresh:()=>E.createElement(wL,null),scan:()=>E.createElement(bL,null)};function BL({connectWallet:e,wallet:t}){var r,o,i,l;const{i18n:n}=B.useContext(xt);return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},E.createElement($,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.qrCode)==null?void 0:r.instructions)==null?void 0:o.steps.map((c,d)=>{var f;return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:d},E.createElement($,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(f=ko[c.step])==null?void 0:f.call(ko,t)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},n.t(c.title,void 0,{rawKeyIfTranslationMissing:!0})),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(c.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},E.createElement(pn,{label:n.t("get_instructions.mobile.connect.label"),onClick:()=>e(t)}),E.createElement($,{as:"a",className:vt({active:"shrink",hover:"grow"}),display:"block",href:(l=(i=t==null?void 0:t.qrCode)==null?void 0:i.instructions)==null?void 0:l.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.mobile.learn_more.label")))))}function TL({wallet:e}){var n,r,o,i;const{i18n:t}=B.useContext(xt);return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},E.createElement($,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(r=(n=e==null?void 0:e.extension)==null?void 0:n.instructions)==null?void 0:r.steps.map((l,c)=>{var d;return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:c},E.createElement($,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(d=ko[l.step])==null?void 0:d.call(ko,e)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},t.t(l.title,void 0,{rawKeyIfTranslationMissing:!0})),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},t.t(l.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},E.createElement(pn,{label:t.t("get_instructions.extension.refresh.label"),onClick:window.location.reload.bind(window.location)}),E.createElement($,{as:"a",className:vt({active:"shrink",hover:"grow"}),display:"block",href:(i=(o=e==null?void 0:e.extension)==null?void 0:o.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},t.t("get_instructions.extension.learn_more.label")))))}function _L({connectWallet:e,wallet:t}){var r,o,i,l;const{i18n:n}=B.useContext(xt);return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},E.createElement($,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.desktop)==null?void 0:r.instructions)==null?void 0:o.steps.map((c,d)=>{var f;return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:d},E.createElement($,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(f=ko[c.step])==null?void 0:f.call(ko,t)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},n.t(c.title,void 0,{rawKeyIfTranslationMissing:!0})),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(c.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},E.createElement(pn,{label:n.t("get_instructions.desktop.connect.label"),onClick:()=>e(t)}),E.createElement($,{as:"a",className:vt({active:"shrink",hover:"grow"}),display:"block",href:(l=(i=t==null?void 0:t.desktop)==null?void 0:i.instructions)==null?void 0:l.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.desktop.learn_more.label")))))}function RL({onClose:e}){const t="rk_connect_title",[n,r]=B.useState(),[o,i]=B.useState(),[l,c]=B.useState(),d=!!(o!=null&&o.qrCode)&&l,[f,p]=B.useState(!1),g=B.useContext(yh)===Au.COMPACT,{disclaimer:v}=B.useContext(ku),{i18n:w}=B.useContext(xt),b=C1(),C=B.useRef(!1),{connector:S}=B.useContext(Eu),A=Qc(!S).filter(se=>se.ready||!!se.extensionDownloadUrl).sort((se,ie)=>se.groupIndex-ie.groupIndex),j=Qc(),N=sL(A,se=>se.groupName),_=["Recommended","Other","Popular","More","Others","Installed"];B.useEffect(()=>{S&&!C.current&&(L("CONNECT"),Q(S),C.current=!0)},[S]);const P=se=>{var ie,re;p(!1),se.ready&&((re=(ie=se==null?void 0:se.connect)==null?void 0:ie.call(se))==null||re.catch(()=>{p(!0)}))},R=async se=>{const ie=A.find(re=>se.id===re.id);ie!=null&&ie.getDesktopUri&&setTimeout(async()=>{var ue;const re=await((ue=ie==null?void 0:ie.getDesktopUri)==null?void 0:ue.call(ie));re&&window.open(re,b?"_blank":"_self")},0)},M=async se=>{var ue;const ie=A.find(Se=>se.id===Se.id),re=await((ue=ie==null?void 0:ie.getQrCodeUri)==null?void 0:ue.call(ie));c(re),setTimeout(()=>{i(ie),L("CONNECT")},re?0:50)},Q=async se=>{fL(se.id),se.ready&&(M(se),R(se)),P(se),r(se.id),se.ready||(i(se),L(se!=null&&se.extensionDownloadUrl?"DOWNLOAD_OPTIONS":"CONNECT"))},V=se=>{var Pe;const ie=j.find(Oe=>se===Oe.id),re=(Pe=ie==null?void 0:ie.downloadUrls)==null?void 0:Pe.qrCode,ue=!!(ie!=null&&ie.desktopDownloadUrl),Se=!!(ie!=null&&ie.extensionDownloadUrl);i(ie),L(re&&(Se||ue)?"DOWNLOAD_OPTIONS":re?"DOWNLOAD":ue?"INSTRUCTIONS_DESKTOP":"INSTRUCTIONS_EXTENSION")},H=()=>{r(void 0),i(void 0),c(void 0)},L=(se,ie=!1)=>{ie&&se==="GET"&&z==="GET"?H():!ie&&se==="GET"?O("GET"):!ie&&se==="CONNECT"&&O("CONNECT"),J(se)},[z,O]=B.useState("NONE"),[K,J]=B.useState("NONE");let F=null,Z=null,Y=null,U;B.useEffect(()=>{p(!1)},[K,o]);const he=!!(!!(o!=null&&o.extensionDownloadUrl)&&(o!=null&&o.mobileDownloadUrl));switch(K){case"NONE":F=E.createElement(C2,{getWallet:()=>L("GET")});break;case"LEARN_COMPACT":F=E.createElement(C2,{compactModeEnabled:g,getWallet:()=>L("GET")}),Z=w.t("intro.title"),Y="NONE";break;case"GET":F=E.createElement(jL,{getWalletDownload:V,compactModeEnabled:g}),Z=w.t("get.title"),Y=g?"LEARN_COMPACT":"NONE";break;case"CONNECT":F=o&&E.createElement(IL,{changeWalletStep:L,compactModeEnabled:g,connectionError:f,onClose:e,qrCodeUri:l,reconnect:P,wallet:o}),Z=d&&(o.name==="WalletConnect"?w.t("connect_scan.fallback_title"):w.t("connect_scan.title",{wallet:o.name})),Y=g?S?null:"NONE":null,U=g?S?()=>{}:H:()=>{};break;case"DOWNLOAD_OPTIONS":F=o&&E.createElement(NL,{changeWalletStep:L,wallet:o}),Z=o&&w.t("get_options.short_title",{wallet:o.name}),Y=S?"CONNECT":g?"NONE":z;break;case"DOWNLOAD":F=o&&E.createElement(PL,{changeWalletStep:L,wallet:o}),Z=o&&w.t("get_mobile.title",{wallet:o.name}),Y=he?"DOWNLOAD_OPTIONS":z;break;case"INSTRUCTIONS_MOBILE":F=o&&E.createElement(BL,{connectWallet:Q,wallet:o}),Z=o&&w.t("get_options.title",{wallet:g&&o.shortName||o.name}),Y="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":F=o&&E.createElement(TL,{wallet:o}),Z=o&&w.t("get_options.title",{wallet:g&&o.shortName||o.name}),Y="DOWNLOAD_OPTIONS";break;case"INSTRUCTIONS_DESKTOP":F=o&&E.createElement(_L,{connectWallet:Q,wallet:o}),Z=o&&w.t("get_options.title",{wallet:g&&o.shortName||o.name}),Y="DOWNLOAD_OPTIONS";break}return E.createElement($,{display:"flex",flexDirection:"row",style:{maxHeight:g?468:504}},(g?K==="NONE":!0)&&E.createElement($,{className:g?EL:kL,display:"flex",flexDirection:"column",marginTop:"16"},E.createElement($,{display:"flex",justifyContent:"space-between"},g&&v&&E.createElement($,{marginLeft:"16",width:"28"},E.createElement(aL,{onClick:()=>L("LEARN_COMPACT")})),g&&!v&&E.createElement($,{marginLeft:"16",width:"28"}),E.createElement($,{marginLeft:g?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},E.createElement(Ee,{as:"h1",color:"modalText",id:t,size:"18",weight:"heavy",testId:"connect-header-label"},w.t("connect.title"))),g&&E.createElement($,{marginRight:"16"},E.createElement(Ei,{onClose:e}))),E.createElement($,{className:CL,paddingBottom:"18"},Object.entries(N).map(([se,ie],re)=>ie.length>0&&E.createElement(B.Fragment,{key:re},se?E.createElement($,{marginBottom:"8",marginTop:"16",marginX:"6"},E.createElement(Ee,{color:se==="Installed"?"accentColor":"modalTextSecondary",size:"14",weight:"bold"},_.includes(se)?w.t(`connector_group.${se.toLowerCase()}`):se)):null,E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},ie.map(ue=>E.createElement(LE,{currentlySelected:ue.id===n,iconBackground:ue.iconBackground,iconUrl:ue.iconUrl,key:ue.id,name:ue.name,onClick:()=>Q(ue),ready:ue.ready,recent:ue.recent,testId:`wallet-option-${ue.id}`,isRainbowKitConnector:ue.isRainbowKitConnector})))))),g&&E.createElement(E.Fragment,null,E.createElement($,{background:"generalBorder",height:"1",marginTop:"-1"}),v?E.createElement($,{paddingX:"24",paddingY:"16",textAlign:"center"},E.createElement(v,{Link:j1,Text:I1})):E.createElement($,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},E.createElement($,{paddingY:"4"},E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},w.t("connect.new_to_ethereum.description"))),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},E.createElement($,{className:vt({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>L("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},w.t("connect.new_to_ethereum.learn_more.label"))))))),(g?K!=="NONE":!0)&&E.createElement(E.Fragment,null,!g&&E.createElement($,{background:"generalBorder",minWidth:"1",width:"1"}),E.createElement($,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},E.createElement($,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},E.createElement($,{width:"28"},Y&&E.createElement($,{as:"button",className:vt({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{Y&&L(Y,!0),U==null||U()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},E.createElement(OE,null))),E.createElement($,{display:"flex",justifyContent:"center",style:{flexGrow:1}},Z&&E.createElement(Ee,{color:"modalText",size:"18",textAlign:"center",weight:"heavy"},Z)),E.createElement(Ei,{onClose:e})),E.createElement($,{display:"flex",flexDirection:"column",style:{minHeight:g?396:432}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},F)))))}var ML="_1am14412",OL="_1am14410",FL="_1am14413",LL=({wallet:e})=>E.createElement("svg",{className:FL,viewBox:"0 0 86 86",width:"86",height:"86"},E.createElement("title",null,"Loading"),E.createElement("rect",{x:"3",y:"3",width:80,height:80,rx:20,ry:20,strokeDasharray:`${160/3} ${320/3}`,strokeDashoffset:160,className:ML,style:{stroke:(e==null?void 0:e.iconAccent)||"#0D3887"}}));function GE({onClose:e,wallet:t,connecting:n}){const{connect:r,iconBackground:o,iconUrl:i,id:l,name:c,getMobileUri:d,ready:f,shortName:p,showWalletConnectModal:m}=t,g=FE(i),v=B.useRef(!1),{i18n:w}=B.useContext(xt),b=B.useCallback(async()=>{if(l!=="walletConnect"&&(async()=>{const S=await(d==null?void 0:d());if(S)if(S&&EF({mobileUri:S,name:c}),S.startsWith("http")){const I=document.createElement("a");I.href=S,I.target="_blank",I.rel="noreferrer noopener",I.click()}else window.location.href=S})(),m){m(),e==null||e();return}try{await(r==null?void 0:r())}catch{}},[r,d,m,e,c,l]);return B.useEffect(()=>{n&&!v.current&&(b(),v.current=!0)},[n,b]),E.createElement($,{as:"button",color:f?"modalText":"modalTextSecondary",disabled:!f,fontFamily:"body",key:l,onClick:b,ref:g,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${l}`,type:"button",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},E.createElement($,{display:"flex",alignItems:"center",justifyContent:"center",paddingBottom:"8",paddingTop:"10",position:"relative"},n?E.createElement(LL,{wallet:t}):null,E.createElement(Rt,{background:o,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:i,width:"60"})),n?null:E.createElement($,{display:"flex",flexDirection:"column",textAlign:"center"},E.createElement(Ee,{as:"h2",color:t.ready?"modalText":"modalTextSecondary",size:"13",weight:"medium"},E.createElement($,{as:"span",position:"relative"},p??c,!t.ready&&" (unsupported)")),t.recent&&E.createElement(Ee,{color:"accentColor",size:"12",weight:"medium"},w.t("connect.recent")))))}function DL({onClose:e}){var v;const t="rk_connect_title",n=Qc().filter(w=>w.isRainbowKitConnector),{disclaimer:r,learnMoreUrl:o}=B.useContext(ku);let i=null,l=null,c=!1,d=null;const[f,p]=B.useState("CONNECT"),{i18n:m}=B.useContext(xt),g=Cu();switch(f){case"CONNECT":{i=m.t("connect.title"),c=!0,l=E.createElement($,null,E.createElement($,{background:"profileForeground",className:OL,display:"flex",paddingBottom:"20",paddingTop:"6",paddingX:"20",style:{gap:"calc((100% - 40px - 240px + 47px) / 4)"}},n.filter(w=>w.ready).map(w=>E.createElement($,{key:w.id,width:"60"},E.createElement(GE,{onClose:e,wallet:w})))),E.createElement($,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},E.createElement($,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},E.createElement(Ee,{color:"modalText",size:"16",weight:"bold"},m.t("intro.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"16"},m.t("intro.description")))),E.createElement($,{paddingTop:"32",paddingX:"20"},E.createElement($,{display:"flex",gap:"14",justifyContent:"center"},E.createElement(pn,{label:m.t("intro.get.label"),onClick:()=>p("GET"),size:"large",type:"secondary"}),E.createElement(pn,{href:o,label:m.t("intro.learn_more.label"),size:"large",type:"secondary"}))),r&&E.createElement($,{marginTop:"28",marginX:"32",textAlign:"center"},E.createElement(r,{Link:j1,Text:I1})));break}case"GET":{i=m.t("get.title"),d="CONNECT";const w=(v=n==null?void 0:n.filter(b=>{var C,S,I;return((C=b.downloadUrls)==null?void 0:C.ios)||((S=b.downloadUrls)==null?void 0:S.android)||((I=b.downloadUrls)==null?void 0:I.mobile)}))==null?void 0:v.splice(0,3);l=E.createElement($,null,E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},w.map((b,C)=>{const{downloadUrls:S,iconBackground:I,iconUrl:A,name:j}=b;return!(S!=null&&S.ios)&&!(S!=null&&S.android)&&!(S!=null&&S.mobile)?null:E.createElement($,{display:"flex",gap:"16",key:b.id,paddingX:"20",width:"full"},E.createElement($,{style:{minHeight:48,minWidth:48}},E.createElement(Rt,{background:I,borderColor:"generalBorder",borderRadius:"10",height:"48",src:A,width:"48"})),E.createElement($,{display:"flex",flexDirection:"column",width:"full"},E.createElement($,{alignItems:"center",display:"flex",height:"48"},E.createElement($,{width:"full"},E.createElement(Ee,{color:"modalText",size:"18",weight:"bold"},j)),E.createElement(pn,{href:(g?S==null?void 0:S.ios:S==null?void 0:S.android)||(S==null?void 0:S.mobile),label:m.t("get.action.label"),size:"small",type:"secondary"})),C<w.length-1&&E.createElement($,{background:"generalBorderDim",height:"1",marginY:"10",width:"full"})))})),E.createElement($,{style:{marginBottom:"42px"}}),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"36",paddingX:"36",style:{textAlign:"center"}},E.createElement($,{display:"flex",flexDirection:"column",gap:"12",textAlign:"center"},E.createElement(Ee,{color:"modalText",size:"16",weight:"bold"},m.t("get.looking_for.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"16"},m.t("get.looking_for.mobile.description")))));break}}return E.createElement($,{display:"flex",flexDirection:"column",paddingBottom:"36"},E.createElement($,{background:c?"profileForeground":"modalBackground",display:"flex",flexDirection:"column",paddingBottom:"4",paddingTop:"14"},E.createElement($,{display:"flex",justifyContent:"center",paddingBottom:"6",paddingX:"20",position:"relative"},d&&E.createElement($,{display:"flex",position:"absolute",style:{left:0,marginBottom:-20,marginTop:-20}},E.createElement($,{alignItems:"center",as:"button",className:vt({active:"shrinkSm",hover:"growLg"}),color:"accentColor",display:"flex",marginLeft:"4",marginTop:"20",onClick:()=>p(d),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},E.createElement(OE,null))),E.createElement($,{marginTop:"4",textAlign:"center",width:"full"},E.createElement(Ee,{as:"h1",color:"modalText",id:t,size:"20",weight:"bold"},i)),E.createElement($,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},E.createElement($,{style:{marginBottom:-20,marginTop:-20}},E.createElement(Ei,{onClose:e}))))),E.createElement($,{display:"flex",flexDirection:"column"},l))}var UL=({onClose:e})=>{const{connector:t}=B.useContext(Eu),{i18n:n}=B.useContext(xt),r=(t==null?void 0:t.name)||"";return E.createElement($,null,E.createElement($,{display:"flex",paddingBottom:"32",justifyContent:"center",alignItems:"center",background:"profileForeground",flexDirection:"column"},E.createElement($,{width:"full",display:"flex",justifyContent:"flex-end",marginTop:"18",marginRight:"24"},E.createElement(Ei,{onClose:e})),E.createElement($,{width:"60"},E.createElement(GE,{onClose:e,wallet:t,connecting:!0})),E.createElement($,{marginTop:"20"},E.createElement(Ee,{textAlign:"center",color:"modalText",size:"18",weight:"semibold"},n.t("connect.status.connect_mobile",{wallet:r}))),E.createElement($,{maxWidth:"full",marginTop:"8"},E.createElement(Ee,{textAlign:"center",color:"modalText",size:"16",weight:"medium"},n.t("connect.status.confirm_mobile",{wallet:r})))))};function $L({onClose:e}){const{connector:t}=B.useContext(Eu);return bt()?t?E.createElement(UL,{onClose:e}):E.createElement(DL,{onClose:e}):E.createElement(RL,{onClose:e})}function zL({onClose:e,open:t}){const n="rk_connect_title",r=v1(),{disconnect:o}=r1(),{isConnecting:i}=zt(),l=E.useCallback(()=>{e(),o()},[e,o]),c=E.useCallback(()=>{i&&o(),e()},[e,o,i]);return r==="disconnected"?E.createElement(Tf,{onClose:c,open:t,titleId:n},E.createElement(_f,{bottomSheetOnMobile:!0,padding:"0",wide:!0},E.createElement($L,{onClose:c}))):r==="unauthenticated"?E.createElement(Tf,{onClose:l,open:t,titleId:n},E.createElement(_f,{bottomSheetOnMobile:!0,padding:"0"},E.createElement(CF,{onClose:l,onCloseModal:e}))):null}function dm(){const[e,t]=B.useState(!1);return{closeModal:B.useCallback(()=>t(!1),[]),isModalOpen:e,openModal:B.useCallback(()=>t(!0),[])}}var ul=B.createContext({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1,isWalletConnectModalOpen:!1,setIsWalletConnectModalOpen:()=>{}});function WL({children:e}){const{closeModal:t,isModalOpen:n,openModal:r}=dm(),{closeModal:o,isModalOpen:i,openModal:l}=dm(),{closeModal:c,isModalOpen:d,openModal:f}=dm(),[p,m]=B.useState(!1),g=v1(),{chainId:v}=zt(),{chains:w}=jt(),b=w.some(I=>I.id===v),C=B.useCallback(({keepConnectModalOpen:I=!1}={})=>{I||t(),o(),c()},[t,o,c]),S=mh()==="unauthenticated";return JC({onConnect:()=>C({keepConnectModalOpen:S}),onDisconnect:()=>C()}),B.useEffect(()=>{S&&C()},[S,C]),E.createElement(ul.Provider,{value:B.useMemo(()=>({accountModalOpen:i,chainModalOpen:d,connectModalOpen:n,isWalletConnectModalOpen:p,openAccountModal:b&&g==="connected"?l:void 0,openChainModal:g==="connected"?f:void 0,openConnectModal:g==="disconnected"||g==="unauthenticated"?r:void 0,setIsWalletConnectModalOpen:m}),[g,i,d,n,l,f,r,b,p])},e,E.createElement(zL,{onClose:t,open:n}),E.createElement(JF,{onClose:o,open:i}),E.createElement(oL,{onClose:c,open:d}))}function qL(){const{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}=B.useContext(ul);return{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}}function HL(){const{accountModalOpen:e,openAccountModal:t}=B.useContext(ul);return{accountModalOpen:e,openAccountModal:t}}function VL(){const{chainModalOpen:e,openChainModal:t}=B.useContext(ul);return{chainModalOpen:e,openChainModal:t}}function KE(){const{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}=B.useContext(ul);return{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}}function QL(){const{connectModalOpen:e,openConnectModal:t}=B.useContext(ul),{isWalletConnectModalOpen:n}=KE();return{connectModalOpen:e||n,openConnectModal:t}}var fm=()=>{};function N1({children:e}){const t=IO(),{address:n}=zt(),{chainId:r}=zt(),{chains:o}=jt(),i=o.some(H=>H.id===r),l=SO(),c=mh()??void 0,d=r?l[r]:void 0,f=(d==null?void 0:d.name)??void 0,p=(d==null?void 0:d.iconUrl)??void 0,m=(d==null?void 0:d.iconBackground)??void 0,g=gh(p),v=B.useContext(x1),w=vE().some(({status:H})=>H==="pending")&&v,{showBalance:b}=fE(),S=typeof b=="boolean"?b:b?nE(b)[bt()?"smallScreen":"largeScreen"]:!0,{balance:I,ensAvatar:A,ensName:j}=pE({address:n,includeBalance:S}),N=I?`${BE(Number.parseFloat(I.formatted))} ${I.symbol}`:void 0,{openConnectModal:_}=QL(),{openChainModal:P}=VL(),{openAccountModal:R}=HL(),{accountModalOpen:M,chainModalOpen:Q,connectModalOpen:V}=qL();return E.createElement(E.Fragment,null,e({account:n?{address:n,balanceDecimals:I==null?void 0:I.decimals,balanceFormatted:I==null?void 0:I.formatted,balanceSymbol:I==null?void 0:I.symbol,displayBalance:N,displayName:j?_E(j):TE(n),ensAvatar:A??void 0,ensName:j??void 0,hasPendingTransactions:w}:void 0,accountModalOpen:M,authenticationStatus:c,chain:r?{hasIcon:!!p,iconBackground:m,iconUrl:g,id:r,name:f,unsupported:!i}:void 0,chainModalOpen:Q,connectModalOpen:V,mounted:t(),openAccountModal:R??fm,openChainModal:P??fm,openConnectModal:_??fm}))}N1.displayName="ConnectButton.Custom";var lc={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function vh({accountStatus:e=lc.accountStatus,chainStatus:t=lc.chainStatus,label:n=lc.label,showBalance:r=lc.showBalance}){const o=Ni(),i=v1(),{setShowBalance:l}=fE(),[c,d]=B.useState(!1),{i18n:f}=B.useContext(xt);return B.useEffect(()=>{l(r),c||d(!0)},[r,l]),c?E.createElement(N1,null,({account:p,chain:m,mounted:g,openAccountModal:v,openChainModal:w,openConnectModal:b})=>{const C=g&&i!=="loading",S=(m==null?void 0:m.unsupported)??!1;return E.createElement($,{display:"flex",gap:"12",...!C&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},C&&p&&i==="connected"?E.createElement(E.Fragment,null,m&&(o.length>1||S)&&E.createElement($,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:S?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:vt({active:"shrink",hover:"grow"}),color:S?"connectButtonTextError":"connectButtonText",display:aa(t,I=>I==="none"?"none":"flex"),fontFamily:"body",fontWeight:"bold",gap:"6",key:S?"unsupported":"supported",onClick:w,paddingX:"10",paddingY:"8",testId:S?"wrong-network-button":"chain-button",transition:"default",type:"button"},S?E.createElement($,{alignItems:"center",display:"flex",height:"24",paddingX:"4"},f.t("connect_wallet.wrong_network.label")):E.createElement($,{alignItems:"center",display:"flex",gap:"6"},m.hasIcon?E.createElement($,{display:aa(t,I=>I==="full"||I==="icon"?"block":"none"),height:"24",width:"24"},E.createElement(Rt,{alt:m.name??"Chain icon",background:m.iconBackground,borderRadius:"full",height:"24",src:m.iconUrl,width:"24"})):null,E.createElement($,{display:aa(t,I=>I==="icon"&&!m.iconUrl||I==="full"||I==="name"?"block":"none")},m.name??m.id)),E.createElement(Kx,null)),!S&&E.createElement($,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:vt({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:v,testId:"account-button",transition:"default",type:"button"},p.displayBalance&&E.createElement($,{display:aa(r,I=>I?"block":"none"),padding:"8",paddingLeft:"12"},p.displayBalance),E.createElement($,{background:nE(r)[bt()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},E.createElement($,{alignItems:"center",display:"flex",gap:"6",height:"24"},E.createElement($,{display:aa(e,I=>I==="full"||I==="avatar"?"block":"none")},E.createElement(cE,{address:p.address,imageUrl:p.ensAvatar,loading:p.hasPendingTransactions,size:24})),E.createElement($,{alignItems:"center",display:"flex",gap:"6"},E.createElement($,{display:aa(e,I=>I==="full"||I==="address"?"block":"none")},p.displayName),E.createElement(Kx,null)))))):E.createElement($,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:vt({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:b,paddingX:"14",testId:"connect-button",transition:"default",type:"button"},g&&n==="Connect Wallet"?f.t("connect_wallet.label"):n))}):E.createElement(E.Fragment,null)}vh.__defaultProps=lc;vh.Custom=N1;var YE=({appName:e,appDescription:t,appUrl:n,appIcon:r})=>({name:e,description:t??e,url:n??(typeof window<"u"?window.location.origin:""),icons:[...r?[r]:[]]});function GL(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0))}function KL(e,t){const n=[];for(const r of e)n.some(o=>o[t]===r[t])||n.push(r);return n}var YL=(e,{projectId:t,walletConnectParameters:n,appName:r,appDescription:o,appUrl:i,appIcon:l})=>{if(!e.length)throw new Error("No wallet list was provided");for(const{wallets:v,groupName:w}of e)if(!v.length)throw new Error(`No wallets provided for group: ${w}`);let c=-1;const d=[],f=[],p=[],m=YE({appName:r,appDescription:o,appUrl:i,appIcon:l});for(const[v,{groupName:w,wallets:b}]of e.entries())for(const C of b){c++;const S=C({projectId:t,appName:r,appIcon:l,options:{metadata:m,...n},walletConnectParameters:{metadata:m,...n}});if(S!=null&&S.iconAccent&&!pL(S==null?void 0:S.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${S.name}`);const I={...S,groupIndex:v+1,groupName:w,index:c};typeof S.hidden=="function"?p.push(I):f.push(I)}const g=KL([...f,...p],"id");for(const{createConnector:v,groupIndex:w,groupName:b,hidden:C,...S}of g){if(typeof C=="function"&&C())continue;const I=N=>({rkDetails:GL({...S,groupIndex:w,groupName:b,isRainbowKitConnector:!0,...N||{}})});S.id==="walletConnect"&&d.push(v(I({isWalletConnectModalConnector:!0,showQrModal:!0})));const j=v(I());d.push(j)}return d},E2=new Map,JL=({projectId:e,walletConnectParameters:t,rkDetailsShowQrModal:n,rkDetailsIsWalletConnectModalConnector:r})=>{let o={telemetryEnabled:!1,...t||{},projectId:e,showQrModal:!1};n&&(o={...o,showQrModal:!0}),"customStoragePrefix"in o||(o={...o,customStoragePrefix:r?"clientOne":"clientTwo"});const i=JSON.stringify(o),l=E2.get(i);if(l)return l;const c=y1(o);return E2.set(i,c),c};function ZL({projectId:e,walletDetails:t,walletConnectParameters:n}){return r=>({...JL({projectId:e,walletConnectParameters:n,rkDetailsShowQrModal:t.rkDetails.showQrModal,rkDetailsIsWalletConnectModalConnector:t.rkDetails.isWalletConnectModalConnector})(r),...t})}function P1({projectId:e,walletConnectParameters:t}){const n="21fef48091f12692cad574a6f7753643";if(!e||e==="")throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");return e==="YOUR_PROJECT_ID"&&(e=n),r=>ZL({projectId:e,walletDetails:r,walletConnectParameters:t})}function JE(e){const t=typeof window<"u"?window:void 0;if(typeof t>"u"||typeof t.ethereum>"u")return;const n=t.ethereum.providers;return n?n.find(r=>r[e]):t.ethereum[e]?t.ethereum:void 0}function ZE(e){const t=(n,r)=>{const[o,...i]=r.split("."),l=n[o];if(l)return i.length===0?l:t(l,i.join("."))};if(typeof window<"u")return t(window,e)}function XL({flag:e,namespace:t}){return!!(t&&typeof ZE(t)<"u"||typeof JE(e)<"u")}function eD({flag:e,namespace:t}){var o;const n=typeof window<"u"?window:void 0;if(typeof n>"u")return;if(t){const i=ZE(t);if(i)return i}const r=(o=n.ethereum)==null?void 0:o.providers;{const i=JE(e);if(i)return i}return typeof r<"u"&&r.length>0?r[0]:n.ethereum}function tD(e){return t=>{const n=e?{target:()=>({id:t.rkDetails.id,name:t.rkDetails.name,provider:e})}:{};return r=>({...lh(n)(r),...t})}}function nD({flag:e,namespace:t,target:n}){const r=n||eD({flag:e,namespace:t});return tD(r)}var XE=({appName:e,appIcon:t})=>{const{preference:n,...r}=XE;return{id:"baseAccount",name:"Base Account",shortName:"Base Account",rdns:"app.base.account",iconUrl:async()=>(await fe(async()=>{const{default:o}=await import("./baseAccount-44UITRK7-CsjdbWCf.js");return{default:o}},[])).default,iconAccent:"#0000FF",iconBackground:"#0000FF",installed:!0,createConnector:o=>{const i=HM({appName:e,appLogoUrl:t,...r,preference:{telemetry:!1,...n||{}}});return l=>({...i(l),...o})}}};function rD(e){return!(!(e!=null&&e.isMetaMask)||e.isBraveWallet&&!e._events&&!e._state||e.isApexWallet||e.isAvalanche||e.isBackpack||e.isBifrost||e.isBitKeep||e.isBitski||e.isBinance||e.isBlockWallet||e.isCoinbaseWallet||e.isDawn||e.isEnkrypt||e.isExodus||e.isFrame||e.isFrontier||e.isGamestop||e.isHyperPay||e.isImToken||e.isKuCoinWallet||e.isMathWallet||e.isNestWallet||e.isOkxWallet||e.isOKExWallet||e.isOneInchIOSWallet||e.isOneInchAndroidWallet||e.isOpera||e.isPhantom||e.isZilPay||e.isPortal||e.isxPortal||e.isRabby||e.isRainbow||e.isStatus||e.isTalisman||e.isTally||e.isTokenPocket||e.isTokenary||e.isTrust||e.isTrustWallet||e.isCTRL||e.isZeal||e.isCoin98||e.isMEWwallet||e.isSafeheron||e.isSafePal||e.isWigwam||e.isZerion||e.__seif)}var e8=({projectId:e,walletConnectParameters:t})=>{const{...n}=e8,r=typeof window<"u"?rD(window.ethereum):!1,o=!r&&!bt(),i=r||bt();return{id:"metaMask",name:"MetaMask",rdns:"io.metamask",iconUrl:async()=>(await fe(async()=>{const{default:l}=await import("./metaMaskWallet-SITXT2FV-BlemcphV.js");return{default:l}},[])).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:r||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},mobile:{getUri:i?l=>l:void 0},qrCode:o?{getUri:l=>`https://metamask.app.link/wc?uri=${encodeURIComponent(l)}`,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.qr_code.step1.description",step:"install",title:"wallet_connectors.metamask.qr_code.step1.title"},{description:"wallet_connectors.metamask.qr_code.step2.description",step:"create",title:"wallet_connectors.metamask.qr_code.step2.title"},{description:"wallet_connectors.metamask.qr_code.step3.description",step:"refresh",title:"wallet_connectors.metamask.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.extension.step1.description",step:"install",title:"wallet_connectors.metamask.extension.step1.title"},{description:"wallet_connectors.metamask.extension.step2.description",step:"create",title:"wallet_connectors.metamask.extension.step2.title"},{description:"wallet_connectors.metamask.extension.step3.description",step:"refresh",title:"wallet_connectors.metamask.extension.step3.title"}]}},createConnector:o?P1({projectId:e,walletConnectParameters:t}):(l=>c=>{var f,p,m;const d=m1({dappMetadata:{connector:"rainbowkit",name:(f=t==null?void 0:t.metadata)==null?void 0:f.name,iconUrl:(p=t==null?void 0:t.metadata)==null?void 0:p.icons[0],url:(m=t==null?void 0:t.metadata)==null?void 0:m.url},headless:!0,checkInstallationImmediately:!1,enableAnalytics:!1,...n})(c);return{...d,...l,getChainId:async()=>{var g;try{return await d.getChainId()}catch{return((g=c.chains[0])==null?void 0:g.id)??1}}}})}},oD=({projectId:e,walletConnectParameters:t})=>{const n=XL({flag:"isRainbow"}),r=!n,o=i=>oE()?i:Cu()?`rainbow://wc?uri=${encodeURIComponent(i)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(i)}&connector=rainbowkit`;return{id:"rainbow",name:"Rainbow",rdns:"me.rainbow",iconUrl:async()=>(await fe(async()=>{const{default:i}=await import("./rainbowWallet-O26YNBMX-DUhYus-9.js");return{default:i}},[])).default,iconBackground:"#0c2f78",installed:r?void 0:n,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},mobile:{getUri:r?o:void 0},qrCode:r?{getUri:o,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"wallet_connectors.rainbow.qr_code.step1.description",step:"install",title:"wallet_connectors.rainbow.qr_code.step1.title"},{description:"wallet_connectors.rainbow.qr_code.step2.description",step:"create",title:"wallet_connectors.rainbow.qr_code.step2.title"},{description:"wallet_connectors.rainbow.qr_code.step3.description",step:"scan",title:"wallet_connectors.rainbow.qr_code.step3.title"}]}}:void 0,createConnector:r?P1({projectId:e,walletConnectParameters:t}):nD({flag:"isRainbow"})}},sD=()=>({id:"safe",name:"Safe",iconAccent:"#12ff80",iconBackground:"#fff",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./safeWallet-5MNKTR5Z-D-5imDLD.js");return{default:e}},[])).default,installed:!(typeof window>"u")&&(window==null?void 0:window.parent)!==window,downloadUrls:{},createConnector:e=>t=>({...g1()(t),...e})}),iD=({projectId:e,options:t})=>({id:"walletConnect",name:"WalletConnect",installed:void 0,iconUrl:async()=>(await fe(async()=>{const{default:r}=await import("./walletConnectWallet-YHWKVTDY-D3lyiczV.js");return{default:r}},[])).default,iconBackground:"#3b99fc",qrCode:{getUri:r=>r},createConnector:P1({projectId:e,walletConnectParameters:t})}),aD=e=>e.reduce((n,r)=>{const o=r.id;return n[o]=zC(),n},{}),lD=({appName:e,appDescription:t,appUrl:n,appIcon:r,wallets:o,projectId:i,walletConnectParameters:l,...c})=>{const{transports:d,chains:f,...p}=c,m=YE({appName:e,appDescription:t,appUrl:n,appIcon:r}),g=YL(o||[{groupName:"Popular",wallets:[sD,oD,XE,e8,iD]}],{projectId:i,appName:e,appDescription:t,appUrl:n,appIcon:r,walletConnectParameters:{metadata:m,...l}});return _T({connectors:g,chains:f,transports:d||aD(f),...p})};function Og(e){return e.replace(/\B(?=(\d{3})+(?!\d))/g,",")}function ht(e){if(e==null||e==="")return null;try{return BigInt(e)}catch{return null}}function t8(e,t,n=2){const r=typeof e=="bigint"?e:ht(e);if(r===null)return"—";const o=r<0n,i=o?-r:r,l=10n**BigInt(t),c=i/l,d=i%l;let f="";if(n>0&&t>0&&(f=d.toString().padStart(t,"0").slice(0,n).replace(/0+$/,"")),i>0n&&c===0n&&f===""){const p=n===0?"1":`0.${"0".repeat(n-1)}1`;return`${o?"-":""}<${p}`}return`${o?"-":""}${Og(c.toString())}${f?`.${f}`:""}`}function be(e,t=2){return t8(e,18,t)}function Wn(e,t=2){return t8(e,6,t)}function Fe(e){if(typeof e=="number")return Number.isFinite(e)?Og(Math.trunc(e).toString()):"—";const t=typeof e=="bigint"?e:ht(e);if(t===null)return"—";const n=t<0n;return`${n?"-":""}${Og((n?-t:t).toString())}`}function Bn(e){return e==null||!Number.isFinite(e)?"—":`${(e/100).toFixed(2)}%`}function dn(e){const t=ht(e);return t===null||t===0n}function hm(e,t){const n=ht(e)??0n,r=ht(t)??0n;return n<r?-1:n>r?1:0}function Fg(e){return e.reduce((t,n)=>t+(ht(n)??0n),0n).toString()}function wh(e){return e.length<=13?e:`${e.slice(0,6)}…${e.slice(-4)}`}function Lg(e){return e.length<=18?e:`${e.slice(0,10)}…${e.slice(-6)}`}function cD(e){return/^0x[0-9a-fA-F]{40}$/.test(e)}function ar(e){return Number.isFinite(e)?`${new Date(e*1e3).toISOString().slice(0,16).replace("T"," ")} UTC`:"—"}function Rf(e){return Number.isFinite(e)?new Date(e*1e3).toISOString().slice(0,10):"—"}function Ya(e,t,n){return t+e*n}function bh(e){const t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),o=Math.floor(t%3600/60),i=t%60,l=c=>c.toString().padStart(2,"0");return`${n}d ${l(r)}:${l(o)}:${l(i)}`}function n8(e){return e%86400===0?`${e/86400} days`:e%3600===0?`${e/3600} hours`:`${Fe(e)} s`}function B1(e){return e===8453?"https://basescan.org":e===84532?"https://sepolia.basescan.org":null}function uD(e){return B1(e)?"Basescan":null}function dD(e,t=Date.now()){const n=Math.max(0,Math.round((t-e)/1e3));if(n<5)return"just now";if(n<60)return`${n}s ago`;const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function r8(e,t){const n=B1(e);return n?`${n}/tx/${t}`:null}function fD(e,t){const n=B1(e);return n?`${n}/address/${t}`:null}function mc(e){return/^\d+(\.\d+)?$/.test(e.trim())?/[1-9]/.test(e):!1}function hD(e){return/^\d+$/.test(e.trim())&&Number(e)>0}function Dg(e,t){const n=/^(\d+)(?:\.(\d+))?$/.exec(e.trim());if(!n)return null;const r=n[1]??"0",o=(n[2]??"").slice(0,t).padEnd(t,"0");try{return BigInt(r)*10n**BigInt(t)+BigInt(o||"0")}catch{return null}}function ks(e){return e instanceof Error?e.message:String(e)}function A2(e,t){return e==null||!Number.isFinite(e)||!t?"—":`${(e*100/t).toFixed(2)}%`}function Ja(e){const t=typeof e=="bigint"?e:ht(e);if(t===null)return"—";const n=t<0n,r=(n?-t:t)/10000n,o=Number(r)/100,i=n?"-":"";return o>=1e6?`${i}$${(o/1e6).toFixed(o>=1e7?0:1)}M`:o>=1e3?`${i}$${(o/1e3).toFixed(o>=1e4?0:1)}k`:o>=100?`${i}$${o.toFixed(0)}`:`${i}$${o.toFixed(2)}`}let cc=0;const Gc=new Map,uc=new Map,Ug=new Set;function $g({clear:e=!1,confirmed:t=!1}={}){if(cc++,uc.clear(),e)Gc.clear();else for(const n of Gc.values())n.at=0;for(const n of Ug)n(e,t)}function Qs(e){const t=e!==null?Gc.get(e):void 0;return t?{key:e,data:t.data,error:null,loading:!1,reconciling:!1,updatedAt:t.at}:{key:e,data:null,error:null,loading:e!==null,reconciling:!1,updatedAt:null}}function tt(e,t,n=6e4){const[r,o]=B.useState(()=>Qs(e)),i=B.useRef(t);i.current=t;const l=B.useRef(e);l.current=e;const c=B.useRef(!0),d=B.useRef(0);B.useEffect(()=>(c.current=!0,()=>{c.current=!1}),[]);const f=B.useCallback((g,v=!1)=>{const w=cc;o(C=>C.key===g?{...C,loading:!0,error:null,reconciling:v||C.reconciling}:{...Qs(g),loading:!0,reconciling:v});let b=uc.get(g);if(!b){const C=i.current();b=C,uc.set(g,C),C.then(S=>{w===cc&&Gc.set(g,{data:S,at:Date.now()})}).catch(()=>{}).finally(()=>{uc.get(g)===C&&uc.delete(g)})}b.then(C=>{!c.current||l.current!==g||w!==cc||o({key:g,data:C,error:null,loading:!1,reconciling:!1,updatedAt:Date.now()})},C=>{!c.current||l.current!==g||w!==cc||o(S=>({...S.key===g?S:Qs(g),key:g,loading:!1,error:ks(C)}))})},[]);B.useEffect(()=>{if(e===null){o(Qs(null));return}const g=Gc.get(e);g&&(o(Qs(e)),Date.now()-g.at<n)||f(e)},[e,f,n]),B.useEffect(()=>{const g=(v,w)=>{l.current!==null&&(v&&l.current!=="config"&&o(Qs(l.current)),f(l.current,w&&!v))};return Ug.add(g),()=>{Ug.delete(g)}},[f]);const p=B.useCallback(()=>{l.current!==null&&f(l.current)},[f]);B.useEffect(()=>{d.current=0},[e]),B.useEffect(()=>{if(!r.error){r.loading||(d.current=0);return}if(e===null||d.current>=2||!/rate limit|network error|HTTP 5\d\d|timeout/i.test(r.error))return;const g=window.setTimeout(()=>{d.current+=1,f(e)},25e3*(d.current+1));return()=>window.clearTimeout(g)},[e,r.error,r.loading,f]);const m=r.key===e?r:Qs(e);return{data:m.data,error:m.error,loading:m.loading,reconciling:m.reconciling,updatedAt:m.updatedAt,refresh:p}}const pD=[{label:"Market",items:[{id:"stake",label:"Sellers"}]},{label:"You",items:[{id:"positions",label:"My positions"},{id:"rewards",label:"Rewards"},{id:"seller",label:"Seller"}]},{label:"Protocol",items:[{id:"network",label:"Network"},{id:"addresses",label:"Addresses"}]}],mD=["stake","positions","rewards","seller","network","addresses"],gD={overview:"stake",pools:"stake",usage:"network",emissions:"network",verification:"network"};function yD(e){return mD.some(t=>t===e)}function vD(e){const t=e.startsWith("#")?e.slice(1):e,[n="",r=""]=t.split("?"),o=n.split("/").filter(Boolean),i=o[0],l=i!==void 0?gD[i]:void 0;return{page:yD(i)?i:l??"stake",segments:o.slice(1),query:new URLSearchParams(r),redirected:l!==void 0}}function S2(){const e=vD(window.location.hash);return e.redirected&&window.history.replaceState(null,"",Ai(e.page)),e}function wD(){const[e,t]=B.useState(S2);return B.useEffect(()=>{const n=()=>t(S2());return window.addEventListener("hashchange",n),()=>window.removeEventListener("hashchange",n)},[]),e}function Ai(e,...t){return`#/${[e,...t].join("/")}`}const o8="ants.dashboard.started-jobs";function bD(){try{const e=JSON.parse(sessionStorage.getItem(o8)??"[]");return new Set(Array.isArray(e)?e.filter(t=>typeof t=="string").slice(-100):[])}catch{return new Set}}function xD(e,t){const n=new Set([...e,t].slice(-100));try{sessionStorage.setItem(o8,JSON.stringify([...n]))}catch{}return n}const s8=B.createContext(null),i8=()=>B.useContext(s8);function CD(e,t){var n,r;return e.browserWallet?t.status==="connecting"||t.status==="reconnecting"?{label:"Connecting wallet…",reason:"Wait for the wallet connection to finish."}:t.status!=="connected"||!t.address?{label:"Connect wallet",reason:"Connect wallet before submitting a transaction."}:t.chainId!==e.evmChainId?{label:"Switch network",reason:`Switch your wallet to ${e.chainId}.`}:e.readOnly||t.address.toLowerCase()!==((n=e.walletAddress)==null?void 0:n.toLowerCase())?{label:"Waiting for wallet sync…",reason:"Wait for the connected wallet to sync with the dashboard."}:((r=t.clientAddress)==null?void 0:r.toLowerCase())!==t.address.toLowerCase()||t.clientChainId!==e.evmChainId?{label:"Waiting for wallet…",reason:"The connected wallet is not ready to sign yet."}:{}:{}}const kD=2e3,ED=8e3,AD=new Set(["stake","restake","stake-usage","compound"]),a8=B.createContext(null);function Is(){const e=B.useContext(a8);if(!e)throw new Error("JobsContext is not mounted");return e}const SD={stake:"Stake",move:"Move stake",split:"Split position",merge:"Merge positions",extend:"Extend lock","max-lock":"Max lock",withdraw:"Withdraw",claim:"Claim rewards",restake:"Stake rewards","stake-usage":"Stake rewards",compound:"Stake rewards","verify-submit":"Submit proof","seller-register":"Register seller","claim-starter":"Claim starter"};function T1(e){const t=SD[e];if(t)return t;const n=e.replace(/[-_]+/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):"Transaction"}function jD(e,t){const n=t,o=(Array.isArray(n==null?void 0:n.positionIds)?n.positionIds:[n==null?void 0:n.positionId]).filter(i=>typeof i=="number"&&Number.isSafeInteger(i)&&i>0);return`${T1(e)}${o.length?` · position${o.length>1?"s":""} ${o.map(i=>`#${i}`).join(", ")}`:""}`}function j2(e){return[...e].sort((t,n)=>n.startedAt-t.startedAt)}function ID({children:e}){const t=i8(),n=B.useRef(t);n.current=t;const r=B.useRef(new Map),o=B.useCallback(H=>r.current.get(H)??"Transaction",[]),[i,l]=B.useState([]),[c,d]=B.useState(bD),f=B.useRef(c),[p,m]=B.useState(!1),[g,v]=B.useState(null),[w,b]=B.useState([]),C=B.useRef(new Map),S=B.useRef(0),I=B.useRef(new Map),A=B.useCallback(H=>{const L=I.current.get(H);L!==void 0&&(window.clearTimeout(L),I.current.delete(H)),b(z=>z.filter(O=>O.id!==H))},[]),j=B.useCallback(H=>{const L=++S.current;b(z=>[...z.filter(O=>!H.jobId||O.jobId!==H.jobId),{...H,id:L}]),H.sticky||I.current.set(L,window.setTimeout(()=>A(L),ED))},[A]);B.useEffect(()=>{const H=I.current;return()=>{for(const L of H.values())window.clearTimeout(L);H.clear()}},[]);const N=B.useCallback((H,L)=>{var K,J;let z=!1,O=!1;for(const F of H){r.current.has(F.id)||r.current.set(F.id,T1(F.kind));let Z=C.current.get(F.id);if(!Z){const Y=L||F.status!=="running"&&!f.current.has(F.id);if(Z={hashes:new Set,terminal:Y&&F.status!=="running"},Y)for(const U of F.steps)U.hash&&Z.hashes.add(U.hash);C.current.set(F.id,Z)}for(const Y of F.steps)!Y.hash||Z.hashes.has(Y.hash)||(Z.hashes.add(Y.hash),L||j({tone:"success",jobId:F.id,title:`${o(F.id)} · Confirmed`,body:Y.label,hash:Y.hash,sticky:!1}));if(F.status!=="running"&&!Z.terminal){if(Z.terminal=!0,z=!0,O||(O=F.steps.some(Y=>!!Y.hash)),F.status==="failed")j({tone:"danger",jobId:F.id,title:`${o(F.id)} · ${(K=F.error)!=null&&K.startsWith("You rejected")?"Rejected":"Failed"}`,body:F.error??"The transaction did not complete.",sticky:!0});else if(!L){const Y=AD.has(F.kind)?{href:Ai("positions"),label:"View my positions"}:void 0;j({tone:"success",jobId:F.id,title:`${o(F.id)} · ${F.steps.some(U=>!!U.hash)?"Confirmed":"Complete"}`,hash:(J=[...F.steps].reverse().find(U=>!!U.hash))==null?void 0:J.hash,sticky:!!Y,link:Y})}}}l(j2(H)),z&&!L&&$g({confirmed:O})},[j,o]),_=B.useRef(!0),P=B.useCallback(async()=>{const H=_.current;try{const L=await Ye.jobs();N(L,H),_.current=!1,v(null)}catch(L){v(ks(L))}},[N]);B.useEffect(()=>{P()},[P]);const R=B.useMemo(()=>i.filter(H=>H.status==="running").length,[i]),M=R>0;B.useEffect(()=>{if(!p&&!M)return;let H=!1,L=0;const z=async()=>{H||(await P(),!H&&(L=window.setTimeout(()=>void z(),kD)))};return z(),()=>{H=!0,window.clearTimeout(L)}},[p,M,P]);const Q=B.useCallback(async(H,L)=>{var O;(O=n.current)==null||O.assertReady();const z=await Ye.startJob(H,L);return r.current.set(z.id,jD(z.kind,L)),f.current=xD(f.current,z.id),d(f.current),_.current=!1,C.current.has(z.id)||C.current.set(z.id,{hashes:new Set,terminal:!1}),v(null),l(K=>j2([z,...K.filter(J=>J.id!==z.id)])),z},[]),V=B.useMemo(()=>({jobs:i,locallyStartedJobIds:c,pending:R,running:M,drawerOpen:p,pollError:g,toasts:w,setDrawerOpen:m,dismissToast:A,pushToast:j,titleForJob:o,start:Q}),[i,c,R,M,p,g,w,A,j,o,Q]);return h.jsx(a8.Provider,{value:V,children:e})}const la={rejected:"You rejected the wallet request. This request was not submitted.",disconnected:"The wallet disconnected or no longer permits this request. Reconnect before retrying.",network:"The wallet is on the wrong network. Switch to the dashboard network before retrying.",reverted:"The contract rejected this transaction during wallet simulation. Refresh the position and review its action restrictions.",unknown:"The wallet could not complete the request. Check its activity before retrying; the submission status is unknown."};function ND(e){const t=new Set;let n=e,r=la.unknown;for(;n&&typeof n=="object"&&!t.has(n);){t.add(n);const o=n;if(o.code===4001||o.name==="UserRejectedRequestError")return la.rejected;if(o.code===4100||o.code===4900||o.name==="ProviderDisconnectedError"||o.name==="ConnectorNotConnectedError")return la.disconnected;if(o.code===4901)return la.network;(o.name==="ChainMismatchError"||o.name==="SwitchChainError"||o.name==="ChainDisconnectedError")&&(r=la.network),(o.name==="ContractFunctionRevertedError"||o.name==="ExecutionRevertedError")&&(r=la.reverted),n=o.cause}return r}class PD{constructor(){er(this,"attempted",new Set)}canPrompt(t){var r,o;const n=t.transaction;return!!(n!=null&&n.jobId)&&t.locallyStartedJobIds.has(n.jobId)&&!t.busy&&!t.settling&&!n.approvalStarted&&!n.submittedHash&&!this.attempted.has(n.id)&&((r=t.accountAddress)==null?void 0:r.toLowerCase())===n.from.toLowerCase()&&((o=t.walletAddress)==null?void 0:o.toLowerCase())===n.from.toLowerCase()&&t.expectedChainId===n.chainId&&t.accountChainId===n.chainId&&t.walletChainId===n.chainId}claim(t){return this.canPrompt(t)?(this.attempted.add(t.transaction.id),!0):!1}}class BD{constructor(t){er(this,"results",new Map);er(this,"delivering",new Set);this.send=t}enqueue(t){this.results.has(t.id)||this.results.set(t.id,t)}async deliver(t){if(!t||this.delivering.has(t))return;const n=this.results.get(t);if(n){this.delivering.add(t);try{await this.send(n),this.results.delete(t)}catch{return}finally{this.delivering.delete(t)}}}}const TD=new y_,_D=mk({accentColor:"#1fd87a",accentColorForeground:"#06281a",borderRadius:"small",fontStack:"system"}),RD=OT;function MD({config:e,children:t}){const n=B.useMemo(()=>lD({appName:"AntSeed Staking",projectId:"9a1851410cb5589bc351a6dabf17140e",chains:[W3({id:e.evmChainId,name:e.chainId,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[e.walletRpcUrl??(e.evmChainId===8453?"https://mainnet.base.org":e.evmChainId===84532?"https://sepolia.base.org":"http://127.0.0.1:8545")]}}})],transports:{[e.evmChainId]:zC()}}),[e.chainId,e.evmChainId,e.walletRpcUrl]);return e.browserWallet?h.jsx(RD,{config:n,children:h.jsx(T_,{client:TD,children:h.jsx(NF,{theme:_D,children:h.jsx(OD,{config:e,children:t})})})}):h.jsx(h.Fragment,{children:t})}function OD({config:e,children:t}){const n=zt(),{data:r}=fk(),o=CD(e,{status:n.status,address:n.address,chainId:n.chainId,clientAddress:r==null?void 0:r.account.address,clientChainId:r==null?void 0:r.chain.id}),i=B.useRef(o);i.current=o;const l=B.useCallback(()=>{if(i.current.reason)throw new Error(i.current.reason)},[]);return h.jsx(s8.Provider,{value:{...o,assertReady:l},children:t})}function FD({config:e}){const t=zt(),{jobs:n,running:r,locallyStartedJobIds:o,pushToast:i,titleForJob:l}=Is(),{data:c}=fk(),[d,f]=B.useState(null),[p,m]=B.useState(null),[g,v]=B.useState(!1),w=B.useRef(!1),b=B.useRef(new PD),C=B.useRef(new Map),S=B.useRef(null),I=B.useRef(Promise.resolve()),A=B.useRef(new BD(M=>Ks("/api/wallet/result",{method:"POST",body:M}))),j=B.useRef(!1);j.current=r||g||d!==null;const N=!!t.address&&t.chainId!==e.evmChainId,_=t.status==="connecting"||t.status==="reconnecting";B.useEffect(()=>{p&&i({tone:"danger",title:"Wallet request failed",body:p,sticky:!0})},[p,i]),B.useEffect(()=>{var K;if(_)return;let M=!1,Q;const V=`${((K=t.address)==null?void 0:K.toLowerCase())??""}:${t.chainId??""}`,H=!!S.current&&!S.current.startsWith(":");let L=!1;function z(J=!1){L||M||(L=!0,I.current=I.current.catch(()=>{}).then(async()=>{if(!M)try{const F=J&&!N,Z=N||!t.address&&H,Y=await Ks("/api/wallet",{method:"POST",body:{address:N?void 0:t.address,chainId:t.chainId,refresh:F,disconnect:Z}});if(!M){const U=Y.changed??S.current!==V;S.current=V,m(null),(U||F)&&$g({clear:U})}}catch(F){M||(m(F instanceof Error?F.message:String(F)),e.selectedAddress&&F instanceof hs&&F.status===400?$g():Q=setTimeout(()=>z(J),1500))}finally{L=!1}}))}z();const O=()=>{j.current||z(!0)};return window.addEventListener("focus",O),()=>{M=!0,clearTimeout(Q),window.removeEventListener("focus",O)}},[t.address,t.chainId,N,_,e.selectedAddress]),B.useEffect(()=>{let M=!1,Q;const V=async()=>{try{const H=await Ks("/api/wallet/request");M||(f(H),await A.current.deliver((H==null?void 0:H.id)??null))}catch{}finally{M||(Q=setTimeout(()=>void V(),r||d!==null?1e3:3e4))}};return V(),()=>{M=!0,clearTimeout(Q)}},[r,d!==null]),B.useEffect(()=>{if(!(d!=null&&d.jobId))return;const M=n.find(V=>V.id===d.jobId);if(!M||M.status!=="running")return;const Q=d.submittedHash?"Submitted":"Awaiting wallet approval";C.current.get(d.id)!==Q&&C.current.get(d.id)!=="Submitted"&&(C.current.set(d.id,Q),i({tone:"info",jobId:d.jobId,title:`${l(d.jobId)} · ${Q}`,body:d.submittedHash?"Waiting for on-chain confirmation.":"No transaction has been submitted yet.",hash:d.submittedHash,sticky:!0}))},[d,n,i,l]);const P=B.useCallback(async()=>{var Q;if(!d||!c||w.current||d.submittedHash)return;w.current=!0,v(!0),m(null);let M=!1;try{if(c.account.address.toLowerCase()!==d.from.toLowerCase()||((Q=t.address)==null?void 0:Q.toLowerCase())!==d.from.toLowerCase()||t.chainId!==d.chainId||c.chain.id!==d.chainId||e.evmChainId!==d.chainId)throw new Error("Connect the wallet and network shown in this request.");await Ks("/api/wallet/begin",{method:"POST",body:{id:d.id}}),M=!0;const V=await c.sendTransaction({account:c.account,chain:c.chain,to:d.to,data:d.data,value:BigInt(d.value)});A.current.enqueue({id:d.id,hash:V}),C.current.set(d.id,"Submitted"),i({tone:"info",jobId:d.jobId,title:`${l(d.jobId??"")} · Submitted`,body:"Waiting for on-chain confirmation.",hash:V,sticky:!0}),await A.current.deliver(d.id)}catch(V){const H=ND(V);M?(A.current.enqueue({id:d.id,error:H}),await A.current.deliver(d.id)):m(H)}finally{w.current=!1,v(!1)}},[d,c,t.address,t.chainId,e.evmChainId,i,l]),R=B.useMemo(()=>({transaction:d,locallyStartedJobIds:o,accountAddress:t.address,accountChainId:t.chainId,walletAddress:c==null?void 0:c.account.address,walletChainId:c==null?void 0:c.chain.id,expectedChainId:e.evmChainId,busy:g,settling:_}),[d,o,t.address,t.chainId,c,e.evmChainId,g,_]);return B.useEffect(()=>{b.current.claim(R)&&P()},[R,P]),h.jsxs("div",{className:"browser-wallet",children:[h.jsx(vh,{accountStatus:"address",chainStatus:"icon",showBalance:!1}),N&&h.jsxs("span",{className:"hint",children:["Switch to ",e.chainId," to continue."]})]})}function LD(){return h.jsx(vh.Custom,{children:({account:e,chain:t,openConnectModal:n,openAccountModal:r,openChainModal:o,mounted:i})=>h.jsx("button",{className:"btn",disabled:!i,onClick:e?t!=null&&t.unsupported?o:r:n,children:e?t!=null&&t.unsupported?"Switch network":"Change wallet":"Connect wallet"})})}function dl(...e){return e.filter(Boolean).join(" ")}function wt({children:e,className:t,fullWidth:n=!1,leadingIcon:r,size:o="md",type:i="button",variant:l="primary",...c}){return h.jsxs("button",{type:i,className:dl("btn",`btn--${l}`,`btn--${o}`,n&&"btn--full",t),...c,children:[r?h.jsx("span",{className:"btn__icon","aria-hidden":"true",children:r}):null,h.jsx("span",{className:"btn__label",children:e})]})}function Qr({children:e,className:t,tone:n="surface",...r}){return h.jsx("div",{className:dl("card",n!=="surface"&&`card--${n}`,t),...r,children:e})}function Kc({action:e,children:t,className:n,title:r,tone:o="info",...i}){return h.jsxs("div",{className:dl("alert",`alert--${o}`,n),role:o==="danger"||o==="warning"?"alert":"status",...i,children:[h.jsxs("div",{className:"alert__content",children:[r?h.jsx("div",{className:"alert__title",children:r}):null,h.jsx("div",{className:"alert__body",children:t})]}),e?h.jsx("div",{className:"alert__action",children:e}):null]})}function _1({className:e,height:t,radius:n,style:r,width:o,...i}){return h.jsx("div",{className:dl("skeleton",e),style:{...r,...t!==void 0?{height:t}:{},...n!==void 0?{borderRadius:n}:{},...o!==void 0?{width:o}:{}},...i})}function DD({className:e,error:t,hint:n,id:r,label:o,...i}){const l=r??i.name;return h.jsxs("label",{className:dl("field",e),htmlFor:l,children:[o?h.jsx("span",{className:"field__label",children:o}):null,h.jsx("input",{id:l,className:"field__input",...i}),t?h.jsx("span",{className:"field__error",children:t}):n?h.jsx("span",{className:"field__hint",children:n}):null]})}function R1({children:e,className:t,label:n,type:r="button",...o}){return h.jsx("button",{type:r,className:dl("icon-button",t),"aria-label":n,title:o.title??n,...o,children:e})}const l8=B.createContext(null);function Pi(){const e=B.useContext(l8);if(!e)throw new Error("AppContext is not mounted");return e}function Ns(){return Pi().config}function dr(){var e;return((e=Pi().overview)==null?void 0:e.epoch)??null}function Su({rows:e=4,width:t}){return h.jsx("div",{className:"skel-list","aria-busy":"true",children:Array.from({length:e},(n,r)=>h.jsx(_1,{height:14,width:t??`${60+r*17%40}%`},r))})}function tn({error:e,onRetry:t,title:n}){return h.jsx(Kc,{tone:"danger",title:n,action:t?h.jsx(wt,{variant:"outline",size:"sm",onClick:t,children:"Retry"}):void 0,children:h.jsx("span",{className:"break",children:e})})}function xh(){return h.jsx("span",{className:"spinner","aria-label":"loading"})}function Ch(e=1e3){const[t,n]=B.useState(()=>Date.now());return B.useEffect(()=>{const r=window.setInterval(()=>n(Date.now()),e);return()=>window.clearInterval(r)},[e]),t}function c8(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M4 4L12 12M12 4L4 12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}function UD(){return h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M2.5 6.2l2.4 2.4 4.6-4.9",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function $D(){return h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M3 3l6 6M9 3l-6 6",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function u8({status:e}){return e==="running"?h.jsx("span",{className:"status-icon status-icon--running",title:"Pending",children:h.jsx(xh,{})}):e==="done"?h.jsx("span",{className:"status-icon status-icon--done",title:"Confirmed",children:h.jsx(UD,{})}):h.jsx("span",{className:"status-icon status-icon--failed",title:"Failed",children:h.jsx($D,{})})}function d8({hash:e,showHash:t=!1}){const{evmChainId:n}=Ns(),r=r8(n,e),o=uD(n);return!r||!o?h.jsx("span",{className:"activity-hash mono",title:e,children:Lg(e)}):h.jsxs("span",{className:"activity-link-wrap",children:[h.jsxs("a",{className:"activity-link",href:r,target:"_blank",rel:"noreferrer",title:e,children:["View on ",o]}),t?h.jsx("span",{className:"activity-hash mono dim",children:Lg(e)}):null]})}function zD(){const{drawerOpen:e,setDrawerOpen:t}=Is();if(B.useEffect(()=>{if(!e)return;const r=o=>{o.key==="Escape"&&t(!1)};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e,t]),!e)return null;const n=()=>t(!1);return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"drawer-backdrop",onClick:n}),h.jsxs("aside",{className:"drawer activity-drawer",role:"dialog","aria-modal":"true","aria-label":"Activity",children:[h.jsxs("header",{className:"drawer-header",children:[h.jsx("div",{className:"drawer-titles",children:h.jsx("h2",{className:"drawer-title",children:"Activity"})}),h.jsx(R1,{label:"Close",className:"drawer-close",onClick:n,children:h.jsx(c8,{})})]}),h.jsx("div",{className:"drawer-body",children:h.jsx(WD,{})})]})]})}function WD(){const{jobs:e,pollError:t}=Is(),n=Ch(1e3);return h.jsxs(h.Fragment,{children:[e.length===0?h.jsx("div",{className:"activity-empty",children:"No recorded transactions. Signed-wallet activity is saved locally for 30 days."}):h.jsx("ol",{className:"activity-list",children:e.map(r=>h.jsx(qD,{job:r,now:n},r.id))}),t?h.jsxs("div",{className:"activity-poll-error",children:["Could not refresh activity: ",t]}):null]})}function qD({job:e,now:t}){var o;const n=e.steps.filter(i=>i.hash),r=(o=e.steps[0])==null?void 0:o.label;return h.jsxs("li",{className:`activity-row activity-row--${e.status}`,children:[h.jsxs("div",{className:"activity-main",children:[h.jsx("div",{className:"activity-title",children:T1(e.kind)}),r?h.jsx("div",{className:"activity-sub",children:r}):null,e.steps.length>1?h.jsxs("details",{children:[h.jsx("summary",{children:"Action steps"}),h.jsx("ol",{children:e.steps.map((i,l)=>h.jsx("li",{children:i.label},l))})]}):null,e.status==="failed"&&e.error?h.jsx("div",{className:"activity-error",children:e.error}):null,n.length>0?h.jsx("div",{className:"activity-links",children:n.map(i=>h.jsx(d8,{hash:i.hash,showHash:n.length>1},i.hash))}):null]}),h.jsxs("div",{className:"activity-side",children:[h.jsx(u8,{status:e.status}),h.jsx("span",{className:"activity-time",children:dD(e.startedAt,t)})]})]})}function ut({value:e,kind:t="address",short:n=!0,label:r,copy:o=!1,className:i}){const{evmChainId:l}=Ns(),c=t==="tx"?r8(l,e):fD(l,e),d=r??(n?t==="tx"?Lg(e):wh(e):e),f=`mono ${i??""}`.trim();return h.jsxs("span",{className:"nowrap",children:[c?h.jsx("a",{className:f,href:c,target:"_blank",rel:"noreferrer",title:e,children:d}):h.jsx("span",{className:f,title:e,children:d}),o?h.jsx(HD,{value:e}):null]})}function HD({value:e}){const[t,n]=B.useState(!1),r=()=>{var o;(o=navigator.clipboard)==null||o.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)}).catch(()=>{})};return h.jsx("button",{className:"link-button",style:{marginLeft:6},onClick:r,type:"button",title:"Copy",children:t?"copied":"copy"})}function VD(){const{toasts:e,dismissToast:t}=Is();return e.length===0?null:h.jsx("div",{className:"toasts",role:"region","aria-label":"Transaction notifications",children:e.map(n=>h.jsxs("div",{className:`toast toast--${n.tone}`,role:n.tone==="danger"?"alert":"status",children:[h.jsx(u8,{status:n.tone==="danger"?"failed":n.tone==="info"?"running":"done"}),h.jsxs("div",{className:"toast-body",children:[h.jsx("div",{className:"toast-title",children:n.title}),n.body?h.jsx("div",{className:"toast-text",children:n.body}):null,n.hash?h.jsx(d8,{hash:n.hash}):null,n.link?h.jsxs("a",{className:"toast-link",href:n.link.href,children:[n.link.label," →"]}):null]}),h.jsx(R1,{label:"Dismiss",className:"toast-close",onClick:()=>t(n.id),children:h.jsx(c8,{})})]},n.id))})}function QD({page:e,updatedAt:t,children:n}){return h.jsxs("div",{className:"app",children:[h.jsx(GD,{page:e,updatedAt:t}),h.jsx("div",{className:"content",children:h.jsx("main",{className:"main",children:n})}),h.jsx(zD,{}),h.jsx(VD,{})]})}function GD({page:e,updatedAt:t}){const{config:n,theme:r,toggleTheme:o}=Pi();return h.jsxs("aside",{className:"sidebar",children:[h.jsxs("a",{className:"wordmark",href:Ai("stake"),children:["ANTS",h.jsx("span",{children:"staking"})]}),h.jsx("nav",{className:"sidenav","aria-label":"Main",children:pD.map(i=>h.jsxs("div",{className:"sidenav-group",children:[h.jsx("div",{className:"sidenav-label",children:i.label}),i.items.map(l=>h.jsxs("a",{href:Ai(l.id),className:l.id===e?"sidenav-item active":"sidenav-item","aria-current":l.id===e?"page":void 0,children:[h.jsx(YD,{page:l.id}),h.jsx("span",{children:l.label})]},l.id))]},i.label))}),h.jsxs("div",{className:"sidebar-foot",children:[h.jsx(KD,{updatedAt:t}),n.selectedAddress&&h.jsxs("div",{className:"small",children:["Selected account ",h.jsx(ut,{value:n.selectedAddress,copy:!0})]}),h.jsxs("div",{className:"sidebar-foot-row",children:[n.browserWallet?h.jsx(FD,{config:n}):h.jsx("span",{className:"wallet-chip",children:h.jsx(ut,{value:n.address,copy:!0,className:"wallet-chip-addr"})}),h.jsx(R1,{label:r==="dark"?"Switch to light theme":"Switch to dark theme",className:"theme-toggle",onClick:o,children:r==="dark"?h.jsx(JD,{}):h.jsx(ZD,{})})]})]})]})}function KD({updatedAt:e}){const{overview:t}=Pi(),n=Ch(3e4);if(!t)return null;const r=t.epoch,o=e!==null?e+r.secondsToBoundary*1e3:r.nextBoundaryAt*1e3,i=Math.max(0,Math.floor((o-n)/1e3));return h.jsxs("a",{className:"epoch-chip",href:Ai("network"),title:"Current epoch and time until the next boundary",children:[h.jsx("i",{"aria-hidden":"true"}),h.jsxs("span",{children:["epoch ",h.jsx("strong",{children:r.current})]}),h.jsxs("span",{children:["· ",h.jsx("strong",{children:bh(i)})," left"]})]})}function YD({page:e}){const t={width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};switch(e){case"stake":return h.jsx("svg",{...t,children:h.jsx("path",{d:"M2 13h12M3.5 10.5v-3M7 10.5V4M10.5 10.5V6.5M14 10.5V2.5"})});case"positions":return h.jsxs("svg",{...t,children:[h.jsx("path",{d:"M8 2.5 14 5.5 8 8.5 2 5.5Z"}),h.jsx("path",{d:"m2 8.5 6 3 6-3M2 11.5l6 3 6-3"})]});case"rewards":return h.jsxs("svg",{...t,children:[h.jsx("circle",{cx:"8",cy:"8",r:"5.5"}),h.jsx("path",{d:"M8 5v6M6.2 6.6c0-.9.8-1.4 1.8-1.4s1.8.5 1.8 1.2c0 1.6-3.6.9-3.6 2.5 0 .8.8 1.3 1.8 1.3s1.8-.5 1.8-1.3"})]});case"seller":return h.jsxs("svg",{...t,children:[h.jsx("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5"}),h.jsx("circle",{cx:"6",cy:"7",r:"1.5"}),h.jsx("path",{d:"M4 11c.5-1 1.2-1.5 2-1.5s1.5.5 2 1.5M9.5 6.5h2.5M9.5 9h2.5"})]});case"network":return h.jsxs("svg",{...t,children:[h.jsx("circle",{cx:"8",cy:"8",r:"5.5"}),h.jsx("path",{d:"M2.5 8h11M8 2.5c1.8 1.8 1.8 9.2 0 11M8 2.5c-1.8 1.8-1.8 9.2 0 11"})]});case"addresses":return h.jsxs("svg",{...t,children:[h.jsx("path",{d:"M6.5 9.5a2.5 2.5 0 0 0 3.5 0l2-2a2.5 2.5 0 0 0-3.5-3.5l-.8.8"}),h.jsx("path",{d:"M9.5 6.5a2.5 2.5 0 0 0-3.5 0l-2 2a2.5 2.5 0 0 0 3.5 3.5l.8-.8"})]});default:return null}}function JD(){return h.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:"3",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M3.4 12.6l1.4-1.4M11.2 4.8l1.4-1.4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function ZD(){return h.jsx("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M13.5 9.5A6 6 0 0 1 6.5 2.5a6 6 0 1 0 7 7z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})})}function Dt({title:e,actions:t,children:n,className:r,tone:o}){return h.jsxs(Qr,{className:`panel ${r??""}`.trim(),tone:o,children:[e||t?h.jsxs("div",{className:"panel-head",children:[e?h.jsx("h3",{children:e}):h.jsx("span",{}),t?h.jsx("div",{className:"row",children:t}):null]}):null,n]})}function $t({items:e}){return h.jsx("dl",{className:"facts",children:e.map(([t,n])=>h.jsx(XD,{label:t,value:n},t))})}function XD({label:e,value:t}){return h.jsxs(h.Fragment,{children:[h.jsx("dt",{children:e}),h.jsx("dd",{children:t??"—"})]})}function Za({columns:e,rows:t,rowKey:n,empty:r,loading:o,onRowClick:i,footer:l}){const c=d=>[d.align==="right"?"num":"",d.mono?"mono":"",d.className??""].filter(Boolean).join(" ")||void 0;return h.jsx("div",{className:"table-wrap",tabIndex:0,role:"region","aria-label":"Data table; scroll horizontally to see all columns",children:h.jsxs("table",{className:"table",children:[h.jsx("thead",{children:h.jsx("tr",{children:e.map(d=>h.jsx("th",{className:[d.align==="right"?"num":"",d.className??""].filter(Boolean).join(" ")||void 0,title:d.title,"aria-sort":d.sortDirection,children:d.label},d.key))})}),h.jsxs("tbody",{children:[o&&t.length===0?Array.from({length:3},(d,f)=>h.jsx("tr",{children:e.map(p=>h.jsx("td",{children:h.jsx(_1,{width:"70%",height:12})},p.key))},`skel-${f}`)):null,!o&&t.length===0?h.jsx("tr",{children:h.jsx("td",{className:"empty",colSpan:e.length,children:r??"Nothing to show."})}):null,t.map((d,f)=>h.jsx("tr",{className:i?"clickable":void 0,onClick:i?()=>i(d):void 0,children:e.map(p=>h.jsx("td",{className:c(p),children:p.render(d,f)},p.key))},n(d)))]}),l?h.jsx("tfoot",{children:l}):null]})})}function eU(){const e=tt("overview",Ye.overview),t=e.data,n=Object.entries((t==null?void 0:t.addresses)??{}).map(([r,o])=>({name:r,address:o})).sort((r,o)=>r.name.localeCompare(o.name));return h.jsxs(h.Fragment,{children:[h.jsx("h1",{className:"page-title",children:"Addresses"}),e.error&&!t?h.jsx(tn,{error:e.error,onRetry:e.refresh}):null,h.jsx(Dt,{title:"Protocol contracts",children:h.jsx(Za,{columns:[{key:"name",label:"Contract",render:r=>r.name},{key:"address",label:"Address",render:r=>h.jsx(ut,{value:r.address,short:!1,copy:!0})}],rows:n,rowKey:r=>r.name,loading:e.loading&&!t,empty:"No contract addresses are configured for this chain."})})]})}function ir({summary:e,children:t,open:n,className:r,lazy:o=!1}){const[i,l]=B.useState(n??!1);return h.jsxs("details",{className:["details",r??""].filter(Boolean).join(" "),open:n,onToggle:c=>l(c.currentTarget.open),children:[h.jsx("summary",{children:e}),h.jsx("div",{className:"details-body",children:!o||i?t:null})]})}function pm(e,t){if(e===null||t===null||BigInt(t)===0n)return"—";const n=BigInt(e)*10000n/BigInt(t);return`${n/100n}.${(n%100n).toString().padStart(2,"0")}%`}const tU="Early withdrawal permanently burns some principal, based on the remaining lock and configured limits. No penalty after expiry. Preview shows the exact burn and payout. Claim rewards separately.";function zg(){return h.jsx(Yc,{label:"About the early-exit penalty",children:tU})}function Yc({label:e,children:t,symbol:n="?"}){const r=B.useId(),o=B.useRef(),i=()=>{clearTimeout(o.current)},l=()=>{o.current=setTimeout(()=>f(null),150)};B.useEffect(()=>()=>clearTimeout(o.current),[]);const c=B.useRef(null),[d,f]=B.useState(null),p=()=>{var v;i();const m=(v=c.current)==null?void 0:v.getBoundingClientRect();if(!m)return;const g=m.bottom+240>window.innerHeight;f({left:Math.max(8,Math.min(m.left,window.innerWidth-328)),top:g?m.top-8:m.bottom+8,above:g})};return B.useEffect(()=>{if(!d)return;const m=()=>f(null),g=v=>{v.key==="Escape"&&(v.stopPropagation(),m())};return window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),document.addEventListener("keydown",g,!0),()=>{window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m),document.removeEventListener("keydown",g,!0)}},[d]),h.jsxs("span",{className:"early-exit-help",children:[h.jsx("button",{ref:c,type:"button",className:"early-exit-help__trigger","aria-label":e,"aria-describedby":d?r:void 0,onMouseEnter:p,onMouseLeave:l,onFocus:p,onBlur:()=>f(null),onClick:p,children:n}),d&&l1.createPortal(h.jsx("span",{id:r,role:"tooltip",className:"early-exit-help__tooltip",onMouseEnter:i,onMouseLeave:l,style:{left:d.left,top:d.top,transform:d.above?"translateY(-100%)":void 0},children:t}),document.body)]})}function Sn(e){return e===null?"Unavailable":`${be(e)} ANTS`}const I2={"seller-pools":"Seller pools",usage:"Usage rewards",team:"Team",reserve:"Reserve — base allowance",verification:"Verification"};function nU({data:e}){var m,g;const t=[{key:"name",label:"Bucket",render:v=>I2[v.name]??v.name},{key:"share",label:"Share of scheduled emission",align:"right",mono:!0,render:v=>pm(v.budget,e.emission)},{key:"budget",label:"Bucket allowance",align:"right",mono:!0,render:v=>Sn(v.budget)}],n=[{name:"Staker rewards",budget:e.budgets.staker},{name:"Buyer usage rewards",budget:e.budgets.buyer},{name:"Seller usage rewards",budget:e.budgets.seller}],r=e.buckets.filter(v=>v.budget!==null&&v.nextBudget!==null&&v.budget!==v.nextBudget),o=e.stakerConfig,i=e.usageConfig,l=e.nextStakerConfig,c=e.nextUsageConfig,d=o&&l&&JSON.stringify(o)!==JSON.stringify(l),f=i&&c&&JSON.stringify(i)!==JSON.stringify(c),p=(v,w)=>`${A2(v,e.shareDenominator)} – ${A2(w,e.shareDenominator)}`;return h.jsxs(h.Fragment,{children:[h.jsxs(Dt,{title:h.jsxs(h.Fragment,{children:[`Current epoch reward budgets · epoch ${e.epoch.current}`," ",h.jsx(Yc,{label:"When reward budgets become final",symbol:"i",children:"Budgets can change during the epoch. After it ends, each reward contract fixes its budgets on the first claim or settlement—not at rollover."})]}),children:[h.jsx("p",{className:"hint",children:"Live network-wide budgets—not your wallet rewards or amounts already paid."}),h.jsx(Za,{columns:[{key:"name",label:"Recipient",render:v=>v.name},{key:"budget",label:"Calculated epoch budget",align:"right",mono:!0,render:v=>Sn(v.budget)},{key:"share",label:"Share of epoch emission",align:"right",mono:!0,render:v=>pm(v.budget,e.emission)}],rows:n,rowKey:v=>v.name}),h.jsxs(ir,{summary:"How these budgets are calculated",children:[h.jsx("div",{className:"section-label",children:"Staker rewards"}),o?h.jsx($t,{items:[["Configured share range",p(o.minShareBps,o.maxShareBps)],["Network active stake used by the contract",Sn(e.totalActiveStake)],["Stake target for this epoch",Sn(e.scaledStakeTarget)],["Initial-emission stake target",Sn(o.stakeShareTarget)],["Seller-pools budget cap",Sn(((m=e.buckets.find(v=>v.name==="seller-pools"))==null?void 0:m.budget)??null)]]}):h.jsx("p",{className:"muted",children:"Staker configuration unavailable."}),h.jsx("p",{className:"hint",children:"With positive active stake, the share rises toward the configured maximum as stake grows. The stake target scales with the epoch emission; it is not a hard threshold. Zero active stake produces a zero budget."}),h.jsx("div",{className:"section-label mt",children:"Buyer and seller rewards"}),i?h.jsx($t,{items:[["Buyer share range",p(i.buyerMinShareBps,i.buyerMaxShareBps)],["Seller share range",p(i.sellerMinShareBps,i.sellerMaxShareBps)],["Accounted usage input",e.usageVolume===null?"Unavailable":`${Wn(e.usageVolume)} USDC-equivalent`],["Usage target",`${Wn(i.volumeShareTarget)} USDC-equivalent / epoch`],["Combined usage budget cap",Sn(((g=e.buckets.find(v=>v.name==="usage"))==null?void 0:g.budget)??null)]]}):h.jsx("p",{className:"muted",children:"Usage configuration unavailable."}),h.jsx("p",{className:"hint",children:"The usage input is the larger of the epoch’s total buyer points and total seller points—not their sum. With positive usage, each share rises toward its maximum. If the combined desired budgets exceed the usage bucket limit, the contract scales them proportionally. Zero usage produces zero budgets."}),h.jsx("p",{className:"hint",children:"For a positive input, the curve is minimum + (maximum − minimum) × input / (input + target), with contract integer rounding. A zero target selects the maximum. Displayed budgets come directly from contract getters, not a browser calculation."})]})]}),h.jsxs(Dt,{title:`Emission bucket allowances · epoch ${e.epoch.current}`,children:[h.jsx("p",{className:"hint",children:"Bucket limits, not payouts. Shares use this epoch’s scheduled emission."}),h.jsx(Za,{columns:t,rows:e.buckets,rowKey:v=>v.id,empty:"No emission buckets available."}),h.jsx("p",{className:"hint mt",children:"Unallocated seller-pool and usage allowances go to the burn destination (combined cap: 30% of scheduled emission), then Reserve on top of its base allowance. Requires an on-chain settlement."}),(r.length>0||d||f||e.nextEmission!==e.emission)&&h.jsxs(ir,{summary:`Next epoch · ${e.epoch.current+1}`,children:[h.jsx($t,{items:[["Scheduled emission",Sn(e.nextEmission)],...r.map(v=>[I2[v.name]??v.name,`${Sn(v.nextBudget)} · ${pm(v.nextBudget,e.nextEmission)}`]),...d?[["Staker share range",p(l.minShareBps,l.maxShareBps)],["Staker target at initial emission",Sn(l.stakeShareTarget)]]:[],...f?[["Buyer share range",p(c.buyerMinShareBps,c.buyerMaxShareBps)],["Seller share range",p(c.sellerMinShareBps,c.sellerMaxShareBps)],["Usage target",`${Wn(c.volumeShareTarget)} USDC-equivalent / epoch`]]:[]]}),h.jsx("p",{className:"hint",children:"Next-epoch allowances and configuration are shown separately. They are not a prediction of next epoch’s earned rewards."})]})]})]})}function kr({label:e,value:t,unit:n,sub:r,loading:o,title:i}){return h.jsxs(Qr,{className:"tile",title:i,children:[h.jsx("div",{className:"tile-label",children:e}),o?h.jsx(_1,{width:"60%",height:22,style:{marginTop:3}}):h.jsxs("div",{className:"tile-value",children:[t,n?h.jsx("span",{className:"unit",children:n}):null]}),r?h.jsx("div",{className:"tile-sub",children:r}):null]})}function M1({children:e}){return h.jsx("div",{className:"tiles",children:e})}function ju({epoch:e,dateOnly:t=!1}){const n=dr();if(e==null)return h.jsx("span",{className:"mono",children:"—"});const r=n?ar(Ya(e,n.genesis,n.epochDuration)):null;return t?h.jsx("span",{className:"mono",children:r??"—"}):h.jsxs("span",{className:"mono",title:r??void 0,children:[e,r?h.jsxs("span",{className:"muted small",children:[" ",r.slice(0,10)]}):null]})}function Ea({label:e,hint:t,width:n,children:r}){return h.jsxs("label",{className:["field",n?`field-w-${n}`:""].filter(Boolean).join(" "),children:[h.jsx("span",{className:"field__label",children:e}),r,t?h.jsx("span",{className:"field__hint",children:t}):null]})}function fl({mono:e=!0,width:t="md",className:n,...r}){const o=[`field-w-${t}`,n??""].filter(Boolean).join(" ");return h.jsx(DD,{className:o,...r,style:e?{fontFamily:"var(--font-mono)",fontVariantNumeric:"tabular-nums",...r.style}:r.style})}function Aa({className:e,children:t,...n}){const r=["field__input",e??""].filter(Boolean).join(" ");return h.jsx("span",{className:"select-wrap",children:h.jsx("select",{className:r,...n,children:t})})}const rU=[4,8,12,26,52];function oU(){const{overview:e}=Pi(),[t,n]=B.useState(8),[r,o]=B.useState(!1),i=tt(`usage:${t}`,()=>Ye.usage(t)),l=i.data,c=[{key:"epoch",label:"Epoch",render:p=>h.jsx(ju,{epoch:p.epoch})},{key:"buyer",label:"Your buyer pts",align:"right",mono:!0,render:p=>Fe(p.buyerPoints)},...r?[{key:"wbuyer",label:"Weighted",align:"right",mono:!0,title:"Buyer points after pool weighting",render:p=>Fe(p.weightedBuyerPoints)}]:[],{key:"seller",label:"Your seller pts",align:"right",mono:!0,render:p=>Fe(p.sellerPoints)},{key:"nbuyer",label:"Network buyer",align:"right",mono:!0,render:p=>Fe(p.totalBuyerPoints)},{key:"nseller",label:"Network seller",align:"right",mono:!0,render:p=>Fe(p.totalSellerPoints)},{key:"pool",label:"Pool pts",align:"right",mono:!0,render:p=>Fe(p.totalPoolPoints)},...r?[{key:"wpool",label:"Weighted pool pts",align:"right",mono:!0,render:p=>Fe(p.totalWeightedPoolPoints)}]:[]],d=(l==null?void 0:l.firstRewardedEpoch)??(e==null?void 0:e.epoch.effective)??null,f=d!==null&&(!l||l.currentEpoch<d)?`Usage accounting starts at epoch ${d}.`:"No usage has been recorded for this wallet in the selected epochs.";return h.jsxs(Dt,{title:"Your usage · historical network comparisons",actions:h.jsxs(h.Fragment,{children:[h.jsxs("label",{className:"check small",children:[h.jsx("input",{type:"checkbox",checked:r,onChange:p=>o(p.target.checked)}),"weighted columns"]}),h.jsxs("label",{className:"row small",children:[h.jsx("span",{className:"muted",children:"epochs"}),h.jsx(Aa,{value:t,onChange:p=>n(Number(p.target.value)),style:{width:72,minHeight:30,padding:"4px 8px"},children:rU.map(p=>h.jsx("option",{value:p,children:p},p))})]})]}),children:[i.error&&!l?h.jsx(tn,{error:i.error,onRetry:i.refresh}):null,i.error&&l?h.jsxs("div",{className:"status-line",children:["Refresh failed: ",i.error]}):null,l&&h.jsxs("p",{className:"hint",children:[l.source==="indexer"?"Historical rows are indexed data and may lag the current contract snapshot.":"Historical rows are unavailable without the explorer; current totals are read from the chain.",l.sourceError?` ${l.sourceError}`:""]}),h.jsx($t,{items:[["Your buyer points",l?Fe(l.totals.buyerPoints):"…"],["Network buyer points",l?Fe(l.totals.networkBuyerPoints):"…"],["Network seller points",l?Fe(l.totals.networkSellerPoints):"…"],["First rewarded epoch",l?l.firstRewardedEpoch??"—":"…"]]}),h.jsx("div",{className:"mt",children:h.jsx(Za,{columns:c,rows:(l==null?void 0:l.epochs)??[],rowKey:p=>p.epoch,loading:i.loading&&!l,empty:f,footer:l&&l.epochs.length>0?h.jsxs("tr",{children:[h.jsx("td",{children:"Total"}),h.jsx("td",{className:"num mono",children:Fe(l.totals.buyerPoints)}),r?h.jsx("td",{className:"num mono",children:Fe(l.totals.buyerWeightedPoints)}):null,h.jsx("td",{className:"num mono",children:Fe(sU(l.epochs.map(p=>p.sellerPoints)))}),h.jsx("td",{className:"num mono",children:Fe(l.totals.networkBuyerPoints)}),h.jsx("td",{className:"num mono",children:Fe(l.totals.networkSellerPoints)}),h.jsx("td",{}),r?h.jsx("td",{}):null]}):null})}),h.jsxs(ir,{summary:"Policies",children:[h.jsx($t,{items:[["Points policy",l!=null&&l.pointsPolicy?h.jsx(ut,{value:l.pointsPolicy,short:!1}):h.jsx("span",{className:"muted",children:"not set"})],["Pool weight policy",l!=null&&l.poolWeightPolicy?h.jsx(ut,{value:l.poolWeightPolicy,short:!1}):h.jsx("span",{className:"muted",children:"not set"})],["Minimum accounted pool power",l!=null&&l.minimumAccountedPoolPower?`${be(l.minimumAccountedPoolPower,4)} ANTS`:"—"],["Your weighted buyer points",l?Fe(l.totals.buyerWeightedPoints):"…"]]}),h.jsx("p",{className:"hint mt",children:"Points are raw usage units recorded on chain per epoch. Weighted points apply the pool weight policy; pools below the minimum accounted power earn no usage rewards."})]})]})}function sU(e){return e.reduce((t,n)=>{try{return t+BigInt(n)}catch{return t}},0n).toString()}function iU(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jc.apply(null,arguments)}var Wg="data-focus-lock",f8="data-focus-lock-disabled",aU="data-no-focus-lock",lU="data-autofocus-inside",cU="data-no-autofocus",mm={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},h8=d1({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),p8=d1(),uU=d1(),dU=f1({async:!0,ssr:typeof document<"u"}),fU=B.createContext(void 0),hU=[],O1=B.forwardRef(function(t,n){var r,o=B.useState(),i=o[0],l=o[1],c=B.useRef(),d=B.useRef(!1),f=B.useRef(null),p=B.useState({}),m=p[1],g=t.children,v=t.disabled,w=v===void 0?!1:v,b=t.noFocusGuards,C=b===void 0?!1:b,S=t.persistentFocus,I=S===void 0?!1:S,A=t.crossFrame,j=A===void 0?!0:A,N=t.autoFocus,_=N===void 0?!0:N;t.allowTextSelection;var P=t.group,R=t.className,M=t.whiteList,Q=t.hasPositiveIndices,V=t.shards,H=V===void 0?hU:V,L=t.as,z=L===void 0?"div":L,O=t.lockProps,K=O===void 0?{}:O,J=t.sideCar,F=t.returnFocus,Z=F===void 0?!1:F,Y=t.focusOptions,U=t.onActivation,ee=t.onDeactivation,he=B.useState({}),se=he[0],ie=B.useCallback(function(rt){var on=rt.captureFocusRestore;if(!f.current){var Mt,Ot=(Mt=document)==null?void 0:Mt.activeElement;f.current=Ot,Ot!==document.body&&(f.current=on(Ot))}c.current&&U&&U(c.current),d.current=!0,m()},[U]),re=B.useCallback(function(){d.current=!1,ee&&ee(c.current),m()},[ee]),ue=B.useCallback(function(rt){var on=f.current;if(on){var Mt=(typeof on=="function"?on():on)||document.body,Ot=typeof Z=="function"?Z(Mt):Z;if(Ot){var ye=typeof Ot=="object"?Ot:void 0;f.current=null,rt?Promise.resolve().then(function(){return Mt.focus(ye)}):Mt.focus(ye)}}},[Z]),Se=B.useCallback(function(rt){d.current&&h8.useMedium(rt)},[]),Pe=p8.useMedium,Oe=B.useCallback(function(rt){c.current!==rt&&(c.current=rt,l(rt))},[]),pt=Jc((r={},r[f8]=w&&"disabled",r[Wg]=P,r),K),It=C!==!0,mt=It&&C!=="tail",Wt=u1([n,Oe]),rn=B.useMemo(function(){return{observed:c,shards:H,enabled:!w,get active(){return d.current}}},[w,d,H,c]);return E.createElement(B.Fragment,null,It&&[E.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:w?-1:0,style:mm}),Q?E.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:w?-1:1,style:mm}):null],!w&&E.createElement(J,{id:se,sideCar:dU,observed:i,disabled:w,persistentFocus:I,crossFrame:j,autoFocus:_,whiteList:M,shards:H,onActivation:ie,onDeactivation:re,returnFocus:ue,focusOptions:Y,noFocusGuards:C}),E.createElement(z,Jc({ref:Wt},pt,{className:R,onBlur:Pe,onFocus:Se}),E.createElement(fU.Provider,{value:rn},g)),mt&&E.createElement("div",{"data-focus-guard":!0,tabIndex:w?-1:0,style:mm}))});O1.propTypes={};function qg(e,t){return qg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},qg(e,t)}function pU(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,qg(e,t)}function Zc(e){"@babel/helpers - typeof";return Zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zc(e)}function mU(e,t){if(Zc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gU(e){var t=mU(e,"string");return Zc(t)=="symbol"?t:t+""}function yU(e,t,n){return(t=gU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vU(e,t){function n(r){return r.displayName||r.name||"Component"}return function(o){var i=[],l;function c(){l=e(i.map(function(f){return f.props})),t(l)}var d=(function(f){pU(p,f);function p(){return f.apply(this,arguments)||this}p.peek=function(){return l};var m=p.prototype;return m.componentDidMount=function(){i.push(this),c()},m.componentDidUpdate=function(){c()},m.componentWillUnmount=function(){var v=i.indexOf(this);i.splice(v,1),c()},m.render=function(){return E.createElement(o,this.props)},p})(B.PureComponent);return yU(d,"displayName","SideEffect("+n(o)+")"),d}}var Gr=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},Si=function(e){return Array.isArray(e)?e:[e]},m8=function(e){return Array.isArray(e)?e[0]:e},wU=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},g8=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},y8=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},bU=function(e){return e.hasAttribute("inert")},xU=function(e,t){return!e||y8(e)||!wU(e)&&!bU(e)&&t(g8(e))},v8=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=xU(t,v8.bind(void 0,e));return e.set(t,r),r},CU=function(e,t){return e&&!y8(e)?AU(e)?t(g8(e)):!1:!0},w8=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=CU(t,w8.bind(void 0,e));return e.set(t,r),r},b8=function(e){return e.dataset},kU=function(e){return e.tagName==="BUTTON"},x8=function(e){return e.tagName==="INPUT"},C8=function(e){return x8(e)&&e.type==="radio"},EU=function(e){return!((x8(e)||kU(e))&&(e.type==="hidden"||e.disabled))},AU=function(e){var t=e.getAttribute(cU);return![!0,"true",""].includes(t)},F1=function(e){var t;return!!(e&&(!((t=b8(e))===null||t===void 0)&&t.focusGuard))},Hg=function(e){return!F1(e)},SU=function(e){return!!e},jU=function(e,t){var n=Math.max(0,e.tabIndex),r=Math.max(0,t.tabIndex),o=n-r,i=e.index-t.index;if(o){if(!n)return 1;if(!r)return-1}return o||i},IU=function(e){return e.tabIndex<0&&!e.hasAttribute("tabindex")?0:e.tabIndex},L1=function(e,t,n){return Gr(e).map(function(r,o){var i=IU(r);return{node:r,index:o,tabIndex:n&&i===-1?(r.dataset||{}).focusGuard?0:-1:i}}).filter(function(r){return!t||r.tabIndex>=0}).sort(jU)},NU=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],D1=NU.join(","),PU="".concat(D1,", [data-focus-guard]"),k8=function(e,t){return Gr((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?PU:D1)?[r]:[],k8(r))},[])},BU=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?Xa([e.contentDocument.body],t):[e]},Xa=function(e,t){return e.reduce(function(n,r){var o,i=k8(r,t),l=(o=[]).concat.apply(o,i.map(function(c){return BU(c,t)}));return n.concat(l,r.parentNode?Gr(r.parentNode.querySelectorAll(D1)).filter(function(c){return c===r}):[])},[])},TU=function(e){var t=e.querySelectorAll("[".concat(lU,"]"));return Gr(t).map(function(n){return Xa([n])}).reduce(function(n,r){return n.concat(r)},[])},U1=function(e,t){return Gr(e).filter(function(n){return v8(t,n)}).filter(function(n){return EU(n)})},N2=function(e,t){return t===void 0&&(t=new Map),Gr(e).filter(function(n){return w8(t,n)})},$1=function(e,t,n){return L1(U1(Xa(e,n),t),!0,n)},Xc=function(e,t){return L1(U1(Xa(e),t),!1)},_U=function(e,t){return U1(TU(e),t)},hi=function(e,t){return e.shadowRoot?hi(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Gr(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?hi(o,t):!1}return hi(n,t)})},RU=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var o=r+1;o<n;o+=1){var i=e[r].compareDocumentPosition(e[o]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(l,c){return!t.has(c)})},E8=function(e){return e.parentNode?E8(e.parentNode):e},z1=function(e){var t=Si(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(Wg);return n.push.apply(n,o?RU(Gr(E8(r).querySelectorAll("[".concat(Wg,'="').concat(o,'"]:not([').concat(f8,'="disabled"])')))):[r]),n},[])},MU=function(e){try{return e()}catch{return}},eu=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?eu(t.shadowRoot):t instanceof HTMLIFrameElement&&MU(function(){return t.contentWindow.document})?eu(t.contentWindow.document):t}},OU=function(e,t){return e===t},FU=function(e,t){return!!Gr(e.querySelectorAll("iframe")).some(function(n){return OU(n,t)})},A8=function(e,t){return t===void 0&&(t=eu(m8(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:z1(e).some(function(n){return hi(n,t)||FU(n,t)})},LU=function(e){e===void 0&&(e=document);var t=eu(e);return t?Gr(e.querySelectorAll("[".concat(aU,"]"))).some(function(n){return hi(n,t)}):!1},DU=function(e,t){return t.filter(C8).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},W1=function(e,t){return C8(e)&&e.name?DU(e,t):e},UU=function(e){var t=new Set;return e.forEach(function(n){return t.add(W1(n,e))}),e.filter(function(n){return t.has(n)})},P2=function(e){return e[0]&&e.length>1?W1(e[0],e):e[0]},B2=function(e,t){return e.indexOf(W1(t,e))},Vg="NEW_FOCUS",$U=function(e,t,n,r,o){var i=e.length,l=e[0],c=e[i-1],d=F1(r);if(!(r&&e.indexOf(r)>=0)){var f=r!==void 0?n.indexOf(r):-1,p=o?n.indexOf(o):f,m=o?e.indexOf(o):-1;if(f===-1)return m!==-1?m:Vg;if(m===-1)return Vg;var g=f-p,v=n.indexOf(l),w=n.indexOf(c),b=UU(n),C=r!==void 0?b.indexOf(r):-1,S=o?b.indexOf(o):C,I=b.filter(function(R){return R.tabIndex>=0}),A=r!==void 0?I.indexOf(r):-1,j=o?I.indexOf(o):A,N=A>=0&&j>=0?j-A:S-C;if(!g&&m>=0||t.length===0)return m;var _=B2(e,t[0]),P=B2(e,t[t.length-1]);if(f<=v&&d&&Math.abs(g)>1)return P;if(f>=w&&d&&Math.abs(g)>1)return _;if(g&&Math.abs(N)>1)return m;if(f<=v)return P;if(f>w)return _;if(g)return Math.abs(g)>1?m:(i+m+g)%i}},zU=function(e){return function(t){var n,r=(n=b8(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},T2=function(e,t,n){var r=e.map(function(i){var l=i.node;return l}),o=N2(r.filter(zU(n)));return o&&o.length?P2(o):P2(N2(t))},Qg=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&Qg(e.parentNode.host||e.parentNode,t),t},gm=function(e,t){for(var n=Qg(e),r=Qg(t),o=0;o<n.length;o+=1){var i=n[o];if(r.indexOf(i)>=0)return i}return!1},S8=function(e,t,n){var r=Si(e),o=Si(t),i=r[0],l=!1;return o.filter(Boolean).forEach(function(c){l=gm(l||c,c)||l,n.filter(Boolean).forEach(function(d){var f=gm(i,d);f&&(!l||hi(f,l)?l=f:l=gm(f,l))})}),l},_2=function(e,t){return e.reduce(function(n,r){return n.concat(_U(r,t))},[])},WU=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(SU)},qU=function(e,t){var n=eu(Si(e).length>0?document:m8(e).ownerDocument),r=z1(e).filter(Hg),o=S8(n||e,e,r),i=new Map,l=Xc(r,i),c=l.filter(function(w){var b=w.node;return Hg(b)});if(c[0]){var d=Xc([o],i).map(function(w){var b=w.node;return b}),f=WU(d,c),p=f.map(function(w){var b=w.node;return b}),m=f.filter(function(w){var b=w.tabIndex;return b>=0}).map(function(w){var b=w.node;return b}),g=$U(p,m,d,n,t);if(g===Vg){var v=T2(l,m,_2(r,i))||T2(l,p,_2(r,i));if(v)return{node:v};console.warn("focus-lock: cannot find any node to move focus into");return}return g===void 0?g:f[g]}},HU=function(e){var t=z1(e).filter(Hg),n=S8(e,e,t),r=L1(Xa([n],!0),!0,!0),o=Xa(t,!1);return r.map(function(i){var l=i.node,c=i.index;return{node:l,index:c,lockItem:o.indexOf(l)>=0,guard:F1(l)}})},q1=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},ym=0,vm=!1,j8=function(e,t,n){n===void 0&&(n={});var r=qU(e,t);if(!vm&&r){if(ym>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),vm=!0,setTimeout(function(){vm=!1},1);return}ym++,q1(r.node,n.focusOptions),ym--}};function oc(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(t==null?void 0:t.deref())||null}}var VU=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:oc(n),parent:oc(n.parentElement),left:oc(n.previousElementSibling),right:oc(n.nextElementSibling)}),n=n.parentElement;return{element:oc(e),stack:t,ownerDocument:e.ownerDocument}},QU=function(e){var t,n,r,o,i;if(e)for(var l=e.stack,c=e.ownerDocument,d=new Map,f=0,p=l;f<p.length;f++){var m=p[f],g=(t=m.parent)===null||t===void 0?void 0:t.call(m);if(g&&c.contains(g)){for(var v=(n=m.left)===null||n===void 0?void 0:n.call(m),w=m.current(),b=g.contains(w)?w:void 0,C=(r=m.right)===null||r===void 0?void 0:r.call(m),S=$1([g],d),I=(i=(o=b??(v==null?void 0:v.nextElementSibling))!==null&&o!==void 0?o:C)!==null&&i!==void 0?i:v;I;){for(var A=0,j=S;A<j.length;A++){var N=j[A];if(I!=null&&I.contains(N.node))return N.node}I=I.nextElementSibling}if(S.length)return S[0].node}}},I8=function(e){var t=VU(e);return function(){return QU(t)}},GU=function(e,t,n){if(!e||!t)return console.error("no element or scope given"),{};var r=Si(t);if(r.every(function(l){return!hi(l,e)}))return console.error("Active element is not contained in the scope"),{};var o=n?$1(r,new Map):Xc(r,new Map),i=o.findIndex(function(l){var c=l.node;return c===e});if(i!==-1)return{prev:o[i-1],next:o[i+1],first:o[0],last:o[o.length-1]}},KU=function(e,t){var n=t?$1(Si(e),new Map):Xc(Si(e),new Map);return{first:n[0],last:n[n.length-1]}},YU=function(e){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},e)},N8=function(e,t,n){t===void 0&&(t={});var r=YU(t),o=GU(e,r.scope,r.onlyTabbable);if(o){var i=n(o,r.cycle);i&&q1(i.node,r.focusOptions)}},JU=function(e,t){t===void 0&&(t={}),N8(e,t,function(n,r){var o=n.next,i=n.first;return o||r&&i})},ZU=function(e,t){t===void 0&&(t={}),N8(e,t,function(n,r){var o=n.prev,i=n.last;return o||r&&i})},P8=function(e,t,n){var r,o=KU(e,(r=t.onlyTabbable)!==null&&r!==void 0?r:!0),i=o[n];i&&q1(i.node,t.focusOptions)},XU=function(e,t){t===void 0&&(t={}),P8(e,t,"first")},e$=function(e,t){t===void 0&&(t={}),P8(e,t,"last")};function H1(e){setTimeout(e,1)}var t$=function(t){return t&&"current"in t?t.current:t},B8=function(){return document&&document.activeElement===document.body},n$=function(){return B8()||LU()},Sa=null,kn=null,R2=function(){return null},ja=null,tu=!1,V1=!1,r$=function(){return!0},o$=function(t){return(Sa.whiteList||r$)(t)},s$=function(t,n){ja={observerNode:t,portaledElement:n}},i$=function(t){return ja&&ja.portaledElement===t};function M2(e,t,n,r){var o=null,i=e;do{var l=r[i];if(l.guard)l.node.dataset.focusAutoGuard&&(o=l);else if(l.lockItem){if(i!==e)return;o=null}else break}while((i+=n)!==t);o&&(o.node.tabIndex=0)}var a$=function(t){return t?!!tu:tu==="meanwhile"},l$=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},c$=function(t,n){return n.some(function(r){return l$(t,r,r)})},T8=function(t){return Xc(t,new Map)},u$=function(t){return!T8([t.parentNode]).some(function(n){return n.node===t})},Mf=function(){var t=!1;if(Sa){var n=Sa,r=n.observed,o=n.persistentFocus,i=n.autoFocus,l=n.shards,c=n.crossFrame,d=n.focusOptions,f=n.noFocusGuards,p=r||ja&&ja.portaledElement;if(B8()&&kn&&kn!==document.body&&(!document.body.contains(kn)||u$(kn))){var m=R2();m&&m.focus()}var g=document&&document.activeElement;if(p){var v=[p].concat(l.map(t$).filter(Boolean)),w=function(){if(!a$(c)||!f||!kn||V1)return!1;var A=T8(v),j=A.findIndex(function(N){var _=N.node;return _===kn});return j===0||j===A.length-1};if((!g||o$(g))&&(o||w()||!n$()||!kn&&i)&&(p&&!(A8(v)||g&&c$(g,v)||i$(g))&&(document&&!kn&&g&&!i?(g.blur&&g.blur(),document.body.focus()):(t=j8(v,kn,{focusOptions:d}),ja={})),kn=document&&document.activeElement,kn!==document.body&&(R2=I8(kn)),tu=!1),document&&g!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var b=document&&document.activeElement,C=HU(v),S=C.map(function(I){var A=I.node;return A}).indexOf(b);S>-1&&(C.filter(function(I){var A=I.guard,j=I.node;return A&&j.dataset.focusAutoGuard}).forEach(function(I){var A=I.node;return A.removeAttribute("tabIndex")}),M2(S,C.length,1,C),M2(S,-1,-1,C))}}}return t},_8=function(t){Mf()&&t&&(t.stopPropagation(),t.preventDefault())},Q1=function(){return H1(Mf)},d$=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||s$(r,n)},f$=function(){return null},R8=function(){V1=!0},M8=function(){V1=!1,tu="just",H1(function(){tu="meanwhile"})},h$=function(){document.addEventListener("focusin",_8),document.addEventListener("focusout",Q1),window.addEventListener("focus",R8),window.addEventListener("blur",M8)},p$=function(){document.removeEventListener("focusin",_8),document.removeEventListener("focusout",Q1),window.removeEventListener("focus",R8),window.removeEventListener("blur",M8)};function m$(e){return e.filter(function(t){var n=t.disabled;return!n})}var O8={moveFocusInside:j8,focusInside:A8,focusNextElement:JU,focusPrevElement:ZU,focusFirstElement:XU,focusLastElement:e$,captureFocusRestore:I8};function g$(e){var t=e.slice(-1)[0];t&&!Sa&&h$();var n=Sa,r=n&&t&&t.id===n.id;Sa=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var i=o.id;return i===n.id}).length||n.returnFocus(!t)),t?(kn=null,(!r||n.observed!==t.observed)&&t.onActivation(O8),Mf(),H1(Mf)):(p$(),kn=null)}h8.assignSyncMedium(d$);p8.assignMedium(Q1);uU.assignMedium(function(e){return e(O8)});const y$=vU(m$,g$)(f$);var F8=B.forwardRef(function(t,n){return E.createElement(O1,Jc({sideCar:y$,ref:n},t))}),L8=O1.propTypes||{};L8.sideCar;iU(L8,["sideCar"]);F8.propTypes={};var D8=f1(),wm=function(){},kh=B.forwardRef(function(e,t){var n=B.useRef(null),r=B.useState({onScrollCapture:wm,onWheelCapture:wm,onTouchMoveCapture:wm}),o=r[0],i=r[1],l=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,m=e.shards,g=e.sideCar,v=e.noRelative,w=e.noIsolation,b=e.inert,C=e.allowPinchZoom,S=e.as,I=S===void 0?"div":S,A=e.gapMode,j=c1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,_=u1([n,t]),P=Xt(Xt({},j),o);return B.createElement(B.Fragment,null,p&&B.createElement(N,{sideCar:D8,removeScrollBar:f,shards:m,noRelative:v,noIsolation:w,inert:b,setCallbacks:i,allowPinchZoom:!!C,lockRef:n,gapMode:A}),l?B.cloneElement(B.Children.only(c),Xt(Xt({},P),{ref:_})):B.createElement(I,Xt({},P,{className:d,ref:_}),c))});kh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kh.classNames={fullWidth:pc,zeroRight:hc};var Gg=!1;if(typeof window<"u")try{var nf=Object.defineProperty({},"passive",{get:function(){return Gg=!0,!0}});window.addEventListener("test",nf,nf),window.removeEventListener("test",nf,nf)}catch{Gg=!1}var ca=Gg?{passive:!1}:!1,v$=function(e){return e.tagName==="TEXTAREA"},U8=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!v$(e)&&n[t]==="visible")},w$=function(e){return U8(e,"overflowY")},b$=function(e){return U8(e,"overflowX")},O2=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=$8(e,r);if(o){var i=z8(e,r),l=i[1],c=i[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},x$=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},C$=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$8=function(e,t){return e==="v"?w$(t):b$(t)},z8=function(e,t){return e==="v"?x$(t):C$(t)},k$=function(e,t){return e==="h"&&t==="rtl"?-1:1},E$=function(e,t,n,r,o){var i=k$(e,window.getComputedStyle(t).direction),l=i*r,c=n.target,d=t.contains(c),f=!1,p=l>0,m=0,g=0;do{if(!c)break;var v=z8(e,c),w=v[0],b=v[1],C=v[2],S=b-C-i*w;(w||S)&&$8(e,c)&&(m+=S,g+=w);var I=c.parentNode;c=I&&I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?I.host:I}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(p&&Math.abs(m)<1||!p&&Math.abs(g)<1)&&(f=!0),f},rf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F2=function(e){return[e.deltaX,e.deltaY]},L2=function(e){return e&&"current"in e?e.current:e},A$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},S$=function(e){return`
1727
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
1728
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
1729
+ `)},j$=0,ua=[];function I$(e){var t=B.useRef([]),n=B.useRef([0,0]),r=B.useRef(),o=B.useState(j$++)[0],i=B.useState(h1)[0],l=B.useRef(e);B.useEffect(function(){l.current=e},[e]),B.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=$k([e.lockRef.current],(e.shards||[]).map(L2),!0).filter(Boolean);return b.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=B.useCallback(function(b,C){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!l.current.allowPinchZoom;var S=rf(b),I=n.current,A="deltaX"in b?b.deltaX:I[0]-S[0],j="deltaY"in b?b.deltaY:I[1]-S[1],N,_=b.target,P=Math.abs(A)>Math.abs(j)?"h":"v";if("touches"in b&&P==="h"&&_.type==="range")return!1;var R=window.getSelection(),M=R&&R.anchorNode,Q=M?M===_||M.contains(_):!1;if(Q)return!1;var V=O2(P,_);if(!V)return!0;if(V?N=P:(N=P==="v"?"h":"v",V=O2(P,_)),!V)return!1;if(!r.current&&"changedTouches"in b&&(A||j)&&(r.current=N),!N)return!0;var H=r.current||N;return E$(H,C,b,H==="h"?A:j)},[]),d=B.useCallback(function(b){var C=b;if(!(!ua.length||ua[ua.length-1]!==i)){var S="deltaY"in C?F2(C):rf(C),I=t.current.filter(function(N){return N.name===C.type&&(N.target===C.target||C.target===N.shadowParent)&&A$(N.delta,S)})[0];if(I&&I.should){C.cancelable&&C.preventDefault();return}if(!I){var A=(l.current.shards||[]).map(L2).filter(Boolean).filter(function(N){return N.contains(C.target)}),j=A.length>0?c(C,A[0]):!l.current.noIsolation;j&&C.cancelable&&C.preventDefault()}}},[]),f=B.useCallback(function(b,C,S,I){var A={name:b,delta:C,target:S,should:I,shadowParent:N$(S)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(j){return j!==A})},1)},[]),p=B.useCallback(function(b){n.current=rf(b),r.current=void 0},[]),m=B.useCallback(function(b){f(b.type,F2(b),b.target,c(b,e.lockRef.current))},[]),g=B.useCallback(function(b){f(b.type,rf(b),b.target,c(b,e.lockRef.current))},[]);B.useEffect(function(){return ua.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",d,ca),document.addEventListener("touchmove",d,ca),document.addEventListener("touchstart",p,ca),function(){ua=ua.filter(function(b){return b!==i}),document.removeEventListener("wheel",d,ca),document.removeEventListener("touchmove",d,ca),document.removeEventListener("touchstart",p,ca)}},[]);var v=e.removeScrollBar,w=e.inert;return B.createElement(B.Fragment,null,w?B.createElement(i,{styles:S$(o)}):null,v?B.createElement(Qk,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function N$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const P$=Hk(D8,I$);var W8=B.forwardRef(function(e,t){return B.createElement(kh,Xt({},e,{ref:t,sideCar:P$}))});W8.classNames=kh.classNames;var q8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},da=new WeakMap,of=new WeakMap,sf={},bm=0,H8=function(e){return e&&(e.host||H8(e.parentNode))},B$=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=H8(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},V8=function(e,t,n,r){var o=B$(t,Array.isArray(e)?e:[e]);sf[n]||(sf[n]=new WeakMap);var i=sf[n],l=[],c=new Set,d=new Set(o),f=function(m){!m||c.has(m)||(c.add(m),f(m.parentNode))};o.forEach(f);var p=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(g){if(c.has(g))p(g);else try{var v=g.getAttribute(r),w=v!==null&&v!=="false",b=(da.get(g)||0)+1,C=(i.get(g)||0)+1;da.set(g,b),i.set(g,C),l.push(g),b===1&&w&&of.set(g,!0),C===1&&g.setAttribute(n,"true"),w||g.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",g,S)}})};return p(t),c.clear(),bm++,function(){l.forEach(function(m){var g=da.get(m)-1,v=i.get(m)-1;da.set(m,g),i.set(m,v),g||(of.has(m)||m.removeAttribute(r),of.delete(m)),v||m.removeAttribute(n)}),bm--,bm||(da=new WeakMap,da=new WeakMap,of=new WeakMap,sf={})}},T$=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||q8(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),V8(r,o,n,"aria-hidden")):function(){return null}},_$=function(e,t,n){n===void 0&&(n="data-inert-ed");var r=t||q8(e);return r?V8(e,r,n,"inert"):function(){return null}},R$=function(){return typeof HTMLElement<"u"&&HTMLElement.prototype.hasOwnProperty("inert")},M$=function(e,t,n){return n===void 0&&(n="data-suppressed"),(R$()?_$:T$)(e,t,n)};let pi=[];const Kg=new Set;function Q8(){Kg.forEach(e=>e())}function O$(e){pi=pi.filter(t=>t!==e),pi.push(e),Q8()}function F$(e){pi=pi.filter(t=>t!==e),Q8()}function xm(e){return pi[pi.length-1]===e}function L$(e,t,n){const r=B.useRef(n),o=B.useRef(null),[i,l]=B.useState(!1);B.useEffect(()=>{r.current=n},[n]);const c=B.useCallback(()=>{const f=o.current;o.current=null,f&&document.contains(f)&&f.focus({preventScroll:!0})},[]),d=B.useCallback(()=>{r.current()},[]);return B.useEffect(()=>{if(!e)return;const f=t.current;if(!f)return;const p=f;o.current=document.activeElement instanceof HTMLElement?document.activeElement:null,O$(p),l(xm(p));function m(){l(xm(p))}function g(v){xm(p)&&v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),v.stopImmediatePropagation(),d())}return Kg.add(m),window.addEventListener("keydown",g,!0),()=>{window.removeEventListener("keydown",g,!0),Kg.delete(m),F$(p),c()}},[d,e,t,c]),B.useEffect(()=>{var m,g;if(!e||!i)return;const f=t.current;if(!f)return;const p=((g=(m=f.parentElement)==null?void 0:m.parentElement)==null?void 0:g.querySelectorAll("[data-focus-guard]"))??[];return M$([f,...p])},[e,i,t]),{closeDialog:d,isTopDialog:i}}const D$={sm:"24rem",md:"28.75rem",lg:"35rem"};function U$(){return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M4 4L12 12M12 4L4 12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}function G1({bodyClassName:e,children:t,className:n,closeLabel:r="Close",eyebrow:o,isOpen:i,onClose:l,overlayClassName:c,size:d="md",subtitle:f,title:p}){const m=B.useRef(null),g=B.useId(),v=B.useId(),{closeDialog:w,isTopDialog:b}=L$(i,m,l);if(!i)return null;const C=["as-modal-overlay",c].filter(Boolean).join(" "),S=["as-modal",`as-modal--${d}`,n].filter(Boolean).join(" "),I=["as-modal__body",e].filter(Boolean).join(" "),A={"--as-modal-width":D$[d]};return h.jsx("div",{className:C,role:"presentation",onMouseDown:w,children:h.jsx(W8,{allowPinchZoom:!0,className:"as-modal__scroll-lock",enabled:b,style:A,children:h.jsx(F8,{autoFocus:!0,className:"as-modal__focus-lock",disabled:!b,focusOptions:{preventScroll:!0},returnFocus:!1,children:h.jsxs("div",{"aria-describedby":f?v:void 0,"aria-hidden":b?void 0:!0,"aria-labelledby":g,"aria-modal":b?"true":void 0,className:S,ref:m,role:"dialog",tabIndex:-1,onMouseDown:j=>j.stopPropagation(),children:[h.jsxs("header",{className:"as-modal__header",children:[h.jsxs("div",{className:"as-modal__titles",children:[o&&h.jsx("div",{className:"as-modal__eyebrow",children:o}),h.jsx("h2",{className:"as-modal__title",id:g,children:p}),f&&h.jsx("p",{className:"as-modal__subtitle",id:v,children:f})]}),h.jsx($$,{label:r,className:"as-modal__close",onClick:w,children:h.jsx(U$,{})})]}),h.jsx("div",{className:I,children:t})]})})})})}function $$({children:e,className:t,label:n,onClick:r}){return h.jsx("button",{type:"button",className:t,onClick:r,"aria-label":n,children:e})}const K1=B.createContext(null),G8=typeof document>"u"?B.useEffect:B.useLayoutEffect;function Y1({title:e,children:t,onClose:n,busy:r=!1}){const o=B.useRef(!1),i=B.useRef(r);G8(()=>{i.current=r},[r]);const[l]=B.useState(()=>typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null);B.useEffect(()=>()=>{queueMicrotask(()=>{l!=null&&l.isConnected&&l.focus({preventScroll:!0})})},[l]);const c=h.jsx(G1,{isOpen:!0,title:e,size:"lg",overlayClassName:"ants-stake-overlay ants-action-overlay",onClose:()=>{!i.current&&!o.current&&n()},children:h.jsx(K1.Provider,{value:o,children:t})});return typeof document>"u"?c:l1.createPortal(c,document.body)}function K8({title:e,hideTitle:t=!1,summary:n,children:r,confirmLabel:o="Confirm",danger:i,disabled:l,busy:c,error:d,onConfirm:f,onCancel:p,embedded:m,cancelLabel:g="Cancel"}){const v=B.useContext(K1),w=m||v!==null;G8(()=>(v&&(v.current=c===!0),()=>{v&&(v.current=!1)}),[c,v]);const b=h.jsxs(Qr,{className:"confirm",tone:i?"danger":"surface",role:"region","aria-label":e,children:[w&&!t?h.jsx("div",{className:"confirm-title",children:e}):null,n&&n.length>0?h.jsx("dl",{className:"facts",children:n.map(([C,S],I)=>h.jsx(z$,{label:C,value:S},`${C}-${I}`))}):null,r,d?h.jsx("div",{className:"error-text",children:d}):null,h.jsxs("div",{className:"confirm-actions",children:[h.jsx(wt,{variant:i?"danger":"primary",onClick:f,disabled:l||c,children:c?"Sending…":o}),h.jsx(wt,{variant:"outline",onClick:p,disabled:c,children:g})]})]});return w?b:h.jsx(Y1,{title:e,onClose:p,busy:c,children:b})}function z$({label:e,value:t}){return h.jsxs(h.Fragment,{children:[h.jsx("dt",{children:e}),h.jsx("dd",{children:t})]})}function J1(e=!1){const{config:{readOnly:t,selectedAddress:n,walletAddress:r,browserWallet:o},overview:i,overviewError:l}=Pi(),{running:c}=Is(),d=i8();return o&&!d?{blocked:!0,label:"Connect wallet",reason:"Connect wallet before submitting a transaction."}:d!=null&&d.reason?{blocked:!0,reason:d.reason,label:d.label}:t?{blocked:!0,reason:"Read-only mode: no wallet is available to sign."}:n&&!e&&n.toLowerCase()!==(r==null?void 0:r.toLowerCase())?{blocked:!0,reason:`Connect the selected account wallet ${n} for seller and staking actions.`}:!i||l?{blocked:!0,reason:"Wallet information is unavailable. Refresh before sending a transaction."}:BigInt(i.wallet.signingWalletEth??i.wallet.eth)===0n?{blocked:!0,reason:"The signing wallet needs ETH on the selected network for transaction fees."}:c?{blocked:!0,reason:"Another action is still running."}:{blocked:!1,reason:void 0}}function Kr(e){const t=Is(),n=e.body,r=e.path==="/api/rewards/claim"&&(n==null?void 0:n.scope)==="buyer"||e.path==="/api/rewards/stake-usage"&&(n==null?void 0:n.side)==="buyer",o=J1(r),[i,l]=B.useState(!1),[c,d]=B.useState(null),[f,p]=B.useState(!1),m=B.useRef(!1),g=B.useContext(K1),v=!e.children,w=o.blocked||e.disabled===!0,b=o.reason??(e.disabled?e.disabledReason:void 0),C=async()=>{var j;if(w||m.current||v&&e.confirmDisabled)return;const A=((j=e.validate)==null?void 0:j.call(e))??null;d(A),A===null&&(v?await S():l(!0))},S=async()=>{var j,N;if(w||e.confirmDisabled||m.current)return;const A=((j=e.validate)==null?void 0:j.call(e))??null;if(A!==null){d(A);return}m.current=!0,v&&g&&(g.current=!0),p(!0),d(null);try{await t.start(e.path,e.body),l(!1),(N=e.onStarted)==null||N.call(e)}catch(_){t.pushToast({tone:"danger",title:`${e.title??e.label} failed`,body:ks(_),sticky:!0})}finally{m.current=!1,v&&g&&(g.current=!1),p(!1)}},I=e.variant==="primary"?"primary":e.variant==="danger"?"danger":"outline";return h.jsxs("div",{className:"action",children:[i?null:h.jsx("span",{className:"btn-wrap",title:b,children:h.jsx(wt,{variant:I,size:e.size==="sm"?"sm":"md",onClick:C,disabled:w||f||v&&e.confirmDisabled,children:f&&v?"Sending…":o.label??e.label})}),c&&!i?h.jsx("div",{className:"error-text",children:c}):null,i?h.jsx(K8,{title:e.title??e.label,summary:e.summary,confirmLabel:o.label??e.confirmLabel??e.label,danger:e.variant==="danger",disabled:w||e.confirmDisabled,busy:f,error:c,onConfirm:()=>{S()},onCancel:()=>{l(!1),d(null)},children:e.children}):null]})}function Nn({tone:e="neutral",mono:t,title:n,children:r}){const o=["pill",e!=="neutral"?`pill--${e}`:"",t?"pill--mono":""].filter(Boolean).join(" ");return h.jsx("span",{className:o,title:n,children:r})}const Cm="antseed-wash-trading-seller-proof";function W$({data:e}){const t=e.registry;return h.jsx("div",{className:"stack",children:t?h.jsxs(h.Fragment,{children:[h.jsx($t,{items:[["Registry",h.jsx(ut,{value:t.address})],["Enforced",e.enforced?h.jsx(Nn,{tone:"accent",children:"enforced"}):h.jsx(Nn,{tone:"muted",children:"not enforced"})],["Flag threshold",`${Bn(t.thresholdBps)} of seller volume`],["Period blocks",`${Fe(t.periodStartBlock)} – ${Fe(t.periodEndBlock)}`]]}),h.jsxs(ir,{summary:"Details",children:[h.jsx($t,{items:[["Verifier",h.jsx(ut,{value:t.verifier,short:!1})],["Verifier hash",h.jsx("span",{className:"break mono small",children:t.verifierHash})],["Blockhash store",h.jsx(ut,{value:t.blockhashStore,short:!1})],["Seller program vkey",h.jsx("span",{className:"break mono small",children:t.sellerProgramVKey})],["Points policy",e.pointsPolicy?h.jsx(ut,{value:e.pointsPolicy,short:!1}):h.jsx("span",{className:"muted",children:"not set"})],...e.policies.map(n=>["Policy → pinned registry",h.jsxs("span",{children:[h.jsx(ut,{value:n.address})," → ",n.washTradingRegistry?h.jsx(ut,{value:n.washTradingRegistry}):h.jsx("span",{className:"muted",children:"not pinned"})]})])]}),h.jsx("div",{className:"hint mt",children:"Enforced means the active points policy pins the registry, so flagged sellers earn no usage points."})]})]}):h.jsx("span",{className:"muted",children:"No wash-trading registry is deployed on this chain."})})}function Y8({data:e,seller:t}){const n=e.seller;return n?h.jsxs("div",{className:"stack",children:[h.jsxs("div",{className:"row",children:[n.isProvenWashTrader?h.jsx(Nn,{tone:"danger",children:"flagged wash trader"}):h.jsx(Nn,{tone:"accent",children:"not flagged"}),h.jsxs("span",{className:"muted small",children:["proven share ",h.jsx("span",{className:`mono ${n.isProvenWashTrader?"danger":""}`,children:Bn(n.provenWashShareBps)})]})]}),h.jsx($t,{items:[["Proven wash volume",`${Wn(n.provenWashVolume)} USDC`],["Total seller volume",`${Wn(n.totalSellerVolume)} USDC`]]}),h.jsx(ir,{summary:"Evidence",children:h.jsx($t,{items:[["Seller",h.jsx(ut,{value:n.seller,short:!1})],["Evidence digest",h.jsx("span",{className:"break mono small",children:n.evidenceDigest})]]})})]}):h.jsxs("div",{className:"muted small",children:["No verification record for ",h.jsx(ut,{value:t}),"."]})}function q$(){const{address:e}=Ns(),t=tt("verification:own",()=>Ye.verification(),5*6e4);return t.error&&!t.data?h.jsx(tn,{error:t.error,onRetry:t.refresh}):t.data?t.data.registry?h.jsx(Y8,{data:t.data,seller:e}):h.jsx("span",{className:"muted",children:"No wash-trading registry is deployed on this chain."}):h.jsxs("span",{className:"muted small",children:[h.jsx(xh,{})," loading…"]})}function H$(){const[e,t]=B.useState(""),[n,r]=B.useState(null),o=tt(n?`verification:${n.toLowerCase()}`:null,()=>Ye.verification(n??void 0),5*6e4),i=cD(e.trim());return h.jsxs("div",{className:"stack",children:[h.jsxs("div",{className:"form-row",children:[h.jsx(fl,{label:"Seller address",width:"lg",value:e,onChange:l=>t(l.target.value),placeholder:"0x…"}),h.jsx(wt,{variant:"outline",onClick:()=>r(e.trim()),disabled:!i,children:"Look up"})]}),e.trim()&&!i?h.jsx("div",{className:"error-text",children:"Enter a 0x-prefixed 20-byte address."}):null,n&&o.loading&&!o.data?h.jsxs("span",{className:"muted small",children:[h.jsx(xh,{})," loading…"]}):null,n&&o.error&&!o.data?h.jsx(tn,{error:o.error,onRetry:o.refresh}):null,n&&o.data?h.jsx(Y8,{data:o.data,seller:n}):null]})}function V$(e){if(typeof e!="object"||e===null)return null;const t=e.kind;return typeof t=="string"?t:null}function Q$(e){if(typeof e!="object"||e===null)return null;const t=e,n=t.seller;if(typeof n=="string")return n;const r=t.claim;if(typeof r=="object"&&r!==null){const o=r.seller;if(typeof o=="string")return o}return null}function G$(){const[e,t]=B.useState(null),[n,r]=B.useState(null),o=async i=>{var c;const l=(c=i.target.files)==null?void 0:c[0];if(t(null),r(null),!!l)try{const d=JSON.parse(await l.text()),f=V$(d);if(f!==Cm){r(`Expected a proof file with kind "${Cm}"${f?`, got "${f}"`:""}.`);return}t({name:l.name,artifact:d,kind:f,seller:Q$(d)})}catch(d){r(`Could not parse file as JSON: ${ks(d)}`)}};return h.jsxs("div",{className:"stack",children:[h.jsxs("div",{className:"hint",children:["Pick a seller proof produced by the loop-proof tooling (",h.jsx("code",{children:Cm}),"). Only the kind is checked here; the registry verifies the proof on chain. Submission may take several transactions (block references, chunks, finalize)."]}),h.jsxs("div",{className:"form-row",children:[h.jsx(Ea,{label:"Proof file",children:h.jsx("input",{type:"file",accept:"application/json,.json",onChange:i=>{o(i)}})}),h.jsx(Kr,{label:"Submit proof",variant:"primary",title:"Submit seller proof",path:"/api/verification/submit",body:{artifact:e==null?void 0:e.artifact},disabled:!e,disabledReason:"Choose a valid proof file first."})]}),n?h.jsx("div",{className:"error-text",children:n}):null]})}function K$(){const[e,t]=B.useState(""),[n,r]=B.useState(null),[o,i]=B.useState(null),[l,c]=B.useState(!1),d=async()=>{const f=e.trim();if(f){c(!0),i(null),r(null);try{r(await Ye.proofStatus(f))}catch(p){i(ks(p))}finally{c(!1)}}};return h.jsxs("div",{className:"stack",children:[h.jsxs("div",{className:"form-row",children:[h.jsx(fl,{label:"Proof id",width:"lg",value:e,onChange:f=>t(f.target.value),placeholder:"0x…"}),h.jsx(wt,{variant:"outline",onClick:()=>{d()},disabled:!e.trim()||l,children:l?"Looking up…":"Look up"})]}),o?h.jsx("div",{className:"error-text",children:o}):null,n?h.jsx($t,{items:[["Proof id",h.jsx("span",{className:"break mono small",children:n.proofId})],["Staged",n.staged?"yes":"no"],["Finalized",n.finalized?"yes":"no"],["Authenticated block references",Fe(n.authenticatedBlockReferenceCount)],["Authenticated block chunks",Fe(n.authenticatedBlockChunkCount)]]}):null]})}function Y$(){const e=tt("network",Ye.network,2e4),{data:t,refresh:n}=e,r=Ch(1e3),o=B.useRef(null);B.useEffect(()=>{const l=()=>{document.visibilityState==="visible"&&n()},c=window.setInterval(l,6e4);return document.addEventListener("visibilitychange",l),()=>{window.clearInterval(c),document.removeEventListener("visibilitychange",l)}},[n]),B.useEffect(()=>{if(!t||o.current===t.epoch.current)return;const l=Math.max(1e3,t.epoch.secondsToBoundary*1e3-(Date.now()-t.fetchedAt)),c=window.setTimeout(()=>{o.current=t.epoch.current,document.visibilityState==="visible"&&n()},l);return()=>window.clearTimeout(c)},[t,n]);const i=!!t&&(!!e.error||r-t.fetchedAt>9e4);return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"row",children:[h.jsx("h1",{className:"page-title",children:"Network"}),h.jsx(wt,{variant:"outline",size:"sm",onClick:n,disabled:e.loading,children:"Refresh network"})]}),e.error&&!t?h.jsx(tn,{error:e.error,onRetry:n}):null,!t&&e.loading?h.jsx(Su,{rows:5}):null,t&&h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"hint",children:[t.evmChainId===31337?"Local Anvil · test-chain data, not live production":`${t.chainId} · chain ${t.evmChainId}`," · block ",t.blockNumber," · ",ar(t.blockTimestamp)]}),t.activation!=="active"&&h.jsx("p",{className:"status-line",children:t.activation==="not-active"?"The configured reward stack is not the registry’s active stack. These are its configured allowances, not a claim of active reward distribution.":"Registry activation could not be verified."}),t.epoch.effective!==null&&t.epoch.current<t.epoch.effective&&h.jsxs("p",{className:"hint",children:["Recognized-usage rewards start at epoch ",t.epoch.effective,". The current epoch is before reward activation."]}),i&&h.jsxs("p",{className:"status-line",role:"status",children:["Stale network snapshot. ",e.error??"Refresh to read the latest contract state."]}),t.errors.length>0&&h.jsxs("div",{className:"status-line",role:"status",children:["Some contract reads are unavailable: ",t.errors.join(" ")]}),h.jsx(J$,{data:t,now:r}),h.jsx(nU,{data:t}),h.jsx(Dt,{children:h.jsxs(ir,{summary:"Emission schedule and contract details",children:[h.jsx($t,{items:[["First recognized-usage reward epoch",t.epoch.effective??"Unavailable"],["Epoch length",bh(t.epoch.epochDuration)],["Genesis",ar(t.epoch.genesis)],["Initial scheduled emission",Sn(t.initialEmission)],["Halving interval",`${t.halvingInterval} epochs`],["Scheduled cumulative emission through this epoch",Sn(t.cumulativeScheduled)],["Total active stake",Sn(t.totalActiveStake)],["Total power weight",t.totalPowerWeight===null?"Unavailable":be(t.totalPowerWeight)],...Object.entries(t.contracts).map(([l,c])=>[l,h.jsx(ut,{value:c,short:!1})])]}),h.jsx("p",{className:"hint",children:"Scheduled emission is an allowance, not a minted-token counter. Current supply is read separately from the token contract. All main network figures use the same snapshot block."})]})})]}),h.jsx(Dt,{children:h.jsx(ir,{summary:"Your usage history and network comparisons",lazy:!0,children:h.jsx(oU,{})})}),h.jsx(Dt,{children:h.jsx(ir,{summary:"Legacy emissions",lazy:!0,children:h.jsx(Z$,{})})}),h.jsx(Dt,{children:h.jsx(ir,{summary:"Verification registry",lazy:!0,children:h.jsx(X$,{})})})]})}function J$({data:e,now:t}){const n=Math.max(0,e.epoch.secondsToBoundary-Math.floor((t-e.fetchedAt)/1e3));return h.jsxs(M1,{children:[h.jsx(kr,{label:"Current epoch",value:e.epoch.current,sub:ar(e.epoch.genesis+e.epoch.current*e.epoch.epochDuration)}),h.jsx(kr,{label:"Next epoch starts in",value:n>0?bh(n):"Awaiting chain update",sub:ar(e.epoch.nextBoundaryAt)}),h.jsx(kr,{label:"Scheduled epoch emission · ANTS",value:e.emission===null?"Unavailable":be(e.emission),sub:"Allowance, not tokens already minted"}),h.jsx(kr,{label:"Current token supply · ANTS",value:e.totalSupply===null?"Unavailable":be(e.totalSupply),sub:`Maximum supply: ${Sn(e.maxSupply)}`})]})}function Z$(){const e=tt("network:legacy",Ye.networkLegacy,3e5);if(e.error)return h.jsx(tn,{error:e.error,onRetry:e.refresh});if(e.loading&&!e.data)return h.jsx(Su,{rows:2});const t=e.data;return t?h.jsxs(h.Fragment,{children:[h.jsx($t,{items:[["Legacy contract",h.jsx(ut,{value:t.contract})],["Legacy epoch",t.currentEpoch],["Legacy configured split",`Sellers ${t.sellerPct}% · buyers ${t.buyerPct}% · reserve ${t.reservePct}% · team ${t.teamPct}%`]]}),h.jsx("p",{className:"hint",children:"Historical reward-system configuration. These percentages do not describe the current recognized-usage reward budgets."})]}):h.jsx("p",{className:"muted",children:"No legacy emissions contract configured."})}function X$(){const e=tt("verification:own",()=>Ye.verification(),3e5);return e.error?h.jsx(tn,{error:e.error,onRetry:e.refresh}):e.data?h.jsx(W$,{data:e.data}):h.jsx(Su,{rows:3})}const ez=10000n*10n**18n,Yg=86400,Of=1e4,Eh=">10.000%",tz=`APY is shown as ${Eh} when either end of the range exceeds 10,000%. Ranges at or below 10,000% remain visible.`;function nu(e){return e==null||!Number.isFinite(e)?"—":e>Of?Eh:`${e.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}%`}function J8(e,t,n){const r=Number(e*10n**18n/t)/1e18,o=Math.expm1(Math.log1p(r)*(365*Yg/n))*100;return Number.isFinite(o)?o:null}function nz(e,t,n,r){const o=t==null?void 0:t.yield;if(!t||t.agentId!==e.agentId||!o||o.status==="unavailable"||o.epoch<0||o.reward==null||n===void 0||!Number.isSafeInteger(n)||n<0||e.withdrawn||e.closedAtEpoch!==0||e.state==="closed"||e.state==="withdrawn"||e.state==="matured")return null;const i=o.endsAt-o.startsAt;if(!Number.isFinite(i)||i<=0)return null;try{const l=BigInt(e.amount),c=BigInt(t.weight),d=BigInt(o.reward);if(l<=0n||c<0n||d<0n)return null;const f=e.stakeStartEpoch>n,p=f?e.stakeStartEpoch===n+1?e.nextPower:void 0:e.power;let m;if(p!=null)m=BigInt(p);else{const w=(f?e.maxLockedNext:e.maxLocked)?r:e.stakeEndEpoch-Math.max(n,e.stakeStartEpoch);if(w===void 0||!Number.isSafeInteger(w)||w<=0)return null;const b=BigInt(e.weightAmount);if(b<=0n)return null;m=b*BigInt(w)}if(m<=0n)return null;const g=f?c+m:c;return g<=0n||m>g?null:J8(d*m/g,l,i)}catch{return null}}function Z8(e,t){const n=e?e.endsAt-e.startsAt:0;if(!e||!Number.isFinite(n)||n<=0||e.minLockEpochs==null||e.maxLockEpochs==null)return{epochs:null,actualDays:null,status:"unavailable"};const r=Math.round(t*Yg/n);return!Number.isSafeInteger(r)||r<1||r<e.minLockEpochs||r>e.maxLockEpochs?{epochs:null,actualDays:null,status:"unsupported"}:{epochs:r,actualDays:r*n/Yg,status:"supported"}}function Jg(e,t){const{epochs:n}=Z8(e,t);if(n===null)return{epochs:null,apy:null};const r=X8(e,n,ez.toString());return{epochs:r===null?null:n,apy:r}}function X8(e,t,n,r=0){if(!e||e.status==="unavailable"||e.epoch<0||e.reward==null||e.power==null||e.minLockEpochs==null||e.maxLockEpochs==null)return null;const o=e.endsAt-e.startsAt;if(!Number.isFinite(o)||o<=0||!Number.isSafeInteger(t)||t<1||t<e.minLockEpochs||t>e.maxLockEpochs||!Number.isSafeInteger(r)||r<0)return null;try{const i=BigInt(e.reward),l=BigInt(e.power),c=BigInt(n);if(i<0n||l<=0n||c<=0n)return null;const f=c*(10000n+BigInt(r))/10000n*BigInt(t),p=i*f/(l+f);return J8(p,c,o)}catch{return null}}function Z1(e){return{oneWeek:Jg(e,7),twoYears:Jg(e,730)}}function rz(e){return[{label:"1 day",days:1},{label:"1 month",days:30},{label:"1 year",days:365},{label:"2 years",days:730}].map(t=>({...t,...Z8(e,t.days),apy:Jg(e,t.days).apy}))}function X1({left:e,top:t,title:n,rows:r}){const o=typeof window<"u"&&e>window.innerWidth-240;return h.jsxs("div",{className:o?"chart-tip chart-tip--left":"chart-tip",style:{left:e,top:t},role:"status","aria-live":"polite",children:[h.jsx("div",{className:"chart-tip-title",children:n}),r.map(i=>h.jsxs("div",{className:"chart-tip-row",children:[h.jsx("i",{style:i.color?{background:i.color}:void 0,"aria-hidden":"true"}),h.jsx("span",{className:"chart-tip-name",children:i.name}),h.jsxs("span",{className:"chart-tip-value",children:[i.value,i.note?h.jsxs("small",{children:[" ",i.note]}):null]})]},i.name))]})}function oz(e,t,n,r){if(r<=0||n<=0)return null;const o=Math.floor((e-t)/n);return o<0||o>=r?null:o}function eA(e,t){let n=null,r=Number.POSITIVE_INFINITY;return t.forEach((o,i)=>{const l=Math.abs(o-e);l<r&&(r=l,n=i)}),n}function ev(e,t,n,r){const[o,i]=B.useState(null);return{hover:o,onPointerMove:f=>{var g;const p=(g=e.current)==null?void 0:g.getBoundingClientRect();if(!p||p.width===0)return;const m=r((f.clientX-p.left)*(t/p.width));m===null?i(null):m!==(o==null?void 0:o.index)&&i({index:m})},onPointerLeave:()=>i(null),setHover:i,clientPoint:(f,p)=>{var g;const m=(g=e.current)==null?void 0:g.getBoundingClientRect();return!m||m.width===0?{left:f,top:p}:{left:m.left+f*(m.width/t),top:m.top+p*(m.height/n)}}}}function sz(e,t,n){const r=new Map(t.map(o=>[o.epoch,ht(o.usdc)]));return e.filter(o=>o.epoch<n).sort((o,i)=>o.epoch-i.epoch).map(o=>{const i=ht(o.usdc),l=r.get(o.epoch);return{epoch:o.epoch,volume:i!==null&&i>=0n?i:null,network:l??null,share:i!==null&&i>=0n&&l!=null&&l>0n&&i<=l?i*10000n/l:null}})}function iz({points:e}){var V,H;const t=B.useId(),n=B.useRef(null),[r,o]=B.useState(800);B.useEffect(()=>{if(!n.current||typeof ResizeObserver>"u")return;const L=new ResizeObserver(z=>{const O=z[0];O&&o(Math.max(280,Math.round(O.contentRect.width)))});return L.observe(n.current),()=>L.disconnect()},[]);const i=e.flatMap(L=>L.volume===null?[]:[L.volume]),l=i.reduce((L,z)=>z>L?z:L,0n)||1000000n,c=e.some(L=>L.share!==null),d=64,f=r-64,p=((V=e[0])==null?void 0:V.epoch)??0,m=((H=e.at(-1))==null?void 0:H.epoch)??p,g=L=>p===m?r/2:d+(L-p)/(m-p)*(f-d),v=(L,z)=>218-Number(L*1000000n/z)/1e6*180,w=[{key:"volume",name:"Settled volume",scale:l,format:L=>`${Wn(String(L))} USDC`},{key:"share",name:"Network volume share",scale:10000n,format:L=>Bn(Number(L))}],b=(L,z)=>{let O=null;return e.map(K=>{const J=K[L];if(J===null)return O=null,"";const F=O!==null&&K.epoch===O+1?"L":"M";return O=K.epoch,`${F}${g(K.epoch)},${v(J,z)}`}).join(" ")},C=r<500?3:6,S=Math.max(1,Math.ceil((e.length-1)/(C-1))),I=B.useRef(null),A=e.map(L=>g(L.epoch)),{hover:j,onPointerMove:N,onPointerLeave:_,setHover:P,clientPoint:R}=ev(I,r,270,L=>eA(L,A)),M=j!==null?e[j.index]??null:null,Q=[];return M&&(M.volume!==null&&Q.push({name:"Settled volume",value:`${Wn(String(M.volume))} USDC`,color:"var(--pc-accent)"}),M.network!==null&&Q.push({name:"Network volume",value:`${Wn(String(M.network))} USDC`,color:"var(--pc-sub)"}),M.share!==null&&Q.push({name:"Network share",value:Bn(Number(M.share)),color:"var(--pc-blue)"})),h.jsxs("div",{className:"pool-chart",children:[h.jsxs("div",{className:"pool-chart-legend",children:[h.jsxs("h4",{children:[h.jsx("span",{className:"pool-chart-dot"}),"Settled volume · left axis"]}),h.jsxs("h4",{className:"pool-chart--share",children:[h.jsx("span",{className:"pool-chart-dot"}),"Network volume share · right axis"]})]}),h.jsxs("div",{ref:n,className:"pool-chart-plot",children:[i.length?h.jsxs("svg",{ref:I,viewBox:`0 0 ${r} 270`,role:"img","aria-labelledby":t,onPointerMove:N,onPointerLeave:_,children:[h.jsx("title",{id:t,children:"Settled volume and network volume share by completed epoch. USDC on the left axis; 0–100% on the right axis. Hover anywhere over the chart for that epoch's values."}),M?h.jsx("line",{x1:g(M.epoch),x2:g(M.epoch),y1:38,y2:218,className:"chart-crosshair","aria-hidden":"true"}):null,h.jsx("text",{x:d,y:"16",className:"pool-chart-axis-volume",children:"USDC"}),h.jsx("text",{x:f,y:"16",textAnchor:"end",className:"pool-chart-axis-share",children:"Share · %"}),[0,1,2,3,4].map(L=>h.jsxs("g",{children:[h.jsx("line",{x1:d,x2:f,y1:38+L*45,y2:38+L*45,className:"pool-chart-grid"}),h.jsx("text",{x:d-9,y:42+L*45,textAnchor:"end",className:"pool-chart-axis-volume",children:Ja(String(l*BigInt(4-L)/4n))}),h.jsxs("text",{x:f+9,y:42+L*45,textAnchor:"start",className:"pool-chart-axis-share",children:[100-L*25,"%"]})]},L)),w.map(L=>h.jsxs("g",{className:L.key==="share"?"pool-chart--share":void 0,children:[e.some(z=>z[L.key]!==null)&&h.jsx("path",{d:b(L.key,L.scale),className:"pool-chart-line","data-series":L.key}),e.map((z,O)=>{const K=z[L.key];if(K===null)return null;const J=`${L.name}, epoch ${z.epoch}: ${L.format(K)}`;return h.jsx("circle",{cx:g(z.epoch),cy:v(K,L.scale),r:M===z?5.5:4,tabIndex:0,role:"img","aria-label":J,onFocus:()=>P({index:O}),onBlur:_,children:h.jsx("title",{children:J})},z.epoch)})]},L.key)),e.filter((L,z)=>z%S===0||z===e.length-1).map(L=>h.jsx("text",{x:g(L.epoch),y:"242",textAnchor:"middle",children:L.epoch},L.epoch)),h.jsx("text",{x:r/2,y:"265",textAnchor:"middle",children:"Epoch"})]}):h.jsx("div",{className:"pool-chart-empty",children:"Settlement volume unavailable for completed epochs."}),M&&Q.length>0?h.jsx(X1,{...R(g(M.epoch),38),title:`Epoch ${M.epoch}`,rows:Q}):null]}),i.length>0&&!c&&h.jsx("p",{className:"hint",children:"Network share unavailable for these epochs."})]})}function az({volumes:e,networkVolumes:t,currentEpoch:n}){const r=sz(e,t,n);return h.jsxs(h.Fragment,{children:[h.jsx(iz,{points:r}),h.jsx("p",{className:"hint",children:"Network share = seller settled volume ÷ total network settled volume in the same epoch. The right axis stays at 0–100%; each line uses its own units. Missing observations leave gaps; a missing or zero network total is not a 0% share."})]})}function lz(e){const t=new Map;for(const n of e){const r=n.name.trim(),o=r.toLowerCase(),i=t.get(o)??{name:r,providers:[]};i.providers.includes(n.provider)||i.providers.push(n.provider),t.set(o,i)}return[...t.values()]}function cz({address:e}){const t=tt(e?`seller-models:${e}`:null,()=>Ye.sellerModels(e)),n=t.data;return h.jsxs("section",{className:"pool-section",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Models & usage"}),h.jsx("span",{className:"small muted",children:"Sourced from Antscan"})]}),e?n?h.jsxs(h.Fragment,{children:[t.error&&h.jsx("p",{className:"hint",children:"Model data could not refresh. Showing the previously loaded snapshot."}),h.jsxs("h4",{className:"pool-subheading",children:["Observed model usage ",h.jsxs("span",{className:"small muted",children:["Last completed epoch",n.period?` · Epoch ${n.period.epoch}`:""]})]}),n.usageStatus==="unavailable"?h.jsxs("div",{role:"status",children:[h.jsx("p",{className:"hint",children:n.usageError??"Model usage is unavailable."}),h.jsx("button",{type:"button",className:"link-button",onClick:t.refresh,disabled:t.loading,children:"Retry model data"})]}):n.usage.length?h.jsx("div",{className:"table-wrap",tabIndex:0,role:"region","aria-label":"Observed model usage",children:h.jsxs("table",{className:"table pool-model-table",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:"Model"}),h.jsx("th",{className:"num",children:"Requests"}),h.jsx("th",{className:"num",children:"Input tokens"}),h.jsx("th",{className:"num",children:"Output tokens"}),h.jsx("th",{className:"num",children:"Volume · USDC"})]})}),h.jsx("tbody",{children:n.usage.map(r=>h.jsxs("tr",{children:[h.jsx("td",{children:r.name}),h.jsx("td",{className:"num",children:Fe(r.requests)}),h.jsx("td",{className:"num",children:Fe(r.inputTokens)}),h.jsx("td",{className:"num",children:Fe(r.outputTokens)}),h.jsx("td",{className:"num",children:Wn(r.volumeUsdc)})]},r.serviceId))})]})}):h.jsx("p",{className:"hint",children:"No indexed model usage for this seller in this epoch."}),n.totals&&h.jsxs("p",{className:"hint",children:["Settled volume: ",Wn(n.totals.settledVolumeUsdc)," USDC · Model-attributed: ",Wn(n.totals.attributedVolumeUsdc)," USDC · Unattributed: ",n.totals.unattributedVolumeUsdc===null?"unavailable (model totals exceed settlements)":`${Wn(n.totals.unattributedVolumeUsdc)} USDC`]}),h.jsxs("section",{className:"pool-catalog","aria-label":"Advertised models",children:[h.jsxs("h4",{className:"pool-subheading",children:["Advertised models ",h.jsx("span",{className:"small muted",children:n.catalogStatus==="live"?"Latest discovered catalog":n.catalogStatus==="stale"?"Stale catalog":"Unavailable"})]}),h.jsx("p",{className:"hint",children:"Seller-advertised models, not a guarantee of availability."}),n.catalogStatus==="unavailable"?h.jsx("p",{className:"hint",children:"Antscan model catalog is unavailable."}):n.offerings.length?h.jsx("ul",{className:"pool-model-tags","aria-label":"Advertised model names",children:lz(n.offerings).map(r=>h.jsx("li",{children:h.jsx(Nn,{title:`Providers: ${r.providers.join(", ")}`,children:r.name})},r.name))}):h.jsx("p",{className:"hint",children:"No advertised models found in Antscan’s catalog."}),n.catalogUpdatedAt!==null&&h.jsxs("p",{className:"small muted",children:["Catalog snapshot ",ar(Math.floor(n.catalogUpdatedAt/1e3))]})]})]}):t.error?h.jsxs("div",{role:"status",children:[h.jsx("p",{className:"hint",children:"Model data could not load. Pool statistics remain available."}),h.jsx("p",{className:"hint",children:t.error}),h.jsx("button",{type:"button",className:"link-button",onClick:t.refresh,disabled:t.loading,children:"Retry model data"})]}):h.jsx("p",{className:"hint",children:"Loading provider models and last-epoch usage…"}):h.jsx("p",{className:"hint",children:"Bind a seller to see its model catalog."})]})}function uz(e){const t=B.useRef(null),[n,r]=B.useState(e);return B.useEffect(()=>{if(!t.current||typeof ResizeObserver>"u")return;const o=new ResizeObserver(i=>{const l=i[0];l&&r(Math.max(240,Math.round(l.contentRect.width)))});return o.observe(t.current),()=>o.disconnect()},[]),{ref:t,width:n}}function D2(e){if(e.max!==void 0)return e.max;const n=e.values.filter(r=>r!==null&&r>0n).reduce((r,o)=>o>r?o:r,0n);return n===0n?1n:n}function U2({epochs:e,bars:t,line:n,title:r,height:o=200,compact:i=!1}){var ie;const l=B.useId(),{ref:c,width:d}=uz(640),f=i?48:60,p=n?i?44:56:12,m=14,g=28,v=Math.max(40,d-f-p),w=o-m-g,b=Math.max(1,e.length),C=v/b,S=Math.max(3,Math.min(28,C*.58)),I=D2(t),A=n?D2(n):1n,j=(re,ue)=>Number(re*1000000n/ue)/1e6,N=re=>m+w-j(re,I)*w,_=re=>m+w-j(re,A)*w,P=re=>f+C*re+C/2,R=t.values.some(re=>re!==null),M=!!n&&n.values.some(re=>re!==null),Q=[0,1,2,3,4],V=d<480?4:8,H=Math.max(1,Math.ceil(b/V)),L=t.tick??t.format,z=n?n.tick??n.format:null,O=B.useRef(null),{hover:K,onPointerMove:J,onPointerLeave:F,setHover:Z,clientPoint:Y}=ev(O,d,o,re=>oz(re,f,C,e.length)),U=re=>Z({index:re}),ee=(K==null?void 0:K.index)??null,he=[];if(ee!==null){const re=t.values[ee];re!=null&&he.push({name:t.name,value:t.format(re),color:"var(--pc-accent)",note:(ie=t.provisional)!=null&&ie[ee]?"estimated":void 0});const ue=n==null?void 0:n.values[ee];n&&ue!=null&&he.push({name:n.name,value:n.format(ue),color:"var(--pc-blue)"})}let se="";if(n){let re=null;se=n.values.map((ue,Se)=>{if(ue===null)return re=null,"";const Pe=re!==null&&Se===re+1?"L":"M";return re=Se,`${Pe}${P(Se).toFixed(1)},${_(ue).toFixed(1)}`}).join(" ")}return h.jsxs("div",{className:"chart",children:[h.jsxs("div",{className:"chart-legend",children:[h.jsxs("span",{className:"chart-legend-item chart-legend-item--bars",children:[h.jsx("i",{}),t.name]}),n?h.jsxs("span",{className:"chart-legend-item chart-legend-item--line",children:[h.jsx("i",{}),n.name]}):null]}),h.jsxs("div",{ref:c,className:"chart-plot",children:[R||M?h.jsxs("svg",{ref:O,viewBox:`0 0 ${d} ${o}`,role:"img","aria-labelledby":l,onPointerMove:J,onPointerLeave:F,children:[h.jsx("title",{id:l,children:r}),ee!==null?h.jsxs("g",{className:"chart-hover","aria-hidden":"true",children:[h.jsx("rect",{x:P(ee)-C/2,y:m,width:C,height:w,className:"chart-hover-band"}),h.jsx("line",{x1:P(ee),x2:P(ee),y1:m,y2:m+w,className:"chart-crosshair"})]}):null,Q.map(re=>{const ue=m+w*re/4,Se=I*BigInt(4-re)/4n,Pe=A*BigInt(4-re)/4n;return h.jsxs("g",{children:[h.jsx("line",{x1:f,x2:f+v,y1:ue,y2:ue,className:"chart-grid"}),h.jsx("text",{x:f-8,y:ue+4,textAnchor:"end",className:"chart-axis chart-axis--bars",children:L(Se)}),n&&z?h.jsx("text",{x:f+v+8,y:ue+4,textAnchor:"start",className:"chart-axis chart-axis--line",children:z(Pe)}):null]},re)}),h.jsx("g",{className:"chart-bars",children:t.values.map((re,ue)=>{var pt;if(re===null)return null;const Se=((pt=t.provisional)==null?void 0:pt[ue])===!0,Pe=N(re),Oe=`${t.name}, epoch ${e[ue]}: ${t.format(re)}${Se?" (estimated)":""}`;return h.jsx("rect",{x:P(ue)-S/2,y:Math.min(Pe,m+w-1),width:S,height:Math.max(1,m+w-Pe),rx:Math.min(3,S/3),className:`${Se?"chart-bar chart-bar--provisional":"chart-bar"}${ee===ue?" chart-bar--hover":""}`,tabIndex:0,role:"img","aria-label":Oe,onFocus:()=>U(ue),onBlur:F,children:h.jsx("title",{children:Oe})},e[ue])})}),n&&M?h.jsxs("g",{className:"chart-line-group",children:[h.jsx("path",{d:se,className:"chart-line","data-series":n.key}),n.values.map((re,ue)=>{if(re===null)return null;const Se=`${n.name}, epoch ${e[ue]}: ${n.format(re)}`;return h.jsx("circle",{cx:P(ue),cy:_(re),r:ee===ue?5:3.5,className:"chart-dot",tabIndex:0,role:"img","aria-label":Se,onFocus:()=>U(ue),onBlur:F,children:h.jsx("title",{children:Se})},e[ue])})]}):null,e.map((re,ue)=>ue%H===0||ue===e.length-1?h.jsx("text",{x:P(ue),y:o-8,textAnchor:"middle",className:"chart-axis chart-axis--x",children:re},re):null)]}):h.jsx("div",{className:"chart-empty",children:"No indexed data for these epochs."}),ee!==null&&he.length>0?h.jsx(X1,{...Y(P(ee),m),title:`Epoch ${e[ee]}`,rows:he}):null]})]})}function dz({values:e,width:t=96,height:n=26,label:r,tone:o="accent",labels:i,format:l}){const c=B.useId(),d=e.map(O=>O===null?null:Number(O)),f=d.filter(O=>O!==null&&Number.isFinite(O)),p=B.useRef(null),m=d.length>1?(t-2)/(d.length-1):0,g=O=>1+O*m,v=d.map((O,K)=>O===null||!Number.isFinite(O)?Number.POSITIVE_INFINITY:g(K)),{hover:w,onPointerMove:b,onPointerLeave:C,clientPoint:S}=ev(p,t,n,O=>i?eA(O,v):null);if(f.length<2)return h.jsx("span",{className:"sparkline sparkline--empty","aria-label":r,role:"img",children:"·"});const I=Math.max(...f),A=Math.min(...f,0),j=I-A||1,N=2,_=O=>n-N-(O-A)/j*(n-N*2);let P="",R="",M=null;d.forEach((O,K)=>{if(O===null||!Number.isFinite(O)){M=null;return}P+=`${M===null?"M":"L"}${g(K).toFixed(1)},${_(O).toFixed(1)} `,M=K});const Q=d.findIndex(O=>O!==null),V=d.length-1-[...d].reverse().findIndex(O=>O!==null);Q>=0&&V>=Q&&(R=`${P.trim()} L${g(V).toFixed(1)},${n} L${g(Q).toFixed(1)},${n} Z`);const H=d[V],L=w!==null?d[w.index]:null,z=w!==null&&L!==null&&L!==void 0&&Number.isFinite(L)?{index:w.index,value:L}:null;return h.jsxs("span",{className:"sparkline-wrap",children:[h.jsxs("svg",{ref:p,className:`sparkline sparkline--${o}`,width:t,height:n,viewBox:`0 0 ${t} ${n}`,role:"img","aria-label":r,onPointerMove:b,onPointerLeave:C,children:[h.jsx("defs",{children:h.jsxs("linearGradient",{id:c,x1:"0",x2:"0",y1:"0",y2:"1",children:[h.jsx("stop",{offset:"0",stopColor:"currentColor",stopOpacity:"0.28"}),h.jsx("stop",{offset:"1",stopColor:"currentColor",stopOpacity:"0"})]})}),R?h.jsx("path",{d:R,fill:`url(#${c})`,stroke:"none"}):null,h.jsx("path",{d:P.trim(),fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",strokeLinecap:"round"}),H!=null&&Number.isFinite(H)?h.jsx("circle",{cx:g(V),cy:_(H),r:"2",fill:"currentColor"}):null,z?h.jsx("circle",{cx:g(z.index),cy:_(z.value),r:"3",className:"sparkline-hover","aria-hidden":"true"}):null]}),z?h.jsx(X1,{...S(g(z.index),0),title:(i==null?void 0:i[z.index])??"",rows:[{name:"Settled volume",value:l?l(z.value):String(z.value)}]}):null]})}function tv({value:e,min:t=1,max:n,onChange:r,label:o="Lock",disabled:i,startEpoch:l,showUnlockDate:c=!0}){const d=dr(),f=Math.min(Math.max(e,t),n),p=l==null?null:l+f,m=d&&p!==null?Rf(Ya(p,d.genesis,d.epochDuration)):null;return h.jsxs("label",{className:"field lock-slider",children:[h.jsx("span",{className:"field__label",children:o}),h.jsx("input",{type:"range",className:"range",min:t,max:n,step:1,value:f,disabled:i,onChange:g=>r(Number(g.target.value)),"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":f,"aria-valuetext":`${f} ${f===1?"epoch":"epochs"}${m?`; unlocks ${m}`:""}`}),h.jsxs("span",{className:"lock-slider-readout",children:[h.jsx("span",{className:"mono",children:f})," ",f===1?"epoch":"epochs",d?` (${f*d.epochDuration/86400} days)`:"",c&&m?h.jsxs("span",{className:"muted",children:[" ","· unlocks ",h.jsx("span",{className:"mono",children:m})]}):null,f===n?h.jsx("span",{className:"dim",children:" · max"}):null]})]})}function fz(e,t,n){const r=[];if(e){BigInt(e.buyerUsage.total)>0n&&r.push({id:"buyer",kind:"buyer",label:"Unclaimed buyer rewards",amount:e.buyerUsage.total,available:e.buyerUsage.claimable}),BigInt(e.sellerUsage.total)>0n&&r.push({id:"seller",kind:"seller",label:"Unclaimed seller rewards",amount:e.sellerUsage.total,available:e.sellerUsage.claimable,agentId:e.sellerUsage.agentId});for(const o of e.staker.positions)BigInt(o.amount)>0n&&r.push({id:`staker:${o.id}`,kind:"staker",label:`Staking rewards · position #${o.id}`,amount:o.amount,available:!0,agentId:o.agentId,positionId:o.id})}return n&&r.push({id:"wallet",kind:"wallet",label:"Wallet balance",amount:t,available:!0}),r}function hz(e,t,n,r){if(!e.available)throw new Error("This staking source is unavailable.");if(e.agentId!==void 0&&e.agentId!==t)throw new Error("These rewards must be staked into their source pool.");return e.kind==="wallet"?{path:"/api/positions/stake",body:{agentId:t,amount:n,epochs:r}}:e.kind==="staker"?{path:"/api/rewards/restake",body:{positionIds:[e.positionId],epochs:r}}:{path:"/api/rewards/stake-usage",body:{side:e.kind,epochs:r,...e.kind==="buyer"?{stakeAgentId:t}:{}}}}const pz=86400,$2=e=>be(e,18).replace(/,/g,""),mz=[{label:"1w",days:7},{label:"1m",days:30},{label:"6m",days:182},{label:"1y",days:365},{label:"max",days:"max"}];function gz(e){return e.kind==="wallet"?"Stakes wallet ANTS; token approval may be needed.":e.kind==="buyer"?"AI buying rewards. Choose any seller; no claim needed.":e.kind==="seller"?"AI selling rewards. Stakes into your own pool.":"Position rewards. Restakes into the same pool."}function tA({config:e,pools:t,balance:n,rewards:r=null,rewardsError:o,defaultAgentId:i,lockedPool:l=!1,onStarted:c,onClose:d,onBusyChange:f}){var on,Mt,Ot;const{overview:p,config:m}=Pi(),g=dr(),v=Is(),[w,b]=B.useState(null),[C,S]=B.useState(!1),I=B.useRef(!1),[A,j]=B.useState(()=>{var ye;return String(i??((ye=t[0])==null?void 0:ye.agentId)??"")}),[N,_]=B.useState(""),[P,R]=B.useState(null),M=(p==null?void 0:p.wallet.canTransfer)??!1,Q=!m.selectedAddress||m.selectedAddress.toLowerCase()===((on=m.walletAddress)==null?void 0:on.toLowerCase()),V=fz(o?null:r,n??"0",M).filter(ye=>Q||ye.kind==="buyer"),H=l&&i?V.filter(ye=>ye.agentId===void 0||ye.agentId===i):V,L=l?V.length-H.length:0,z=H.find(ye=>ye.id===P),O=z??H.find(ye=>ye.available&&ye.kind!=="wallet")??H[0]??null,K=J1((O==null?void 0:O.kind)==="buyer"),J=P!==null&&!z,F=(O==null?void 0:O.kind)==="wallet",Z=O===null?"":F?N:$2(O.amount),Y=(O==null?void 0:O.agentId)??Number(A),U=(e==null?void 0:e.maxStakeEpochs)??1,ee=Math.max(1,(e==null?void 0:e.minStakeEpochs)??1),[he,se]=B.useState(ee);B.useEffect(()=>{e&&se(ye=>Math.max(e.minStakeEpochs,Math.min(ye,e.maxStakeEpochs)))},[e==null?void 0:e.minStakeEpochs,e==null?void 0:e.maxStakeEpochs]),B.useEffect(()=>{i&&j(String(i))},[i]),B.useEffect(()=>{!A&&t[0]&&j(String(t[0].agentId))},[A,t]);const ie=t.find(ye=>ye.agentId===Y)??null;let re=null;if(e&&(O!=null&&O.available)&&!J&&mc(Z)){const ye=Dg(Z,18),Je=O.kind==="staker"?Math.floor(e.restakedRewardWeightBonusBps*he/e.maxStakeEpochs):0;ye!==null&&(re=X8(ie==null?void 0:ie.yield,he,ye.toString(),Je))}const ue=()=>{n!==void 0&&_($2(n))},Se=()=>{if(!O)return"Nothing is available to stake.";if(!Y||O.agentId===void 0&&!ie)return"Choose a pool.";if(!mc(Z))return"Amount must be a positive decimal number of ANTS.";const ye=Dg(Z,18);if(ye===null)return"Amount must have no more than 18 decimal places.";if(F&&n!==void 0&&ye!==null){let Je=0n;try{Je=BigInt(n)}catch{Je=0n}if(ye>Je)return`Amount exceeds wallet balance (${be(n,4)} ANTS).`}return e?he<ee||he>U?`Lock must be between ${ee} and ${U} epochs.`:null:"Pool configuration is still loading."},Pe=e&&p?p.epoch.current+e.stakeActivationDelay:null,Oe=(O==null?void 0:O.agentId)===void 0&&t.length===0,pt=m.browserWallet&&m.readOnly?"Connect wallet to stake.":p?J?"The selected rewards are no longer available. Choose a source again.":O&&!O.available?"Use the wallet button above to switch to the authorized wallet for these rewards.":BigInt(p.wallet.signingWalletEth??p.wallet.eth)===0n?"The signing wallet needs ETH on the selected network to pay transaction fees.":null:"Wallet information is unavailable. Refresh before staking.",It=K.blocked||Oe||!!pt||O===null,mt=pt??K.reason??(Oe?"No stakeable pools yet.":null),Wt=ye=>g?Math.max(ee,Math.min(U,Math.round(ye*pz/g.epochDuration))):null,rn=async()=>{if(I.current||It||!O)return;const ye=Se();if(ye){b(ye);return}I.current=!0,S(!0),f==null||f(!0),b(null);try{const Je=hz(O,Y,Z.trim(),he);await v.start(Je.path,Je.body),c==null||c()}catch(Je){v.pushToast({tone:"danger",title:`${F?"Stake":"Stake rewards"} failed`,body:ks(Je),sticky:!0})}finally{I.current=!1,S(!1),f==null||f(!1)}},rt=!r&&!o;return m.browserWallet&&m.readOnly?h.jsxs("form",{className:"stake-form",onSubmit:ye=>ye.preventDefault(),children:[h.jsx("div",{className:"status-line status-line--muted",role:"status",children:"Connect your wallet to see what you can stake. Unclaimed rewards can be staked directly; wallet ANTS are stakeable once transfers are enabled."}),d?h.jsx("div",{className:"stake-form-actions",children:h.jsx(wt,{variant:"outline",onClick:d,children:"Close"})}):null]}):h.jsxs("form",{className:"stake-form",onSubmit:ye=>{ye.preventDefault(),rn()},children:[mt?h.jsx("div",{className:"status-line status-line--muted",role:"status",children:mt}):null,o?h.jsxs("p",{className:"error-text",children:["Rewards could not be loaded: ",o]}):null,H.length===0?h.jsx("div",{className:"stake-empty",role:"status",children:rt?h.jsx("span",{children:"Loading unclaimed rewards…"}):h.jsxs(h.Fragment,{children:[h.jsx("strong",{children:"Nothing to stake yet"}),M?"Your wallet holds no ANTS and no eligible rewards are unclaimed.":"ANTS transfers are not enabled for this wallet, so staking from the wallet balance is unavailable. Rewards you earn buying, selling or staking can be staked here directly as they accrue.",L>0?` ${L} reward source${L===1?"":"s"} belong to other pools.`:""]})}):h.jsxs("div",{className:"field",children:[h.jsx(Ea,{label:"Stake from",hint:O?gz(O):void 0,children:h.jsx(Aa,{value:(O==null?void 0:O.id)??"",disabled:C,onChange:ye=>{R(ye.target.value),b(null)},children:H.map(ye=>h.jsxs("option",{value:ye.id,children:[ye.label,ye.available?"":" · other wallet"," · ",be(ye.amount,4)," ANTS"]},ye.id))})}),M?null:h.jsx("span",{className:"field__hint",children:"Rewards only: wallet ANTS transfers are disabled."}),L>0?h.jsxs("span",{className:"field__hint",children:[L," reward source",L===1?"":"s"," bound to other pools ",L===1?"is":"are"," not shown here."]}):null]}),O?h.jsxs("div",{className:"form-row",children:[!l&&O.agentId===void 0?h.jsx(Ea,{label:"Seller pool",width:"lg",children:h.jsxs(Aa,{value:String(Y||""),onChange:ye=>j(ye.target.value),disabled:C||Oe,children:[Oe?h.jsx("option",{value:"",children:"No stakeable pools"}):null,t.map(ye=>{var Je,Ir;return h.jsx("option",{value:ye.agentId,children:((Ir=(Je=ye.profile)==null?void 0:Je.name)==null?void 0:Ir.trim())||`Agent ID ${ye.agentId}`},ye.agentId)})]})}):O.agentId!==void 0&&!l?h.jsx(Ea,{label:"Seller pool",width:"lg",hint:"These rewards can only be staked into this seller pool.",children:h.jsx(Aa,{value:String(O.agentId),disabled:!0,children:h.jsx("option",{value:O.agentId,children:((Ot=(Mt=ie==null?void 0:ie.profile)==null?void 0:Mt.name)==null?void 0:Ot.trim())||`Agent ID ${O.agentId}`})})}):null,F?h.jsx(fl,{label:"Amount (ANTS)",hint:n!==void 0?h.jsxs(h.Fragment,{children:["Balance ",h.jsx("span",{className:"mono",children:be(n,4)})," ·"," ",h.jsx("button",{type:"button",className:"link-button",onClick:ue,disabled:C,children:"Max"})]}):void 0,inputMode:"decimal",value:Z,onChange:ye=>_(ye.target.value),placeholder:"0.0",disabled:C||Oe}):null,h.jsxs("div",{className:"stake-lock-settings",children:[h.jsx(tv,{value:he,min:ee,max:U,startEpoch:Pe,onChange:se,disabled:C||!e||Oe}),h.jsx("div",{className:"lock-presets","aria-label":"Lock presets",children:mz.map(ye=>{const Je=ye.days==="max"?U:Wt(ye.days);return Je===null?null:h.jsx("button",{type:"button",className:"lock-preset","aria-pressed":he===Je,disabled:C||!e,onClick:()=>se(Je),children:ye.label},ye.label)})}),h.jsxs("div",{className:"stake-apy","aria-live":"polite",children:[h.jsxs("span",{className:"small",children:["Estimated APY ",h.jsx("strong",{className:"mono",children:nu(re)}),h.jsx(Yc,{label:"About estimated APY",children:"Uses your initial power, restaking bonus and added pool power. Assumes past rewards repeat with per-epoch compounding—not automatic. Excludes declining power and activation delays. Returns aren’t guaranteed."})]}),re===null?h.jsx("span",{className:"field__hint",children:F&&!mc(Z)?"Enter an amount to estimate APY.":"APY unavailable: missing reward history or staking data."}):null]})]})]}):null,O&&(e||!F)?h.jsxs("div",{className:"hint",children:["Staking details",h.jsxs(Yc,{label:"About staking and early withdrawal",children:[e?h.jsxs(h.Fragment,{children:["Longer locks increase power. Early exit burns ",Bn(e.minEarlyExitSlashBps),"–",Bn(e.maxSlashBps)," of principal; preview shows the amount. Dates assume confirmation this epoch. "]}):null,F?null:h.jsx(h.Fragment,{children:"Stakes all eligible rewards, verified on-chain. Usage rewards may need approval per epoch."})]})]}):null,w?h.jsx("div",{className:"error-text",role:"alert",children:w}):null,O?h.jsxs("div",{className:"stake-form-actions",children:[h.jsx("button",{type:"submit",className:"btn btn--primary btn--md",disabled:It||C,children:C?"Sending…":K.label??(F?"Stake":"Stake rewards")}),d?h.jsx(wt,{variant:"outline",onClick:d,disabled:C,children:"Cancel"}):null]}):d?h.jsx("div",{className:"stake-form-actions",children:h.jsx(wt,{variant:"outline",onClick:d,children:"Close"})}):null]})}function Ff(e){var t,n;return((n=(t=e.profile)==null?void 0:t.name)==null?void 0:n.trim())||`Seller pool #${e.agentId}`}const km=20;function nA(e){return[...e].sort((t,n)=>{var l,c;if(t.stakeable!==n.stakeable)return t.stakeable?-1:1;const r=t.lastEpochRewardPer1kPower,o=n.lastEpochRewardPer1kPower;if(r!==null&&o!==null){const d=hm(o,r);if(d!==0)return d}else{if(r!==null)return-1;if(o!==null)return 1}const i=hm(n.weight,t.weight);return i!==0?i:hm(((l=n.volumes[0])==null?void 0:l.usdc)??"0",((c=t.volumes[0])==null?void 0:c.usdc)??"0")})}function Zg(e,t){if(e.volumeStatus!=="available")return null;const n=e.volumes.find(r=>r.epoch===t-1);return n?ht(n.usdc):null}function ys(e){return ht(e??null)??0n}function Em(e){var t,n;return((n=(t=e.profile)==null?void 0:t.name)==null?void 0:n.trim())||"Unnamed seller"}function yz(e,t,n,r){const o=i=>t==="apy"?Z1(i.yield).oneWeek.apy:t==="stake"?ht(i.activeStake):Zg(i,r);return[...e].sort((i,l)=>{const c=o(i),d=o(l);if(c===null)return d===null?0:1;if(d===null)return-1;const f=c<d?-1:c>d?1:0;return n==="ascending"?f:-f})}function vz(e,t){var r;if(!t)return!0;const n=t.toLowerCase();return String(e.agentId)===t||(((r=e.profile)==null?void 0:r.name)??"").toLowerCase().includes(n)||(e.seller??"").toLowerCase().includes(n)}function wz(e,t){return rA(e,t).map(n=>ht(n.usdc))}function rA(e,t){return e.volumeStatus!=="available"?[]:[...e.volumes].filter(n=>n.epoch<t).sort((n,r)=>n.epoch-r.epoch)}function z2(e){return ys(e.yourStake)+ys(e.yourPendingStake)}function oA({amount:e,pending:t,sub:n,className:r}){return h.jsxs("span",{className:r?`cell-stack ${r}`:"cell-stack",children:[be(e),h.jsx("span",{className:"cell-sub",children:t>0n?h.jsxs("span",{className:"pending-amount",children:["+",be(t)," pending"]}):n})]})}function bz({pool:e}){const t=ys(e.yourStake),n=ys(e.yourPendingStake);return t===0n&&n===0n?h.jsx("span",{className:"dim",children:"—"}):t===0n?h.jsxs("span",{className:"cell-stack pending-amount",children:[be(n),h.jsx("span",{className:"cell-sub",children:"pending activation"})]}):h.jsx(oA,{amount:e.yourStake,pending:n,sub:`${Bn(e.yourPoolShareBps)} of pool`,className:"accent"})}function xz({pools:e,currentEpoch:t,loading:n,onOpen:r,onStake:o}){const[i,l]=B.useState(""),[c,d]=B.useState(!1),[f,p]=B.useState("apy"),[m,g]=B.useState("descending"),[v,w]=B.useState(!1),b=(P,R)=>h.jsxs("button",{type:"button",className:"table-sort","aria-label":`Sort by ${R}, ${f===P&&m==="descending"?"ascending":"descending"}`,onClick:()=>{g(f===P&&m==="descending"?"ascending":"descending"),p(P),d(!1)},children:[R," ",h.jsx("span",{"aria-hidden":"true",children:f===P?m==="descending"?"↓":"↑":"↕"})]}),C=i.trim(),S=B.useMemo(()=>e.filter(P=>P.stakeable),[e]),I=B.useMemo(()=>S.filter(P=>z2(P)>0n).length,[S]),A=B.useMemo(()=>yz(S.filter(P=>vz(P,C)&&(!v||z2(P)>0n)),f,m,t),[S,C,f,m,t,v]),N=!c&&A.length>km?A.slice(0,km):A,_=[{key:"seller",label:"Seller",render:P=>{var R;return h.jsxs("div",{className:"seller-cell",children:[h.jsx("button",{type:"button",className:"pool-details-trigger","aria-label":`View ${Em(P)} overview`,"aria-haspopup":"dialog",onClick:M=>{M.stopPropagation(),r(P)},children:Em(P)}),h.jsxs("span",{className:"seller-cell-meta",children:[P.stakers!=null?h.jsxs("span",{children:[Fe(P.stakers)," ",P.stakers===1?"staker":"stakers"]}):P.openPositions!==void 0?h.jsxs("span",{children:[Fe(P.openPositions)," ",P.openPositions===1?"position":"positions"]}):null,((R=P.profile)==null?void 0:R.modelsServed)!=null?h.jsxs("span",{children:[Fe(P.profile.modelsServed)," models"]}):null]})]})}},{key:"trend",label:"Volume trend",title:"Settled USDC volume over the last completed epochs.",render:P=>h.jsx(dz,{values:wz(P,t),labels:rA(P,t).map(R=>`Epoch ${R.epoch}`),format:R=>`${Ja(BigInt(Math.round(R)))} USDC`,label:`${Em(P)} settled volume over recent epochs`,tone:(Zg(P,t)??0n)>0n?"accent":"muted"})},{key:"apy",label:b("apy","APY"),sortDirection:f==="apy"?m:"none",align:"right",mono:!0,render:P=>h.jsx(jz,{pool:P})},{key:"stake",label:b("stake","TVL"),sortDirection:f==="stake"?m:"none",title:"Total active stake in this pool (ANTS).",align:"right",mono:!0,render:P=>h.jsx(oA,{amount:P.activeStake,pending:ys(P.pendingStake),sub:`${Bn(P.powerShareBps)} power`})},{key:"volume",label:b("volume","Last epoch"),sortDirection:f==="volume"?m:"none",title:"Settled USDC volume in the last completed epoch.",align:"right",mono:!0,render:P=>{const R=Zg(P,t);return R===null?"—":Ja(R)}},{key:"yours",label:"Your stake",align:"right",mono:!0,render:P=>h.jsx(bz,{pool:P})},{key:"actions",label:"",align:"right",className:"col-actions",render:P=>P.stakeable?h.jsx("span",{onClick:R=>R.stopPropagation(),children:h.jsx(wt,{variant:"outline",size:"sm",onClick:()=>o(P),children:"Stake"})}):null}];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"pools-toolbar",children:[S.length>5?h.jsx(fl,{label:"",mono:!1,width:"md",placeholder:"Search seller or agent id",value:i,onChange:P=>l(P.target.value),"aria-label":"Filter pools"}):null,I>0?h.jsxs("button",{type:"button",className:"lock-preset","aria-pressed":v,onClick:()=>w(P=>!P),children:["my pools · ",I]}):null,h.jsxs("span",{className:"muted small",children:[C||v?`${Fe(A.length)} of `:"",Fe(S.length)," ",S.length===1?"seller":"sellers"]})]}),S.some(P=>{var R;return(R=P.displaySource)==null?void 0:R.error})?h.jsx("p",{className:"hint",children:"Some Antscan statistics are unavailable or may lag. Missing historical yield is shown as —; open a provider for details."}):null,h.jsx(Za,{columns:_,rows:N,rowKey:P=>P.agentId,loading:n,onRowClick:r,empty:C?`No seller matches "${C}" in this view.`:v?"You have no stake in any seller yet.":"No sellers are ready for staking yet."}),A.length>km?h.jsxs("div",{className:"pools-more",children:[h.jsxs("span",{className:"muted small",children:["Showing ",Fe(N.length)," of ",Fe(A.length)]}),h.jsx("button",{type:"button",className:"link-button",onClick:()=>d(P=>!P),children:c?"Show fewer":"Show all"})]}):null]})}function Cz({pool:e,view:t,onClose:n,stake:r}){var b,C,S,I,A,j;const o=tt(`pool:${e.agentId}`,()=>Ye.pool(e.agentId)),i=o.data??e,l=!!o.error||!!o.data&&o.data.volumeStatus!=="available",c=l&&e.volumeStatus==="available"?e:i,d=c===e?t.currentEpoch:((b=o.data)==null?void 0:b.currentEpoch)??t.currentEpoch,f=i.profile,p=t.explorer&&i.seller?`${t.explorer.replace(/\/$/,"")}/account/${i.seller}`:null,m=c.volumes.find(N=>N.epoch===d-1),g=ys(i.yourStake),v=ys(i.yourPendingStake),w=ys(i.pendingStake);return h.jsx(G1,{isOpen:!0,onClose:n,size:"lg",overlayClassName:"ants-stake-overlay ants-pool-overlay",className:"pool-overview",title:Ff(i),eyebrow:"SELLER",subtitle:h.jsxs(h.Fragment,{children:["Agent ",h.jsx("span",{className:"mono",children:i.agentId})," · ",i.seller?h.jsx(ut,{value:i.seller,copy:!0}):"No seller bound",p?h.jsxs(h.Fragment,{children:[" · ",h.jsx("a",{href:p,target:"_blank",rel:"noreferrer",children:"View on Antscan ↗"})]}):null]}),children:h.jsxs("div",{className:"vault",children:[h.jsxs("div",{className:"vault-main",children:[h.jsxs("div",{className:"pool-overview-status",children:[h.jsx(Nn,{tone:i.stakeable?"accent":"muted",children:i.hasPool?"Staking pool":"No pool yet"}),f!=null&&f.providers.length?f.providers.slice(0,4).map(N=>h.jsx(Nn,{tone:"muted",children:N},N)):null,i.openPositions!==void 0?h.jsxs("span",{children:[Fe(i.openPositions)," open positions",i.stakers!=null?` · ${Fe(i.stakers)} stakers`:""]}):null,((C=i.displaySource)==null?void 0:C.source)==="indexer"?h.jsxs("span",{className:"dim",children:["Antscan block ",i.displaySource.indexedBlock]}):null]}),(S=i.displaySource)!=null&&S.error?h.jsxs("p",{className:"hint",children:["Antscan: ",i.displaySource.error,((I=i.yield)==null?void 0:I.status)==="unavailable"?" Historical yield is unavailable.":""]}):null,h.jsxs("div",{className:"pool-metrics",children:[h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Total value locked"}),h.jsxs("strong",{children:[be(i.activeStake)," ",h.jsx("small",{children:"ANTS"})]}),w>0n?h.jsxs("span",{className:"small pending-amount",children:["+",be(w)," ANTS pending activation"]}):null]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Last epoch volume"}),h.jsxs("strong",{children:[m&&c.volumeStatus==="available"?Ja(m.usdc):"—"," ",h.jsx("small",{children:"USDC"})]})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Power share"}),h.jsx("strong",{children:Bn(i.powerShareBps)}),h.jsx("span",{className:"small muted",children:"of all pools' staking power"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Last epoch rewards"}),h.jsxs("strong",{children:[i.lastEpochEmission!=null?be(i.lastEpochEmission):"—"," ",h.jsx("small",{children:"ANTS"})]}),h.jsx("span",{className:"small muted",children:i.lastEpochEmission!=null?i.lastEpochEmissionSettled?"settled to stakers":"estimated, not settled":"no usage yet"})]})]}),h.jsxs("section",{className:"pool-apy-section","aria-label":"Estimated APY by lock",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Estimated APY by lock"}),h.jsx("span",{className:"small muted",children:"10,000 ANTS reference stake · longer locks earn more power"})]}),h.jsx(Az,{pool:i})]}),h.jsxs("section",{className:"pool-section",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Settled volume · completed epochs"}),h.jsx("span",{className:"small muted",children:"Includes legacy seller activity."})]}),l&&c===e&&c.volumeStatus==="available"&&h.jsx("p",{className:"hint",children:"Seller history could not refresh. Showing previously loaded history."}),c.volumeStatus!=="available"&&h.jsxs("p",{className:"hint",children:["Settlement volume ",c.volumeStatus==="stale"?"is stale":"is unavailable",". Usage points are not revenue."]}),h.jsx(az,{volumes:c.volumes,networkVolumes:t.networkVolumes,currentEpoch:d}),c.statsUpdatedAt&&h.jsxs("p",{className:"small muted",children:["History fetched ",ar(Math.floor(c.statsUpdatedAt/1e3))]})]}),h.jsxs("section",{className:"pool-section",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Stake, power and staker rewards"}),h.jsx("span",{className:"small muted",children:o.loading&&!o.data?"loading history…":(A=i.history)!=null&&A.length?`${i.history.length} indexed epochs`:"no indexed history"})]}),h.jsx(Ez,{history:i.history??[],currentEpoch:d})]}),h.jsxs("section",{className:"pool-section",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Seller profile · lifetime activity"}),h.jsx("span",{className:"small muted",children:"Antscan indexed totals"})]}),(f==null?void 0:f.stale)&&h.jsx("p",{className:"hint",children:"Seller activity is stale; the indexer could not refresh."}),f?h.jsxs("div",{className:"pool-lifetime",children:[h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Settled volume"}),h.jsx("strong",{children:f.lifetimeVolumeUsdc!=null?`${Ja(f.lifetimeVolumeUsdc)} USDC`:"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Requests"}),h.jsx("strong",{children:f.requestCount!=null?Fe(f.requestCount):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Unique buyers"}),h.jsx("strong",{children:f.uniqueBuyers!=null?Fe(f.uniqueBuyers):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Models served"}),h.jsx("strong",{children:f.modelsServed!=null?Fe(f.modelsServed):"—"})]})]}):h.jsx("p",{className:"hint",children:"The explorer has no record for this seller."}),h.jsx($t,{items:[["Providers",f!=null&&f.providers.length?f.providers.join(", "):"—"],["Last epoch emission",i.lastEpochEmission!=null?`${be(i.lastEpochEmission,4)} ANTS`:"—"],["Ghost rate",(f==null?void 0:f.ghostRate)!=null&&Number.isFinite(f.ghostRate)&&f.ghostRate>=0&&f.ghostRate<=100?`${f.ghostRate.toFixed(1)}%`:"Unavailable"],["Last settled",(f==null?void 0:f.lastSettledAt)!=null?ar(f.lastSettledAt):"—"]]}),(f==null?void 0:f.fetchedAt)&&h.jsxs("p",{className:"small muted",children:["Profile fetched ",ar(Math.floor(f.fetchedAt/1e3))]})]}),h.jsx(cz,{address:i.seller})]}),h.jsxs("aside",{className:"vault-side","aria-label":"Your position and staking",children:[h.jsxs(Qr,{children:[h.jsx("h3",{children:"Your position"}),h.jsxs("div",{className:"vault-your",children:[h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Staked"}),h.jsx("strong",{children:g>0n?be(i.yourStake):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Pending activation"}),h.jsx("strong",{className:v>0n?"pending-amount":void 0,children:v>0n?be(i.yourPendingStake):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Power"}),h.jsx("strong",{children:g>0n?be(i.yourPower):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Pool share"}),h.jsx("strong",{children:g>0n?Bn(i.yourPoolShareBps):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Positions"}),h.jsx("strong",{children:((j=i.yourPositionIds)==null?void 0:j.length)||"—"})]})]}),v>0n?h.jsxs("p",{className:"hint",children:["Pending stake starts earning at its activation epoch; it is listed under ",h.jsx("a",{href:Ai("positions"),children:"My positions"})," with its start date."]}):null]}),h.jsxs(Qr,{children:[h.jsxs("h3",{children:["Stake into ",Ff(i)]}),r?h.jsx(tA,{config:r.config,pools:[i],balance:r.balance,rewards:r.rewards,rewardsError:r.rewardsError,defaultAgentId:i.agentId,lockedPool:!0},`${i.agentId}:${r.walletReady}`):h.jsx("p",{className:"hint",children:"Open this seller from the Stake page to stake into it."})]})]})]})})}const kz=10n**18n,Am=e=>{const t=e/kz;return t>=1000000n?`${(Number(t)/1e6).toFixed(1)}M`:t>=10000n?`${(Number(t)/1e3).toFixed(0)}k`:t>=1000n?`${(Number(t)/1e3).toFixed(1)}k`:t>=100n?t.toString():be(e,2)};function Ez({history:e,currentEpoch:t}){const n=e.filter(d=>d.epoch<=t),r=n.map(d=>d.epoch),o=n.map(d=>ht(d.activeStake)),i=n.map(d=>ht(d.weight)),l=n.map(d=>ht(d.emission)),c=n.map(d=>!d.settled);return h.jsxs("div",{className:"chart-grid-2",children:[h.jsx(U2,{epochs:r,title:"Active stake per epoch as bars (ANTS, left axis) with pool power as a line (right axis).",bars:{key:"stake",name:"Active stake · ANTS",values:o,format:d=>`${be(d)} ANTS`,tick:Am},line:{key:"power",name:"Pool power",values:i,format:d=>be(d),tick:Am}}),h.jsx(U2,{epochs:r,title:"Staker rewards per epoch (ANTS). Hollow bars are estimates for epochs not yet settled.",bars:{key:"emission",name:"Staker rewards · ANTS",values:l,format:d=>`${be(d,2)} ANTS`,tick:Am,provisional:c}})]})}function Az({pool:e}){return h.jsx("dl",{className:"pool-apy-estimates",children:rz(e.yield).map(t=>{var n,r;return h.jsxs("div",{title:t.status==="unsupported"?`${t.label} is not supported by this pool's whole-epoch lock limits.`:t.apy===null?"APY is unavailable because reward or epoch data is missing.":`10,000 ANTS reference stake. ${t.epochs} epoch(s), ${t.actualDays} days. Annualized initial earning rate with hypothetical compounding; not the return over this lock. APY above 10,000% is shown as ${Eh}. Source epoch ${e.yield.epoch}.${((n=e.yield)==null?void 0:n.status)==="estimated"?" Rewards are not yet settled.":""}`,children:[h.jsx("dt",{children:t.label}),h.jsx("dd",{children:t.status==="unsupported"?h.jsx("span",{className:"pool-apy-unavailable",children:"Unsupported"}):h.jsxs(h.Fragment,{children:[nu(t.apy),t.apy!==null&&t.apy<=Of&&((r=e.yield)==null?void 0:r.status)==="estimated"?h.jsx("span",{className:"dim small",children:" est."}):null]})})]},t.label)})})}function Sz(e){const t=e.yield;if(!t||t.status==="unavailable")return"Last-epoch yield is unavailable.";const n=Z1(t),r=t.endsAt-t.startsAt,o=i=>i===null?"unavailable":`${i} epoch(s), ${i*r/86400} days`;return`10,000 ANTS reference stake, including added pool power. 1 week: ${o(n.oneWeek.epochs)}; 2 years: ${o(n.twoYears.epochs)}. Source epoch ${t.epoch}: ${ar(t.startsAt)} – ${ar(t.endsAt)}. Assumes rewards and initial rates repeat each epoch; compounding is not automatic. Excludes declining power and activation delays. Returns aren’t guaranteed. — means unavailable.${t.status==="estimated"?" Rewards not yet settled.":""}`}function jz({pool:e}){var c;const{oneWeek:t,twoYears:n}=Z1(e.yield),r=t.apy!==null||n.apy!==null,o=(t.apy??0)>Of||(n.apy??0)>Of,i=nu(t.apy),l=nu(n.apy);return h.jsxs("span",{className:`yield-percent${r?" yield-percent--hot":""}`,title:`${Sz(e)}${o?` ${tz}`:""}`,children:[o?Eh:r?`${i} – ${l}`:"—",r&&!o&&((c=e.yield)==null?void 0:c.status)==="estimated"?h.jsx("span",{className:"dim small",children:" est."}):null]})}function sA(e){return e.maxLockedNext??e.maxLocked}function nv(e,t,n){return e==="enable-max-lock"||e==="disable-max-lock"?t+1:Math.max(t+1,...n.map(r=>r.stakeStartEpoch))}function iA(e,t,n){if(e.withdrawn||e.closedAtEpoch!==0)return"This position is already closed or withdrawn.";if(n===null)return"Waiting for current epoch information.";const r=sA(e);return t==="disable-max-lock"?r?null:"This position is not scheduled for max lock.":r?t==="enable-max-lock"?"This position is already scheduled for max lock.":"Disable maximum lock before this action.":t==="enable-max-lock"&&n<e.stakeStartEpoch?`Max lock can be enabled when the next epoch reaches activation epoch ${e.stakeStartEpoch}.`:e.stakeEndEpoch===0||n>=e.stakeEndEpoch?"The position must have a remaining lock when this action takes effect.":null}function Iz({items:e,label:t="More actions"}){const[n,r]=B.useState(!1),o=B.useRef(null),i=B.useRef(null),[l,c]=B.useState({});return B.useLayoutEffect(()=>{if(!n||!i.current)return;const d=i.current.getBoundingClientRect();c({top:d.bottom+4,right:Math.max(8,window.innerWidth-d.right)})},[n]),B.useEffect(()=>{if(!n)return;const d=m=>{o.current&&!o.current.contains(m.target)&&r(!1)},f=m=>{m.key==="Escape"&&r(!1)},p=()=>r(!1);return document.addEventListener("mousedown",d),window.addEventListener("keydown",f),window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{document.removeEventListener("mousedown",d),window.removeEventListener("keydown",f),window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[n]),h.jsxs("span",{className:"menu",ref:o,onClick:d=>d.stopPropagation(),children:[h.jsx("button",{ref:i,type:"button",className:"menu-trigger","aria-label":t,"aria-haspopup":"menu","aria-expanded":n,title:t,onClick:()=>r(d=>!d),children:h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[h.jsx("circle",{cx:"3",cy:"8",r:"1.4"}),h.jsx("circle",{cx:"8",cy:"8",r:"1.4"}),h.jsx("circle",{cx:"13",cy:"8",r:"1.4"})]})}),n?h.jsx("div",{className:"menu-list",role:"menu",style:l,children:e.map(d=>h.jsx("button",{type:"button",role:"menuitem",className:"menu-item",disabled:d.disabled,title:d.title,onClick:()=>{var f;r(!1),(f=i.current)==null||f.focus({preventScroll:!0}),d.onSelect()},children:d.label},d.label))}):null]})}function aA({positionId:e,positionIds:t,size:n,autoOpen:r=!1,onStarted:o,onCancel:i}){const l=t??(e!==void 0?[e]:[]),c=Is(),d=J1(),[f,p]=B.useState(r),[m,g]=B.useState(null),[v,w]=B.useState(null),[b,C]=B.useState(!1),[S,I]=B.useState(!1),[A,j]=B.useState(null),[N,_]=B.useState(!1),P=B.useRef(!1),R=l.length===0||l.some(z=>!Number.isSafeInteger(z)||z<=0),M=async()=>{if(!R){C(!0),g(null),w(null),I(!1);try{const z=await Ye.withdrawPreview(l);g(l.length===1?Nz(z,l[0]):z)}catch(z){w(ks(z))}finally{C(!1)}}},Q=()=>{R||(p(!0),j(null),M())};B.useEffect(()=>{r&&!R&&Q()},[]);const V=async()=>{if(!L||!m||P.current)return;const z={positionIds:l,acceptSlashing:m.earlyExit&&S,maxSlashedAmount:m.totalSlashed};P.current=!0,_(!0),j(null);try{await c.start("/api/positions/withdraw",z),p(!1),o==null||o()}catch(O){c.pushToast({tone:"danger",title:`Withdraw · position${l.length>1?"s":""} ${l.map(K=>`#${K}`).join(", ")} failed`,body:ks(O),sticky:!0})}finally{P.current=!1,_(!1)}},H=d.reason??(R?"Choose at least one position to withdraw.":void 0),L=!R&&!d.blocked&&!N&&m!==null&&!m.simulationError&&(!m.earlyExit||S);return h.jsxs("div",{className:"action",children:[f&&r?null:h.jsx("span",{className:"btn-wrap",title:H,children:h.jsx(wt,{variant:"outline",size:n==="sm"?"sm":"md",onClick:Q,disabled:R,children:"Withdraw"})}),f?h.jsxs(K8,{title:l.length>1?`Withdraw ${l.length} positions`:"Withdraw position",hideTitle:r,confirmLabel:d.label??(m!=null&&m.earlyExit?"Withdraw and burn slashed principal":"Withdraw"),danger:(m==null?void 0:m.earlyExit)===!0,disabled:!L,busy:N,error:A,onConfirm:()=>{V()},onCancel:()=>{p(!1),i==null||i()},children:[d.reason?h.jsxs("div",{className:"hint",children:[d.reason," You can still review this estimate."]}):null,b?h.jsxs("div",{className:"muted small",children:[h.jsx(xh,{})," Computing slashing preview…"]}):null,v?h.jsxs("div",{children:[h.jsx("div",{className:"error-text",children:v}),h.jsx("div",{className:"mt",children:h.jsx(wt,{variant:"outline",size:"sm",onClick:()=>void M(),children:"Retry preview"})})]}):null,(m==null?void 0:m.simulationError)&&h.jsxs("div",{className:"error-text",children:["Withdrawal cannot execute: ",m.simulationError]}),m?h.jsxs("div",{className:"hint",children:["Rewards to claim separately: ",be(m.pendingRewards,4)," ANTS. ",m.transfersRestricted?"Returned ANTS remain transfer-restricted in this wallet. Ending a position does not enable token transfers. Consider moving your allocation directly to another seller.":"ANTS transfers are currently enabled for this wallet."]}):null,m?h.jsxs("div",{className:"stack",children:[h.jsx(Pz,{preview:m}),m.earlyExit?h.jsxs("div",{className:"row",children:[h.jsxs("label",{className:"check danger",children:[h.jsx("input",{type:"checkbox",checked:S,onChange:z=>I(z.target.checked)}),h.jsxs("span",{children:["I accept burning ",h.jsx("span",{className:"mono",children:be(m.totalSlashed,4)})," ANTS of principal (early exit)."]})]}),h.jsx(zg,{})]}):h.jsxs("div",{className:"hint",children:["No early-exit penalty applies. Withdrawal returns principal; rewards must be claimed separately.",h.jsx(zg,{})]})]}):null]}):null]})}function Nz(e,t){var n;if(e.positions.length!==1||((n=e.positions[0])==null?void 0:n.id)!==t)throw new Error("Withdrawal preview does not match this position. Refresh and try again.");return e}function Pz({preview:e}){const t=e.positions.length===1;return h.jsx($t,{items:[...t?[["Early-exit penalty",h.jsxs("span",{className:e.earlyExit?"danger":void 0,children:[Bn(e.positions[0].slashBps),h.jsx(zg,{})]})]]:e.positions.map(n=>[`Position #${n.id}`,h.jsxs("span",{className:n.slashBps>0?"danger":void 0,children:[be(n.amount,4)," ANTS · penalty ",Bn(n.slashBps)]})]),["Burned",h.jsxs("span",{className:e.earlyExit?"danger":void 0,children:[be(e.totalSlashed,4)," ANTS"]})],["You receive",`${be(e.totalReturned,4)} ANTS`]]})}function Bz({pools:e,enabled:t=!0}){var V,H,L;const n=dr(),r=tt(t?"positions:current":null,Ye.positions),[o,i]=B.useState(!1),[l,c]=B.useState(null),[d,f]=B.useState(null),[p,m]=B.useState(()=>new Set),g=r.data,v=B.useMemo(()=>(g==null?void 0:g.positions)??[],[g]),w=B.useMemo(()=>v.filter(z=>!bo(z)).length,[v]),b=B.useMemo(()=>o?v:v.filter(bo),[v,o]),C=l?b.find(z=>z.id===l.id)??null:null,S=B.useMemo(()=>new Map(e.map(z=>[z.agentId,z])),[e]),I=B.useMemo(()=>b.filter(bo),[b]),A=B.useMemo(()=>I.filter(z=>p.has(z.id)),[I,p]),j=lA(A,n==null?void 0:n.current),N=(z,O)=>c({id:z,kind:O}),_=z=>m(O=>{const K=new Set(O);return K.has(z)?K.delete(z):K.add(z),K}),P=()=>m(z=>z.size===I.length?new Set:new Set(I.map(O=>O.id))),R=()=>m(new Set),M=z=>z.stopPropagation(),Q=[{key:"select",className:"col-select",label:I.length>0?h.jsx("input",{type:"checkbox","aria-label":"Select all open positions",checked:p.size>0&&p.size===I.length,onChange:P}):"",render:z=>bo(z)?h.jsx("input",{type:"checkbox","aria-label":`Select position ${z.id}`,checked:p.has(z.id),onChange:()=>_(z.id),onClick:M}):null},{key:"seller",label:"Seller",render:z=>{var K,J;const O=S.get(z.agentId);return h.jsxs("span",{className:"cell-stack",title:(O==null?void 0:O.seller)??void 0,children:[h.jsx("span",{children:((J=(K=O==null?void 0:O.profile)==null?void 0:K.name)==null?void 0:J.trim())||(O!=null&&O.seller?wh(O.seller):"Unknown seller")}),h.jsxs("span",{className:"cell-sub",children:["#",z.id,Tz(z)]})]})}},{key:"amount",label:"Amount",align:"right",mono:!0,render:z=>h.jsxs("span",{className:"cell-stack",children:[be(z.amount,4),h.jsxs("span",{className:"cell-sub",title:z.nextPower!=null?`Next epoch power: ${be(z.nextPower,0)}`:void 0,children:["power ",be(z.power??z.weightAmount,0)]})]})},{key:"apy",label:h.jsxs(h.Fragment,{children:["Est. APY",h.jsx(Yc,{label:"About position APY",children:"Illustrative annualized return using the pool’s historical epoch reward budget and current pool power. Active positions use their current power, already included in the pool total. Pending positions use their activation power added to the current pool total; other pending changes are not projected. Assumes the rate repeats and compounds every epoch. Compounding is not automatic, normal-lock power declines, and activation delays are excluded. Missing data and closed or expired positions show —. Future rewards are not guaranteed."})]}),align:"right",mono:!0,render:z=>{var F,Z,Y;const O=S.get(z.agentId),K=(g==null?void 0:g.currentEpoch)??(n==null?void 0:n.current),J=nz(z,O,K,(F=g==null?void 0:g.config)==null?void 0:F.maxStakeEpochs);return h.jsx("span",{title:J===null?"APY unavailable for this position.":`Based on ${((Z=O==null?void 0:O.yield)==null?void 0:Z.status)==="estimated"?"estimated ":""}pool rewards in epoch ${(Y=O==null?void 0:O.yield)==null?void 0:Y.epoch}.${K!==void 0&&z.stakeStartEpoch>K?" Estimate for when this position activates.":""}`,children:nu(J)})}},{key:"unlocks",label:"Unlocks",title:"Epoch and date when the lock expires. Funds are not withdrawn automatically.",render:z=>h.jsx(Ah,{position:z})},{key:"state",label:"Status",title:"The current stage of this staking position.",render:z=>h.jsx(Mz,{position:z})},{key:"reward",label:"Pending reward",align:"right",mono:!0,render:z=>be(z.pendingReward,4)},{key:"actions",label:"",align:"right",className:"col-actions",render:z=>bo(z)?h.jsx("span",{className:"row-nowrap",onClick:M,children:h.jsx(Iz,{label:`More actions for position ${z.id}`,items:[{label:"Split",onSelect:()=>N(z.id,"split"),disabled:ps(z,"split",n==null?void 0:n.current)!==null,title:ps(z,"split",n==null?void 0:n.current)??void 0},{label:"Extend lock",onSelect:()=>N(z.id,"extend"),disabled:ps(z,"extend",n==null?void 0:n.current)!==null,title:ps(z,"extend",n==null?void 0:n.current)??void 0},{label:hl(z)?"Disable max lock":"Enable max lock",onSelect:()=>N(z.id,"max-lock")},{label:"Move allocation",onSelect:()=>N(z.id,"move")},{label:"Withdraw",onSelect:()=>N(z.id,"withdraw")}]})}):null}];return h.jsxs(Dt,{title:`Your positions${g?` (${b.length})`:""}`,className:"positions-card",actions:w>0?h.jsx("button",{type:"button",className:"link-button",onClick:()=>i(z=>!z),children:o?"hide closed":`show ${w} closed`}):null,children:[r.error&&!g?h.jsx(tn,{error:r.error,onRetry:r.refresh}):null,r.error&&g?h.jsxs("div",{className:"status-line",children:["Refresh failed: ",r.error]}):null,(g==null?void 0:g.historySource)==="local"?h.jsx("p",{className:"hint",children:"Includes closed positions from verified local transactions. Older history may be incomplete without an indexer."}):null,(g==null?void 0:g.historySource)==="chain"?h.jsx("div",{className:"status-line status-line--muted",children:"Closed-position history is unavailable. Open positions are shown from the chain; rewards on closed positions may be missing."}):null,A.length>0?h.jsxs("div",{className:"bulk-bar",role:"region","aria-label":"Selected positions",children:[h.jsxs("span",{className:"bulk-bar-count",children:[A.length," selected · ",be(Xg(A),4)," ANTS"]}),h.jsx("button",{type:"button",className:"link-button",onClick:R,children:"clear"}),h.jsxs("div",{className:"bulk-bar-actions",children:[h.jsx("span",{className:"btn-wrap",title:j??"Combine the selected positions into one.",children:h.jsxs(wt,{variant:"outline",size:"sm",disabled:j!==null,onClick:()=>f("merge"),children:["Merge ",A.length>1?A.length:""]})}),h.jsxs(wt,{variant:"outline",size:"sm",onClick:()=>f("withdraw"),children:["Withdraw ",A.length]})]})]}):null,l&&C&&g?h.jsx(Uz,{kind:l.kind,position:C,config:g.config,pools:e,onClose:()=>c(null)},`${l.id}:${l.kind}`):null,d&&g&&A.length>0?h.jsx($z,{kind:d,positions:A,pools:e,onClose:()=>f(null),onStarted:()=>{f(null),R()}}):null,h.jsx(Za,{columns:Q,rows:b,rowKey:z=>z.id,loading:r.loading&&!g,empty:t?"No open positions. Stake rewards into a seller to open one.":"Connect a wallet to see your positions."}),((V=g==null?void 0:g.displaySource)==null?void 0:V.source)==="indexer"?h.jsx("p",{className:"hint",children:"Position status from Antscan. Withdrawal amounts and transaction eligibility are checked live before signing."}):null,((H=g==null?void 0:g.rewardSource)==null?void 0:H.indexedBlock)!==void 0?h.jsxs("p",{className:"hint",children:["Reward estimates from Antscan at block ",g.rewardSource.indexedBlock,"."]}):null,(L=g==null?void 0:g.rewardSource)!=null&&L.error?h.jsxs("p",{role:"status",className:"hint",children:["Indexed rewards unavailable: ",g.rewardSource.error,". Unknown amounts are shown as —, not zero."]}):null]})}function Xg(e){return e.reduce((t,n)=>t+(ht(n.amount)??0n),0n).toString()}function lA(e,t){if(e.length<2)return"Select at least two positions to merge.";if(new Set(e.map(r=>r.id)).size!==e.length)return"Select each position only once.";if(new Set(e.map(r=>r.agentId)).size!==1)return"Merged positions must stake the same seller.";const n=t===void 0?null:nv("merge",t,e);for(const r of e){const o=iA(r,"merge",n);if(o)return o}return new Set(e.map(r=>r.stakeEndEpoch)).size!==1?"Merged positions must share the same unlock epoch. Extend the shorter ones first.":null}function hl(e){return sA(e)}function Tz(e){const t=hl(e);return t&&e.maxLocked?" · max lock":t?" · max lock from next epoch":e.maxLocked?" · max lock ends next epoch":""}function bo(e){return!e.withdrawn&&e.closedAtEpoch===0&&e.state!=="withdrawn"&&e.state!=="closed"}const _z={pending:"amber",active:"accent",matured:"muted",closed:"muted",withdrawn:"muted"},Rz={pending:"Waiting for the stake activation epoch.",active:"The staking position is active and its lock has not expired.",matured:"The lock has expired. Withdraw to receive your funds; withdrawal is not automatic.",closed:"This position has been closed, for example by a split, merge, or move.",withdrawn:"Funds have been withdrawn from this position."};function Mz({position:e}){const{state:t}=e,n=bo(e)&&(t==="pending"||e.changePending);return h.jsx(Nn,{tone:n?"amber":_z[t],title:n?"The transaction is confirmed. This position starts contributing staking power at its activation epoch.":Rz[t],children:n?`Activates epoch ${e.stakeStartEpoch}`:t})}function ps(e,t,n){const r=n===void 0?null:nv(t,n,[e]);return iA(e,t,r)}function Ah({position:e,dateOnly:t=!1}){const n=dr();if(!bo(e))return h.jsx("span",{className:"muted",children:"—"});const r=n?`epoch ${n.current+1}`:"next epoch";return hl(e)?h.jsxs("span",{className:"cell-stack",children:[h.jsx("span",{className:"muted",title:"Disable max lock to start the countdown.",children:"Max lock"}),!e.maxLocked&&h.jsxs("span",{className:"cell-sub",children:["Max lock starts ",r]})]}):h.jsxs("span",{className:"cell-stack",children:[h.jsx(ju,{epoch:e.stakeEndEpoch,dateOnly:t}),e.maxLocked&&h.jsxs("span",{className:"cell-sub",children:["Countdown starts ",r]})]})}function Sh(e,t){var r,o;const n=t.find(i=>i.agentId===e);return((o=(r=n==null?void 0:n.profile)==null?void 0:r.name)==null?void 0:o.trim())||(n!=null&&n.seller?wh(n.seller):"Unknown seller")}function Oz({position:e,pools:t}){const n=dr(),r=e.epochsRemaining,o=n?Rf(Ya(e.stakeEndEpoch,n.genesis,n.epochDuration)):null,i=n?Rf(Ya(e.stakeStartEpoch,n.genesis,n.epochDuration)):null;return h.jsxs("div",{children:[h.jsxs("div",{children:[Sh(e.agentId,t)," · ",h.jsxs("span",{className:"mono",children:[be(e.amount,4)," ANTS"]})]}),h.jsxs("div",{className:"muted small",children:[bo(e)?hl(e)||e.maxLocked?h.jsx(Ah,{position:e,dateOnly:!0}):e.state==="matured"?"Lock expired":h.jsxs(h.Fragment,{children:[e.state==="pending"?"Lock duration":"Remaining lock",": ",r," ",r===1?"epoch":"epochs",n?` (${e.state==="pending"?"":"up to "}${n8(r*n.epochDuration)})`:"",e.state==="pending"?` · starts ${i?`${i} UTC`:`epoch ${e.stakeStartEpoch}`}`:""]}):"Position closed",!e.maxLocked&&bo(e)?` · ${e.state==="matured"?"unlocked":"unlocks"} ${o?`${o} UTC`:`epoch ${e.stakeEndEpoch}`}`:""]})]})}function Fz({position:e,config:t,pools:n,onStarted:r}){const o=dr(),i=n.filter(g=>g.stakeable&&g.agentId!==e.agentId),[l,c]=B.useState(()=>{var g;return String(((g=i[0])==null?void 0:g.agentId)??"")}),d=i.find(g=>String(g.agentId)===l)??null,f={positionIds:[e.id],toAgentId:Number(l)},p=ps(e,"move",o==null?void 0:o.current),m=Math.max(((o==null?void 0:o.current)??0)+1,e.stakeStartEpoch);return h.jsxs("div",{className:"form-row",children:[h.jsx("p",{className:"hint",children:"Move your allocation directly to another seller. Principal stays staked and the lock end date is preserved. Accrued rewards remain claimable on the source position."}),h.jsxs("p",{className:"hint",children:["Effective ",o?`${Rf(Ya(m,o.genesis,o.epochDuration))} UTC (epoch ${m})`:`epoch ${m}`,". One transaction; your wallet will ask you to approve it."]}),p&&h.jsx("p",{className:"error-text",children:p}),h.jsx(Ea,{label:"To seller",hint:t.moveWeightPenaltyBps===0?"No move penalty is currently configured. Moving does not burn your ANTS.":`Moving reduces future staking power by ${Bn(t.moveWeightPenaltyBps)}. Your ANTS principal is not burned.`,width:"lg",children:h.jsxs(Aa,{value:l,onChange:g=>c(g.target.value),disabled:i.length===0,children:[i.length===0?h.jsx("option",{value:"",children:"No other seller to move to"}):null,i.map(g=>h.jsx("option",{value:g.agentId,children:Sh(g.agentId,n)},g.agentId))]})}),h.jsx(Kr,{label:"Move allocation",disabled:p!==null,disabledReason:p??void 0,variant:"primary",path:"/api/positions/move",body:f,validate:()=>d?null:"Choose a target seller.",onStarted:r})]})}function Lz({position:e,onStarted:t}){const n=dr(),r=ht(e.amount)??0n,o=ht(e.weightAmount)??0n,[i,l]=B.useState(""),c=mc(i)?Dg(i,18):null,d=c!==null&&c>0n&&c<r,f=d?o*c/r:0n,p=ps(e,"split",n==null?void 0:n.current),m=v=>l(be(r*BigInt(Math.round(v*1e4))/10000n,18).replace(/,/g,"")),g={positionId:e.id,amount:i.trim()};return h.jsxs("div",{className:"stack",children:[h.jsx("p",{className:"hint",children:"Splitting replaces this position with two positions with the same seller and lock terms. Power splits in proportion to the amount, so total power is unchanged. Disable max lock before splitting; you can enable it on the new positions before they activate."}),p&&h.jsx("p",{className:"error-text",children:p}),h.jsx("div",{className:"form-row",children:h.jsx(fl,{label:"Amount to split off (ANTS)",inputMode:"decimal",value:i,onChange:v=>l(v.target.value),placeholder:"0.0",hint:h.jsxs(h.Fragment,{children:["of ",h.jsx("span",{className:"mono",children:be(e.amount,4)})," ·"," ",[.25,.5,.75].map(v=>h.jsxs("button",{type:"button",className:"link-button",style:{marginRight:8},onClick:()=>m(v),children:[v*100,"%"]},v))]})})}),h.jsxs("div",{className:"split-preview","aria-live":"polite",children:[h.jsxs("div",{className:"split-part",children:[h.jsxs("span",{className:"tile-label",children:["Keeps position #",e.id]}),h.jsxs("strong",{children:[be(d?r-c:r,4)," ANTS"]}),h.jsxs("span",{className:"small muted",children:["power ",be(d?o-f:o,0)]})]}),h.jsxs("div",{className:"split-part split-part--new",children:[h.jsx("span",{className:"tile-label",children:"New position"}),h.jsxs("strong",{children:[d?be(c,4):"—"," ANTS"]}),h.jsxs("span",{className:"small muted",children:["power ",d?be(f,0):"—"]})]})]}),h.jsx(Kr,{label:"Split position",variant:"primary",path:"/api/positions/split",body:g,disabled:p!==null,disabledReason:p??void 0,validate:()=>mc(i)?c===null?"Amount must have no more than 18 decimal places.":c>=r?`Amount must be below the position's ${be(e.amount,4)} ANTS.`:f===0n||o-f===0n?"Amount is too small: both parts need non-zero power.":null:"Amount must be a positive decimal number of ANTS.",onStarted:t})]})}function Dz({position:e,config:t,onStarted:n}){const r=dr(),o=!hl(e),i={positionId:e.id,enable:o},l=ps(e,o?"enable-max-lock":"disable-max-lock",r==null?void 0:r.current),c=r?r.current+1+t.maxStakeEpochs:null;return h.jsxs("div",{className:"stack",children:[o?h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"hint",children:["Max lock pins this position at the maximum lock (",t.maxStakeEpochs," epochs",r?`, ${n8(t.maxStakeEpochs*r.epochDuration)}`:"",") so its staking power stays at the maximum instead of decaying as the lock runs down."]}),h.jsx("p",{className:"hint",children:"The lock no longer counts down. To withdraw later, disable max lock first: a fresh full countdown then starts from the next epoch. Disabling before activation does not restore the original shorter lock. Moves and merges require max lock to be disabled at their effective epoch."})]}):h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"hint",children:["Disabling max lock starts a fresh ",t.maxStakeEpochs,"-epoch countdown from the next epoch",c!==null?h.jsxs(h.Fragment,{children:[" (unlocks ",h.jsx(ju,{epoch:c,dateOnly:!0}),")"]}):null,". Power then decays as the lock runs down."]}),h.jsx("p",{className:"hint",children:"Withdrawing before that countdown ends is an early exit and burns part of the principal."})]}),l&&h.jsx("p",{className:"error-text",children:l}),h.jsx(Kr,{label:o?"Enable max lock":"Disable max lock",variant:o?"primary":"default",path:"/api/positions/max-lock",body:i,disabled:l!==null,disabledReason:l??void 0,onStarted:n})]})}function Uz({kind:e,position:t,config:n,pools:r=[],onClose:o}){const i=dr(),l=i?nv("extend",i.current,[t]):null,c=l===null?null:t.stakeEndEpoch,d=c===null||l===null?0:Math.max(n.maxStakeEpochs-(c-l),0),f=ps(t,"extend",i==null?void 0:i.current),[p,m]=B.useState(Math.min(1,d)||1),g={move:"Move allocation",extend:"Extend position",split:"Split position","max-lock":hl(t)?"Disable max lock":"Enable max lock",withdraw:"Withdraw positions"},v={positionId:t.id,epochs:p},w=()=>f||(d<=0?`This position is already at the maximum lock (${n.maxStakeEpochs} epochs).`:p<1||p>d?`At most ${d} more epoch(s) can be added (max lock ${n.maxStakeEpochs}).`:null);return h.jsxs(Y1,{title:g[e],onClose:o,children:[e!=="extend"?h.jsx("div",{className:"small mb",children:h.jsx(Oz,{position:t,pools:r})}):null,e==="withdraw"?h.jsxs("div",{className:"stack",children:[t.changePending?h.jsxs("div",{className:"error-text",children:["Withdrawals are blocked until activation epoch ",t.withdrawableEpoch,". The position change is already confirmed."]}):null,h.jsx(aA,{positionId:t.id,autoOpen:!0,onStarted:o,onCancel:o})]}):null,e==="move"?h.jsx(Fz,{position:t,config:n,pools:r,onStarted:o}):null,e==="split"?h.jsx(Lz,{position:t,onStarted:o}):null,e==="max-lock"?h.jsx(Dz,{position:t,config:n,onStarted:o}):null,e==="extend"?h.jsxs("div",{className:"stack",children:[h.jsxs("dl",{className:"facts",children:[h.jsx("dt",{children:"Amount"}),h.jsxs("dd",{children:[be(t.amount,4)," ANTS"]}),h.jsx("dt",{children:"Current unlock time"}),h.jsx("dd",{children:h.jsx(Ah,{position:t,dateOnly:!0})})]}),f&&h.jsx("p",{className:"error-text",children:f}),h.jsx(tv,{label:"Add",value:p,min:1,max:Math.max(d,1),startEpoch:c,onChange:m,disabled:f!==null||d<=0,showUnlockDate:!1}),h.jsxs("dl",{className:"facts","aria-live":"polite",children:[h.jsx("dt",{children:"New unlock date"}),h.jsx("dd",{children:h.jsx(ju,{epoch:c!==null&&d>0&&!f?c+p:null,dateOnly:!0})})]}),h.jsx(Kr,{label:"Extend",variant:"primary",path:"/api/positions/extend",body:v,disabled:f!==null||d<=0,disabledReason:f??(d<=0?"This position is already at the maximum lock.":void 0),validate:w,onStarted:o})]}):null]})}function $z({kind:e,positions:t,pools:n,onClose:r,onStarted:o}){const i=dr(),l=t.map(p=>p.id),c=lA(t,i==null?void 0:i.current),d={positionIds:l},f=t[0];return h.jsx(Y1,{title:e==="merge"?`Merge ${t.length} positions`:`Withdraw ${t.length} positions`,onClose:r,children:h.jsxs("div",{className:"stack",children:[h.jsxs("dl",{className:"facts",children:[t.map(p=>h.jsx(zz,{position:p,pools:n},p.id)),h.jsx("dt",{children:"Total"}),h.jsxs("dd",{children:[be(Xg(t),4)," ANTS"]})]}),e==="merge"?h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"hint",children:["Merging combines these positions into one position of ",be(Xg(t),4)," ANTS in ",Sh(f.agentId,n)," with the shared unlock epoch ",f.stakeEndEpoch,". Power is preserved. The source positions close; their accrued rewards stay claimable. The contract verifies matching underlying lock start and end terms before wallet approval; matching unlock dates alone are not sufficient."]}),c?h.jsx("p",{className:"error-text",children:c}):null,h.jsx(Kr,{label:"Merge positions",variant:"primary",path:"/api/positions/merge",body:d,disabled:c!==null,disabledReason:c??void 0,onStarted:o})]}):h.jsxs(h.Fragment,{children:[t.some(p=>p.changePending)?h.jsx("div",{className:"error-text",children:"A selected position has not activated. Withdrawals remain blocked until its activation epoch."}):null,h.jsx(aA,{positionIds:l,autoOpen:!0,onStarted:o,onCancel:r})]})]})})}function zz({position:e,pools:t}){return h.jsxs(h.Fragment,{children:[h.jsxs("dt",{children:["#",e.id," · ",Sh(e.agentId,t)]}),h.jsxs("dd",{children:[be(e.amount,4)," ANTS · ",h.jsx(Ah,{position:e,dateOnly:!0})]})]})}function Wz(){var p;const e=Ns(),t=!e.browserWallet||!e.readOnly,n=t||!!(e.selectedAddress||e.walletAddress)&&!/^0x0{40}$/i.test(e.address),r=tt("overview",Ye.overview),o=tt("rewards",Ye.rewards,5*6e4),i=tt("pools",Ye.pools,5*6e4),l=B.useMemo(()=>{var m;return nA(((m=i.data)==null?void 0:m.pools)??[])},[i.data]),c=r.data,d=(c==null?void 0:c.wallet.canTransfer)??!1,f=ht(((p=i.data)==null?void 0:p.yourPendingStake)??null)??0n;return h.jsxs(h.Fragment,{children:[h.jsx("h1",{className:"page-title",children:"My positions"}),r.error&&!c?h.jsx(tn,{error:r.error,onRetry:r.refresh}):null,h.jsxs(M1,{children:[h.jsx(kr,{label:"Your total staked",value:c?be(c.wallet.totalActiveStake):"…",unit:"ANTS",loading:!c,sub:c?h.jsxs(h.Fragment,{children:[Fe(c.wallet.positionCount)," position",c.wallet.positionCount===1?"":"s",f>0n?h.jsxs(h.Fragment,{children:[" · ",h.jsxs("span",{className:"pending-amount",children:[be(f)," ANTS pending activation"]})]}):null]}):void 0}),h.jsx(kr,{label:"Your power",value:i.data?be(i.data.yourTotalPower):i.error?"—":"…",loading:i.loading&&!i.data,sub:i.data?`${Bn(i.data.yourNetworkShareBps)} of all pools`:i.error?h.jsx("span",{className:"danger",children:i.error}):"scanning pools…"}),h.jsx(kr,{label:t?"Claimable rewards":"Buyer rewards",value:o.data?be(o.data.total):o.error?"—":"…",unit:"ANTS",loading:o.loading&&!o.data,sub:o.error?h.jsxs("span",{className:"danger",children:[o.error," ",h.jsx("button",{className:"link-button",onClick:o.refresh,type:"button",children:"retry"})]}):o.data?h.jsx("a",{href:Ai("rewards"),children:t?"Stake rewards or claim →":"View buyer rewards →"}):"loading from chain…"}),h.jsx(kr,{label:"Wallet balance",value:c?be(c.wallet.ants,4):"…",unit:"ANTS",loading:!c,sub:c?d?"transfers enabled · stakeable":"transfers not enabled · stake from rewards":void 0})]}),h.jsx(Bz,{pools:l,enabled:n})]})}const Iu=B.createContext({updating:!1,stale:!1});function qz(){const e=tt("rewards",Ye.rewards,3e5),t=e.data,n=!!t&&e.loading&&e.reconciling,r=!!t&&(e.reconciling||!!e.error);return h.jsxs(h.Fragment,{children:[e.error&&!t?h.jsx(tn,{error:e.error,onRetry:e.refresh}):null,e.error&&t&&!e.loading?h.jsx(tn,{title:"Rewards could not be refreshed",error:`Shown amounts may be out of date. Retry refreshing before another action. This does not mean a confirmed transaction failed. ${e.error}`,onRetry:e.refresh}):null,!t&&e.loading?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"muted small mb",children:"Loading rewards from the blockchain and indexer…"}),h.jsx(Su,{rows:6})]}):null,t?h.jsxs(Iu.Provider,{value:{updating:n,stale:r},children:[h.jsx(Hz,{data:t}),t.scope!=="buyer"?h.jsx(Vz,{onRefresh:e.refresh,data:t}):null]}):null]})}function ey(){const{updating:e,stale:t}=B.useContext(Iu);return!t||e?null:h.jsx("span",{className:"reward-refresh-state",children:"Out of date"})}function ei({children:e}){const{updating:t}=B.useContext(Iu);return t?h.jsx("span",{className:"skeleton reward-amount-loading",role:"status","aria-label":"Refreshing amount","aria-busy":"true",children:h.jsx("span",{"aria-hidden":"true",children:e})}):h.jsx(h.Fragment,{children:e})}function Hz({data:e}){var w;const t=Ns(),[n,r]=B.useState(null),[o,i]=B.useState(!1),l=Fg([e.buyerUsage.total,e.legacy.buyer]),c=e.buyerUsage.operator,d=!!c&&c.toLowerCase()===(t.walletAddress??t.address).toLowerCase()&&!t.readOnly,f=!c&&t.canAuthorize,p=c&&!d&&t.browserWallet,m=dn(e.buyerUsage.total)?"No current buyer rewards are available to stake yet.":d?e.buyerUsage.claimable?null:"These buyer rewards are not currently eligible for direct staking.":"Connect the authorized buyer wallet to stake these rewards.",g=tt(d&&!dn(e.buyerUsage.total)?"positions:current":null,Ye.positions),v=async()=>{i(!0),r(null);try{await Ks("/api/wallet/authorize",{method:"POST"})}catch(b){r(b instanceof Error?b.message:String(b))}finally{i(!1)}};return h.jsxs(Qr,{className:"hero",children:[h.jsx("div",{className:"tile-label",children:"Buyer rewards"}),h.jsxs("p",{className:"hint",children:["Earned by buyer account ",h.jsx(ut,{value:t.buyerAddress??t.address}),"."]}),h.jsxs("div",{className:"hero-value",children:[h.jsx(ei,{children:be(l,4)}),h.jsx("span",{className:"unit",children:"ANTS"}),h.jsx(ey,{})]}),dn(l)?h.jsx("p",{className:"hero-sub muted",children:"Nothing to claim yet. Rewards accrue at each epoch boundary."}):null,c?d?null:h.jsxs("p",{className:"hint",children:["Connect the authorized wallet ",h.jsx(ut,{value:c})," on ",t.chainId," to claim or stake."]}):h.jsx("p",{className:"hint",children:"Authorize a wallet to claim or stake this buyer’s rewards."}),d&&t.selectedAddress&&(c==null?void 0:c.toLowerCase())!==t.selectedAddress.toLowerCase()?h.jsxs("p",{className:"hint",children:["Buyer rewards and positions created by staking them belong to operator ",h.jsx(ut,{value:c}),". Select that address to manage those positions."]}):null,f||p?h.jsxs("div",{className:"hero-actions",children:[f?h.jsx("button",{className:"btn",disabled:o,onClick:()=>void v(),children:o?"Opening…":"Authorize wallet ↗"}):null,p?h.jsx(LD,{}):null]}):null,n?h.jsx("p",{role:"alert",className:"hint",children:n}):null,h.jsxs("div",{className:"buckets",children:[h.jsx(gc,{visible:!0,name:"Current buyer rewards",amount:e.buyerUsage.total,note:"Earned from using AI services.",actions:h.jsxs(h.Fragment,{children:[h.jsx(va,{bucket:"buyer",scope:"buyer",amount:e.buyerUsage.total,title:"Claim current buyer rewards",disabled:!d||!e.buyerUsage.claimable,reason:"Connect the authorized wallet and check buyer reward eligibility."}),m?h.jsx("span",{className:"btn-wrap",title:m,children:h.jsx(wt,{variant:"outline",size:"sm",disabled:!0,children:"Stake rewards"})}):h.jsx(ty,{kind:"buyer",data:e,maxEpochs:((w=g.data)==null?void 0:w.config.maxStakeEpochs)??null})]})}),h.jsx(gc,{visible:!dn(e.legacy.buyer),name:"Legacy buyer rewards",amount:e.legacy.buyer,note:"Earned from using AI services under the previous rewards system.",actions:h.jsx(va,{bucket:"legacy",scope:"buyer",amount:e.legacy.buyer,title:"Claim legacy buyer rewards",disabled:!d||!e.legacy.buyerClaimable,reason:"Connect the authorized wallet for this buyer account."})})]})]})}function Vz({data:e,onRefresh:t}){var v,w,b;const n=Ns(),r=e.sellerUsage.claimable?e.sellerUsage.total:"0",o=e.legacy.seller,i=Fg([e.sellerUsage.total,e.legacy.seller,e.locked.claimable]),l=Fg([e.sellerUsage.claimable?"0":e.sellerUsage.total,e.legacy.seller,e.locked.claimable]),d=((v=tt("positions:current",Ye.positions).data)==null?void 0:v.config.maxStakeEpochs)??null,f=dn(i),p=e.legacy.sellerPayout,m=!!(p!=null&&p.recipient)&&p.destination!=="unknown",g=(p==null?void 0:p.destination)==="locked";return h.jsxs(h.Fragment,{children:[h.jsxs(Qr,{className:"hero","aria-label":"Staking rewards",children:[e.historySource==="chain"?h.jsx("p",{className:"status-line status-line--muted",children:"Closed-position history is unavailable. Without an indexer, some rewards may be missing. Refresh to retry."}):null,e.historySource==="local"?h.jsx("p",{className:"status-line status-line--muted",children:"Local transaction history included. Older closed positions—and their rewards—may be missing without an indexer."}):null,h.jsx("div",{className:"tile-label",children:"Staking rewards"}),h.jsxs("p",{className:"hint",children:["Unclaimed staking rewards for ",h.jsx(ut,{value:n.address}),"—not your wallet balance."]}),h.jsxs("div",{className:"hero-value",children:[h.jsx(ei,{children:be(e.staker.total,4)}),h.jsx("span",{className:"unit",children:"ANTS"}),h.jsx(ey,{})]}),((w=e.staker.source)==null?void 0:w.indexedBlock)!==void 0?h.jsxs("p",{className:"hint",children:["Estimated by Antscan at block ",e.staker.source.indexedBlock,". Claims and restaking are checked live."]}):null,e.staker.total===null?h.jsxs("p",{role:"status",className:"hint",children:["Staking rewards unavailable: ",((b=e.staker.source)==null?void 0:b.error)??"Antscan has not finished indexing these rewards."," ",h.jsx("button",{className:"link-button",onClick:t,children:"Retry"})]}):dn(e.staker.total)?h.jsx("p",{className:"hero-sub muted",children:"Nothing to claim yet. Rewards accrue at each epoch boundary."}):h.jsxs("div",{className:"hero-actions",children:[h.jsx(va,{bucket:"staker",amount:e.staker.total}),h.jsx(ty,{kind:"staker",data:e,maxEpochs:d})]})]}),h.jsxs(Qr,{className:"hero","aria-label":"Seller rewards",children:[h.jsx("div",{className:"tile-label",children:"Seller rewards"}),h.jsxs("p",{className:"hint",children:["Unclaimed AI selling rewards for ",h.jsx(ut,{value:n.address}),"—not your wallet balance."]}),h.jsxs("div",{className:"hero-value",children:[h.jsx(ei,{children:be(i,4)}),h.jsx("span",{className:"unit",children:"ANTS"}),h.jsx(ey,{})]}),f?null:h.jsxs("div",{className:"hero-sub",children:["Available to stake directly ",h.jsx("span",{className:"mono",children:h.jsx(ei,{children:be(r,4)})})," · other rewards ",h.jsx("span",{className:"mono",children:h.jsx(ei,{children:be(l,4)})})]}),f?h.jsx("div",{className:"hero-sub muted",children:"Nothing to claim yet. Rewards accrue at each epoch boundary."}):null,f&&dn(e.locked.locked)?null:h.jsxs("div",{className:"buckets",children:[h.jsx(gc,{visible:!dn(e.sellerUsage.total),name:"Current seller rewards",note:"Earned from providing AI services.",amount:e.sellerUsage.total,actions:h.jsxs(h.Fragment,{children:[h.jsx(va,{bucket:"seller",amount:e.sellerUsage.total,disabled:!e.sellerUsage.claimable,reason:"Seller usage rewards are not claimable from this wallet."}),h.jsx(ty,{kind:"seller",data:e,maxEpochs:d})]})}),h.jsx(gc,{visible:!dn(e.legacy.seller),name:"Legacy seller rewards",note:"Earned from providing AI services under the previous rewards system.",amount:e.legacy.seller,actions:h.jsxs(h.Fragment,{children:[h.jsx(va,{bucket:"legacy",amount:o,title:"Claim legacy seller rewards",label:m?g?"Claim not available yet":"Claim to wallet":"Claim unavailable",disabled:!m||g,reason:m&&g?"Claiming legacy seller rewards into the locked pool is currently unavailable in this dashboard.":"Payout destination could not be verified. Refresh rewards before claiming.",expectedLegacySellerRecipient:(p==null?void 0:p.recipient)??void 0}),m?null:h.jsx(wt,{variant:"outline",size:"sm",onClick:t,children:"Refresh rewards"})]})}),h.jsx(gc,{visible:!dn(e.locked.claimable)||!dn(e.locked.locked),name:"Locked seller rewards",note:"Past seller rewards held in the locked pool.",amount:e.locked.claimable,amountDetail:`${be(e.locked.locked,4)} ANTS locked`,actions:h.jsx(va,{bucket:"locked",amount:e.locked.claimable,label:"Withdraw available amount",title:"Withdraw released seller rewards",disabled:!e.locked.policy,reason:e.locked.policy?dn(e.locked.claimable)?"No rewards are currently released for withdrawal.":void 0:"M002 (unlock policy) is not installed."})})]})]})]})}function gc({visible:e,name:t,note:n,amount:r,amountDetail:o,actions:i}){return e?h.jsxs("div",{className:"bucket",children:[h.jsxs("div",{className:"bucket-main",children:[h.jsx("div",{className:"bucket-name",children:t}),n?h.jsx("div",{className:"bucket-note",children:n}):null]}),h.jsxs("div",{className:`bucket-amount mono${o?" bucket-amount--detailed":""}`,children:[h.jsxs("span",{children:[h.jsx(ei,{children:be(r,4)})," ",h.jsx("span",{className:"unit",children:"ANTS"})]}),o?h.jsx("span",{className:"bucket-amount-detail",children:h.jsx(ei,{children:o})}):null]}),h.jsx("div",{className:"bucket-actions",children:i})]}):null}function va({bucket:e,amount:t,label:n,title:r,disabled:o,reason:i,scope:l="wallet",expectedLegacySellerRecipient:c}){const{stale:d}=B.useContext(Iu),f={buckets:[e],scope:l,...c?{expectedLegacySellerRecipient:c}:{}},p=dn(t);return h.jsx(Kr,{label:n??"Claim to wallet",size:"sm",title:r??(e==="staker"?"Claim staking rewards":"Claim current seller rewards"),path:"/api/rewards/claim",body:f,disabled:d||o||p,disabledReason:d?"Wait for rewards to refresh before another action.":i??(p?"Nothing to claim.":void 0)})}function Qz(e){var i;const t=dr(),n=tt("positions:current",Ye.positions),[r,o]=B.useState(e??1);return B.useEffect(()=>{e!==null&&o(e)},[e]),{epochs:r,setEpochs:o,positions:n,slider:h.jsx(tv,{value:r,min:((i=n.data)==null?void 0:i.config.minStakeEpochs)??1,max:e??1,startEpoch:t&&n.data?t.current+n.data.config.stakeActivationDelay:null,onChange:o,disabled:e===null})}}function Gz({data:e,pools:t}){const n=new Map;for(const r of e.staker.positions){const o=ht(r.amount)??0n;o>0n&&n.set(r.agentId,(n.get(r.agentId)??0n)+o)}return n.size===0?h.jsx(h.Fragment,{children:"Destination unavailable"}):h.jsx("div",{children:[...n].map(([r,o])=>{const i=t.find(l=>l.agentId===r);return h.jsxs("div",{children:[i?Ff(i):`Seller pool #${r}`," · ",be(o.toString(),4)," ANTS"]},r)})})}function ty({kind:e,data:t,maxEpochs:n}){var S;const{stale:r}=B.useContext(Iu),{epochs:o,slider:i,positions:l}=Qz(n),c=tt("pools",Ye.pools,5*6e4),[d,f]=B.useState(()=>t.sellerUsage.agentId?String(t.sellerUsage.agentId):""),p=((S=c.data)==null?void 0:S.pools)??[];B.useEffect(()=>{!d&&p[0]&&f(String(p[0].agentId))},[d,p]);const m=e==="staker"?t.staker.total:e==="seller"?t.sellerUsage.total:t.buyerUsage.total,g=e==="staker"?!0:e==="seller"?t.sellerUsage.claimable:t.buyerUsage.claimable,v=e==="staker"?"/api/rewards/restake":"/api/rewards/stake-usage",w=e==="staker"?{epochs:o}:{side:e,epochs:o,...e==="buyer"&&d?{stakeAgentId:Number(d)}:{}},b=p.find(I=>I.agentId===t.sellerUsage.agentId),C=e==="staker"?h.jsx(Gz,{data:t,pools:p}):b?Ff(b):t.sellerUsage.agentId?`Seller pool #${t.sellerUsage.agentId}`:"Destination unavailable";return n===null&&g&&!dn(m)?l.error&&!l.loading?h.jsx("span",{className:"btn-wrap",title:`Staking configuration could not be loaded: ${l.error}`,children:h.jsx(wt,{variant:"outline",size:"sm",onClick:l.refresh,children:"Retry loading"})}):h.jsx(wt,{variant:"outline",size:"sm",disabled:!0,"aria-busy":"true","aria-label":"Loading staking configuration",children:"Loading…"}):h.jsx(Kr,{label:"Stake rewards",size:"sm",title:e==="staker"?"Stake position rewards":`Stake current ${e} rewards`,path:v,body:w,disabled:r||dn(m)||!g||n===null,disabledReason:r?"Wait for rewards to refresh before another action.":g?"No rewards are available to stake.":`${e} usage rewards are not claimable from this wallet.`,validate:()=>n===null?"Pool configuration is still loading.":e==="buyer"&&!d?"Choose a pool to stake into.":null,summary:e==="buyer"?[["Amount",h.jsxs("span",{className:"mono",children:[be(m,4)," ANTS"]})]]:[["Amount",h.jsxs("span",{className:"mono",children:[be(m,4)," ANTS"]})],["Into",C],["Lock",h.jsxs("span",{className:"mono",children:[o," epochs"]})]],children:h.jsxs("div",{className:"stack mt",children:[i,e==="buyer"?h.jsx(Ea,{label:"Pool",width:"lg",hint:c.loading&&!c.data?"loading pools…":void 0,children:h.jsx(Aa,{value:d,onChange:I=>f(I.target.value),children:p.map(I=>{var A,j;return h.jsx("option",{value:I.agentId,children:((j=(A=I.profile)==null?void 0:A.name)==null?void 0:j.trim())||`Agent ID ${I.agentId}`},I.agentId)})})}):null]})})}function Kz(){const e=Ns(),t=/^0x0{40}$/i.test(e.address),n=tt(t?null:`seller:${e.address.toLowerCase()}`,Ye.seller),r=n.data;return t?h.jsx(Dt,{title:"Open your seller dashboard",children:h.jsxs("p",{className:"muted",children:["Open this dashboard with ",h.jsx("code",{children:"antseed ants --address 0x..."})," using your seller’s address, then connect that seller’s wallet."]})}):r?h.jsxs(h.Fragment,{children:[n.error&&r?h.jsxs("div",{className:"status-line",children:["Refresh failed: ",n.error]}):null,r.agentId===0?h.jsx(Dt,{title:"Not registered as a seller",children:h.jsx("p",{className:"muted",children:"The connected wallet has no seller identity on this network. Switch to your seller wallet, or register this wallet below to create its identity and bind it in the seller registry."})}):null,h.jsx(Yz,{data:r}),h.jsx(Dt,{title:"Wash-trading status",children:h.jsx(q$,{})}),h.jsx(Dt,{className:"panel-collapsible",children:h.jsx(ir,{summary:"Advanced: submit a seller proof",children:h.jsxs("div",{className:"stack-lg",children:[h.jsx(G$,{}),h.jsxs("div",{children:[h.jsx("div",{className:"section-label",children:"Proof status"}),h.jsx(K$,{})]})]})})}),h.jsx(Dt,{className:"panel-collapsible",children:h.jsx(ir,{summary:"Look up another seller",children:h.jsx(H$,{})})})]}):n.error?h.jsx(tn,{error:n.error,onRetry:n.refresh}):h.jsx(Su,{rows:6})}function fa({value:e}){return e===null?h.jsx("span",{className:"muted",children:"n/a"}):e?h.jsx(Nn,{tone:"accent",children:"yes"}):h.jsx(Nn,{tone:"muted",children:"no"})}function Yz({data:e}){const t=e.starter;return h.jsxs(h.Fragment,{children:[h.jsxs(M1,{children:[h.jsx(kr,{label:"Agent id",value:e.agentId||"—",sub:e.identityRegistered?"identity registered":"no ERC-8004 identity"}),h.jsx(kr,{label:"Eligible",value:e.eligible?"yes":"no",sub:e.registryBound?"bound in seller registry":"not bound"}),h.jsx(kr,{label:"Pool active stake",value:be(e.poolActiveStake),unit:"ANTS",sub:e.minPoolStake!==null?`min ${be(e.minPoolStake)} ANTS`:void 0})]}),h.jsxs(Dt,{title:"Identity and registry",children:[h.jsx($t,{items:[["ERC-8004 identity",h.jsx(fa,{value:e.identityRegistered})],["Seller registry binding",h.jsx(fa,{value:e.registryBound})],["Legacy stake",`${Wn(e.legacyStake)} USDC`],["Legacy eligibility path",h.jsx(fa,{value:e.legacyEligibilityEnabled})]]}),h.jsx("div",{className:"mt",children:h.jsx(Jz,{data:e})}),h.jsxs("div",{className:"hint mt",children:["CLI equivalent: ",h.jsx("code",{children:"antseed seller register"})]})]}),h.jsx(Dt,{title:"Starter grant",actions:t?t.claimable?h.jsx(Nn,{tone:"accent",children:"claimable"}):t.expired?h.jsx(Nn,{tone:"muted",children:"expired"}):t.initialized?h.jsx(Nn,{tone:"amber",children:"initialized"}):h.jsx(Nn,{tone:"muted",children:"not initialized"}):null,children:t?h.jsxs(h.Fragment,{children:[h.jsx($t,{items:[["Grants remaining",Fe(t.remaining)],["Grant amount",`${be(t.amount,4)} ANTS`],["Claim window ends",h.jsx(ju,{epoch:t.endEpoch})],["Legacy eligible",h.jsx(fa,{value:t.legacyEligible})]]}),h.jsx("div",{className:"mt",children:h.jsx(Kr,{label:t.initialized?"Grant already claimed":"Claim starter",variant:"primary",title:"Claim starter grant",path:"/api/seller/claim-starter",body:{},disabled:t.initialized||!t.claimable,disabledReason:t.initialized?"This starter grant has already been claimed.":t.expired?"The starter grant window has expired.":"The starter grant is not claimable for this wallet."})}),h.jsxs(ir,{summary:"Details",className:"mt",children:[h.jsx($t,{items:[["Contract",t.contract?h.jsx(ut,{value:t.contract,short:!1}):"—"],["Initialized",h.jsx(fa,{value:t.initialized})],["Expired",h.jsx(fa,{value:t.expired})]]}),h.jsxs("div",{className:"hint mt",children:["CLI equivalent: ",h.jsx("code",{children:"antseed seller legacy claim-starter"})]})]})]}):h.jsx("span",{className:"muted",children:"No starter grant contract on this chain."})})]})}function Jz({data:e}){const[t,n]=B.useState(e.agentId>0?String(e.agentId):""),r=t.trim()?{agentId:Number(t)}:{};return h.jsxs("div",{className:"form-row",children:[h.jsx(fl,{label:"Agent id (optional)",hint:"Use an existing ID, or leave empty to create an identity if this wallet has none.",width:"md",inputMode:"numeric",value:t,onChange:o=>n(o.target.value)}),h.jsx(Kr,{label:e.registryBound?"Re-register binding":"Register binding",variant:"primary",title:"Register seller binding",path:"/api/seller/register",body:r,validate:()=>t.trim()&&!hD(t)?"Agent id must be a positive integer.":null}),h.jsx("p",{className:"hint mt",children:"Binds this wallet to its agent id in the seller registry. Without an id, it reuses a known identity or creates one if this wallet has none. Creating and binding can require separate transactions."})]})}function Zz(){var Q,V,H,L,z,O,K;const e=Ns(),t=!e.browserWallet||!e.readOnly,n=tt("overview",Ye.overview),r=tt(t?"positions:current":null,Ye.positions),o=tt("rewards",Ye.rewards,5*6e4),i=tt("pools",Ye.pools,5*6e4),l=n.data,c=(Q=o.data)==null?void 0:Q.buyerUsage.operator,d=t&&!!c&&c.toLowerCase()!==e.address.toLowerCase()&&BigInt(((V=o.data)==null?void 0:V.buyerUsage.total)??"0")>0n,f=(l==null?void 0:l.notices.filter(J=>!J.startsWith("ANTS transfers are not enabled")))??[],[p,m]=B.useState(void 0),[g,v]=B.useState(!1),w=B.useRef(null),[b,C]=B.useState(null),S=B.useRef(null),I=()=>{C(null),requestAnimationFrame(()=>{var J;(J=S.current)!=null&&J.isConnected&&S.current.focus({preventScroll:!0})})},A=B.useMemo(()=>{var J;return nA(((J=i.data)==null?void 0:J.pools)??[])},[i.data]),j=B.useRef(null),N=b!==null?A.find(J=>J.agentId===b):void 0;N&&i.data&&(j.current={pool:N,view:i.data});const _=b!==null&&((H=j.current)==null?void 0:H.pool.agentId)===b?j.current:null,P=J=>{S.current=document.activeElement instanceof HTMLElement?document.activeElement:null,C(J.agentId)},R=()=>{m(void 0),requestAnimationFrame(()=>{var F;const J=w.current;J!=null&&J.isConnected?J.focus({preventScroll:!0}):(F=document.querySelector("[data-stake-trigger]"))==null||F.focus({preventScroll:!0})})},M={config:((L=r.data)==null?void 0:L.config)??null,balance:l==null?void 0:l.wallet.ants,rewards:o.data,rewardsError:o.error,walletReady:t};return h.jsxs(h.Fragment,{children:[e.browserWallet&&d?h.jsxs(Kc,{tone:"info",title:"Connect your authorized wallet",children:["To stake buyer rewards, use the wallet button above to switch to ",h.jsx("span",{className:"mono",title:c,children:wh(c)}),", the authorized wallet for your buyer account."]}):null,n.error&&!l?h.jsx(tn,{error:n.error,onRetry:n.refresh}):null,n.error&&l?h.jsxs("div",{className:"status-line",children:["Refresh failed: ",n.error]}):null,l&&l.phase!=="active"?h.jsx(eW,{data:l}):null,f.length>0?h.jsx(Kc,{tone:"info",children:h.jsx("ul",{className:"notices-list",children:f.map((J,F)=>h.jsx("li",{children:J},F))})}):null,i.data?h.jsx(Xz,{view:i.data}):null,h.jsxs(Dt,{title:"Sellers",className:"pools-card",actions:h.jsx(wt,{"data-stake-trigger":!0,variant:"primary",size:"sm",onClick:J=>{w.current=J.currentTarget,m(null)},disabled:!i.data,children:"Stake rewards"}),children:[i.error&&!i.data?h.jsx(tn,{error:i.error,onRetry:i.refresh}):null,i.error&&i.data?h.jsxs("div",{className:"status-line",children:["Refresh failed: ",i.error]}):null,((z=i.data)==null?void 0:z.source)==="chain"?h.jsxs("div",{className:"status-line",children:["Pool statistics are unavailable",i.data.sourceError?` (${i.data.sourceError})`:" (no explorer configured)","; only pools you stake in are listed, read live from the chain."]}):null,h.jsx(xz,{pools:A,currentEpoch:((O=i.data)==null?void 0:O.currentEpoch)??0,loading:i.loading&&!i.data,onOpen:P,onStake:P})]}),p!==void 0&&i.data?h.jsxs(G1,{isOpen:!0,title:"Stake rewards",size:"lg",overlayClassName:"ants-stake-overlay",onClose:()=>{g||R()},children:[r.error&&!r.data?h.jsx(tn,{error:r.error,onRetry:r.refresh}):null,h.jsx(tA,{config:((K=r.data)==null?void 0:K.config)??null,pools:A.filter(J=>J.stakeable),balance:l==null?void 0:l.wallet.ants,rewards:o.data,rewardsError:o.error,defaultAgentId:p,onStarted:R,onClose:R,onBusyChange:v},`${e.address}:${e.evmChainId}:${p??"any"}`)]}):null,_?h.jsx(Cz,{pool:_.pool,view:_.view,onClose:I,stake:M}):null]})}function Xz({view:e}){const t=e.networkVolumes.find(r=>r.epoch===e.currentEpoch-1),n=e.pools.filter(r=>r.stakeable).length;return h.jsxs("div",{className:"ticker",role:"list","aria-label":"Network",children:[h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Total staked"}),h.jsxs("span",{className:"ticker-value",children:[be(e.totalActiveStake),h.jsx("small",{children:"ANTS"})]})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Total power"}),h.jsx("span",{className:"ticker-value",children:be(e.totalPowerWeight)})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Staker budget · epoch"}),h.jsxs("span",{className:"ticker-value",children:[be(e.stakerBudget),h.jsx("small",{children:"ANTS"})]})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Network volume · last epoch"}),h.jsxs("span",{className:"ticker-value",children:[t?Ja(t.usdc):"—",h.jsx("small",{children:"USDC"})]})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Sellers"}),h.jsxs("span",{className:"ticker-value",children:[Fe(n),h.jsx("small",{children:"stakeable"})]})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Epoch"}),h.jsxs("span",{className:"ticker-value",children:[e.currentEpoch,h.jsx("small",{children:e.source==="indexer"?"indexed":"chain"})]})]})]})}function eW({data:e}){const t=Ch(1e3),{phase:n,epoch:r}=e;if(n==="legacy")return h.jsx(Kc,{tone:"info",title:"Legacy protocol",children:"The recognized-usage stack (M001) is not deployed on this chain. Pool staking, usage rewards and emissions views are unavailable."});if(n==="deployed"&&r.effective!==null){const o=Ya(r.effective,r.genesis,r.epochDuration),i=Math.max(0,Math.floor(o-t/1e3));return h.jsxs(Kc,{tone:"warning",title:"Deployed, not active yet",children:["Recognized usage activates at epoch ",h.jsx("span",{className:"mono",children:r.effective})," (",ar(o),") — in ",h.jsx("span",{className:"mono",children:bh(i)}),". Positions staked now become active from the effective epoch."]})}return null}const cA="ants.dashboard.theme",tW=6e4;function nW(){var e;try{const t=window.localStorage.getItem(cA);if(t==="light"||t==="dark")return t}catch{}try{return(e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: light)").matches?"light":"dark"}catch{return"dark"}}function rW(){const[e,t]=B.useState(()=>o5()===null);B.useEffect(()=>gj(()=>t(!0)),[]);const[n,r]=B.useState(nW);B.useEffect(()=>{document.documentElement.dataset.theme=n},[n]);const o=B.useCallback(()=>{r(i=>{const l=i==="dark"?"light":"dark";try{window.localStorage.setItem(cA,l)}catch{}return l})},[]);return e?h.jsx(oW,{}):h.jsx(sW,{theme:n,toggleTheme:o})}function oW(){return h.jsx("div",{className:"full-page",children:h.jsxs(Qr,{className:"full-page-inner",children:[h.jsxs("div",{className:"wordmark",children:["ANTS",h.jsx("span",{children:"staking"})]}),h.jsxs("p",{children:["Open this dashboard with ",h.jsx("code",{children:"antseed ants"}),"."]}),h.jsx("p",{className:"muted small",children:"The CLI starts the local server and opens the browser with a one-time session token. This page has no token (or the server rejected it), so it cannot read wallet or chain data."})]})})}function sW({theme:e,toggleTheme:t}){const n=tt("config",Ye.config,Number.POSITIVE_INFINITY),r=tt("overview",Ye.overview),o=wD(),i=r.refresh;B.useEffect(()=>{const c=window.setInterval(()=>{document.visibilityState==="visible"&&i()},tW);return()=>window.clearInterval(c)},[i]);const l=B.useMemo(()=>n.data?{config:n.data,overview:r.data,overviewError:r.error,theme:e,toggleTheme:t}:null,[n.data,r.data,r.error,e,t]);return l?h.jsx(MD,{config:l.config,children:h.jsx(l8.Provider,{value:l,children:h.jsx(ID,{children:h.jsx(QD,{page:o.page,updatedAt:r.updatedAt,loading:r.loading,children:h.jsx(iW,{page:o.page})})})})}):h.jsx("div",{className:"full-page",children:h.jsx(Qr,{className:"full-page-inner",children:n.error?h.jsx(tn,{error:n.error,onRetry:n.refresh,title:"Could not load dashboard config"}):h.jsx("span",{className:"muted",children:"Connecting to the local server…"})})})}function iW({page:e}){switch(e){case"positions":return h.jsx(Wz,{});case"rewards":return h.jsx(qz,{});case"seller":return h.jsx(Kz,{});case"network":return h.jsx(Y$,{});case"addresses":return h.jsx(eU,{});case"stake":default:return h.jsx(Zz,{})}}mj();window.location.hash||window.history.replaceState(null,"","#/stake");const uA=document.getElementById("root");if(!uA)throw new Error("#root element is missing");pj.createRoot(uA).render(h.jsx(B.StrictMode,{children:h.jsx(rW,{})}));const W2=Object.freeze(Object.defineProperty({__proto__:null,default:jg},Symbol.toStringTag,{value:"Module"}));export{z9 as $,Cj as A,oe as B,N5 as C,ge as D,ga as E,S4 as F,Ij as G,dc as H,vs as I,AW as J,fW as K,SW as L,VI as M,vf as N,wf as O,D9 as P,at as Q,lr as R,mi as S,Ec as T,Ve as U,MW as V,Mc as W,F9 as X,OW as Y,IW as Z,fe as _,X7 as a,m9 as a0,St as a1,_3 as a2,O9 as a3,R3 as a4,$9 as a5,jW as a6,$r as a7,nl as a8,Ar as a9,K7 as aA,Fm as aB,py as aC,js as aD,E9 as aE,_C as aF,nt as aG,Ss as aH,Ay as aI,Hr as aJ,Dy as aK,jo as aL,al as aM,a1 as aN,_9 as aO,L3 as aP,RW as aQ,_W as aR,RC as aS,ui as aT,J7 as aU,Fj as aV,du as aW,UC as aa,QB as ab,vC as ac,wW as ad,e4 as ae,bW as af,ws as ag,l4 as ah,yc as ai,t4 as aj,c4 as ak,X3 as al,FW as am,Hn as an,BW as ao,TW as ap,Xf as aq,W3 as ar,ET as as,Ut as at,ve as au,bf as av,cr as aw,$5 as ax,hu as ay,Pn as az,nn as b,vu as c,L7 as d,ji as e,qr as f,hy as g,_n as h,Qa as i,H3 as j,bN as k,Hf as l,lW as m,t5 as n,$C as o,Wf as p,zC as q,cW as r,At as s,Ao as t,rl as u,Vn as v,Ym as w,el as x,za as y,g5 as z};